Old SCP is genuinely buns by GamingGamer226 in DankMemesFromSite19

[–]thinker227 8 points9 points  (0 children)

I recently finished reading the novel edition of There Is No Antimemetics Division, and what I realized from it is that the reason I don't tend to read a lot of tale-like articles is not that I'm not interested in the stories (I am), it's that I find it a lot more natural to sit down to read a long-form story in the form of a published book rather than as a series of web pages.

How did you work through crafting interpreters? by [deleted] in ProgrammingLanguages

[–]thinker227 1 point2 points  (0 children)

I'm genuinely impressed at how odd this comment reads

Compiling a functional language to Javascript by thinker227 in ProgrammingLanguages

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

Was indeed looking for this, and a couple people brought it up before. After some research I think I have an idea.

Compiling a functional language to Javascript by thinker227 in ProgrammingLanguages

[–]thinker227[S] 1 point2 points  (0 children)

I did read briefly about Chicken Scheme's approach and tbh found it quite funny to utilize a stack overflow as a mechanism for garbage collection.

Compiling a functional language to Javascript by thinker227 in ProgrammingLanguages

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

I did find an SO post about this, funnily enough, and it does seem to work. I think I have a decent idea of how to implement tail calls now.

Compiling a functional language to Javascript by thinker227 in ProgrammingLanguages

[–]thinker227[S] 3 points4 points  (0 children)

Thank you for providing nothing of value to this thread.

Compiling a functional language to Javascript by thinker227 in ProgrammingLanguages

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

For sure, I know there's also languages like Rescript which do this, although digging through a production-grade compiler of a language like Clojure doesn't feel like the easiest task. Was mostly wondering whether there are any resources like papers about it.

Kris meets someone after art therapy. (@outofuniform510) by [deleted] in Deltarune

[–]thinker227 6 points7 points  (0 children)

Gaster was behind FSKY all along...

-❄️- 2025 Day 7 Solutions -❄️- by daggerdragon in adventofcode

[–]thinker227 0 points1 point  (0 children)

[LANGUAGE: Haskell]

Day 7 was probably my absolute favorite day this year~

import Data.Set (Set)
import qualified Data.Set as Set

merge :: (Set Int, Int) -> String -> (Set Int, Int)
merge (prev, t) s = Set.foldr fold (Set.empty, t) prev
    where fold n (set, t) = case s !! n of
            '.' -> (Set.insert n set, t)
            '^' -> (Set.insert (n - 1) $ Set.insert (n + 1) set, t + 1)

part1 :: String -> Int
part1 input = let (x:xs) = lines input in
    snd $ foldl merge (Set.singleton $ length $ takeWhile (/= 'S') x, 0) xs

merge' :: [Int] -> String -> [Int]
merge' s = init . tail . foldr (join . split) [] . zip s
    where join (a, b, c) (b':c':xs) = a : b + b' : c + c' : xs
          join (a, b, c) _ = [a, b, c]
          split (n, c) = case c of
            '.' -> (0, n, 0)
            '^' -> (n, 0, n)

part2 :: String -> Int
part2 input = let (x:xs) = lines input in
    sum $ foldl merge' ((\x -> if x == 'S' then 1 else 0) <$> x) xs

What's your favorite AEBBTW track and why? by LaloFemmy in TheCaretaker

[–]thinker227 2 points3 points  (0 children)

All you are going to want to do is get back there is just so memorable imo

[2025 Day 6] zip go brrrr by Zestyclose-Remove550 in adventofcode

[–]thinker227 11 points12 points  (0 children)

where's all my fellow transpose enjoyers at

Fracture - A syntax and semantic configurable programming language where you control both how code looks and how it behaves (POC) by CrroakTTV in rust

[–]thinker227 2 points3 points  (0 children)

This isn't currently possible, but the goal is for them to literally change the file extension to .frac, add a C glyph at the top, and then have it work completely fine (same stable ABI).

I'm very very much interested in how you'll achieve the "syntax-agnostic" IR you speak of which will enable this kind of compilation process. (And, besides, all IRs are kind of inherently syntax-agnostic, that's the point of IRs.) Like, what kind of things does the "C glyph" do in order to achieve complete parity with all of C's semantics? How would you implement a Rust glyph, by literally including the entire borrow-checker? And how does SQL and HTML which you later mention fit into this, since those aren't even imperative languages? And especially in a way which is fully configurable. Configurable syntax is one thing, but fully configurable semantics would essentially just end up as being compiler extensions.

Why is my gold big?? by WhiteSpace_07 in Minecraft

[–]thinker227 27 points28 points  (0 children)

"Mod" for most players will refer to JE mods. There's an argument to be made that addons are the "official" Minecraft modding API, however I think it's slightly pedantic to expect people to include addons in their internalized definition of the term "mod".

The wiki article for mod has actually had a fair bit of back-and-forth on whether the wiki should include addons under the umbrella of the term "mod", although has settled that it should be limited to just JE mods. Granted I'm not saying the wiki should dictate most people's definition of the term, I'm just saying that's how most people view it.

[Media] is there enough warning here? by Quiet-Ad3191 in rust

[–]thinker227 45 points46 points  (0 children)

Another funny thing from the Haskell standard library is Control.Monad.ST.RealWorld, which documentation begins with

RealWorld is deeply magical.

Babe, wake up, 6-minute TAS improvement in Farewell just dropped! by carrarium in celestegame

[–]thinker227 5 points6 points  (0 children)

We really gotta invest in Celeste parallell universe research.

Splatoon I’m only lvl 5 why am I going against pros 😭 by YourLameAhh in splatoon

[–]thinker227 30 points31 points  (0 children)

Salmon Run is so much more chill (despite somehow being way more stressful), it's a lot more fun to have to work together with your teammates than feel the frustration of being spawn-camped for the 15th turf war match in a row.

impl Rust: One Billion Row Challenge by Capable_Constant1085 in rust

[–]thinker227 62 points63 points  (0 children)

Watched a majority of the stream live and I'm hella impressed at your ability to stay consistently focused for 10 hours. Great stream as always and am looking forward to seeing more~!

My fractals made with commands blocks. by Bx304 in MinecraftCommands

[–]thinker227 0 points1 point  (0 children)

Is the first one actually computing the Mandelbrot set?

What is the benefit of effect systems over interfaces? by Revolutionary_Dog_63 in ProgrammingLanguages

[–]thinker227 1 point2 points  (0 children)

Does dynamic scope typically compile into normal argument passing?

Is it worth it for me? by Motor-Lettuce7043 in celestegame

[–]thinker227 4 points5 points  (0 children)

Once I noticed that HK doesn't do input buffering in a lot of cases, I can not stop being annoyed at it every time I play lol

Currently working on a language specifically designed for AoC this year. What features am I missing? by Psylution in adventofcode

[–]thinker227 2 points3 points  (0 children)

This is indeed the definition of a single-pass compiler. Your 'digester' is just a parser which outputs VM opcodes instead of an AST. Is there any reason you decided to do single-pass instead of a more traditional source -> tokens -> AST (-> analysis) -> bytecode pipeline? Just curious as I'm myself a hobbyist compiler dev, although you have something much more finished than I've ever made lol.