HackerTrans
TopNewTrendsCommentsPastAskShowJobs

epidemian

no profile record

comments

epidemian
·5 bulan yang lalu·discuss
Do you think an LLM would be able to generate a solution to a novel problem just like that?

That doesn't match my (albeit limited) experience with these things. They are pretty good at other things, but generally squarely in the real of "already done" things.
epidemian
·7 bulan yang lalu·discuss
Five years ago, we could've read this same comment but with "LLMs" replaced with "blockchain" or "crypto".

Yes, it might totally be the case that in 5 years this comment reads as correctly predicting the future that is to come. But it's also possible that it doesn't.

It's not at all clear to me which things will persist in time at the moment they are getting popular. There are lots of technologies that look promising in the beginning and up fizzling out.

Browsers are useful now, and they have been useful for a while. It seems to me like a safer bet to invest on them still doing what they are useful at, in the case that the web keeps being a thing for a while still :)
epidemian
·8 bulan yang lalu·discuss
oh, 100% yes! The job project i joined somewhat recently is a moderately-complex React web app, and none of the navigation elements are actual links. Everything is done by onClick handling, even thought many things are, conceptually, just links. I have no idea why this kind of thing is so widespread on the web front-end world.
epidemian
·9 bulan yang lalu·discuss
> You need to kneel to the borrow-checker and develop something like a Stockholm syndrome before you find the language delicious.

That was not my experience at all. I liked the language from the get-go. And the more i dug into it, the more i found to like. I really appreciated the design of Rust's iterators, and traits, and general language design, way before i stumbled into any major issues with the borrow checker.

I feel like this depends very much on the programming style and probably on the domain. But i found that programming in a mostly "functions and simple data structures" way, passing things down to other functions that need them, and just processing data instead of "modeling the domain" into mutable and confusing "objects", i didn't really come across many lifetime-related issues that the borrow checker warns about.

And the few that i did found, they were actually errors on my part, and Rust detecting them was quite helpful. Things like trying to mutate a collection while also iterating it.

So, IDK, YMMV i guess.
epidemian
·10 bulan yang lalu·discuss
> What inspired you to build this, I'd love to hear the story behind this.

Actually, i don't remember! Sorry, it's been a while (a decade, it seems... oh well)

This is probably my mind retro-creating a story, but i think this started with me wondering about how the Braille system worked. Like, did each Braille symbol map to a single letter, or to a whole syllable, or even a concept? Or, were more than one Braille symbol needed for some letters, like Morse?

Turns out each Braille symbol fits within a 2x4 grid of points. That's 2 possible states (point is on or off) for each of those 8 points. So 2^8 = 256 possible values. That's a byte! And luckily, Unicode encodes all those 256 possible values, and maps them to codepoints in a very systematic way.

So obviously, i started to wonder what kind of things could be represented on these Braille grids. The snake game was a natural fit, and a fun programming experience. But i also considered other things, like a horizontal Tetris. Or a Game of Life rendered on the URL, which i actually implemented(1), but i didn't find as entertaining as snake, because the 4-tile height restriction impeded any interesting patterns, like gliders (even with wrap-around logic). I think i even made some brute-force searching for horizontal or diagonal gliders trying out different born/survive rules(2), but couldn't find any interesting patterns, other than still life, blinkers, and some "moving walls" kind of things.

Anyways, that's for the Braille part. The idea of using the address bar to render the game, i have no idea where that came from TBH. Maybe i stole the idea from some other animated or pretty thing on URLs? I wish i remembered.

(1): https://github.com/epidemian/URLife

(2): See https://en.wikipedia.org/wiki/Life-like_cellular_automaton. The Game of Life rabbit hole goes deep.
epidemian
·10 bulan yang lalu·discuss
Thanks, that's one of the best compliments i've read :D
epidemian
·10 bulan yang lalu·discuss
Yeah, sorry for that. The game actually used to work decently well on mobile browsers.

If you're brave enough to try on a mobile device, there's a way to see the current URL without escaping on the page: clicking on that "?". The mobile controls are clunky, but you'll be rewarded with the ability to share your highscores with friends! :P
epidemian
·10 bulan yang lalu·discuss
The source code is not minified or anything, ctrl+u is your friend :)

