skysight-inc/HackerNews huggingface dataset:
> A computer will never live as long as The Trial. … What if Amerika was only written for 32-bit Power PC?

This line kind of got me, and made me think about the transience of my own work. I build educational software, and I entered this field because I was inspired by the educational games I played as a kid. Most of those games, developed for a specific operating system, can still be run today on a VM or an emulator of an older Windows machine. But the apps I work on are web applications - we're constantly racing to update and maintain them in a sea of ever-changing devices and standards. The odds of somebody being able to run my work, even a just few years from now, and have it work without issue is unfortunately kind of small (the introduction of iOS 8 already wreaked havoc on some of our layouts). And that makes me kind of sad.
Casting a constant zero to a pointer type yields a null pointer. The conversion is done at compile time, so the compiler knows that a null pointer is the required result.

There is no requirement for an integer-to-pointer conversion to retain the bit pattern of the integer value, any more than an integer-to-floating-point conversion is required to do so.

In most modern implementations, conversions among integer and pointer types of the same size are trivial, simply reinterpreting the bits as a value of a different type.

A conforming C or C++ compiler can use, for example, the bit pattern 0xFFFFFFFF to represent a null pointer. Converting a constant 0 to a pointer type would yield a pointer with the representation 0xFFFFFFFF. Converting a non-constant 0 to a pointer type does not necessarily yield a null pointer; the result is implementation-defined, and may be indeterminate garbage.
This is my exact thought every freaking day while cycling to the office.
Would also like to give some props to Discworld MUD, which served as both my introduction to MUDs and to the Discworld book series. Still hanging in there, and being actively developed, almost 25 years after it was founded. It sports one of the smartest command parsers I've encountered in any MUD.
A neat trick in some languages is to modify the source so that the line numbers don't change, for example by using semicolons instead of newlines and making sure a newline never appears in inserted instrumentation code. But I'm not sure if that's possible in Go.
You didn't understand what I meant by "discipline". I didn't mean best-practices -- i.e. programmers learning to not abuse openness without any help from the language. What I meant was adding the missing controls to languages (making them more similar to the languages James criticizes) so proper discipline could be enforced: visibility, module systems, restrictions to change core runtime classes, optional static typing etc.
I agree, this would be an effective and efficient solution. Also I think introductory, and eventually upper year courses could be taught more interactively and autonomously. A human teacher isn't actually required for most material. I think a new paradigm in teaching methods for CS will naturally emerge. I'm thinking of an interactive learning tutorial and practice guide that's comprehensive enough to out perform the best human teachers.
You can write it in C. Bloody thing is like a particularly disgusting cockroach. I bet people can still read it in way too many years, to the extent that C can be read.
AND sacrificing time/resources on what should most likely be categorized as entertainment is a bad idea.
Being able to assume that a pointer is not null opens up some really interesting optimizations. For example, if you know that a pointer is dereferenceable, then you can speculatively hoist loads of it out of a loop as long as there are no possibly-aliasable pointer stores in between. That's why it's helpful for C compilers to be able to aggressively infer that pointers are not null.
Hi there, Edyn Founder and CEO here-- not sure that's a fair comparison. Most people who care about product design already know that Apple products are designed by Jonny Ive, so to mention it would be redundant. As a new startup, we don't have that kind of name recognition, but we know many of our customers value great design. We must be doing something right if you've picked up on it :)
No, it doesn't. The vast majority of gardeners have never heard of Yves Behar. It's a crutch for having a product anybody cares about.

Other than that, there is a difference between "mentioning" it and working with him, and having it in the title of everything.
How I'm testing the party’s 2015 manifestos on the video game Democracy 3
Unless you build in stone.
Their idea is that Maxwell's limit only applies to conductors, and what they use is dielectric ceramics.
Curiosity rover making tracks and observations
Ask HN: Employee, Partner or Co-Founder?
Someone I know has run into a little dilemma regarding "status" in a new company. Let's just say that this friend started a company and brought on their first actual employee after winning a few contracts about 6 months after the company was legally formed. My friend, the founder, never took a salary since the inception of the company, instead plowing all earnings and savings into this new employee's salary, taxes and other reimbursements to grow the business.

This employee eventually transitioned to working on a lower than market rate salary in exchange for equity at a later date. Now, this employee doesn't want to be referred to as a "partner" in the company but rather as a "co-founder" because of an increase in interest and activity, though not revenue (yet), that has occurred as a result of them coming on board to handle business development (which my founder friend actually trained this person to do while paying them over several months).

