Details
-
AboutMechatronics Engineering student
-
SkillsMachine learning enthusiast Python fanboy
-
LocationIstanbul, Turkiye
-
Website
-
Github
Joined devRant on 10/12/2016
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
-
Ever heard of event-based programming? Nope? Well, here we are.
This is a software design pattern that revolves around controlling and defining state and behaviour. It has a temporal component (the code can rewind to a previous point in time), and is perfectly suited for writing state machines.
I think I could use some peer-review on this idea.
Here's the original spec for a full language: https://gist.github.com/voodooattac...
(which I found to be completely unnecessary, since I just implemented this pattern in plain TypeScript with no extra dependencies. See attached image for how TS code looks like).
The fact that it transcends language barriers if implemented as a library instead of a full language means less complexity in the face of adaptation.
Moving on, I was reviewing the idea again today when I discovered an amazing fact: because this is based on gene expression, and since DNA is recombinant, any state machine code built using this pattern is also recombinant[1]. Meaning you can mix and match condition bodies (as you would mix complete genes) in any program and it would exhibit the functionality you picked or added.
You can literally add behaviour from a program (for example, an NPC) to another by copying and pasting new code from a file to another. Assuming there aren't any conflicts in variable names between the two, and that the variables (for example `state.health` and `state.mood`) mean the same thing to both programs.
If you combine two unrelated programs (a server and a desktop application, for example) then assuming there are no variables clashing, your new program will work as a desktop application and as a server at the same time.
I plan to publish the TypeScript reference implementation/library to npm and GitHub once it has all basic functionality, along with an article describing this and how it all works.
I wish I had a good academic background now, because I think this is worthy of a spec/research paper. Unfortunately, I don't have any connections in academia. (If you're interested in writing a paper about this, please let me know)
Edit: here's the current preliminary code: https://gist.github.com/voodooattac...
***
[1] https://en.wikipedia.org/wiki/...29 -
The Linux Kernel, not just because of the end product. I find it's organizational structure and size (both in code and contributors) inspirational.
Firefox. Even if you don't use it as your main browser, the sheer amount of work Mozilla has contributed to the world is amazing.
OpenTTD. I liked the original game, and 25 years after release some devs are still actively maintaining an open source clone with support for mods.
Git. Without it, it would not just be harder working on your own source code, it would also be harder to try out other people's projects.
FZF is possibly my favorite command line tool.
Kitty has recently become my favorite terminal.
My favorite thing open source has brought forth though is a certain mindset, which in the last decade can be felt most heavily in the fact that:
1. Scientific papers with accompanying GitHub urls, especially when it comes to AI. Cutting edge research is one git clone away.
2. There are so many open hardware projects. From raspberry pi to 3d printers to laser cutters, being a "maker" suddenly became a mainstream hobby.12 -
I know it's not too impressive, but got this working using my Windows console double-buffering system and literal bitmaps for the large numbers.
I have posted about both previously if you want more details :312