HNHacker News
TopNewBestAskShowJobs

szemet

1,146 karma · joined October 20, 2015

submissionscomments
szemet··on The 'Dark Ages' Weren't as Dark as We Thought
Also, we should rename the Thirty Years' War to "Thirty Years' War in Europe but mostly peace elsewhere", and then we can can call World War I and World War II simply War I and War II - if we assume by default that every event is global (maybe we should add "except Switzerland,etc..." there too...)

Just joking: IMHO if someone knows what dark ages was, usually know where it was... It is that simple!

szemet··on Neuroscientist Larry Cahill on the ‘neurosexism’ debate
It may be likely - but it is not a logical necessity: there can be large structural differences between functionally equivalent things (artificial, engineered example: like a C64 computer and a C64 emulator)
szemet··on Org-mode parser in Rust
And if I compile some GNU code (for example written in C) to javascript with a compiler, then change some details here and there can I change the licence to MIT?

How derivative is defined? Manual compilation is ok, but automatic is not? But what if I beleive that humans are just fancy machines? ;)

szemet··on Approval Voting versus Instant Runoff Voting
almost everyone will score either a 5 or a 1

Then it will be similar to approval voting.

Previous comments complained that approval is bad because you cannot express detailed preferences, but you say no one wants to anyway? So then approval is ok?

szemet··on Computer Software (1984)
I've just bought this Scientific American issue a week ago in an used book store for around 2$. Mainly because of Wirth and Kay and to read some early Wolfram. Strange coincidence to see this here now.
szemet··on AMD Ryzen 5 2500X and Ryzen 3 2300X CPU Review
Hobby code: I slowly developing a Gin rummy [1] engine. Card sets are represented by 64 bit integers and all operations (findig melds, sets, etc...) are implemented with bitwise operators.

I have used pext/pdep for the iterator implementation (iterate over all subset of a card set, or all combination of n cards).

(e.g. To iterate over all 10 card combination brute-force and filter and print out all the ones which can be knocked (evaluating 15_820_024_220 hands) takes 70 seconds - one threaded - on my 7th gen intel i3.)

[1] https://en.wikipedia.org/wiki/Gin_rummy

szemet··on Gödel's Theorem
On the non-reflective cases we at least see that we can forge small but very hard problems too. The most simple ones are the infinite loops testing some whole number related property, like: Goldbach conjecture, Fermat's theorem.

Now we know the program of the second case never halts but it was not an easy proof, the first one is still open.

szemet··on Harried South Koreans pamper pets instead of having kids
It boils down to preferences. So it is a smart move if it is in line with your preferences.

In simple terms saying people having children are not that intelligent, is like saying people preferring pizza over pasta (or other way) are dumb.

(And yes, I do think that those who think the is–ought distinction is bullshit are not that intelligent...;)

szemet··on Confessions of an Abstraction Hater
And we also have the modification of Rob Pike:

"There's nothing in computing that can't be broken by another level of indirection."

https://twitter.com/rob_pike/status/48790422931243008

szemet··on Using the Singular ‘They’: Why It Is Important
Same with me (hungarian too), I always fail to use the proper pronoun, but using "they" sound weird to my ears.

In speech I mostly use "he" automatically, then I recognise my fault after a few sentence, then correct. Sometimes it feels so embarassing to recognise that I have just told a story about my wife refering her as he. (of course most of the time, I only mention her to people who know her already - so usually I don't have to explain myself)

szemet··on Make Your Own Pythagorean Cup
I have one.

In my washing machine (LG) rinsing slot...

I know, because I always have to be very careful not to overfill it. But usually there is some leftower water in its pipe so it does not keep the fluid even if I not overfill - so nowadays I routinely take it apart and shake it dry before each washing - clever but not to convenient...

szemet··on Please do not attempt to simplify this code
I've got your point.

Just for the sake of nitpicking: both your actual examples have been solved by compilers automatically.

SIMD/AVX: https://code.jsoftware.com/wiki/Guides/AVX

JVM generates vectorized string instructions from your simple for cycles - if availabe: http://jcdav.is/2016/09/01/How-the-JVM-compares-your-strings...

edit: my second example link is maybe wrong, but anyway, auto-vectorization is a real thing...

szemet··on Please do not attempt to simplify this code
I have read an extreme counter-opinion in some J or APL article. It said that it is a bad pactice to name small and common functions:

The example was maybe the average function - and the reasoning was, if I recall correctly:

1. The defintion is shorter then the name average ;)

