miniblog.

There's an awkward tension between auto-update and fixing security bugs. If platforms don't automatically update, users don't get security fixes. If they do update, you're giving the vendor RCE power.
Perl is still very much a glue language, even in areas that are largely statically typed. Haskell's GHC depends on it, OCaml's opam uses it, and Nix had a perl dependency until last year too!
Another interesting aspect of OCaml syntax: [1,2,3] is equivalent to [(1,2,3)]. A list of integers is [1;2;3]. This is one of those cases where familiarity with the syntax of other languages can actually make life harder! [1,2,3] doesn't look wrong and is syntactically valid.
Does a canonical hello world program output "Hello, World!" or just "hello world"? I've always favoured the latter (less typing when learning a new language) but the former seems pretty common.
I'm learning OCaml at the moment, and I was caught out by the syntax today. This code (pictured) gives a type error saying that Sad is not a boolean. https://gist.github.com/Wilfred/ce4b7177f404a482b8fccc0044d15e4c This is the classic 'dangling else' syntax problem, but with match statements rather than if statements.
Photo
Some Lisps can be both interpreted and compiled, which allows some lovely workflows. You can iteratively evaluate code snippets, and only compile when you're happy with your new feature! This takes the compiler out of the iteration cycle, so you get feedback sooner.
Python is criticised for the GIL preventing multiple threads running at once. Turns out that many languages don't support this kind of parallelism, including JS, PHP/Hack and OCaml (although multicore-ocaml is underway).
Another neat OCaml feature: the type of a partially applied printf call reflects the format string used! Not many statically typed languages have this property.
Photo
Emacs' support for OCaml is exceptionally good. Not only does tuareg-mode have a decent REPL integration, but it even has thorough 'pair' highlighting for keywords! Even more impressively, merlin-eldoc understands scope and shadowing when highlighting symbols!
Photo Photo
Fun post on the lessons learnt when implementing a JIT VM for a language: https://www.mikedrivendevelopment.com/2018/06/what-i-learned-making-my-own-jit.html
Evaluate snippets of Clojure with the bindings set up as if you'd called the function. This neat idea was proposed in https://blog.cognitect.com/blog/2017/6/5/repl-debugging-no-stacktrace-required and https://github.com/vvvvalvalval/scope-capture builds tooling to automate it!
OCaml's syntax is interesting: there are very few characters different between variable and function declarations: let foo = bar 123 vs let foo x = bar x Taking the idea of a lisp-1 to even the syntax!
Measuring the impact of answers, comments and edits on users asking more questions on Stack Overflow: https://meta.stackexchange.com/questions/311504/what-can-we-do-to-encourage-or-discourage-a-second-question
One interesting property of emacs lisp is that a macro can't do an early return from a function. You either need a wrapper (like cl-block or cl-defun) or you have to signal. C macros (including those in Emacs itself) don't have this property, making it harder to reason about.
Turns out that patching Emacs' library loading whilst silencing user feedback can lead to some really interesting bugs: https://github.com/cask/shut-up/pull/12/commits/2495e8bf3d424f88f82679dd94def6b87960c4a9 This might be the longest commit message I've ever written. I think a good message tries to persuade the maintainer to accept the PR.
If your Emacs is segfaulting, you can explicitly write to stderr when debugging, so you have trace information! This even works when you are running Emacs with a GUI. (print "hello world" #'external-debugging-output) https://stackoverflow.com/q/22455366/509706
Emacs is Sexy: https://emacs.sexy/ A great selection of introductory material for new Emacsers.
As a developer, you develop an intuition for the computational cost of doing things. It's possible to become computationally stingy: "a real time text editor (i.e. updates as soon as you type) is a huge waste of resources!" I wish I had a good name for this phenomenon.
Excellent, straightforward discussion of the applications enabled by machine learning, comparing it to relational databases: https://www.ben-evans.com/benedictevans/2018/06/22/ways-to-think-about-machine-learning-8nefy
A nice improvement in Emacs 26.1: the manual explains the exact difference between syntax-ppss and parse-partial-sexp: https://github.com/emacs-mirror/emacs/commit/913808e224455dc3c
Showing 341-360 of 657 posts