So, to make a long story short. Would you consider this person, who drew a salary (albeit at a lower than market rate), was paid with company revenue since joining about 4-6 months after incorporation, and who has put no personal guarantees on company debt(s) but does own some equity a "co-founder," "partner," or simply "employee?"

If not co-founder, how does my friend get through to this person and explain why they aren't really a "co-founder" without causing unnecessary tension?
In C++!. that's cool! But I laughed by just thinking at what Linus Torvalds would say lol.
The vast majority of apple users have never heard of Jonathan Ive.

Edit: No, you aren't doing something right because I've picked up on it. Every time I see it I think to myself "It's stupid that these guys keep doing this, I wonder what other mistakes they are making".
It depends on how drastic the switch is.

Most of these switches are driven by a shift to some new programming paradigm. We started with procedural programming, then made a big shift to object-oriented programming, and now we're starting to see a big shift toward functional/declarative programming. Who knows what'll be big next?

If this happens too frequently, then there are certainly going to be problems, yes. The current trend, however, indicates that it's not happening too frequently, at least not yet; the current shift from object-oriented imperative to functional/declarative programming (with some object orientation here and there, though this isn't very pronounced in Erlang and its family tree) seems to be by necessity rather than adopting shiny for the sake of shiny, and I think that's what makes the difference here.

Basically, the more dramatic the switch is, the more likely the switch to be a net gain rather than a net loss, since it indicates that the switch was truly necessary. Switching from Python to Ruby, for example, would be a net loss, since - while they have different syntax and in some cases different programming styles and ecosystems - they're both imperative scripting languages and you're not really changing all that much besides a bit of syntax and semantics. Meanwhile, a switch from Python to Haskell, for another example, is more likely to be a net gain, since you wouldn't even consider that switch unless you felt the need for the massive paradigm shift that's required to make such a switch.

As a disclaimer, my claims above are mostly conjecture, though I think they correspond well with reality, at least by my own observations.
If you want to read more than can handle about undefined behavior in C, check out John Regehr's blog (http://blog.regehr.org/) and academic papers (http://www.cs.utah.edu/~regehr/papers/). He also posts here on HN.
Oddly enough this was a hobby of mine along with doing close-up magic as a child - and is still something I enjoy doing when I'm thinking (I like keeping a deck of cards near my desk). I think after holding cards and constantly doing tricks - this became the next extension of playing with cards.

I think it's definitely similar to skateboarding or playing improv jazz on the piano where a number of small moves must be mastered to then allow you to stack them together rather than full sequences that have to be perfectly mastered. A good place to start is with Fold 2.0 if you're interested in something easy that looks cool[1].

[1]: https://www.youtube.com/watch?v=c3goA-Ci6t8
The standard offsetof macro is sometimes defined as:

#define offsetof(st, m) ((size_t)(&((st *)0)->m))

That expression has undefined behavior, since it dereferences a null pointer. That doesn't mean it's an invalid definition of offsetof for a given implementation.

Saying that it has "undefined behavior" means that the C language standard says nothing about how it behaves. If its behavior for the current compiler happens to satisfy the language requirements for offsetof, then it's a legitimate implementation. Code that implements the standard library is free to do whatever it likes, as long as the resulting behavior is correct.

Part of the problem, I think, is the way the question is phrased. Quoting the linked article:

> The programmers' community divided into two camps. The first claimed with confidence that it wasn't legal while the others were as sure saying that it was.

The word "legal" doesn't even occur in the C standard. Some program constructs violate constraints or syntax rules; any such violation requires a compile-time diagnostic (which may be a non-fatal error). Other constructs have "undefined behavior"; the standard places no restrictions on what compilers can do for such constructs. Only a `#error` directive actually requires a program to be rejected.
Here's a similar thing I made that just generates these sorts of triangles with some diffuse lighting: http://christopherhesse.github.io/delaunay-experiment/
No doubt.

But your real customers aren't going to care even a little bit.
Which is crazy because fully half of REM's whole catalog is inessential, and Fables is if not their second best album at least their third best, and is the bridge between the Murmur sound and the musical trajectory they'd start on with Document. Also: there's a difference between "darkness" and "melancholy", and also: better "dark" than "sophomorically shrill", which is the tone they adopted on Pageant, Document, and (especially) Green.

You can do better than Death Cab! I liked some of their earlier albums, but their lyrics have always been sort of weak and superficial to me (those lyrics also ruined The Postal Service for me).
Disappointing, given the title.
Research isn't just about finding new and unintuitive effects, its also about scientifically confirming and measuring what we know - or think we know - intuitively.
> To program any more was pointless. My programs would never live as long as [Kafka’s] The Trial.

