HNHacker News
TopNewBestAskShowJobs

shiny

173 karma · joined June 14, 2008

submissionscomments
shiny··on Dear Aliens
Ya, one of my favorite cases actually occurred next door to Botswana: https://en.wikipedia.org/wiki/Ariel_School_UFO_incident
shiny··on Ask HN: What are some tools / libraries you built yourself?
https://github.com/kmurph73/set-state-is-great
shiny··on United B772 at Denver on Feb 20th 2021, engine inlet separates from engine
Not if you have Sully in the cockpit [1]. They can still glide.

[1]: https://en.wikipedia.org/wiki/Chesley_Sullenberger

shiny··on Ask HN: Any less known but cool places you want to visit one day?
Well, I've already been, but Bacalar, MX. Amazing place.
shiny··on Ask HN: Favorite Podcast Episode of 2020?
https://lemire.me/blog/2020/12/01/interview-by-adam-gordon-b...

Daniel Lemire details how he was able to massively speed up json parsing by thinking from first principles.

TLDL: he removed all abstractions and coded directly for the hardware.

Great interview. Makes me want to learn assembly programming (perhaps ARM64 since that seems to be the latest hotness thanks to the M1).

I also enjoyed this interview on the upcoming JIT/AOT for the BEAM: https://thinkingelixir.com/podcast-episodes/017-jit-compiler...

shiny··on mRNA's next challenge: Will it work as a drug?
I liked this guy's explanation: https://www.youtube.com/watch?t=1313&v=wb_0FB7XiqA

My main questions after watching: how long do the spike proteins attach to our cell membranes? Do they get cleaned up eventually?

Also, will it lead to damage to the cell in anyway?

shiny··on My evolution writing JSON-REST APIs
Awesome, thanks a ton. Sounds like your lib would be perfect for me. Also, kudos to somehow typing that on your phone.

Looks like I need to incorporate encoders/decoders into my scheme. I might just steal that code outright.

Thanks for the Zapatos rec, that looks perfect.

