charje

joined 1 year ago
[–] [email protected] 1 points 10 months ago

JS doesn't do any type inference. Ocaml Connor l type checker knows all the types and is completely type safe without type annotations.

[–] [email protected] 3 points 1 year ago (1 children)

You might need to package it.

[–] [email protected] 1 points 1 year ago (1 children)

This version is definitely a bit harder to follow what is going on.

[–] [email protected] 1 points 1 year ago

Many farmers growing plants for animal feed. Also there are Deer farms that raise deer specifically for the hunting industry.

[–] [email protected] 1 points 1 year ago* (last edited 1 year ago) (4 children)

Instead of storing intersect-p as a variable and keeping it until the end of the loop, you can return early as soon as you find the first intersection.

Even though a hash table has better symtotic run time, you might find after benchmarking that the O(n^2) is faster for your use case. If you are set on using a hash table, you might consider setting the initial size to something a bit larger (relative to the input lists) to avoid having to dynamically grow the hash table.

I think also the return value of the inner loop is never used...

I personally like to keep my tests assertions top level so I can interactively run each one by itself.

[–] [email protected] 4 points 1 year ago

I think the bigger problem is that they are hard to write and sometimes break tooling.

[–] [email protected] 2 points 1 year ago

I'm pretty sure they operate on tokens not AST.

[–] [email protected] 2 points 1 year ago

More modern shirt text would be scheme vs common lisp.

[–] [email protected] 11 points 1 year ago

proprietariable just means the code can be taken and rerelased as proprietary (no freedoms all rights reserved).

[–] [email protected] 95 points 1 year ago (15 children)

Copyleft licences are the only true free software licences. All other open source licenses are just proprietariable.

[–] [email protected] 1 points 1 year ago

I would love to hear your answers too [email protected].

[–] [email protected] 3 points 1 year ago
  • Common Lisp. I basically only use SBCL. It has good introspection, restarts, and source analysis for debugging. I mainly write theoretical research code that doesn't depend on calling into the JVM or C++ code. I do try to keep my code portable, so I will check with other implementations from time to time.

  • I use GNU Emacs and Sly (though I am thinking of trying Lem). I don't use any structural editing outside of Emacs' built in electric-pair-mode, show-paren-mode, and expand-region (not built in). I don't even use rainbow delimiters anymore. I get all my Common Lisp dependencies from GNU Guix. It is very pleasant to use and is rolling release. In addition to Guix, I use cl-guix-utils, which adds live loading of dependencies quicklisp style.

  • I first learned Racket then Emacs Lisp (both in college). Emacs lisp was more pleasant due to its interactive and self documenting nature. I wanted to write real programs; Common Lisp looked and felt more like Emacs Lisp (but better). I started learning Common Lisp primarily with the "Lisp for the web" series. I was hooked. I learned more mainly through reading the hyperspec, studying other people source code and reading articles. I didn't read any of the famous books until I recently read "Practical Common Lisp". I already knew pretty much everything it had to offer. I wish I had read it sooner.

GNU Guix: https://guix.gnu.org/

cl-guix-utils: https://git.sr.ht/~charje/cl-guix-utils

"Lisp for the web": https://adamtornhill.com/articles/lispweb.htm

"Practical Common Lisp": https://gigamonkeys.com/book/

view more: ‹ prev next ›