Sunday, February 27, 2022

C - WORDLE CLONE IN C

Inspired by the popular game, I set about coding my own version for the terminal. :)

This is the first playable version: https://github.com/velorek1/cwordle

It is only one file with code plus the dictionary files that can be changed or adapted as they are just regular text files.

I think it looks retro and cool and it is worth sharing. One of my most popular programs so far. :)





Sunday, February 6, 2022

LYNX - A LIBRARY FOR CREATING TEXT USER INTERFACES FOR TERMINALS IN C

Lynx compiles some of the ideas I have developed into a soon-to-be cross-platform library that makes it possible to develop fast TUI applications for terminals.

The following Demo features:

  • Double Screen Buffer.
  • Ansi Color Sequences for Terminals.
  • Keyboard input with kbhit().  
  • Screen Resizing.
  • Timer for animations.

https://github.com/velorek1/lynx

 


Saturday, January 2, 2021

FilevieWer - A TUI program to view files with scroll for linux terminals


These days I've been working on fw-fileviewer: a fileviewer for GNU/linux terminals. 



My text editor (C-edit) is currently stalled. It needs a thorough redesign and I need to find the time and motivation to undertake it. In the meantime, I have put everything I've learned in that project to code a simple fileviewer for linux terminals with a decent Text User Interface. Plus, it makes use of my latest module with timers in C.

Link to code -> fw-fileviewer

 

 



Saturday, December 26, 2020

A millisecond Timer in C


Here is one possible implementation of a millisecond timer in C using time.h and ts.tv_nsec
Proof of concept:  Timer Source code
A simpler, more compliant version can be found in repository.

Saturday, December 5, 2020

New Horizons

Google Sheets & Javascript

GOOGLE SHEET MANIPULATION

Spreadsheet link

WORD TRANSLATION
COMMENT
[+] Words:

>> Translation:

Result:

Table:

Saturday, November 14, 2020

A one-line formula to add the digits of a 2-digit number using mod

Adding two digits of a number is the same as subtracting 9 multiplied by the number in the tens from the original number. This formula uses mod(%) to isolate such number and provides the result of the addition of the 2 digits of a given number from 11 to 99:

From: x- (((x -(x mod 10)) / 10) *9)
To: f(x) = x - (1/10(x - x mod 10))× 9
Example: 23 -> 2+3 = 5 | 23 - (9*2) = 5 | 23 - (((23 - (23 mod 10)) / 10) * 9) = 5 
Sample in Ctwodigits




Friday, August 28, 2020

Asteroid Game

Screenshot of the remake of the classic game Asteroid with SDL2 in pure C.

[+] Code:
First commit and subsequent development: 

[+] Game Structure: