I wasted too much time this afternoon dealing with a completely unreliable API, only to find out: it always returns ‘200 OK’ but is supposed to return JSON describing an object with a name ‘result’ with a value ‘0’ (for success) or ‘1’ (for failure)… but actually always returns an empty response body!
In the 90s part of Germany's air traffic control software ran on Emacs
Last year, we spent 51 days at sea during the passage from Japan to Canada, it was the hardest thing we had ever done. We kept a physical logbook of daily happenings onboard. This is that logbook, revised, and with a ton of extra notes.
If you see this, struggle with it, and feel bad about it…
This is unfortunately one of those interview questions you either already recognise and know the answer for, or struggle with; in this case, it’s a variation on a run-length encoding algorithm.
Solution in Emacs Lisp, using ‘cl-loop’
ELISP> (cl-loop for char across "aaaabbbcca\x00"
with last and count = 0
if (eql last char)
do (cl-incf count)
unless (= count 0)
collect (cons (string last) count)
and do (setq last char count 1))
(("a" . 4)
("b" . 3)
("c" . 2)
("a" . 1))
I was nerd-sniped by a problem posted by Alexey Grigorev on Twitter:
‘🔸 Input: "aaaabbbcca"
🔸 Output: [("a", 4), ("b", 3), ("c", 2), ("a", 1)]
‘Write a function that converts the input to the output’
New tabs are in Epiphany master 🎉
Huge kudos to @exalm for making it happen!
If you haven't used Epiphany in a while I encourage you to check it out once 40 hits.
"It's not like I'm lisping," rms heard someone say as he shouldered his way thru the crowd. "It's like my editor's developed this massive paren deficiency."
It was an Emacs user and an Emacs joke. The #emacs channel was a place for professional dotfiles hackers. You could chat a week there and never see two lines of Java.
Professional dotfiles hacker. Dilettante programmer, salaryman webmaster. 不本意な日本語話者.
Server run by the main developers of the project It is not focused on any particular niche interest - everyone is welcome as long as you follow our code of conduct!