skysight-inc/HackerNews huggingface dataset:
quoting myself from reddit:

About atoms: "calling integer_to_list and then list_to_atom on the current loop index."

There is a function called 'list_to_existing_atom' done to circumvent that. Note that each atom is only 4 bytes (8 bytes in a 64bit system) and you have to use several hundred of thousands of them for it to be problematic. As long as you don't dynamically create atoms from user input, it's not a problem.

Point 2 about 'process leaks' is valid, but fixable by the programmer again. Just make sure processes can die, or create a pool (what servers like mochiweb and YAWS do, as far as I know).

Flooding a mailbox has bitten lots of people in the ass, and is even a problem in the default settings of the OTP logger. Lots of people have gotten problems with the selective pattern match making their app die (too much in, not enough out). It's probably the biggest menace for an Erlang VM because it mainly becomes apparent under heavy load, which is sometimes harder to simulate and test for.

As for the binary problem, a general behavior causing the problem is that when you split a large binary, the fragments are just references to the big one until the process dies. So using these can often mean you'll mess up the reference counting. A work-around for that is to call a variation of "list_to_binary(binary_to_list(Bin))" which will allocate the binary as a new one separate from the large one.

Erlang definitely has problems, but to crash the VM with them takes some kind of mistake or lack of awareness on the programmer's side. I'm not writing this to contradict James Hague (he's one of the bloggers I like the most), just thought I'd complete/comment.
Ants: locks vs stm
iPhone Hackers Get a Break
At first glance, yes, unless there is a longer word in there
You are maybe to young to have known it, but HyperCard (http://en.wikipedia.org/wiki/Hypercard) is typically the kind of application that could be distributed via Opera Unite.
How do you solve the problems he mentioned in his followup post? He seems to be saying that there are a lot of people going on about how easy it is but no examples beyond simple games.
I completely agree with your point. Normally, it would be up to the reporters to verify this info. With Twitter and such we can go right to the sources which means we have more of a responsibility to verify what we read on our own instead of taking it as fact.
http://news.ycombinator.com/item?id=656107

Good guess from this guy 3 days ago.
If you can achieve your goals without drugs, I'd recommend that. Drugs are rarely precision fixes; taking the drugs we have now is akin to fixing a clock with a hammer: even when it works, something else is probably broken now.
This is exactly the idea I had a while ago. I was talking with a friend and we were designing a language where you would have pure and impure functions. That way you can easily see what's going on and what to expect but you don't have to jump through a load of hoops when modifying a bit of state would have done the job.
I think what's happening is not just "spending situation".

One of the paradoxes of this industry is that same work within the same time frame can be done by a group of 30 developers or by a small group of 3-4 developers. Same work, same time frame. There is a number of reasons for this, obvious or not, but the paradox I'm talking about is not why this is true, but rather why bloated companies still exist.

So I think what's happening is the laws of free market have just started fixing this situation gradually. Smaller companies will be winning more often, as well as languages and tools that suit rapid, focused development in small groups.

(P.S. Edit: I can't believe I said "rapid, focused", sounds like a cheap press release.)
I actually did live in New Zealand for half a year, and yes, I'd highly recommend this to anyone, if only for the perspective it gives you.
Now bad ones will be scarce, too.
There's always http://en.wikipedia.org/wiki/Aho-Corasick_algorithm
It will have some of the attributes of Twitter, but it is NOT a simple Twitter clone.

Are you actually going to have a business model then? :)
img{-ms-interpolation-mode:bicubic}
This is why I read HN! One line of code to fix one of my sites!
Weapon against epidemics: Cell Phones
Philg: Universities and Economic Growth
Germany to build the Internet Berlin Wall
Citizentube: Watching video change our world
Doing a Demo (VC Pitch or otherwise)
Eben Moglen, I believe, made some great points about the huge increase in distributed computing power (ie, the power of the laptops in the audience) in this talk:

http://radar.oreilly.com/2007/08/my-tonguelashing-from-eben-...

Data centers get a lot of press, and it is warranted, but regular old desktops and laptops (and smartphones, etc!) are incredibly powerful and underutilized. The internet doesn't have to be cable tv, it can be the telephone game with checksums.
Writing Content For Multiple Sites – Hard Work But Essential And Fun
1) It's twitters fault

2) It's dangerous

