Insert <it’s not much but it’s honest work> meme. It only supports ints and bools, some logic and simple arithmetics and it compiles to Java but damn was it hard to get that far.
Can you guess what everything does?
It’s really cool, but the example doesn’t produce any sensible output? If you have created something like this, why wouldn’t you have your demo output something sensible like Fibonacci or 1337 or whatever.
Great idea if I have to extend it
I’m opening an issue on your ticket tracker to add filesystem i/o. Let the nightmare commence
No cap is cracking me up. This is great stuff
Is flex X on the haters a way of logging to console?
Yes, it pretty much just wraps the expression in a “System.out.println(<expression>);”
Maybe “flex X” outputs to stdout and “flex X on the haters” outputs to stderr?
I like the way you think! 😂
flex X on the fools
does verbose logs only.I’m curious to know how your language throws and catches errors :)
removed by mod
Reading this comment and then looking up and seeing that your username ends with PDP11 was *chef’s kiss*
I choose option C, eclipse xtext
We think alike friend
Don’t lose your passion, doing things the shit old way can also make you a better programmer in the newer paradigms
Although, I recommend you at least learn C++23
don’t worry , it can always get worse . source : I implemented a esoteric programming language of my own making with just a parser (no lexer !) and a tree walking interpreter while reimplementing a standard library and depending on undefined behavior in python . honestly I fear that code more each time I look at it
class Scratch { // Start of file public static void main(args: string[]) { int number1 = 2; number 1 = 10; int number2 = 13; boolean fo_sure = true; if (fo_sure) { number1 = number1 + 5 - 10 * 2 / 3; } System.out.println(number1); boolean canYouSeeMee = false; System.out.println(canYouSeeMe); if (false) { canYouSeeMe = false; } else { canYouSeeMe = true; } System.out.println(canYouSeeMe); } }
What’d I win?
I find it interesting and unnerving that I understood the code, but not the youthspeak.
Isn’t the second if condition
false
?Thanks, I corrected it.
canYouSeeMe = !canYouSeeMe;
There are even more optimization possibilities, but I wanted to stay as close to the original as possible.
Yeah, it can be optimized down to a single constant print statement.
Well done, here’s your price: 🏅
You may redeem it for a star on a GitHub repo of your choice.
It all gets put into the main method though in this version 😄
Is this LOLCODE 2.0?
Impressive, no cap!
“based”
Looks like you’ve got a bug in there.
if false no cap canYouSeeMe = false if cap canYouSeeMe = true sheesh
Won’t this always go into the else/cap condition since the if condition is checking to see that false == true?
You’re correct, but it doesn’t really matter for demo purposes. In an actual use case (whatever that would be for this language) you would of course want to use some kind of variable or expression there instead of a constant.
It’s so beautiful!
Now I’m thinking about how to alias “flex X on the haters” into other development environments…
Jetbrains MPS?
It’s a tool for designing domain specific languages. Really interesting!
Vibe check is your scope declaration (class?)
num is obviously your int class
fr? is your Boolean class
if __ no cap is ’ if __ then’, if cap is ‘else’, sheesh ends the conditional
flex __ on the haters is your echo/print
frfr is your scope ending
Correct!
Vibe check is pretty much the scope. Classes aren’t a thing (yet).
It only supports ints and bools, some logic and simple arithmetics
That’s more than you need.
Are you fo sho?
Yep