HNHacker News
TopNewBestAskShowJobs

croshan

383 karma · joined November 25, 2017

blog.cyrusroshan.com
submissionscomments
croshan··on RIP software hackathons. Long live the hardware hackathon
Nearly all my hackathon projects were hardware, back in college.

A couple examples (both from HackPrinceton, which had the best EE labs):

* https://blog.cyrusroshan.com/post/electronic-banjo (crowd favorite)

* https://blog.cyrusroshan.com/post/spin-to-win (a "moonshot" idea)

There's something nice about holding your work in your hands. Tangible work is also both easy to explain, and hard to fake. So going the hardware route felt fun, fulfilling, and scored well.

Good times.

croshan··on Take this on-call rotation and shove it
This works if you're on call for your systems. In many situations (ranging from small startups to big tech), you're also on-call for the systems of sister teams.

Not that there aren't other ways to fix that. But fixing the erroring service isn't practical in all cases.

croshan··on Malware found on NPM infecting local package with reverse shell
It's quite easy, actually. We did this at work, recently.

Bun is two things. Most commonly, it's known for its Node-competitor runtime, which is of course a very invasive change. But it can also be used purely as a package manager, with Node as your runtime: https://bun.sh/docs/cli/install

As a package manager, it's much more efficient, and I would recommend switching over. Haven't used pnpm, though--we came from yarn (v2, and I've used v1 in past).

We still use Node for our runtime, but package install time has dropped significantly.

This is especially felt when switching branches on dev machines where one package in the workspace has changed, causing yarn to retry all packages (even though yarn.lock exists), where bun only downloads the new package.

croshan··on Proof of location for online polls
A bit aggressive. No, wouldn't connecting to a slow 3g tower affect ping times to all global servers proportionately?

The proposal has other flaws, but phone to tower latency isn't one.

croshan··on YC is wrong about LLMs for chip design
An interpretation that makes sense to me: humans are non-deterministic black boxes already at the core of complex systems. So in that sense, replacing a human with AI is not unreasonable.

I’d disagree, though: humans are still easier to predict and understand (and trust) than AI, typically.

croshan··on Apple acquires Pixelmator
In general, the way a walled garden wins is by providing everything its villagers need inside.

And Apple’s products seem to create walled gardens in order to prioritize [first creative, then economic] control.

Based on the demographic that a significant portion of their marketing seems targeted towards (artists and creative types), I think your theory sounds likely.

croshan··on Tell HN: Burnout is bad to your brain, take care
This sounds depressing. I’m sorry that you had that experience.

It’s a frustrating position to be in, and you can feel quite helpless.

In my experience, it’s less about “do only what’s asked”, and rather “say no”.

I.e. explain “I can do X, but if I do that then Y will suffer, and Y is a priority”. (Y being another company priority, or even your own mental health). Stated in these terms, it’s easier to negotiate your time with your coworkers.

croshan··on Show HN: Monogo – Evolve your go workspace to a real monorepo
Go bootstraps itself (Go is compiled by Go) but Gofmt does not format itself (an even simpler job).
croshan··on Please do not attempt to simplify this code
Nice find. I think you're right.

FWIW, I don't think the code style in [2] is less simple (slightly more readable, to use `if (X) {} else {}` rather than `if (!X) {} else {}`, for example).

So to me, this reads as the author of [1] is just overcorrecting by adding process, when some test cases or code review would've been more helpful in preventing whatever incident [2] caused.

croshan··on Show HN: A web debugger an ex-Cloudflare team has been working on for 4 years
Stay tuned! We’re building this out soon. :)
croshan··on Proof-of-Work Defense for Onion Services
real users have more CPU than a literal toaster (or smart air fryer, or IP camera, or many other common botnet devices)
croshan··on Dementia risk linked to blood-protein imbalance in middle age
Exactly. I know if medication were to be developed, checking "are GDF15 levels significantly lowered" would be part of the trials.

But how often does the medication development process check the result we care about: "does this medication then go on to reduce the chance of dementia?"

croshan··on If PEP 703 is accepted, Meta can commit three engineer-years to no-GIL CPython
Posting a Wikipedia link without commentary or context is essentially a text meme. It doesn’t invite discussion.

What are you trying to say?

(Not that I disagree with your point, but it’s unclear.)

croshan··on Where in the USA is this?
You’re both right—a better world emerges, when we each look towards ourselves to solve the problems we see.
croshan··on CSS-Only Chat
Using JavaScript is also “basically free”.

There’s no problem with either listed approach, GP just seems to consider a method without page reloads as adhering to a harder constraint.

