HNHacker News
TopNewBestAskShowJobs

dr_zoidberg

1,856 karma · joined September 24, 2014

submissionscomments
dr_zoidberg··on Compile Python applications into stand-alone executables
I've used it a couple of times. When it works, it's great, but there can be issues with bundling dependencies correctly. As such, I've resorted to using it just with the standard library, or a few 3rd party-modules that are nuitka-friendly.
dr_zoidberg··on QOI: Lossless Image Compression in O(n) Time
Quick question, from the context and how the wikipedia article was written I assumed TSL was fairly new, however looking at the dates of the published papers it all seems be late 90's early 2000's. Is this still in use somehow? I've never heard of it before, even though I've dabbled a bit in image processing from time to time in my line of work.
dr_zoidberg··on Sonic: A fast JSON serializing and deserializing library
Right, they show MB/s of parsed JSON, and it definitely surprised me: simdjson-go is among the slowest! It looks like there's something fishy going on there, as it is _orders of magnitude_ slower that vanilla simdjson.
dr_zoidberg··on Teen rescued after showing domestic violence hand signal known on TikTok
I don't do it rapdily, and it's a single-handed motion, so not the usual "cracking your knuckles" movement/gesture. I do wonder because it could look similar, though I don't specifically direct it so that it'll be palm-to-viewer, as the guides for this gesture tell you to do.
dr_zoidberg··on Teen rescued after showing domestic violence hand signal known on TikTok
I sometimes do a gesture similar to this one as a habit for cracking my (thumb) knuckles single-handed. Not as an intentional sign first tucking the thumb in the palm, and then traping it in, but rather as a single motion. I wonder if it could be mistaken for this gesture.
dr_zoidberg··on M1 Pro First Impressions: Core Management and CPU Performance
AMDs Renoir stood up to desktop CPUs some 6 months before the M1. Still yeah, the M1 is a performance beast. But like others have said already, in the latest gen (and considering Alder Lake is fresh out of the oven[0]), they're all quite close, trading blows with each other.

[0] almost literally by the thermal numbers

dr_zoidberg··on A Graduate Course in Applied Cryptography
I work in digital forensics. You wouldn't believe the misconceptions about "crypthgraphic hashes" and cryptography in general that are around in my area. If everyone took an intro course to cryptography that wouldn't happen as much as it does.

So there you have, one reason to take this course that is not "roll your own crypto" (which you should never do, unless you really really really know what you're doing. And even then you should check with a few people smarter than you to make sure everything is as you think it is.

dr_zoidberg··on AI can write code like humans, bugs and all
In my case, the act of writing the code is still a moment in which I'm thinking and analyizing my code, and I might notice if there's some error in my train of thought.

Obviously that is how _I_ type code, and not something that can generalize to how others work. So it's my preference to still think about my code before, and while, I write it.

dr_zoidberg··on Mister Rogers had a simple set of rules for talking to children (2018)
"But I told you it was just water!"

When I was a child a hairdresser cut a bit of my ear. Obviously I cried at the moment, it hurt. I may have been anxious about going to get a haircut for a couple of times afterwards. But then we found another hairdresser that was absolutely marvelous with kids, and never had any issue afterwards.

It's just about how the situations are handled. The given story being a very very poor example, despite the parents having good intentions.

dr_zoidberg··on A Tunguska size burst destroyed Tall el-Hammam, Bronze Age city in Jordan Valley
I understand that bolides would be the biggest danger right now, as they are small enough to be practically undetectable, but may be large enough to level a city. Are there any measures we can take against them? [0]

[0] I'm aware one of our best bets here would be a proper survey and sensitive enough telescopes/satellites actively looking for these kind of objects. And that there are some projects and programs along these lines already. It'd seem there's some more work to be done in that area though.

dr_zoidberg··on Byte Magazine Volume 07 Number 08 – Logo (1982)
No, but thanks for the suggestion. I should probably just draw the characters as best I could and head over to reddit or something.
dr_zoidberg··on A Tunguska size burst destroyed Tall el-Hammam, Bronze Age city in Jordan Valley
For asteroids that can be detected with lots of time, yes, deflecting them with time is totally the way to go. As the discussion was with bolides, I assumed we were talking in an "impending danger, no time to act" framework.
dr_zoidberg··on Byte Magazine Volume 07 Number 08 – Logo (1982)
It's not. The drawings were a bit more cartoony with "big heads and small bodies". The book also had a lot of Logo, which we couldn't really use because our computer back then only had a BASIC interpreter.

Thanks for the suggetion though :)

