HNHacker News
TopNewBestAskShowJobs

grose

1,642 karma · joined June 13, 2012

backend dev @ tokyo github.com/guregu

email greg at toki.waseda.jp

submissionscomments
grose··on AOL pretends to be the internet
Remember AOL keywords? They basically had their own private DNS alternative. Every commercial on TV for a website would say "AOL keyword <xyz>!" instead of the actual URL. I guess it was a lot less scary for your average internet user to type in "nick" instead of "http://www.nick.com". I feel like we still kind of have the "URLs are hard" problem. I've noticed a lot of ads in Japan tell the users to search (presumably Google) for a specific phrase, and buying the adwords for that is more or less the modern equivalent of paying for an AOL keyword. Search was really rough back then (although it's gone full circle into shit again I feel), and the URL bar UX wasn't quite figured out yet. Will users be able to adapt to wacky new TLDs or will we be stuck with .com forever because it's recognizable as a domain name? Do people still type "www."? Is the app store the modern equivalent of AOL channels? Sometimes I wonder if we're stuck in an infinite cycle of reinventing AOL.
grose··on Print(“lol”) doubled the speed of my Go function
Seems like the answer is no[1] and profile-guided optimization is recommended instead, https://go.dev/doc/pgo. I would be curious to see if pgo helps with the author's use case.

[1] https://groups.google.com/g/golang-nuts/c/1erdKe3aV5k

grose··on Structured logging with slog
That’s a good point. I think it would be random without some sorting shenanigans.
grose··on Structured logging with slog
It’s not without precedence, for example: https://pkg.go.dev/strings#NewReplacer

I don’t mind it. You can use LogAttrs if you want to be explicit.

Although I do wonder if there’s anything tricky with the type system that is preventing something like this from being supported: https://go.dev/play/p/_YV7sYdnZ5V

grose··on Htmx is part of the GitHub Accelerator
Just wanted to say thank you for what you do. I've long been a fan of HATEOAS and I'm very happy that there's finally a movement towards it and ecosystem growing. Also, the memes are unparalleled.
grose··on Stripe is no longer a suitable payment processor
This happened to me too, so I complained on HN and a friendly Stripe employee fixed my account. Since then it's been fine, luckily. See: https://news.ycombinator.com/item?id=36403607
grose··on Using Prolog in Windows NT Network Configuration (1996)
I think a compelling use case is flexibly defining rules. Biscuit’s Datalog tutorial does a good job of illustrating how you can go from simple auth to RBAC with just a few lines of code. https://www.clever-cloud.com/blog/engineering/2021/04/15/bis...

For your particular example, using DCGs like:

    file(X), phrase(("cat", ..., ".jpg"), X).
Is a bit clearer. You can use DCGs to do all kinds of parsing and generating (and in this case, testing). But they aren’t going to be as fast as a highly optimized regex engine.
grose··on Using Prolog in Windows NT Network Configuration (1996)
I agree. The longer I've been a programmer, the more Greenspun's tenth rule rings true. It's sad that in the modern day, ad-hoc YAML template programming is more widespread than e.g. embedded Lisps. Feels like the concept of "code as data" is severely underrepresented in the programming zeitgeist.

I've been thinking a lot about how to make Prolog (and niche languages in general) more palatable. Killer app, like Ruby:Rails? Corporate backing, like Go:Google? Strong IDE integration, like Typescript:VSCode? Cute mascot? Meme power (HTMX:Grug)? Seems like all of these can help but none are a guarantee. So I figure that starting with IDE support is a decent approach. At the very least it's something I would use myself.

The Reddit example you brought up is very interesting. I feel like niche languages can be a kind of advantage in attracting strong talent despite the small talent pool, but then you have companies that mistake headcount as growth and optimize their tech stack for hireability, picking the popular choices instead.

One decent argument against niche languages is libraries. I have some vague hopes that Wasm Components will be a huge boon for niche languages once it stabilizes and libraries and cloud services start providing their APIs in component form. Of course, we already have near-universal FFI with the C ABI but that is messy enough that most people are unwilling to work with it.

