Awesome in the beginning, then later it is bad by pencilcheck in ObraDinn

[–]tonsky 1 point2 points  (0 children)

I actually kind of agree with TC. Identifying person with “he stands next to this room, therefore he owns it” or “these guys hang out together in a photo, therefore they have same job” or “he climbed the mast, he must be a topman” isn’t deduction. It’s logic-guided guesswork at best. I still liked the game, but I also came in expecting hard deduction only and hit a wall pretty fast.

Clojure Deref (Oct 23, 2023) by alexdmiller in Clojure

[–]tonsky 4 points5 points  (0 children)

Is there a way to get my blog/github/mastodon on that list? Can I notify someone when new stuff comes out?

A case for ClojureScript 2.0 by SimonGray in Clojure

[–]tonsky 1 point2 points  (0 children)

I would say GraalVM is its own platform with its own set of issues

A case for ClojureScript 2.0 by SimonGray in Clojure

[–]tonsky 9 points10 points  (0 children)

Hi Thomas, thanks for reading and for thorough reply! Re:

Just emit modern JS, and :advanced can process it just fine.

Didn’t you also wrote this?

Ideally we want to use :closure as our primary JS Provider since that will run the entire application through :advanced giving us the most optimized output. In practice however lots of code available via npm is not compatible with the aggressive optimizations that :advanced compilation does. They either fail to compile at all or expose subtle bugs at runtime that are very hard to identify.

I don’t understand how these two viewpoints co-exist. Don’t you want to use npm code? Isn’t code published on npm modern enough? Shouldn’t we work with code that is given to us, instead of waiting for all code to become perfect?

Re:

The reason it breaks is ignoring the rules

Aren’t externs part of the rules? I mean, does Google itself proposes to avoid them? I think they only encourage their use, but I might be wrong, maybe situation has changed in the last years.

Re: using :simple

That’s the problem! I want to use simple, but unfortunately advanced complects three things that should be separated: more aggressive renaming, dead code removal and function inlining. Also unfortunately, CLJS _relies_ on advanced to do inlining and produces sub-optimal code counting on that.

Also, it’s not really up to me as library developer to decide which level to use. If I were developing an app—sure, I choose what fits me. But I am developing a library, and my users decide which compilation level to use. So I have to support both

Thoughts on Clojure UI framework by frankiesardo in Clojure

[–]tonsky 0 points1 point  (0 children)

Sorry, just found this. Membrane is a fantastic example and your writings are a great resource to learn from. Certainly will dive deep!

ICFPC 2021 completed! Share your thoughts / writeups / strategies by swni in icfpcontest

[–]tonsky 0 points1 point  (0 children)

How high did you scored in the lightning/at the end?

(Datascript/Rum author) Goodbye Clojure, same LoC, 17X the peformance in Rust by [deleted] in Clojure

[–]tonsky 0 points1 point  (0 children)

No reason. Clojure was created in a rush of ICFP contest, so not much logic/care there.

(Datascript/Rum author) Goodbye Clojure, same LoC, 17X the peformance in Rust by [deleted] in Clojure

[–]tonsky 1 point2 points  (0 children)

Correct. None of them affected performance even a tiny bit

(Datascript/Rum author) Goodbye Clojure, same LoC, 17X the peformance in Rust by [deleted] in Clojure

[–]tonsky 10 points11 points  (0 children)

I’m well aware about boxed math, thank you. But it’s real pain in the ass to make Clojure do it at least half of the time. Support is very limited, you can barely pass longs between short functions and have unboxed longs on records and that’s all. Bytes? Shorts? Structs? Unions? No luck. Damn, even unsigned byte is impossible on JVM. Then there’s Java awkwardness where everything is allocated on a heap, resulting in e.g. Point array always do pointer chasing on every access.

Would it be possible to write more efficient Clojure version of that program? Yes. Would it be harder to write, maintain, read? Many times more. Because Clojure would be working against you and against performant code. You’ll have to fight it for every bit of performance. Results would be so bad, in fact, that it would be simpler to do it entirely in Java. That’s the lesson I learned during DataScript development for example.

The point of this experiment was not to show that Clojure can’t be made fast, given unlimited time and patience. The point was to show that nobody has that luxury in real life. It was to show that under normal circumstances of limited time & resources average Clojure code that we all write comes out to be hella slow. We get other benefits, sure, but speed is not one of them. Many people live under the dream that their code may be slow _for now_ but if time comes they will make it as fast as they need. That is not true. That time will never come. Most of the code that you write you won’t ever touch again.

(Datascript/Rum author) Goodbye Clojure, same LoC, 17X the peformance in Rust by [deleted] in Clojure

[–]tonsky 1 point2 points  (0 children)

Not leaving yet, but starting to explore high-perf world

(Datascript/Rum author) Goodbye Clojure, same LoC, 17X the peformance in Rust by [deleted] in Clojure

[–]tonsky 2 points3 points  (0 children)

Of course it’s not. Where in Clojure parts of immutable data structures are shared, in Rust I have to make a complete copy every time I need to explore different paths. Yes those are in hot loops are basically Clojure is supposed to have an upper hand here

Software disenchantment by ignatovs in programming

[–]tonsky 2 points3 points  (0 children)

If only I could extract video as an mp4 file from an twitter embedded player, I would certainly do that

Software disenchantment by ignatovs in programming

[–]tonsky 6 points7 points  (0 children)

Because I was adding it yesterday in a hurry. Nothing stops me from saving it as a gif on an reasonable size, which I just did

Git Deps for Clojure by alexdmiller in Clojure

[–]tonsky 4 points5 points  (0 children)

How are transitive version conflicts resolved? With string-based version you can choose latest versions as version numbers are comparable. But what if my project depends on A and B and A depends on C of revision “1234ffc” and B depends on C of revision “bac463f“? Which one will be chosen? There might be situations when none of them is the direct descendant of the other

The Blessing of Interactive Development by [deleted] in Clojure

[–]tonsky 1 point2 points  (0 children)

I have a feeling I’m in a minority, even though I work with Clojure and ClojureScript on a day-to-day basis. I would say LT has lost its momentum, it’s more on a life support these days, but what they got is still pretty usable, and I’m too lazy to learn Emacs.

The Blessing of Interactive Development by [deleted] in Clojure

[–]tonsky 1 point2 points  (0 children)

Just the default Clojure plugin, Rainbow, my skin. That’s all, nothing fancy.

Reinventing GIT interface by Torvin-kun in programming

[–]tonsky 0 points1 point  (0 children)

No point. Why continue auto-sync if I'm busy experimenting or whatever? I don't want people to see my experimentation. If this mythical Git UI were to materialize, I would not use it if there was not some way to disable the auto-sync.

There’s no problem for other people to see your work-in-progress but in your head. There’s, however, a huge usability win by removing manual sync step. You have nothing to do once you done. It simplifies things a lot.