The Trial had it been written today wouldn't have survived long either. It's a function of much less competition rather than quality IMHO.
Or advocating for massive reparations.
After reading that, through a great deal of time and effort I discovered the corollary to that, which is people who own a first item are 50% more likely to acquire a second item.
I'm not sure I understand your point, but I agree, most people probably don't follow/research product designers. That said, some people do and they have proven to be early adopters of our product.
I'm pretty sure you can negotiate this with HR at Google. I've seen it done for internships at Microsoft, so I don't see why Google would be any different. Most companies hire interns based on personal projects, so they're fairly receptive to letting interns continue working on them (in their own time, without Google resources).
Thanks, I'm not sure why I'm being downvoted. Maybe it's because I'm not backing up my statements about the corruption and negligence of those in charge of the financial and economic well-being of the country.

Congress appointed an independent, 10-person panel of lawyers, economists, businessmen, financiers, and auditors (known as the FCIC) to explore the causes of the financial crisis. Here are there findings, for anyone who is interested in learning a bit more about a topic that is not very well understood for the amount that it is casually discussed.

http://fcic-static.law.stanford.edu/cdn_media/fcic-reports/f...
I'd like to be able to completely pause all goroutines and slowly analyze the state of each one. You can probably just add some mutex or waitgroup to your line() method and just lock it when a goroutine pauses, no?
Certainly not the majority. Scene releases still feature, but they are no longer consistently the first to market, and they are almost universally derided for prioritising speed over quality.

Scene rules are anachronistic and slow to change. The MP3 scene stuck to -V2 VBR for far too long, for example; the change to -V0 VBR in 2011 came as the sharing of FLACs was already ubiquitous outside the scene, and it wasn't until 2012 that the FLAC scene was established. Even now CUE and LOG files are not required from a CD source, which is insane.
It's true, I have no reason to learn a different method as I have no reason to write anything by hand, but thank you for sharing the information. I suppose I had just assumed it was something people got used to, or that regular practice would build up hand strength in such a way that it would no longer hurt.
agreed about the marketing. i follow a lot of indie blogs so i had heard about the new record, but very little considering it's death cab. they tend to come up in the mainstream a decent amount as well, but i haven't seen anything.

re: walla's departure, i think they'll be ok without him. gibbard is unique and the leader but to me, the saving grace of this band will always be jason mcgerr. he's one of the great drummers and creative forces in this genre today.
I do see your point. Probably from a gardeners point of view this is not really important, I'm maybe biased a bit in that I'd look for a product with good design, that looked like the people cared about what they built, rather than something that looked like it was built to minimise cost.

The article was in wired though, and that's the kind of readership that maybe will care about the company and the people behind the product. It's one of the traps that a lot of startups fall into though, that a lot of their messages seem targeted at the startup community rather than at their actual customers.
Down votes why? As a black man I find this sad.
Good question. I think https://news.ycombinator.com/item?id=9411158 is right, but I haven't looked at it closely yet. Thanks for bringing it up!
Every instruction on ARM (vanilla: no 64, no Thumb) has a condition code field.
You certainly could be right in the long run, but so far many of our early adopters do care.
The Name of the Rose. Read as a young teenager, just as I was learning to code and do other things. Hidden knowledge theme.
Quite the opposite. A punch on the chin will knock you out easily.
i would agree with you if most prisoners were not there on drug charges, or if black Americans didn't spend as much time in prison as violent criminals.

http://www.drugwarfacts.org/cms/prisons_and_drugs#sthash.OPr...

It is blatantly, flagrantly institutionally racist.

> (Number Of People Serving Time For Drug Offenses In US Prisons)

> Federal: "Between 2001 and 2013, more than half of prisoners serving sentences of more than a year in federal facilities were convicted of drug offenses (table 15 and table 16). On September 30, 2013 (the end of the most recent fiscal year for which federal offense data were available), 98,200 inmates (51% of the federal prison population) were imprisoned for possession, trafficking, or other drug crimes."

The US imprisons more people than any other country; many of those prisoners are there for drug crime; white people and black people take drugs in roughly similar proportions yet black people are far more likely to be imprisoned for similar drug offences.

> (US Drug Prisoners) "The United States leads the world in the number of people incarcerated in federal and state correctional facilities. There are currently more than 2 million people in American prisons or jails. Approximately one-quarter of those people held in U.S. prisons or jails have been convicted of a drug offense. The United States incarcerates more people for drug offenses than any other country. With an estimated 6.8 million Americans struggling with drug abuse or dependence, the growth of the prison population continues to be driven largely by incarceration for drug offenses."

