#squarepants — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #squarepants, aggregated by home.social.
-
Come dive into the waters of this megapost by Rhaomi that celebrates 25 years of SpongeBob SquarePants!
#animation #spongebob #squarepants #nickelodeon #bestofmetafilter
-
mkdir src/Targets/SpirVIt's happening.... _^
I'm finally starting the work to compile #Squarepants to #SpirV...
I never thought my language would get to this point! =D =D =D -
Did a small optimization in #squarepants!
The placeholder argument
z >> someFunction a __ bis normally be unpacked to
(fn g: someFunction a g b) zWhich adds an useless function definition and call.
Now instead the initial statement is automatically translated to
someFunction a z bIt is a very small thing, but it was long due, it visibly increases performance, and I feel immensely satisfied. =D
-
CW: A poll about programming language development
#Squarepants supports variant types (aka sum types, custom types and another dozen names...)
I'm trying to decide how to define them, and I have three different options:
The first one just uses commas:
var Maybe a =
, 'just a
, 'nothingThe second one does not use any separator, constructors start with an apostrophe anyway:
var Maybe a =
'just a
'nothingThe third uses "or", which could help making it clear that you need to pick only one:
var Maybe a =
or 'just a
or 'nothingSquarepants priorities are #accessibility and #minimalism , I want something that works for the broadest possible range of skills and ability.
Comments much appreciated. =) -
What #license should #Squarepants compiler and libraries have?
I understand very little about software licensing.
The language still uses a lot of code originally written in #Elm, which mostly uses the BSD-3.
Squarepants is meant to be an #accessible, #functional #ProgrammingLanguage for interactive applications.
I think I want to find the right compromise between making the world a better place and allowing independent developers to make money with it.
My big-picture priority is to give power to the powerless and erode entrenched powers.
Any suggestions from people who have spent more time than me on this would be welcome.
-
I know I posted already about this, but let me #gloat.
I started working on #Squarepants 3 years ago, when I didn't have a clue of how to write a #compiler.
When I finally managed to make the first version run (it was written in #elm ) it took seven minutes to compile.
Now it takes less than four seconds.
Fuck yeah.
This is so satisfying. _^
-
CW: Programming, parser writing
I can parser!
I finally understood, in practice how to avoid backtracking.
Optimized the #Squarepants parser again so that it processes the whole compiler code in 0.4 seconds instead then the previous 1.6s, bringing the total compile to less than 4 seconds, and leaving the type check as the only bottleneck! =D =D =D -
Starting to write the code formatter/pretty printer for Squarepants. =)
What is a code formatter?
A formatter takes the code you write and cleans it up, taking care of things such as spacing, indentation and line breaks for you.
Why is this important?
Having a consistent and uniform style helps readability a lot.
On top of that, you don't have to think about the layout when you write code: you can write as quickly and badly as you can, and let the formatter clean up the mess for you.
-
@vegafjord This is an issue that's particularly bad with #foss. It's nerds catering to nerds.
FWIW, I'm trying to push against that with #squarepants -
CW: Squarepants dev log
Ok, I'm officially dropping structural sum types, they are getting a lot more complicated then I expected and I don't need them enough to justify that kind of complexity.
I'll stick with nominal sum types for the time being.What's the difference you ask?
Take the two sum types:type A = Meh | Blah
type B = Meh | BlahWith structural typing what matters is, well, the structure, which means that A and B are exactly the same type.
With nominal typing what matters is the name, which means that even if A and B have exactly the same structure, they are incompatible with each other.
Structural types are powerful and can be used for many sorts of elegant fuckery, but they are not necessary for what Squarepants needs AND they might be a bit harder to explain.
In other news, the compiler can compile itself in less than 5 seconds, which means it is rapidly approaching a viable speed. =D
-
IT WORKS!
I finished rewriting my #accessible #language #squarepants to its new syntax supporting #uniquenessTyping, it means that people can use a pure #functional language without having to learn #monads or complicated concepts.
There is still a lot of work to do and plenty of bugs to iron out and UX to improve but feels good! =D
-
Code quality has been downgraded to "It works and I don't know why".