3) Some irony... http://bit.ly/13nYfY
Sparc
"the loss of the community feel"

That's the biggest feature that pushed flickr to the top of the photo sharing heap. Which is why this is a losing proposition for just about every existing-app-killer idea. Maybe it'll provide a dead simple way to do something new, but any system that relies on consistency and availability (most social networking apps) will suck.

How many 404's before you delete the bookmark and stop coming back?
which can result in performance problems

"Premature optimization is the root of all evil."

Computers are fast. On my machine, I can allocate, initialize, and garbage collect almost 4G of memory a second. This sort of thing is really fast, and is unlikely to be a performance problem.

When all of your data is immutable, however, you can reuse the data that you didn't change. The canonical example is a binary tree consisting of 2^n nodes. Changing one node only requires you to allocate n new nodes. As your tree gets bigger, the copying overhead goes to 0.

In the case of Haskell, the compiler is smart enough to figure this all out for you. So all you need to do is write correct code, and let the compiler make it work on a machine.

(It's also theoretically possible to reuse structures by mutating them instead of collecting-and-reallocating. You don't do that as part of your game, though, you let the compiler's optimizer do it. It will do it right, you will do it wrong.)
Zero To Page One On Google In A Week
This actually makes zero sense if you think about it. If the client is receiving messages via SMS, then strip the HTML. If it's a browser or API client, show a richer version.

No reason the lowest common denominator must dominate.
I wonder if they're waiting on number portability before they release it to the public. If it launched without portability, then all the new users would have to get new numbers, notify all their friends and family, etc., and then if number portability came along later it would be too late for them.
I'm disappointed that I have yet to see a decent discussion on HN on comparing the ML-style module system with OOP. It's really worth talking about.

Also, OCaml is sometimes called a "higher-order imperative programming language" instead of a functional programming language. It does have strict evaluation and first-class mutation, after all. I would argue that there is NOTHING awkward about writing code in it, controlling for libraries and development tools.
This doesn't carry even a hint of believability or humor. 8 upvotes for a story that's neither true nor funny?
Well, bovine growth hormone is not human growth hormone, so it's probably something else.

I looked for some peer-reviewed articles about this, and found:

http://www.sciencemag.org/cgi/content/abstract/249/4971/875

But of course, you should still support sustainable agriculture, especially since organic milk is not significantly more expensive than "conventional" milk. (Oh the irony of that term...)
UK Government lays out plans for online future
Interesting idea. Being that it is Twitter, I find it funny that they track Narcissism as one of the data points. I wonder if that starts at a higher baseline just because the user IS on Twitter after all?
I'm dubious of whether this is a real advantage. While the opportunity to expose more analysis to the raw data is real, it's much more likely that some people will take some unverified quotes out of context and amplify them for their own political purpose, and these falsities will become "facts".

People will most greatly believe things they can verify themselves. Twitter + Google change the game. The sky is blue, things fall down, and a whole onslaught of cross-corroborating first-hand reports readily accessible over the web that claim a politician is dead or a company is polluting, even if those reports are intentional disinformation by their enemies.
check out chapter 3 of "on lisp". specially the part about functional interfaces.
clojure is smart about it, and only copies what changed. start here: http://clojure.org/state
I'll use radix tree for dictionary, to speed up testing.

For words (son, sun, so, sunny) it would be:

root -> S -> O -> .
\ \-> N -> .
\-> U -> N -> .
\-> N -> Y -> .

Then - for each character in given string I'll make pointer pointing at root of dictionary tree.

Then in loop I would advance down each pointer in turn, until it's no longer possible to go down the tree, or the until the characters for given pointer ended.

When no pointer can be advanced, the pointer that gives longest word is the best.
Going to have to agree that this isn't at all shocking nor a "nice thing". MMS doesn't cost any extra on any other carrier and AT&T already charges outrageous prices for their SMS plans. Not sure why this article was written in the way it was. Don't give AT&T credit they do not deserve.
Being Thai myself, my general observation is that westerners (farangs) are always paid more than their thai counterparts doing the same job. This has always rubbed me the wrong way. It's like reverse racism almost.

Also although the cost of living CAN be low, if you wanted to live cheaply and save money, you'd have to live like a middle class Thai person. That means no Starbucks (who the heck pays 80 Baht for coffee when you can get REAL thai iced coffee for 5 on the street). Even what we know as fast foods are somewhat middle/upper middle class.

The foreigners I know living in Thailand seem to live a pretty upper class lifestyle here in Thailand because their dollar goes a long way so I'm not sure how much they are saving. Then again, they're not hackers.

Even normal things that middle class westerners are used to could be considered luxury for the middle class Thai. Cable for example is pretty expensive compared to the cost of food and living and so is internet. Travel in the city can be dirt cheap if you stick to public transporation.

So again, you can stretch the dollar if you are willing to be fruga. Then again you can do the same if you choose to live in the states.

Check out this article titled 'An Experiment on Cheap Living from 1872'
http://www.getrichslowly.org/blog/2009/05/23/an-experiment-i...
thought this would be an interesting note to add to your post here:

http://www.scientificamerican.com/podcast/episode.cfm?id=inc...
Sadly, Twitter is the best we can get right now. Does this mean we should ignore it? Absolutely not. Should we trust it without question? No way. We as a culture need to get used to "pseudo-news" chatter that we get from twitter. It's not verified reporting, but that doesn't mean it's worthless.
I hope that the content of the blog post is actually useful though. The key to promoting anything is to make the promotion itself useful. If you want to get a journalist to write about your X then you need to make sure that your X somehow fits into what they want to write about.

Same goes for this blog post. Yes, it talks about my book, but it should be educational. A lot of people pooh-pooh PR and marketing but they are vital to success.
Sometimes if an application is well designed and built that can be enough. It depends on other things though, such as if the marketplace is crowded or not.

Google is an example of something that won out because it was the better application, search wasn't a largely cluttered field though and they were taking a largely new angle on in. If your putting out another social networking app at the moment though it's unlikely to catch on just because it is the better designed app, just look at the troubles something as large and as well backed as friend feed is having.
Your brain may be signaling to you that doing well in class is not actually a good use of your time. You should listen to your brain, and figure out goals you actually believe in. The motivation then follows.
I think he means "not a team player" in a very literal sense: if you are too lazy to organize and document your code, you are valuing a few minutes of your time as more important than much more of someone else's. That "someone else" is most likely on your team.

I think that alignment and organization is important, but any formal system -- e.g., align all basic blocks of assignments -- is bound to be irritating. I align related statements, with liberal whitespace to distinguish unrelated sections of the same basic block.

"Why" comments are key not only on code, but on data structure definitions also. Is that tree any old tree, a min-heap, a BST, a DAG?
Not really.

Reznor profit: 1,000,000 * .80 = 800,000

RIAA profit: 1,000,000 * 18.98 = 18,980,000

4% profit. Fucking chump change to them; and not to mention that _they_ own your music, _not_ you.
Interesting discussion about this over on reddit with comments from one of the developers - http://www.reddit.com/r/programming/comments/8svh8/opera_uni...
EDIT: Revised running time and added code (in Ruby)

Build a Trie out of your dictionary. Then plug your string into and record depth/chars where it deadends. Repeat for you string with the first char removed. At the end you should have the longest substring.

Minor optimization would be to stop plugging things into the Trie once the remaining characters in the string are less than the longest word you have already found.

This should run in linear time (relative to your search string) because the recursion is limited by the longest word in the dictionary (depth of the trie). I have tested this out just for fun.

First I grabbed the Wikipedia page for 'line of succession to the British throne' and stripped it down to text only (352,000 chars). Then I added 'monarch' to my dictionary. Then I took the first 10k chars of the text and put it into my trie, getting back monarch as my match and timing it. Then I figured the ratio of time taken to size of string (10k). I repeated this for 20k chars, 30k chars ... 350k chars, and the ratio remains constant, indicating time increases in proportion to string length... linear time.

DICTIONARY = %w(a ants apple bear bicycle)

class LameTrie
def initialize(dict)
@trie = {}

dict.each {|word| insert(word) }
# obviously it'd be nice to only build this once
# and then write it out to disk, since our
# dictionary probably won't change much
end

def insert(word, level = @trie)
c, rest = h_t(word)
level[c] = {} unless level.has_key?(c)
if rest.empty?
level[c][:term] = true
else
insert(rest, level[c])
end
end

def longest_word(str)
result, n = '', str.length
n.times do |i|
t = longest?(str[i..-1])
result = t if t.size > result.size
break if result.size > n-i # our micro optimization
end
result
end

def longest?(str, level = @trie)
return '' if str.empty? or str.nil?

c, rest = h_t(str)

if level.has_key?(c)
x = longest?(rest, level[c])
if level[c].has_key?(:term) || !x.empty?
c + x
else
''
end
else
''
end
end

def h_t(str)
return str[0,1], str[1..-1]
end
end

t = LameTrie.new(DICTIONARY)

puts "Dictionary: #{DICTIONARY.inspect}"
puts '[emptystring] -> ' + t.longest_word('')
%w(a an antler crab crabapple pants polarbear adntsants oteuhbicyclentehut bearclaw).each do |str|
puts str + ' -> ' + t.longest_word(str)
end
The net negative producing programmer [pdf]
It is true that persistence is a default property of functional data structures but with a compiler or interpreter that isn't braindead you shouldn't get "pointless data copying" unless you hold and read both states after the transform. That is, it should be optimized away.
Everything has been done before :)
The main benefit, as I mentioned above, is that if a pure function works once, it works all the time. This is captured by the saying "in Haskell, if it compiles, it works", which is surprisingly often true.

