News for hackers. Stuff that matters.

shoefindortz

Re:A new ProtoBuf generator for Go on Thursday June 03, 2021 @04:06PM (#27386609)
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.

Re:A new ProtoBuf generator for Go on Thursday June 03, 2021 @03:27PM (#27386160)
Rust has an arena allocator too[1], but it is implemented with 165(!!!) usages of unsafe. :)

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

Re:A new ProtoBuf generator for Go on Thursday June 03, 2021 @02:56PM (#27385774)
> 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...

Neat!

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

Windows ships with ssh now? Is that something new in win10+?
Re:Amazon Fake Reviews Scam Exposed in Data Breach on Friday May 07, 2021 @10:23AM (#27076200)
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.

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.

Re:GitHub, fuck your name change on Wednesday March 17, 2021 @09:07AM (#26490584)
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