HNHacker News
TopNewBestAskShowJobs

tobiasu

1,210 karma · joined January 11, 2011

submissionscomments
tobiasu··on Printable True Bugs Wait Posters
The n in strncpy describes to what size the destination buffer (not string) should be padded with '\0'.

This is useful for copying a string into a fixed size buffer that is sent over the network, to give an example. It's not what the programmer generally means when using strncpy.

Many programmers are surprised when they learn that strncpy() really writes 1M-strlen("abc") zeros in the 1M char array every time it's called...

tobiasu··on About Ukraine
Yes seriously. The US and EU are the reason why Russia sees the need to defends its western borders. This conflict is as much about internal politics in Ukraine as it is about geopolitical failures.

If the EU members would cling less to the US (instead of letting them build a rocket shield in Poland), Russia would possibly have fewer reasons to keep a pro-Russian buffer zone.

tobiasu··on Everest is littered with dead, exposed bodies [2010]
What is the point of life? Before you declare others selfish, maybe start at your own front door.
tobiasu··on Medium raises $25 million
I find the assertion that the general public will curate high quality content pretty amusing.

One only needs to look at the front page of reddit or youtube to see what kind of an intellectual world we live in.

tobiasu··on US Government: Guards may be responsible for half of prison sex assaults
The author (https://twitter.com/marisahtaylor) looks as American as it gets. Your smoke screen in the form of Quatar criticism is pathetic.

Look! The leader of the free world is better than North Korea. Everyone should shut up and be happy. Ridiculous.

tobiasu··on Richard Stallman - Re: clang vs free software
Grants: http://en.wikipedia.org/wiki/Richard_Stallman#Honors_and_awa...

It's said he has some serious cash in the bank. Given his eccentric but modest lifestyle, I doubt he'll ever have financial problems.

tobiasu··on OpenBSD receives approximately $100,000 in donations
OpenBSD has more expenses than just an electricity bill.
tobiasu··on Romanian saves OpenBSD?
I've written some stuff about that in the other thread you got linked to, but I would like to add something:

A single rack costs $1900/month in Calgary, and has insufficient power (15A) for dense packing.

So a commercial rack already costs more than OpenBSD needs in electricity, but OpenBSD has about 3 racks worth of gear.

tobiasu··on New gTLD investor Fred Kreuger: Dot Com Will Be Dead in 10 Years
If you follow this link, you will find a whole sub-culture whose existance must've been the driving motivation behind the invention of the flame thrower.
tobiasu··on Ad blockers: A solution or a problem?
I know nothing about the last one, but the two others I imagine lots of people can do without...

This for-profit free-content model also ruins a lot of paid business models, which might otherwise be successful. We get rid of the overhead of the advertisment industry and retain more money to pay for good journalism etc.

tobiasu··on Recommended Reading List for Developers [pdf]
JavaScript, holds PDFs hostage, adds zero value (my browser can display PDFs just fine, thank you very much), operates a business based on copyright violation.
tobiasu··on OpenBSD will shut down if we do not have the funding to keep the lights on
I don't think so. The foundation probably doesn't have anyone anywhere in Asia with a bank account that can receive Paypal donations. The idea is to save transaction costs, not limit donations to certain parts of the world.
tobiasu··on OpenBSD will shut down if we do not have the funding to keep the lights on
You appear not to realise that SGI hardware contains MIPS CPUs. A large amount of code is shared between these platforms:

http://www.openbsd.org/sgi.html http://www.openbsd.org/octeon.html http://www.openbsd.org/loongson.html

A mips32 port would also be very desirable for all those shitty little routers with their ancient Linux kernel, but sadly nobody is working on that at the moment.

So, should the network and firewall OS that many people claim OpenBSD is, slash its support for MIPS devices?

tobiasu··on OpenBSD will shut down if we do not have the funding to keep the lights on
Yes, AC is required. Machines need to be shut down whenever it fails.
tobiasu··on OpenBSD will shut down if we do not have the funding to keep the lights on
This discussion comes up every time only because some people seem to think OS development is like racking new x86 servers running RHEL.

Many of the machines do not have LOM. They have hardware failures instead. They hang because they get trashed building OpenBSD and ports pretty much 24/7. There is debugging and serial cables going on. Someone needs to push that NMI button and check the LEDs flicker like they should. Reboot them. Constantly update to the latest development version, making them panic quite a bit. Diagnose that. Installation procedure requires console access, monitor adapters, weird keyboards, ... They don't fit in racks properly. There are security concerns. Etc, etc.

It's wrong to think of the machine room as rack space than can be had for cheap somewhere else. It's much more like a lab (with the mad professor living on top, controlling the experiment).

tobiasu··on OpenBSD will shut down if we do not have the funding to keep the lights on
Theo has a german bank account right here: http://www.openbsd.org/bank-donation.html
tobiasu··on Why 'Her' will dominate UI design even more than 'Minority Report'
Because discussions are deadly dull when everyone agrees.
tobiasu··on Using Rust for an Undergraduate OS Course
Implementing Erlang on bare metal would be a good idea for an OS class, writing code in it, not so much.
tobiasu··on Bzr is dying; Emacs needs to move
The command preceding this outburst was:

$ sudo braindump bachback.core|tail

;-)

