What is considered #pldev and what isn't?
I see a lot of languages on GitHub, some with theory backing them up, others just being classic imperative (toy?) languages (I mostly target every language I have made here)
Is it really pldev if I just parse a lisp/python/c like lang, without monads, row polymorphism, deep thoughts on inheritance, well crafted pi-calculus inspired parallelism?
@gilesgoat that's understandable, tho I'm on the other side: you are right that we don't *need* more languages as users, but from a research point of view, this is very interesting to uncover new ways to implement things
Also, I'm speaking for myself here but I'm sure other #pldev will feel the same, I do not develop a language for it to replace everything already existing ; it started as a fun experiment and I'm learning a ton (I also hope no one except me will use it)
I saw a Reddit post asking if it was possible to generate revenue by making your own programming language
If you want to know, in the 4+ years I've been working on #ArkScript I might have earned about 400€ at most
#opensource is not profitable and #pldev is even less profitable, having a job on the side is a better idea than trying to rely on grants and donations
I have a #pldev problem: how do I represent an if macro in #ArkScript, since the syntax changed from
!{foo 5} !{bar (a b) (+ a b)} !{if (= 5 foo) then else}
to
(macro foo 5) (macro bar (a b) (+ a b))
We have
- (macro if (= 5 foo) then else), it looks like we are creating a macro "if"
- (when (= 5 foo) then else), is that clear enough?
- (macro:if ...) a bit long
- (if ...), generic if: how do you know if that's runtime or compile time?
so with my toy language i was going to assign each node in a subexpression to an intermediate value so like `i = (a + 1) * 8` becomes
```
tmp = a + 1
i = tmp * 8
```
but now im realizing that this is an utter pain in the ass for `foo.bar` style member lookups and i am upsetti 😠
#ArkScript v3.5.0 is now available
The release is mainly focused on bug fixes and enhancements for us maintainers to catch bug quicker
https://github.com/ArkScript-lang/Ark/releases/tag/v3.5.0
#opensource #pldev
we're doing arrays now, fam! #PLDev
(and yes im aware the array is uninitialized and this C code would blow up, it's a work in progress >_>)
and now my little toy language poops out C code! \o/ black background is C output, white background is my language's syntax
#PLDev
and now my toy language also supports by reference arguments and instance methods with syntax borrowed from lua because why the hell not #PLDev
The new parser for #ArkScript is nearly done! It would appear to be at most 2 times slower than the previous one and I'm fine with that (being able to parse 20k deeply nested nodes/second is plenty)
Those metrics are interesting, because you can see that in term of lines parsed/second, the new parser is just 20% slower than the old one ; this was something to expect, as I switched from a basic look ahead parser to parser combinators.
#pldev
Hi fediverse, I'm finally doing my much overdue #introduction post!
I'm a #GameDev with a decade of experience, having founded Kitsune Games in March 2013. I'm currently focused on #KitsuneTails, a queer platformer in the style of beloved classics where you play a kitsune on a journey through a land inspired by Japanese mythology. In the past I've released games such as Super Bernie World, MidBoss, and more.
I'm also working on a fantasy console called the #Mega68k, which runs on the Motorola 68000 CPU. Additionally, I create a series of videos called #CodingHistory, which explores how 3D techniques from the 90s worked. I also like programming language development and make a lot of toy languages that don't go anywhere, and am trying to liven up the #PLDev hashtag on mastodon.
You can find my games at https://kitsunegames.com/games, or find more information on Kitsune Tails at https://kitsunegames.com/kitsunetails. For Coding History videos subscribe to my YouTube to see them when they come out: https://youtube.com/@EnikoFox
#introduction #gamedev #kitsunetails #mega68k #codinghistory #pldev
Since this whole thing is just C with extra steps what I think I'll do is not have explicit instance methods and instead foo.bar() searches for:
1. FooType_bar(FooType foo)
2. bar(FooType foo)
Note that because this is C with extra steps functions are all global symbols anyway and there's no overloading
Also since it's C mashed up with qbasic function pointers aren't gonna be a thing
#PLDev
I haven't decided how I wanna do struct instance methods
I'm considering overloading the period operator to do it. So if you have a function `foo(bar v)` and you have an instance of `bar b` typing `b.foo()` is syntactic sugar for `foo(b)`
This would make it easy to extend types from the outside. All methods are extension methods basically. Or put another way the period becomes like the colon in Lua. But it could get messy and lead to bugs and also I would prefer that methods can be put in a type so you don't have to name all your for-a-type methods stuff like bar_foo(bar v)
Thoughts? #PLDev
made a lot of progress on my toy language today. definitely worth it emulating/targeting C and keeping things as simple as possible #PLDev
most programming language development resources seem to be like "there's two stages, lexing and parsing" and like. it'd be helpful if they pointed out semantic analysis? but i feel like they just kinda put that under parsing
but it's much easier to parse source code into a syntax tree using a grammar just assuming all the semantics are correct, then put all of the semantic analysis into its own step?
maybe that's just me? idk. i think #PLDev has way too much emphasis on single-pass. do it in multiple passes, its way easier
Using a small trick, I was able to multiply the node average throughput by a factor between 2 for the small test, and 40 for the bigger one!
The performance gap is getting smaller and I'm here for it