Fork me on GitHub
#off-topic
<
2022-07-28
>
emccue04:07:12

As usual - huge dopamine hits watching netlify analytics

paulocuneo13:07:39

nice blog, there's also setjmp, which is like a goto on steroid, allows you to reset the stack to a previous position. It think there was a try catch macro implemented with it. (Also allows to leak a lot of memory)

emccue18:07:48

People on reddit pointed that out - I hacked a try/catch macro in the comments with it

teodorlu20:07:13

Man, I really enjoy the dry tone, then "this is actually what OpenBLAS does" or "and here's some real firmware that just crashes" 😂

teodorlu20:07:30

I would really appreciate it if you provided source code links with line numbers! Example: https://github.com/torvalds/linux/blob/master/tools/testing/selftests/net/ipsec.c#L131-L151

emccue20:07:20

I can make that update. You can tell at a certain point I stopped looking for real world examples

😄 1
teodorlu20:07:00

I'm at "7. Return a boolean and take two out params" now. Really enjoying the reading. Thanks for writing it up! 😄

Dumch19:07:11

Don't know if this channel is the right one to ask. But do you know of any blogpost or talk about the size of clojure libraries (I expect them to be smaller)? Can't google anything in English (but managed to find one in my native language). I am writing an article and would like to have a reference instead of proving it myself

phronmophobic19:07:56

Which clojure libraries are you looking at that are bigger than expected?

phronmophobic19:07:29

If libraries are large, it's typically non-clojure code that is the bulk of the size.

Dumch19:07:35

No, I have a point in my article that Clojure libraries are typically smaller than libraries on any other language. But instead of proving it myself I want to reference on something.

phronmophobic19:07:06

I'm not aware of any specific analysis, but it probably wouldn't be too much work to come up with some numbers. Some resources that might be helpful: • Clojars is the main host for clojure libraries and has some endpoints, https://github.com/clojars/clojars-web/wiki/Data • You can find a list of clojure github projects from https://github.com/phronmophobic/dewey (my project). • I wrote a small utility for analyzing the size of clojure libraries called https://github.com/phronmophobic/snowball. It's a pretty straightforward usage of https://github.com/clojure/tools.deps.alpha.

Dumch19:07:50

Thank you for that reply. But I only have a FAQ at the end of my blogpost about this subject, and It seems to be like a whole article by itself. For example, there is a parser library in java — Antlr. And in Clojure — Instaparse. They are incomparable because of several things like performance and APIs in different languages Antlr has. I am not sure if raw numbers like average lines of code per library really matters, as lots of libraries are just wrappers above Java. If there is a talk that has this subject mentioned at least I would have a reference to it. And I get this idea in the first place because there is such a talk in Russian that I referenced in my Russian blogpost copy.

delaguardo20:07:52

compare interfaces instead of clocs. there are 15 public top level functions and records in instaparse.core namespace and for something simple you actually need just one. then compare with antlr java doc https://www.antlr.org/api/Java/org/antlr/v4/runtime/package-summary.html

Chase00:07:23

I can't recall anything for libraries specifically but there have been a couple of code comparisons of the same project like the RealWorld web app that shows Clojure(script) needing much less code: https://medium.com/dailyjs/a-realworld-comparison-of-front-end-frameworks-2020-4e50655fe4c1 and this article describes a rewrite of an app going from 3000 lines of Objective C to 1500 lines of JS/React to 500 lines of cljs: https://itrevolution.com/love-letter-to-clojure-part-1/

👍 1
gklijs12:07:10

Some Js libraries are really small as well. Most Java libraries are quite big through. Not sure how to make a fair comparison.

1
mauricio.szabo19:07:21

Yeah, lots of JS libraries are really small and are used everywhere, which is actually a horrible thing...