Fork me on GitHub
#off-topic
<
2024-03-26
>
emccue00:03:52

Got some very interesting questions in the Java discord I hang out in. Turns out Northeastern's CS program has gotten worse. Fun! Context: When i went through CS 2510 they taught a pretty structured way of building programs. Our assignments for the first half of the course were about making a List interface with Empty and NotEmpty implementations and doing things like map, filter, fold, etc. with recursion. One of the students asking for help was asking about the usual LinkedList/`Node` style of making that which i am used to from other colleges but is a bit of a shock to realize they are at Northeastern. The course website still has ~ the same material, but they are in an online section and i guess the message didn't get across somehow even this far in to the semester.

chucklehead02:03:02

as someone who recently completed a CS degree after a ~20 year hiatus and TA'd a little bit in process, there's a decent chance the student made no effort to engage with the course material until ChatGPT failed them in some way.

emccue03:03:14

usually i'd agree its possible, but this not this one

emccue03:03:44

they showed me their attempts to reach their professor over the course of the semester + are doing well in their other courses

1
hifumi12303:03:13

Has anyone else noticed a regression in how GitHub renders Clojure code? Strings are no longer highlighted properly. (To be fair, GitHub is simply broken even on the latest versions of Firefox nowadays. And their new code editor doesn’t scroll properly on iOS since they implement their own scroller that interferes with iOS’ own scrolling logic. They also block the Home and End keys in the code viewer now, for whatever reason)

Jacob O'Bryant05:03:57

huh, yeah string highlighting is definitely broken now.

Martynas Maciulevičius09:03:31

noticed a regression in how GitHub rendersI stopped using github to look at source code after they rewrote their code view into the heavy edit-all-the-things...thing. It's so heavy that even my crazy fast 5900HX processor is struggling to keep it responsive. It's a problem when you want to think about code and not the lag that they introduced. Firefox just... struggles. With this lag github is kind-of less usable for me. For some reason they render the text twice. There is a second DOM-ified text that is hidden behind the actual text view that you can select. I think they use this DOM-ified view to show popups properly but it's... unneeded. I don't want to edit anything inside of github page. It's a complete overkill. I don't have any comments on highlighting though.

mauricio.szabo13:03:39

Yeah, GitHub went full "Microsoft product" for me - buggy, slow, bloated, and opinionated. Didn't see this regression because I'm basically not using it anymore, except for some very specific things. The file-view on PRs are also broken - clicking on a tree doesn't collapse it anymore, for example.

Stefan Langwald11:03:48

kind of serious question: I am reading more about compilers (llvm and friends) lately and I see that most compilers turn the original code into an AST/nested IR, which looks a lot like lisp in structure, why then the extra steps and create new languages every couple of $timeunit?

💯 5
Stefan Langwald11:03:03

even then, why add these "," and ";" everywhere? I have a strong python background and I always wondered why I have to declare a list as [a, b, c] when the interpreter stops the tokenization at <space> anyway

Stefan Langwald11:03:31

same is true for java

Stefan Langwald11:03:57

func(a, b, c) would work just as well as func(a b c)

Stefan Langwald11:03:43

I'm working on an app written in clojure (I'm a beginner), because of Datomic essentially, and want to give a presentation to the engineering team of my client, before I ask them the question, I wanna get some insights maybe from people here wondering the same

p-himik11:03:36

Note that you can also write func(a,b,c) or a+b+c. When one of the design decisions is "let's make whitespace completely meaningless", some other things necessarily follow. Including the need to have ; since \n is also whitespace. More properties follow that - ; lets you have multiple statements on the same line. In the end, it's a whole decision tree where some branches were chosen by you and some were necessarily followed because of some previous choices. Some people like birches, some prefer pines.

🙃 2
thomas12:03:09

I love it that Clojure treats , as whitespace. just my 2c.

1
Ludger Solbach14:03:09

I really love the regularity of clojure. If I look at Kotlin or Scala code, I get syntax cancer.

❤️ 2
😆 1
Nathan Smith15:03:46

@U06PH51L4D9 the WebAssembly text representation uses s-expressions. Does that look anything like what you're describing? https://developer.mozilla.org/en-US/docs/WebAssembly/Understanding_the_text_format

😮 3
Stefan Langwald15:03:42

thanks for finding that

jpmonettas20:03:34

> I am reading more about compilers (llvm and friends) lately and I see that most compilers turn the original code into an AST/nested IR, which looks a lot like lisp in structure, why then the extra steps I think the hard part here are optimizations. Cliff Click (compilers god and one of the original designers of the hotspot JITs) is a strong proponent of a "Sea of nodes" for the IR (a big graph), which has some good properties for writing optimizations (rewiring the graph). Here is an in-progress book/tutorial https://github.com/SeaOfNodes/Simple about this techniques written by him and his team. And here is a youtube talk he gave about this https://www.youtube.com/watch?v=98lt45Aj8mo if you are interested. The Clojure compiler doesn't need this kind of stuff since it doesn't do almost any optimizations, it relies on JITs optimizations down the road.

Vincent22:03:33

was this not due to physical hardware constraints? directly address a register because (map ..) was not the most lean op

p-himik22:03:01

That point is not about syntax though, but about implementation. (mov edx (+ esi (* 4 ebx))) also fits the OP's description just fine. And all the "why"s have a deep history. IIRC, the main reason why Lisp machines didn't take over x86 is basically an economic happenstance and not some hard truth.

Pixel_Outlaw18:04:39

Mostly because the AI bubble burst and funding for Lisp stopped. We essentially went back to worse is better and everyone ran DOS. That said Star Sapphire Common Lisp and Golden Common Lisp were available as well as XLisp. I think MIT's Lisp Machines had dedicated Lisp hardware chips while InterLisp machines were written on a C bedrock. Can't speak for the Texas Instruments Lisp machines.

Kimo19:03:31

❤️

2
🫀 3
💛 2
3
👽 2
😻 5
metal 1
♥️ 2
🧡 2
💚 3
💓 4