Hacker Newsnew | past | comments | ask | show | jobs | submit | lessbergstein's commentslogin

The best way to develop GMO technologies is to regulate it after it injures millions of people. And that regulation is... declaring anyone who questions the science a terrorist.


Ahhh. Thanks.

I doubt we'll get anywhere thrashing this out, but I'll concede that the apocalypse is undesirable


Just a few Gb of ram and the feds can audit your state when their zeroday crashes your machine, what a deel.


No, and yes. Systemd is needed to put linux under the thumbs of glowies. The people defending it are paid by your tax dollars


Then maybe porn shouldn't be available on the Internet


Well, they can't be that bad if the FAA will to listen to them. I can recall another transportation company who is able to have legislation passed for their soul benefit.


Yes, this is an extremely trivial problem. Anybody who knows how to program in more than one language is going to find this silly. awk or perl would finish it before jit compilation gets started.


It's a trivial problem to implement, but not trivial to implement faster than others. Awk won't beat solutions that are clever about multiple read queues and parallel processing.


Bit of an update, the record is now 8 seconds in java.

I have tried 2 naive awk implementations and both took 10x the basic java implementation btw (I'm sure it too can be optimized).


Just stick to Java


Please try it out in awk. It would be interesting to see whether awk can do this in a few seconds.


I don't understand, it should be pretty easy. A rolling average with BigDecimal would probably be sufficient but a scientific lib might be better for a rolling average or more than a hundred million numbers.

https://stackoverflow.com/questions/277309/java-floating-poi...


The difficulty is creating the fastest implementation. If you look at the results of the submissions so far you’ll see a big difference in duration, between 11 seconds and more than 4 minutes.

11 seconds seems pretty impressive for a 12Gb file. Would be interesting to know what programming language could do it faster. For a database comparison you’d probably want to include loading the data into your database for a fair comparrison.


Perl would do it quite fast and it has the benefit of accessing posix primitives directly.


A naive perl solution is really really slow compared to even the reference Java implementation. (I know, I've tried)


That's strange, you should be able to stream the file right into a tiny perl executable at the same speed as the bottlenecking hardware. The kernel will take care of all the logistics. You're probably trying to do too much explicitly. Just use a pipe. Perl should be done before Jit completes.


Using cat to redirect the file to /dev/null takes 18s on my machine (a low-end NUC). Just running a noop on the file in Perl (ie. feeding it into a `while (<>)` loop but not acting on the contents) takes ~2 minutes.

1B lines is a lot, and Java ain't a slouch.


Why are you using cat at all? Use a pipe. This isn't hard stuff. Don't use <>, feed the file into a scalar or array. it should only take a few seconds to process a billion lines.

https://www.perl.com/pub/2003/11/21/slurp.html/#:~:text=Anot....


If it isn't hard, then perhaps you could demonstrate with a complete perl program that you think should beat java.


I profiled my attempt, actually reading each line is the bottleneck.


Perl is always going to be much faster than Java at tasks like this. Use stdin and chomp() instead of reading each line explicitly.

This is really a small, trivial task for a perl script. Even with a billion lines this is nothing for a modern cpu and perl.



Reddit?


It’s easy to solve but even fizzbuzz becomes complicated if you want double digit GB/s output.


It's really not. We're talking about gigahertz CPUs and likely solid state storage that can stream many gb/s.. running through a perl script. There really isn't much that is faster than that.


Tldr: lets make regulation to attack Musk specifically.


Thats not at all what this says lol. Its simply some research pointing out that Starlink likely has some unintended radiation at specific frequencies. Nobody is calling for regulations or anything, no need to instantly come to Musk's defense.


Sometimes when you do something wrong, there are consequences.


Yes but it hurts my feelings very very much and he's very very important to me, so much that, when a bunch of astronomers publish an academic paper with a cool RF investigation, the first thing I say is: "the government is At it Again! Regulatin!" -- no one talks bad about anything my Elon is near without showing what a shill they are.


Ha ha that's pretty funny but the article specifically states that there's no regulation around these types of rf emissions and that maybe there should be


One of my freshman classes was game theory. A prerequisite was trigonometry, and I only had pre-Calc. The best part about it was I was doing averages and which great which number is greater in my senior high school class after taking pre-Calc as a Sophomore. Of course I complained about this to both schools but that wasn't really their problem. I suppose they just didn't care.


What a great stack of web standards we have, right folks?


Yeah, the community has made a lot of great progress for the web!


That progress will last, for sure. We're about to see a resurgence of small developer web apps and games! Web 4.0 here we come.


Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: