hacker news with inline top comments    .. more ..    30 Nov 2014 News
home   ask   best   5 years ago   
Nasty Lockup Issue Still Being Investigated for Linux 3.18
19 points by harshreality  1 hour ago   discuss
In Soviet Minecraft, server op you
50 points by Mithaldu  1 hour ago   4 comments top 3
_jomo 39 minutes ago 0 replies      
This is a really interesting hack. I have done a similar thing by runnig minecraft in tmux, tail -f | grep for something in the log file and then sending commands back to tmux.

However, all these problems in the article can be solved with a few essential bukkit Plugins. Bukkit has been DMCA'd by one oft their own developers, probably because it became clear that Mojang (the company developing Minecraft) owns the rights over Bukkit. A popular fork of Bukkit, "Spigot" [0] has continued development and published patches until they stripped all of the contributions of the DMCA issuer. They published Spigot for Minecraft 1.8 on Friday.

[0] http://www.spigotmc.org/

Edit: typos

nightpool 10 minutes ago 0 replies      
Yep along with Spigot, as mentioned by _jomo, there's also a new project called Sponge that is replacing CraftBukkit from the ground up, building on top of Minecraft Forge (a modloader) rather then as a standalone mod like CraftBukkit/Spigot. Its still in pre-alpha though, and there are a LOT of things unimplemented, compared to Spigot which is a fork of Bukkit.