fyi, my current generic method sigs looks like:

  export const makeRequest = <Name extends keyof Endpoints>(
    _name: Name,
    method: Endpoints[Name]['method'],
    path: Endpoints[Name]['path'],
    props: {
      data: Endpoints[Name]['clientSends'];
      onSuccess: (json: Endpoints[Name]['serverResponds']) => void;
      onError: (json: any) => void;
    }
  ) => { // ...
Dropping all of these typing shenanigans and going back to Elixir/Phoenix is always half-tempting, but I will soldier on for now...
shiny··on My evolution writing JSON-REST APIs
I'm working on a similar thing, tho I don't intend to extract it into a library (yet). I was inspired by Gary Bernhardt's blog post [1] and video [2].

I have an endpoints.ts file, shared between client/server, which has something like:

  export type Endpoints = {
    createProduct: {
      path: '/api/products.json';
      method: 'POST';
      clientSends: { name: string };
      serverResponds: ProductJSON;
    };
  }
The client can do `makeRequest('createProduct', ...)` and the Express server can use `registerEndpoint('createProduct', ...)` which must adhere to the schema defined above.

TypeScript's structural typing helps a lot here.

Of course, I can "lose" typing through things like raw SQL queries (working on a mini db helper library to help with that), but so I'll have to validate that the endpoints return what they say they do through tests (probs using io-ts).

I'm just getting started (coming from Rails). Not sure what the "correct" way to do this is, but my approach works so far. Would also be nice to have a generic way to create REST endpoints for a given resource, but meh.

[1]: https://www.executeprogram.com/blog/porting-to-typescript-so...

[2]: https://www.youtube.com/watch?v=GrnBXhsr0ng

shiny··on The Road to the JIT
To anyone just reading comments, this is referring to the old BEAM/C compiler, not the new JIT.
shiny··on Ask HN: What did you purchase that measurably improved your quality of life?
Interestingly, my favorite mattress so far has been a cheap Tuft & Needle.
shiny··on Ask HN: What did you purchase that measurably improved your quality of life?
Bedrock Sandals for me. I can walk forever in them. Feet can breathe and toes can spread.
shiny··on Ruby Next: A Transpiler for Ruby
I'm in the same spot. I still use & love Rails, but having adopted TypeScript & VS Code (w/ React) for the front-end, I find myself missing those luxuries when I switch back to Ruby/Rails/Vim.

I'm leaning towards a full TypeScript stack for my next project. The idea of sharing types & code between client & server is incredibly seductive. But there's no Rails for TS/Node, so I know it's going to be a shit show assembling all of my chosen libraries into a cohesive whole.

Although looking at your previous comment, perhaps I should give Kotlin / Ktor a try?

shiny··on Time to Get Serious about Tick-Borne Diseases
David Sinclair mentions a CRISPR tech to kill ticks here: https://youtu.be/o9Fg-usoBHc?t=410
shiny··on Ask HN: Elevation Something to Consider When Deciding Where to Live?
Right, I didn't mean to imply they were the same, it's just reading about elevated CO2 helped to trigger the altitude fear.
shiny··on Ask HN: What are some niche communities you enjoy?
I prefer /r/broodwar
shiny··on Sleep Scientist Warns Against Walking Through Life 'In an Underslept State'
I preferred his interview on the Kevin Rose podcast: https://www.kevinrose.com/single-post/matthew-walker

Incidentally a previous podcast covered a lot of the same ground, plus much more: https://www.kevinrose.com/single-post/Serge-Faguet

shiny··on Rails, Development, and More with David Heinemeier Hansson [audio]
Yeah, I feel like there should be an affordable air quality monitor (with an accompanying app) that you can just slap on walls...
shiny··on Rails, Development, and More with David Heinemeier Hansson [audio]
Love that he's bringing attention to CO2 build up & air quality in offices. I can't stand those modern "energy efficient" buildings with no open windows.
shiny··on Ask HN: What are your favorite podcasts?
Aside from the standard Rogan / Harris / Ferriss...

The Bike Shed

Developer on Fire

Travel Like a Boss

Invest Like a Boss

Tangentially Speaking

The James Altucher Show

Digital Communion

shiny··on Barely scraping by with a $250,000 salary in Silicon Valley
> My taxes are of 15%, because I get paid in capital gains, through equity.

I know this is satire, but out of curiosity is it really possible to be paid 100% in stock (and then just sell however much you need to live immediately)?

shiny··on High-speed rail taking shape even as opponents seek to kill it
Another potential concern is that it runs through some good farmland, which CA has some of the best of in the world.

I would love to have an HSR along the coast however. When I was in Taiwan it was amazing being able to get to the bottom of the island in a couple hours.

shiny··on Ask HN: Quitting job to go freelancing
> Prepare to pay significantly more in taxes.

And pay them quarterly, which can be done online via https://www.eftps.gov/eftps/

shiny··on Ask HN: What is the best online resource to learn advanced SQL?
Man, thank you so much for creating this. You should find some way to monetize it. I thought I had a decent grasp of SQL before, but this is what really helped me grok it ... especially the consistent 'everything is table' lesson.

Oh and I had an idea for practicing deletions/insertions/updates & other behavior that you couldn't do on web: create an Electron app that uses a local db. I'd buy that in a heartbeat.

shiny··on Welcome Chris Lattner
Pretty much none of Apple's current software is written in Swift though, from what I can tell.
shiny··on Why I bought a 2015 Macbook Pro
Man, that keyboard sounds really bad. Can anyone with the new MBP confirm it's as noisy as that video makes it sound, even after you adapt to it? As a Vim user, a noisy keyboard scares the hell out of me.
shiny··on Ask HN: College student looking for freelancing advice
I'd say: network network network. Meet people that work at companies that might want freelancers.

Or look on remote job boards and email those companies directly. If you're just beginning, be willing to work for a bit less to get your foot in the door.

shiny··on Myron Ebell Takes On the E.P.A.
There are reactor designs that leave virtually no waste, and can actually consume existing nuclear waste stockpiles. Check out the LFTR [1], for one. Thiel is a big Thorium fan, not sure if he will whisper that in Trump's ear.

[1]: https://en.wikipedia.org/wiki/Liquid_fluoride_thorium_reacto...

shiny··on The Mac Platform Decline
Yeah, and as a developer it really behooves me to be able to run Xcode and the iOS simulator. Plus every team seems to use Macs nowadays, and it certainly helps to be on the same platform as everybody else.

Finally, I already have a couple apps in the App Store that I'd have to abandon if I switched to something else. So I'm kinda stuck.

shiny··on Ask HN: Posture – what do you do during work to avoid back pain?
I use a Humanscale Freedom chair w/ headrest.

http://www.humanscale.com/products/product.cfm?group=Freedom...

shiny··on Making Humans a Multiplanetary Species [video]
> the final option has always been and will always been to migrate away

That's why I brought up the accelerating rate of expansion of space ... everything will be moving away from us so quickly that eventually we'll run out of places to migrate to.

Page 1 of 3Next →