HNHacker News
TopNewBestAskShowJobs

tqh

92 karma · joined March 19, 2012

submissionscomments
tqh··on Efficient strlen implementation in C (2007)
Broken. This will generate page faults if your string ends at a page-boundry and start address isn't aligned on four bytes.
tqh··on Ask HN: Bad touchpads – hardware or software?
It's mostly about bandwidth depending on how the device is connected inside the computer (usb is much better than ps/2 or serial), polling frequency, and software filtering raw data properly (duplicates and such). Some improvements https://github.com/torvalds/linux/commit/c774326a219536ab615...
tqh··on A straight talk about btrfs
Same here. I lost a disk to btrfs and did not manage to recover any data. No longer on my list of filesystems-I-trust. I guess Suse is the biggest contributor since the others stopped? It doesn't give me any confidence that it can be trusted.
tqh··on Ars spends too much time trying to work in Haiku, the BeOS successor
We stopped working on BeZilla when Mozilla decided to scrap all native gfx-backends and use Cairo.
tqh··on Ask HN: What's Faster than Redis
Yes, https://github.com/fastio/pedis
tqh··on Why is Chrome's font aliasing so much worse than Firefox?
No idea, but they have signed distance fields font rendering (phew) which you can enable to get proper font rendering: chrome://flags/#distance-field-text

For some info: https://www.youtube.com/watch?v=CGZRHJvJYIg

tqh··on Multi-Stage Docker Builds for Creating Tiny Go Images
For Go (as it is statically linked) you can use FROM SCRATCH. It's faster, smaller, easier. https://blog.docker.com/2016/09/docker-golang/
tqh··on Rpmalloc – A lock-free memory allocator
They don't mention anything about memory fragmentation..
tqh··on Haiku booting in UEFI mode
The minnowboard has GPIO connectors, and has already managed to boot Haiku in UEFI mode. A bit expensive though.
tqh··on Why Logical Clocks Are Easy
Seems to be a running joke in titles :)

Why Vector Clocks are Easy

Why Vector Clocks Are Hard

Why Logical Clocks Are Easy

tqh··on Ask HN: Laptop bag for 15“ Macbook Pro for inclement weather
My favorite: http://www.thewrendesign.com/new-ppc-cement-laptop-bag-desig...

Waterproof test: https://vimeo.com/39962259

tqh··on Practical File System Design with the Be File System (1999) [pdf]
If you want to look at a reimplementation of Be File System, here is Haiku's version: https://github.com/haiku/haiku/tree/master/src/add-ons/kerne...
tqh··on New XPS 13 Developer Edition from Dell
Seems Dell is a mess in ACPI and will need firmware updates: http://mjg59.dreamwidth.org/34542.html
tqh··on Hashpass – A simple, stateless password manager for Chrome
https://github.com/Lyndir/MasterPassword/ is probably a better idea as it has lots more features and supported platforms.
tqh··on OPW Linux kernel intern develops QR code for Oops messages
Welcome to the club :) https://www.haiku-os.org/blog/mmlr/2012-07-01_qr_encode_your...
tqh··on Strlen(buf) – Not as simple as you’d think
The first for-loop looks like it only stops if s* is zero or the pointer s is zero.

Also you need to calculate size from the byte in the word that is zero, not the word itself.

tqh··on Strlen(buf) – Not as simple as you’d think
I was thinking more how branch prediction is handled in the pipeline. Agner Fog states that on Haswell having branches in the same 16 byte block affects performance. Probably not enough to matter though.
tqh··on Strlen(buf) – Not as simple as you’d think
Kind of similar to the one I wrote for Haiku: http://cgit.haiku-os.org/haiku/tree/src/system/libroot/posix... Makes me wonder if having testbyte() inside the loop will be good for branch prediction.

And IIRC repe cmpsb isn't bad for longer strings on new x86. It's the initial setup that adds overhead. Still, you want to make a fast general solution.

tqh··on Why does anyone still use Eclipse?
Google has switched to Idea with Android Studio: http://developer.android.com/sdk/installing/studio.html
tqh··on Jemalloc
I've been keeping an eye on malloc's for quite a while, and they are getting ridiculously big nowadays. The malloc complexity seems to be greater than the programs themselves. With that kind of complexity it's hard to do objective comparisons, and the frameworks to do objective tests are nowhere to be found. So it is no surprise everyone claims to be best. Hint: Complex malloc for complex things.

If you like mallocs: https://github.com/emeryberger/Malloc-Implementations. Don't think they have the disruptor based one yet: https://github.com/bytemaster/disruptor/tree/master/fc2

tqh··on Half an operating system: The triumph and tragedy of OS/2
256KB Rom, 512KB Ram. This was a time when harddrives was at ~ 40 MB, 512MB ram was unheard of.
tqh··on The Next Big Thing? Responsive Icons
The Haiku Vector Icon Format[1] does this. See LOD info here[2]. 1) http://en.wikipedia.org/wiki/Haiku_Vector_Icon_Format 2) http://www.haiku-os.org/docs/userguide/sv_SE/applications/ic...
tqh··on Ask HN: Which Java connection pool?
DBCP seems to be a safe bet: http://wix.io/2013/06/12/how-many-threads-does-it-take-to-fi...

But I think the new connection pool in Tomcat might be interesting as well.

tqh··on Modern C++: don't use f*cking pointers.
Ah thanks for clearing that up. It's in a newer (C++03?) standard. I still have to deal with gcc 2.95 on a regular basis so I'm stuck in the old ways. I guess that is why the title was 'Modern C++'.
tqh··on Modern C++: don't use f*cking pointers.
To me at least build_new_object example seems horribly wrong: If you allocate the object on the stack and then returns it, it will go out of scope with the function, and the memory overwritten with next stack usage. Or does modern C++ do some magic nowadays?
tqh··on What's new in Neo4j 2.0
I really really wish they'd Javadoc their code properly, before they do anything else at all..
tqh··on Doug Engelbart has died
It's not intended. It's clock and/or data-signals that leaks and has gotten amplified, if you look at it in an oscillator you will probably see a square or sawtooth wave at around 1KHz. You might even be able to read that data...
tqh··on How Many Threads Does It Take to Fill a Pool?
Very good article, it would be interesting to look at Tomcats new connection pool as well: http://people.apache.org/~fhanik/jdbc-pool/jdbc-pool.html
tqh··on Ask HN: What is the best fiction book you've ever read?
The Baroque cycle: Quicksilver, The Confusion and System of the World is awesome as well. Who doesn't want to read fiction about The Royal Society, Isaac Newton and Liebniz mixed in with phrases in the line with "In memory of Englands greatest swordsman, beaten to death with a club by an Irishman". http://en.wikipedia.org/wiki/The_Baroque_Cycle
tqh··on Haiku Operating System
Package management will make OS upgrades easier. Dependencies as opposed to static linking will allow the CPU to run and cache used code better instead of reading and discarding the same code from different parts of memory. Compression will make the handling less IO bound and a bit more CPU intensive, but disks are slow and CPU's are faaaast! If you think it will be slow and complicated, I think you will be in for a pleasant surprise later on.
← PreviousPage 2 of 3Next →