tobiasu··on On the matter of strlcpy/strlcat acceptance by industry
glibc has a fork/flavour called eglibc because Ulrich consistently refused to integrate work that wasn't relevant to his big iron Red Hat server world.

For example he's "famous" for refusing to patch ldd to work with any posix shell instead of bash: https://www.sourceware.org/bugzilla/show_bug.cgi?id=3266

It was recently fixed, but only after more considerate guys took over maintainership...

tobiasu··on On the matter of strlcpy/strlcat acceptance by industry
Because the argument why they are "stupid" is missing entirely. Much of the second paragraph was edited in later.
tobiasu··on On the matter of strlcpy/strlcat acceptance by industry
If the world wrote perfect code, nobody would have ever needed to replace strcpy. Water is wet.

Yet somehow, even you admit that they have some use because "almost no value" is infinitely more value than "no value". The benefit you describe is exactly what's beneficial. strlcpy does the length calculation, and prevents overflowing the buffer, which is a reasonable improvement over calling strcpy and trusting that previous checks (if they exist at all) are correct. Truncation (unless intended) can never occur when the program is correct, it merely exchanges one vulnerability for another one, which rarely can be exploited.

That noone checks for the return value is trivially false. That Theo only cares about usage and not about correct usage is also false. Just because something isn't in a mail doesn't mean you can come to the reverse conclusion and claim the person doesn't care about a topic not mentioned. Most people tackle bigger problems first, before getting into discussions about writing "perfect" code.

Given you are a perfect programmer (I assume), why don't you check the openssh code you quoted and let us know how you would've handled it? I looked at it, it's part of (portable) utmp logging and will truncate the username from passwd(5) to fit into the utmp structure. Nothing much can be done about it, because the two structures do not agree on common size limits.

Demanding perfection while being unwilling to improve the status quo is hypocritical.

tobiasu··on On the matter of strlcpy/strlcat acceptance by industry
strl* fail just like any other C function in libc. They return, like snprintf(), the total length of the string and let the programmer deal with it.

strlcpy(buf, s, sizeof(buf)) >= sizeof(buf)

Rocket science.

Ulrichs reputation is well deserved, he worked very hard on it.

tobiasu··on My Hardest Bug
This is quite common when working on unshielded electronics. Standing up from a chair, depending on clothes and chair fabric, generates a huge amount of static. Even just walking past can be enough.

Proper hardware development labs have antistatic carpet etc., but in embedded software development, one often doesn't have this luxury and has to be aware.

tobiasu··on Researchers crack the world’s toughest encryption
Can extremetech please be added to the list of websites blocked by default on HN.

There is never any original content from that site, it's always rehashed crap, littered with buzzwords and reeking of the dead corpse of journalistic integrity.

tobiasu··on BASH as a Modern Programming Language [ppt]
But it should be.
tobiasu··on As engineers, we must consider the ethical implications of our work
It's pretty easy to divide the world in black and white, but rarely helps anyone.
tobiasu··on Computer-driven cars will convulse the automotive industry
Something completely lost on tons of nerds seems to be that people genuinely enjoy operating their cars (and motorcycles).
tobiasu··on Top-Selling Car in Norway Now Electric Car Two Months in a Row
You can't wait for Canada to put a 100+% tax on gas-powered vehicles? I have bad news for you...
tobiasu··on Roominate: A Building Toy for Girls
Instead of wasting money on this sexist crap, build a real dollhouse with your kids from scratch. The process involves the whole family and has interesting parts for any gender.
← PreviousPage 3 of 9Next →