skysight-inc/HackerNews huggingface dataset:
Not trying to say it isn't painful, just that people live with it and are still productive. And by not mandating a single one you get several experiments. Autoconf could be one. pkg-config another. The *bsds do interesting things with a particular dialect of makefiles. Even Microsoft has a few: the wdk build system, vs/msbuild, nmake... All of these have ups and downs but few of them are outright "wrong", we live with them and I wouldn't want to see any one mandated...
I do to. If its all data why can't some be thrown out to compress the file(s) size without damaging the consciousness? Which brings up the question of how much data can be discarded before it changes the emotional or personality DNA of the consciousness. Then I wonder how much of our personality is in the data and how much of it is in our corporeal body, which we would lose by uploading our mind.
But you should give the functions different names, since it is not valid to define the same symbol more than once (and there's no name mangling in C that enables function overloading).
Software and the Art of War
Not going to argue your decision, the process of splitting up is also a chance to change the platform.

We do a lot of non-Rails Ruby-work and did implement Microservice-Architectures in it and found it rather unproblematic. The trick is not to start with a full-stack and build down, but to start with a small kernel of an app, deploy it, add something, deploy it, iterate, iterate, iterate.
Oh, I see... I was talking about: Unity is free, Unreal is free, now Source engine from Valve.. So we're waiting for Xamarin's step in similar direction :)
If you made this site: You've got some console.log()s in there :)

Anyways so great to see this in action. I mean, one could also try this manually, but this is really nice.

PS: http://flexboxin5.com/scss/vendors/_animate.scss Failed to load resource: the server responded with a status of 404 (Not Found)
main.js:1117 1
Yes, you're correct [1], and that's why offsetof is a builtin in gcc and clang.

Even more insidious is the fact that memcpy of zero bytes from or to null is undefined behavior.

[1]: http://stackoverflow.com/questions/26906621/does-struct-name...
That's because you put it inside a function versus inside the file outside of a function. It'll compile then, even on clang with -std=c11. I just tried it now and it worked.

From his webpage: "Reminding you that it’s a separate source file and not a part of the function body or compound statement"
only useless if you never make a mistake ever. This shows what you should be vigilant for (alternatively , an argument for using a language with more checks)

As someone on HN once said (in jest), it's easy to write bug-free C, you just need to never make a mistake ever and spend a million hours auditing it.
Idle games. The rise of games you (mostly) don't play
YouMail Secures $5.5M Through JOBS Act
I wonder if it might be an issue with recent kernels (in the sense of not being out for a while).

I recall running some form of "stable" red hat without rebooting for very long time years ago, while my ubuntu LTS from last year has a "System restart required" MOTD every other week.
Round photos are so easy to have framed. /s

The phone looked good but it seems to be made for a market of steampunk fans and cosplayers. Not sure how long it will be around with sales of about 100 per year worldwide at that price.
Watch Mozilla preview WebGL 2
Since he's talking about undefined behavior in a lot of the cases, the answer to all your questions is, "Yes." That's pretty obvious, so maybe he thought it went without saying.
If you move from Ruby to Go and this works better for you, then choosing Ruby in the first place might - if it was not about a prototype or getting VC money or only found Ruby developers - be a failure on your part.
Nock – HTTP mocking and expectations library
Yeah, fear of landing in gaol/jail/prison, or your silly children landing in jail, is a pretty big thing. Consider also that jail in America is rather famous for being awful...

% of population of Germany in prison: 0.076%

% of population of US in prison: 0.707%

% of population of Canada in prison: 0.118%

source: http://www.prisonstudies.org/country/canada
Using jQuery plugins with npm
>Github became popular years after git was already spreading.

That's technically true, but the implication is not. There was less than three years between the launches of git and GitHub. While git was becoming popular, it was just one of several (D)VCS solutions. GitHub is what really separated it from the rest of the pack.
At Last GRID Is a Supercomputer That’s Made to Game
Companies that invest in rewriting everything from Ruby into Go instead of working on the business model seem to have a lot of money and a secure future and no competition.
You can begin by addressing all the gaps I found from a cursory glance. Go has many things going for it but you're comparing apples and oranges in your post and confounding the fact that you switched from a monolithic system to non-monolithic system. That alone removes a lot of overhead and blaming that design choice on your tools is just silly.

