HNHacker News
TopNewBestAskShowJobs

chrisshroba

1,573 karma · joined October 15, 2014

submissionscomments
chrisshroba··on Uv: Python packaging in Rust
Obligatory two xkcd's, but I'm super excited about this project! Definitely going to try it out.

https://xkcd.com/1987/ https://xkcd.com/927/

chrisshroba··on Neal Stephenson was prescient about our AI age
Yeah totally! Just not my preference.
chrisshroba··on Neal Stephenson was prescient about our AI age
I strongly disagree about Snow Crash. I abandoned it halfway through because the style struck me as cringily cyberpunk. Relatively cool plot but the style just wasn't for me.

However, Seveneves to me is everything I could hope for in a sci-fi book, and I Anathem had amazing world building. I can't speak for Diamond Age, but based on the four books I've read (Termination Shock being the other), I thought Snow Crash was wildly different from the rest.

chrisshroba··on An RNG that runs in your brain
In your example, 1 and 2 are twice as likely as any other number, because of the 22 possible results of n%22, 3 through 20 all only have one result that yields them, but 1 gets generated by 1 and 21, and 2 gets generated by 2 and 22. You could adapt your algorithm by adding "if the result is greater than the range of values you're picking from (i.e. 21 or 22 in your case), try again with a new number."

    >>> import collections, random, pprint
    >>> pprint.pprint(
      sorted(
        list(
          collections.Counter(
            [
              ((random.randint(1,10000000) % 22) % 20)
              for x in range(10000000)
            ]
          ).items()
        )
      )
    )
    [(0, 908920),
    (1, 908264),
    (2, 454167),
    (3, 456019),
    (4, 454551),
    (5, 455183),
    (6, 454127),
    (7, 454308),
    (8, 454939),
    (9, 454602),
    (10, 454963),
    (11, 453117),
    (12, 454046),
    (13, 453812),
    (14, 456243),
    (15, 455025),
    (16, 454101),
    (17, 455072),
    (18, 454409),
    (19, 454132)]
chrisshroba··on Keeping a long shell history
Neat idea, definitely going to use this! Thanks for sharing
chrisshroba··on Alaska Airlines grounds Boeing 737 Max 9 planes after mid-air window blowout
Our American football fields are a standard size ;)
chrisshroba··on A circular 3D-printed concrete bridge
Here's a few more!

https://www.holcim.com/who-we-are/our-stories/striatus-bridg...

chrisshroba··on Colliding Secure Hashes
That’s what I always wonder too. If we assume an attacker can change the contents at example.com/app.zip, why should we assume the hash published at example.com/download.html is any more secure?
chrisshroba··on TuneNN: A transformer-based network model for pitch detection
Could you elaborate a bit more? It seems to me like the note being played would always correspond to the fundamental frequency observed. When is this not the case? Maybe as the note rings out, the fundamental frequency and first few overtones lose power, and all that's still audible are the higher overtones?
chrisshroba··on Black goo is the new oscilloscope: Love Hultén's ferrofluid synths
Or Vital synth (free) with GarageBand (free) or Reaper (long free trial then $60)!
chrisshroba··on Show HN: See library availabilities for your Goodreads want-to-read list
This is amazing, thank you so much for creating this!! I'm going to use this all the time. I have a huge number of books in my want-to-read list; have you thought about adding an option to sort by added date? (or by other things like goodreads rating?)
chrisshroba··on Numbered block parameters in Ruby
Some context on the acronym (which typically stands for "the fucking article"): https://news.ycombinator.com/item?id=19781756
chrisshroba··on The State of Async Rust: Runtimes
I'm new to Rust so please interpret this as curiosity and not criticism, but why not just use tokio? I understand that it's nice to build applications against a generic interface so that you can swap out libraries if one stops working well, but at this point tokio seems fairly well-vetted, and there are plenty of other parts of a typical stack that require some degree of lock-in: which database you choose, which web framework you build on, which cloud provider you interface with, etc., so I don't see choosing a specific async runtime as a deal-breaker. Could you elaborate on why you do?
chrisshroba··on What if OpenDocument used SQLite? (2014)
I used to have that instinct but lost it in the age of auto save. The applications (web or native) I use most often all do it for me: Google docs, Dropbox paper, notion, vscode. I don’t think I’m alone in this!
chrisshroba··on iPhone 15 and iPhone 15 Plus
What do you mean? Wouldn't you still need a charger between the phone and the airpods case?
chrisshroba··on High-altitude heist – 500 dollars stolen
In a way this story is uplifting - that $500 stolen from a donation box on a climbing route is so surprising and infrequent for it to make international news. It’s something I’ve always loved about the outdoors/adventure communities: in general you can trust folks more than normal to not steal from your tent, ignore calls for help, or screw your over so they can have a better time.
chrisshroba··on DHCP is not blocked by ufw/iptables
What is the DMZ, physically? I've always heard of putting your bastion in a DMZ but is that a conceptual layer or some sort of physical box sitting between the firewall and the bastion, and the bastion and the office router?
chrisshroba··on None of the Above
As a software engineer with no research experience, I wonder if one answer may lie in more foolproofing of the most commonly statistical analysis software, like matlab and stata. They are hugely powerful tools but obviously require quite a bit of domain knowledge to use properly. Could many of the most common types of analyses be made into more easily runnable happy paths that also warn against common invalid conclusions and methods?