2. Every praticioning programmer will recognise the definition as a common idiom

3. From the definition it is immediately clear how corner cases are handled (e.g. zero length array)

I just leave this here as an example to show, that programming communities/cultures exists with completely different/alien? ideas about what clean code is ;)

szemet··on WKWebView, an Electron alternative on macOS/iOS
the entire browser engine needs to be bundled with each app

No. It depends on the package manager. E.g: https://www.archlinux.org/packages/community/x86_64/electron...

A shared electron package used by a few different apps: see the "required by" column...

As electron gets more popular, this will be the standard in Linux distributions (at least historically thats how dependencies handled there), Windows has different standard (self contained everything) so there it is the normal way - everybody already used to it for decades...

szemet··on Efficiency is fundamentally at odds with elegance (2013)
Or it maybe just https://en.wikipedia.org/wiki/Berkson%27s_paradox
szemet··on Cigarette smoking: an underused tool in endurance training (2010)
And you just have to drink 500ml red wine to cancel the negative effect of a cigarette on the heart [1], so in the end you can go home from the pub with better breathing and with the same arteries.

This what I call science at its best ;)

[1] https://www.telegraph.co.uk/news/worldnews/europe/1440278/Re...

szemet··on Don't Touch Anything
I've just read about a wild nandu population in Germany: https://m.dw.com/en/giant-south-american-birds-cause-chaos-i...

Seems like it bothers only the farmers there so far...

szemet··on Why Robot Brains Need Symbols
Aren't we - as a group - better in this? I'm thinking about the scientific method, and the common differentiation there between the context of discovery and the context of justification.

So you are free to discover a mathematical theorem by intuition or during daydreaming (like the molecular structure of benzene) - anything goes.

But in the context of justification, you have to be much more disciplined - even if you trust your own intuitions and don't need to persuade yourself (of course generally you should not trust your intuition in scientific context that much;), you have to persuade others who are missing your insight.