P.S.: There is no aggression. I'm tired of post-hoc rationalizations for rewrites of systems with bad initial design choices. Every single one of the issues you bring up could have been addressed without switching the language by an engineer well-versed in using the right libraries, celluloid and eventmachine being the first ones that come to mind for all the I/O bound stuff. I also believe in critically assessing all hype related to language and design choices and if I let your article go without criticism some impressionable young mind is going to think you're correct.
>Did he make sure the behavior he mentioned is uniform across all ISO standards?

I don't know.

>What is his source for coming up with a certain answer to a certain piece of code?

His conclusions are consistent with my understanding of the C standard. His justifications for his conclusions refer to specific rules regarding program behaviour, which suggests he's using the standard(s).

>First of all, this gives a strong indication that he's analyzing a compiler output, a compiler that he didn't reveal in the article.

He is using the output of some compiler to illustrate the potential consequences of making the given mistake. It doesn't really matter which; the point is that it is not legal to perform lvalue-to-rvalue conversion on the result of indirecting through a null pointer.

>could you or him point me to any page in the C99 standard document where it is explicitly stated along the lines that the compiler "should assume" the pointer to be not NULL after an undefined dereferencing in line (1) and hence ignore (2) and (3)?

No, because the C99 standard document does not say that. What it does say is effectively that the compiler MAY assume the pointer not to be null; more generally, the compiler is allowed to assume that the program never exhibits undefined behaviour.
I'll readily admit that there are corners of C where I would not be able to tell you just what breaks. But I know about where they are and enough to stay away from them. If I'm not sure, the next guy won't be either.

I got 12/12 here. I would say I know C.
LibreSSL is doing the first part of that. When it's in a useable state, switch to that and leave OpenSSL in the past.
I think this was silly, the author clearly does know C but they are complaining about optimizing compilers which do things "behind your back" and are becoming an increasing nuisance. It's sort of a passive aggressive "I think this should be an error but it isn't an error because twisted logic that the compiler uses with respect to undefined operation."

That people can teach themselves what to expect the compiler to do isn't all that surprising, and it also isn't surprising that a "modern" compiler does stuff an "old" C programmer might think is ridiculous.

I've engaged in this particular argument a few times only to throw up my hands in frustration over some exquisitely twisted line of reasoning that gave the compiler hacker person a fraction of a percent improvement[1] by exploiting this kind of situation. As long as I have a compiler flag that turns it all off its tolerable. But sheesh, sometimes I think these are C programmers who don't have the guts to become Rust programmers. You want to start fresh dudes, clean slate. Embrace it.

[1] "But Chuck, over the millions of machines out there its like an entire computer's worth of CPU cycles you can use for something else!"
And Autodesk! https://news.ycombinator.com/item?id=9141095
Is it a USB boot drive or a little micro PC that plugs into a monitor?

It would be nice to have a cheap "disposable laptop" that works off a cloud-desktop that you don't need to worry about losing or breaking. People don't buy laptops because they're slow anymore, but because they're physically worn out!

The equivalent of a cheap Chromebook that's like a real desktop with lots of power and runs Windows games and real applications!

In the future, I wonder how you could implement a cloud-desktop that's zero-knowledge a la SpiderOak. That would be the ultimate secure workstation.
As I said below, if you tread off the full-stack-track, you get a lot of the go-like things in Ruby as well.

My point being: I usually rate architectural changes as more important as a change in development details (and the programming language might be a big one there, but it still is one, IMHO).