I don’t mean to imply any of this is easy, but I’ve seen other pro-level software successfully integrate happy paths for novices.

chrisshroba··on Counterexamples in type systems
Whoa, wanted to drop a comment and thank you for that framing. This would be such a useful tool even for internal documentation. Thanks!
chrisshroba··on GPT-4 API General Availability
Not disagreeing but just curious, why can't money buy enough GPU's? OpenAI's prices seem low enough that they could reasonably charge 2x or more to companies eager to get on the best models now.
chrisshroba··on Using command line to process CSV files (2022)
pprint won't work here because the output is a json string, not a python object, so pprint'ing it will just print the string as is. And plus, pprint doesn't output valid json (it uses single quotes, for example), so the output isn't usable for piping into other filters and programs.

And it's true that it won't scale well but it still has worked every time I've wanted it to :)

chrisshroba··on Using command line to process CSV files (2022)
I have this shell function defined:

csv_to_json () { python -c 'import csv, json, sys; print(json.dumps([dict(r) for r in csv.DictReader(sys.stdin)]))' | jq . }

It converts a csv to a json list of objects, mapping column names to values. I find it way easier to then operate on json by filtering with jq or gron, or just pasting it into other tools for post-processing. The jq at the end isn't necessary but makes for nice formatting!

chrisshroba··on Try: run a command and inspect its effects before changing your live system
Such a simple concept. Not something I'll reach for every day but I can absolutely see myself using this a few times a year. Thanks for sharing!
chrisshroba··on πfs – A data-free filesystem
That 's only if you can make multiple cuts (or slits), and it's actually 8x less because we're talking about bits, not bytes.

With only one cut as the parent comment describes, you can only store the log base 2 of 100 billion, which is 36, so about 4 bytes of info, or one long integer.

chrisshroba··on Show HN: Non.io, a Reddit-like platform Ive been working on for the last 4 years
When I load the all page, I get an alert that just says "1", which feels like it's probably a successful XSS attack. Given that, I can't justify putting my credit card number directly into the site. If it took Paypal, Apple Pay, or similar I would absolutely give it a try for a few months.

Screenshot of the alert (imgur marked it as nsfw because it includes a thumbnail of a post that is mildly nsfw): https://imgur.com/a/TmwO1jg

The likely culprit: https://imgur.com/a/rJrLxfn

chrisshroba··on Ask HN: Legality of archiving/re-hosting Reddit content
But in some (not all!) cases it is a lawful contract, so it's worth consideration.
chrisshroba··on Did Reddit just destroy mobile browser access?
Not unless you go through a kind of esoteric “install to Home Screen” process, which most users aren’t likely to do.
chrisshroba··on Show HN: Automating daily reports, because fuck it
What does this mean? I tried adding .atom to the OP url and got a 404
chrisshroba··on You can serve static data over HTTP
What if the data is dynamic but small and low qps? What are the current easiest projects and services for authed data CRUD? Is firebase still good?
chrisshroba··on Tracing Python
Fyi, the table of contents gets cut off (its box is smaller than its contents) at zoom levels of 90% or larger for me. Here's a screenshot at 100% zoom https://imgur.com/a/0t9cKs5

Great article!

← PreviousPage 2 of 14Next →