Recent Posts

Pages: « 1 2 3 4 5 6 7 8 9 10 »
31
Cute Discussion / Re: IguaRPG 2 Devlog
« Last post by SquareWheel on October 06, 2023, 03:46:28 AM »
Ah I didn't know it was a common thing in functional languages.  It looks like PHP8 got it too, so it supports both switch and match.

Yeah fall throughs always seemed like one of the worst designs in program control flow.  Just asking for trouble.  I thought the continue keyword was a nice compromise, but in truth I almost never use it.
32
Cute Discussion / Re: IguaRPG 2 Devlog
« Last post by dcco on October 05, 2023, 11:16:59 PM »
secretly i was describing a match statement but wasnt sure of people's familiarity so presented it as a switch statement. yeah a match statement is actually actually what i would do (imo fall-throughs cause bugs way more than they are useful). i did a lot of programming in functional languages during grad school, and match statements are a staple of them.

i didnt know godot made use of them that's cool - especially being able to match dictionaries - i wish typescript could do that.
33
Cute Discussion / Re: IguaRPG 2 Devlog
« Last post by SquareWheel on October 05, 2023, 05:56:32 AM »
I don't really like using switches, but I do like GDScript's match feature.  It removes most of the footguns and adds some useful features.

Previously you could opt-in to falling through with the continue keyword, but I guess that was removed.
34
Cute Discussion / Re: IguaRPG 2 Devlog
« Last post by dcco on October 05, 2023, 05:27:55 AM »
The is keyword seems really nice, I wish TypeScript had it. Your syntax for indexing tuples is cool!
Yeah implementing ADT/union types in TypeScript is doable, but very bulky, when really they shouldn't be that much more complicated than an advanced enum. The ideal syntax is probably a pattern-matching syntax which would look something like:
Spoiler (click to show/hide)
But I'm trying to keep the syntax as minimalist as possible rn so idk.

Quote
- What is no on line 3?
It's just another case for the ADT, one that takes no arguments. Basically just a default, altho kinda unnecessary since it has the same meaning as frame:(0) as defined.

Quote
- Are you going to implement some kind of checker that runs in the editor? Is that thing separate from a syntax highlighter? I have no clue ^_^
I know what youre talking about, that is different from syntax highlighting, but not sure what it's called either. Rn I almost exclusively work in Sublime Text, which doesn't really do that kind of error highlighting since it's just a text editor at heart (maybe there is some plugin/package that does for some languages tho idk).

I think usually you would need to develop for a specific IDE to get error highlighting. Maybe I would think about it in the distant future, but even getting the compiler to spit out decent error messages is kind of a chore. In general I think error handling is the worst part of making a language lol.

35
Cute Discussion / Re: IguaRPG 2 Devlog
« Last post by hubol on October 04, 2023, 02:07:35 AM »
What's zipping the audio files for?  I figure it can't be adding any more compression, so just for packaging?

It's pretty deranged, but the goal is to minimize the number of simultaneous HTTP requests during boot! I believe you are capped to 7(?) simultaneous requests normally. This will also improve reload speed in development. Before, the game would attempt to load hundreds of textures and sound effects in parallel on boot, and even developing locally this started to take a few seconds.

I've avoided playing with TS mostly because I haven't needed to, but I secretly hold the idea that eventually JS will get optional typing and TS will become more of a niche utility for its extra features at that time.  In the same way that LESS and SASS have fallen away as CSS has become more powerful, we seem to move towards fewer steps and less bundling where possible.

It sure would be nice if JS got optional typing! Python did. At my new job they're using plain JS for the backend and it's nice to not deal with a bundler and source maps while debugging... but I certainly miss the types...

I actually did start working on a language for game stuff - doesn't have any of the stuff I was talking about, but it *does* have an actual type system which I'm playing around with a lot. Main features are ADTs and also a function overload system that distinguishes functions of the same name by the argument of the first type. (There will also eventually be polymorphism but I haven't needed it yet). Basically I'm messing around with various type design decisions to see what works and what doesn't.

<code sample>

(syntax highlighter scuffed bc it's hard to keep up with it while actively making the language :U)

Really, really amazing. You are so cool!!!!! The is keyword seems really nice, I wish TypeScript had it. Your syntax for indexing tuples is cool! Two things:
- What is no on line 3?
- Are you going to implement some kind of checker that runs in the editor? Is that thing separate from a syntax highlighter? I have no clue ^_^
36
Cute Discussion / Re: IguaRPG 2 Devlog
« Last post by hubol on October 02, 2023, 05:28:50 PM »
100% agree and I will effortreply to everyone’s effortposts later today!!
37
Cute Discussion / Re: IguaRPG 2 Devlog
« Last post by dcco on October 01, 2023, 10:39:15 PM »
Ducklang unironically a good name for a language lol
38
Cute Discussion / Re: IguaRPG 2 Devlog
« Last post by SquareWheel on September 30, 2023, 09:14:44 PM »
Main features are ADTs and also a function overload system that distinguishes functions of the same name by the argument of the first type.
It only makes sense that ducklang would have some form of duck typing.

I have no clue how any of this stuff works but it sounds very impressive.
39
Cute Discussion / Re: IguaRPG 2 Devlog
« Last post by dcco on September 30, 2023, 10:08:47 AM »
I want to see it!!!!!!!!!!! Do it!!!!!!
I actually did start working on a language for game stuff - doesn't have any of the stuff I was talking about, but it *does* have an actual type system which I'm playing around with a lot. Main features are ADTs and also a function overload system that distinguishes functions of the same name by the argument of the first type. (There will also eventually be polymorphism but I haven't needed it yet). Basically I'm messing around with various type design decisions to see what works and what doesn't.

(syntax highlighter scuffed bc it's hard to keep up with it while actively making the language :U)
40
Cute Discussion / Re: to do
« Last post by SquareWheel on September 30, 2023, 10:05:39 AM »
Was actually rescheduled to today, the 30th.  Might see some performance improvements afterwards, though I'm not sure we'd be able to notice it.
Pages: « 1 2 3 4 5 6 7 8 9 10 »