If you have a function that moves a player in a game such as movePlayer :: PlayerState -> PlayerState, you know that it only changes the state of this player, and nothing else. In an OO language you would do something like player.doUpdate(), which has absolutely no guarantees.

Plus there are many facilities available to deal with threading and hiding state.
I think you're on to something here.

At work, a short comment in an email can very quickly build up into a large and complicated discussion. Lots of branching, occasionally hitting reply instead of reply-all, really a nasty mess. Part of the problem could be that I'm used to gmail and at work I have to use outlook, but I digress.

I think it would be really cool if once an email conversation kicks off, if I could send the entire thing to a resubj email address, and have it automatically build up the conversation up to that point. Then, the conversation could continue in resubj. If you implement this, or it is already in place and I missed it, let me know and I will start using your service immediately.

edit: also, if you set up some kind of api so that I could embed conversations on other websites, that would be kinda cool.
Running Giraffe | Environmental Boutique
Running Giraffe the environmental boutique offers wind chimes, body care, toys, and home accessories with many specials producing a feeling of harmony, serene in the environment.
can you show some examples of how you use them?
Smushit looks cool, but I've never really had a problem optimizing images with Photoshop. You have a lot of fine-grained control over compression and file size. If you discard the profile properly when doing a save for web, I'm not sure how it "doesn't fully optimize" images.