I'll tell you why: a lot of the sentiments people bring when they now switch from Ruby to Go, I've heard before. When people started Ruby - I was already doing Ruby for ~2 years before Rails even came out at it got me into the position of saying: "just you wait until you see the bad parts". They attributed a lot of things to Ruby, while they were really changing their development model.
Real Time Ray tracing is still very far off. Brigade serves as a good proof of concept, but a lot of things are yet to be researched and implemented to make it viable in commercial sphere. Seeing the progress, I do not think commercial real time ray traced game will be a reality any time soon in this decade.
How do you think the previous design was bad? It might have been just the right thing for the first 2 years.
I'm still confused with flex-grow (step 28). When I set the value of an item to 2 while the other items remain at 1, it increase in width a little bit but not nearly twice as much (relative to the others). What does 2 actual do here?

Chrome 41.0.2272.76 m
Electronic helpers are fine, as long as you can easily replace them.
I have heard that this is common in Scandinavian countries like Sweden and Norway, although I haven't seen it - for example, Norway: http://relocation.no/archives/culture-shock-norway-outdoor-s...
Knowledge is not absolute. Yes you can be a C expert and still not know every single little detail about C or any other language for that matter.
The search on the homepage is confusing to the point of seeming broken. I clicked 'Areas' and selected a few different neighborhoods in SF. Nothing happened. Clicked away. Nothing happened. Clicked the out-of-the-way, 'search' button (which was confusing because it was too wide to be a button and looked almost more like its true calling life was to be an input field). I don't think anything happened? Closed page.
Maybe I misunderstand, but I don't think you want the advice of someone who doesn't know either, you want the advice of someone who knows both well.

FWIW, I'm a longtime C++ user, and used C# with Unity for a bit. I would recommend C++ if you need high-performance, low-level control, or access to native APIs. I would recommend C# if you want good performance in a Java-like language with the best parts of Java and C++. Also if you want to get a job with the Microsofty sorts of companies that have historically used C#.

However, you are more realistically constrained by your 3D engine. Unity does not have the option of C++ (to my knowledge). I'm assuming Unreal does not support C#. In the case of 3D engines your choice of engine is much more important than language.
Ruby is the new Java everyone is bashing.
Go is the new Ruby everyone is hyping.

If you replace every mention of Ruby with Java, and every mention of Go with Ruby in the comments on HN, then you've invented a time machine to go back 10 years.

And if you do this with C, welcome to 1995.
OFF:

Please do not use gray fonts on light background. Black is fine, really. Dark gray is acceptable for background of dark themes since it usually a compromise between contrast and hurting the eye by making the reader's pupils to dilate. There is no such compromise for light themes (well, if you don't count readablity <-> design and your really should weight readability much more).

It's not this article only, but this article made me to change the color in the developer console.
Glad I'm not the only one who didn't find anything here that would make me think I didn't know C.
Story behind housing.com's ambitious redesign
The questions are about the C language, not any particular implementation thereof. Question 2 requires you to know that different compilers may at times legally do different things with the same piece of code. Answering question 2 does not require you to know which compiler is in use. Instead it requires you to think in the mindset of someone trying to write portable code that will work as intended with any compliant compiler.

In this case, the code is invalid because it invokes undefined behavior, and the compiler is allowed to do literally anything. The author of a portable C program is not allowed to rely on any particular behavior. I don't have any of the ISO C standards docs handy, but I'm quite certain that they all agree here. The (probably hypothetical) compiler in use here is apparently trying to apply several heuristics that are useful in other situations but fail here because there is no right answer.

In general, the C standards avoid requiring a specific behavior where choosing to require a specific behavior could hurt portability. Most C compilers make use of their leeway to interpret things in a manner that helps make bad code run and many compilers make promises beyond those required by the standard to aid in writing non-portable code.
That's like saying that SSH isn't more secure than Telnet unless you personally drive to the data center and verify the fingerprints of every single server by hand.

In reality, TOFU is a form of key verification and it is highly effective against MITM attacks because there's no way for an adversary to reliably determine whether or not a user is seeing a fingerprint for the first time. If at any point the fingerprint changes, the users are warned.

Users can also easily check and compare fingerprints too. They are not mutually exclusive.
That's what offsetof() is for! http://man7.org/linux/man-pages/man3/offsetof.3.html
sybil attack has nothing to do with byzantine consensus. If you cannot trust majority of the nodes, it has no sense to reach any consensus. an analogy is, making money and can money make you happy, 2 issues, completely independent.
Since the title seems to be controversial we changed it to a neutral one.
I think it's because for something so infinitely valuable to you, even the tiniest risk is something you want to eliminate to the best of your ability.

