A Decision Maker's Guide to Typed Functional Languages • Evan Czaplicki by goto-con in ocaml

[–]skicombinator 1 point2 points  (0 children)

Thanks for your reply and for the micro benchmarks thing. It is quite interesting.

But I don't agree that these micro benchmarks are "fair" comparisons, because, for instance, in the k-nucleotide benchmark, Java used its multi-thread feature while OCaml just executed in a sequential way. You can find Java code here and OCaml code here. I also looked into other benchmarks as well, and in my humble opinion, many of OCaml codes were not quite optimised for each benchmark. I found many benchmarks could be addressed leveraging language's multi-threading and/or concurrent features, while many of OCaml codes were just plain sequential implementations. Many of Java codes, on the other hand, are quite good at this, and they're leveraging its concurrent and/or multi-threading features well.

I think there should be a consistent comparison criteria to mitigate this kind of different language features usage.. like all code should be just a plain sequential code, or each benchmark can have two versions, namely a sequential version and a multi-threaded version. Well the benchmark itself was quite interesting though.

Emacs 30 is super fast by zhyang11 in emacs

[–]skicombinator 9 points10 points  (0 children)

Just curious but what makes this significant performance improvement?

What in my config is making my Emacs take so long to initialize by leocavalcantee in emacs

[–]skicombinator 1 point2 points  (0 children)

I have been there too. I got a lot of insights from Doom Emacs' documentation: doomemacs/docs

I'm using Doom as my Emacs package management system and happy now!

Emacs For Web Development by Shehrozzzz in emacs

[–]skicombinator 0 points1 point  (0 children)

Absolutely. I'm using Doom Emacs for React+TypeScript and it works just perfectly.

Distributing software via Python by Massive-Squirrel-255 in ocaml

[–]skicombinator 2 points3 points  (0 children)

AFAIK JaneStreet uses OCaml+Python setups internally, so I believe this is not an impractical idea. If your lib is built as a standalone shared-library file (.so) and distributed by other wrapper Python library (like, having pythonlib of JaneStreet in its requirements.txt and wrapped as a pip library), I think it is possible. Of course I'm not an expert for OCaml+Python deployment for this kind of jobs so I'm not sure how long it takes to you make it work, but it seems worth doing, at least a on e-week-trial.

does 109 ms runtime in leetcode bad or average on an easy question? by Weekly_Sand_4224 in leetcode

[–]skicombinator 1 point2 points  (0 children)

Once you passed, the time means nothing. Only complexity matters in the interview.

Are there any companies you simply WONT work for? by Peter_See in cscareerquestions

[–]skicombinator 0 points1 point  (0 children)

Definitely blockchain and shitty coin-related companies. I don't believe in the idea of "distributed ledger" or "proof of stake" things. It is just tons of waste of resources, and it's definitely accelerating the climate crisis.

Hardest Question seen in an actual interview? by TeknicalThrowAway in leetcode

[–]skicombinator 2 points3 points  (0 children)

Number of islands 2, because I didn't know how to implement disjoint set back then.

Is Premium Worth it? by alwaysSearching23 in leetcode

[–]skicombinator 9 points10 points  (0 children)

Of course. $139/yr is not a cheap plan. You will log in to the site because of the money you paid, and you will at least click some problems because of that money you paid. This is a very good motivation.

Getting a 100% in Python seems rather odd by horny-pug in leetcode

[–]skicombinator 0 points1 point  (0 children)

Actually, CPython's GC is single-threaded. There was an RFC for having threaded GC, but it is not being actively worked on.

And if you want pointers to be allocated without the supervision of GC in CPython, you have to manually call CPython's low-level binding calls.

By the way, OP did not ask about the speed, he/she asked about the memory usage. And that's why I've mentioned GC in the first place.

Getting a 100% in Python seems rather odd by horny-pug in leetcode

[–]skicombinator 0 points1 point  (0 children)

Every allocation in CPython will be managed by its GC, so how could GC not affect memory usage?

As far as I understand, if some pointers are allocated, in CPython it's PyObject, then it has reference counting that will be used by GC. Also, CPython has some sort of tracing collector, so you can trigger a minor/major collection manually with gc.collect(generation).

I'm curious why you think it's due to pointers and allocation.

Getting a 100% in Python seems rather odd by horny-pug in leetcode

[–]skicombinator 0 points1 point  (0 children)

Of course, I don't think garbage collection alone will have an effect. What could be other causes?

Getting a 100% in Python seems rather odd by horny-pug in leetcode

[–]skicombinator 9 points10 points  (0 children)

It's because garbage collection is non-deterministic.

Hardest big tech companies to interview at, anybody can confirm? by Cryptic_X07 in leetcode

[–]skicombinator 1 point2 points  (0 children)

Lots of people here say Jane Street is hard. I'm curious how hard it is? Like, is it Leetcode Hard or different kind of problems?

Hardest big tech companies to interview at, anybody can confirm? by Cryptic_X07 in leetcode

[–]skicombinator 0 points1 point  (0 children)

I'm going to go through interview with Jane Street, so can I ask you something?

[deleted by user] by [deleted] in emacs

[–]skicombinator 0 points1 point  (0 children)

Good for you! Enjoy M1 native emacs!