HNHacker News
TopNewBestAskShowJobs

lelf

67,542 karma · joined April 20, 2011

  occasional c⊎k⊎haskell⊎erlang hacker
  #76d6ff
submissionscomments
lelf··on Terminal latency (2017)
MacOS Terminal.app
lelf··on Norsk Hydro ASA Suffers Extensive Cyber Attack
… he says on hacker news.
lelf··on K7 Tutorial
Paraphrasing

  fold[max] y  # maximum
  fold[min] y  # minimum
Those two characters have no connection with the operation they stand for

  | — logical-or,  min
  & — logical-and, max

    0|1
  1
    1|42
  42
lelf··on Thinkpad X210
> The fan only turns on if I’m doing something intensive like compiling go or scrolling in Slack.

That’s intensive. And sad.

lelf··on Falling in love with OpenBSD again
I mean (forgive my heresy) using kvm(-the-hypervisor) under GNU/Linux to run guest OpenBSD. That is at least a very fast way to get started, spin up €2 instance somewhere, qemu -cdrom openbsd.iso and that's it.
lelf··on Falling in love with OpenBSD again
KVM (not joking)
lelf··on Worstsort

  for x in 3 1 2 5 4; do (sleep $x; echo $x) & done
lelf··on Worstsort
So

  sort ≡ head ∘ sort ∘ permutations
I wonder if there is some neat (and totally useless) algorithm for sort using that info.
lelf··on Why to normalize Unicode strings
Ligatures are not a good example actually. They are obsolete by Unicode, i. e. there's no way to turn ffi⟨normal⟩ into ffi⟨ligature⟩. (But NFKD(ffi⟨ligarure⟩)≡ffi⟨normal⟩ of course.)
lelf··on Erlang OTP 21.3
It's just

   fun(F)->fun(X)->F(fun(V)->X(X(V))end)end(fun(X)->F(fun(V)->X(X(V))end)end)end
lelf··on Why to normalize Unicode strings
Swift is headed in the right direction.

But I think Perl6 is the only language that can do this magic:

  > 'Déjà vu' ~~ /:ignorecase:ignoremark deja \s vu/
  「Déjà vu」
lelf··on Why to normalize Unicode strings
It's called collation

  > $*COLLATION.set(:!secondary:!tertiary:!quaternary)
  collation-level => 1, Country => International, Language => None, primary => 1, secondary => 0, tertiary => 0, quaternary => 0

  > '12' coll '12'
  Same
lelf··on Why to normalize Unicode strings

  > "\c[latin small letter e]\c[combining acute accent]" eq "\c[latin small letter e with acute]"
  True
Edit: And of course

  > "\c[dog face]".chars
  1
and not 2 as in the article.

PS: WTF? HN strips emojis :/ (and does it incorrectly when they are emoji sequences).

lelf··on Scientists ‘reverse time’ with quantum computer in breakthrough study
https://arxiv.org/abs/1712.10057
lelf··on DTrace on Windows
Again, even when it was CDDL it wasn't a real problem. See ZFS.

> system tap, ktap, lttng, ftrace, etc

That's why I'm talking about NIH.