I am not unhappy to see my toddler have accidents only likely to result in a graze/scratch/bump because those teach lessons without risk. But, at that age at least, other things (climbing recklessly, head first over things, etc) I'm less comfortable with.

Perhaps over time, parents have become ever more aware of just how many low-chance dangers there are.
Yes, me too. Chrome 41.0.2272.76m
What Creative People Can Learn from the Guy Who Invented “Tarzan”
Maybe it wasn't but if they're complaining about deploying a Ruby service then something is wrong already in their deployment pipeline so I'm just extrapolating. I've deployed plenty of Ruby codebases and it's no more complicated deploying it than anything else that doesn't neatly fit in a single binary.
Oh, were that be true!

I've seen stuff covered under bloody NDAs being carelessly shoved into Dropbox or Google drive.

No one serious about their work is using them as a platform to work their files on, but they are used for that.
New Blog Post – The Truth about Lady Barrymore, the Boxing Baroness
Any chance for REM0TE?
Building a photography inspiration app in Swift
> ... MAY assume ...

and therefore his claim:

> ... Turns out, bar() is invoked even when x is the null pointer ...

is incorrect (bar may or may not be invoked) and misleading for C newbies, without any mention of the subtleties of standards and implementations. Hence my original comment.
just fucking use

for(i = 0; i < length; i++)
.. do something with (length - i - 1) ..

I've been much happier since I started writing all loops as incrementing loops.
The Overprotected Kid (2014)
WebMate: Automatic cross-browser testing
It's pretty much what pops into my head every time I see things like these. I got most of those correct, but my universal reaction was why the hell would I write something like that in the first place?
Rewriting a monolithic platform as a set of microservices will almost always result in improvements from every perspective. You're replacing legacy code with new, cruft-free code; you're de-coupling parts of the system; you're building a more scalable design.

For example, if you're in the situation where you've gone from 12GB to 5MB of memory consumption, then you have a design issue and not a language one. That's not Ruby's fault.

We are also in the process of converting several monoliths into a microservice-driven system, but we are doing so with Ruby. It remains great language to use for building web apps, and I suspect some of the push back against it is caused by a dislike of the cliché giant Rails monolith that we've all come across, with hundreds of gem dependencies and so on. Rubby and Rails have a habit of encouraging such bad designs primarily through ease of use, but it's hard to see that as a problem with Ruby.

Go is a good tool for doing the same, and single-binary deployment is pretty magic. I'm sure it'll be supported for ages, so if you want to re-tool to use that then go for it! But Ruby's a viable option too, and it's important not to place blame for bad app design in the wrong place.
> ... the compiler is allowed to do literally anything ...

and yet he makes the claim that "bar() is invoked" which is not only incorrect (bar may or may not be invoked), but also misleading for C newbies who are actually trying to learn something by reading this article. Hence my original comment.
Attempting to regulate AI R&D would be about as affective as attempting to regulate worms and botnets.
Saddle point?
We are a fad driven industry.

They could have rewrote it in java in a similar amount of time, and with the same results. And they could hire from the large pool of expert java devs. Of course that's not "cool".
I can't tell if you are serious or making a joke. All that guy does is talk about startup culture and not about actively growing his business (and being successful at it).
I don't believe the author is claiming that C is obsolete; nor do I believe he is claiming that no one knows C.

What I do think he's implying, if not outright claiming, is that there are many people who grossly overestimate their knowledge of the language. That doesn't mean there aren't a lot of very talented and knowledgeable C programmers— but there are a lot of people out there who think they're hot shit because they've done all the exercises in K&R, but who have no real familiarity with the formal semantics of standard C.
I definitely agree that, by far, the best way to do this is to just use type punning with pointers. But if you really want to rebuild this yourself, you can still do so without the unsafe pointer, by handling signed and unsigned separately.

Unsigned is easy:

