HNHacker News
TopNewBestAskShowJobs

rphln

69 karma · joined August 26, 2020

submissionscomments
rphln··on Flame Graphs vs Tree Maps vs Sunburst (2017)
Flamegraphs are a really lovely tool for visualizing trees. Slightly related anecdote:

A while ago I was experimenting with interactive exploration of (huge) Monte Carlo Tree Search trees. Inspired by file system visualization tools, my first attempts were also tree maps and sunburst graphs, but I ran into the same problems as in the article.

I tried flamegraphs next with the following setup:

- The number of visits in each node maps to the width and order of each bar (i.e., the most visited node was first and was the largest)

- The expected value maps to the color of each bar.

And then it was a perfect fit: it's easy to see what's going on in each branch at the first levels, and the deeper levels can be explored through drilling down.

rphln··on Working with the UK Government to Protect Children Online
The app asks you to move the camera or change your expression throughout the verification.

I'm not familiar with how it works on the implementation side. A ML conference that I attended had a presenter working on this area and beating AI impersonation was their #1 priority (along with other trivial approaches).

For what it's worth, this might also be just a security theater from the banks, though.

rphln··on Working with the UK Government to Protect Children Online
Can't speak about this one in particular, but the face scans for banking that I know of also includes liveness checks to avoid AI impersonation (and presumably dead bodies).
rphln··on Math Symbol Frequencies
Mixing them should be relatively common when denoting intervals, as in "(a, b]" or "[a, b)", so that'd be one cause for being unbalanced. But even so, the math on their usage still doesn't add up.
rphln··on Hexagon Spiral Coordinates
This apparently fits the bill: https://patricksurry.github.io/posts/flowsnake/. Amit's post led me to search about recursive coordinates for hexes again and I came across it in a StackExchange comment.
rphln··on Fun facts about SQLite
> with the S and Q in Portuguese

Guilty as charged. Pronouncing letters and numbers in English requires an active mental effort for me, so that happens if I'm not paying attention. I guess it's because they don't really register as another language, even with context. My inner monologue also does letters and numbers in Portuguese, which doesn't help either.

rphln··on Show HN: I made an ls alternative for my personal use
There's already `ls --hyperlink` for clickable results, but that depends on your terminal supporting the URL escape sequence.
rphln··on A dictionary of single-letter variable names
Would've been perfect had you said jndex.
rphln··on Godotcaml for Godot 4.2
Bummer, I had no idea about that. But I guess that, at least for turn-based games, it wouldn't be super annoying if you manage to split the logic (F#) from the UI glue (C#), right?

(I never got around to that point though, I usually start making games as libraries and then get nerd sniped into reading about game theory for the AI before I make them playable for humans.)

rphln··on Godotcaml for Godot 4.2
I think it'd be interesting to compare against F#, especially since Godot already has first-class support for .NET. When the bindings get fully fleshed out, what will OCaml bring to the table to warrant the extra hoops for the user that has no prior preferences for either languages?
rphln··on The Reasonable Effectiveness of the Multiplicative Weights Update Algorithm
Previous discussion: https://news.ycombinator.com/item?id=13857116

Love it, thanks for posting.

Reading through, this method sounds a lot like Thompson sampling, and surely enough, the previous thread came up after a quick search for comparisons.

Sadly, no immediate empirical results came up, but having another tool in the belt is good on its own.

rphln··on A step beyond Rust's pattern matching
Often I wish that:

    enum Auth { Guest, User(u32), Bot(u32) }
was just syntactic sugar for

    struct Auth::Guest;
    struct Auth::User(u32);
    struct Auth::Bot(u32);

    type Auth = Auth::Guest | Auth::User | Auth::Bot;
where `|` denotes an anonymous union. Using enums feel very clunky when you start needing to work with subsets of them.
rphln··on :syntax off (2016)
There's also the Alabaster variants [1], which includes a dark theme.

I really like Alabaster BG, but sadly VS Code lacks support to implement it.

[1]: https://github.com/tonsky/sublime-scheme-alabaster

rphln··on Monte-Carlo graph search from first principles
Somehow the paper they mention completely flew under my radar when I was researching MCTS. Surely it's gonna be a lot of fun to give this modification a spin on my next opportunity.
rphln··on Build your own 3D printed Hexapod
Building and (most importantly) programming one of those was a pipe dream back when I used to browse Let's Make Robots a bunch of years ago.

Sadly nowadays I just can't get into these projects that'd need me to spend money and would just sit on a drawer until the ends of the time after completed.

rphln··on Introduction to Thompson Sampling: The Bernoulli Bandit (2017)
My favorite resource on Thompson Sampling is <https://everyday-data-science.tigyog.app/a-b-testing>.

After learning about it, I went on to replace the UCT formula in MCTS with it and the results were... not much better, actually. But it made me understand both a little better.

rphln··on It's 2023 – why is it still so annoying to respec in singleplayer RPGs?
Ultimately, what kinds of incentives does having no respecs leads to?

I don't think I've ever really cared about immersion. I like experimenting with stuff. In a long game, having no option to undo whatever I cook up means I'd either a) have to suffer for the rest of the playthrough, b) avoid the janky stuff, or c) end up looking for build spoilers. None of which are particularly fun. Bonus points if the game doesn't really have a lot of replay value in the first place.

(That being said, the only games that I played and truly felt miserable in this regard were MMOs.)