croshan··on False 911 Calls Increase During Festival as iOS Mistakes Dancing for Car Crashes
> How would you alternatively design a system that calls emergency services in a crash?

If you want to prevent false positives—then, same as you’ve described, but only enable when either:

- phone is connected to Carplay via USB or bluetooth

- phone is connected to a bluetooth device known to be an auto (inferred by manufacturer ID, and configurable in bluetooth settings)

- GPS data for the last 5 minutes indicate you’re driving

And display an indicator on lockscreen that shows this feature is enabled.

Of course, consider that the downside of false positives don’t affect consumers or manufacturers—rather, they affect public utilities. Then, it’s easy to understand why this happens.

croshan··on Video Chess disassembled and commented
I tried it out, was enjoyable to play a few puzzles. My feedback is a) that the ring sound (when you win a puzzle) was too loud, so I ended up muting the tab, and b) that the logo looks like "BraiMax", and doesn't stylistically fit with the rest of the site theme.
croshan··on The “je ne sais quoi” of TikTok
Why does the multi-armed bandit problem imply Tiktok's algorithms are better?
croshan··on Hydrogen battery startup says it has $700M order backlog
I imagine planning the construction of a factory is harder than writing a product spec for your average software feature. Not sure that order requests speed up the process.
croshan··on Deviations from Chromium (features we disable or remove)
Your logon cookies should be set serverside, with the Secure and HttpOnly flags set, entirely unaccessible by javascript. So they'll last 6 months.

When I see cookies set by javascript, their primary purpose seems to be user tracking, not auth.

croshan··on AutoAnimate – Add motion to web apps with a single line of code
A little bit about how it works (from their docs)[0]:

> AutoAnimate is fundamentally a single function — autoAnimate — that accepts a parent element. Automatic animations will be applied to the parent element and its immediate children. Animations are specifically triggered when one of three events occurs:

> A child is added in the DOM.

> A child is removed in the DOM.

> A child is moved in the DOM.

[0]: https://auto-animate.formkit.com/

croshan··on Show HN: I Made a Magic Trick
Thank you :)
croshan··on Show HN: I Made a Magic Trick
Thanks! After I wrote that, I was thinking "more likely I missed it, than that this is the _one_ example where it doesn't exist" :P
croshan··on Show HN: I Made a Magic Trick
Haha, now that part is just sleight-of-hand. When you click (technically, mousedown) on the google doc link, we copy a new item to the pasteboard, so now instead of {"html": joker_image, "plaintext": card_you_picked}, it's {"html": joker_image_with_url_paste_hint, "plaintext": twitter_url}.

For how you can save multiple mime types in the same paste entry from javascript, the w3c draft is: https://w3c.github.io/clipboard-apis/#clipboarditem

croshan··on Show HN: I Made a Magic Trick
Agh. Turns out Firefox doesn't support it, my bad! Safari and Chrome work fine, but I'm guessing that's not an option for many Linux users. Sorry!
croshan··on Show HN: I Made a Magic Trick
Thank you! Had to implement something related to this at work, and thought "huh... what else can I do with this?" :P

I think the real magic is in the last step, when you're on a generally-trusted 3rd party website (Google docs), and your paste output is different in the doc from the URL.

croshan··on Show HN: I Made a Magic Trick
Fair enough! If you have a Mac, you can try the TextEdit tool (which also supports rich text), as an alternative to Google Docs.
croshan··on Show HN: I Made a Magic Trick
Fair point!

The way it work is this: you can copy multiple filetypes to the clipboard. So here, I copy a "text/html" and a "text/plain". When you paste to Google docs, it reads "text/html", and outputs a div that I've reconstructed to look like a joker card. When you paste to most other places (your address bar, a `<textarea>` element, terminal, etc.,), you get the plaintext fallback. So you can have two entirely different outputs, based on where you paste!

MDN surprisingly has no examples/API on this (the only time I've found it to be the case), so I instead link you w3c for reference: https://w3c.github.io/clipboard-apis/#clipboarditem

croshan··on Show HN: I Made a Magic Trick
Hmm. Guessing you're trying it on Android? It's relying on the navigator.clipboard API, and generally the experience is not good on mobile
croshan··on Show HN: I Made a Magic Trick
Hi HN! This weekend, I made a magic trick that you can try out in your browser.

Works best on desktop. Also, for those who don't like it, Google Docs not required--JIRA comments or most other WYSIWYG editors will also work.

Hope you enjoy it!

Page 1 of 3Next →