Haven't posted anything about yodascript in a while. I've still been working on it tho. Today I implemented binary search tree in yodascript. Going to likely change how references work slightly github.com/dvtate/ys-alpha/blo

In a proof of concept of operator overloading for yodascript, I made a boolean which changes it's condition every time you negate it.

(also after making this imma probably add self.__operator!! to test for truthiness)

dvtate boosted

Please #StopUsingMedium. It’s really annoying and makes me not read your content, no matter how good it is. Not specific for this author. This a general statement.

OOP in YodaScript 2!
this time objects actually have a sense of self. This example doesn't really show all the features, (especially since many operators still haven't been implemented yet).

Planned Features involving Objects:
- operator overloading - using member lambdas
- inheritance, and constructors - using references

dvtate boosted

On Zuckerberg’s “privacy” announcement yesterday, I’ve only found one article in my RSS feed this morning worth reading… 🔥


no life™️
In total I've written about 7k lines of code in past 2 weeks on various projects 👀

turns out all i had to do was use the same structures as before except replacing normal reference pointers with `std::shared_ptr` and it should be enough.

Photo: Planning out OOP for YodaScript 2.
I've run into some issues with the way I've implemented references which will hold me back in the future, so it will probably be a few days before I learn enough about safe pointers to where I can make a proper garbage collector and data access management system. But in the long run this should be good as it will prevent user-caused segfaults and should open the door for multi-threading.

variables done, even added come code to check for cyclic references :)

The important thing right now isn't the short term success gained with new features, but the long term software design and how maintainable and scaleable it is. Testing out features rn mostly just to get a feel for how different things would work with the new system. And seeing if changes should be made. So far everything seems good, I just have to try and make the right decisions now instead of later once the interpreter is 10k lines.

I'm rewriting my old scripting language. Here's after 3 days work. The framework is almost done, after that I can just start implementing more useful stuff.

Things that need to get worked out before i add new features:
- presenting Errors and EOF to user
- **should I add an integer type?** or is long double & string good enough?

Things that work as of now:
- basic operators
- numbers
- comments

Things which almost work:
- macros
- strings


Fosstodon is a Mastodon instance that is open to anyone who is interested in technology; particularly free & open source software.