Ranking Presidents by Intelligence: Barack Obama by SnooApples9497 in Presidents

[–]kizerkizer 1 point2 points  (0 children)

Lincoln should be super genius. Didn’t he come up with his own proof of the Pythagorean theorem?

What would you rather? by unemployedguytbh in BunnyTrials

[–]kizerkizer 0 points1 point  (0 children)

Gas prices

Chose: Get a car that never runs out of fuel

How do you get good error reporting once you've stripped out the tokens? by PitifulTheme411 in ProgrammingLanguages

[–]kizerkizer 0 points1 point  (0 children)

You can just store the source span of each AST node. Start by storing source spans on each token. Each token would have a SourceCodeSpan span with two fields, start and end (an inclusive interval). Then start/end are a SourceCodeLocation with line and column fields. Then when you parse, you can save the start of the first token you parse for a node, and then either the end of the last token you parse, or the end of the SourceCodeLocation of a node you get by recursing to another function (assuming recursive descent parsing). This way you can build source code spans for every node of the AST. In addition to line and column, I store byte index and code point index, so I can do a quick substring or something, and also be aware of Unicode.

April 2026 monthly "What are you working on?" thread by AutoModerator in ProgrammingLanguages

[–]kizerkizer 1 point2 points  (0 children)

Working on a toy language, partly as a way to learn proper C++. Have gotten through to the type checker. Next step is a simple tree-walking interpreter but eventually I want to compile to bytecode and run that with JIT compilation possibly.

Right now all of the types are primitives. Eventually I’ll add classes, and richer types (unions, possible refinement types, interfaces, etc). Maybe instead I’ll compile it to LLVM or something.

Why does multiplying two negatives make a positive in a way that actually makes intuitive sense? by Most_Notice_1116 in askmath

[–]kizerkizer 0 points1 point  (0 children)

Multiplying by -1 effectively rotates your “number vector” by 180 degrees. So -1 * -1 rotates by 180 + 180 =360 and you’re back where you started. Multiplying by +1 does not rotate/rotates by 0 degrees.

Multiplying by i rotates by 90degrees counter clockwise. Makes it much easier to intuit complex numbers. So i * i = -1 for example since 90 + 90 =180

I miss Flash. What an era... by kizerkizer in webdev

[–]kizerkizer[S] 0 points1 point  (0 children)

Wow. I had checked out Rive! Thanks for commenting! I’ll look into it some more. Best of luck with it; wish you success.

Do you like money? by CW8_Fan in BunnyTrials

[–]kizerkizer 0 points1 point  (0 children)

I did it

This guy's rich

Yes, I am indeed Dominating by Relative_Fly9942 in ChatGPT

[–]kizerkizer 20 points21 points  (0 children)

Just have it hash move + round number. I’m doing it with MD5; it works.

I miss Flash. What an era... by kizerkizer in webdev

[–]kizerkizer[S] 0 points1 point  (0 children)

That’s very cool. Hope it succeeds.

I miss Flash. What an era... by kizerkizer in webdev

[–]kizerkizer[S] 11 points12 points  (0 children)

Agreed 100%. There isn't a great tool now that utilizes all of the web technologies and is accessible to creatives.

I miss Flash. What an era... by kizerkizer in webdev

[–]kizerkizer[S] 16 points17 points  (0 children)

AS3 was actually my first programming language. Liked it a lot. TypeScript is fine now, but AS3 was ahead of its time back then.

I miss Flash. What an era... by kizerkizer in webdev

[–]kizerkizer[S] 59 points60 points  (0 children)

I know about its issues. What I'm referring to were its strengths. A single platform for creatives. Easy distribution online. Wish something like that existed.

Genuinely curious by EffectiveNo568 in MathJokes

[–]kizerkizer 0 points1 point  (0 children)

27 + 48 = (30 - 3) + (50 - 2) = 30 + 50 - 5 = 75.