edit: And of course - in the end - to accept something as a true A.I. system, it probably has to persuade us that its intuitions are right, using the type justifications we accept. (So even if it has better types of justification - if we won't get it, they has to dumb it down to our level of scientific understanding)

szemet··on Electron and the Decline of Native Apps
Eventually if electron gets popular enough you will have only one additional browser per system - the linux distriburion packaged shared electron. (e.g. https://www.archlinux.org/packages/community/x86_64/electron... ) (not sure but even that could use a shared choromium lib - or am i wrong?)

It is the same as having shared GTK or QT libraries (both with embedded web engine BTW - so plenty of engines already), or having a shared global python deployment with shared global packages (from these you sometimes need two: v2 and v3)

So you will have one extra component per system.

In Windows world maybe you will have one additional electron component per app, but there, it is the "normal" way (you have qt dlls in every qt app etc...) anyway, so not much difference compared to other frameworks there too.

szemet··on Electron and the Decline of Native Apps
It maybe does not mean that much, but at least code memory can be shared among electron app instances if it is deployed with shared libraries by a distribution package manager e.g. https://www.archlinux.org/packages/community/x86_64/electron...
szemet··on Photons, Quasars and the Possibility of Free Will
AlphaZero made choices in chess, and learned from them. So did I get you right: it had a free-will because it is a necessity for this behavior according to you? Because mere "machines" can't make decisions, and can't learn from consequences.
szemet··on Photons, Quasars and the Possibility of Free Will
Ok. I see your point. So I just hope (not actively as a free agent - of course this was determined too) that we are determined to use logically more consistent explanations for our behavior than classical libertarian free will. ;)
szemet··on Photons, Quasars and the Possibility of Free Will
If I write a program that scans for counter example of Fermat-theorem it will run until physics is kind to my machine.

The non-halting property of this setup is caused by the physical arrangements/movements of particles and the laws of nature. Fermat-theorem is an abstraction having no real causal power.

I would say, that for us the proof of Fermat-theorem is the right abstraction level to explain the general behavior of the machine: The machine does not halt because Fermat theorem is true

Similarly "punishment causes less crime" may be the right level of abstraction if the correlation is there, even if it can't be reduced to physical terms. And "Responsibility for action due to free will" may be worse abstraction if agent causation[1] is impossible (I am not saying it is)

So even if increasing/decreasing punishments is determined by low level laws of nature, we still can use the higher level explanation if it suits us better.

[1] https://en.wikipedia.org/wiki/Agent_causation

szemet··on Google's cross-platform Flutter UI toolkit goes 1.0
I have made an (unofficial/private clone of) Azul boardgame in Flutter (intended as a christmas present to my wife).

Whithout having any Dart or frontend or UI experience (I have always progammed backend and CLI apps), I could make a simple working game in maybe 10 hours - and it is mainly due to the instant feedback cycle.

The whole thing is less than 600 lines of Dart code. (and about 100 lines is to deep copy game state objects (for the undo functionality) as Dart can't do that automatically.

The design is simple, just circles, shadows and small animations (the player in turn gets magnified)[1], but with zero experience in the UI domain I actually barely beleive that I have made it ;)

Of course games are absolutely not affected by the native or not native widget issues, and also I did not use any advanced services from the platform, so can't say much about those weaknesses.

I was really happy with it, I would definitely recommend it to similar hobby/beginner projects.

[1] https://pasteboard.co/HQdDD4r.png

szemet··on D compilation is too slow and I am forking the compiler
There is another fairly similar design decision split:

LVM - low (block) level, hardware supported, generic, unavare of filesystem layer above (so it may not be optimal for some usecases) but at least this gives some separation of concerns, and still can provide some impressive features: resize, encrypt, snapshots

CoW filesystems (btrfs, zfs, ...) - specialized, carefully designed data structures/layout, can have more advanced features and more optimized to given ussecases (they have more information what is actually happening), but they are not a generic separatable layer - all the fancy advanced features are tied to the high level fs implementation

szemet··on D compilation is too slow and I am forking the compiler
It is interesting to use fork() to snapshot application state. It seems so high-level and powerful (Compared to other C/POSIX level stuff - so I'm not comparing it to Scheme/Lisp/"your favorite high/low level environment" here!). We may collect some other examples here - just for fun:

- I know that Redis does this (RDB snaphots) too, while the child process saves the actual snapshot, the parent can operate continously relying on the system provided copy on write mechanism

- I have also found this: https://github.com/thomasballinger/rlundo - It overwrites readline library to get undo function in any REPL using it

Other examples?

szemet··on Kelly Criterion (2007)
Ok.

An additional thing is, if you find the optimal strategy in the form of: "in n round the best achievable median is x betting this and this way", you should check the strategy when n approaches infinity - I will not have been surprised if it turns out to be the Kelly Criterion after all - and OP will be right in this sense (though presented the fact somewhat badly by limiting the number of rounds)

szemet··on Kelly Criterion (2007)
I guess you are right. A minor issue is that you have to beat the 1.8 value of OP in (or in less than) ten rounds because if you have infinite rounds then median can grow infinitely (am I right?). It is not clearly visible in your solution, that it really happens in less then 11 rounds.

But it is easy to extend the strategy with this: First get half of the people above 1.8 by betting 0.400000000...1. Now half of the people have 1.80...1. They are finished.

Half of the people have .5999. They can do all-in twice, then 25% of them will be above 1.8. That is 3 rounds in total.

edit: the maximum of this exact 3 round strategy is betting 8/11$=0.72 in first round, then in round 3 we will have 62.5% of people at 2.45$ edit 2: got the numbers wrong in previous calculation, fixed

(Now someone should chime in, and present the actual optimal solution. ;)

szemet··on Kelly Criterion (2007)
"the median is somewhat arbitrary"

I don't know if it matters, but: in the bet everything scenario you end up with 1023 people who will be poorer than they would be in the Kelly scenario. In the 25th percentile maximizing case, you end up with 852 people who will be poorer than in the Kelly case.

Imagine you are running a bank, then in both of your alternative cases a large majority of people would be upset:

"If you used Kelly Criterion we would have been richer"

szemet··on OpenZFS vs. Btrfs and other file systems (2017)
There is a Btrfs driver.

https://github.com/maharmstone/btrfs

(I have never used it, just have seen this refered in the ReactOS release announcement...)

← PreviousPage 3 of 9Next →