I recently have gotten into the "drag and drop" forms of programming like Node-RED and n8n.
Obviously, anyone here who has read my posts knows I know how to write code, but having a bunch of built in connectors that are agnostic to each other with the Oauth and the like being somewhat plug and play allows me to iterate on some ideas a lot quicker. I installed an n8n instance on my server, and have become kind of addicted to making different Discord bots, and I'm having more fun with this than I thought I would. 95% of the stuff on there is basically drag and drop, and when I need more elaborate logic then I can easily drop into JavaScript. I am looking into writing new nodes for different services, and I keep having new ideas for different stuff I want to build.
About 2 years back I began working on a very simple markdown compiler, it was “immediate” in that it would consume markdown and immediately spit html. That project turned into a whole static site generator called Kevlar — https://github.com/aadv1k/kevlar
Entirely built from scratch in C without any dependencies. Now I wrote this code when I was 16, so many memory leaks and generally issues that I wanted to rectify and begin using third project for my own blog (currently old version is used — https://aadvikpandey.com) The Kevlar v3 (https://github.com/aadv1k/kevlar/tree/kevlar-v3) here is all that it includes; more spec compliant markdown AST-based parsing; A better .ini config parser (right now it’s literally strtok on ‘=‘ and generally very hacky) as well as name spacing; more powerful templating tags like IF, FOR with lisp-like configuration Of course staying true to the spirit of “from scratch” :) Honestly I did scope creeped a little since I mainly wanted to fix a memory leaks issue in the markdown compiler lol; anyway I will share it once it gets completed on hacker news :)
> Entirely built from scratch in C without any dependencies. Now I wrote this code when I was 16
Very few young folk are learning C; I think it is commendable that you are. You code doesn't seem very strongly structured (to be expected, TBH) but much better than any learner would see. What resources did you use to start learning C? I ask because it looks to me that those resources covered "how to program in C" but not so much design and structure. Here's two links (my own blog) to get you started on one or two common C patterns designed to minimise bugs: https://www.lelanthran.com/chap9/content.html https://www.lelanthran.com/chap13/content.html
Hey, thanks for your comment :) I had a look at your blog, it's looks really useful and high quality! I will go through it with vim open on the side and a nice coffee
Yeah and I'd agree with your point. One BIG critique I have for my own 2-year-past code was that I did not know how to do dynamic heap allocation very well, hence you may have seen everything is stack allocated lol Particularly egrigeous example:
(I had read "clean code" by uncle bob at the time, so I was trying to emulate clean code I saw in the book. Needless to say, pretty good example of the nuance needed when writing clean code haha)
So with the V3 release, I am re-writing the markdown compiler for instance, and being a bit more mindful of the structure Example: https://github.com/Aadv1k/kevlar/blob/markdown-compiler-rewr... I think once I am done I will create a separate "Show HN" post to get valuable feedback (like this one!) from smarter folks than me. Once again, thanks for the fantastic blog :) will be sure to go through it Cheers!
Check out my project at https://www.MobiusClock.com: A 3D WebGL Clock on a Möbius Strip that shows 24hr time on a 12hr face. The hour indicator follows the edge of the strip, thus must make 2 turns to return to its starting point, giving you a 24 hour clock. The minute and second indicators move along the middle of the strip and thus return to their starting points in only one turn. Has the ability to rotate!
Just added a new feature: a 'Fast Mode' button to temporarily speed up the hands, which helps visualize how the slow-moving parts work, how the hour indicator moves along the edge. Would love feedback on the implementation.
If you happen to have an old or spare iPad or tablet, you can open my mobius clock page in a browser and set it on a shelf (plugged in of course). Kind of like a weird wall clock...
The WebGL game was build with my 2D game engine "Impact", which I previously ported to C[1]. The game has a 3d view, but logic still mostly works in 2 dimensions on a flat ground. The N64 version "just" needed a different rendering and sound backend.
Comments (1,369) 864 threads
Earlier commentsObviously, anyone here who has read my posts knows I know how to write code, but having a bunch of built in connectors that are agnostic to each other with the Oauth and the like being somewhat plug and play allows me to iterate on some ideas a lot quicker.
I installed an n8n instance on my server, and have become kind of addicted to making different Discord bots, and I'm having more fun with this than I thought I would. 95% of the stuff on there is basically drag and drop, and when I need more elaborate logic then I can easily drop into JavaScript. I am looking into writing new nodes for different services, and I keep having new ideas for different stuff I want to build.
Entirely built from scratch in C without any dependencies. Now I wrote this code when I was 16, so many memory leaks and generally issues that I wanted to rectify and begin using third project for my own blog (currently old version is used — https://aadvikpandey.com)
The Kevlar v3 (https://github.com/aadv1k/kevlar/tree/kevlar-v3) here is all that it includes; more spec compliant markdown AST-based parsing; A better .ini config parser (right now it’s literally strtok on ‘=‘ and generally very hacky) as well as name spacing; more powerful templating tags like IF, FOR with lisp-like configuration
Of course staying true to the spirit of “from scratch” :)
Honestly I did scope creeped a little since I mainly wanted to fix a memory leaks issue in the markdown compiler lol; anyway I will share it once it gets completed on hacker news :)
Very few young folk are learning C; I think it is commendable that you are.
You code doesn't seem very strongly structured (to be expected, TBH) but much better than any learner would see.
What resources did you use to start learning C? I ask because it looks to me that those resources covered "how to program in C" but not so much design and structure.
Here's two links (my own blog) to get you started on one or two common C patterns designed to minimise bugs:
https://www.lelanthran.com/chap9/content.html
https://www.lelanthran.com/chap13/content.html
Yeah and I'd agree with your point. One BIG critique I have for my own 2-year-past code was that I did not know how to do dynamic heap allocation very well, hence you may have seen everything is stack allocated lol
(I had read "clean code" by uncle bob at the time, so I was trying to emulate clean code I saw in the book. Needless to say, pretty good example of the nuance needed when writing clean code haha)Particularly egrigeous example:
So with the V3 release, I am re-writing the markdown compiler for instance, and being a bit more mindful of the structure
Example: https://github.com/Aadv1k/kevlar/blob/markdown-compiler-rewr...
I think once I am done I will create a separate "Show HN" post to get valuable feedback (like this one!) from smarter folks than me. Once again, thanks for the fantastic blog :) will be sure to go through it
Cheers!
[1] https://phoboslab.org/log/2024/08/high_impact
Do you flash the game to a custom cartridge for testing?
All comments shown.
Couldn't load more comments. Check your connection and try again.