Better HN
topnewbestaskshowjobs
Log inSign up

shoefindortz

30 karma · joined Mar 17, 2021 (5y ago) · 8 submissions

Submissions

comment 5y ago · link · parent

I was proposing the cgo option because it's already implemented.

I _think_ allocating a slice of contiguous bytes and using unsafe pointers should work fine as long as you are very cautious about structs/vars with pointers into the buffer getting freed by the GC.

comment 5y ago · link · parent

Rust has an arena allocator too[1], but it is implemented with 165(!!!) usages of unsafe. :)

[1] https://github.com/fitzgen/bumpalo

comment 5y ago · link · parent

> Arenas are, however, unfeasible to implement in Go because it is a garbage collected language.

If you are willing to use cgo, google already implemented one for gapid.

https://github.com/google/gapid/tree/master/core/memory/aren...

comment 5y ago · link · parent

Neat!

This is commonly known as Small String / Small Buffer Optimization. This is how most implementations of C++'s std::string work also.

comment 5y ago · link · parent

Windows ships with ssh now? Is that something new in win10+?

comment 5y ago · link · parent

I've also received around ~10 of these same emails offering increasing prices to remove my review.

Maybe this is a good investment opportunity? I'm joking, but they did offer me almost twice the price of the product itself, which is interesting.

Something also curious is that the seller initially sent emails starting with with "Hi, [my sister's name]". Her name was not associated with my amazon account at all, and definitely not the name shown on the amazon review. I wonder where they are retrieving the names from for this.

comment 5y ago · link · parent

This argument reminds me of the historical arguments made against heliocentrism vs geocentrism. Just because we have widespread belief of one thing to be true does not mean we should blindly accept it and not test things that appear to oppose it.

In my opinion, the tests that have happened with the EmDrive are exactly what _should_ happen to make sure that our knowledge is strong and that we do keep advancing the field.

comment 5y ago · link · parent

The 44% figure comes from the Greater London Authority, but should be clarified a bit. There is a BBC article[0] about this which states "... 44% of the city's people are now of black or ethnic minority origins".

[0]: https://www.bbc.com/news/uk-england-london-31082941