dr_zoidberg··on A Tunguska size burst destroyed Tall el-Hammam, Bronze Age city in Jordan Valley
You're not wrong. Possibly the biggest issue would be how can you quickly launch one of these without triggering WW3.

Another issue I'm thinking is that I don't know the state of the art of meteor/bolide trajectory estimation (it's apparently very poor), so you'd probably need to fire a bunch of these (or a very large one) along an (uncertain) path hoping for it to affect the impactor.

So this is just more of the same problem: how do you fire a barrage of nuclear missiles over a region to stop an impactor in such a way that you're not mistaken for a madman starting nuclear war?

dr_zoidberg··on A Tunguska size burst destroyed Tall el-Hammam, Bronze Age city in Jordan Valley
Having nuclear missiles ready at all times, all over the world (near populated areas) is a risk on its own... In a politically stable world without conflicts, sure, but we haven't had that kind of world for centuries...
dr_zoidberg··on A Tunguska size burst destroyed Tall el-Hammam, Bronze Age city in Jordan Valley
The linked study mentions the possibility of Tall el-Hammam being Sodom, but they specifically say thats a whole line of study in itself and they won't go into details in the paper.
dr_zoidberg··on Byte Magazine Volume 07 Number 08 – Logo (1982)
A bit off topic... When I was a child, we had at home a "big yellow book" (mind you, I was 4 or 5 at the time, so maybe not that big) that taught about how computers worked in the first part and in the second part had Logo and BASIC games you could type into your PC.

Since it was a book for children, it was full of illustrations but it went into some details (or maybe I'm adding stuff into it in retrospect). The main protagonists were a boy and a girl, with a pet (maybe a dog?). I think I remember the boy having some kind of curly/fluffy hair. I remember the eyes of the characters were distinctive, but can't really recall _how_.

Any idea or pointers about finding this book? I don't remember anything about the title, author, publisher, etc.

dr_zoidberg··on Trademark Actions Against the PostgreSQL Community
How about an interface like GitHub issues? Do you feel that strikes a balance between consumers/producers for this kind of discussions?

Edit: I think you updated your comment while I replied (or maybe I just hit reply without seing the last part of your comment). I see now that you've mentioned GitHub issues, which is a kind of interface that I've seen get a better balance, but I'm not sure how it stands from a producor pov against a mailing list (decentralization is obviously lacking on them).

dr_zoidberg··on PaddleOCR: Lightweight, 80 Langauge OCR
For a long time there was this distinction that OCR meant "typefaces as in a scanned document" whereas if you wanted more "free form text recognition" you'd lean yourself towards some machine learning based approach (SVM, convnets, etc).

Now, this is an artificial divide: there's nothing in the defintion of what OCR is that means "oh it only works on scanned documents". It's just what it used to mean back in the day.

Still, if that's your kind of problem, you may look into something more along the lines of a deep convnet to do character detection and then recognize each bounding box into an alphabet.

dr_zoidberg··on Ask HN: What problem are you close to solving and how can we help?
With regards to 1, I wonder: why would calculating the Hamming distance be slow? In python you can easily do it like this:

    hamming_dist = bin(a^b).count("1")
It relies on a string operations, but takes ~1 microsecond on an old i5 7200u to compare 32bit numbers. In python 3.10 we'll get int.bit_count() to get the same result without having to do these kind of things (and a ~6x speedup on the operation, but I suspect the XOR and integer handling of python might already be a large part of the running time for this calculation).

If you need to go faster, you can basically pull hamming distance with just two assembly instructions: XOR and POPCNT. I haven't gone so low level for a long time, but you should be able to get into the nanosecond speed range using those.

dr_zoidberg··on An error message if you put more than 2^24 items in a JS Map object
Yes, it gives an error -- if you want decimals, you can't use leading 0's:

    Python 3.6.3 (v3.6.3:2c5fed8, Oct  3 2017, 18:11:49) [MSC v.1900 64 bit (AMD64)]
    Type 'copyright', 'credits' or 'license' for more information
    IPython 7.2.0 -- An enhanced Interactive Python. Type '?' for help.

    In [1]: 01
      File "<ipython-input-1-3351d58b1d3b>", line 1
        01
         ^
    SyntaxError: invalid token


    In [2]: 0o1
    Out[2]: 1

    In [3]: 0o10
    Out[3]: 8
dr_zoidberg··on Using Computer Vision to Win at Duck Hunt
Edit: I'm pretty sure I missclicked to which comment I wanted to answer and now I can't find it... It said something along the ML approach being more developer-time efficient.

You can definitely do it in 20 minutes if you know how (which is also applicable to the ML version):

    import cv2
    import numpy as np

    red_duck = cv2.imread("red_duck.png", cv2.IMREAD_GRAYSCALE)

    # boilertplate etc, up to the point where you want to match your ducks on screen:

    res = cv2.matchTemplate(img_screen, red_duck, cv2.TM_CCOEFF_NORMED)
    positions = np.zeros_like(img_screen)
    positions[res > 0.7] = 1  # we found a duck
    # now do whatever you want with each position
    # on real life images you may need to do some additional post-processing, on 8-bit rendered images you probably don't need to
dr_zoidberg··on One does not simply calculate the absolute value
Back when that code was used (in Quake 3, and before, a for a bit after it), there was no rsqrtss instruction.
dr_zoidberg··on Using a laser to blast away a Bayer filter array from a CCD
Now that's something that I haven't done, but you left me wondering... Wouldn't any demosaicing algorithm complicate things at that point? If you have a few links to share I'd like to read a bit more about it.
dr_zoidberg··on Using a laser to blast away a Bayer filter array from a CCD
Yeah, the [1] was about RGBW
dr_zoidberg··on Using a laser to blast away a Bayer filter array from a CCD
Green was chosen because it's to what the human eye is most sensitive. Look at Fuji's X-trans[0], and there are also RGBW arrays that prioritize dynamic range.

All in all, the BFA is "good enough" most of the times. For the use cases where it isn't, you're either:

* Budget constrained and can't really afford not using BFA

* Able to (pay for and) use either a color wheel in front of your sensor, or go with prism + triple sensor.

* Bite the bullet and go with a "strange" color array. You'll probably need to work on the software side for demosaicing to get proper support and fix eventual artifacts.

[0] even more green! 20/36 photosites are green, 8 red 8 blue

[1] with W being white, meaning no color filter or "panchromatic cell". In theory this helps on dim light conditions.

dr_zoidberg··on Using a laser to blast away a Bayer filter array from a CCD
Demosaicing algorithms are very good at restoring the resolution "lost" to the BFA. They can introduce some artifacts (zipper effect, "labyrinth", fringe color, to name a few) but in general, sharpness isn't lost as much as people imagine.

Nowadays they classical algorithms are being replaced by convnets that are trained on different BFA/image pairs and can get very good results -- at the cost of placing a convnet in the middle (so much higher computational cost, which can be offloaded to a GPU/AI accelerator if available).

If you want to see what a "pixel perfect" camera gives you, there are the Sigma cameras with Foveon sensors[0] or you can check the cameras that have a sensor-shift superresolution approach (some pro Olympus and Hasselblad models have this feature). Sensor-shift SR has the problem that it works best on static scenes, because it takes several images which are then later combined on a single picture, and if there's movement between the images it may introduce a few artifacts.

[0] which do full color data for every pixel, as they use silicon depth to filter wavelenth

dr_zoidberg··on Security Threat Model Review of the Apple Child Safety Features [pdf]
Which is why open(-ish[0]) things are good, because people can get curious and see how they work.

[0] I understand the emissions cheating was not supossed to be open, but a relatively open system allowed said student to take a peek and see what was going on.

dr_zoidberg··on Magnetism Simulations: Three Months in Monte Carlo
I think it's been HN-hugged to death, so cached link: https://web.archive.org/web/20210717103315/http://bit-player...

Edit: I glimpsed at it... it's long and full of details, plus the simulations run in the archived version!

dr_zoidberg··on Undocumented x86 instructions to control the CPU at the microarchitecture level [pdf]
The account was created a few hours ago today and seems to be a sort of burner/puppet to share controversial opinions.
← PreviousPage 5 of 32Next →