News for hackers. Stuff that matters.
Re:Searching 20 GB/sec: Systems Engineering Before Algorithms by lifeisstillgood on Thursday May 08, 2014 @01:21PM (#7716408)
Amazing how much work 'simple' is :-)

I am reminded of John Carmack's comment on Oculus - he was amazed that the hardware had the power but the headsets performed badly - then he looked at the code and saw seas of abstractions on abstractions.

Good luck stripping out the layers guys !

Re:Searching 20 GB/sec: Systems Engineering Before Algorithms by innguest on Thursday May 08, 2014 @02:41PM (#7716898)
Interesting. That must be why C/C++ is always the go-to solution.

Instead of thinking "too many abstractions are making this code slow, therefore let's get rid of the abstractions" I usually had rather pick a better language where abstractions have little or no penalty (Haskell, Scheme, etc).

Re:Searching 20 GB/sec: Systems Engineering Before Algorithms by lifeisstillgood on Thursday May 08, 2014 @05:38PM (#7717866)
Maybe we are talking about different abstractions. Perhaps libraries? I reimplemented (probably badly) session handling code in wsgi (python) - because the Django code was over 2000 lines long and used other libraries and I did not understand it - especially when all I wanted was to store a 128bit number in a client cookie and then look it up when I saw it again.

So the idea is simple (cookie sessions) but the different ways of implementing it can hold complexity, errors and abstractions.

There is nothing stopping the same happening with Haskell - I can I am sure write terrible code even in the best languages (see my entire output for proof :-)

Re:Searching 20 GB/sec: Systems Engineering Before Algorithms by TheSOB888 on Thursday May 08, 2014 @03:28PM (#7717153)
Yeah, but the abstractions have a penalty on your mind.
Re:Searching 20 GB/sec: Systems Engineering Before Algorithms by mercurial on Friday May 09, 2014 @05:59AM (#7720101)
They do? In my experience, lack of abstraction (often due to not analyzing the issue at hand thoroughly) results in non-abstract, verbose, hard to understand and refactor code. It's the difference between, say, building an SQL query by appending strings to a buffer (move one line and everything blows up) and building a model of your query (projection, etc...). Sure, the abstraction means more code, but it's much more easier to manipulate and considerably less risk-prone. It won't be faster than doing it the other way, but it won't be necessarily measurably slower.
Re:Searching 20 GB/sec: Systems Engineering Before Algorithms by waps on Sunday May 11, 2014 @01:02PM (#7729164)
Euhm abstractions in Haskell carry lots of penalties. Haskell is generally a language that only makes sense if you buy the "sufficiently smart compiler" argument. Haskell's abstractions shouldn't carry a penalty, because the compiler compiles them out when it recognizes them.

That's cute but while it's impressive what it recognizes, it's generally still stupid, and it will get beaten by bad programmers (especially by bad programmers. Becoming good at Haskell means, amongst other things, learning what the compiler will screw up).

Scheme, likewise, doesn't have free abstractions. Unless you mean macros, but those are not really free either imho.

There's one high-level language in wide use that has "free" abstractions, or at least, costs as low as possible, and that's C++.

Re:Searching 20 GB/sec: Systems Engineering Before Algorithms by phserr on Thursday May 08, 2014 @02:51PM (#7716942)
Has he written anything (or talked) about this experience or was it just a brief comment? I'd love to read it if he did.
Re:Searching 20 GB/sec: Systems Engineering Before Algorithms by waterhouse on Thursday May 08, 2014 @09:48PM (#7718875)
I remember reading "Latency Mitigation Strategies", by Carmack. It doesn't mention the Oculus except in an acknowledgment at the end, but it might be about the same thing lifeisstillgood is talking about:

http://www.altdevblogaday.com/2013/02/22/latency-mitigation-...

HN discussion: https://news.ycombinator.com/item?id=5265513

Re:Searching 20 GB/sec: Systems Engineering Before Algorithms by lifeisstillgood on Thursday May 08, 2014 @05:33PM (#7717830)
I just remember a documentary / interview - iirc a five minute interview at a trade show. It stuck in my head. I am afraid I cannot find the link now but trade show / two people sitting down, a demo of oculus rift then comments.