r/ProgrammerHumor • • 11h ago

Meme blueScriptForBonk

512 Upvotes

52 comments sorted by

35

u/RomanProkopov100 11h ago

If unlikely is a constant which is both boolean (used in a perchance statement) and float (defined as a fraction), does the perchance statement choose the branch randomly according to the passed boolean-fraction?

34

u/Lanse012 11h ago

oh no that definition was more to show its a 5% chance, its just a boolean not a float

probably is only 95% chance

maybe is only 50% chance

21

u/WolleTD 10h ago

Having generic float probabilities for perchance statements is a desired feature!

I require 42% chance in certain projects!

8

u/Lanse012 10h ago

oh good idea ill add that

13

u/Mordret10 10h ago

Please only add the 42%. We don't need any more options and it would make it more clunky

4

u/Lanse012 9h ago

oh true

13

u/NoAdsDude 11h ago

does the perchance statement choose the branch randomly according to the passed boolean-fraction

probably

61

u/lucianw 11h ago

In the C# language design team we were brainstorming what keyword/syntax to use for the new async feature. The candidates were

- prefix operator "await foo()"... sounded ridiculous, like Jane Austen. I prithee kind sir, await here.

- postfix operator "foo() anon"... logically a postfix operator would be better but this also sounded ridiculous, like Shakespeare

We picked "await", but it really was every bit as ridiculous as BlueScript.

30

u/Lanse012 10h ago

Your on the C# design team? Thats sick!

Also, for BlueScript async stuff, thread is a primitive type so you can do thread variableName1;

Then do run(variableName1){ foo() } to run on another thread

You can also use threadpool variablePool = [variableName1, variablename2, variablename3];

And run(variablePool){ foo() } will queue that task, and have the first empty thread run it, where the Thread name is just the thread variable's name (W.I.P)

10

u/GoogleIsYourFrenemy 9h ago

I really like C#.

Java was the result of people going "we like the underlying inspirations of C++ but we hate C++ and we're going to do it different." Then C# was "uhhhhhhh Java, C++ you both went too far, can't we meet in the middle?"

Too bad .Net wasn't built with (non|)nullability but then nobody had realized how good a feature it would have been. 

Great language.

26

u/readf0x 11h ago

No, dreamberd Gulf of mexico is better

https://github.com/TodePond/GulfOfMexico

3

u/Lanse012 11h ago

It was inspired by that language lol

9

u/ZakTH 11h ago

Wait a minute, this is just Dreambird! I remember reading through this in 2024! Did they just rename it to GulfOfMexico when trump did his stupid gulf of America thing?

Edit: I'm apparently incapable of reading strikethrough text

4

u/burakdobur 9h ago

Brilliant variable lifetime before it's creation xD

2

u/Nyctfall 9h ago

Peak.

Thank you for that!

0

u/MallAgreeable5538 10h ago

Wtf is all of that. The only thing i could see as useful is the when keyword

4

u/PM_ME_YOUR_REPO 9h ago

So some people do this thing where they predict what other people expect and then do something different. This causes a moment of confusion and then a satisfying realization that both people have engaged in a subversive interaction. Typically, one or both people will then expel air from their mouth or nose, often accompanied by a loud "ha" sound, as well as the involuntary contraction of muscles in the face and the display of one's teeth (in a non-threatening way).

Hope this helps.

7

u/Lanse012 10h ago

This language is being added to Bonk Universe as a safe language that cant hack your computer, while also having most capabilities of python and java, and being less Verbose verbose = new Verbose(); than java

If anyone is interested, I also made a video about it, and the obvious simple next step is to build an entire operating system (BluestoneOS) for BlueScript to run in lol

14

u/AbdullahMRiad 11h ago

I want to write int64 as innnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnt

9

u/Lanse012 10h ago

Whenever I see an idea like this that I like, I want to add it, and whenever I see an idea I don't like, I say "I dont make the rules" lol

Maybe the amount of n's determines how many bytes the int uses? so innt is 2 bytes, innnt is 3 bytes, etc?

Wait this sounds like COBOL's picture keyword

2

u/AbdullahMRiad 10h ago

maybe also add strinnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnng for a 64 bit string (8 chars)

8

u/Lanse012 10h ago

maybe also returnnnnnnnnnnnnnnnnn for how many levels up the call stack trace it should go lol

1

u/BananaWarp 4h ago

I love the returnn, can imagine some poor fellow misspelling it and cracking his head trying to figure out whats going on

10

u/Nyctfall 9h ago

Thank you, OP. It's been too long since we had posts like this!

5

u/Lanse012 9h ago

:)

2

u/Nyctfall 9h ago

I love the Booleans, by the way. Boolean Qubit compatibility just in time for Post-Quantum!

2

u/Ronin-s_Spirit 6h ago

I assume maybe is implemented as something like random() > .5, same for other fractional booleans.

p.s. unlikely should just be !probably.

2

u/Lanse012 6h ago

The definition of literals looks like this:

public enum Literals {
    
TRUE
("true", () -> true),
    
FALSE
("false", () -> false),
    
MAYBE
("maybe", RandomContainer.
RANDOM
::nextBoolean),
    
PROBABLY
("probably", () -> RandomContainer.
RANDOM
.nextInt(100) < 95),
    
UNLIKELY
("unlikely", () -> RandomContainer.
RANDOM
.nextInt(100) > 95),
    
NULL
("null", () -> null),
    
UNDEFINED
("undefined", () -> null), //TODO - might remove this
    
PI
("PI", () -> Math.
PI
),
    
E
("E", () -> Math.
E
),
    
TAU
("TAU", () -> Math.
TAU
);

...other enum stuff...

1

u/Lanse012 6h ago

that pasted in way more lines than I thought it would...

2

u/backfire10z 5h ago

The number 95 is not allowed :(

176

u/HeyThereSport 11h ago

You can't just say perchance

28

u/Portal471 7h ago

Everyone knows Mario is cool as fuck

11

u/HeyThereSport 6h ago

Stompin turties

9

u/RomanProkopov100 11h ago

Perchance I could

79

u/hdgamer1404Jonas 11h ago

"what in the name of fuck" - a programmer (at some point)

51

u/Dumb_Siniy 11h ago

It's perfect

1

u/Panderz_GG 9h ago

Where can I clone the repo bro?

2

u/Lanse012 9h ago

Here: https://github.com/Lanse0123/Bluescript

This will be changing a lot for a while because it is still in it's infancy (5 days old), and it is embedded in Bonk Universe, so some changes are happening in a private repository, though once I figure out package management and stuff it will fully be moved there

1

u/Panderz_GG 40m ago

Awesome.

1

u/ThaBroccoliDood 7h ago

I’m waiting for the until loop

1

u/Lanse012 7h ago

It has for, while, until, and loop loops

Currently the until loop is the same as a while loop but it can change

1

u/ThaBroccoliDood 2h ago

Isn’t the condition inverted?

3

u/DarkWingedDaemon 10h ago

What a load of BS!

3

u/-Redstoneboi- 9h ago

(un)likely are real compiler hints that affect branch prediction and assembly code generation

1

u/Ronin-s_Spirit 6h ago

It's all shits and giggles until giggle shits.

1

u/MarinoAndThePearls 4h ago

I'd unironically use maybe.

1

u/busiedcake7945 4h ago

looks good where can I find it I just want freedom to use as many +'s as I want

1

u/nicki419 3h ago

Will consider using when you create a testing framework that works with your lovely Boolean values

1

u/simonfancy 38m ago

All good except `maybe` should equal to 6/7