func integerWithBytes<T: UnsignedIntegerType>(bytes: [UInt8]) -> T? {
if bytes.count < sizeof(T.self) {
return nil
}
var acc: UIntMax = 0
for var i = 0; i < sizeof(T.self); i++ {
acc |= bytes[i].toUIntMax() << UIntMax(i * 8)
}
// UnsignedIntegerType defines init(_: UIntMax)
return T(acc)
}

Signed is trickier because of the sign bit. You have to sign-extend manually:

func integerWithBytes<T: SignedIntegerType>(bytes: [UInt8]) -> T? {
if bytes.count < sizeof(T.self) {
return nil
}
var acc: UIntMax = 0
for var i = 0; i < sizeof(T.self); i++ {
acc |= bytes[i].toUIntMax() << UIntMax(i * 8)
}
if sizeof(T.self) < sizeof(UIntMax.self) {
// sign-extend the accumulator first
if bytes[sizeof(T.self)-1] & 0x80 != 0 {
for var i = sizeof(T.self); i < sizeof(UIntMax.self); i++ {
acc |= 0xFF << UIntMax(i * 8)
}
}
}
// We're assuming that IntMax is the same size as UIntMax and therefore
// uses init(bitPattern:) to convert, but that should be safe.
let signed = IntMax(bitPattern: acc)
// SignedIntegerType defines init(_: IntMax)
return T(signed)
}
Ah, yes. I agree, I've seen quite a few very smooth Ruby deploy pipelines as well.
I find interesting the way they've designed the site to build communities based on trust. Actually, it's something it's always been there. I don't know in the States but in Europe it's pretty common to see small villages in which its citizens know each other well, share their things or show up at someone's home without letting know previously...the kind of things you do when you trust your neighbours...

Even though I think sometimes we're trying to rediscover the wheel, I like the concept
I'm not against complaining, but people often forget that the web is incrementally updating, today's web is different than 2014's web, and different than 2013's web, and absolutely different than 2003's web.

The fact that there aren't perfect conditions today doesn't mean that the conditions won't improve tomorrow.
I'd go much further back. The idea of turning the game engines and tooling into a commodity dates at least as far back as the early 80's, and I'd expect it dates back to before that too.

The first game creation tools I used, were:

The Quill, 1983: https://en.wikipedia.org/wiki/The_Quill

The Games Creator, 1984: http://www.lemon64.com/?mainurl=http%3A//www.lemon64.com/gam...

Shoot-'Em-Up Construction Kit, 1987: https://en.wikipedia.org/wiki/Shoot-%27Em-Up_Construction_Ki...

At least SEUCK has been used to make commercial (indie) games, and I think The Quill has too.

While not free, these were cheap. Cheap enough that kids were getting them.
Not sure which of my questions you're referring to.

As I replied to others, saying "bar() is invoked" is not only not obvious, it's incorrect. bar() may or may not be invoked.
Cebu Beach Resorts – Best Selection
> they are complaining about optimizing compilers which do things "behind your back" and are becoming an increasing nuisance.

Actually no. I think there was maybe one case where you could argue it was the optimizer that is producing different results than you'd expect for unoptimized output, but in most cases you have a problem that exists because of poor assumptions on the part of programmers/error prone language definitions.
YMMV, my production system, each unicorn worker consumes about 80M RES, so for 12G that's roughly about 150 workers, not that many.
Sadly, much of this code is idiomatic.
>I think this was silly, the author clearly does know C but they are complaining about optimizing compilers which do things "behind your back" and are becoming an increasing nuisance

I think the compiler behaviour is meant to be illustrative of the main point, not the main point itself, which I think is simply that the actual C language is more complicated than people appreciate. Most of the examples have nothing to do with optimization whatsoever; they're purely focused on correctness.
Assuming, of course, i is size_t and not int.
That's a curious definition of "recent years".
A lot of these are cases where I've seen actual bugs. Popular ones are >= 0 checks, dumb assumptions about overflows and null derefs, and the always popular "use an int when it should be size_t".
Gun Firm Offers $15000 for Mark One Carbon Fiber 3D Printer