IDK about the AI claim tho. The game has been there for like 10 years, so it's probably in the training data of these things. The bots might be able to replicate it, but they surely won't be able to enjoy it! (for now at least)
epidemian
·10 bulan yang lalu·discuss
I've actually thought about rendering DOOM on the favicon. I don't see why it shouldn't be possible. Maybe @Franciscouzo could tackle that challenge! https://news.ycombinator.com/item?id=45408825
epidemian
·10 bulan yang lalu·discuss
This is how it used to look in olden days, before browsers plundered our fun in the name of security: https://raw.githubusercontent.com/epidemian/snake/refs/heads...
epidemian
·10 bulan yang lalu·discuss
Yes, i thought of doing that. The problem is that, while it would definitely help on the early game, it would also mess things badly on the late game. As you snake grows, it'll take more and more space on the grid, and you'll start seeing more and more janky whitespace-replacement characters.

The game gets faster as you progress, so it's definitely not a good idea to make it jankyer when you're try-harding it :P

I'd love to know of a way of "fixing" this jankyness issue properly. Without admitting defeat and rendering to some other text-admitting output, like the page <title>, as this oher snake game that was recently posted on Reddit does: https://old.reddit.com/r/webdev/comments/1n9z77e/snake_in_th...

But, for now, if you're actually trying to get a high score, i think the best approach is rendering the URL on page, by clicking on the "?"
epidemian
·10 bulan yang lalu·discuss
Oh, this is lovely. The more retina, the less playable it gets :D

Update: amazing game-over effect!
epidemian
·10 bulan yang lalu·discuss
Wow! It's such a surprise to see this old project of mine here on HN front page!

I must say, if you're experiencing any issues playing this, it's probably because it was designed to be played on the browsers of 10 years ago hehe. Here's how the game used to look and play in its former days of glory: https://github.com/epidemian/snake/blob/master/gameplay.gif?...

Since then, browsers have made some so-called "security" "improvements" that heavily hindered the capabilities of addressbar-based videogames. You can see traces of this on the game source code, and on the commit history.

At some point, pushing things to `history.replaceState()` got super rate-limited on Chrome, to something like tens of updates per minute IIRC, which totally wrecked the playing experience. I think i got around this by falling back to using `location.hash` directly. I think Chrome later rose this throttling to something more sensible. IDK if enough to play Crysis at 60fps on the addressbar, but enough for a snake game. And if not, sorry for messing up your Back button!

The worst of these security-excused changes was Firefox and Chrome starting to escape all whitespace characters (and others) on URLs. The game uses Braille characters to "render" its grid world, and blank Braille characters are abundant, especially on the early game. I think i made some comments on the browsers' issue trackers, and even received some sympathy from the developers (or maybe this was on the throttling of history, i don't remember). But of course, and as usual, "security" trumps over fun.

I ended up trying to counteract this URL escaping mechanisms with some horrible, really really horrible, indefensible, shameful, canvas-based font-measuring hack to replace blank Braille characters with some other character that doesn't get escaped and is more or less the same width, and as blank as possible. See https://github.com/epidemian/snake/blob/e9d5591a613afabc7e11.... If you have any idea of how to do this in a less soul-damning way, please let me know!

I think the game never worked properly on Safari. I know the browser used to hide the URL fragment, or maybe everything other than the domain name. I've no idea what it does now; does it even allow users to visit random webpages or does it mandate a separate app for everything? /s

In case my pile of hacks fails thoroughly, i resignedly added a way of showing the intended URL on the actual page content, by clicking on the "?"

Anyways, i should probably write a blog post about this little silly thing. Thanks for playing! :)
epidemian
·2 tahun yang lalu·discuss
I don't see the causal dependency between these things. Could a probe to Europa be sent while still having housing problems in some countries? And could it be sent after having those housing problems addressed? I think the answer to both of those questions is yes. And conversely, can the housing problems be addressed while sending a probe to Europa? And can they be addressed while not sending a probe? Again, i think the answers are both affirmative.

These things don't seem to depend on each other. And different people want to do different things in this world. I don't think that the people who want to help shelter homeless people would be deterred by other people wanting to send a space probe, or vice-versa.

I picked housing from the problems you mentioned just because it was the first one. I think this argument would still apply for the others. The reasons we're having those problems have nothing to do with how many probes we send to space.