News for hackers. Stuff that matters.

chrfrasco

Re:The Jeff Dean Facts on Thursday January 08, 2026 @05:14PM (#46547249)
Re:Proof You Can Do Hard Things on Wednesday July 12, 2023 @03:14AM (#36691345)
I believe Nat is referring to a full stop rather than menstruation in the sentence about crying into tiktok.
Re:Why your F# evangelism isn't working on Tuesday May 30, 2023 @10:56PM (#36133983)
> This is how a new product gets across the chasm. Find a pragmatist in pain. Do whatever-it-takes to make them happy with your product. Then go back and do it again.

Good advice, I think the useful idea is: An excellent product in competition with a very good incumbent is a bad idea. A mediocre product in competition with an absent or terrible incumbent is a great idea

Re:GitHub.Dev is now available on any GitHub repo on Thursday August 12, 2021 @09:35PM (#28164264)
mind expanding on this? you've piqued my interest but I can't quite see the connection
The limiting factor is managed isolation. You can return if there are flights from where you are currently, but you need to secure a spot in managed isolation first (2 weeks in a hotel). https://www.miq.govt.nz/travel-to-new-zealand/secure-your-pl...
> I wonder if we could reduce binary size with a dead-simple scheduler and GC

For many CLIs I think even a brain-dead bump allocator would work

This is so cool. I especially loved the Makefile, it's nice to see "bootstrapping" laid out so plainly. I remember finding the concept quite hard to wrap my head around when I was introduced to it. Seeing this would have made it a lot easier to understand!
I hope you didn't take too many of these comments to heart. You unfortunately got the standard HN comment section treatment – a delightful mix of nitpicking, assuming bad intent, and completely missing the point. I also hope you continue to share things on the internet – it's far easier to criticise than it is to create.
Re:Single Page Applications using Rust on Tuesday August 11, 2020 @09:30PM (#24127783)
Sum types and exhaustiveness checking are doable with typescript! Though it's not especially ergonomic

https://www.typescriptlang.org/play?#code/C4TwDgpgBAygrgWygX...

Re:Notion for everyone on Wednesday May 20, 2020 @12:21AM (#23243268)
One more suggestion for you – dropbox paper (https://paper.dropbox.com/) has latex support + syntax highlighting. It's quite simple but it works well as a google docs replacement. As others have mentioned Notion is also fantastic.
Re:Making Rust as Fast as Go on Sunday May 03, 2020 @12:11PM (#23059888)
Yeah, I can definitely see how that would be a more performant approach.

I suppose I wasn't so interested in figuring out how to make this algorithm as fast as possible as much I was interested in diving into why this particular implementation was slower.

I'm not totally convinced that this difference is down to the string being parsed over and over, though

> doing the UTF-8 decoding up-front is exacerbating the performance difference in the allocator

This seems to suggest that allocation might be dominating here. WDYT? Either way, I've added a disclaimer to the post.

Re:Making Rust as Fast as Go on Sunday May 03, 2020 @11:39AM (#23059638)
Hey all, as some keen-eyed commenters have pointed out, it looks like the rust program is not actually equivalent to the go program. The go program parses the string once, while the rust program parses it repeatedly inside every loop. It's quite late in Sydney as I write this so I'm not up for a fix right now, but this post is probably Fake News. The perf gains from jemalloc are real, but it's probably not the allocators fault. I've updated the post with this message as well.

The one-two combo of 1) better performance on linux & 2) jemalloc seeming to fix the issue lured me into believing that the allocator was to blame. I’m not sure what the lesson here is – perhaps more proof of Cunningham’s law? https://en.wikipedia.org/wiki/Ward_Cunningham#Cunningham's_L...

Re:Making Rust as Fast as Go on Sunday May 03, 2020 @11:29AM (#23059560)
> The second problem is that at least the Rust code is decoding UTF-8 every iteration of the inner loop instead of decoding once and saving the result, or even better interning the characters and having versions of the inner loop for 32-bit chars and 8-bit and 16-bit interned indexes.

I tried this. Pulling the .chars() call out of the loop & collecting into a Vec made the performance even worse – the following balloons the runtime from ~2.7s to ~5s:

    let target_chars: Vec<char> = target.chars().collect();
    for (i, source_char) in source.chars().enumerate() {
        let mut next_dist = i + 1;

        for (j, target_char) in target_chars.iter().enumerate()  {
> written mindlessly > incompetence of the person

No challenge there :P I am operating under the assumption that I don't need to understand how compilers work to get good performance from rust (where good is "similar enough to an equivalent go program")

Re:Making Rust as Fast as Go on Sunday May 03, 2020 @10:45AM (#23059296)
run.js is not doing the benchmarking. If you look at the source for each of the programs being benchmarked, you'll see that the programs themselves are responsible for benchmarking
Re:Making Rust as Fast as Go on Sunday May 03, 2020 @10:02AM (#23059041)
Nice catch, thanks for pointing this out. I've updated the cache initialization to use `len(targetChars)` rather than `len(target)`:

    cache := make([]int, len(targetChars)+1)
    for i := 0; i < len(targetChars)+1; i++ {
        cache[i] = i
    }
AFAIK this makes them equivalent (fingers crossed). It seems to not have made much of a difference (-0.03s)
Re:Things you can do with a browser in 2020 on Thursday March 19, 2020 @08:14PM (#22633195)
Looks like we need prefers-prefers-color-scheme
Re:Animating URLs with JavaScript and Emojis on Wednesday April 17, 2019 @11:16PM (#19688443)
Man, I wish I could use the eye-roll emoji here
Re:A newcomer’s (angry) guide to R on Wednesday June 13, 2018 @06:33PM (#17307568)
> This to my mind verges on civil rights infringements

You're funny!

Re:Lasik’s Risks Are Coming into Sharper Focus on Tuesday June 12, 2018 @12:23AM (#17290690)
make sure they're rose-tinted too
Re:"@" on Twitter on Saturday April 28, 2018 @02:41AM (#16946387)

  fizzbuzz = lambda n: [print((“fizz” * m % 3 == 0) + (“buzz” * m % 5 == 0) or m) for m in range(n)]
Not sure if this is great or terrible
Re:"@" on Twitter on Saturday April 28, 2018 @12:13AM (#16946024)
Python doesn’t do any implicit coercion (apart from ints and floats etc), right?
Re:“Pinterest needs to be removed from Google IMO” on Sunday March 18, 2018 @08:34PM (#16615378)
I use the personal blocklist extension (https://chrome.google.com/webstore/detail/personal-blocklist...) just to block w3schools.

Ask HN: How can I prevent myself from being pigeon-holed?

I'm about 6 months away from graduating university (compsci + stats). I've also been working as a front end developer for about 1.5 years.I do enjoy my work but I'm worried about not being able to get jobs in other domains. How can I avoid this? Is this even something to worry about?

( Read More... | 2 comments | 2 points | on HN )

Older »