HN user

croshan

383 karma

blog.cyrusroshan.com

Posts10
Comments89
View on HN

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.

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.

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.

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.

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.

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.

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.

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.

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?"

CSS-Only Chat 3 years ago

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.

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.

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.

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.

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/

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

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!

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.

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

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

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!