Another popular option is Glowstone, which is an open source implementation of the entire minecraft server, rather then a mod. Glowstone already supports plugins written for the Bukkit API (separate from the CraftBukkit implementation that got DMCA'd) and there are plans to support the Sponge API when its more mature. I can't speak to its stability/completeness though. It looks like there isn't any redstone or physics yet? That shouldn't be a huge deal for most creative servers, but YMMV.

isaacdl 39 minutes ago 1 reply      
I want a dad like you.
Swiss 'reject immigration curbs'
60 points by immigg  2 hours ago   20 comments top 2
1337biz 39 minutes ago 2 replies      
They also voted against increasing their gold reserves and against cutting tax privileges for millionaires. Seems that they just voted for whoever was able to put the most money behind their campaign.
ck2 50 minutes ago 6 replies      
Okay but why?

Good intentions? Open hearted?

Or looking for cheap labor?

(I'm actually asking, no clue about Swiss culture)

Vim.js JavaScript port of Vim
127 points by DrinkWater  6 hours ago   27 comments top 11
stray8 0 minutes ago 0 replies      
Some way to save the file?
brotchie 2 hours ago 0 replies      
Nice, I had a crack at doing this a while back using emscripten, but couldn't get around that Vim's input handling is blocking.

Looks like coolwanglu has found a way around this by hacking some kind of async transformation into emscripten. I haven't looked at his code, but I suspect he specially handles known blocking libc calls. My guess is some how storing the set of stack frames when a blocking function is called so that the stack can be unwound to let the js engine continue.

Good stuff.

Tyr42 2 hours ago 3 replies      
Wow, it's a full vim. I was expecting to find things it couldn't do, but I ran out of things to try. Great work.

It did take a little longer than vim to load, but I guess that's expected.

prasoon2211 2 hours ago 2 replies      
Can someone please explain how this is different from CodeMirror vim mode? I am an emacs user and know only the basic vim commands and so, I cannot tell if there is something fundamentally different between the two implementations.
UUMMUU 30 minutes ago 0 replies      
This is awesome. I've tried other attempts in the past but none were as smooth as this was. Great work!
ludamad 4 hours ago 1 reply      
Very nice. It first struck me as just a curiousity but honestly I would consider using a browser plugin like this that let me edit web forms with something like this, picking up my local ~/.vimrc. That or for the various interactive code editing tools like ipython.
italophil 4 hours ago 1 reply      
This is really interesting. Perhaps this would allow for vim on ChromeOS without messing with the linux images (crouton) or the like.
bayesianhorse 2 hours ago 1 reply      
I can't wait to integrate this into IPython Notebook...
jqm 4 hours ago 0 replies      
This is very cool. Enjoyed playing around w/ it. Nice job.

But one thing (for whatever it's worth) what makes vim super useful (to me anyway) is the plugins and my vimrc with custom key bindings.

(edit) On second look, it appears you can modify vimrc. Very nice.

Theodores 3 hours ago 3 replies      
...er, don't wish to sound negative, this crashed on me. 8Gb RAM Ubuntu box with Chrome - normally a stable computer that doesn't do things like 'swap'. I might try it again on my ChromeOS box, but, right now, that is as far as I got.
Ecco 1 hour ago 0 replies      
Sorry for the negative tone, but what's the achievement? Emscripten has been out for a while now...
A Soaring Emblem of New York, and Its Upside-Down Priorities
22 points by jack_axel  2 hours ago   17 comments top 7
flint 3 minutes ago 0 replies      
You need a Segway to get around down there. Want a cup of coffee? Just a 10 minute elevator ride and 4 blocks walking to get to only shop in the building. Don't want Patisserie Financier? 4 more blocks, and you have to cross the west side highway.
StefanKarpinski 1 hour ago 2 replies      
This is a long rambling article without any clear point, except that the author doesn't personally care for the tower as much as he might have (if he designed it?). I was deeply skeptical of the "Freedom Tower" (everyone I know in NYC still refers to it by this ridiculous name) design before it was built, but as the thing has been built, it's actually grown on me. The inclined side panels look almost like two towers when the light hits them, reminiscent of the old towers, which I still miss as part of the skyline. It's not my favorite building in the New York skyline that would be the Chrysler Building but it's not bad.
jim_greco 1 hour ago 1 reply      
It's unfortunate. They had a real opportunity and instead created a lifeless soulless building that stands in deep contrast to the subtle memorial next door or Calatrava's soaring transit hub. Too many sacrifices had to be made for this tower. The fortifications at the bottom (20 floors of concrete with a glass covering) are hideous and the removal of the decorative aspects to the spire make it look like a giant syringe.

Not to mention we really didn't need the downtown office space. The Financial District is already half the price of Midtown and firms who want a downtown presence are now looking to more exciting neighborhoods for young workers like Chelsea and the East Village.

bane 54 minutes ago 0 replies      
It's amazing how symbolic the new WTC tower is of all the events since 9/11. We did something, there's something there, it isn't what anybody really wanted, it was done half-assed, tied up in politics and money for far too long, poorly planned, not a compromise so much as an act of our collective mediocrity...you could be talking about both wars, the security state that's risen up, or the building using any or all of those statements.

It feels better than the gaping wound in the ground that was there for so long. But just like any massive wound leaves a scar that's worse than the original skin, it's not-quite-right in the same way.

I broke down into sobs the first time I walked by the hole, I felt strangely apathetic when I walked by the tower.

kchoudhu 18 minutes ago 0 replies      
"With its hotel, offices, restaurants, apartments and observation deck, it is also an all-in-one mixed-use development, built on a busy transit hub. The point is that something better was possible in Lower Manhattan."

What, exactly? Sure, it came in well above budget and five years late -- but it works just fine in conjunction with the plaza in front of it.

All they need to do now is get the passageway under West street connected to the Fulton Transit Center.

uptown 1 hour ago 0 replies      
I feel whatever was built on that site was bound to be heavily criticized -- the original World Trade Center buildings certainly were, and they weren't subject to the emotional responsibility of 9/11. But for all the criticism of the new WTC, this documentary gave me a much greater appreciation of the new structure:


Give it a watch when the Discovery channel re-airs it. They tend to show it each year around 9/11.

justincormack 29 minutes ago 0 replies      
Not sure looking at the Shard in London as an example is that good. Its largely empty for a start, an imposition that no one really wanted, a monument to Qatar's money, and out of scale with the city, especially that part.
Object Oriented Programming is Inherently Harmful
72 points by idoco  2 hours ago   48 comments top 16
edw519 27 minutes ago 5 replies      
I've always had a problem with object orientation and have never embraced it.

But none of these quotes (and most dev thinking) seems to share my reasoning.

My problem: almost every argument for or against object orientation is about us, the developers. I rarely hear any arguments that consider our users or customers. Oh sure the usual (and lame), "It helps us serve them better."

I long ago lost track of all the lame bullshit (far too many to mention, but you know the culprits) that was supposed to revolutionize the way we build things without ever taking our users into consideration. Most of it was to make developers who couldn't build what was really needed appear as if they could. This has helped consulting firms and enterprise I.T. departments justify their rates and schedules, but has added little to the customers' benefit.

If the people who dream this shit up would stop focusing on what we need for 5 minutes and consider what they need, we'd all be way better off.

How has object orientation helped my customers? Frankly, I can't think of a thing. Add that quote to this list.

al2o3cr 43 minutes ago 0 replies      
Guest post from the future - here's a quote from a similar page on cat-v.org in 2024:

"FO is the structured programming snake oil of the 10s. Useful at times, but hardly the end all programing paradigm some like to make out of it.

And, at least in its most popular forms, its can be extremely harmful and dramatically increase complexity."

captainmuon 38 minutes ago 7 replies      
At some point I realized I don't really need OOP itself, but I like a couple of bits it provides. Mostly:

- The syntax. I like to be able to say thing.doSomething(). It doesn't always make sense, but sometimes subject-verb syntax is more natural than a function call.

- Polymorphic dispatch (is that the term?) to replace if blocks. Instead of `if (thing is Car) thing.drive() else if (thing is Boat) thing.swim()` its just thing.move(). Pattern matching in functional languages solves this in a different way.

- Interfaces are nice.

I guess I could be happy in a language that just has structs and functions, and some help in form of pattern matching, multimethods and so on.

lmorris84 26 minutes ago 3 replies      
I'm a Java programmer so work with OOP every day. I think it has it's pro's and con's like everything else.

My pet hate is how dogmatic some people get to the point where they get angry over the use of if/switch statements. "It's not good OOP, use polymorphism", well the goal isn't to pass an OOP exam, but rather to write clean maintainable code where possible. If an if/switch saves me writing 6 classes with 3 lines in each of them, then that's what I'll do.

vardump 21 minutes ago 1 reply      
I often dislike C++ and Java (note: did not say object oriented programming), because the logic tends to be distributed in so many different files and locations. The abstractions, which should be beneficial, to decrease mental load, have the opposite effect over a longer time. To understand what just one overloaded method call does, I have to often read through a dozen of different files. Context sensitive IDEs don't make it much easier. Simply grepping files at command line is often the fastest way!

Combine that with object mutable state. And that with multi-threading (surprise state changes). Add exceptions on top (surprise hidden gotos, especially annoying in C++). The end result is often nearly impossible to fully understand.

However, this is not anti-OOP rant really. I recognize OOP has its uses.

The bigger issue is almost always when there's a discussion whether X is better than Y, some people seem to forget often both X and Y have their place in the toolbox. They're often complementary. When you like technology X, technology Y is not a threat to you, but an opportunity to learn something new. In the same way, criticism against X can be an opportunity to learn and improve. Not hostility against people who like or are used to technology X.

eudox 1 hour ago 1 reply      
I was briefly part of the "OOP is overrated, functional programming is in" camp. OOP is enterprise, functional programming is "simple" because it's just functions and data, you know, all the usual party lines.

Well, turns out CLOS is so good it's hard to stay away from it. You don't struggle to force something into an inappropriate object-oriented paradigm, rather, object-oriented solutions just flow naturally from the problem. And it's a pleasure to use.

kentbrew 6 minutes ago 1 reply      
OOP has the same relationship to programming that formalist literary critique does to writing: the willful denial of connection to reality. When you're solving a problem that's connected to the real world--perhaps you have a deadline, or a live human being will use your program at some point--it's often better to just go ahead and build something that works and can be easily explained to the person who will maintain it in the future.

As with formalism you should know how OOP works and how seriously others take it, so you don't get into fights with your relatives at Thanskgiving.

tptacek 42 minutes ago 2 replies      
In the quixotic hope of heading off a pointless argument: the opposite of OOP is not functional programming.
nickbauman 13 minutes ago 0 replies      
OOP and FP are not in opposition to each other. FP considers objects to be at different granularity than your typical OO language does. So the real problem stems from the fixed granularity of the objectionable (heh) of typical OO languages leads to mutable state, which leads to unnecessary complexity.

In the end, typical OO leads to type systems which lead to noun discrimination which are ontologies, which reflect world-views. You don't want to get any of that on you. The more successful type systems stop at grouping aggregatable functions. Look at Go. Or Clojure. Those type systems are as good as it gets to me but I've never written a line of Smalltalk or Haskel, so someone set me straight on that.

guard-of-terra 46 minutes ago 4 replies      
I wonder if there are GUI widget systems not based on deep inheritance trees.

It seems to me that GUI and OO are deeply synergetic.

yawz 11 minutes ago 0 replies      
I love the banana analogy :).

The problem with object-oriented languages is theyve got all this implicit environment that they carry around with them. You wanted a banana but what you got was a gorilla holding the banana and the entire jungle. Joe Armstrong

Energy1 19 minutes ago 1 reply      
According to these guys, everything complex is harmful and everything simple is great. I want to start learning Assembly to finally understand the whys of programming on a hardware level. Is Assembly harmful? Any simpler and thus better alts? Or is Assembly a simpler version of some other ugly, threatening monster? Oh, btw, where's the best place to learn it?
vinkelhake 24 minutes ago 1 reply      
Catchy and content-free soundbites that do nothing to further a discussion.

One of the big problems with discussions around OOP is that people have wildly different opinions on what OOP is. Whatever it turns out to be, it'll be a tool like any else that can be used efficiently or poorly.

tormeh 25 minutes ago 0 replies      
I think inheritance is a really good idea, and that most problems with it result from people forcing inheritance onto problems not benefiting from it.

Can we all just make a resolution not to use any technique (no matter how fashionable, not even FP) on a problem unless it is a natural fit?

nly 36 minutes ago 0 replies      
This old bag again.
lentil_soup 47 minutes ago 0 replies      
In this CppCon keynote, Mike Acton explains some of the problems with OOP and the benefits of data driven design. Really worth a watch: https://www.youtube.com/watch?v=rX0ItVEVjHc
Wanderers: a short film of humanity's expansion into the Solar System [video]
423 points by Thevet  14 hours ago   84 comments top 36
arethuza 5 hours ago 0 replies      
What a fantastic video.

My favourite part: BASE jumping from Verona Rupes - the tallest known cliff in the Solar System - somewhere from 5km to 20km vertical:


By comparison the tallest vertical drop on Earth is on the surreal Mount Thor at 1250m:


[Some great details - like the Earth coastlines used in the asteroid interior (mentioned on the film's website) and the Taijitu in the crater at 1:54].

Kronopath 10 hours ago 0 replies      
I love the details in this film. Things like the winged people flying on Titan, possible due to its dense atmosphere. There are things on these other worlds that we could never experience here.

Even the title has multiple meanings to it:

In ancient times, astronomers noted how certain lights moved across the sky in relation to the other stars. Ancient Greeks called these lights (planetes asteres, "wandering stars") or simply (plantai, "wanderers"), from which today's word "planet" was derived.

Source: https://en.wikipedia.org/wiki/Planet

evaneykelen 7 hours ago 2 replies      
Frustrating to realize that perhaps only 1 or 2 years of Earth's military spending would enable mankind to achieve this (approx $1700 billion/year). Not saying we don't need to spend money on defense, merely taking one the world's expenditures as a yardstick. It would be so great if mankind is able to cooperate in the colonization of our solar system.
abrichr 14 hours ago 0 replies      
This is beautiful.

For me, Carl Sagan's voice is incredibly inspirational. He knows just what to say and how to say it to elicit a beautiful and optimistic feeling of wonderment.

And the visuals were stunning. A tantalizing glimpse into the next century or two of human exploration and experience.

Thank you for this.

Edit: Reddit thread at http://www.reddit.com/r/Futurology/comments/2nseb3/wanderers...

blisterpeanuts 14 hours ago 3 replies      
Wow; that was incredible. I wish it were three hours long.

That dude floating in that debris belt (ring of Saturn?) -- that looked a bit dangerous. Hopefully he had a force field around him.

There's so much out there, just waiting for us to get off our duffs and explore. We have much of the technology; if we could just stop spending trillions on machines of war and instead spend it on machines of exploration....

nkoren 2 hours ago 1 reply      
Kim Stanley Robinson's Mars Trilogy is apparently being made into a TV series now. This guy must work on the visuals for that. He gets it; he really, really gets it.
thomasfl 5 hours ago 1 reply      
I would like to see a full length Wanderers movie. The optimistic feeling of adventure, travel and belief in science, would make it well worth spending a couple of hours watching.
tobr 5 hours ago 0 replies      

You might be interested to learn that Erik Wernquist is also the person who created Crazy Frog some ten years ago.

hmottestad 7 hours ago 1 reply      
Don't forget that you can download the video using youtube-dl (if you like me, get annoyed that Vimeo doesn't continue buffering when you pause it, and deletes the current buffer if you rewind)


hiphopyo 6 hours ago 1 reply      
Crazy how one man can do something that normally would take hundreds of people to accomplish.

Wouldn't it be nice if Erik Wernquist was in charge of the filmatization of "2312" (the novel that inspired his "Iapetus Ridge" scene).


yogrish 13 hours ago 1 reply      
Awesome creation. Image Gallery and Explanation: http://imgur.com/a/Ur5dP
Osmium 4 hours ago 0 replies      
As a first step, I wonder how feasible it would be to have a constant presence around these planets and moons? A 'standard' orbiter, mass produced? I was reading about the Jupiter Icy Moon Explorer mission, and it's incredibly exciting, but it won't get there until the 2030s, and even then it'll be a temporary presence.

The reason I think of this is that I recently came across this animation from New Horizons showing a 330km-high eruption that recently happened on Io:


It's utterly captivating, at least to me, and I can't help but wonder what effect it would have on the public's imaginations to be able to see images like that every day, in high definition, from all over our solar system.

shmerl 11 hours ago 1 reply      
urza 1 hour ago 0 replies      
I'll just leave this here: http://youtu.be/FbpIwT9nV3Y?t=7m7s
booleanbetrayal 54 minutes ago 0 replies      
absolutely stunning. i will feel incredibly deprived if my exhaust without witnessing this sort of endeavor by mankind.
frinxor 11 hours ago 1 reply      
Check out Reid Gower's videos as well, the Sagan Series, a collection of videos he did that also used Carl Sagan's voice.


And of course, Cosmos, which is where all the audio is from in all these videos


airlocksoftware 11 hours ago 0 replies      
In the same genre, I watch this when I need a touch of inspiration. They're quotations from The Pale Blue Dot, again with the Sagan voiceover.


Often we forget how far we've come, and how far we have to go. It's easy to get bogged down in the minutiae of regular life. When I listen to Carl Sagan sometimes I feel like I've glimpsed a bigger perspective.

devgutt 3 hours ago 3 replies      
Todo list:1- Invent powerful machines for simulations and calculations(ok)2- Stop with childish religious beliefs altogether (in progress - 5ys)3- Review completely the social contract (in progress - 50ys)4- Fix mortality (urgent - 100ys)5- Explore the universe (2114)
ogig 13 hours ago 2 replies      
All these visuals made by just one guy? I'm impressed. It has higher quality than many hollywood fx products.
Ygg2 12 hours ago 2 replies      
Amazing video.

I especially like the world play here. Latin Planetes (as in planets) means wanderer. The name of this film can be understood as Planets.

anw 13 hours ago 0 replies      
Videos like this make me truly yearn for our civilization to expand off of our home planet.

I've finally gotten into some of Philip K Dick's works, as well as adventuring in the game Eve Online.

Both make me question how far we could be in technology, medicine, civilization, if we all could work together and not have schisms divide us.

I suppose it's the same as wishing for a utopia, though.

wcoenen 4 hours ago 0 replies      
Definitely check out the imgur gallery[1] with explanations of all the scenes!


dojo999 2 hours ago 0 replies      
Beautiful short film, excellent effects and voice-over. Like.
ijk 13 hours ago 1 reply      
What makes it for me is that every place depicted in here actually exists, right here in our solar system.
dmix 13 hours ago 1 reply      
"As for me, I am tormented with an everlasting itch for things remote. I love to sail forbidden seas, and land on barbarous coasts." - Herman Melville

Wonderful quote by Sagan.

eklavya 3 hours ago 1 reply      
How I wish I was born in a time when mankind can travel the vast cosmos.
brador 5 hours ago 0 replies      
Which planet would allow for the largest/densest brain size in an organism that evolved to maximum size there?
a3n 12 hours ago 0 replies      
We went to the Moon, and yet we're still killing each other, or getting rich off of other people's poverty.

Peace on Earth is not going to come from going somewhere else and proclaiming "Look at us!" It's not a side effect.

Or, as the Quakers say, "There is no way to peace. Peace is the way."

zan2434 11 hours ago 0 replies      
That was beautiful. I'd love to read more about how exactly the visuals were generated. This is a lot more than spheres rendered w/ NASA photo textures.
houseofshards 9 hours ago 0 replies      
Wow ! This is beautiful. Stunning graphics + Sagan's legendary voice almost left me in tears.
machinshin_ 13 hours ago 0 replies      
I want to go to there
spiritplumber 3 hours ago 0 replies      
Very uplifting.
pkaye 13 hours ago 0 replies      
I really loved this. Are there anything else similar elsewhere?
molmalo 14 hours ago 0 replies      
I loved it, thanks!
graycat 13 hours ago 2 replies      
Wander? From earth into the rest of the solar system? If we'd grown up anywhere elsein this solar system, then the place, thedream destination, in this solar system wouldbe earth.

Since I'm already here, no way doI want to leave!

Send some machines to gathersome data and transmit it back to us here onearth? Fine. Maybe terrific. Go there, inperson? For me, no way!

tbolse 13 hours ago 0 replies      
Functional Programming Patterns
123 points by ique  8 hours ago   28 comments top 13
tel 1 hour ago 1 reply      
This is one of the reasons why Higher-Kinded Types are such a boon in the languages which have them. It allows you to translate "patterns" into straight-up libraries. This slideshow is good documentation for what the patterns are, but if you go use them in Haskell (e.g.) then you'll start to see that libraries are designed to completely contain that pattern and ensure compatibility between your use of it and others.

Usually this is achieved by representing the pattern exactly in the language. Usually the patterns are just maths. Usually math happily quantifies over higher-kinded types. Thus, you really want HKTs in your language.

And to be fair, Haskell does not go tremendously far in this direction. The languages which will truly profit from this are still in gestation.

virtualwhys 1 hour ago 2 replies      
Excellent presentation. Of the leading type safe functional languages (Haskell, F#, and OCaml) I find F# to be far and away the most accessible in terms of syntax and application.

Writing Scala in my day job currently (which, for the most part, I quite enjoy) but can see jumping ship if Microsoft's move to Linux is successful. Being able to develop and deploy F# applications on Linux with full blown Type Providers and decent IDE support? Pretty compelling combo, and that's just the tip of the iceberg.

adwf 2 hours ago 0 replies      
I quite liked the types section, particularly the bit about making illegal states unrepresentable so you can enforce business rules, eg. validating email addresses.

One of the things I'm always thinking when people talk about the merits of various type systems and the problems they solve is: "But I don't have those problems". However, there are a few good examples in there that opened my eyes a little and I'll give type-centric programming a go on my next project. Not necessarily solving problems that I have, but certainly presenting a different, hopefully clearer, way of writing some functionality.

robert_tweed 31 minutes ago 0 replies      
There's a book with the same name plus "... In Scala and Clojure". It is based on the wrong sort of patterns (trying to shoehorn GoF into FP). This presentation is much more what I had hoped that book was going to be.
zniperr 4 hours ago 1 reply      
A good read, I especially like the parts about error handling and maps/applicatives. They are well-illustrated and tackle some difficult common problems I had shortly after I started using functional languages.

The part about functors/monads/monoids is also nice, although I feel like it would be better with the accompanying talk to bind it together a bit more.

dschiptsov 2 hours ago 2 replies      
Some guy almost 20 years ago argued, that if you end up with a bunch of "design patterns" then your language is not good enough.)


KurtMueller 2 hours ago 1 reply      
I am currently taking EdX's Intro to Functional Programming mooc, taught by Erik Meijer (with his crazy shirts), which uses Haskell to teach functional programming concepts.

I am wondering if there are any other good resources for teaching the functional programming paradigms. Anybody care to recommend me some resources?

Also, I mainly work with Ruby and Javascript in my full time job. Currently, in school, I use Java (in the context of Android, which is on Java 6) and Objective-C (iOS programming). If anybody has any resources regarding functional programming and the previously mentioned languages, it would be most appreciated.

Thanks people!

estefan 4 hours ago 0 replies      
This a good read. I like the railway analogy.

"Functional Programming in Scala" is also well worth a read as well if you're trying to learn FP... I've found it to be excellent, especially since it has lots of exercises to use for practice.

fdsary 4 hours ago 5 replies      
I thank the lord every day that the language I work in (Javascript) supports functions! I try to write pure functions as often as possible, so it's easy to refactor the code when I come back three months later.

But is there, except for Clojurescript, any true (like Haskell) FP language for browsers? Something that has the tools, and community to back it, so it's viable to actually make projects in it?

nathell 2 hours ago 0 replies      
For some reason, when I got to slide 16 I immediately thought "Scala."
k__ 4 hours ago 0 replies      
lol, the Patterns of GoF seemed like those of tailoring to me.
ExpiredLink 3 hours ago 1 reply      
Patterns exist to compensate for a programming languages lack of expressiveness!
Hard-won lessons about money and investing
246 points by sethbannon  12 hours ago   131 comments top 25
tacos 1 hour ago 0 replies      
The tone is far too authoritative given the narrow experience of the author. Reading an Googler's quickie blogpost investment guide isn't the path to financial independence. It's barely the bot-filled advice of /r/personalfinance with a better PageRank.

Microsoft pushed giving and 30 years later there are still people blindly pumping money into United Way. (Maybe not the best charity!) Google seems to have pushed their smart people into another half-baked set of assumptions.

I'm forcing myself NOT to get involved on this one (the solution to one person's narrow experience isn't another guy with different narrow experience ranting in the comments) but I will point out that Schwab Charitable (their DAF) has lower minimums and fees than Vanguard.

A lot of nerds spend more time researching a graphics card than a stock pick or charity. Like anything else, put the time in and you'll be rewarded over the long term.

j_lev 11 hours ago 7 replies      
> If youre an employee working for salary, its going to be hard to reach that level of independence. ... You can try to radically lower your financial burn rate, but few Americans have taken that step.

So many people are quick to dismiss living well within one's means as a way to financial independence. Here's the link to the facts again:


TL;DR: Live on 35% of your after tax income and you're retired in 10 years. Get it down to 25% and you retire in 7.

grimlck 6 hours ago 1 reply      
"Google worked out a deal with full service broker to give us free accounts"

That is actually really interesting. How much did this broker have to pay to get this box full of highly lucrative leads - access to a large set of newly wealthy individuals, many of which don't have experience with managing large amounts of money. A bunch of people who may be experts of technology, but probably are not experts on finance.

It seems like inviting the fox into the hen house, and telling the hens what it deal it was

jandrewrogers 8 hours ago 1 reply      
For most people, the easiest way to become financially independent is to save aggressively.

That aside, I have always invested in a small number of individual stocks, with minimal management or effort, and only moving positions between companies slowly over time. Basically, I make bets on long-term trends that I view as technologically inevitable. I don't invest in sexy companies (though some become sexy later), I invest in companies that are undervalued relative to the technology trends. That strategy is pretty trivial but it has allowed me to beat the S&P index pretty consistently over decades (famous last words) with the money I don't have a better use for e.g. savings. In fact, the margin by which I beat the S&P has been slowly improving, which I think reflects the increasing ability of tech to move the needle on the economy.

Since this is a tech site, this would seem like a repeatable strategy that anyone could and would use. But apparently people don't. Of course, I could just be really lucky.

applecore 14 minutes ago 0 replies      
How many people are actually living entirely off passive income from interest, dividends, and capital gains? I feel that goalwhich requires millions of dollars in investable financial assetsis only realistic for a tiny percentage of the population.
applecore 45 minutes ago 0 replies      
Regarding most of these lessons, in 2004, Google brought in experts on personal investing to educate employees heading into its initial public offering:


TL;DR: Put your money into some broad-based, low-cost index funds.

err4nt 11 hours ago 3 replies      
I'm at the start of a long career and trying to save sacrificially. I know if i over-save i still have it if i need it, but so far every dollar i have put into savings has been on a one-way trip!

I wonder and worry about how to save up for later in life, and who knows what the political landscape will look like then. In my country inflation has been 2.16% on average during the years I've been alive.

Where can I store my money in a way that I know it will be there later whn I need it?

(I'm a little nervous about the bank, one time I had a court order against my bank account so it was drained, and I was beingpaid by cheque, but even when I took my paycheque to the bank to deposit it, until that debt was paid off i couldnt even take out enough for groceries. I want something that cant be taken away at a whim without recourse. I negotiated a deal with the collection agency for a repayment schedule, but they still drained my account 2-3 times after our agreement just because. Oops!)

jamesaguilar 10 hours ago 0 replies      
Hedonic adaptation is the devil. You'd hope/intuit that spending more resources would make you happier, but that's just not the way it works. That said, you can use knowledge of this quirk of human psychology to make you richer and more secure compared to your higher-consuming self, not sacrificing any long term contentment or satisfaction to do it. Here's a more in-depth review of the topic[1].

[1] http://www.mrmoneymustache.com/2011/10/22/what-is-hedonic-ad...

ballstothewalls 10 hours ago 5 replies      
Lesson number 1 is unequivocally wrong and contradictory with the start of the article. He says you shouldn't invest your money in single stocks, but then advocates for you to invest your money (by way of forgoing salary in favor of equity) into a start up company with (by definition) no track record of success or guaranteed future. Not to mention that when the start-up tanks (which it will do statistically) you will both lose your salary and your investments/equity will be worthless.
netcan 4 hours ago 0 replies      
There is an economics article Ive brought up several times on HN. It has a lot of non obvious deep implications: The Nature of the Firm' (1937), By Ronal Coase It tries to answer the question of why companies exist rather than bilaterally trade of goods and services between individuals in a market. IE, if centralised economies are so bad, why are free market economies dominated by enormous companies that are internally run like a Stalinist country. Instead of Apple making all the software and hardware and the babushka doll of precursor software and hardware, couldnt we have Apple replaced by a market?

The economics of the time (especially among proponents of centralized systems) focused a lot on inefficiencies. Why produce hundreds of iPad screen designs when only one is needed. Economies of scale. Coases answer to the question was transaction costs. The cost of weighing all the options and negotiating a deal to have you write a thousand lines of code to go into my bigger bundle of code.

In modern companies like Apple this is extreme. But, if you think about it in a manufacturing economy, it makes more sense.

Anyway, as I said, the more I think about it the deeper some of the concepts and implications seem to be. For example: (a) There are inefficiencies out there on the scale of East/West Germany. (b) Transactions costs are at the root of many/most major inefficiencies.

The part of this blog that got me thinking about this was working for equity vs. salary.

I think that for most people, the choice company they work for wass 80% chance and 20% uninformed bias. Applying for a job and interviewing is a big overhead (transaction cost) and your ability understand the companys chances of success and the magnitude of this success isnt very good. The fact that many people dont know what percentage of the company their stock represents is the glaring proof. Prospective employees dont have anywhere near the information that investors do. How much money is in the bank? What are revenues? Burn rate? Valuation at previous rounds?

The poverty of information and the fact that transaction costs make it impossible for one to consider more than the tiniest semi-random sample of opportunities is exactly the kind of dynamic I think Coases work implies.

influx 10 hours ago 1 reply      
I use Wealthfront, which allows you to park your money into an account, and depending on your level of risk, will automatically balance it across the US Stock Market, dividend stocks, emerging and foreign markets, bonds, and natural resources.

For account values over $100K, they will do tax loss harvesting for you automatically, and prevent wash sales. For over $500K account values, they will actually buy stocks for the entire S&P 500, and allow you to take tax losses on individual stocks (which you can't claim on ETFs).

I found their presentation to be quite helpful:


If you want an invite, PM me.

Animats 9 hours ago 1 reply      
If you do get a lot of money somehow, read The Challenges of Wealth, by Amy Domini. Most people who get a reasonably large chunk of cash all at once blow it, in an average of seven years. A sizable fraction of old pro athletes are broke. So are a sizable fraction of lottery winners.

As a rule of thumb, any investment where they call you is no good. If it was any good, it wouldn't need paid sales reps.

steven2012 10 hours ago 5 replies      
I'm of the opinion that the stock markets are now inherently unstable, and they will continue to crash every 7-10 years. I'm expecting a market crash somewhere between 2015 and 2017. Most of my money is in cash, but I do hold a few select stocks like AAPL, GOOG and TSLA.

I also believe that the stock market is a game, not an investment vehicle. The nature of the market has transformed every since the day trader, quants and HFT have entered the markets. As long as you understand this, then putting money in the markets is fine. If you don't want to be a part of the game, then regular people should buy bonds (not bond funds, but actual bonds that pay interest).

My opinion is that Wall Street has shifted focus since the 80s to trying to convince people to dump their money, all their money, into mutual funds. Then these massive fund managers take their 1-3% in various fees and just move money back and forth. I don't trust Vanguard any more than I trust any of these other large mutual fund companies, and I happen to know a lot of people that work at various asset management companies in the Bay Area. They print money without ever beating the SP500, instead they try to change the equation by claiming they beat the SP500 on a risk-weighted basis, etc. The entire thing is a sham, and as the OP remarked, why do the mutual fund managers have yachts but none of the clients do? It's because they make their money from the hundreds of billions of dollars they skim off the top of their customer funds.

maguirre 1 hour ago 0 replies      
Interesting topic and one that really resonates with me. I have always been interested in learning how to make money the way "people with money" make it. Personally I have come to the conclusion that a few solid stocks paired with protective puts and/or call options (to make a little extra money for sideways markets) provides a decent way to generate some extra income and greatly reduces risk of losing everything from a single mistake
mcfunley 11 hours ago 4 replies      
> Think about working for equity vs. salary

It's really common for people to drastically overestimate the value of startup equity, or to just not understand the basic mechanics of it at all. In my experience people look at the face value of their options and are pretty clueless about how taxes (or even their strike price!) affect what they might actually wind up with.

dave1619 10 hours ago 5 replies      
I added a comment on Matt's blog post but it's waiting moderation so I'll post it here to hear other folks' input.

"Hi Matt, I usually enjoy your posts but I felt this one lacking in a major way.

Investing is something that has huge potential (ie., 100 fold). This is something that Im sure youre aware of as an early Google employee (you were invested in the company via stock options, etc). On the other hand, investing has huge downside as well (you can lose all your money).

Many people are advocating people to take a mindless approach to investing by investing in low-cost index funds. I personally think this is decent/good advice for most people who dont have the time, energy, experience, skills to make investing a lifetime passion. In other words, for the typical person who just wants to focus on his 9-to-5 job and other hobbies and not deal with the world of investing, then sure low-cost index funds are the way to go.

However, there are some people who can benefit in huge ways by becoming experts in investing (whether this be in stocks, real estate, businesses, etc). A few disclaimers first becoming an expert investor is extremely difficult and most people underestimate what it takes. Its not about picking stocks or getting lucky. Rather, its about accumulating the skills, experience and expertise to evaluate investment opportunities in a wise and discerning manner, and to do it exceedingly well. I think it requires an immense amount of time and dedication. And I dont think 98% of the people out there practically have the time, energy, motivation or focus to develop such skills. But for the 1-2%, I think its a possibility if they treat it as a serious lifetime endeavor."

netcan 4 hours ago 2 replies      
I'm surprised he doesn't mention real estate or investing in friend/family businesses as an option.

This isn't as safe as index funds, but it is an option where you can increase your success rate by being competent. It probably has a risk profile similar to working for equity at a startup, an option only available to people who work in or around startups.

g_mifo 1 hour ago 0 replies      
Most of this is standard sane advice, but the tip about "work for equity [in the next Google] instead of chasing salary": well if we all could pick stocks like that, we would not need the rest of his advice!
crimsonalucard 6 hours ago 1 reply      
Everybody in the tech world is talking about investing in index funds. Historical evidence says this is the way to go, but when everybody is doing it, it makes me question whether or not it's the right choice.

There's a possibility that the market is in another bubble right now.

armansu 6 hours ago 1 reply      
Made me think (as most of the lessons coincide) about the book I'm reading at the moment - 'Money: Master the Game' by Tony Robbins: http://moneymasterthegame.com/
FiReaNG3L 3 hours ago 2 replies      
Literally everywhere for the past years I see the advice to invest in index funds - the only question I have is what happens when a critical mass of people do just that? Wouldn't that influence the market in some way?
arkem 10 hours ago 3 replies      
I've been considering moving from holding Vanguard ETFs (one of their Total Retirement funds) over to Betterment or Wealthfront to take advantage of their automated tax loss harvesting.

Does anyone have any thoughts about whether automated tax loss harvesting is worth the 0.15-0.25% fees that the robo-advisers charge?

kirillzubovsky 10 hours ago 1 reply      
FYI, if "tax loss harvesting" is something you'd like to consider, there're companies out there which (for a fee), would do it for you. Their entire business model is to lose money for you, in a smart way. That said, if you need to use this method, you're probably wealthy enough to know how/where to use it.
ForHackernews 11 hours ago 2 replies      

Short version: Open a Vanguard account and invest >=15% of your salary in the appropriate target date fund for the year you want to retire.

P.S. Where possible, become a millionaire in Google's IPO.

briandear 4 hours ago 1 reply      
If you diversify enough, you can ensure a 0% return and a 0% loss. The argument for "diversification" is a recipe for safety, but not real wealth creation. Real wealth creation isn't "sticking your money in an index fund." It's a very middle class approach but as with anything, there's no such thing as a free lunch. If it takes 30 years of index funds to be able to retire, then you're doing it wrong. Investing in actual cash-flow producing assets is how you create wealth. Capital appreciation is only one part, the other part is creating cash flow. That means owning businesses, real estate and other passive income generators (IP, for example.)
Bumper-Sticker Computer Science [pdf]
8 points by mattrepl  1 hour ago   discuss
Time perception, just like vision, is a construction of the brain
62 points by ColinWright  8 hours ago   21 comments top 5
SixSigma 3 hours ago 3 replies      
> This may be why time seems to speed up as you age: you develop more compressed representations of events, and the memories to be read out are correspondingly impoverished. When you are a child, and everything is novel, the richness of the memory gives the impression of increased time passagefor example, when looking back at the end of a childhood summer.

With no proof or otherwise, I had always conjectured that this was because time is compared proportionally. When I was 6, the three months of summer were approx 3 / 72 of my life = 1 / 24. When I am 60, those three months will occupy 1 / 240 of my life.

jfmercer 3 hours ago 0 replies      
Immanuel Kant argued--some say proved--this very thing two centuries ago in his Critique of Pure Reason.
jonsen 3 hours ago 1 reply      
So that is what consciousness is, the ability to construct a structured model of the world from disorganized unstructured signals.

Well, consciousness is more than that. It is also self awareness.

But to make a useful world model the brain has to constantly recalibrate model construction in reference to what you could call, well, what else but, the self.

madaxe_again 3 hours ago 2 replies      
Excellent article.

Thinking about it, 24fps (good old fashioned film), even though laughably low by the standards of modern displays, manages >1 frame per perceptual time-quanta, which is enough to give the illusion of motion. Any lower than that, and you start getting "frames" where there's no change in the film frame, and the motion illusion breaks down.

imaginenore 1 hour ago 1 reply      
Any perception, by definition, is a construction of the brain.
SwampDragon Build real-time apps with Django
73 points by ilearner  9 hours ago   6 comments top 4
hagsteel 1 hour ago 0 replies      
Hi I'm the author of SwampDragon (I was rather surprised to see this on Hacker news today!).

I'm celebrating my daughters first birthday today so I have to keep it a bit short:

About the serializers: You do need separate serializers from DRF (they are not the same package after all).

As someone pointed out on Github as well, this is depending on Redis 2.8 since it's using Redis pubsub, and I will add this to the documentation.

If you have any questions feel free to email me at: hagstedt at gmail.com.I will try to compile all questions into an FAQ and put it on swampdragon.net.

andybak 4 hours ago 0 replies      
I wonder how the serializers will coexist with the Django Rest Framework serializers in an existing app? How different are they? Will I have to have dozens of duplicate definitions? One for DRF and one for SwampDragon?
dilipray 4 hours ago 0 replies      
I don't know much about django and websocket how they scale have not tested them anytime. I have used Wheezy.Wheezy is loosely coupled which is similar to flask. I have used it with websocket. Scales amazing. https://bitbucket.org/akorn/wheezy.web/


imslavko 6 hours ago 1 reply      
Looks like it has a dependency on Redis and its pub-sub?

My speculation:

I didn't dig much into code but if Swampdragon relies on Redis pub-sub to notice when a result of a query might change and then refetches the query and diffs the result (this is a common strategy I saw among different "real-time" web-frameworks), then depending on the complexity of queries and rate of changes you can put the load on your database. And depending on the fetched result, you can spend more CPU cycles on diffing the results.

Ezra Zygmuntowicz has died
267 points by milesf  10 hours ago   27 comments top 22
jxf 3 hours ago 1 reply      
One time I was working on doing some tricky distributed routing for a freelance customer that was using Merb. At the time I didn't know Ezra and we'd never personally met, but I explained my problem over email and asked if he had any suggestions. I wasn't really expecting a reply -- it was essentially a cold call.

He immediately dropped what he was doing and emailed me back, "that sounds like a really interesting problem -- can I call you and we'll set up a screenshare?" He then spent two hours helping me get it right, free of charge, and he never asked for anything. (I eventually had to email a few of his colleagues to figure out his office address to send him a thank-you present.)

I think that is the sort of thing that epitomized Ezra, from everything I've heard from his many other friends: he was funny, patient, and most of all kind.

bphogan 14 minutes ago 0 replies      
He taught me how to deploy Rails apps, and with his help I figured out what I needed to get a production environment running on Windows. Then he asked me to contribute what I know to https://pragprog.com/book/fr_deploy/deploying-rails-applicat... out of print now).

He's one of three people responsible for turning my career completely around back in 2005. He always paid it forward, and I have always done that myself since.

He was amazing. Honestly, we need more of that and less "you're doing it wrong."

antirez 8 hours ago 0 replies      
Ezra was the first to start making Redis popular, wrote the initial implementation of the Ruby client, gave the first talk I remember at lightning conf. One time I met him at EY office with his family, with the 2 months old child. At some point he started to disappear more and more, we were supposed to meet in Portland at a Redis conf and he was not able to make it. I was concerned about him every time I saw a rare tweet. I'm sorry Ezra.
holoway 52 minutes ago 0 replies      
Ezra was so good to me. He helped write Chef, tool our idea and ran with it as a critical part of Engine Yard cloud. We wrote chef solo together . He and his wife made my wife and I feel warm and welcomed in San Francisco. Rest well, big guy.
mreider 10 hours ago 0 replies      
He used to fly little radio controlled helicopters all over our office at Engine Yard. Playful and fun. The real tragedy has little to do with his departure from the world oftechnology. The real tragedy is that his son, who must be no older than six, has lost his father. So so sad.
milesf 9 hours ago 0 replies      
If you didn't know Ezra, some of his talks are available on Confreaks:


In particular, his last talk at RailsConf 2012 is a fascinating history of Ruby on Rails:


Adam_Simms 46 minutes ago 0 replies      
He moved to Portland, Oregon for a new job, but I believe mostly to jump back into the glass blowing scene he helped create in the 90's. Ezra was a innovator in the glass pipe world. A world class artist that reinvented lampworking.
mattetti 10 hours ago 0 replies      
The way I will always remember Ezra: https://www.flickr.com/photos/adelcambre/2932034431/in/photo... MerbCamp, 2008
heimidal 9 hours ago 0 replies      
I shared a cab ride with Ezra from the New Orleans airport to the RubyConf hotel in 2010. In the very short time we spent in the car talking about his new role at VMware working on Cloud Foundry, his enthusiasm and passion for Ruby and the community's future left a huge impression on me.

Ezra, you will be missed.

asenchi 5 hours ago 0 replies      
Ezra hired me at Engine Yard about two months before he left. I loved discussing infrastructure and software with him. He did a lot for the Ruby community and brought to light lots of great tech (redis and nginx). He had a big impact on my career and for that I will be forever grateful. Prayers and thoughts with this family. Rest in peace Ezra.
tmornini_ey 8 hours ago 0 replies      
I woke up this morning to Regan's post on that old photo.

It's an incredibly sad day: a great hacker, founder, and community member has been lost forever.

Goodbye Exra, I'll miss you.

_pius 1 hour ago 0 replies      
This is terribly sad. Profound loss for the Ruby community, among many others.
rabble 9 hours ago 0 replies      
Ezra was a playful hacker who was never afraid to strike out and build something crazy.
brumir 10 hours ago 1 reply      
I meet Ezra at RailsConf 2007, this was pre Engine yard if I am not mistaken. At this point he was all merb. He was fun to be around, very positive attitude and extremely smart.

Sad day

milesf 10 hours ago 0 replies      
I met Ezra back at RailsConf (2007) after a talk he gave. Scary smart, yet friendly and humble. The man left us way too soon.
nathan7 2 hours ago 0 replies      
I'll miss Ezra and his outgoing spirit. Goodbye, old friend.
sebie 6 hours ago 0 replies      
He left us to early. It is very, very sad. RIP you will be missed :/
eternalban 3 hours ago 0 replies      
Ezra is an upstanding human, a generous and helpful spirit. He will be missed.
davidw 9 hours ago 0 replies      
Wow... Very sad news. His twitter page shows him living in Eugene, Oregon, my hometown. I wonder what he was doing there.
RickHull 9 hours ago 0 replies      
Oh wow. So sad to hear about a pillar and pioneer in the Ruby community.
piyushpr134 10 hours ago 1 reply      
:(( What happened ?
JBFromOZ 9 hours ago 0 replies      
shit man! that sucks, you will be missed :-{
Display the available key bindings automatically and dynamically in Emacs
33 points by masolino  6 hours ago   discuss
Can Mushrooms Treat Depression?
86 points by gkop  13 hours ago   18 comments top 5
nalahal 8 hours ago 8 replies      
As someone with depression, personally I wouldn't recommend mushrooms to others in a similar situation. I've tried them once and it was a rather uncomfortable experience. In fact, a quote from the acticle describes my experience fairly well - "When suffering depression, people get stuck in a spiral of negative thoughts and cannot get out of it". This does tend to describe my thought process in general, but this was exacerbated on mushrooms. I had little control over my thought process, which made me anxious, which made the experience harder to deal with. Although, when considering certain personal issues at the time which would normally cause me anxiety, they did feel much less significant.

That said, I've heard many stories of people experiencing life changing epiphanies from mushroom trips as described in the article, and I am intrigued by articles like this and the science behind it. Perhaps my environment, or the specific mushrooms I tried made it worse. Also, having tried them once and come out the other end fine may make future experiences less uncomfortable - a large part of what made it difficult was a concern that my mental state would be permanently affected by the experience, and this was not the case. Still, it makes me less inclined to try them again until I'm in a better mental state.

For what it's worth, these were the variety of "magic truffles" which are legal and readily obtainable from high street stores in Amsterdam, but as far as I'm aware the active ingredient is the same psilocybin as other forms of magic mushrooms. I wasn't on any medication at the time, though I have heard of certain anti-depressants and other medication either having a negative effect, or negating the effects of mushrooms entirely.

jrapdx3 10 hours ago 1 reply      
Seems like interest in potential beneficial effects of hallucinogens has been rising. It's certainly true for ketamine, as it's being studied as a therapy for treatment resistant depression. The results look promising but the jury is still out re: satisfying FDA approval requirements.

As the article says, psilocybin could have favorable effects in depression, possibly resembling results with ketamine. Other hallucingenics are often mentioned in this regard, like LSD or mescaline. There have been reports of utility of low dose THC for depression.

In discussions of potential value of any drug the pivotal issue is the risk/benefit ratio. Hallucinogens have unmistakably caused adverse reactions. Panic, psychosis, dissociative states have been observed often enough to warrant a high level of caution in using such drugs.

Part of the problem is the randomness of bad reactions. It's usually difficult to predict which users (or subsets of users) will endure adverse effects at a particular drug dose. Drug interactions is another concern. A great deal of study is necessary to sort out the parameters of (relatively) safe use.

gregpilling 2 hours ago 0 replies      
I tired them in Bali last year (they have been made illegal since then) and I thought my mood was slightly changed for a few days. I did not get some large effect, but there was some minor effect. Mostly I felt happily drunk.

I have battled depression for years, and while I would agree that there was some minor uplift, it was not a major change in my case.

increment_i 6 hours ago 0 replies      
Mushrooms are not for the faint of heart. Generally, they will cause extreme anxiety in those who are naturally prone to it, possibly to the breaking point -- especially if in a public or unfamiliar setting. However, the drug itself is highly psychoactive and can truly lead to some amazing revelations about life in general, that break through the shroud of depression.
acd 7 hours ago 0 replies      
They say two great products came out of Berkeley BSD and LSD
New optimizations for X86 in upcoming GCC 5.0
173 points by ingve  18 hours ago   32 comments top 7
veselin 41 minutes ago 0 replies      
One thing that is not clear to me is if OOP code such as copy constructors will benefit from using the vector registers. Just having vector copy of objects may turn out to be a big difference.

Otherwise examples with array of size 4 elements are nice to show, but in most of these cases it is also easy to use intrinsics.

justincormack 17 hours ago 3 replies      
Here is a more general list of gcc 5 changes https://gcc.gnu.org/gcc-5/changes.html

EDIT was looking at this for __builtin_mul_overflow which apparently are in clang already, for testing overflow of arbitrary types.

livemusic 14 hours ago 1 reply      
Only loosely related, but I'm curious: What compiler optimizations have the biggest impact on scientific / floating point computation? Integer (audio/image) ops? With modern CPUs performing speculative execution, register renaming, and all the other magic they do, the CPU is acting like an optimizer in its own right. x64 is mostly just a byte code that gets JIT compiled at runtime. I'd be interested in seeing how much specific optimizations (including classic ones) contribute to speeding things up.
e12e 16 hours ago 3 replies      
Does anyone know if -O3 (or -O2?) -march=native should be enough to get reasonable optimization for running on the same cpu as the gcc host? Or are one better off tweaking options manually (note, I know that knowing the details of how gcc works will always be better than not -- I'm just wondering if -march=native is currently considered stable/"good enough" from reasonable value of "enough" ;-
medgno 17 hours ago 2 replies      
I'm so glad to see auto-vectorization happening more and more often. However, I wonder whether a language that had built-in support for primitive floating-point vector types (e.g., GLSL's vec3, vec4, mat3, mat4) could help the compiler with performing these sorts of optimizations.
janvdberg 17 hours ago 3 replies      
As this is the number 1 story on HN now: can someone explain what kind of improvements we will see in day to day use from this?
ape4 17 hours ago 1 reply      
Competition (with clang) is good.
Graph of SICP chapters
32 points by anodes  8 hours ago   5 comments top 3
anodes 21 minutes ago 0 replies      
It would be great if anyone has a suggestion on which text to perform this graph analysis on. Ideally the ones with succinct text like SICP, licensed openly, and with less dependency on visual diagrams. This is so that the model is closer to the actual "abstract-syntax-tree" structure of the book.
jnotarstefano 2 hours ago 1 reply      
I am not sure I understand this graph. When is there in an edge between two chapters? What is the "weight" of an edge?
vdloo 5 hours ago 1 reply      
This is really cool, I recently finished chapter 1 and this really puts in perspective how much there is left to explore.
Regex Crossword
303 points by anewhnaccount  1 day ago   102 comments top 35
pyroMax 23 hours ago 6 replies      
How about you save my progress in a cookie?

You might find this hard to believe, but I don't have a Facebook account.

jfmercer 23 hours ago 1 reply      
This is fantastic work. Many thanks. One request though: please add one or more alternate logins than Facebook.
throwaway_yy2Di 17 hours ago 1 reply      
These crosswords are NP-hard! D: Here's a short encoding of 3SAT:

Alphabet: [01]

Number of variables: N

Columns: one for each clause, i.e.:

    r/.0...|..1..|....1/        (-x2 V x3 V x5)
They're disjunctions of three regexps of length N. Each alternative fixes one positional variable to either 0 or 1, and ignores the rest.

Rows: one for each variable, forcing it to be single-valued across the clauses:


Robadob 23 hours ago 4 replies      
My main problem with this is telling the difference between O and 0, the clue O's look more like 0 so I have to copy paste them. (Although I don't think I've had any numbers required for solutions yet).
TylerJay 23 hours ago 0 replies      
Nice work overall. That was fun.

Just a heads-up though: There are some typos and grammar mistakes in your explanations, so if you plan to share professionally, you might want to have someone proofread it. Also, your Facebook OAuth window that pops up upon page load is being caught by Chrome's built-in popup blocker. Either way though, I'm always disappointed when Facebook OAuth is the only login method. I get that it's easy to implement, but I can't imagine this is a very security-sensitive app in terms of user-accounts. I would like to save my progress, but it's not worth the risk or analysis required to hook up my Facebook.

maaaats 1 day ago 0 replies      
The ability to rotate was really sweet. Fun challenge, some syntax I wasn't sure about (back referencing) but now probably will remember.
natch 22 hours ago 2 replies      
Nice, but the answers being phrases ruins it for me, because you start seeing the answers without needed to check the regular expressions.

Really nicely designed though. Clean UI. Wouldn't mind if it was enlarged to use more of the screen real estate (tiny fonts are hard to read). I had fun with this.

yoha 1 day ago 1 reply      
It would be nice to be switched to the next level automatically.
FrankenPC 20 hours ago 3 replies      
In case there is someone out there who never saw MIT's entry into the RegEx competition: http://rampion.github.io/RegHex/

This is the web incarnation of that hexagon puzzle.

toastedzergling 18 hours ago 4 replies      
I really dislike that patterns using * wildcard required using the letters beforehand. The game requires A* to match a row with zero or more A's, but this is absolutely incorrect, as A* will gladly match ANY string, like QQQQ.
xorcist 7 hours ago 1 reply      
I want to be able to return later, but it's a bit too much to register a Facebook account (which you presumably can't do with a throwaway address?).

I'd be happy to donate more than whatever Facebook pays you for every newly registered account if you would implement a simpler method.

kercker 3 hours ago 0 replies      
Funny, instructive.

Good to practise regular expressions.

kowdermeister 7 hours ago 1 reply      
What's wrong on beginner / 01? :Dhttp://imgur.com/eJBJYSx
ryanlschneider 21 hours ago 1 reply      
Fun! When I saw the title, I was expecting the opposite: a normal cross word with the usual "42 Across (4): It gets things done" style hints, but the answers were valid regex's. Someone make that too!
source99 19 hours ago 0 replies      
Pretty cool but I don't feel like I am actually learning regex. I think the explanations/definitions need to be more clear and probably the answers less easy to guess.
baby 17 hours ago 2 replies      

Anyone understand what (.)*DO\1 should match?

edit: Okay, I was writting 0 instead of O that's why it wasn't working.

Edmontonian 16 hours ago 3 replies      
What does it mean when a reg ex ends with a `\1` (backslash 1) as in this example third beginner puzzle? (.)+\1


Edmontonian 16 hours ago 0 replies      
I got the solution but didn't understand it for the beginner "naughty" puzzle ... http://regexcrossword.com/challenges/beginner/puzzles/2
greenyouse 11 hours ago 0 replies      
This is fun! I feel like it is also good practice for logic programming too. Combine the regexes and put one or all possible solutions into each cell of the matrix :)
Adrien_L 23 hours ago 0 replies      
That was fun (in a really nerdy way)!I'm currently trying to educate one of my team member about regular expressions, this could be a fun way to get him practicing.
almost 22 hours ago 0 replies      

I had a lot of fun writing a solver in Haskell for a crossword like this a few months ago. Apologies for the self promotion but here's a link to the article I wrote about it http://almostobsolete.net/regex-crossword/part1.html

_jb 23 hours ago 0 replies      
So I had a bunch of important stuff to get done today, but now I know what I'll do instead. This is so much fun, well done!
kf5jak 19 hours ago 0 replies      
I learned regex this way about a year ago. First I went through the tutorials on http://regexone.com/, then started working the puzzles to burn it in. Really easy and useful once you understand it!
mbillie1 22 hours ago 0 replies      
I made it to http://regexcrossword.com/challenges/experienced/puzzles/4 before I opted to keep my sanity for the remainder of the day instead of continuing :) very well done. As noted, add non-FB login options!
Edmontonian 23 hours ago 0 replies      
Wish there were an offline open source version.

With the exception of DHH, do they believe in Open Source in Denmark? (jk)

kazinator 23 hours ago 0 replies      
This is good homework/quiz stuff if you're teaching people regexes, just to spice things up a little bit.
mfsch 21 hours ago 1 reply      
Cool game, it really helped me brush up my regex skills.

I think I found an error in The Lektor Device: The I in WITH could also be a T from the rules, but only the I is accepted.

jordanpg 22 hours ago 0 replies      
This highlights how crossword puzzles are a valuable way to stretch the mind laterally. This is a way to think about regexes that rarely comes up in practice: comparing one regex against another unrelated one.
jpetersonmn 18 hours ago 0 replies      
No facebook account here either. Would be nice to be able to sign up with email or log in with google.
jacksondc 19 hours ago 0 replies      
I reluctantly logged in with Facebook and lost all my progress .
simarpreet007 19 hours ago 0 replies      
Closed as soon as I saw the Facebook login needed prompt.
klausseiler 23 hours ago 1 reply      
i don't know how to solve beginner 4?shouldn't you be able to put anything into it?
dankohn1 23 hours ago 0 replies      
Challenging and impressive.
ukd1 1 day ago 0 replies      
That was pretty fun!
spacefight 1 day ago 2 replies      
"Notice! In order to save your progress you have to login with Facebook."

Yeah, maybe... let me check: NOPE.

What do all the controls in an aeroplane cockpit do?
139 points by lisper  20 hours ago   27 comments top 9
omegant 24 minutes ago 0 replies      
As a complementary curiosity, an Airbus A320 has 575 buttons and knobs (that includes alphanumerical pads and double knobs), and 364 circuit brakers.I had so many kids asking how many buttons there are at the cockpit, that I finally spent a Madrid - Rome flight counting them (under the surprised look of the captain).

I guess that a long haul model like a A 380 has more or less the same, maybe some dozens more due to the increased system complexity (more engines, extra hydraulic and electric sys..) but the brakers are located at the instrument bay under te cockpit and that makes it look a bit les cluttered).

Animats 14 hours ago 1 reply      
The example aircraft is a modernized Boeing 737. First flight in 1967 and still being manufactured, 47 years later. That's a long production run.

The description of the controls is long, but there are two main divisions - flying the aircraft, and systems management. One of the big problems in cockpit design is keeping the pilot from spending too much "head down time" on systems management.

The 737 was the first jet transport designed for a flight crew of two. Previous jets had a flight engineer as well. Further back in aviation history, there were navigators and radio operators. (BOAC even had a "flight clerk", equipped with a typewriter, on some flights.) As crew size dropped, the pilots picked up more system management duties. This remains a problem. Cockpit automation generally means that the systems take care of themselves unless something goes wrong. Then the pilots have to devote a lot of attention to dealing with the problem. Crashes have occurred because the pilots were dealing with some system problem and not focused on driving.

nlh 13 hours ago 3 replies      
I remember seeing this posted on Quora a while ago and it still stands out as one of the best answers I've ever read. And the biggest takeaway for me was (and still is):

"Redundancy. Aircraft manufacturers are really, really (really) big on redundancy."

gte525u 3 hours ago 0 replies      
Most of the quora answers seem to ignore the significant shift in avionics that has occurred with the general adoption of glass cockpits.

In older aircraft, you would've been staring at a wall of gauges, lamps, and buttons i.e., C130[1]. These, for the most part, have been consolidated into large multi-function displays (MFDs) like the C130 AMP [2] or C-5M [3] with the remaining analog controls are either there for emergency use or for the pilot's benefit like the yoke.

The MFDs generally reduce pilot workload by consolidating relevant data into task-oriented screens. However, the main driver was more likely the significant weight reductions and costs associated with manufacture and maintenance of the aircraft - fewer cockpit components and simpler wiring.

Ultimately, the types of controls are similar between the older and new aircraft. The notable exception is the keyboard(?!) in the A380s [4].

[1] http://commons.wikimedia.org/wiki/File:C-130_Hercules_cockpi...[2] C130 AMP http://www.edwards.af.mil/shared/media/photodb/photos/091109...[3] C5M http://upload.wikimedia.org/wikipedia/commons/9/9f/C-5M_Cock...[4] A380 http://www.aerospace-technology.com/uploads/newsarticle/6889...

tempestn 9 hours ago 0 replies      
There's an article in the Atlantic about this answer: http://www.theatlantic.com/technology/archive/2012/03/the-st...
frik 8 hours ago 1 reply      
The first quora comment is long and interesting, but the "photos" are from a flight simulator, probably Flight Simulator X from Microsoft. And flying a plane in that simulator is not that hard, something one can learn in a few hours. And all the knobs have tooltips too.
schoen 11 hours ago 1 reply      
When I was a kid I had the Space Shuttle Operator's Manual


which was pretty awesome (it wasn't used for crew training, it's a popularization of what's involved in operating a Shuttle). It also takes you through a pretty substantial number of control switches and indicators, even while simplifying things.

I wonder if there's a way to compare the complexity of the body of knowledge that jet pilots have mastered (this explanation doesn't even go into aerodynamics or flying skills, or the purpose or physics of some of the systems it alludes to, or rules and procedures, or abbreviations or jargon) to what doctors know about bodies, pathology, diagnosis, and medical interventions.

frik 9 hours ago 1 reply      
I read on HN that Quora pivoted and joined Ycombinator, more for for exposure I guess? It was basically a StackOverflow alternative with real names. Will be interesting to see how their piviot to something else turns out.

Source: https://news.ycombinator.com/item?id=7723278

wheaties 14 hours ago 1 reply      
And this is why I'll go up to my IFR and maybe dual prop but nothing more. That guy is the kind d of person I want flying my plane, maybe. Only if he handles context switching well...
Five suggestions for setting up a Go project Dave Cheney
3 points by enobrev  1 hour ago   discuss
How to Fight Corruption with Game Theory
97 points by jim-greer  16 hours ago   51 comments top 12
tomohawk 3 hours ago 2 replies      
Next time you make a donation that could be disclosed, are you prepared to lose your job over it?

Disclosing the sources of campaign funding is not all roses. There are several groups who use that information to intimidate doners. They go after their careers, their businesses, their families, their reputations. They create maps of where "the opposition" lives, and then let the lunatic fringe on their side do what comes naturally to them.

bostik 7 hours ago 1 reply      
The thing I've always found intriguing is that the tricks used by politicians and parties to hide the sources of their campaign financing feel like they were adapted from organised crime. (Which politics may well be, but that's another matter.)

* Make sure that individual donations are small enough to avoid the source reporting

* Cycle larger donations through entities that themselves do not need to report their sources

In any other context these patterns would trigger all kinds of money laundering alarms, but in politics it's considered business as usual.

bring1 1 hour ago 3 replies      
Can somebody explain me why a democracy allows for donations at all?Donations will clearly skew the political landscape towards the people who have money to donate.And those people are more likely to donate with an expected value. So they will try to skew the politics in their favour.

Why would it be bad to forbid any kind of political donation for established parties.I see the need to fund a grow new parties, but established parties should get by with the money they receive from the government.

jim-greer 16 hours ago 3 replies      
I've posted on here about CounterPAC before. We didn't crush it but we learned a lot for just $500k and we took out one terrible incumbent.
jchendy 12 hours ago 0 replies      
There's a great interview with Jim Greer on the Thinking Poker podcast. It's mainly about CounterPAC without much poker talk. http://www.thinkingpoker.net/2014/11/episode-101-jim-greer/
john2x 10 hours ago 1 reply      
Interesting idea, and I hope it works in the both short term and long term.

As an outsider (and just overall uninformed about politics), since CounterPAC is transparent, is it an additional incentive for politicians to be associated with CounterPAC? And an "anti-incentive"(?) to refuse it, since people will know that they (likely) took dark money?

JDDunn9 14 hours ago 1 reply      
Oh, all we have to do is out-spend the largest corporations in the world. Problem solved...
danieltillett 12 hours ago 1 reply      
Jim great idea. How about a extension of this idea of picking close races and trying to get the candidates to accept no money at all with the threat to go thermonuclear on the first candidate that defects?
alexpritchett 10 hours ago 1 reply      
I'm not convinced that you know what game theory actually is...
aligajani 12 hours ago 0 replies      
Solving social problems with numbers ? Doesn't seem right.
scoofy 14 hours ago 3 replies      
A decent idea, but the anecdotal evidence of success seems like feel-good fluff, and not actually relevant.

CounterPAC seems like it's trying to create a spending arms race, but with the basis in simple disclosure, rather than political views. However, that the corporations have vastly higher resources and incentives to spend. Unfortunately, it seems trivial for firms to create a Counter-CounterPAC with the aim at depleting the resources of any successful PAC with these intentions.

From my perspective, this is a long run failing strategy, but has the possibly to succeed in the short run. It would need to hit the reps, and hit hard. Then immediately (within a few election cycles) turn and pass strong disclosure laws to create a change in the way the game works.

gimpei78 13 hours ago 1 reply      
I know I'm being pedantic, but where is the game theory? The threat of campaign spending as a device to induce a more optimal equilibrium? If that's the case everyone uses game theory, no?
How speakers make sound
139 points by lowglow  19 hours ago   12 comments top 3
baddox 18 hours ago 2 replies      
On the other end of the audio stack, I highly recommend this multipart video lecture about microphone design. The guy is a legit microphone engineer who knows what he's talking about and explains it really well. Some of the principles, like how directional vs. omnidirectional microphones work, are actually quite intuitive and much simpler than I would have guessed.


alricb 10 hours ago 1 reply      
Well, you also need a box that's adapted to the speaker, otherwise it won't make much sound.
lovelearning 10 hours ago 0 replies      
Loved the car engine one too! His interview [1] has details on tools and processes used.

[1]: http://blogs.adobe.com/creativecloud/animagraffs-education-a...

What's wrong with statistics in Julia?
118 points by benhamner  18 hours ago   47 comments top 8
peatmoss 21 minutes ago 1 reply      
I've got a perhaps nave question related to:

> In particular, Id like to replace DataFrames with a new type that no longer occupies a strange intermediate position between matrices and relational tables.

Namely, why is an embedded SQLite database not used for all things tabular in languages like R/Julia/Foo? I was thinking about this as I was attempting to reconstruct a visualization in Racket using their (pretty good!) 2d plotting facilities and lamenting not having a tabular data structure.

SQLite is embeddable. It has fast in-memory database support. It can operate reasonably quickly on data that is stored to disk. It supports indexing. NULL values already exist to represent missingness. SQLite allows for callbacks to user-supplied functions that I'd imagine could be created relatively easy in something like Julia.

As a side benefit, it seems like a SQLite-oriented tabular data store could be extended, like dplyr has done, to support other databases.

When I think about the use cases I've encountered where I've found myself reaching for DataFrame or data.frame, I am struggling to think how a tightly integrated SQLite wouldn't work.

Are there Computer Science reasons why this is a silly idea? I know Pandas claims nominally better performance than SQLite in some circumstances, but then again SQLite has also recently seen some substantial performance gains.

gajomi 16 hours ago 1 reply      
I am a big fan of much of the work going on with statistics in Julia.

I'd like to point out another (related) thing though that is wrong with the state of statistics in Julia, in my opinion. Actually my problem has less to do with statistics, per se, than the mathematical foundations of statistical calculations. There are, of course, many different approaches to statistical inference (the Bayesian vs. frequentist camps infamous among these), but the calculations all come down to reasoning about probabilities which is a well posed but not always easy task. The Julia developers, in their wisdom, have recognized this, and as such have put together Distributions.jl the purpose of which is to provide datatypes and utility functions over probability distributions (plus some vestigial methods about maximum likelihood inference, which thankfully stay out of the way). If you haven't seen it, check it out. It's got a nice design, I think.

But there is presently a clear server limitation: the parameterized type hierarchy. The requirement is that every distribution have support over a set in which all members are either Univariate, Multivariate or Matrixvariate with elements in the fields being either Discrete or Continuous. This obviously misses the general picture of the kinds of sets from which one draws random variables, which plays into issues that the article mentions (if the probability distribution datatype can't model the data you have to do ad hoc things to account for it). Indeed a huge chunk of the issues currently open in the Distributions github page essential boil down to problems with representing the sets and/or spaces from which elements in the distribution are drawn:


End users have a variety of well developed ideas in mind about the sets that their samples belong to and even the spaces from which they are drawn from which currently exceed the representational capacity of the existing types. In my opinion the way to fix this is to start a separate library that focuses on types and methods for representing and manipulating sets and spaces (i.e. topological information attached to sets). This could then be consumed by the Distributions people as well as others modeling things outside of probability.

nkurz 17 hours ago 0 replies      
I found some development discussion about the changes to missing values here: https://github.com/JuliaLang/julia/issues/8423

I've yet to try out Julia, but seeing productive and intelligent discussion like this followed quickly by execution certainly inspires confidence that it's a language with considerable promise.

username223 14 hours ago 1 reply      
> In a future blog post, Ill describe how Nullable works in greater detail.

This is the part that interests me. If you're not using sentinel values like NaN, then it seems like you're left with pointers (terrible) or tags and tag tests (also pretty bad). If Julia can't use the processor's SIMD instructions (or the GPU in the near future), it's not suitable for inner loops. Do you special-case "Nullable{Double}" to use NaN as its "NA" value?

nyir 17 hours ago 2 replies      
Isn't the rather big flexibility of R to not eagerly evaluate, or to rewrite function arguments entirely (and apparently scope manipulation, that's a new one for me) one of the major points of critic? It always seemed to me that having "proper" macros is a selling point rather than only an approximation/emulation.
howeman 12 hours ago 1 reply      
I'd be interested in seeing things you think are done correctly as well. We're working to build a statistics package in go as well (github.com/gonum/stat). It's good that people are taking a fresh look. Our capabilities are clearly limited at the moment, and the features of Go are quite different from those of Julia, but there's still a lot that can be learned in common.
lottin 5 hours ago 2 replies      
One of Julia's main selling points has been speed. They said there was no reason a dynamic language had to be slow, but now we see that as soon as they start adding basic features, such as support for missing values, it's beginning to take a toll on performance. I wonder if Julia 1.0 will be any faster than R or Python.
vegabook 17 hours ago 3 replies      
Is Julia seriously targeting the R user base? Or, if it is honest with itself, is it going after the matlab people first. My sense is that engineers (Matlab users) and to a certain extent scientists (Python rules) will be drawn in, but the stats crowd requires subtly different priorities, that seem to be alluded to here. Graphics are one such priority. The excellent ggplot2 gets all the glory, but base graphics are mega-fast, extremely robust, and deeply customizable, and there is the unsung hero of grid graphics which provides an extraordinary set of abstractions for building things like ggplot2 and/or Lattice. My point is that so much graphical quality speaks directly to one of the key requirements of statisticians, where at the end of the analysis, communication is usually required. This is much less the case for engineers or financiers (big matlab users) for example, where correct and fast answers are the endpoint. Where is Julia on graphics? Last time I checked it was still trying to interface to R and/or Matplotlib.

The other thing that intrigues me is Julia's scalar computations being "at least" as important as vectors. This has the whiff of For loops (an immediate eye-roller for R people) accustomed to vectorization everywhere and essentially, exclusively. I am not suggesting that Julia doesn't do vectors well, just that, like any set of priorities, it is not catering first for statisticians, whose requirements are often quite different from those of scientists and engineers who use Matlab and Python.

Interoperating Between Objective-C and Rust
81 points by adamnemecek  17 hours ago   15 comments top 10
kibwen 14 hours ago 0 replies      
Very impressive! This post demonstrates a great deal of understanding of the semantics of both languages, and the resultant interface looks both usable and thorough. I especially enjoyed the use of a Rust macro to emulate the syntax of Objective-C message passing, as well as the demonstration of the utility of "phantom" type parameters.
one-more-minute 1 hour ago 0 replies      
Very cool and oddly relevant to me since as well as taking an interest in Rust recently, I'm also writing an Objective-C bridge for Julia (which I'll write about soon).

Like the languages themselves the bridges are polar opposites, of course static and safe vs. flexible and interactive, etc. It's great to see it (and learn from it) being done on the other side of those tradeoffs.

comex 11 hours ago 1 reply      
Just to bring up something I've been thinking about, Rust would have a lower impedance mismatch with Swift interfaces - memory safe APIs, with a more C-like method syntax, more strongly typed in general (optionals, generics...), more functional (although AFAIK there aren't currently many Swift-specific APIs, as opposed to Objective-C ports), and so on. Its binary module system also matches Rust somewhat better than Objective-C's basically #include based system. Unfortunately, Swift's runtime, aside from being more complicated than Objective-C's, is completely undocumented (and closed-source), so it would take a good bit of reverse engineering to create a bridge.
the_mitsuhiko 5 hours ago 0 replies      
That's interesting. I always had problems using objc_msgSend via FFIs because if I remember correctly it was implemented via setjmp and longjmp.
zerr 2 hours ago 0 replies      
Huh, Obj-C got its stairway to heaven :)
dmitryskiba 11 hours ago 1 reply      
Strictly speaking, [string UTF8String] is equivalent to '((const char <star>(<star>)(id, SEL))objc_msgSend)(string, selector)'. Since objc_msgSend is vararg function, it will promote it's arguments, so for example method taking float will be called with double. Casting to a proper function type works around that.
xngzng 12 hours ago 1 reply      
Great writeup. More interested though on how one can use Rust to write iOS, OS X and Android framework/library. This will make Rust replacing C++ for cross platform codes.
cfrs 14 hours ago 1 reply      
lukeh 12 hours ago 0 replies      
Really impressive stuff.
xhyl 14 hours ago 0 replies      
An argument against call/cc (2012)
68 points by luu  16 hours ago   10 comments top 4
jrapdx3 12 hours ago 0 replies      
FWIW, the behavior of call/cc, et. al., is implementation dependent, and memory leakiness varies considerably.

I tried the "memory leak" tests in Chicken (4.9.1) using the CSI REPL. The only modification made to the example "gen-leak.scm" was uncommenting the (display ...) line in (print-stream ...).

The result with (print-stream #f (gen-stream ones)) was non-terminating production of "1", like an infinite loop, but it didn't run out of memory, even after running >10 minutes in a resource-constrained VM.

I'm not familiar enough with how call/cc is implemented in Scheme48 vs. Chicken to comment in detail, but I'm sure there are substantial differences. The Chicken site (http://call-cc.org) provides quite a bit of info about its own implementation.

ssp 14 hours ago 1 reply      
If you generalize labels so that they become first class, then call/cc can be written in terms of goto. http://ssp.impulsetrain.com/goto.html
davexunit 13 hours ago 2 replies      
Delimited continuations are better. Guile has them, and they rock. It's very easy to implement coroutines and other control flow structures with them.
gte525u 3 hours ago 0 replies      
This seems a bit ironic to see this posted on one of the few sites on the internet that use continuations as it's primary control flow mechanism.
Condoms not effective against HPV or herpes
15 points by heeton  2 hours ago   12 comments top 4
dotBen 20 minutes ago 1 reply      
There is no scientific proof Hep C can be sexually transmitted, many studies have concluded [0]. It's a little concerning the author of the article, an OB/GYN doctor, is asserting otherwise.

My British education, from the 90's, taught me the risks of HSV and HPV transmission occurring despite barrier methods (condoms). I'm assuming seeing as this is being voted up that this isn't something taught in America?

[0] http://www.ncbi.nlm.nih.gov/pubmed/15128350

xofer 1 hour ago 0 replies      
There is but one relevant scientifically proven fact in the article (with no citation): "UCSF researchers have shown these viruses to be present on genital skin with no symptoms that might prompt diagnosis and treatment." Everything else relevant to the thesis is speculation and commentary.
tormeh 9 minutes ago 0 replies      
Largely overlooked is that unprotected oral sex isn't really safe:http://en.wikipedia.org/wiki/Sexually_transmitted_disease#Tr...
adrianlmm 1 hour ago 2 replies      
> Experts say being exposed to at least one STD virus is virtually inevitable

If you are promiscuous of course, for those who don't the chance is almost cero.

Show HN: GitBook WebEditor
74 points by friendcode  17 hours ago   15 comments top 7
jplahn 14 hours ago 0 replies      
I've been using this to write a book and really enjoy it so far (though I also enjoyed the desktop version, for what it's worth).

One thing I've noticed (and that I tweeted earlier) is that having my github hooked up to my book, every time I save (via cmd-s, which I do out of habit every minute or so) it automatically pushes to my repo. So without realizing it, I had something like 50 commits after working for 15 minutes. Not a big deal, but it might be nice to separate the two.

The other thing I've noticed is that saving also builds the book. So in this same 15 minute period of working, I went to the status page of my book and noticed I had 50 or so builds currently being processed, with almost all of them failing in a flurry of emails an hour later. (Side note, any reason for this?)

So the only thing I would say is that I'd like to see a separation of the saving, committing, and building, much like the desktop version had. I'd like to build my book (and commit it) at the end of the session, not on every save. But maybe that's just me.

foreign-inc 13 hours ago 2 replies      
Am I the only one who thought this was a GitHub product from the LnF of their website?
atonse 11 hours ago 3 replies      
Err maybe I'm misunderstanding this but the pricing says 80% royalty? That means they take 80% of your profits if you sell a book authored in this tool? Is this normal in the book world?

Edit: I think I misread, the writer probably gets 80% royalty.

benatkin 13 hours ago 0 replies      
Has this company licensed the Git trademark? http://git-scm.com/trademark 2.3
killercup 5 hours ago 0 replies      
This looks interesting. It reminds me of http://prose.io/ which is basically a general-purpose Github-based web editor and that I used some time ago to edit my markdown files.
s3nnyy 6 hours ago 1 reply      
I've just wrote something for about an hour, then went to make a new outline point via "add article" on the left pane. As a result, the editor refreshed to the new empty outline-point and my previous written text disappeared, which is a big no-go, I guess.
nacs 12 hours ago 0 replies      
Looks good. Any plans for Bitbucket support?
Music publishers sue an ISP over piracy
61 points by sinak  16 hours ago   33 comments top 13
chatmasta 15 hours ago 1 reply      
> refuse to suspend, terminate, or otherwise penalize subscriber accounts

Combined with the fact that many municipalities only have one option for a broadband provider, the implied assertion that an ISP should terminate service for a customer, likely leaving the customer with no option to connect to the Internet, is an impossible suggestion. As a society we are converging on the consensus that Internet access is a basic human right. Copyright offenses, by one member of a household, should not be reason to suspend or terminate the right of that household to access the Internet. Moreover, no corporation should ever control the right of a private citizen to access the Internet. It's simply wrong.

junto 4 hours ago 0 replies      
My friend sent me a pirated CD in the post from Thailand. Sue the post office! Sue the ship charter company that enabled the boat to sail it here. Sue the printer that made the stamps. Sue the envelope maker. Sue the postman, god damn it!
imgabe 14 hours ago 3 replies      
By this logic they should sue the computer manufacturers, the power companies, the contractors who built the houses the pirates live in. Where does it end? Banks should sue towns for making roads that bank robbers drive on.

It's not the ISP's job to enforce another company's copyright.

RealGeek 33 minutes ago 0 replies      
So if Cox disconnects its 200,000 users to comply with demands of these idiots, they will loose over $120 million (based on $50/month/user) in annual revenue.

I don't think Cox would simply let it go unless their legal bills could be significant more. I really hope that all ISPs back this and counter sue the music companies.

al2o3cr 49 minutes ago 0 replies      
"BMG and Round Hill are seeking damages for contributory and vicarious copyright infringement and a judicial order requiring Cox to "promptly forward plaintiffs' infringement notices to their subscribers.""

I seriously hope Cox replies with a one-page brief reading only "FUCK YOU PAY ME".

andmarios 14 hours ago 1 reply      
> notified Cox about 200,000 repeat infringers on its network

One would expect if 200,000 people out of a few million (I guess, I don't know the size of Cox) didn't respect a law, then the law would be under scrutiny.

digi_owl 2 hours ago 0 replies      
A simple out for the ISPs, accept common carrier status.
firepacket 12 hours ago 0 replies      
> Cox is far from alone in blowing off Rightscorp's notices, so it isn't clear why the Atlanta-based provider was chosen as the test case

Not only has Cox has been the most vocal about supporting its users' rights, but aside from a couple TV stations and newspapers they aren't big players in the content producing industry.

farmdve 1 hour ago 0 replies      
This is a serious breach of privacy, releasing user IPs like that.
DigitalSea 10 hours ago 2 replies      
... Stop us if we have all heard this one before. When will music publishers learn, suing gets you nowhere? I hope all ISP's band together and get behind Cox Communications on this one, suing an ISP just because a music publisher tells them that one of their customers might have infringed on their copyrights.

While we are at it, lets sue car manufacturers for car crashes caused by drunk drivers and lets sue companies like HP for providing the computers that infringers are using to download pirated material? The madness just does not yet. The entertainment industry has far more overreach than it should. People getting their homes raided by SWAT teams because a publisher thought someone downloaded and shared a movie or music album.

Your tax dollars hard at work, people.

click170 15 hours ago 0 replies      
> ... even though the economic consequences of shutting down YouTube accounts is almost always inconsequential

That's an interesting point of view. Another one would be that shutting down too many Youtube accounts like that will tarnish the Youtube brand itself and will encourage the use of alternatives like Vimeo. Any single account may be inconsequential, but becoming ban-happy won't exactly fix the problem either.

Trisell 14 hours ago 2 replies      
Interesting that they mention individual IP address. Unless Cox does things differently then most other ISPs. Theoretically this could be more then one subscriber. I know that both the ISPs I have used in my area will issue me a new IP address whenever I unplug the modem for more then 10 seconds.

Couldn't Cox make the case that the information being provided could be from multiple subscribers?

DeanCollinsNY 14 hours ago 1 reply      
I'm wondering if most American readers here understand that the USA publishers have been trying to do this to Australian isp's for a while.

sorry I'm not up to date on the legal process but its been going on for a while.

How electric superchargers went from fantasy to feasibility
49 points by rmason  17 hours ago   9 comments top 3
dredmorbius 27 minutes ago 0 replies      
For the confused: this article is about electrically-driven pre-compressors ("turbochargers") rather than the Tesla electric battery fast-charge EV station and service.
butwhy 6 hours ago 0 replies      
Oh, this article was about superchargers, not superchargers.
revelation 11 hours ago 2 replies      
Or you save yourself the effort for all these widgets, use a proper battery and purebred electric motors and get the fastest sedan in the world pretty much effortlessly.

If theres one thing electric propulsion doesn't need then its all the nonsense we put on top of combustion engines to smooth out their power curve.

Psychology of a VC and how to take advantage of it
33 points by fhinson  14 hours ago   2 comments top 2
Animats 10 hours ago 0 replies      
When you ask any VC how it is going you always get the same answer: amazing. Company XYZ is a home run!

The writer is in the UK. Silicon Valley VCs don't say that. Startup entrepreneurs do, but not VCs. VCs expect about 1 in 10 to be a big success and pay for all the other losers.

graycat 10 hours ago 0 replies      
My thoughts on VCs in




can be used to respond to this OP.

Mostly the posts are for entrepreneurs, but thesecond one tells VCs how to start getting decent ROI values.

       cached 30 November 2014 17:02:03 GMT