HNHacker News
TopNewBestAskShowJobs

verandacoffee

26 karma · joined February 25, 2019

submissionscomments
verandacoffee··on The Worsening State of Ransomware
Probably irrelevant. There would anyway be some number N of operating systems, and a number K of computers, and the number K will always be very much larger than N. So there would be a huge possible 'market' for these criminals, even if they targeted just one of the N operating systems, as long as the number of vulnerable computers is large enough.

(edit: removed some meaningless words)

verandacoffee··on EmacsConf 2020: State of Retro Gaming in Emacs
ctrl-C Has worked in message boxes for years.
verandacoffee··on Ask HN: How to rediscover the joy of programming?
sbcl (and other Common Lisps) uses what you want it to use: read-default-float-format

(setf read-default-float-format 'single-float) (+ 0.1 0.2) => 0.3

(setf read-default-float-format 'double-float) (+ 0.1 0.2) => 0.30000000000000004

On LispWorks 7.0 I get 0.30000000000000005 for double-float. Hmm.

verandacoffee··on A new way to make quadratic equations easy
Isn't this the same as the pq-formula? https://www.matteboken.se/lektioner/matte-2/andragradsekvati... (Link in Swedish).
verandacoffee··on The Power of One-State Turing Machines (2018)
> ... you should bear in mind that the Church Turing thesis is valid only for functions N->N

This is not correct. The concept of algorithm has nothing intrinsic to do with natural numbers. You could use any data structure, e.g. finite strings of symbols from a fixed (per application) finite alphabet as is used in Post normal systems. The Lambda Calculus is also an example, as it doesn't use natural numbers, but its own expressions.

verandacoffee··on When Britain and France Almost Merged into One Country (2017)
Relevant: https://www.norwegianamerican.com/norsk/the-coining-of-quisl...

Unfortunately the caption is omitted, but is at least retold just below the middle of the article: 'It depicts Quisling arriving to audience before Hitler. His right arm raised in the Nazi salute, he announces “I’m quisling!” to which the doorman asks: “And your name?”'

The original caption was just (if I remember correctly):

- I’m quisling! - And your name?

The cartoon was printed in Sweden, in Göteborgs Handels- och Sjöfartstidning, which was edited by Torgny Segerstedt, one of too few outspoken anti-nazis among Swedish editors.

verandacoffee··on I am a horse in the land of booleans
Algol (60) had if-expressions, as did Simula 67 (based on Algol): x := if (y = 0) then 0 else 4 / y
verandacoffee··on Programming Algorithms in Lisp: Data Structures
> ...I value your opinion...

And I value your work on this book.

I apologize for having said at the beginning that "This makes the book untrustworthy, whatever good features it might have." It was unwarranted, and not substantiated, and much too harsh.

I do however stand by my claim that it is undefined behaviour. (You could help by making the suggested changes to rutils.)

verandacoffee··on Programming Algorithms in Lisp: Data Structures
Following your link: "3. It causes the symbol to become a constant variable." and following the link to constant variable: "constant variable n. a variable, the value of which can never change; that is, a keyword[1] or a named constant. ``The symbols t, nil, :direction, and most-positive-fixnum are constant variables.''"

This doesn't mention the function slot of the symbol, so one could perhaps argue that therefore the function slot is not meant to be a constant variable, but one could equally well argue the opposite. The various implementation obviously differ on this. That alone means that this is either undefined behaviour, or that some of them have this as a very long-standing bug, at least since their inception.

verandacoffee··on Programming Algorithms in Lisp: Data Structures
I'm not sure pointing out undefined behaviour is nitpicking. It could in some cases be crucial. At the very least, it ties your code to only some Common Lisp implementations.

I know you can assign to keywords in LispWorks (using a restart), but that should be done in your rutils library, wrapping the definition of :=, :*, :/. And then you should do the same for all other implementations, which may differ in what condition is signalled, and whether there really is a restart for this, and of course whether it actually is allowed in that implementation.

verandacoffee··on Programming Algorithms in Lisp: Data Structures
In the first installment of this series, the author use := for assignment, instead of setf. This is at least using undefined behaviour, as keywords are meant to be constant symbols, not themselves assignable to. Sbcl allows assignment to the function slot of a keyword, but LispWorks doesn't. Using undefined behaviour almost certainly guarantees incompatibilities between implementations, and should always be avoided. Here, it is a central feature. This makes the book untrustworthy, whatever good features it might have.

I must point out that setf is extensible (defsetf and so on) and therefore much better anyway.

(I must say though that one of the poor choices made in the C-family of languages is the choice of = as assignment, when Algol already had used := for this.)

verandacoffee··on Show HN: A live map of sunlight on earth
I get 10:26pm until NaN:NaNpm Probably because I am in Northern Norway (Midnight Sun).