As for PNG files, I'd rather have the transparency and ability to tinker with different backgrounds than have to re-export a set of icons every time.
The issue here isn't that this law is bad in and of itself. There's no legitimate reason why child porn should be accessible. It's a crime and there is a definite victim so censorship of it is something that should happen. The trouble is, what ELSE gets censored in the future?
The comments on the site of the article submitted here in some cases express doubt about the story, but in other cases suggest that the story is just one real example among many. On balance, I tend to think the story is a true story, as it is represented to be on that site.

Humor is in the eye of the beholder. I guess I'd rather laugh than cry about such a story, but best of all, I'd like to know (as I have already asked here) how to keep such a thing from happening again.
i c wht ur syng.
I've isolated the problem to be with my will power - I never take initiatives, and I keep procrastinating on doing homework.

Drugs will not fix this problem. You need to improve your willpower and your study habits.
Right -- like Haskell, for example. Mixed paradigm programming is surely the way to go; ideology is surely the wrong way. C and OCaml both support mixed programming, but Haskell supports it better: monads allow you to isolate the side-effecting portions of your program. It's funny that the OP mentions Backus' FP, which had a "job control" language that functioned like the IO monad.
Just had a skim, looks like the kind of thing I was thinking altough clearly he's thought it through a bit more. Thanks for the link, I'll take a look properly later.
It is not something new. Tonido (http://www.tonido.com) did it
4 months back.
Amazing! He predicted in 2004 things like Heroku (prediction #2), Github (#3), Lisp/PG rise, HN !!! (#6), the Apple success (#9) and the kindly #10 :D
Not really,

Spending 10,000$ on a solar cell system in a good area, gives you far more energy over it's lifetime than buying 10,000$ in electricity from the grid today. The reason they are not cost effective is the diminishing value of future returns. AKA 100 dollars today is worth a lot more than something that would give you 100 dollars in 15 years.

PS: There is nothing low tech about a high effecency consentrating solar plant. It's a highly complex system that seems easy to understand, but the devil is in the details. Such as automaticly tracking the sun over the course of the day for years and buiding high effecnecy turbines ect.
NASA to create huge explosion on the moon in search of ice
:-) It's all part of the grand StatSheet Network plan. stat.us will be integrated into statsheet.com heavily and may be integrated into the upcoming StatSheet subscription service.
A few other real points of pain that I learnt while implementing dome dynamic resizing code in Rails recently:

* IE will not display JPEG images that have some types of embedded meta-data. This includes previews, which a lot of editing programs do include.

* IE and Safari both freak out on JPEG images that are in the CMYK colorspace. Conversion to RGB and removal of color profiles will fix this problem.

These are generally not big a deal when you're creating images yourself, but whenever you're accepting user-generated images these points could really bite you. I know they caused me a lot of pain!

Hope this saves someone at some point!
Analog TV era ends, DTV begins, complexity thrives
This same guy also wrote an article describing the exact same functional style game loop that you are describing:

http://prog21.dadgum.com/23.html
Top Security Minds Urge Google to Encrypt All Services
Adderall has the same exact stimulating effect on people with and without ADHD. It stimulates the part of the brain that keeps you calm and focused.
But lets not lose sight that without a little bit of cleverness and overengineering we'd still programming in machine code. Also it seems to me that pretty much every popular programming language out there (PHP, C++, Java, Python, Ruby, Erlang, etc.) is the result of overengineering and cleverness.

The few languages that aren't overengineered are the ones that either have a very specific domain (JavaSript), slow to change standards (C), or are very new (Clojure).

OP's idea also doesn't sound very over engineered to me. The whole draw loop thing is simply a convention and not an obvious one. I've taught many a student who stumbled on the idea of the render loop because there's simply nothing natural or obvious about it.

In the real world everything happens at once, there is no update-render-loop. Snapshoting the state of a multithreaded physics engine at discrete intervals in order to render the game state is much closer to a model of how we perceive a fully concurrent reality.
And a few nice words about PG, which applies also to DHH:

"Paul comes off the way he does because he's good at marketing, and he realizes that in a world full of egotistical programmers, the only way to be heard in all the noise is to be an arrogant bastard."