3 ms·
I tried to create a new programming language, Toy Santa, but I became too demotivated to finish it. But I feel the codebase of toysanta is the best I've been do
by leresidue 9y ago
I tried to create a new programming language, Toy Santa, but I became too demotivated to finish it. But I feel the codebase of toysanta is the best I've been doing to date.
It's in C++, using Direct2D. One day, I will release it on github. But until then, I will try to create a presentable version.
(yes, I am a tad attention-grabbing here;-)
...I an autodidact, I work for myself.
- ianai 9y agoYou’ve got to self promote. So what’s it capable of doing? Now/planned/hoped for
- leresidue 9y agoIt can't do a lot. The language 'specification' is just a buch of lined paper sheets. What I want my language to do, is a layer between the core of a C++ program, and the user-customizable side. I'm using it to call a zoom function in my skeleton image program. void toysanta() { toy *nbzoom = nullptr; nbzoom = isVerb(L"setzoomlevel"); if(nbzoom) { if(nbzoom->hasClaus && nbzoom->sled == toy::integer) { bool k = false; POINT pt = {0,0}; toy *xt = getToy(L"x"); toy *yt = getToy(L"y"); if(xt && yt && xt->canNumber() && yt->canNumber()) { pt.x = xt->getInteger(); pt.y = yt->getInteger(); k = true; } setzoomlevel(nbzoom->claus.integer, k, pt); } } } The toysanta() member function is from the VerbCommand class. From the zoom widget, there's void ZoomWidget::sendzoom_to_target(bool k, POINT pt) { if(target) { std::wstring cc = L"setzoomlevel "; int zoom = realZ;//(zPos-32)/3; cc += std::to_wstring(zoom); if(k) { cc += L" x " + std::to_wstring(pt.x); cc += L" y " + std::to_wstring(pt.y); } target->receive(&cc); } } The receive() member function calls the toysanta() function from the target. What I plan, is for it to just be perfect, to be honest. I hope it may help others create better software one day.