HNHacker News
TopNewBestAskShowJobs

dirtydroog

-4 karma · joined January 28, 2020

submissionscomments
dirtydroog··on Linux 5.8 Set to Optionally Flush the L1d Cache on Context Switch
Why not, it's the customer that ends up paying because there's less performance per machine, and so they may need more of them. If all cloud providers use this fix then there's really nothing you can do. Some may provide true 'bare-metal' machines but I'd imagine they're pricey and a pain to maintain / monitor.
dirtydroog··on Running Lisp in Production (2015)
Earlier? I still get them
dirtydroog··on Chromium project finds that 70% of security defects are memory safety problems
That depends on the allocator used. The default libc one works but isn't great performance-wise. It is possible to intercept calls to malloc/free by using LD_PRELOAD on Linux. That will allow you to use allocators such as jemalloc or tcmalloc instead.

Of course, repeatedly allocating and freeing is poor for performance. Cache/pre-allocate when you can. This goes for managed languages too.

dirtydroog··on Chromium project finds that 70% of security defects are memory safety problems
If you give gcc the appropriate 'march' parameter it can use vectorisation automatically if it figures out it can do it.

The main argument here is that native languages let you get the most out of your CPU if you want, whereas with the JVM you're probably stuck unless you use JNI, in which case why not just go straight to native?

dirtydroog··on Chromium project finds that 70% of security defects are memory safety problems
I'd define modern as using RAII extensively and using C++11 at least.