Enjoyed the rant! Here's my own :). I understand there are valid business reasons not to pick a niche language ("we need to hire 10 people NOW and use XYZ library! no time to write our own!") but it's a bit soul-crushing. Working on Prolog stuff is my way of coping.

grose··on Using Prolog in Windows NT Network Configuration (1996)
I think Prolog really shines as an embedded query engine (I know this is old and it's been removed since). It's perfect for declarative configuration, very easy to write powerful queries once you wrap your head around it.

The Yarn constraints plugin also used (Tau) Prolog, although it looks like it's in the process of being replaced with JS, which makes me a bit sad. The reasoning is here: https://github.com/yarnpkg/berry/issues/1276. Seems like the biggest issue is lack of a nice dev environment. I maintain the Trealla Prolog Wasm port (npm package 'trealla') and I hope some day to use it for a VSCode extension or LSP or something to provide a nice dev experience. Tau's performance has also been cited as an issue[1] but Trealla is quite fast and I expect it could easily handle a complex Yarn workspace with tons of facts. If this sounds like something you'd be interested in helping me with, feel free to contact me or make an issue/discussion here: https://github.com/guregu/trealla-js

[1]: https://github.com/yarnpkg/berry/issues/4079#issuecomment-10...

grose··on Nanosecond timestamp collisions are common
This is why it scares me a bit to use a raw timestamp as a sort key in DynamoDB. I append a (random) unique ID to the timestamp text to avoid it. Better safe than sorry, I figure.
grose··on Netscape and Sun announce JavaScript (1995)
I remember extremely old advice to use java.util.Date from JS, thought I was going crazy but this article from 1996 mentions it: https://www.infoworld.com/article/2077267/new-javascript-fea...
grose··on Minify and Gzip (2022)
For my "fun" projects I never minify the CSS or JS because I miss the days when you could View Source on a website and easily dig into how it works. If you're a NoScript user, go ahead and read the source and decide for yourself if you want to allow it. Much easier to maintain without all the moving parts of the JS build ecosystem as well.
grose··on A Japanese factory that designs clothes on a 40-year-old computer [video]
Way easier to record compared to vinyl and its “poor” sound quality is a feature not a bug for lofi/aesthetic artists
grose··on The 90s Developer Starter Pack
90s webdev starter pack:

- WS_FTP LE

- notepad

- htmlgoodies.com https://web.archive.org/web/19991008040849/http://www.htmlgo...

grose··on Ask HN: Who wants to be hired? (July 2023)
Location: Tokyo, Japan

Remote: Yes

Willing to relocate: Probably not, but I will work weird times

Technologies: Wasm/WASI, Go, Prolog, C, Rust, TypeScript

Résumé/CV: https://github.com/guregu

Email: greg@toki.waseda.jp

I am looking for WebAssembly related jobs. My ideal position would be working on language runtimes such as porting languages to WASI, or creating libraries for various languages that integrate a Wasm-based core. I am also interested in anything related to Prolog.

I have experience porting languages to Wasm and creating libraries that use embedded Wasm including deep browser support (see GitHub). Are you a Rust company but nobody wants to maintain the ugly C glue code or Go library? I will gladly be "the C guy" who takes care of that.

grose··on Google has a secret browser hidden inside the settings
Can you imagine if kids actually started using this? mm.closeView() to instantly boot any pesky children off of your website, the ultimate age gate :)
grose··on Gergely Orosz: on the risk of Google shutting down Google Cloud Platform
Yep, the RubyGems v1 API deprecation broke my ancient OpsWorks config and I guess they decided to just give up on supporting it.
grose··on Tell HN: Stripe killed my music locker service, so I'm open sourcing it
I just added a 50GB plan for $1.50/month. Check it out and let me know if anything is messed up.
grose··on Tell HN: Stripe killed my music locker service, so I'm open sourcing it
Honestly good question. Mostly I do it to discourage abuse. I configured the infrastructure so that it should always break even if people fully utilize their storage. But this project would probably be more suited to use something like Patreon (assuming it's OK with their ToS!). I'm open to alternative ideas for sure.
grose··on Tell HN: Stripe killed my music locker service, so I'm open sourcing it
UPDATE 2: My Stripe account is back! Thank you so much! inter.tube will remain online, but open source from now on!

Update: I have reached out to the nice Stripe employee who volunteered their email, let's see what happens.

It's been pointed out a few times that my marketing says the site won't die, and me killing it would be very ironic. This is 100% true, and I have decided to leave the site up even if Stripe decides to ultimately close my account. Luckily, our infrastructure costs are very low (<$5 month currently).

I created this site when Google Play Music went down and lots of people were complaining about Google killing yet another product. I don't want to do the same thing to my users.

Finally, I would like to take this opportunity to plug a similar service that I am completely unrelated to. I saw its author post on HN and they seem like they are also a one-man-shop: https://asti.ga This service is different in that it lets you hook it up to your own cloud storage. I am only now realizing why this is such a brilliant idea.

grose··on Tell HN: Stripe killed my music locker service, so I'm open sourcing it
You're right :). Let's say inter.tube is not dead after all. I'll leave it up and try and figure something out. I'm willing to eat the charges while we figure it out (it's also very cheap to run -- I prioritized cheapness in the design).
grose··on Tell HN: Stripe killed my music locker service, so I'm open sourcing it
Thanks, I agree... it was never intended to be a "real company", which was ultimately to my detriment. The irony of killing it hurts, so I'll probably just leave it up for the existing users, and (hopefully) find some other payment processor. It only costs me a few dollars per month to host it, so I am not super worried about the money, but it's a huge motivation killer to be ousted from Stripe. I was happy with keeping it "indie and scrappy" and only friends using it, and I went through a lot of pains to make it so the architecture was always break-even, but I never expected my payment processor to bail on me.
grose··on Tell HN: Stripe killed my music locker service, so I'm open sourcing it
Appreciate the inside perspective.
grose··on Tell HN: Stripe killed my music locker service, so I'm open sourcing it
Thank you for the suggestion. I'll check it out.
grose··on Tell HN: Stripe killed my music locker service, so I'm open sourcing it
I don't. My MRR is $5 currently, peaked at around $40. I'm far too small for Stripe to care about me. I was running this as a passion project. I'm not sure how to even get an account manager (does it just happen if you become big enough to matter?)
grose··on Tell HN: Stripe killed my music locker service, so I'm open sourcing it
Good question. I'm open to it, but this project is already not very successful (see my comments in an old thread here: https://news.ycombinator.com/item?id=35461596). I think I'm just a bit burnt out on it. Perhaps open-sourcing it will reinvigorate the project a bit. Ultimately I made it to scratch my own itch and I'm happy with what it is now, so at the very least I can use it for my own needs.

I would be happy to hear any advice for better payment processors, of course.

grose··on Tell HN: Stripe killed my music locker service, so I'm open sourcing it
It's a shame that we have to complain on social media to get an actual human response to this kind of thing. If Stripe decides to reverse their decision, I'll leave it up, but it will remain open source.
grose··on Tell HN: Stripe killed my music locker service, so I'm open sourcing it
I haven't tried any others (yet). I would be open to suggestions. Currently I only have 3 paying users and I will probably just throw in the towel. I will leave the files online for a long time and let everyone know so they have ample time to migrate elsewhere.
grose··on TypeScript 5.2's new keyword: 'Using'
I've only had one scenario where I actually needed something like this (and I don't know if the `using` proposal helps). I have a library (Prolog interpreter) that uses a Wasm module originally written in C, so I have to manage the memory manually. If users iterate through or close a query (e.g. with `for await`) it's fine and cleans itself up. But, it's possible to to create an AsyncGenerator, never call .return() on it (which won't run the `finally` block), and have that reference garbage collected. I used a finalizer on a local variable in the async generator to work around this :)
grose··on Update: U+237C ⍼ &Angzarr;
In a similar vein, there are kanji (Chinese characters) with unknown origins called "ghost kanji". https://en.wikipedia.org/wiki/JIS_X_0208#Kanji_from_unknown_...
← PreviousPage 3 of 8Next →