HNHacker News
TopNewBestAskShowJobs

haldean

1,185 karma · joined November 3, 2010

http://haldean.org

[ my public key: https://keybase.io/haldean; my proof: https://keybase.io/haldean/sigs/b8iMYgBztqHNxdzpE22mUbizveJMjo8AbBnxJimUpIU ]

submissionscomments
haldean··on Microsoft Surface Laptop Teardown
Sure, but motivation aside, it's nice for someone like me who is buying their own laptop and wants something they can repair and upgrade, too.
haldean··on Microsoft Surface Laptop Teardown
It's being compared to things like a Thinkpad: the manual for my T430 has guides to walk you through how to replace every single part inside, as well as the product numbers for each part so you can order individual replacements yourself. Not only is everything easily replaceable and upgradable, but they actually help you do it!
haldean··on SSH Check – public SSH server testing tool
Sure thing. I have two boxes that run sshd exposed to the internet: 69.164.221.163 and 45.79.85.20. sshd runs on port 2020 now; I was running it on port 22 before but I got so many failed login attempts that it was actually causing noticable load on the system (something like average 10% CPU usage just for sshd).

I still get a couple hundred failed login attempts every day. Reasonably strong passwords and fail2ban mean that it's nbd.

Also, my phone number is on my website (it's 320 584 9293) and most of the spam calls I get are through whois, not the fact that there's a tel: URL out there pointing at it.

haldean··on Rust as a gateway drug to Haskell
I think that the issue you're describing about `yes` was around building a buffer and issuing one big write() syscall instead of a bunch of small ones. I'm not sure about the actual implementation of the IO monad, and whether or not it coalesces call to write(), but it would definitely be possible. Also, idiomatic Haskell would make large writes, because usually (at least in my experience) you create a large string/Text representing your output, and then putStrLn or print it all at once.

In regards to assembling the stream: when the list is actually materialized, I assume it's done one element at a time, but the LLVM backend that GHC uses might be doing some loop unrolling, but I'm not sure.

Stream fusion doesn't require that all of the streams be the same type, though! Elements at different points in the stream can have wildly different sizes. For example, this would be fused:

    sum . map length . map double $ ["hello", "Symmetry"]
        where double x = concat [x x]
That will never materialize a list of Strings, even though at two points in the stream you had a stream of strings.
haldean··on Rust as a gateway drug to Haskell
Haskell performs a very cool optimization called "stream fusion" to deal with a whole class of traversal optimization problems; stream fusion removes intermediate list results completely, and bundles a bunch of things that look like maps/reduces/filters into a single operation. Your example doesn't quite hit it, but a similar bit of code like:

    for (int i = 0; i < N; i++)
        a[i] = 2 * b[i];
    for (int i = 0; i < N; i++)
        c[i] = 2 * a[i] + b[i];
    t = 0;
    for (int i = 0; i < N; i++)
        if (b[i] % 2 == 0) t += c[i];
Would be rewritten to the equivalent of:

    t = 0;
    for (int i = 0; i < N; i++)
        if (b[i] % 2 == 0) t += 5 * b[i];
Lots more info on the GHC optimizations page: https://wiki.haskell.org/GHC_optimisations#Fusion
haldean··on Stephanie, open-source virtual assistant built to control and automate tasks
It can have a female voice without it having a woman's name; the "Google Assistant" is a good example. It's extremely off-putting that the only software we give human names to is the software we boss around, and when we do give it a name, the name is always female.
haldean··on MMIX 2009: A RISC computer for the third millennium (2011)
You can kind of do it with function pointers, with the caveat that a jump table of function pointers is still going to have the cost of a function call. What you can't do is something equivalent to:

    sta $1
    jmp ($1)
which just moves the PC forward by the offset stored in a register (I only know 6502 assembly, sorry everyone). There's no function call here, it's a goto where you calculate what label to go to at runtime. The closest C equivalent would be a switch/case; switch/case has the relative disadvantage that you have to make an explicit label to be targeted for each one, and it becomes difficult to express anything other than "the thing I'm jumping to is parameterized by only this one integer".
haldean··on Coroutines are now in Clang trunk, libc++
Autotools also requires you to explicitly enumerate all of the source files that end up in your build, although it also properly sets up Makefile dependencies so you don't have to re-run autotools when you add a new source file (like you do with CMake)
haldean··on Viper: a new programming language from Ethereum
Both GCC and Clang have an extension to C that provide __builtin_xxx_overflow methods:

GCC: https://gcc.gnu.org/onlinedocs/gcc/Integer-Overflow-Builtins...

clang: https://clang.llvm.org/docs/LanguageExtensions.html#checked-...

haldean··on Tesla owner asks $1m in Model X fiery crash with Falcon Wing doors not opening
The manual way to open the doors is behind a speaker panel that you have to rip off to pull: https://imgur.com/gallery/jqfdV

It's true that it exists, but its intentionally well-hidden, and if you were in a flaming car you probably wouldn't think to rip off the speakers to try to find a latch.

haldean··on Juicero May Be Feeling the Squeeze
...but there's no way that you can generate enough force with just your hands to turn chopped fruit into liquid, though. It must be mostly-liquid already for that to work, right?
haldean··on Juicero May Be Feeling the Squeeze
They are shipped refrigerated; that's why they're limited to only a handful of states. From the article:

> The products were only available in three states until Tuesday, when the company expanded to 17. Packs can’t be shipped long distances because the contents are perishable.

haldean··on Iosevka – A Typeface for Code, from Code
How do you get the ligatures to work with vim? I've been trying to wrangle PragmataPro and gvim for a while but haven't managed yet.
haldean··on VS Code uses 13% CPU when idle due to blinking cursor rendering
The SO survey (while super interesting!) conflates "most used" with "most asked about on Stack Overflow"; I'm skeptical of anyone who claims to know which programming language is the most popular. The TIOBE index, which has its own problems, has Javascript coming in 8th, with the top 4 being Java, C, C++ and C#; my experiences and my confirmation bias suggest that's more accurate.

https://www.tiobe.com/tiobe-index/

haldean··on Lbry.io – decentralized digital library
Your attempt to respond sincerely was to say you don't have any women on staff because you don't have any executive assistants or office managers, which even a generous reader would call a sexist reason:

https://mobile.twitter.com/LBRYio/status/844194654656626688

haldean··on GitLab acquires Gitter, will open-source the code
It's up now at http://blog.gitter.im/2017/03/15/gitter-gitlab-acquisition/
haldean··on Chromium: Add support for Animated PNG
Why would Google implement something in their own browser to make their own image format look worse?
haldean··on The Uber Bombshell About to Drop
If you send your kernel logs to a syslog server you could get that pretty easily. From plugging a USB stick into my computer just now, then running dmesg:

    [14863.014481] usb-storage 2-4:1.0: USB Mass Storage device detected
    ...
    [15045.488440] usb 2-4: USB disconnect, device number 34
They do, though, have quite a bit of pretty impressive logging!
haldean··on When the memory allocator works against you
No, all of the child's memory mappings are shared with its parent. Upon write, though, that becomes a new committed mapping; I believe the entire page is copied, so you could end up committing another 4k with a one-byte write from the child.
haldean··on Abstract Algebra (2016) [pdf]
For those who prefer dead trees, the hardcover is miraculously inexpensive: https://www.amazon.com/Abstract-Algebra-Applications-Thomas-...
haldean··on Unplanned Freefall? Some Survival Tips
It was only occasional free-fall, but William Rankin's story of ejecting at the top of a giant thunderstorm is still one of the craziest "fall out of the sky" stories I've ever heard: https://www.damninteresting.com/rider-on-the-storm/
haldean··on Google and Apple have different innovation signatures
This is exactly right, and the X was 4 in 2014. Not sure if it's changed since I left.
haldean··on Ask HN: Freelancer? Seeking freelancer? (March 2017)
SEEKING WORK - Bay Area, Remote

I can solve your scientific computing and 3D visualization problems! I've worked with companies from 10 to 10,000 people in manufacturing, robotics, consumer electronics, and software infrastructure. Past projects include a fully-automatic CNC milling system, an aerial robotics path planner, and a smartwatch OS used by hundreds of thousands of users. More info at http://haldean.org/cv/

Let's talk! me@haldean.org, 320 584 9293

haldean··on A curated list of Terminal frameworks, plugins and resources
I went through so many terminal emulators on Windows, looking for one that could handle SSHing to a Linux box and running tmux/vim/irssi inside the session; MobaXterm was the only one I could find that could handle it. It's a shame it isn't free software, but I can't find any free software on Windows that does curses GUIs correctly.
haldean··on Someone Created a Startup Just like Mine and Here Is Why That Is Awesome
> We may release personal information when we believe in good faith that release is necessary to comply with a law; to enforce or apply our Terms of Use and other policies; or to protect the rights, property, or safety of Nugget, our employees, our users, or others.

@jv22222: in your opinion, does this blog post fall under any of these categories? And if not, why bother having a privacy policy at all?

haldean··on Postmortem of database outage of January 31
Potential outage prevention plan: put an alias on all production machines that emails HR to schedule a disciplinary meeting every time you run `rm -rf`.
haldean··on Regex: badly needs fuzzing
I think s/he meant to say O(nm) vs O(m), n being the number of branches in the regex and m being the length of the input.
haldean··on Silicon Valley’s Technolibertarian Dream Was Invented By Timothy Leary
BSD is one of the first Unices (probably second only to AT&T UNIX), so both would be correct, although "LSD and BSD" might make for a punchier joke :)
haldean··on Why Don't We Have a General-Purpose Tree Editor? (2014)
Interestingly, visual programming and tree-editing has actually gained a lot of traction with non-programmers. Tons of the big video and audio production suites (off the top of my head: Houdini, Max MSP, Grasshopper, Nuke, Blender's node editor) are DAG-based authoring tools, and are a joy to use.

As a person interested in programming language design, that makes me wonder if visual programming might be the sort of thing that we as programmers don't use because it is, in some sense, "beneath us". You can argue that the complexity of a standard Max patch is much lower than your production system, but many production systems are "render database to JSON", which seems far less complex than, say, a feature film, many of which are made almost entirely in Houdini.

haldean··on Gita – autonomous lightweight delivery system
This comment is disturbingly inhumane.
← PreviousPage 4 of 11Next →