HNHacker News
TopNewBestAskShowJobs

dukoid

1,304 karma · joined April 25, 2013

https://twitter.com/dukoid
submissionscomments
dukoid··on Paris to bring back swimming in Seine after 100 years
Heavy rain tends to overloads combined sewer systems, leading to potential discharge of untreated sewage.

https://en.wikipedia.org/wiki/Combined_sewer#Health_impacts

dukoid··on UTF-21, a toy character encoding
"640K ought to be enough for anybody." -- Bill Gates
dukoid··on Growing from engineer to manager
Converting from manager to engineer at the same level requires a special test in at least one FAANG company. Doesn't that mean going from manager to IC is a promotion? And then obviously the other way around must be a demotion?
dukoid··on Was this the most dangerous children's toy?
I suspect early model railroads were quite a bit more dangerous: https://marklinstop.com/2015/07/220-volts-to-the-present-fro...
dukoid··on Black holes might be defects in spacetime
That's true but from our perspective this state won't be reached anywhere in the universe -- so there can't be any singularity from our perspective?
dukoid··on Black holes might be defects in spacetime
Something I was always wondering about black holes:

Does there really have to be a singularity? If I understand relativity correctly, time slows down as mass increases. Couldn't this slowdown affect the contraction so that it never can actually reach an "actual" singularity point?

dukoid··on Show HN: Jesth – Next-level human-readable data serialization format
I had a similar problem recently and in the end I went for TOML, encoding the path in the section headers (square brackets), avoiding any indentation.
dukoid··on Taking Magnesium tablet everyday changes my life
I had a similar experience with Potassium. I'd really recommend to get a blood test before taking any supplements.
dukoid··on German monks create first powdered beer
I don't think it's available as a product yet. The original press release mentions some form of "market testing until mid-2023", but no details...

https://www.klosterbrauerei.com/shop/Bierpulver/951/951

dukoid··on The little-known story behind the 2022 Nobel Prize in physics
Or the Government, as in Asimov's "The Dead Past"
dukoid··on Ask HN: Are people still using Pascal?
Does Advent of Code count?

Jörg's AoC 2022 solutions in Pascal for CP/M running on a Spectrum Next with nice ASCII animations:

https://www.youtube.com/watch?v=eg7r_6IrWmo&list=PLcjDDXgGeS...

Source code: https://github.com/pleumann/aoc22

dukoid··on Meta rolls out AI language model LLaMA
Better than LMAA I guess O:) https://en.wikipedia.org/wiki/Swabian_salute
dukoid··on A URL shortener not shortening the URL but makes it look very dodgy
Since the URL is not getting shorter, the original could just be encoded in the generated URL -- there isn't really any need to store anything
dukoid··on New Mac Mini
The real news here!

  "One display with up to 8K resolution at 60Hz or 4K resolution at 240Hz over HDMI" 
https://www.apple.com/mac-mini/specs/
dukoid··on Why Google and Apple work to snuff out the mobile web
While there are certainly political aspects, there are still technical issues that are hard to overcome. Palm has tried the "pure" Web-only approach and one of the main issues there was the inability to cache compiled code in a straightforward way -- the V8 compilation result is hard to untangle from the current context, partially due to the dynamic nature of the language -- leading to long app startup times. I hope that WebASM will finally fix this problem.
dukoid··on Dinner for one: A little-known British comedy famous in Germany
Früher war mehr Lametta ¯\_(ツ)_/¯
dukoid··on Remote work’s toll on cities
Submission to the automobile has already devastated America's Cities...
dukoid··on Challenging algorithms and data structures every programmer should try
Tries are not mentioned in the OP and I have yet to see an example where they are actually working well.
dukoid··on Don't force users to register before they can buy (2015)
Samsung in particular advertises account registration after guest checkout with "register to track your order" -- and then it doesn't work.
dukoid··on ZX81 Goes Nuclear – Game for Controlling a Nuclear Power Plant [video]
I think the printer connector is a bit loose -- let me push it in firmly!

Oh no!

dukoid··on A neat XOR trick
The article took it down to 2 by adding an extra hashtable. It's possible to go down to 2 without using an extra data structure.
dukoid··on Retro-Printer Module
Thanks!
dukoid··on A neat XOR trick
I don't think so. As much as I love using bit operations: in this case I'd actually prefer a table of character counts for a "true" O(n) solution, as bit counting isn't guaranteed to be a "native" operation.
dukoid··on A neat XOR trick
FTR: This can be done with "only" two loops (opposed to the "naive" 3 in the article) -- without any extra data structures. It's sufficient to keep track of how many characters have been unique so far. For each "new" character, check whether it's different from all of them. If so, increase count. Otherwise, reset count to the distance to the match.

  def main():
    count = 1
    for i in range(1, len(SIGNAL)):
      for j in range(0, count):
        if SIGNAL[i - j - 1] == SIGNAL[i]:
          count = j
          break

      count = count + 1
  
      if count == 4:
        print(i + 1)
        break
If we consider the word length a constant this should be O(n).
dukoid··on Retro-Printer Module
Shouldn't USB-to-Centronics adapters / cables be listed in the alternatives section?
dukoid··on Automation enables founders to grow companies with fewer and fewer employees
Hasn't this been the case since the first machine or even tool was invented?
dukoid··on A Compiler Writing Playground
Turning an expression tree into basic machine code is typically relatively straightforward if the target is stack-based. Basically you do a post-order traversal. For leaf nodes, just push the value. For other nodes, obtain the arguments from the stack, perform the operation and push the result.
dukoid··on Nearly all binary searches and mergesorts are broken (2006)
Guess it depends on how you define "simplest"?

x / 2 + y / 2 + ((x & 1) + (y & 1)) / 2

dukoid··on Nearly all binary searches and mergesorts are broken (2006)
Integers that are represented by a dynamic number of bits -- as in Python or Javascript BigInt
dukoid··on National Rail Network Map
https://www.openrailwaymap.org/ has everything, including colorization options by speed, electrification or gauge
← PreviousPage 2 of 15Next →