Even with ebfp, they intentionally choose different tracing syntax (just look at it, it's comical). Didn't use ready-to-use CTF. Etc etc etc.

lelf··on DTrace on Windows
Unlikely. Dtrace needs support from many OS components, including kernel.
lelf··on DTrace on Windows
It's pure NIH. dtrace is GPLv2. (Also ZFS (CDDL) run fine on Linux.)
lelf··on DTrace on Windows
Kudos for Microsoft for not going the Linux NIH way.
lelf··on Exotic Atom
https://en.wikipedia.org/wiki/Antiproton_Decelerator
lelf··on Barking drones used on farms instead of sheep dogs
Dogs don’t require charging every 20–30 minutes.

Dogs can fly^Wrun without remote control.

lelf··on GNU Parallel Cheat Sheet [pdf]
Don't use it if you don't like it. It's that simple.
lelf··on ZFS on Linux 0.7.13
FreeBSD and SmartOS have rock-solid ZFS.
lelf··on Show HN: Two Kilo – A curses-based text editor in 2kb of code
The same. It does strlen(0) somewhere

  $ dtrace -n 'pid$target::strlen:entry { print(arg0) }' -c './a.out 2'
  CPU     ID                    FUNCTION:NAME
  ⋮
    4  22139                     strlen:entry int64_t 0
lelf··on APL – A Glimpse of Heaven (2006)
Edit: btw, https://tryapl.org «`» is prefix key. `i10 ⟶ ⍳10

> how do you write all those non-ASCII symbols using a standard OS and text editor?

Modifier+KEY or PrefixKey KEY

All symbols are in Unicode. No special tools required.

        ]KEYB
  US Keyboard Layout:

  ╔════╦════╦════╦════╦════╦════╦════╦════╦════╦════╦════╦════╦════╦═════════╗
  ║ ~  ║ !⌶ ║ @⍫ ║ #⍒ ║ $⍋ ║ %⌽ ║ ^⍉ ║ &⊖ ║ *⍟ ║ (⍱ ║ )⍲ ║ _! ║ +⌹ ║         ║
  ║ `◊ ║ 1¨ ║ 2¯ ║ 3< ║ 4≤ ║ 5= ║ 6≥ ║ 7> ║ 8≠ ║ 9∨ ║ 0∧ ║ -× ║ =÷ ║ BACKSP  ║
  ╠════╩══╦═╩══╦═╩══╦═╩══╦═╩══╦═╩══╦═╩══╦═╩══╦═╩══╦═╩══╦═╩══╦═╩══╦═╩══╦══════╣
  ║       ║ Q  ║ W⍹ ║ E⋸ ║ R  ║ T⍨ ║ Y¥ ║ U  ║ I⍸ ║ O⍥ ║ P⍣ ║ {⍞ ║ }⍬ ║  |⊣  ║
  ║  TAB  ║ q? ║ w⍵ ║ e∈ ║ r⍴ ║ t∼ ║ y↑ ║ u↓ ║ i⍳ ║ o○ ║ p⋆ ║ [← ║ ]→ ║  \⊢  ║
  ╠═══════╩═╦══╩═╦══╩═╦══╩═╦══╩═╦══╩═╦══╩═╦══╩═╦══╩═╦══╩═╦══╩═╦══╩═╦══╩══════╣
  ║ (CAPS   ║ A⍶ ║ S  ║ D  ║ F  ║ G  ║ H  ║ J⍤ ║ K  ║ L⌷ ║ :≡ ║ "≢ ║         ║
  ║  LOCK)  ║ a⍺ ║ s⌈ ║ d⌊ ║ f_ ║ g∇ ║ h∆ ║ j∘ ║ k' ║ l⎕ ║ ;⍎ ║ '⍕ ║ RETURN  ║
  ╠═════════╩═══╦╩═══╦╩═══╦╩═══╦╩═══╦╩═══╦╩═══╦╩═══╦╩═══╦╩═══╦╩═══╦╩═════════╣
  ║             ║ Z  ║ Xχ ║ C¢ ║ V  ║ B£ ║ N  ║ M  ║ <⍪ ║ >⍙ ║ ?⍠ ║          ║
  ║  SHIFT      ║ z⊂ ║ x⊃ ║ c∩ ║ v∪ ║ b⊥ ║ n⊤ ║ m| ║ ,⍝ ║ .⍀ ║ /⌿ ║  SHIFT   ║
  ╚═════════════╩════╩════╩════╩════╩════╩════╩════╩════╩════╩════╩══════════╝
lelf··on Unicode Standard, Version 12.0
Every top comment is about Emoji… Law of triviality in action ;)

  Also in Version 12.0, the following Unicode Standard Annexes have notable modifications ⟨…⟩
  UAX #14, Unicode Linebreaking Algorithm
  UAX #29, Unicode Text Segmentation
  UAX #31, Unicode Identifier and Pattern Syntax
  UAX #38, Unicode Han Database (Unihan)
  UAX #45, U-Source Ideographs
lelf··on Apple’s 2018 MacBook Pros Attempt to Solve Flexgate, Without Admitting It Exists
Been there.

Wait several months.

lelf··on Functional Programming in OCaml
Simplicity. Strict evaluation. Functors (first-class/higher-order modules), although Haskell is trying to get there with Backpack too.

Good idea to learn both, anyway :-P

Edit: compilation speed too, huge difference

lelf··on Fearless Concurrency: Clojure, Rust, Pony, Erlang and Dart
> Its use of dynamic typing makes me a little bit hesitant to use it, though, as I really love the help provided by static typing.

There is dialyzer, a static type (and not only) analysis tool for Erlang. It is part of Erlang/OTP (i. e. built-in.)

http://erlang.org/doc/apps/dialyzer/users_guide.html

lelf··on Linux Fsync Issue for Buffered IO and Its Preliminary Fix for PostgreSQL
Read the wiki page. [Not Postgres’ fault in any way of course.]

> Linux 4.13 and 4.15: fsync() only reports writeback errors that occurred after you called open()

lelf··on Linux Fsync Issue for Buffered IO and Its Preliminary Fix for PostgreSQL
> Starting from kernel 4.13, we can now reliably detect such errors during fsync.

No. Not even close.

See https://wiki.postgresql.org/wiki/Fsync_Errors

← PreviousPage 6 of 21Next →