Edit: changed first sentence which was attacky to this which I think is less so.
"How is public transportation going to get so good that this car-dependence will go away?"

Its too much money to rebuild LA for public transit, and given the next step in transportation is automated vehicles why buck the trend and just go with it. We talk a lot about how automated vehicles will change things for individuals or families, but what about public transportation departments? I get the feeling that swarms of automated vehicles will be cheaper than adding light rail.
I severely hope device ma ufacturers don't start not including headphone jacks, in favor of bluetooth connections. The only headphones I'd be able to use on those would be significantly more expensive, unless I just had a bluetooth audio receiver that had a 3.5mm hole, which I'd still have to charge or replace the batteries of
Ask HN: What license should I use in my open-source startup/product?
tl;dr

What license should I use for the codebase in order to protect it and still be open?

---

Hey guys,

I'm about to open-source my product in the summer and I want to build something great, with the help of the community, out of this and the main goal is to make the code available somewhere (it will end up in Github, 98% sure). I know that it might sound crazy, but I really want to give something back to the open-source community.

This has been proved to be a good strategy (Sentry rings a bell here, also Wordpress), I guess.

I'm trying to figure out what is the best license to my product/codebase. Some guidance would be nice.

Thanks in advance.
Are there videos of this contest? I had trouble finding any.
I know that gcc and clang both have __builtin_expect(). If you tell the compiler the more likely path, wouldn't that make the branching version faster?

Actually, I've always wondered how __builtin_expect translates to something the CPU's branch prediction engine can use...
Arctic Wolves Approach Workers in Canada [video]
So have many people. But from my experience, it is not a fun day when you find out the new compiler version you upgraded to 3 months month ago have "miscompiled" your code for the last 2 releases of your codebase, since it contained undefined behavior which worked fine for the past 15 years when using older versions of the compiler.
Hi, I'm the founder of SourceDNA. I'm happy to answer questions here.

It's difficult to track which 3rd-party libraries your apps include, especially in a large company and across acquisitions. If one of those libraries is vulnerable, how does its vendor (or open-source author) find the relevant developers and notify them?

At SourceDNA, we're constantly indexing mobile apps and analyzing their code. On March 30th, we were able to look up which apps use AFNetworking (over 100k in the whole store), select those which were updated recently (20k), and then list which ones had the vulnerable code (AFNetworking 2.5.1, about 1,000 apps).

We just finished an update scan yesterday to see how well developers have been fixing this flaw. We were shocked to find that while 250 apps have been patched, the total number of vulnerable apps has risen to 1,500! Our theory is that these apps were being updated for other reasons and the development cycle is slow enough that the flawed code from Feb-March is just now appearing in recent releases.

We're offering a service to developers. Sign up with your email and we'll monitor your apps for you and notify you of flaws like this, as well as how to fix them. It is extremely low noise since we only tell you about flaws that affect your own code.

Check it out and I'd love your feedback: http://searchlight.sourcedna.com
Thanks, looks promising! My needs are pretty minimal at the moment but it will be both refreshing and educational to give this a go.

Duplicating all the DRAM wires at each and every level of abstraction was just hideous.
Business phone line for cheap
Interesting when I worked for the big telecom in the UK 20 years ago where give very strict instructions that NI numbers (uk' ss no) where NEVER to be used for any customer id purpose.

On pain of having the IB (Bt Security) jump up and down on you with size 9 boots - think the auditors in the laundry files but worse.
Simply being a part of a company from the start does not make you a founder, or even a partner. There are plenty of firms that pay in both salary and equity. Unless there was some form agreement, this person in my eyes is an employee.

What I would do in that position is sit down with the employee and explain in clear terms why they are not a founder or parter. If the owner is open to a partner, possibly offer up an agreement. However, I doubt there is any way to go over this without some tension. I would get it over with sooner rather than later, as the company grows it will only become more problematic.
Postgres Docker Container with Replication and Wal-E Archiving Support
Not to argue, but is being knocked out bad? It seems like a common occurrence to a fight is go to unconscious. Some people have strong chins. Would they do better in a no rules fight historically, if they didn't go down?
I'm sure we've made tons of mistakes... we are a startup :)
Installing this in a VM it appears there are four installation options:
1. Photon OS (Micro)
2. Photon Container OS (Minimal)
3. Photon Full OS (All)
4. Photon Custom OS

Looking at the Photon Getting Started Guide (for Fusion)[1] it looks like the same ISO is intended to support multiple types of installation, so it is not the ISO that is necessarily optimized but the resulting OS (based on the selection in the installation) that is supposed to be.

[1] Page 10 of https://vmware.github.io/photon/assets/files/getting_started...