As for algorithms, I honestly don't know what you mean. They're all documented online with respective big-O running times[1]. If you're talking about making unintended copies of things, then yes, C++ does expect you to know what's going on... it's the whole point of the language. If that's too much for you then don't use it, but that doesn't make it a bad language (I'm not denying it has some hair-pulling moments) Use std::move() when appropriate.

[1] https://en.cppreference.com/w/cpp/algorithm/sort (see 'Complexity' section.

dirtydroog··on Chromium project finds that 70% of security defects are memory safety problems
There is an open-source project by LMAX (a forex trading company) called Disruptor[1] that squeezes as much as possible out of the JVM. It's awesome. I ported it to C++ years ago when I wanted to learn about low-latency techniques. However, if you look at the code they need to actually break out of the JVM's safety net to get the performance they need[2]. I couldn't help but ask myself why they didn't just use C++, and when asked one of the devs did admit that their own C++ ports had an approx 10% performance increase (although this was ~7 years ago maybe)

Rust is certainly interesting and it's on my radar. I wonder though, when it comes to having it in use in anger if its guarantees turn out to be over sold, just like the JVM's safety claims were. Time will tell.

Edit: I tend to focus on comapring against the JVM because pretty much any framework you use on The Cloud is JVM based. I'm of the opinion that there are cost savings to be had if these were ported to more appropriate languages, hence the Cassandra vs Scylla comparison. The money saved was 'noticeable'.

[1] https://github.com/LMAX-Exchange/disruptor [2] http://mishadoff.com/blog/java-magic-part-4-sun-dot-misc-dot...

dirtydroog··on Chromium project finds that 70% of security defects are memory safety problems
Not really. Only shared_ptr uses ref counting, unique_ptr doesn't, and looking at our code base (highly networking orientated) we only use shared_ptr once. You could, in theory, use shared_ptr everywhere, but then you're not using the language properly and may as well resort to Java or similar.
dirtydroog··on Chromium project finds that 70% of security defects are memory safety problems
Yup, I posted elsewhere here about our similar experience with Cassandra vs Scylla
dirtydroog··on Chromium project finds that 70% of security defects are memory safety problems
Drivel. You can't have it both ways. It's easy to see what you're doing in C++ because you have to do it! It's the whole point of the language, and apparently the source of bugs.

Correct me if I'm wrong, but I doubt you've ever written a program in modern C++?

dirtydroog··on Chromium project finds that 70% of security defects are memory safety problems
Look at the networking sourc code for Redis. It meets all your requirements and isn't that big.
dirtydroog··on Chromium project finds that 70% of security defects are memory safety problems
Sorry, this is hand wavy nonsense. One counter example, we switched from Cassandra (JVM) to Scylla (C++). It was a win in terms of both query latency and infrastructure costs as we required fewer machines to handle the same load.

As for having more time to write a fast program... that's funny. If you want a fast program on something JVM based you're pretty much going to be spending the majority of your time writing things in a way where the GC plays as little role as possible.

dirtydroog··on SQLite 3.32
We use sqlite as a smaller cache of a much larger postgres db. The cache is generated by a job and yes is regenerated every time before being pushed to machines that need it.
dirtydroog··on Tell HN: Interviewed with Triplebyte? Your profile is about to become public
This may be true, but I have had US websites flat out refuse me access because they detect I'm in Europe.
dirtydroog··on Tell HN: Interviewed with Triplebyte? Your profile is about to become public
I'm a European in Europe and seem to have a triplebyte account
dirtydroog··on Programming Inside a Container
I am the opposite. I develop on Linux via VMWare Player running on a Windows host. I don't want Linux as the main OS on my personal desktop and I can keep work related stuff on its own VM. I've never noticed any non-bare metal speed issues.

As for distro versioning... surely you only get the user-land package versions, and the kernel is still the version of your main OS?

dirtydroog··on The original source code of Microsoft GW-BASIC from 1983
I think I had the same book!
dirtydroog··on An introduction to RabbitMQ
Yes, my handwavy reading of the situation was that he left due to issues with zeromq that he couldn't/wasn't allowed 'fix'. Then Peter Hintjens unfortunately died a few years back. I haven't heard about nng, so thanks for that, I'll check it out.

ZeroMQ certainly isn't perfect, for example there's no way to tell if a message was successfully written to a PUB socket, or if it was dropped (just one minor issue)

https://stackoverflow.com/questions/13891682/detect-dropped-...

Anyway, This is digressing from the main topic

dirtydroog··on An introduction to RabbitMQ
We use ZeroMQ a bit. It's been pretty much flawless as far as I can see but I get the impression that it's becoming obsolete. Is RabbitMQ a viable replacement?
dirtydroog··on Termux and Android 10
Nokia had the N900 tooo
dirtydroog··on Google deletes “communist bandits” from comments on Youtube
Here's my take on what's probably going on:

YouTube is a platform designed around showing video ads to targeted audiences. In order to show those ads they need to allow people to upload user generated content. This content needs to be 'brand safe', i.e. it cannot be content that advertisers don't want to be associated with.

'Content' is more than just the video itself, comments are part of this.

If an Easily Offended Entity, in this instance 'China', sees an ad from AdvertiserX appearing on content they deem offensive they can kick up a stink about this, this is especially true in China where nationalism is extremely strong. Western brands have a long history of apologising to China over minor things, they really cannot risk fervent nationalism from damaging their balance sheet either through boycotts or having authorities turning a blind eye to counterfeiting.

So YouTube will remove this content, not because they're under the thumb of China, but because advertisers call the shots.

dirtydroog··on To software engineers criticizing Neil Ferguson’s epidemics simulation code
I'm genuinely surprised it wasn't an Excel spreadsheet.
dirtydroog··on It’s OK for your open source library to be a bit shitty (2015)
Well, there was this situation a few years ago https://www.theverge.com/2013/4/17/4234136/excel-calculation...

While the tone of the covid model scrutiny leaves a lot to be desired it is understandable seeing as how the results are affecting the entire world. The situation is unprecedented.

dirtydroog··on What every software engineer should know about Apache Kafka
GCP Pub/Sub is insanely expensive
dirtydroog··on Modern C++ gamedev: thoughts and misconceptions
I think it was welcomed with open arms by less experienced devs because it made code easier to compile, and rightly so. C++'s compiler messages are off-putting.

For others, it was worrisome because it made code easier to compile, and rightly so. If it complies it doesn't mean it's correct.

dirtydroog··on Vice Media Lays Off 155 Employees with Deepest Cuts in Digital Group
Disney wrote off its investment in Vice: https://www.vox.com/recode/2019/5/8/18537617/disney-vice-wri...
dirtydroog··on Large areas of London to be made car-free as lockdown eased
It's quite common for people in the suburbs to get a train into central London and they cycle from there, either on their own fold-up bike or on a Boris Bike.
dirtydroog··on EU ombudsman: regulator should have stopped director from joining lobby group
> The ombudsman presented two findings of maladministration by the EBA. The first is the regulator should have “forbidden the job move.”

I'm not sure how legally enforceable that would be. I wonder if the Bosman ruling would make that move unlawful.

https://en.wikipedia.org/wiki/Bosman_ruling

dirtydroog··on Lord of the io_uring: io_uring tutorial, examples and reference
Well, Linus did have an infamous rant about never breaking userspace; it's surprising this happened.
dirtydroog··on Lord of the io_uring: io_uring tutorial, examples and reference
Use timeouts?
dirtydroog··on AWS services to avoid
Really. I found it extremely useful when applying custom scaling policies. It's miles better then GCP's Monitoring.
← PreviousPage 2 of 8Next →