If the game wants to be punishing, give it hard bosses that force me to learn how to play better regardless of my build.

(Though, as mentioned downthread, if it's a short game, no problems. The game is probably designed to be played multiple times anyway.)

rphln··on Facebook must pay $100.000 to Norway each day for violating our right to privacy
How about U+202F NARROW NO-BREAK SPACE?

1 000 (Narrow nbsp)

1 000 (Regular nbsp)

(Assuming HN even allows it.)

rphln··on Ask HN: Whatever happened to the “coming wave” of delivery drones?
That is actually a problem under research; there are a few papers on it and luckily they use the obvious name — TSP with drones or TSP-D.

I gave that problem a very shallow go for a Metaheuristics assignment, and while I didn't really mess with the domain specific heuristics for it, it did seem pretty fun indeed.

rphln··on Why does zsh start so slowly?
I recently had the same problem with Conda's and Pandoc's initializations in Bash.

At first I did the same as the author and just dumped the output from `pandoc --bash-completion` et al. into a file, but then I'd have to deal with cache invalidation on every machine that I use. Doing it manually isn't that bad, but remembering to update the file in a bunch of machines is a bit too much ugly for me.

After a surprisingly short Google session, I ended up settling with lazy initialization [1]. Unlike the post I found, I did it all manually, though. Now I just have this tucked at the end of my `.bashrc`:

    function conda {
        unset -f conda

        # shellcheck disable=SC1090
        source <(conda shell.bash hook)
        conda "${@}"
    }

    function _pandoc {
        unset -f _pandoc

        # shellcheck disable=SC1090
        source <(pandoc --bash-completion)
        _pandoc "${@}"
    }

    complete -F _pandoc pandoc
[1]: https://dev.to/zanehannanau/bash-lazy-completion-evaluation-...
rphln··on Event Sourcing (2005)
I'm experimenting with this for client-server design in game development, to ensure that the clients are in sync with the server: since the only way to change the game state is through events, I (as a developer) am unable to forget to implement some notification for something that happens. This also gets me match replays as an extra.

I came across the Update Monad [1] while researching how to use Event Sourcing in functional languages: it basically has the same guarantees of only changing the state through recorded events. Beware though, as it can be quite slow if implemented naively.

[1]: https://chrispenner.ca/posts/update-monad

rphln··on Event Sourcing (2005)
Isn't it the other way around? If you have an “AB” event, it's fairly trivial to go through the log and split it into “A then B”. If you have “A then C then B” for whatever reason and then realize that you need to aggregate “A” and “B”, that is much harder.
rphln··on Are dynamic languages going to replace static languages? (2003)
I don't know whether to feel disgusted or fascinated by this. I find the concept of prototype-based inheritance quite elegant, but this is a bit too much insane.
rphln··on Impersonating the brave.com website to deliver malware
It is probably already too late to put this in practice, as it is a breaking change, but...

Wouldn't applying Unicode normalization on domains solve this issue? For example, if a site attempts to send me to “ápple.com”, my user-agent would send me to the correct domain. Domains in Japanese, for example, would still work just fine.

Ideally, this would be handled at the DNS spec level (“no two domains shall map to the same normalized form”), but that would be even more “too late” to change.

rphln··on macOS Nix setup: an alternative to Homebrew (2020)
Out of curiosity, have you experimented with accessing the VM through SSH? If so, what was it like?

I could see myself using a similar setup down the line, but having two graphical environments seems like it'd be somewhat distracting or fussy.

rphln··on Only Windows 11 Pro will let you install Windows 11 with a local account
I also installed Pro some weeks ago using the May 2021 ISO and didn't have to use a Microsoft account despite being online. I don't remember having to sidestep any dark patterns either, though maybe I've just become desensitized to them.

edit: Specify that I was online while installing.

rphln··on Discord exploring sale that could be worth more than $10B
As someone with no experience whatsoever on economics (i.e., I might not be seeing something critical), I think Amazon is not that weird as a potential buyer: they already own Twitch, and there's probably a huge overlap between the two userbases. They'd have a pretty strong hold on two distinct parts of the gaming community.

(Edit: clarification)

rphln··on What's New in SQLite 3.35
It's a shell command that allows you to `cd` to places without having to type the whole path. Some implementations are https://github.com/wting/autojump and https://github.com/rupa/z.

A very simplified example: if you call `j pro`, the command should take you to the folder that best matches the name based on some criteria (in my case, one of them would be frecency). In my case, that would be my projects folder in another drive.

The nifty thing about them is that you don't have to make those aliases manually -- the tool learns the directories you've visited over time.

Of course, the tool could take you to the wrong path, but with a well made set of matching/prioritization rules, I've found it more useful than not.

rphln··on What's New in SQLite 3.35
This is pretty neat. Now that they added `exp`, I'm tempted to implement an autojumper using [frecency] in SQL. I tried it once before, but gave up specifically because of this IIRC.

[frecency]: https://wiki.mozilla.org/User:Jesse/NewFrecency?title=User:J...

rphln··on RFC 1178: Choosing a name for your computer (1990)
The naming scheme I settled on for my devices was using ship names from World War 2.

- Device size and computing power maps roughly to the ship size: my desktop is named after a battleship, while my Kindle is named after a destroyer.

- Servers are always named after carriers. It just made sense to me somehow.

- Like the warships, the names can eventually get reused as the devices are replaced.

Page 1 of 2Next →