hacker news with inline top comments    .. more ..    25 Aug 2014 Best
home   ask   best   5 years ago   
Feynman Lectures on Physics now free online
690 points by silenteh  1 day ago   89 comments top 19
nirai 9 minutes ago 0 replies      
An offline version of the website is still floating around the Internet space.
vanderZwan 1 day ago 3 replies      
Great! This part kind of surprises me though:

> However, we want to be clear that this edition is only free to read online, and this posting does not transfer any right to download all or any portion of The Feynman Lectures on Physics for any purpose.

I know it doesn't actually mean anything in practice, but still, I'm shaking my head in disbelief that there's still people out there clinging to this mentality. Aside from the fact that it's fundamentally technically impossible to read something online without downloading it first.

kabdib 23 hours ago 0 replies      
I'd love to buy the PDFs, but they're DRMed and I refuse to rent ebooks.

I guess I could buy them and then download the "pirate" versions from somewhere.

Instead, I'll stick with my hardcopy edition.

cjrd 1 day ago 2 replies      
Wow - this is awesome. Anybody interested in helping me map out a dependency graph of the concepts in the Feynman Lectures?
rdxm 1 day ago 3 replies      
every now and then i go into the library and read a chapter out of my hardcover set of these. my kids do the "geeez dad" thing when i make them sit with me and look at them.

classics.. to be sure....

edit: i almost feel like these shouldn't be something that gets digitized.....this knowledge and its presentation belongs in a tactile medium...

CountHackulus 1 day ago 3 replies      
Disappointed it's explicitly not for download, but it's still excellent to be able to have access to all of these.
gourneau 16 hours ago 1 reply      
Project Tuva has a great series of lectures Feynman gave around that time http://research.microsoft.com/apps/tools/tuva/
leephillips 1 day ago 2 replies      
These books show more than anything else why Feynman is so revered among physicists as a teacher. An introductory course in physics, simple yet demanding, and shot through with Feynman's unique approach and personality.
foobarqux 23 hours ago 1 reply      
How does this compare to Susskind's "The Theoretical Minimum"?
allegory 1 day ago 1 reply      
Wonderful news but particularly sickening for me as I fished out 130 for the hardback volumes last year!

Absolutely great books however!

I've learned a lot already from those books.

Also, the "For the Practical Man" (algebra, geometry, trig, arithemtic) series of books on mathematics that Feynman started his career with. They are hard to get hold of and expensive but the calculus book is wonderful if incredibly dense and written in an early 1900's style!

Those, a cheap Casio calculator, a box of pencils and some school exercise books have taught me more than a university degree and years of industry experience.

Edit: found a legitimate PDF of "Calculus for the practical man" http://physsocyork.co.uk/notes/J.%20E.%20Thopmson--Calculus%...

paulvs 1 day ago 1 reply      
Just chapter 1 contains answers to many questions that I've had on the back of my mind.. Why does water ice expand when it melts? If water ice is a crystalline structure, how can it vary in temperature (e.g. -5 degrees to -10 degrees). A very good read.
k-mcgrady 1 day ago 6 replies      
Is this worth reading for someone without a particular need to understand physics in depth? What I mean is if I take the time to read these will I learn anything useful to someone not pursuing a career in physics or related field?
3rd3 15 hours ago 0 replies      
One of the rare cases of "internet done right".
jayvanguard 23 hours ago 1 reply      
It is awesome how while the page is loading you see stuff like this:

"Now if we multiply Eq. (41.19) by [math], [math]. We want the time average of [math], so let us take the average of the whole equation, and study the three terms. Now what about [math] times the force?"

Soo... am I going to need math skills to understand this stuff?

dominotw 22 hours ago 1 reply      
Has anyone completed all of the 3 parts? How much time did it take you ?
madengr 1 day ago 1 reply      
Don't forget the audio is out there too!
rodrigoavie 1 day ago 0 replies      
Thanks for the material. Anyone working towards translating the material?
josealicarte 1 day ago 0 replies      
Great lecture, this very useful :) to all fresher
Using Google Earth to Find an ISIS Training Camp
539 points by mmayberry  2 days ago   104 comments top 23
e98cuenc 2 days ago 4 replies      
It makes me super proud that he used Panoramio, a site I created 9 years ago. Nowadays with the prevalence of Google Street View is less useful than it used to be for this kind of stuff, but there are still places that the GSV guys have not (yet) covered.
hemancuso 2 days ago 7 replies      
Anyone who is impressed by this should seriously check out Andrew Sullivan's view from your window contest. Most weeks a reader submits a photo from their window, literally anywhere in the world. And people track it down with very similar techniques, to the exact window. And a lot of the contest photos offer much less to go off of than this [namely, only 1 photo, low res, country/context unspecified].

Here is the winners archive.


Some of photos aren't too crazy or offer a landmark that is recognizable if you'd seen it before. But most of them offer very little in terms of knowing where to start unless you've got a huge body of contextual knowledge you can draw on.

A couple ones that I had absolutely no idea where to start with:


I imagine the CIA/NSA has a crack team of a couple dozen people doing this exact job.

mmayberry 2 days ago 2 replies      
I'm sure the government is on this as well but its pretty incredible what a citizen journalist can do from his home computer with a few basic web sites. Some of the other projects that he has worked on (finding a russian training camp, authenticating an Egyptian revolution movie, etc..) are worth a read as well
joelrunyon 2 days ago 3 replies      
Interesting that as it's getting easier & easier for "normal" people to do stuff like this - our media is getting worse and worse at it. They've essentially given up on reporting or investigating anything original and simply spew back "opinions", "tweets" or PR releases.
jebus989 2 days ago 1 reply      
I like this, but probably worth mentioning that this isn't a covert group so it seems somewhat akin to reporting where the Donetsk separatists are.
qstyk 2 days ago 0 replies      
What an odd introduction: "Have you ever wondered what it would be like to go through training as an ISIS terrorist? Or better yet, where you would go to find such advanced training?"


DrSayre 2 days ago 1 reply      
This is pretty awesome! I wanted to do something similar with the video of James Foley, but I figured there was people smarter than me already doing that and I really didn't want to watch that video.
moskie 2 days ago 2 replies      
This is cool and all, but I can't help but be reminded of the hunt for Boston Marathon bombers. Sure, maybe the author's heart is in the right place, but Random Person On The Internet could easily have gotten something wrong, that seems intuitively correct to the author and a general audience (us), but is in fact incorrect. Which makes me inclined to instead leave stuff like this up to the professionals. (appeal to authority, i know, but... getting this stuff right is important.)
carlob 2 days ago 1 reply      
Honest question: what's the advantage of using FlashEarth over Bing maps (which appears to be the source of the data)?
MrJagil 1 day ago 0 replies      
Such an interesting analysis, and seemingly a very nice site too. A shame the comments are so headless.

It's a travesty communities and discussions devolve so quickly on the internet (though I of course know from PGs eternal struggle how hard it is to prevent). Whoever can solve this problem (nice try disqus etc) will certainly claim fame.

Up and down votes won't cut it. It will require a serious inquiry into psychology, sociology and behavioural studies I believe.

misiti3780 2 days ago 0 replies      
I read an interesting article a while ago about who they have tried (unsuccessfully) to track


from land artifacts. I supposed it is a bit more difficult as google maps didnt make it to Waziristan yet.

It sort of reminds me of this article from a while back


maouida 23 hours ago 0 replies      
But isn't the place already mentioned in the video footage? "State of Naynawa", which is a well known place.
lolryan 1 day ago 0 replies      
When looking for new apartments in NYC, a combination of Google Street View and the Flyover feature in Apple Maps does wonders to validate how truthful brokers are in their listings.
magicalist 2 days ago 0 replies      
Wait, so is the "new construction" around the tower the training camp? The article doesn't seem to say explicitly. Or is this more finding where they do training marches?
bmmayer1 2 days ago 0 replies      
Way to crowdsource ours and Iraq's military intelligence! I'm sure someone will find this useful.
Too 2 days ago 0 replies      
I bet this guy is good at https://geoguessr.com/
jqm 2 days ago 1 reply      
Western governments didn't know this already?

I have a hard time believing they didn't. There are (in my opinion) strategic reasons ISIS was allowed to get as far as it did. And reasons they were allowed to appropriate large amounts of cash and US weaponry.

notastartup 2 days ago 0 replies      
Absolutely amazing investigative work. This is very good intelligence from using everyday resources and a keen eye from the determined.
justplay 2 days ago 0 replies      
this man deserve a huge applauds. He is our sherlock holmes.
IBCNU 2 days ago 0 replies      
Nice work.
kelukelugames 2 days ago 1 reply      

What are the next steps?

known 1 day ago 0 replies      
You don't need great weapons. Just Drop A "Heat bomb" In Antarctic Ice Shelves. You'll Drown The World.
elleferrer 2 days ago 4 replies      
We need more bellingcats' - this was a great find - can we expect a planned airstrike in this location any time soon?
Gooey: Turn command line programs into GUI applications
428 points by ayberkt  23 hours ago   63 comments top 25
abc_lisper 22 hours ago 1 reply      

However, it is not for any command line program. It works only for python programs that use argument parser. Though, one can write a python argument parser around a cli to make it work.

jayvanguard 22 hours ago 5 replies      
Good idea. I wonder if anyone has done this for general unix command-line apps by parsing out the man pages on the fly. It probably wouldn't work for all programs but may be gnu style ones would be consistent enough.
willcodeforfoo 21 hours ago 0 replies      
Something similar for creating GUIs on Mac OS X http://www.bluem.net/en/mac/pashua/
nilved 22 hours ago 2 replies      
Really awesome and promising idea, but I think the implementation is limiting. Couldn't it just as well parse help text? It's not guaranteed to be standard, but there are probably more programs that can be parsed that way than use ArgumentParser.
nnnnni 4 hours ago 0 replies      
I was expecting it to merely be a graphical version of "dialog". I was pleasantly surprised!
chj 12 hours ago 0 replies      
Beautiful idea. I can see this can be a great front end for wget/curl.
xdissent 22 hours ago 1 reply      
I like it! How about an Open/Save button to choose files for stdin/stdout?
mpoloton 16 hours ago 1 reply      
As much as I like the CLI, I really find this useful, because it takes time to go through document and find the desired option. I think the real solution is that every CLI program comes with a description file (probably in XML) that describes its CLI options, their types, combination, etc.

The description file should help automatic GUI creating or shell completion.

agumonkey 19 hours ago 0 replies      
Finally something interesting to bridge the gap between GUI and CLI. What about a reverse operations ? so a `program` can be instanced in any situations without having to write separate (or too much) user input logic ?
mandalar12 22 hours ago 0 replies      
Very cool!Does anything similar exist for Android ?I would love to use some bash scripts but I don't find the terminal editors I tried practical.
coldtea 15 hours ago 1 reply      
Another app in this vein was Kaptain (for KDE):


fndrplayer13 22 hours ago 1 reply      
Really pretty neat especially if your tool might be used by less technical folks. I can't count the number of times people in our engineering department have given non-technical people in our company a command line tool because its easier than adding a GUI, be it native or web. I think this will come in handy in those cases.
gamesbrainiac 20 hours ago 0 replies      
I'm so glad this is made using python :) I can now hack it to my heart's content.
eriktrautman 21 hours ago 0 replies      
That looks awesome. Are there similar implementations native to other languages out there?
andrewchambers 14 hours ago 0 replies      
Implementing an api compatible wrapper around argparse might have been simpler than parsing the source code.
manishsp 22 hours ago 1 reply      
How about converting CLI programs into Web based applications ?!!
gnosek 20 hours ago 0 replies      
Looks like the perfect companion to click: http://click.pocoo.org/
Gracana 20 hours ago 0 replies      
Back in the days of the classic Mac OS, the Mac Programmer's Workshop included a tool like this, called "commando." One of the neat things about commando was that you could hover over any option to see some descriptive "help" info at the bottom.


BoppreH 21 hours ago 1 reply      
Not sure if my fault, by all images are returning errors, and their folder is 400'ing.
wlievens 22 hours ago 0 replies      
Really cool. May try to make something like this for jCommander.
bash-j 15 hours ago 0 replies      
Nice. I think this will help me get motivated to start developing GUI apps. Thank you.
jodrellblank 18 hours ago 1 reply      
"Transform your command line apps into user friendly GUIs" - https://raw.githubusercontent.com/chriskiehl/Gooey/master/re...

Encoder (-e). OpenCV FOURCC Type. {Empty text box}.

Just take all possible options and ... shove them right in the user's face. Is that user friendly? Whom is it helping, who doesn't want a CLI but also knows how the CLI program works, but also can't script it?

jstoja 19 hours ago 0 replies      
so neat
Walkman 19 hours ago 4 replies      
> Turn (almost) any command line program into a full GUI application with one line

and lose the ability to pipe, check exit status, run from cron, run through ssh or a different machine, call from other scripts...

The last couple of months as I know about more and more the command line, and can configure my shell and tools the way I like, I feel I'm more productive with the terminal than any other GUI application.

Why Racket? Why Lisp?
414 points by Tomte  4 days ago   277 comments top 32
agentultra 3 days ago 2 replies      
Some practical features I enjoy in CL:

1. Conditions and restarts: As far as error handling in programs go this is the most rock-solid system I've encountered. You can tell the system which bits of code, called restarts, are able to handle a given error condition in your code. The nice thing about that is you can choose the appropriate restart based on what you know at a higher-level in the program and continue that computation without losing state and restarting from the beginning. This plays well with well structured programs because the rest of your system can continue running. Watching for conditions and signalling errors to invoke restarts... it's really much better than just returning an integer.

As a CL programmer using SLIME or any suitable IDE, this error system can throw up a list of appropriate restarts to handle an error it encounters. I can just choose one... or I can zoom through the backtrace, inspect objects, change values in instance slots, recompile code to fix the bug, and choose the "continue" restart... voila the computation continues, my system never stopped doing all of the other tasks it was in the middle of doing, and my original error was fixed and I didn't lose anything. That is really one of my favorite features.

2. CLOS -- it's CL's OO system. Completely optional. But it's very, very powerful. The notion of "class" is very different than the C++ sense of struct-with-vtable-to-function-pointers-with-implicit-reference-to-this. Specifically I enjoy parametric dispatch to generic functions. C++ has this but only to the implicit first argument, this. Whereas CLOS allows me to dispatch based on the types of all of the arguments. As a benign example:

    (defclass animal () ())    (defclass dog (animal) ())    (defgeneric make-sound (animal))    (defmethod make-sound ((animal animal))      (format t "..."))    (defmethod make-sound ((dog dog))      (format t "Bark!"))    (make-sound (make-instance 'animal))    (make-sound (make-instance 'dog))
Will print "..." and "Bark!" But the trivial example doesn't show that I can dispatch based on all of the arguments to a method:

    (defclass entity () ()) ;; some high-level data about entities in a video game    (defclass ship (entity) ()) ;; some ship-specific stuff... you get the idea.    (defclass bullet (entity) ())    ;; ... more code    (defmethod collide ((player ship) (bullet bullet))) ;; some collision-handling code for those types of entities...    (defmethod collide ((player ship) (enemy ship))) ;;; and so on...

    Ship::collide(const Bullet& bullet) {}    Ship::collide(const Ship& ship) {}
Where collide is a virtual function of the Entity class requiring all sub-classes to implement it. In the CLOS system a method is free from the association to a class and is only implemented for anyone who cares about colliding with other things.

The super-powerful thing about this though is that... I can redefine the class while the program is running. I can compile a new definition and all of the live instances in my running program will be updated. I don't have to stop my game. If I encounter an error in my collision code I can inspect the objects in the stack trace, recompile the new method, and continue without stopping.

3. Macros are awesome. They're like little mini-compilers and their usefulness is difficult to appreciate but beautiful to behold. For a good example look at [0] where baggers has implemented a Lisp-like language that actually compiles to an OpenGL shader program. Or read Let Over Lambda.

One of the most common complaint I hear about macros (and programmable programming languages in general) is that it opens the gate for every developer to build their own personal fiefdom and isolate themselves from other developers: ie -- create their own language that nobody else understands.

Examples like baggers' shader language demonstrate that it's not about creating a cambrian explosion of incompatible DSLs... it's about taming complexity; taking complex ideas and turning them into smaller, embedded programs. A CL programmer isn't satisfied writing their game in one language and then writing their shaders in another language. And then having to learn a third language for hooking them all up and running them. They embody those things using CL itself and leverage the powerful compiler under the floorboards that's right at their finger tips.

Need to read an alternate syntax from a language that died out decades ago but left no open source compilers about? Write a reader-macro that transforms it into lisp. Write a runtime in lisp to execute it. I've done it for little toy assemblers. It's lots of fun.

... this has turned into a long post. Sorry. I just miss some of the awesome features CL has when I work in other languages which is most of the time.

[0] https://www.youtube.com/watch?v=2Z4GfOUWEuA&list=PL2VAYZE_4w...

reikonomusha 3 days ago 5 replies      
I dislike this notion that Lisp (or Haskell or OCaml or ...) owe it to everyone else to explain and enunciate why it can be more productive to use Lisp.

"""Thats asking too much. If Lisp languages are so great, then it should be possible to summarize their benefits in concise, practical terms. If Lisp advocates refuse to do this, then we shouldnt be surprised when these languages remain stuck near the bottom of the charts."""

What?? Why? The problem is not and has never been communication of Lisp features. No one made a concise list of why C and Java are so great that people rushed to use them. Instead, they were pervasively used and taught in universities, and they are pervasively used in the development of most applications for e.g. Windows and Linux, and they are relatively simple languages (in theory) whose semantics most people "get". No wacko high order crap, no weight curried things, no arrows or morphisms or monads or macros.

Programmers of such languages don't owe the rest of the world anything. Everyone has a choice about what to use, and it's each individual programmer's responsibility to choose them wisely. There is plenty of material about Lisp and Scheme out there. Unfortunately, we are in this TL;DR culture where no one has the time to spend a few hours every week to learn something new, since somehow that's too big a risk on their precious time.

Now, for some comments:

1. Everything is an expression.

He says this is a boon, but it's also confusing for "expressions" which are side effectful. Too bad he did not talk about that, nor did he talk about how the expression-oriented way of thinking is really best for purely functional languages that allow for substitution semantics.

2. Every expression is either a single value or a list.

This is wrong, unless we devolve "single value" into the 1950's idea of an "atom". What about vectors or other literal composite representations of things? What about read-time things that aren't really lists or values?

3. Functional programming.

Functional programming is indeed great, but why don't we talk about how in Lisps, we don't get efficient functional programming? Lisp has tended to prefer non-functional ways of doing things because Lisp will allocate so much memory during functional programming tasks that for many objectives, FP is far to inefficient. Haskell solves this to some extent with things like efficient persistent structures and compilation algorithms such as loop fusion. Lisp doesn't really have any of this, and the data structures that do exist, many people don't know about or use.

4 and 5 don't really have to do with Lisp but particular implementations. That's fine I guess.

6. X-pressions.

What the hell is an X-pression?

7. Racket documentation tools.


8. Syntax transformations.

He made the same mistake as he so baroquely outlined at the start. What in the world are these "macros" and "syntax transformations" good for? You're just telling me they're more powerful C preprocessor macros that can call arbitrary functions. But I was taught that fancy CPP code is a Bad Idea, so boosting them is a Worse Idea.

9. New languages.

Same problem as 8. You say it's useful but you don't say why. Just that it's "easier".

10. Opportunities to participate.

Nothing to do with Lisp again.

* * *

Instead of all this glorifying of Lisp and etc, why don't we spend time increasing that library count from 2727 to 2728? Or do we need to go through an entire exercise about whether that time spent is worth it or not?

"""Rather, you arebecause a Lisp language offers you the chance to discover your potential as a programmer and a thinker, and thereby raise your expectations for what you can accomplish."""

You're repeating everyone else. Notice how difficult it is to convey such things without being hugely abstract and unhelpful? Why don't other programmers see this huge productivity benefit from these Lisp wizards in their day-to-day life? Where are the huge, useful applications? They all seem to be written in C or C++.

"""Its mind-bendingly great, and accessible to anyone with a mild curiosity about software. """

It is accessible to those who are intently curious about theoretical aspects of software development, especially abstraction, and who can take exercises which require mathematical reasoning. A "mild curiosity" in my experience with others will not suffice.

* * *

This post may sound somewhat cynical and negative, but Lisp enlightenment articles are almost as bad as Haskell monad tutorials. They're everywhere and by the end, still no one gets it. And I don't like the attitude that because a group G doesn't understand it, and group H does, that H owes it to G to spoonfeed the information. That's not the case.

bad_login 3 days ago 2 replies      
It seems most people here have never used (and not tried) racket.

I decided to use racket for my little sides projects, asreplacement for scala and clojure.

I choose it because it was clear for me i can't stand limitationsother language impose to me in way of style and boilerplate, theracket macro (aka syntax transformer) system is the most advancedi know to reduce the boilerplate to a minimum and so just writewhat i want to express. In facts i rarely write macro becausewriting a good macro demand you take care of errors syntax, i amlazy in the bad meaning of the term.

I choose it because it's dynamic typed and i get more convincedthat type go on your way most of the time (expect complexalgorithms)(i write little projects, so refactoring argument isout). It enable me to write code and eval it on the fly withgeiser (using enter! on the back), after eval the new function itest it in the repl, hack until the function meet the requirementcopy paste from repl and boom i get a unit test. Because it aseval and it will become handy one time in your programmer lifefor sure.

I choose it because of it's sexpr syntax, as a heavy user ofemacs i know that other syntax is a pity.

Also because it has (and i use):

1. llar parser (implemented through a macro).

2. A pattern matching nothing to envy scala or clojure deconstructs.

3. An optional type system.

4. A contract system.

What i find hard as a new comer (to racket, not as a programmeralready now scala, clojure, half of c++ :), php) is

1. The broadness of the features the language offer, whichfeature to use e.g.: class or generics.

2. The documentation is rich but lack of examples for the commoncases, so you need to read the doc of the function (sometime it'shuge).

3. Understanding how racket module works is quite hard and youhave the documentation, if you don't plan to play with the macroexpander (the stuff that run your macro) and some dynamicfeatures you don't really need to.

4. You need to 'register' the errortrace library if you want astacktrace, quite a surprising behaviours for me.

My opinionated conclusion:

Racket is the best language design i ever see, it's hard to learnbut make you feel learning an other language will just become tolearn a new sub-optimal syntax. Sadly the ecosystem is lackinglibraries and peoples and i am not helping in this way.

aaronbrethorst 4 days ago 3 replies      
From what I've seen out of the Clojure community over the past few years, it seems like they're far more likely (and able) to offer up concrete examples of how Clojure makes their businesses and products successful in a way that an imperative language could not. So, yay Clojure community, and boo on hand-wavy Lisp people.




na85 4 days ago 11 replies      
I sure hope the giant, hideous, obtrusive diamonds inserted into the text to denote a hyperlink doesn't catch on as a trend. It's a great way to break the flow of the text and irritate your readers.

As for the idea of Lisps, well, it sure seems neat. But I've literally never run across a situation where I needed my code to edit itself. I've never run across a situation where the lack of an everything-is-an-expression-is-a-list feature prevented me from doing what I wanted to do.

So I just don't really feel the need to get repetitive strain injuries in my pinky from reaching for the parentheses all the time.

jimbokun 4 days ago 3 replies      
If you took a Common Lisp programmer from the early to mid 90s in a time machine to today, very little about current programming languages would seem novel or an advance over what he or she was using then.

I think this is a reason for much of the smugness of Lisp programmers. Whatever features you think are new or cool or advanced about your programming language, Lisp probably got there first.

mrottenkolber 4 days ago 5 replies      
Can not resist...

This article is fairly misguided. I find it painful that everybody who writes about a Lisp offshoot (Scheme, Clojure, ...) ends up misrepresenting Common Lisp.

To sum up "Why Lisp?" from a CL perspective: CL has pretty much every feature of every programming language around, only that its better designed, implemented and generally more powerful. It's just a poweruser language. Its not just macros, sexps and lambdas. Its also number types, arrays, OOP, symbols, strings, structs, dynamic/lexical variables, lambda lists, multiple return values, on-line disassemble, exceptions, restarts, MOP, metacircular definition, great implementations, great libraries...... the list goes on and on... I surely forgot a ton of great stuff. TL;DR: CL got everything. And this "everything" is designed so well that its extensible and no CL programmer ever needs to doubt that any new feature can be implemented easily in CL.

To correct a few of the wrong statements of OP:

> WaitI love state and data mutation. Why would you take them away? Because theyre false friends.

CL is NOT particularily functional. Just because we know how to write good side-effect free code, doesn't mean its a functional language. (We jave SETF after all, failed to mention that aove).

> a syntax transformation in Racket can be far more sophisticated than the usual Common Lisp macro.

Outright wrong. The only reason Scheme has weird macro systems is because its a Lisp 1. CL is designed well (thus being a Lisp 2), and thats why its simple but ultimately more powerful macro system can work.

> A macro in Common Lisp is a function that runs at compile-time, accepting symbols as input and injecting them into a template to produce new code.

This is so wrong I had to write this comment. A macro in Common Lisp is a COMPILER, it accepts arguments and returns an SEXP. It is infinitely powerful, it can do EVERYTHING.

cturner 4 days ago 1 reply      
The top reason here could been written - lisp is more expressive. You can find ways to express an idea that make sense now, and which are readable. Macros is a different part of the same idea.


Maybe I'm doing it wrong, but a problem I've had with racket is as you begin to build larger projects, when something breaks it can be quite difficult to find out exactly where the break happened. When you compile Java or run Python, it's almost always immediately obvious what broke.

The way I got around this was to use a methodical TDD approach. Would be a shame if that turns out to be as good as it gets for lisp.

Something I haven't done yet but am interested to get to is attaching a repl console to a running process.

_delirium 4 days ago 0 replies      
The manual to this publishing system, discussing how its markup/programming language is implemented as a custom Racket language, is pretty interesting: http://mbutterick.github.io/pollen/doc/
wes-exp 4 days ago 1 reply      
Author is wrong about hygienic macros they are not more powerful. They are less powerful, and more complicated, in order to enforce safety. Whether this is preferable or not is a matter of debate.
ColinDabritz 4 days ago 1 reply      
A good list of some interesting 'day to day' benefits of Lisp. Maybe that is something that would appeal to beginners especially.

From my perspective Lisp is a powerful language because of its genesis in research. The question wasn't "How do we make a tool to make this hardware do what want?" but rather for a research goal.

If you want to read the actual original Lisp paper look up: Recursive Functions of Symbolic Expressions and Their Computation by Machine, Part I John McCarthy April 1960

Paul Graham covers it nicely in this essay, especially the "What made Lisp different" list about 1/3 inhttp://www.paulgraham.com/icad.html

Lisp has had expressiveness we're only recently seeing in popular mainstream languages now. It has to do with the design, the simplicity, and how Lisp expresses problems. I've often heard it described as "the language gets out of your way." That's why Lisp.

DCKing 4 days ago 5 replies      
Why Lisp? That is understood.

Why Racket? From an ignorant outsider's perspective, all Lisps seem to be more or less interchangeable when it comes to the language. They only differ in the details, and each seems to be about as difficult to learn as the other. Although this article does make somewhat of a case for specifically Racket, it seems to be a rather weak one - tools are nice and some language details are nice. But the same general arguments can be made for other Lisps, most notably Clojure. It seems to me that Clojure is a lot more practical: it has many good libraries in both Clojure and Java, it has some great tools, there's a lot of momentum, and it can be deployed everywhere (including the browser).

So, being an ignorant outsider, is there any reason the Lisp I should learn isn't Clojure?

michaelsbradley 3 days ago 0 replies      
RacketCon is being held in Saint Louis, Missouri, USA the day following the Strange Loop 2014 conference (also in Saint Louis):


I hope to see some of you there!

mapcar 4 days ago 1 reply      
> If Lisp languages are so great, then it should be possible to summarize their benefits in concise, practical terms.

His list is concise but man did he take a while to get to it!

Seriously though. The introduction was super relevant as I have wondered the exact same question about Lisp myself. What features make it so praise-worthy? Maybe X-expressions isn't a core feature for everyone to appreciate, but the fact that everything is an S-expression is an understated value. People complain about its syntax, but alternate versions (so many reincarnations of parentheses-less Lisps) have never caught on.

The thing is, Lisp is no longer unique in its feature set, and languages with more standard forms of syntax have incorporated some of its features. But it is uncommon to find all of these listed features in one language. In the domain of data analysis where I do most of my work, it still makes me sad that XLISP-STAT has been supplanted by other languages which leave the user wanting.

einhverfr 3 days ago 1 reply      
I am learning Perl's FP features and really liking it, and teaching myself common lisp. I enjoyed the article quite a lot actually.

I find it is very hard to define functional programming for many people but this is what I have come to explain to people:

Functional programming means thinking in terms of mathematical functions in the f(x) sense. Once you get that basic promise, that for any given input you have a single correct output, then it transforms the whole way you think about and designing your software.

The better I get with lisp, the more everything else changes. I may have to try Racket.

colig 4 days ago 0 replies      
Does anyone else find it difficult to highlight things on this page? Specifically, 'kvetchery' which is found in the third paragraph.

I believe the author is the one responsible for the facelift of Racket's documentation. He may belittle his own lack of formal programming education but I am thankful for his design chops.

happywolf 4 days ago 2 replies      
Agree with some of the earlier comments: the diamond-shaped thingies inserted are really a nuisance and breaks the reading flow.
59nadir 2 days ago 0 replies      
I think it's kind of sad that most of the comments in this thread are about other languages than Racket and only barely touch on the articles points (mostly the stuff you don't need to actually try the language (or any lisp) to comment on). I think it says a lot about what the crowd on HN is really all about.
rodrigosetti 2 days ago 0 replies      
Nice write-up. I really like Racket, but never had a chance to use it in a professional project so far.

By the way, Scribble (item 7) is an implementation of Literate Programming - a feature is some other languages too. In Haskell, for example, you can write programs in Latex with embedded code.

amirouche 4 days ago 1 reply      
I tried somewhat Pollen and it's kind of fantastic, the only thing is getting to work with a new project in a language that I don't know very well is difficult for me. That's why I started a similar project in Python, watch https://warehouse.python.org/project if you interested /azoufzouf/
theRhino 4 days ago 0 replies      
Not sure how closely you have read Siebel - your 1st few points are covered pretty comprehensively at the start of his book
hyp0 3 days ago 1 reply      
Re 1. everything is an expression benefit, condition example:

C-like languages often have the ternary operator, cond?exp1:exp2, that is exactly this. I feel clever using it, but I consider it a hack, because it's (usually) less clear. A microcosm of lisp, clever but unclear.

sanatgersappa 4 days ago 0 replies      
My personal experience with Clojure has been that it 'bends' the brain - in a good way, and it forever changes the way you program. It is extremely difficult to go back to the style of coding I did before my exposure to Clojure. I guess other Lisps would provide a similar experience.
picardo 3 days ago 0 replies      
Is it just me or is this page entirely blank? I poked through the source for quite a long time, but couldn't undo it. The text is there. There is something in the CSS that obscures it in Chrome. So annoying.
alvatar 4 days ago 2 replies      
Many of the last items in the list should be in the category "Scheme". Racket is a dialect from Scheme, but it still is a Scheme. The syntax-case macro transformations are available in most Scheme systems.
TheMagicHorsey 4 days ago 1 reply      
Why does Racket perform so slowly on benchmarks compared to Clojure and SBCL?
dschiptsov 4 days ago 0 replies      
"Clarity is an evidence" as the saying goes. This post only proves its correctness.)

The distinct feature of Lisps and good lispers is clarity of thought and conscience of writing.

guilloche 4 days ago 1 reply      
When visited with w3m I got spaces breaking words frequently.Is there any justification to use complex html to control intra-word spacing for a web page?
CMCDragonkai 4 days ago 0 replies      
Many of the reasons you wrote are the same that got me attracted to Elixir. That and of course erlang interop and OTP.
kazinator 3 days ago 0 replies      
Check it out. For five years I have been developing a tool called TXR. It's a "Unixy" data munging language that is ideally suited for programmers who know something about Lisp and would like to move away from reaching for the traditional stand-bys like awk, sed, perl, ...

You do not have to know any Lisp to do basic things in TXR, like extracting data (in fairly complicated ways) and reformatting it, but the power is there to tap into.

In TXR's embedded Lisp dialect, ("TXR Lisp"), you can express yourself in ways that can resemble Common Lisp, Racket or Clojure.

You can see a glimpse of this in this Rosetta Code task, which is solved in three ways that are almost expression-for-expression translations of the CL, Racket and Clojure solutions:


Or here, with syntax coloring:


If you closely compare the original solutions, you will see that certain things are done more glibly in TXR Lisp.

qewrffewqwfqew 4 days ago 1 reply      
That's some pretty ugly text for a site called 'practical typography'.
jstoja 4 days ago 2 replies      
Please....text-align: justify;...
The Strange and Curious Tale of the Last True Hermit
376 points by randomwalker  4 days ago   84 comments top 26
grownseed 3 days ago 5 replies      
Many, many times have I considered isolating myself, separating myself from the seemingly vacuous concerns of a society riddled with senseless traditions, layers upon layers of societal band-aids and pointless struggles over ridiculously subjective arguments.

I spent most of my life being disgusted by the frivolity of most people's desires and qualms, and for this reason, I feel I deeply understand why Chris Knight did what he did. No reason, no justification, no particular aim, just life.

While I still catch myself wishing for such a life, I realized I could not blame or reject what I do not actively participate in. Furthermore, I came to the conclusion, possibly wrongly, that a life worth living is a life worth sharing, that society will always be able to offer you more than you can offer it.

I now believe that the solution is not to reject society, nor be tied by its requirements or norms, but rather behave as a free agent, with independence, compassion and mental fortitude.

Law, Economy, Politics, Religion, Science, Technology, ... are, in my opinion, mere relics and artifacts of thousands of years of civilization, localized attempts at guiding the seemingly mis-guided, while becoming eventually meaningless in the grand scheme of things.

These civilized relics are not necessarily bad, but as with anything else attachment becomes the issue. While becoming a hermit is possibly the quickest way of severing those ties, attachment is the burden of the mind, not of society at large. Isolation diminishes, or even wipes attachment issues altogether, but it does not resolve them.

This might come across as preachy, though it certainly isn't my intention, I simply wanted to share my view with anybody who, like I used to, wishes for isolation as a remedy.

soneca 4 days ago 4 replies      
"I did examine myself," he said. "Solitude did increase my perception. But here's the tricky thingwhen I applied my increased perception to myself, I lost my identity. With no audience, no one to perform for, I was just there. There was no need to define myself; I became irrelevant. The moon was the minute hand, the seasons the hour hand. I didn't even have a name. I never felt lonely. To put it romantically: I was completely free."

This part resonated a lot to me. I consider self-awareness one of my qualities. But I too feel like the more I try and understand myself, the more distanced of the world I am. If I micro-analyze every reaction I have, I miss the point to connect to another person. I take myself out of society.

I found out that being defined by another person is a good thing for me. Particurlaly by people I love. I want to naturally be the person that made people I love love me.

ithought 4 days ago 0 replies      
I marvel out how perfect this story is in various ways. No real resolution to it, no motive, no discernible point. The unfolding of it all and the brutally abrupt ending; "We are not friends", seemed predictable shocking and sad at the same time.

Interestingly, the journalist has an upcoming movie where he's played by Jonah Hill. A fugitive murderer had used his name as an alias and through that, he'd developed a relationship with him and interviewed him after the person was convicted.

grecy 3 days ago 2 replies      
> He was never happy in his youthnot in high school, not with a job, not being around other people. Then he discovered his camp in the woods. "I found a place where I was content," he said. His own perfect spot. The only place in the world he felt at peace.

This resonates very strongly with me personally. So much so, I traveled to Alaska and hiked into "The Magic Bus" of Chris McCandless/Into The Wild fame [1]. From there, I spent 2 years driving to Argentina, sleeping out in my tent as often as possible. I'd often go a week without seeing or talking to another person, two weeks when I found somewhere remote enough.

Since then I've moved to the Yukon, where I've met some very interesting characters. One guy, in Dawson City, lives in a cave across the Yukon River from town. He has a second cave full of chickens, and he sells the eggs in town to make enough money to pay for food/beer. He boats across the river in summer and walks across the river for 7 months of the year.

I once again feel the pull, and I'm heavily planning my next trip - 2 years around Africa, hopefully getting as remote as possible. With luck, that will lead into a 2 year Europe->SE Asia trip, once again camping and hiking as much as possible.

[1] http://theroadchoseme.com/the-magic-bus

hyp0 3 days ago 3 replies      

  The moon was the minute hand,  the seasons the hour hand.
Guy can write. Once his weekly obligation ends, he could make it work with a source of income as a writer, using a smartphone, bluetooth keyboard, solar panel, and get near a cell phone tower. Without rent and utils, he needs much less money than usual. Order groceries etc online, so he can remain isolated (and of course hunt/fish).

Or write a book, invest, live on interest in the woods.

He wouldn't really like having to write, but he admires good writing, and if it would grant contentment...

See also, coding in the woodshttp://www.atariarchives.org/deli/cottage_computer_programmi...

bmj 3 days ago 0 replies      
Reminds me a bit of the story of the Russian family that lived in a remote section of the Siberian taiga:


Granted, they weren't alone (it was a family), but they truly lived a hermit's existence, even when they were discovered by geologists.

GotAnyMegadeth 4 days ago 0 replies      
You could argue that he missed out on a lot of the amazing things about modern life, you could argue that we are missing out on many of the things of a solitary life in the forest. Either way, I'm glad that he didn't miss out on one of the most important things about modern life: Pokmon.
personlurking 4 days ago 2 replies      
He may have lived in an uninhabited place but it seems, considering the amount and variety of stuff he stole, his mind was almost constantly inhabited by the modern world.
wglb 3 days ago 1 reply      
A remarkable article.

The author of this has written a number of other spellbinding articles: http://www.gq.com/contributors/michael-finkel

kingkawn 4 days ago 0 replies      
Kickstart an LLC that employs him to maintain his camping ground alone, a privately funded forest ranger. Satisfy the terms of the court decision while allowing him to return to his place and live in peace with supplies provided at a drop site.
riemannzeta 3 days ago 1 reply      
This guy is more worthy of admiration and emulation:


sixQuarks 4 days ago 1 reply      
fascinating read. With 7 billion people in this world, it never ceases to amaze me the different types of experiences humans have had.

I also just finished listening to the latest "Hardcore History" podcast regarding WWI. Holy shit, what crazy things humans have done/experienced.

arjn 4 days ago 1 reply      
Very nice article and writing - and a great subject.

To wander the woods all day, read when you want,

To be free of all connections, to not even need a name.There is something to it.

Oh ..and Rudyard Kipling ... wonderful.

lazyeye 3 days ago 1 reply      
For anyone for whom this story resonated, this book is well worth a read:-

An Island to Oneselfhttp://www.amazon.com/An-Island-Oneself-Tom-Neale/dp/0918024...

More info on Tom Neale:-http://en.wikipedia.org/wiki/Tom_Neale

keithpeter 3 days ago 0 replies      
OP reminded me of this


And this


Fugue? Small scale stroke? Or just a need to quieten the brain? Has this man had a neurological examination of any kind?

comrade1 3 days ago 1 reply      
Did he not have a sex drive? I just can't imagine an existence like that, without sex. I'm about 1/2 through the article.
suprgeek 3 days ago 0 replies      
If you want to put faces to names mentioned:http://www.pressherald.com/2013/04/09/north-pond-hermit-susp...
daveslash 3 days ago 0 replies      
Being someone who grew up in Maine, not too far from there, spending hours upon hours as a young child, alone exploring acres and square-miles of woods - what struck me the _most_ was "whoah, the boogie man WAS real all those years...."
ilamont 3 days ago 3 replies      
Did this remind anyone else of the Satoshi Nakamoto outing (https://news.ycombinator.com/item?id=7353283)? Journalist befriends recluse, turns it into a magazine story.
gre 3 days ago 0 replies      
Chris Knight was the name of Val Kilmer's character in Real Genius.
coldcode 4 days ago 1 reply      
There are many times in life where you wonder if you would be better living alone outside of the regular world. This guy actually did it. I would go insane if I was alone for more than a few weeks.
joeyspn 4 days ago 2 replies      
Why is that article dated on September 2014?
zem 3 days ago 0 replies      
as a kipling fan, he was almost certain to have read "the miracle of purun bhagat" [http://www.hermitary.com/literature/kipling.html]. i would have loved to see his opinion of it.
pthreads 3 days ago 0 replies      
Who is to say he is the last true hermit? There could be several in this world. We just don't know.
yuvalo 4 days ago 0 replies      
"You speak like a book, one inmate teased."
Show HN: Stellar Git for PostreSQL and MySQL
316 points by obsession  3 days ago   75 comments top 23
robert_tweed 3 days ago 4 replies      
Generally the hardest thing with version control on a database (for an evolving codebase) is separating unrelated changes - such as schema changes vs content updates - and branching and merging those changes in sync with the code dependencies. Another issue is non-destructively replaying development changes into test/production environments.

So for example, you might have a feature branch that includes some schema changes and some value modifications, and a content branch that includes a bunch of inserts into a few content tables that happen to include foreign key references to each other (so you need to maintain referential integrity when replaying those updates/inserts).

I don't see anything in the description that indicates this tool address those problems. For me, those are really the only problems that a DB version control system ought to be focused on. Speed of snapshotting is not all that important in a development environment as you typically work on a cut-down dataset anyway. A minute or so to take a snapshot a few times a day isn't a huge deal, whereas taking more frequent snapshots doesn't seem like something that adds any value, if it doesn't address any of the other problems.

mbrock 3 days ago 5 replies      
I wish projects like these would always include some basic info in their README about: (1) how it works, and (2) how it might fail.
amirmc 3 days ago 2 replies      
If anyone's interested in git-like storage systems then it's work checking out Irmin [1]. Previous discussion is at [2].

Excerpt: "Irmin is a library to persist and synchronize distributed data structures both on-disk and in-memory. It enables a style of programming very similar to the Git workflow, where distributed nodes fork, fetch, merge and push data between each other. The general idea is that you want every active node to get a local (partial) copy of a global database and always be very explicit about how and when data is shared and migrated

Irmin is not, strictly speaking, a full database engine. It is, as are all other components of Mirage OS, a collection of libraries designed to solve different flavours of the challenges raised by the CAP theorem. Each application can select the right combination of libraries to solve its particular distributed problem."

[1] http://openmirage.org/blog/introducing-irmin

[2] https://news.ycombinator.com/item?id=8053687

falcolas 3 days ago 2 replies      
So, it appears to just copy tables around within the database. I wouldn't want to use this on a DB over a few MB in size. Sure, restores are "fast" (a table rename), but copies are not so much.

I can't imagine this would be kind to a production database (lots of cleanup from copied & deleted tables), and would consume a lot more space than a gripped logical backup of the tables in question.

m3h 3 days ago 0 replies      
Why does the author compare it to Git? The functions this software performs are no where near those performed by Git. Nor it is a proper version control system.
lucian1900 3 days ago 4 replies      
This sort of thing is useful, but already supported by Postgres through transactional DDL. Migrations that fail will have their transaction reverted.
Gigablah 3 days ago 1 reply      
From the code:

    INSERT INTO %s.%s SELECT * FROM %s.%s
Yeah, good luck with that.

bronson 2 days ago 0 replies      
Nice. I wrote a similar tool for Rails / ActiveRecord models: https://github.com/bronson/table_differ

It takes snapshots and computes diffs between snapshots or the live database. It lets me drop and re-import some of my app's tables, then compute the minimum set of changes between the previous import and the new import. I wouldn't call it "git for ActiveRecord models" but it appears to be similar to this project.

Comments welcome! The docs, as always, could use some help.

squigs25 3 days ago 6 replies      
The implications for this extend beyond backing up your database.

Imagine a world where daily time-series data can be stored efficiently:This is a lesser known use case, but it works like this: I'm a financial company and I want to store 1000 metrics about a potential customer. Maybe the number of transactions in the past year, the number of defaults, the number of credit cards, etc.

Normally I would have to duplicate this row in the database every day/week/month/year for every potential customer. With some kind of git-like storing of diffs between the row today and the row yesterday, I could easily have access to time series information without duplicating unchanged information. This would accomplish MASSIVE storage savings.

FWIW efficiently storing time series data is big problem at my company. No off the shelf solution makes this easy for us right now, and we would rather throw cheap hard disk at the problem rather than expensive engineers.

crad 3 days ago 0 replies      
Maybe I'm missing something, but I didn't see anything with regard to indexes, users, stored procedures, views or what not.

Seems like it's for table schema snapshotting in a database without any external storage.

Browsing through the code, I see that it's highly table centric using SQLAlchemy.

swehner 2 days ago 1 reply      
Line 53 of https://github.com/fastmonkeys/stellar/blob/master/stellar/o... is

                CREATE TABLE %s.%s LIKE %s.%s
This made me think of a table called

                create table `a; drop table users;`  (col int);
... which works in mysql.

I don't know if the stellar code will trip over something like this. But mysql (SQL) shouldn't even allow names like that.

codeoclock 3 days ago 1 reply      
Unfortunate name, excellent project :)
jdc0589 3 days ago 0 replies      
Shameless plug for mite: https://github.com/jdc0589/mite-nodeSimple migrations that take advantage of everything you already know about git and sql, plus some other cool stuff.

It's not too mature yet, the readme is mediocre at best, and it has some issues that will popup when working with a team, but it's pretty damn useful.

jimktrains2 3 days ago 0 replies      
While not exactly the same thing, I've recently found and started using https://github.com/nkiraly/DBSteward to specify schema and then store the spec in my repo with the code. It also supports diffing the current schema against a previous one, so that nice upgrade sql scripts can be generated.
iurisilvio 3 days ago 0 replies      
I expected something related with Stellar coins.

Looks like a good project, I definitely want an easy way to manage development databases.

jamesmoss 3 days ago 1 reply      
Interestingly they don't show MySQL benchmarks in the readme; I suspect it might be because the MySQL implementation is pretty basic


level09 3 days ago 0 replies      
This is a nice project. I used to have my database dump tracked by git (in binary mode). anytime my db changes I'll have to overwrite the file with the new database dump and include it with the commit.

I'm just wondering if this project offers anything special/better than the method I described.

iso8859-1 3 days ago 1 reply      
how does this compare to time travel queries? http://en.wikipedia.org/w/index.php?title=Temporal_database#...
JohnDotAwesome 3 days ago 2 replies      
How does it work? Where does it breakdown? Why are these things not in the README?
edem 1 day ago 0 replies      
Folks might confuse this with the Stellar currency (stellar.org). You might give some emphasis in the title.
ZenoArrow 3 days ago 0 replies      
Just a small correction; it's not PostreSQL, it's PostgreSQL.
josephcooney 2 days ago 0 replies      
Typo? Shouldn't it be PostgreSQL not PostreSQL?
mosselman 3 days ago 0 replies      
Looks very nice, could you put up some practical examples?
Pulling the Curtain on Airport Security [pdf]
303 points by vesche  17 hours ago   124 comments top 15
corford 57 minutes ago 0 replies      
Lots of people are posting highlighting how pointless airport security is given the ease with which a terrorist can bypass it by e.g. blowing himself up in the security line, targeting buses or shopping malls, making weapons from stuff bought "air side" etc.

As this hasn't been happening (despite how easy it would be for a terrorist to do), the only logical conclusion I draw is that the entire terrorist threat is so unbelievably overblown it doesn't warrant even thinking about when it comes to evaluating personal safety. I mean, how can it not be, given how easy it would be for a terrorist to just stroll in to an airport departures hall with a jacket bomb and detonate himself yet the closest we've seen to this is one lunatic failing to ignite some powder in his shoes and another idiot burning his crotch.

I think the real answer is that you can probably count the number of truly dangerous terrorists in the world on two hands. The rest of the current crop are nothing more than brainwashed amateurs who spend their time wreaking havoc and misery in isolated parts of the world that no normal person would ever have occasion to set foot in. This article from the FT makes a similar point: http://www.ft.com/intl/cms/s/0/ee2a8412-2923-11e4-9d5d-00144...

If I was a black man in the US I'd be much more afraid of looking at a cop the wrong way than being caught up in a terrorist outrage.

nikcub 7 hours ago 3 replies      
I ended up finding a way to get cigarette lighters through with a 100% success rate just by brute forcing it.

If you travel a lot and you're a smoker you'd know that the worst part is getting off the flight, crawling through the airport at exit and then not having a lighter because they took it off you at departure[1].

No penalty for being caught with a lighter, so I kept leaving lighters in my bag in different places deliberately to figure out how I could get one through.

Solution turned out to be simple, and I hit it almost accidentally. I removed the metal shield and then dropped the lighter into an inside pocket of my bag that contains pens and loose coins.

Worked 100% of the time thereafter.

The scanners being blacklisting like a virus scanner means they have the same problem, they can only identify known threats. Change the form of the threat and you're through until they update and train their scanners again (both human and machine).

The illusion of safety. I've since quit both smoking and flying frequently.

[1] I gave the TSA the idea of handing out lighters they have confiscated from departing passengers to arriving passengers but they didn't buy into it.

idlewords 16 hours ago 5 replies      
I wish there was a transcript to go with these slides, or some context. It looks like an amazing talk.

One thing that jumped out at me right away is that the explosives sniffer is also configured to detect narcotics, amphetamine and marijuana. Is this standard procedure at American domestic airports?

pmorici 10 hours ago 1 reply      
Typical. Government organizations think IT security means having strongly worded statements and reams of bureaucratic rules and procedures. If you look closely though the strong words often aren't backed by any meaningful action. In a government official's mind if the 50 page IT security document was filled out and is on file that means the system is secure. It's all a big joke really.
stevefeinstein 15 hours ago 8 replies      
If this isn't the answer, and I'm not asserting it is or isn't. What is, and how do implement it. Or do you suggest if we scrap it all and go back to 1950's like airport security that the few incidents that are inevitable are an acceptable risk? I don't know the answer, but I'd like to have the conversation.
nathannecro 16 hours ago 1 reply      
Is there a video to go along with these slides? This is fascinating.

The diagram-heavy slides could certainly use some context.

jimktrains2 1 hour ago 0 replies      
I still maintain that security checkpoints are the scariest places to be. So many people gathered, huddled, around a small, politically sensitive area outside the "secure" zone.
BorisMelnik 11 hours ago 1 reply      
"TSA has not audited these devices for even the most basic security issues"

This to me is the most troublesome aspect of this an entire ordeal. Any security pen-testing firm with their wits about them could have discovered these backdoors in a few simple audits.

The fact that he was able to find all of these is very worrisome to me. I can only imagine what other bugs/backdoors are built in to these systems.

Does any of this security matter with the fact that you can build weapons using airport giftshop items?


bussiere 13 hours ago 2 replies      
It makes laugh a lot, 9/11 happen because they used cutter.

Airport security will piss you off for a kid cissor.

But they will let you buy a glass bottle of alcohol in duty free.

That you can break properly and use as a weapon ...

Logic ...

est 9 hours ago 0 replies      
warcode 6 hours ago 0 replies      
The increasing amount of security is more terror than any real group could hope to inflict. Technically the terrorists won.
neil_s 14 hours ago 0 replies      
Seems like the SFO Kronos has been taken offline since this disclosure.
blantonl 14 hours ago 1 reply      
"Pulling the Curtain on Airport Security" - This article's title. Wow.

Almost all airport security is a theater... The TSA are simply the actors...

jqm 12 hours ago 0 replies      
About a year after 9/11 I flew from Phoenix to Corpus Christi Texas. I brought a carry on case from work with me full of papers and (unknown to me) some tools including a large folding knife, a smaller pocket knife, a leather man and some screwdrivers. I honestly had completely forgot about the tools, they were buried in the bottom of the case under papers (yes, my case was not very organized).

So, I took the case carry through x-ray in Phoenix, then, during a layover in Dallas I went outside the airport with the case, came back in through security, re-boarded the airplane and proceeded to Corpus Christi where I passed my vacation. After vacation, on the return flight to Phoenix, they found the knives and tools at the small airport in Corpus Christi as I attempted to board. I gave them to security and nothing came of it but I didn't feel it wise to tell them that I had already been through two checkpoints with the contraband. I realize things have probably tightened further since then but still... I was a bit shocked. And I'm still thinking a lot of the "security" at airports is for show.

joshfraser 16 hours ago 0 replies      
expensive security theater
Show HN: A virtual whiteboard for working or teaching remotely
308 points by MarkMc  4 days ago   140 comments top 54
MarkMc 4 days ago 8 replies      
This is little 'scratch-your-own-itch' project I started working on about 9 months ago. Front end is GWT, back end is Java servlets. Database was originally MySQL but switched to Prevayler for performance reasons.

My YouTube video gives a nice overview of the benefits of a virtual whiteboard:http://youtu.be/MDEHFHG1l3Y

What does Hacker News think?

wodow 4 days ago 7 replies      
I love it - works perfectly... but immediately the feature creeper in me has kicked in. Killer features

1. Be able to type in text (any font will do)

2. Drag-and-drop an image to be be able to annotate it over the top (would be excellent design task, e.g. using screenshots of some work-in-progress).

3. Movable objects?

senko 4 days ago 1 reply      
Very nice. Seems to be vector-based (ie. how the eraser and undo/redo work, and allowing things like pan&zoom).

I'm the author of a similar tool, https://awwapp.com/ , which is bitmap-based, ie the eraser works as it'd on a physical whiteboard, and there's no zoom (or undo/redo).

Great start, looking forward to seeing the future progress!

krmmalik 4 days ago 1 reply      
Oh my god. I love this!I've been waiting for a simple polished solution for this for years and years. When skype came along and then we got skype extensions, I thought they'd solve this, but oh no. Every solution that has come out so far has been mediocre at best. I'm glad someone decided to tackle this properly.I haven't had chance to try on iPad, but from the homepage it seems it'll work fine there as well?
Nemi 3 days ago 1 reply      
This is freaking awesome. You probably know this but it does not work in IE on windows 8 with a touchscreen. Chrome works fine however. I am guessing it is something to do with the touch events that IE has that are different?
kenny_r 4 days ago 0 replies      
The brain-shaped thought bubble filled with blue gears is _very_ reminiscent of the devopsdays[1] logo...

[1]: http://devopsdays.org/

valar_m 4 days ago 0 replies      
SSL, private boards, and some kind of assurance that what we're drawing truly is being erased.

Add that, and we'll pay you money to let us use it. I suspect other companies will, too.

8ig8 4 days ago 0 replies      
This is handy for remote tutoring. I dropped a math worksheet image onto the whiteboard. Imagine working remotely with a student. Here's a static 'snapshot'.


Tried this years ago over dialup with some MS app. The technology was flakey and kept getting in the way. This works great.

oneweirdtrick 4 days ago 0 replies      
You hear that? That's the sound of Google's Business Strategy team cueing Wagner's 'Ride of the Valkyries'.
afaqurk 4 days ago 0 replies      
Very nice!

My friend's parent is disabled and we thought about doing something like this and hooking it up to a touch-screen monitor for them.

That way the parent can see messages from her kids (in a different city) and vice versa without any effort or typing.

jleask 4 days ago 1 reply      
That's something I've had on my todo list for ages. As others have said though, it'd be great to be able type text as drawing letters with a mouse always takes ages and looks rubbish.

SVG export would be nice too, perhaps a paid for extra :)

gldnspud 3 days ago 1 reply      
This tool was pretty responsive to draw with using a tablet, and I'm glad the pen width isn't very large.

I love using a Wacom tablet for drawing diagrams, and wish there was a good shared whiteboard tool that supported pen pressure.

I didn't know if this is possible at first, but a quick search revealed http://muro.deviantart.com/, which supports pen pressure using a plugin.

Any chance you might add that kind of flair to whiteboardfox?

jasonkester 4 days ago 1 reply      
Nice first cut. It's actually surprising that it took a full seven years for anybody else to show up Twiddla's [1] space with a true HTML5 whiteboard. Back when we started out, there were half a dozen commercial versions of this exact thing, but all in Flash or Java, and all trying to compete with WebEx.

It think you're on the right path positioning this for use in schools. That's our main use case too, replacing overhead projectors in the classroom, and ruining snow days for an entire generation of kids.

Good luck!

[1] http://www.twiddla.com/

yaddayadda 2 days ago 0 replies      
@MarkMC - Any idea if your browser whiteboard will with the TouchPico (https://www.indiegogo.com/projects/touchpico-turn-any-surfac...) which is an inexpensive touchscreen projector. (I'm just thinking these would be a great combination of technologies.)
billybofh 4 days ago 0 replies      
Do you have any plans to have a 'broadcast' mode where the person who creates the whiteboard is the only one who can draw on it? I can see itchy student fingers abusing it otherwise in a teaching context... ;-)
graeme 4 days ago 0 replies      
I use this kind of thing professionally, for distance tutoring. Looks very nice, draws smoothly. I like the easy "erase" function.

There's one thing stopping me from using it: the URL

I use jotwithme right now, and I can set a session name, then tell people to go there. Here, I have to get the url from my ipad, sent it to myself somehow, and send it to the student.

That's not exactly hard, but it's annoying enough compared to jotwithme that I'd keep using that. But if you had that feature, I'd switch. Jot's erase feature isn't as good.

gtramont 3 days ago 1 reply      
Back in 2011, when I was starting with node.js I built something I called 'Writeboard' https://github.com/gtramontina/Writeboard . It's not an active project anymore, but I've considered resuming working on it. A rewrite of it is hosted in heroku, at http://writeboard2.herokuapp.com/ -- Check it out.
chrisweekly 4 days ago 3 replies      
Surprised to learn this is Java and long-polling. (These features scream Meteor / DDP to me.) Regardless, it's a v good start. Thanks for sharing!
soneca 4 days ago 1 reply      
Great work! My feature request: similar to the "insert pic", create an insert slide. You upload a .PPT and select which slide you want to use.

If teachersare going to use this, many of them will already have a powerpoint to use.

Adding to this, an easy way to navegate betweens different whiteboards of the same author (so it is easy to go to the next slide).

Just my opinion about what might work.

unwind 4 days ago 1 reply      
I tried opening "my" whiteboard in a second tab in Firefox (on Windows). The second tab's view is distorted, it reminds me of having a badly programmed modulo register on the Amiga.

Which doesn't say much to most, I guess... It looks as if the scan lines are mis-aligned, i.e. as if some pixels in each line is missing from each, causing the resulting image to be slanted and distorted.

megablast 3 days ago 0 replies      
Did something like this myself, a few years ago:


Except all you need to follow along is a browser.

dharma1 3 days ago 0 replies      
google drawing -> setup share settings so anyone with link can edit -> scribble


hugozap 3 days ago 3 replies      
I would love to use this, but i don't have a facebook account. I hope you support other login options
devniel 3 days ago 0 replies      
My respect for use the java stack, I like it. Here another guy to tried to build his own whiteboard a few years ago http://notephy.com , I'm just searching a solid support to audio recording with webrtc to improve it.
shervinshaikh 3 days ago 0 replies      
This looks similar to Citrix's Talkboard http://www.citrix.com/products/talkboard/overview.html
bitJericho 4 days ago 1 reply      
I played around with something like this when I was a kid (it was a group of kids drawing anime characters if I recall). Every once in a while I search for something like that and I can never find it. Now it's back :D
jacquesm 4 days ago 0 replies      
My quick-and-dirty hack for a one way version of this is to open skype using screen sharing and then to run 'gimp' while using the chat & voice for instruction/questions.
DanBlake 4 days ago 1 reply      
I did something like this a few years ago, but we were forced to use flash- http://flockdraw.com
itry 4 days ago 2 replies      
josealicarte 4 days ago 0 replies      
This article was awesome, teaching remotely are very effective because other people are busy , they dont have time to go institution.
joebo 4 days ago 0 replies      
nicely done. I will try using it with my coworkers. The video was helpful with suggestions on zooming to draw text.
orcinusorca 3 days ago 0 replies      
Very well done. I can see myself using this in the near future. Thank you for making this.
hoof_marks 3 days ago 0 replies      
Awesome!!..with tablet. You can add text support, and login with email id..dont have facebook!
free2rhyme214 3 days ago 0 replies      
My only suggestion is to make sure the youtube video plays in HD by default. Excellent work!
gavinpc 4 days ago 0 replies      
Doesn't work if cookies are blocked. Well, it is a "white board," anyway.
sidcool 3 days ago 1 reply      
Very impressed Mark. Nicely done. Do you mind telling the technology stack?
eldelshell 4 days ago 0 replies      
Very nice, but you just made me remember how hard it's to draw with a mouse.
Brandon0 4 days ago 1 reply      
This is very cool! Is there a way to zoom in on desktop? Mouse wheel perhaps?
har777 3 days ago 0 replies      
Great stuff ! I'll try to build my own version using socket.io :)
jiri 4 days ago 0 replies      
Very nice! I gonna use it myself for drawing using tablet on big screen!
j2kun 3 days ago 0 replies      
A simple chat functionality within the app would be nice...
ujjwal_wadhawan 3 days ago 0 replies      
A zoom in/out with mouse scroll would be good to have.
freebs 4 days ago 0 replies      
Making it easier to zoom would be nice. Maybe with scrolling?
junyeeng 3 days ago 0 replies      
How long do you take to complete the project?Awesome work!
dblacc 4 days ago 1 reply      
This is fantastic. How long is a whiteboards lifetime ?
johnmoore 3 days ago 2 replies      
Only works in Internet Explorer 9, doesn't work in IE 8 in some companies they only allow you to use IE only and only upgrade the browser if they install a new OS.
cdnsteve 3 days ago 0 replies      
Interesting, seems like TogetherJs or Prezi.
khrist 4 days ago 0 replies      
very nice, responsive. Great job. I was looking for such tool. Feature request, should allow copy paste :).
mentos 4 days ago 0 replies      
Might this use Firebase?
Duber 4 days ago 0 replies      
looks good to me, congratulations
lazyant 4 days ago 2 replies      
great! only missing typing text
samstave 3 days ago 0 replies      
There should be an "omeagle" version of this where you draw pics with strangers.
299 points by daigoba66  3 days ago   164 comments top 30
MichaelGG 3 days ago 5 replies      
I wonder what the search story is. One technology that really does deliver, and has totally impressed me, is Lucene/ElasticSearch. I'm used to all sorts of hyperbolic claims, but holy shit, ElasticSearch just delivers. We tossed in about 40M documents from a SQL Server DB, and not only did it require less resources (a 30%? reduction in size), the queries are beyond anything that'd be approachable using SQL Server. And I've only touched the surface, using it as a pure plug-n-play setup.

With DocumentDB, not having a local version severely limits what I'd consider this for. Losing that flexibility is a big deal. Maybe this is just a limited preview and they haven't build the management side for local installs.

ceejayoz 3 days ago 5 replies      

> Want to edit or suggest changes to this content? You can edit and submit changes to this article using GitHub.

Pretty remarkable given Microsoft's approach to open source in the 1990s that they're now using a service built around Linus's bespoke open source version control system to allow people to suggest changes to their documentation.

jpalomaki 3 days ago 1 reply      
Ad hoc queries using SQL like syntax. No need to define indexes.

Javascript execution within database. Stored procedures, triggers and functions can be written with Javascript. "All JavaScript logic is executed within an ambient ACID transaction with snapshot isolation. During the course of its execution, if the JavaScript throws an exception, then the entire transaction is aborted."

Pricing is based on "capacity units". Starts with $22.50 per month (this includes 50% preview period discount). One capacity unit (CU) gives 10GB of storage and can perform 2000 reads per second, 500 insert/replace/delete, 1000 simple queries returning one doc.

In order to see pricing details, change the region to "US West":http://azure.microsoft.com/en-us/pricing/details/documentdb/

Very interesting addition to Microsoft offering. I was actually just yesterday wondering if they have any plans for this kind of service. Table Storage is quite primitive and Azure SQL on the other hand gets expensive when you have lots of data.

One potential "problem" with this is the bundling of storage capacity and processing power. If I understand this correctly, I would need to buy 10 CUs per month to store 100GB of data even if I'm not very actively using that data.

streptomycin 3 days ago 1 reply      
DocumentDB utilizes a highly concurrent, lock free, log structured indexing technology to automatically index all document content. This enables rich real-time queries without the need to specify schema hints, secondary indexes or views.

How does that work? Isn't that going to incur a major performance hit? If not, why don't other databases get rid of indexes?

Also, if anyone from MS is reading, http://azure.microsoft.com/en-us/documentation/articles/docu... links to http://azure.microsoft.com/en-us/documentation/articles/docu... which is a 404 error.

whalesalad 3 days ago 3 replies      
I liked everything about it until I saw the API for the Python client. What a catastrophe.

I pray Microsoft is looking for Python developers: https://gist.github.com/whalesalad/2142f0075c6896f4547c

fineline 3 days ago 3 replies      
"All JavaScript logic is executed within an ambient ACID transaction with snapshot isolation. During the course of its execution, if the JavaScript throws an exception, then the entire transaction is aborted."

Have I missed something, or have MS delivered a novel and valuable feature? I'm not aware of support for transactions across documents in other NoSQL platforms. I'd be grateful if someone has any experience or better information in that regard, thanks.

bkeroack 3 days ago 5 replies      
...and MS goes after MongoDB. It would be nice to see an on-premises version, if only to compare performance/consistency with Mongo.
luuio 3 days ago 1 reply      
A quick comparison between DocumentDB vs MongoDB: http://daprlabs.com/blog/blog/2014/08/22/azure-documentdb/
orand 3 days ago 2 replies      
If I understand correctly, their multi-document ACID transaction support is a big deal. The only other NoSQL/NewSQL systems I'm aware of with that ability are FoundationDB and Google Spanner/F1.
pokstad 3 days ago 3 replies      
Sounds very similar to CouchDB. Server side Javascript written by the user, and an HTTP interface. The ability to adjust consistency is really neat.
allegory 3 days ago 4 replies      
No local installation. No banana.

I wouldn't tie a product to a single cloud vendor.

lubos 3 days ago 2 replies      
What are the limits of DocumentDB? You know, like max size of database, max size of document, max number of documents per database, max. number of attributes per document, max. number of databases per DocumentDB account.

What's the max. duration of database query, max size of query result.

What kind of performance can be expected, does it decrease as the size of database increases or it remains constant?

I'm going to wait a few days until hype settles.

jnardiello 3 days ago 2 replies      
And that is a creative product name. Well played MS.
mallipeddi 3 days ago 0 replies      
What are the size limits on a collection? Docs mention transaction support is offered only within a collection. Is a collection essentially limited to a single physical machine in the background or does it span across machines? It looks like in Standard Preview, the max collection size is 10GB.
seanp2k2 3 days ago 1 reply      
Interesting: https://github.com/Azure/azure-documentdb-python it's empty for the moment, but glad to see first-party support for Python
reubenbond 3 days ago 0 replies      
The @DocumentDB twitter links to a tutorial on DocDB: http://www.documentdb.com/sql/tutorial
cvburgess 3 days ago 3 replies      
Does anyone know how this compares to AWS DynamoDB[1] ?

[1] https://aws.amazon.com/dynamodb/

chippy 3 days ago 0 replies      
Spatial queries and indexing. Most data has some location component. I didn't see anything with this. Is it in there, or planned?
andrea_s 3 days ago 6 replies      
Am I alone in thinking that sql-like syntax is actually a step backwards from building query documents programmatically (MongoDB style)?
petilon 3 days ago 3 replies      
So does it run on a cluster? If so which of Consistency, Availability and Partition tolerance does it NOT offer? (See CAP theorem)?
yxhuvud 3 days ago 1 reply      
It would have been nice to see some actual details of how it works so that it can be compared to the competition.
gamesbrainiac 3 days ago 0 replies      
I find it surprising that DocumentDB wasn't already a copyrighted name. ;)
talles 3 days ago 1 reply      
Can I use DocumentDB out of Azure (hook my own)?
poolpool 3 days ago 1 reply      
I wonder if this is built on JetDB
sarciszewski 3 days ago 1 reply      
Leave it to Microsoft to give it the most generic sounding name possible.
nandkishiee 3 days ago 0 replies      
Sick! Love it
utunga 3 days ago 3 replies      
Another case of Not Invented Here syndrome from Microsoft. One wonders why they couldn't just take the open source and very well architected RavenDB http://ravendb.net .Net Document DB and provide first class support for that within Azure.
cbsmith 3 days ago 3 replies      
'cause what the world needs is another proprietary NoSQL solution.
hackerkushal 3 days ago 0 replies      
THIS THING IS A BEAST!!It is absolutely bad ass
Nux 3 days ago 0 replies      
A new "cool", locked-in service served on a silver platter by Microsoft to the brainwashed.

Everybody else uses open source on premises or their cloud of choice.

On bananas and string matching algorithms
252 points by cjbprime  2 days ago   61 comments top 5
zackmorris 1 day ago 3 replies      
I've seen some very strange things in my career. I find posts like this delightful, because I can point to them and say "see, here is proof that even code written with the best of intentions can still have bugs."

Programmers tend to fall into (at least) two camps: the skeptics and the pragmatists.

Sometimes when I report a finding, programmers accuse me in one way or another of messing something up because that cant possibly be failing. Those are the skeptics, using incredulousness almost like a shield to protect their worldview. They tend to have an up-close/whats right in front of them approach to programming, are prolific and usually take a positive stance on programming.

At other times, reporting a finding is met with resignation, almost like please work around it because we just dont need this right now. Those are the pragmatists, taking the long view/forest for the trees approach, knowing that programming is more than the some of its parts but also that its a miracle it even works at all. They are the daydreamers and sometimes are perceived as negative or defeatist.

I was a pragmatist for as long as I could remember, but had a change of heart working with others in professional settings. I saw that certain things like databases or unix filesystems could largely be relied upon to work in a deterministic manner, like they created a scaffolding that helps one stay grounded in reality. They help one command a very mathematical/deliberate demeanor, and overcome setbacks by treating bugs as something to be expected but still tractable.

But here is one of those bugs, where the floor seemed to fall out from under our feet. One day I mentioned that SSL isnt working and about half the office flipped out on me and the other half rolled their eyes and had me track it down:


The gist of it is that OpenSSL was failing when the MTU was 1496 instead of 1500, because of path MTU discovery failing and SSL thinking it was a MITM attack and closing (at least, that is how I remember it, I am probably futzing some details).

That was odd behavior to me, because I see SSL as something that should be a layer above TCP and not bother with the implementation details of underlying layers. It should operate under the assumption that there is always a man in the middle. If you can open a stream to a server, you should be able to send secure data over it.

Anyway, we fixed the router setting and got back to work. All told I probably lost a day or two of productivity, because the office network had been running just fine for years and so I discounted it for a long time until I ruled out every other possibility. Ive hit crazy bugs like this at least once a year, and regret not documenting them I suppose. Usually by the time they are fixed, people have forgotten the initial shock, but they still remember that you are the one weirdo who always seems to break everything.

StefanKarpinski 1 day ago 5 replies      
Really interesting post and good debugging work. A couple of take-aways:

1. This is one reason it's a good idea to use signed ints for lengths even though they can never be negative. Signed 64-bit ints have plenty of range for any array you're actually going to encounter. It may also be evidence that it's a good idea for mixed signed/unsigned arithmetic to produce signed results rather than unsigned: signed tends to be value-correct for "small" values (less than 2^63), including negative results; unsigned sacrifices value-correctness on all negative values to be correct for very large values, which is a less common case here it will never happen since there just aren't strings that large.

2. If you're going to use a fancy algorithm like two-way search, you really ought to have a lot of test cases, especially ones that exercise corner cases of the algorithm. 100% coverage of all non-error code paths would be ideal.

srean 1 day ago 1 reply      
There are many comments discussing whether length should be unsigned or signed. There are arguments for and against it. This a prototypical carpet bump, you squash it in one place it raises its head somewhere else.

I see it not as a question whether lengths should be signed or unsigned but whether subtraction, assignment etc should be polymorphic w.r.t signed and unsigned. I think the issue here is the polymorphic variants of these binary operators are inherently risky.

Casting gets a little tedious, but languages that do not have operator overloading should disallow subtraction from unsigned and subtraction that return unsigned. You either cast it up, or if possible reorder the expression/comparison so that the problem goes away. Even assignment can be a problem. Ocaml can get irritating because it takes this view but I think it is safer this way.It is very hard to be always vigilant about the unsigned signed issue, but hopefully a compiler error will mitigate risks, not completely, but it is better than nothing.

That leaves languages that allow operator overloading, in those cases if you are overloading an operator you better know what you are doing, and watch out for cases where the operator is not closed.

sitkack 1 day ago 3 replies      
Why is this code so damn fancy? Shouldn't the fanciness be offset by proofs or extended testing? Open loop!
alayne 1 day ago 1 reply      
I try to never look at GPL/LGPL code if I'm going to implement something at work or under another license.

Sorry for suggesting a good practice to avoid legal liability.

Announcing Calibre 2.0
266 points by cleverjake  2 days ago   94 comments top 13
vj44 2 days ago 8 replies      
I'm sure calibre 2.0 is a great technical feat, and kudos for all the work put into this product, but judging by the screenshot the user interface is equally clunky as in 1.0.This software does mostly everything I need it for to convert ebooks... but can you, the authors, please improve the UI?
skant 2 days ago 2 replies      
The author of Calibre claims:In my opinion, calibres graphic interface is damn good [1]

I don't think the author is going to make any strides towards improving/changing the UI


dredmorbius 2 days ago 1 reply      
I'll take a look at this, as my long rant on what's wrong with browsers[1] basically ends up with the admission that something along the lines of Calibre or Zotero is probably more of what I want from a reading app: the ability to manage a library of works, local, networked, or on the Web, with a highly uniform presentation (ignore virtually all document formatting in favor of my own preferences).

From my relatively light explorations of Calibre to date (v. 1.25 on Debian jessie/sid):

The UI is clunky. Especially when trying to edit / capture bibliographic information I've found it beyond frustrating.

The built-in readers are severely brain-damaged and I've found no way to change them. The PDF reader is complete and total fail, the eBook reader isn't much better, and I seem to recall that accessing HTML docs is similarly frustrating.

By contrast, I've been impressed by the Moon+Reader Android eBook reader, generally like the Readability online (Web) reader and Android app, and had found a Debian eBook reader that was fairly decent client -- fbreader. Its main disadvantage is in not having the ability to set a maximum content width. I find that 40-45 em is my preferred width in general. Among fbreader's frustrations: I cannot define a stylesheet, though I can apply a selected set of styles (defining margin widths, e.g., but not the _text_ width, which is frustrating). The book I've presently got loaded is either right or center justified -- the left margin is ragged, again, frustrating. And text doesn't advance on a <space>, like virtually any other Linux pager.

If calibre readily supported alternative clients, I'd be a lot happier with it.

The ability to include / reference / convert Web content would be somewhere north of awesome. There's still a large amount of information online that I reference, but would prefer to archive or cache locally, and/or convert to more useful formats (usually ePub or PDF).

Optimizing viewing experiences for wide-format, vertically-challenged screens would be hugely useful. 16:9 display ratios mean vertical space is at an absolute premium. Most PDF viewers are utterly brain-dead in this regard (evince, for example, requires four manual repositionings to view a typical 2-up document). The Internet Archive's BookReader does an excellent job of consider positioning content and paging through it as two separate functions. I strongly recommend taking some UI notes from it. https://openlibrary.org/dev/docs/bookreader

Alternatively, the old 'gv' ghostscript Postscript and PDF reader will page through documents in a highly sensible fashion: top-bottom, left-right. Why this was achieved in 1992 while PDF readers of the subsequent 22 years have utterly blundered in this regard escapes me.

That said, I'm looking forward to this showing up in Debian's repos (I've got v1.25 presently).



1. http://www.reddit.com/r/dredmorbius/comments/256lxu/tabbed_b...

llasram 2 days ago 1 reply      
In 2008-2009 I was probably the second biggest commiter to Calibre (still #4 according to github), focusing entirely on the conversion pipeline and format support. I'm still proud of the OEB modeling as some of the finest OO code I've written, or probably will write now that I've moved on to functional.

For everyone complaining about the UI and management functionality, realize that you are not the target audience. Head over to www.mobileread.com, look at the Calibre forum and the praise Kovid gets, and you'll see that he's largely catering directly to what his core users want.

It is interesting that Calibre and mobileread are still around, and relatively little changed. I lost interest and moved on once pretty much every commercially-available e-book became available in EPUB format. What's left is a very, very specialized core of enthusiasts.

marianminds 2 days ago 5 replies      
One thing that really sucks still is the conversion of PDFs (for e.g. journal articles) into formats suitable for e-ink readers. I've tinkered with its heuristic processing and regex formatting, but I'd never considered manually touching up the final .epub as it comes. If their ebook editor is any good I might start reading journal articles again.
dredmorbius 1 day ago 0 replies      
Can someone point to a good Calibre tutorial?

My use-case: I download material in various formats from online, mostly in PDF, ePub, or some markup format (LaTeX, Markdown, HTML, etc.) I've got a large set of downloads, which I then try to import into Calibre. This is in support of a large research project.

1. It's difficult to tell what I've imported and what I haven't.

2. The import process itself is slow. Enough so that I'll fire it up, get caught up in other stuff, and ... well, tend not to get back to it.

3. The corpus is fairly large: around 1000 books and papers, plus another 5,000 others pulled from web archives.

4. Tracking this by metadata is crucial. Title, author, publication date, and tags. Managing _that_ is a headache on its own, especially adding metadata to works / confirming automatically extracted content is accurate.

5. Once I've got the information organized, reading, referencing, annotating, and other tasks should be supported.

Again: calibre is about the only tool out there I'm familiar with, but it's a pain. Zotero and various LaTeX bibliographic tools are also of some use.

maxerickson 2 days ago 2 replies      
Does it still refuse to index without managing?

A quick glance at the documentation says yes.

nebulous1 2 days ago 3 replies      
I don't suppose he's backtracked on his awful position on auto-updates?
holychiz 2 days ago 1 reply      
so much hate for the UI! personally, it works and works well for its intended purpose. To me, it's even intuitive at times. By that virtue, it's already better than 90% of software out there, free or not. Can it be better? sure, like everything else in life. Now that I know that the dev is abrasive from other HN comments, i've got even more respect for him, because of the heavier load he has to carried. :)
bowlofpetunias 2 days ago 2 replies      
I have a love-hate relationship with Calibre. As a way to manage my ebooks, and especially overcoming the insanity that is DRM, Calibre is a lifesaver. I wouldn't even be buying ebooks if it wasn't for Calibre. (I only bought a Kindle after making sure I could crack the DRM and actually own the books I paid for.)

However, the user interface of Calibre is one of the worst I've ever encountered. It looks and feels like a teenagers first attempt at creating a desktop software prototype back in 1995. (Having to go to the website to download and install every single new minor release also feels like something from a bygone era.)

I donate to Calibre because I need it to continue existing, but I have no love for it.

jrvarela56 2 days ago 1 reply      
Does anyone have a decent webapp to replace this? Interested in building one since I haven't found a viable option. As of now I use Calibre and set my folder to Dropbox so I can access books.
yuribit 2 days ago 1 reply      
Is there some Calibre plugin to convert scientific articles with math formulas to epub or mobi?
necrodome 2 days ago 0 replies      
I am trying to find a solution to ditch calibre(at least for library management) completely, and with the advent of cheap android eink devices, this seems more possible now. A simple app that communicates with a web backend to manage my library on such a device would be enough.

one recently released such device is Boyue T62 (http://www.banggood.com/Boyue-T62-8G-Dual-Core-6-Inch-WIFI-A...) Here is an overview (the review is for the same device, just rebranded and with previos generation specs) http://blog.the-ebook-reader.com/2014/08/11/icarus-illumina-...

You also get much better pdf reading capabilities with these devices.

Until the next generation displays for reading come into play, these look much better overall than kindle, nook, etc.

Multi-Datacenter Cassandra on 32 Raspberry Pis
276 points by zzzqqq  3 days ago   54 comments top 13
sgt 3 days ago 19 replies      
I'd be worried about just switching RPi's off. We recently got a Pi for the office to run as a dashboard - and after a couple of power cuts it corrupted the SD card.

Now I'm going to have to set up the system again, and I don't know whether this is going to happen again. The SD card that got corrupted was a Class 4 Kingston.

Maybe I'll look into a Sandisk (possibly Class 10?) next time. But I am worried that it's not the SD card's fault, but rather a combination of a journaling filesystem, an SD card and a sudden power outage.

Edited: Apologies, I realized now that the red button cuts power to the network switch, not to each individual Pi. But my concerns about the Pi and power cuts still remain though.

thinkingkong 3 days ago 2 replies      
Is there a video we can see?Hitting the button im imagining the circles showing some kind of re-sync animation?
coreymgilmore 3 days ago 0 replies      
Pretty cool. Would like to see it working (video/timelapse/gif)?

Also, any reason for not making the big red button randomly select a "datacenter" to take offline?

Idea: transition this into a 3 or 4 datacenter cluster.

crazypyro 3 days ago 0 replies      
I noticed the mention of FIRST and at the same time, noticed the red/blue color choice. I'm sure its just a coincidence, but still entertaining. Project looks awesome.
smoothpooper 3 days ago 0 replies      
Demoing the multicluster setup and simulating the failure to various people was the hardest part for me. This will help so much. A video will be nice.
PanMan 3 days ago 1 reply      
How is the circle of lights set up? What does it show?
fasteo 3 days ago 0 replies      
Picture of the back of that wall !!
mkoryak 3 days ago 0 replies      
and here is the link to the "high res" picture of the setup 4000x2000:http://www.datastax.com/wp-content/uploads/2014/08/cluster_c...
rodvlopes 3 days ago 0 replies      
I see rpis everywhere... Are they self-replicating?
ribs 3 days ago 0 replies      
Wicked! I want to see a video.
rjurney 3 days ago 0 replies      
They need a custom designed enclosure with pretty lights.
yossarian314 3 days ago 0 replies      
bfrog 3 days ago 1 reply      
They say it was difficult to get a high performance DB running on a 700mhz chip with 512Mb of ram. Perhaps its just the wording but that sounds like the opposite of high performance to me.
Gogs: a self-hosted Git Service written in Go
260 points by czsu69jj  1 day ago   100 comments top 17
lukeholder 1 day ago 8 replies      
What i love about Go from a user of some of the open source apps like Gogs, is that its so easy to get the application running.

A single binary with zero dependancies is so awesome. With a ruby on rails app I need to worry about ruby version, ruby implementation, gem versions, compilation of C based gems, etc etc. With Go i simply copy up the binary and run it.

geerlingguy 1 day ago 1 reply      
If you'd like to compare the GitLab and Gogs, I have a couple vagrant VMs you can clone and 'vagrant up' to kick the tires:

  - https://github.com/geerlingguy/ansible-vagrant-examples/tree/master/gitlab  - https://github.com/geerlingguy/ansible-vagrant-examples/tree/master/gogs
Right now I still have a very basic git server for personal use with a bunch of bare repos and no UI, but I'm sorely tempted to start using Gogs or GitLab. GitLab wins for polish so far, but Gogs has caught up very quickly, and feels slightly faster.

donquichotte 23 hours ago 1 reply      
When considering a github-like service for my company, there were two main candidates, gogs and gitlab.

I favoured gogs because of the ease of deployment. What killed it was the fact that forking public repositories and creating pull requests is not implemented yet.

Since the ease of deployment for gitlab was drastically reduced lately, we settled for gitlab.

zackify 1 day ago 2 replies      
This thing is fucking legit guys: "Admin password must contain at most 6 characters"
hardwaresofton 1 day ago 4 replies      
As a person who recently discovered gitlab and has been trying to push it (make it popular at work, and possibly use it to replace github, and encourage people to use it), this is amazing.

Installing Gitlab was definitely one of the painpoints, having an executable that just works is amazing

What are people's thoughts on open software projects like this eating into github licensing money? I feel guilty sometimes pushing gitlab since I really like github as a company (and want them to thrive)

kinofcain 1 day ago 3 replies      
This is terrific. Other than the java implementation, is this the only alternate git implementation that doesn't use the core c git code under the hood? That's a pretty important accomplishment.

So many things you could build with a git-like data store...

moepstar 1 day ago 0 replies      
Ok, since my GitLab testinstall is hosed anyway...

How does this compare feature-wise to GitLab? How does this compare to GitLab regarding updates, i.e. how easy and seamless will update be and how often are they available?

Would be nice if someone could post some first-hand experience :)

hliyan 1 day ago 0 replies      
This is brilliant. Works beautifully. I only have very minor feedback:

1. The blue-on-red contrast is a bit hard on the eyes. Try a softer color palette?

2. Repository languages doesn't include Javascript?

3. Issue sorting and filtering might be important

Once again, kudos on a job well done!

swah 1 day ago 0 replies      
Does this implement a git engine like Gerrit? Its worth looking at their design - they can do so much cool stuff (like rejecting badly formatted commits) because they have their own server (IIRC).
Nux 1 day ago 1 reply      
This is great. Till now we had GitBucket, GitBlit etc which are really fantastic, but they require a bit of resources.

If this can run ok on a modest VM then I think we got a winner!

maxcellent 1 day ago 0 replies      
I wonder if federated login is already on roadmap.

Looks great! Good job!

syntern 1 day ago 1 reply      
That is a really cool project, and seems to be much easier to set up as any of the competitors (I'm looking at you, gitlab).
KaoruAoiShiho 22 hours ago 3 replies      
Can somebody make a git based wiki. PLEASE.
Fastidious 1 day ago 2 replies      
It uses Flash? Good looking application otherwise.
IbJacked 1 day ago 0 replies      
Looks great! Are there any plans to include per-repo wikis?
SoapSticky 1 day ago 0 replies      
This is just FANTASTIC
tempodox 3 hours ago 1 reply      
Who uses git any more, anyway?
Why I'll Never Tell My Son He's Smart
247 points by eroo  2 days ago   63 comments top 26
ChuckMcM 2 days ago 8 replies      
I've had mixed thoughts about this over the years. Sadly you only get to raise your kids once, you can't try other scenarios and see of there is a better path.

Highly verbal kids, and that is generally kids who read a lot, will be told they are smart whether you do it or not. And if you're child's teachers are telling you how smart they are, and they ask you "Dad, my teacher said I'm really smart, do you think I'm really smart?" You'll have to decide what the narrative is.

That said, it's great to reward struggle rather than success and to emphasize that it is through failure that we value succeeding. Everyone I know who shielded their children from failure has struggled later with teaching them how to cope with failure. That isn't scientific of course, just parents swapping horror stories, but it has been highly correlated in my experience. Putting those struggles into the proper light is very important.

A less obvious but also challenging aspect of this though is that you must teach your children that natural skillsets don't determine their worth. You are good at maths but lousy at sports? Makes you no better or worse than someone with the opposite levels of skill. That is much harder as kids are always looking for ways to evaluate themselves relative to their peers. If you endorse that you can find yourself inculcating in them an unhealthy externally generated view of self worth.

jwmerrill 2 days ago 2 replies      
> Dr. Carol Dweck... has found that most people adhere to one of two mindsets: fixed or growth.

I'm sympathetic to Khan's overall POV here, but "research says there are basically two kinds of people..." always tickles my skepticism antennae.

Claims like this are so often overstated by researchers to punch up an abstract, and then so often simplified further in uncritical 3rd party reports that I wouldn't bet a sandwich on the truth of any such claim without seeing the data for myself. C.f. the widely believed and largely unsupported claims about learning styles.

Would be nice of Khan to link to the publications so we could decide for ourselves.

toehead2000 2 days ago 5 replies      
I think there's a flip side to this, too, though. Being told you're smart, or good at math, or whatever, can be a motivator. It can encourage you to seek out and develop that talent, and also to persevere when things are difficult. At least for me, personally, when faced with a tough math concept I would think "well Ive been told all my life I'm good at math and I've been pretty good up until now so I'm sure I will be able to figure this out."

Giving negative motivation to a kid, saying "you're stupid," is recognized to sometimes be a self-fulfilling prophecy. There's no reason that "you're smart" can't work in the same way. I would not be surprised if a lot of this phenomenon of children being negatively motivated from positive feedback ends up having a different explanation than the one posited here.

jkimmel 2 days ago 0 replies      
I found this to be very insightful, as I am not familiar with the cited research. It brings to mind my own memories of growing up, and how being told how "smart," I was could actually act as a hindrance.

As the article notes, I was only praised when I got a correct answer, or used a big word without stumbling. In one particular memory, I am afraid of taking a new mathematics placement test in school -- not because of the difficulty, but precisely because I had gotten a perfect score on the last one. There was no room to grow, if I didn't get them all right again, would that make me not "smart?"

Very simple changes in the language we use with young children could possibly avoid that kind of anxiety in bright youth.

kiyoto 2 days ago 2 replies      
I find this campaign/propaganda dangerous.

I only know of Japan and the US, but as someone who went to one of the most prestigious secondary schools in Japan and universities in the US, I have seen well-educated, smart people with "growth mindsets" struggle later in their lives.

1. Regardless of what we say, in many corners of adult life, results are valued over processes. While a superior process has a higher likelihood of yielding a superior result, this is often not the case, and in a perversely Murphy's law-esque manner, it turns out to be false at critical junctures of one's life. And the deeper the growth mindset is ingrained into you, the more disappointed/despaired you find the situation and feel incapacitated and betrayed. Of course, a singular emphasis on results with no consideration for process is equally bad. Most people find their own local optimum between the two extrema, and I don't see how a campaign towards one end of the spectrum is all that meaningful or worthy.

2. This probably sounds terrible, but not everyone is "smart" as measured by academic performance. Certainly effort is a huge part of the equation, but some minds are better wired for academics than others. And the longer you work at it and hence surround yourself with qualified peers, the more apparent it becomes that not everyone is working equally hard. This realization usually does't mesh well with the emphasis on process from one's formative education, and many people become jaded/hopeless. (And of course, even within academic subjects, there are individual variances). While it is important to try, it is also the responsibility of educators (and adults) to see if the child's potential lies somewhere else, or to borrow Mr. Khan's words, to see if the child can be tenacious and gritty about something other than academics.

AnimalMuppet 2 days ago 0 replies      
Here's the other side: Kids are often cruel. Kids say demeaning things to other kids. One of the frequent ones is "You're stupid". And some kids are more emotionally fragile than others. I don't want my fragile kid to hear "You're stupid", perhaps frequently, without it being countered by affirmation that she is not in fact stupid.

But I also don't want that to be the equivalent of "participation awards" in Little League. For it to be of any real value, it has to go with teaching her how to actually think.

davidgerard 1 day ago 0 replies      
My 7yo is really obviously smart and she knows it - top of class in everything. But so are her parents. So we're hammering home that smart is not good enough and you have to learn to do things, acquire skills.

(Her mum is an excellent role model in this, 'cos she's basically competent in a dizzying array of small skills. "If you want to be good at everything like Mummy is, this is how you learn it!")

Basically the hard part is capturing her interest. Anything she's interested in, she will absolutely kill. Anything she's not interested in, she won't bother with. That bit she gets from me ...

It also reminds us to set a good example: learn things and do them. Because it doesn't matter what you say, it's the example you present.

That said, I was most calmed by the many, many studies that show that, as long as you don't actually neglect the kid, they'll probably turn out how they were going to anyway. So helicopter parenting really is completely futile.

We've caught her at midnight reading books more than once, so I'll call that "huge success" ;-)

edpichler 2 days ago 0 replies      
"The Internet is a dream for someone with a growth mindset."

Exactly what I feel. Days are becoming too short for such amount of interesting things to do and to learn (Hacker News, Quora, Designer News, Coursera, Khan Academy, TED, Project Guttenberg... the list is long, and it's growing...)

yodsanklai 2 days ago 2 replies      
I don't have kids, but I think I would tell them the truth. First, it's difficult to define "smart" as it's a conjunction of many skills. But even for one given skill, you may be the best in your class or your school, but there are likely millions that are much better than you. No need to worry too much where you lie and try to do the best with what you have.

> "Researchers have known for some time that the brain is like a muscle; that the more you use it, the more it grows. Theyve found that neural connections form and deepen most when we make mistakes doing difficult tasks rather than repeatedly having success with easy ones. What this means is that our intelligence is not fixed, and the best way that we can grow our intelligence is to embrace tasks where we might struggle and fail."

I wonder to which extent this is correct. Sure, it would be nice if it was the case. It's a nice myth that anybody can achieve anything with the proper amount of work. I see it all the time in fields such as maths or music. Some people are naturally so much better than others than even a lifetime wouldn't be enough to catch up.

Aerospark 2 days ago 0 replies      
This is why Salman Khan is one of (if not) the greatest teachers of our generation. When I read this article, I remembered when Khan Academy first started... it was the first attempt to make good education free and easily accessible, exactly the way it should be. Hats off to you sir, thanks for another great lesson I will teach my kids some day :).
brudgers 1 day ago 0 replies      
The article makes me sad.

What makes me sad is the idea that not telling a child she smart is justified so that the child will meet the parent's expectations. Telling a smart child they are smart is honest and kind and humane. I believe that in the long run the attitudes toward honesty and humility and empathy are the most important things I instill as a parent.

Some things are easy for smart people and not acknowledging that as a factor in my child's successes would be dishonest when discussing those successes. It is akin to not acknowledging that a pitcher of cold Kool-Aid is not the product of economic circumstance.

Some success is comes from pure good fortune, some comes from just showing up, and some comes from hard work. Talking honestly about when and how each plays a role is my job as a parent. I hope my child develops the ability to distinguish challenge from a checklist of busy work.

It's not either or. A child can understand that some successes come because the task is easy for them. Others will come from hard work. The can tell the difference between watching an addition video and earning an orange belt.

That said, my standard for good parenting is forgiving. Just trying to do a better job than one's own parents is hard enough. My parenting advice, for what it's worth, is to treat children as antonymous moral agents, fully capable of making intelligent decisions and able to learn from mistakes. Talk with them honestly as such and avoid deceit even when they are small.

Because that is when the foundation for their life as a teenager and adult is laid.

gaelow 1 day ago 0 replies      
Regardless of any received training, smart people don't usually struggle as much as normal people when they are presented with a new, different kind of problem. That's something you cannot learn.

Even a kid's brain will not "grow" more or less depending on what kind of stimulus he is exposed to. But it doesn't mean it's bad to reward and compliment your kid for struggling and working hard instead of just being naturally good at something. It helps the child to build a character and face problems instead of giving up. The article is right about that.

There are also many ways to get a better access to the full capacity of your brain. It's not like the movie "Lucy", but many conditions may prevent you for using it to its full potential: Age, injury or illness, sleep deprivation, stress and exhaustion, lack of nutrients, drug abuse and chemical unbalances, etc. Some of those factors present problems that can be treated or even prevented, and you will (most of the time) function at the same cognitive level as a careless smarter person.

Also, the fact that there is no way you can alter your intelligence without altering your DNA doesn't mean you can't use it to discover and apply better problem-solving patterns for a particular discipline, making yourself effectively smarter.

dalek2point3 2 days ago 0 replies      
Aaron Schwartz introduced me to Dweck. It has been an integral part of my life ever since:http://www.aaronsw.com/weblog/dweck
eroo 2 days ago 0 replies      
I wasn't aware of this research. Reflecting on my own schooling experience, however, there is something pleasantly intuitive about it.

I'm always impressed with Salman Khan's work.

BrandonMarc 2 days ago 0 replies      
One of the first Aaron Swartz essays I read (first of many) was on this very topic. He gives great details about how she experimented with children and games, and how their mindsets manifested themselves, and how she came to her conclusions about fixed vs growth.


To me, the possibility that anyone can move from fixed to growth is astounding [1] ... that fact itself positively brims with the possibilities it opens up, if only a person can realize they're not stuck and they can expand their horizons.

Khan's description of "interventions" is interesting.

[1] I also suspect the converse is equally possible, given the right circumstances ... which is worth keeping in mind, I 'spose.

tokenadult 2 days ago 0 replies      
A readable popular article about this research, "The Effort Effect," was published right after Professor Carol Dweck moved her research base from Columbia University to Stanford University.[1] And Dweck has written a full-length popular book, quite readable and helpful for parents, called Mindset: The New Psychology of Success[2] that I recommend to parents all the time.

[1] http://alumni.stanford.edu/get/page/magazine/article/?articl...

[2] http://mindsetonline.com/


blazespin 2 days ago 0 replies      
Great article, lousy title. The point he was making is that smart people are those that appreciate learning more than knowing. The reality is life is very much that - successful people everywhere are those who are always willing to push themselves beyond their comfort zone.
phaet0n 2 days ago 1 reply      
There is a sort of analogue to this: parents praising their children as beautiful/pretty or brave/strong. Both vacuously reduce the childs ability to reflect genuinely on their strengths and their source of self-worth. Beauty (or the appreciation of) becomes solely reduced to the physical (and external), and courage reduced to dare-devilism/ego-centrism instead of the appreciation of fear and acting to overcome it.
spiritplumber 2 days ago 0 replies      
I kept being told "You're smart/gifted" when I did something clever, and "You need to try harder" when I didn't. Left me with some self esteem issues.
riffraff 2 days ago 0 replies      
so pardon my natural question: was Dweck's work replicated?

We have believed for decades in the stanford prison experiment, and it was faulty.

ngokevin 2 days ago 1 reply      
This is common knowledge by now. I didn't even have to read the article, just skimmed it. These types of articles really cater to people who were often told they were smart when they were little, or found school to not be difficult.

I have even seen non-educated mothers state this fact even while playing poker, "yeah I never tell my son he's smart, I congratulate his hard work instead because it changes his mindset".

QuantumChaos 2 days ago 0 replies      
While I wish the best for all children, I feel like this kind of discourse has a negative effect on the very intelligent. By downplaying the significance of intelligence, it trivializes the gifts of the truly intelligent, and places an excessive emphasis in the virtue of hard work. I see on HN all the time the claim that hard work beats intelligence. But I have never really worked that hard, I just have an extraordinary ability in mathematics.

When I was a child, I was told that I was very smart (which I was) and pressured to fulfill my potential. Other children may be pressured to be hard working and studious. I would rather celebrate people who are naturally gifted, and also people who choose to work hard. What is important is that people's actions arise naturally from their own desires, not from external pressure or manipulation.

Swizec 2 days ago 2 replies      
> Fixed mindsets mistakenly believe that people are either smart or not; that intelligence is fixed by genes. People with growth mindsets correctly believe that capability and intelligence can be grown through effort, struggle and failure.

Can intelligence be gained though? I agree that skill can only be gained through effort/practice/etc. But intelligence ... isn't intelligence more like a natural talent than something you can gain?

Much like you can't just train yourself to have a beautiful singing voice or big boobs or absolute pitch hearing, I don't think you can train yourself to be more intelligent. Smarter, yes, intelligenter, not really. It's a talent, not a skill.

kolev 2 days ago 1 reply      
So, I should rather lie?
MisterBastahrd 2 days ago 0 replies      
If my kid is smart he'll figure it out for himself.
241 points by lelf  2 days ago   90 comments top 28
fencepost 1 day ago 2 replies      
There are multiple projects/products out there for this, some of which are linked here and some of which are not. Not all are currently available. There was a fair amount of discussion and useful information in a Brian Krebs article: http://krebsonsecurity.com/2014/06/gear-to-block-juice-jacki...

USB Condom: ~$10, available. Tends towards either a bare board with USB connectors or that board with plastic shrink tubing on it. (https://www.crowdsupply.com/xipiter/usbcondom) (http://www.usbcondoms.com/) (probably an earlier version but the same person: http://int3.cc/collections/frontpage/products/usbcondoms)

UmbrellaUSB: ~$12, available soon? More polished/finished looking than the USBCondom, got their information on voltages from the USBCondom folks (see comments in the Krebs article above). Working on fulfillment of their Kickstarter (funded July 3). (http://www.umbrellausb.com/)

ChargeDefense: ~$??, a "coming soon" page, a picture of a prototype, and maybe more in September. (http://www.chargedefense.com/)

LockedUSB: ~$20, available. More technical details available, more expensive and very blocky looking - expect it to block any adjacent ports. Technical information indicates that the single unit should work with both Apple and non-Apple devices (https://lockedusb.com/product/lockedusb-adapter-charger-fire...)

Practical Meter: ~$20, available. Protects ONLY when used with their optimized 3-in-1 charging cables otherwise passes data through. Provides a 5-bar indicator of current. (http://www.powerpractical.com/product/practical-meter) more details in their kickstarter (https://www.kickstarter.com/projects/david-toledo/the-practi...)

PortPilot: ~$60, not yet available. Much more expensive, MUCH more informative, switchable between data/no data. Includes a display showing possible and actual power draw, etc. Almost a development/diagnostic device. (https://hakshop.myshopify.com/products/portpilot)

At least 3 listed below via Amazon (2 in UK): PortaPow $7 (2 versions, www.amazon.com/gp/product/B00GC4AJOU, looks like a "beat you to market" device), and Pisen ~$1.70 (http://www.amazon.co.uk/dp/B00E8ALIYU and http://www.amazon.co.uk/dp/B00E8AJ41E).

flavor8 2 days ago 4 replies      
The board looks a little fragile. A tool like this (which is going to be used on the road) needs to be as solid as possible. For $10/unit it seems like they could afford to at least give it an epoxy surround.
lucb1e 2 days ago 5 replies      
Or you just cut two wires in a normal USB cable. No need to buy condoms!

I think the board is because some power sources might go "hey I'm leaking, there is no device but I draw power!" and cut it off, but I only ever heard about it and never encountered it. My USB ports nicely power fans without ever having a data connection to anything.

cnvogel 2 days ago 1 reply      
Or in software (Linux):

    # cd /sys/bus/usb/devices    # for n in usb* ; do echo 0 >$n/authorized_default ; done
...so that no drivers or userspace programs are allowed to communicate with any newly connected devices.


Of course this only prevents the USB host, you'd have to disable all USB-gadget daemons on your android phone to not have the charger tinker with the phones's data.

NOTE/added: I just realized that the main purpose this is marketed is to protect the phone's data. I'd me more worried about the computer if someone asks me to lend some juice...

ulfw 2 days ago 1 reply      
Or you could buy one of the charge-only USB cables I saw all over Asia. They are a bit cheaper than the normal data-carrying ones as they have fewer wires.
petercooper 2 days ago 3 replies      
Electronics people: why are there any components in this at all? If it's just about disconnecting certain pins, couldn't it just pass the power lines through and be half the size without a PCB at all? For example, it could easily be a cable missing two wires, right? (Note: I'm an idiot when it comes to electronics, so I'm genuinely interested.)
nly 2 days ago 6 replies      
What are the fundamental flaws in the USB protocol that make it insecure? I know firewire allows for DMA, but I didn't think USB, besides being a complex serial protocol, had any intrinsically unsafe features?
ColinWright 2 days ago 0 replies      
See also the extensive discussion from a year ago:


readerrrr 2 days ago 1 reply      
Looks like this is equivalent to a dedicated usb charger.

There should be an option to enable data transfer, currently you have to physically remove it.

I would love to have something like this, if it enabled my devices to be read only; some usb flash drives have a physical button to enable that.

djrogers 10 hours ago 0 replies      
I use a $10 usb 'lipstick' battery for the same thing - it charges itself and the phone, no data. Plus I get a free battery to charge my phone when there isn't an outlet available...
sirwolfgang 1 day ago 0 replies      
I feel someone should point out that the iPhone charger uses the data lines to basically ask for the available amperage, and charger faster if the charger is "iPhone compatible". So something like this will still work for iPhone but it will force it to charge much slower then it would otherwise.

> https://learn.adafruit.com/minty-boost/icharging

lazerwalker 2 days ago 2 replies      
It's worth noting that this is unnecessary for iOS devices, where plugging your device into an unknown USB port prompts you to either "trust" or "not trust" the computer in question (with "not trust" disabling data transfer).
mindslight 1 day ago 0 replies      
Mobile USB charging ports (as found in airports etc) are more of a gimmick than anything else. A shoddy one will easily damage your device, and if you're constantly plugging into different ones, that seems like just a matter of time. Plus, an unknown one will most likely just put out 500mA (slower charging), and USB A connectors aren't made for high insertion cycles so expect flaky connections. Plus you still have to carry the bulkiest part (the cable) so you still need kit.

I personally just carry a three way AC power splitter cube while traveling, which gives me enough ports for laptop+phone+whomever I ask to share with.

shimon 2 days ago 1 reply      
Seems like you can already get similar stuff elsewhere for cheaper and with a little plastic around the PCB:http://smile.amazon.com/PortaPow-Fast-Charge-Blackberry-Char...
sbierwagen 1 day ago 0 replies      
We resell something similar, from DFRobot: http://www.robotmesh.com/usb-power-detector

One of the ports has the data lines connected, the other port doesn't, so it could be used as a USB condom.

Springtime 1 day ago 0 replies      
Had hoped from the title the product would be a way to switch a USB drive from read/write to enforced read-only mode to protect from malware on unknown hosts. Would be a nice product in itself.
ufo 1 day ago 0 replies      
I wonder if it would be possible to use a similar system to make a usb hard disk read-only. This would make it easy to avoid malicious computers transferring pesky autoexec.inf files and things like that.
Sephr 1 day ago 0 replies      
I'd pay more for something like a "smart usb condom" which does allow data but only just for power negotiation, so that my devices can still negotiate for higher power when available.
nyar 1 day ago 0 replies      
If I can get a flash drive for $10 I should be able to get this for <$5. I'll wait until the novelty wears off and get it for $1 from china, on Ebay.
MAGZine 1 day ago 0 replies      
I can't help but wonder if we'll see USB condoms that help to protect against spying through EM/power draw changes, i.e. to spy on decryption activities.
guelo 1 day ago 0 replies      
If you're going to carry this around why not just carry a wall charger instead?
yoran 2 days ago 1 reply      
$10 is expensive for such simple electronics! I understand that the price of the first piece is the highest, but if this gets mass-produced I think the price can easily drop to something like $1.
srslack 2 days ago 0 replies      
Be sure to check out http://int3.cc/ Ridley's community project, and watch his talks if you haven't seen those.
dbbolton 1 day ago 0 replies      
Couldn't a person just cut the green and white wires in their charging cable if they were concerned about this?
geuis 1 day ago 0 replies      
Honestly the Wired quote is a much better summary and gets right to the point.

"Many public locations now offer USB charging stations, but it's a trivial task to modify one of these to allow an attacker to access your data. Int3.cc's device cuts off access to the data transfer pins on the USB port, while still permitting access to the power supply."

Way too many words on that page before just getting to the damned point.

classicsnoot 1 day ago 0 replies      
In terms of a protective cover/case, maybe there is a cheap, everyday item or container it would fit into nicely. I put pen springs around all of my cable heads.
tomphoolery 1 day ago 1 reply      
Oh...I thought this was a...um...

Never mind.

mayuro 2 days ago 1 reply      
Did no one else get that it's a joke?
Biologically extending human vision into the near-infrared: Initial success
227 points by irollboozers  3 days ago   60 comments top 14
JacobAldridge 3 days ago 1 reply      
Link to the original Project Page, if (like me) you're playing catch up on the experiment:


gus_massa 3 days ago 1 reply      
Copy of a comment I made in a previous submission, a few hour ago: https://news.ycombinator.com/item?id=8207152

Well, the data is very noisy. The main problem is that this data doesn't have a before/after comparison. Is the 850nm light visible now or it was always visible???

It's also very difficult to make a fair comparison. The room must be the same, the light sources must be the same (a new coffeepot with a small led can ruin the experiment, removing a coffeepot because it has recently broken can ruin the experiment).

For a preliminary experiment, the before-after comparison is enough. For a serious experiment you need many voluntaries, compare the before-after signals of them all at the same time in the same experimental conditions, and double blind testing.

There is a small possibility that they are measuring "excitement" instead of light. The subject hears that they are now going to test with very near infrared light. He got exited. They measure that. Perhaps the flash makes a slight sound, perhaps the light operator makes a slight sound. (Perhaps the 850nm flash makes a sound that the other flashes don't make?)

specialp 3 days ago 2 replies      
This could certainly be possible. Jay Neitz did experiments on monkeys to cure colorblindness using gene therapy and was successful. [1] He has said that perhaps one day humans can have genes for more color receptors added to be able to see more colors as some birds do.

1. http://www.neitzvision.com/content/genetherapy.html

leoc 3 days ago 3 replies      
diziet 3 days ago 1 reply      
I'd love to see the ERG readings for more experiments and before vs after at 950nm~
dedward 3 days ago 1 reply      
I seem to recall an article from some years back about someone using welding goggles with multiple layers of a specific blue filter on a very bright day and being able to see near-IR.. or something darn close to it.
qwerta 3 days ago 0 replies      
My astronomy friends are into hard-core start gazing. One experiment was in La Palma island with near-perfect night sky at 8 000 feet. One guy could see 8.1 magnitude stars at 80% cases (independent stats). With oxygen and some training he would probably get to 8.5 magnitudes.

There are similar stories with sound etc. I think some people can see near infrared, it is just question of finding them.

tdaltonc 3 days ago 0 replies      
When is the flash on and when is it off in these plot? What would these plots look like in a control subject?Does the subject have any other indication of when the flashes are occurring?

I know that this isn't written to be read critically, but I don't know what the take-away is.

sigil 3 days ago 4 replies      
What an interesting experiment. Could there be some basis, after all, to the urban legend that eating carrots improves night vision? Carotenes are "partly metabolized into Vitamin A" [1], but this experiment is skipping the precursors and going straight for what I assume are large and exclusive doses of Vitamin A. Can it really be that no one has tried this before?

Related and probably equally silly idea: I've always wanted a pair of sunglasses that could tune in to different EM spectra. How far are we from that? Night vision goggles are bulky because they need external power to do the frequency shifting, right?

[1] http://en.wikipedia.org/wiki/Carrot#Nutrition

tylermenezes 3 days ago 0 replies      
What's really cool is that this entire project was done for under $5k!
_greim_ 3 days ago 1 reply      
> near-infrared

So, still red then?

Garbledup 3 days ago 0 replies      
Through technological enhancement[1] or practice it seems that anyone can make an attempt at monitoring & responding too these frequencies.


TTPrograms 3 days ago 0 replies      
Those plots really need labels.
userbinator 3 days ago 0 replies      
This is particularly relevant given that there's been a recent trend of interest in thermal imaging cameras... of course, the range of those is in much longer wavelengths.
Serendipity When 2 people listen to the same song at the same time
225 points by gflandre  4 days ago   65 comments top 21
eatitraw 3 days ago 2 replies      
Warning: it starts playing music automatically. Be careful to adjust your volume so you don't bother anyone around you.
moskie 3 days ago 2 replies      
While this data is interesting enough on its own, the map animations are even cooler. The transitions from one location pair to the next are mesmerizing, and can provide some really cool perspectives of the globe. Great execution on that.
ZeroGravitas 3 days ago 2 replies      
ahnberg 3 days ago 1 reply      
Pro-tip: press space whenever you hear something you like and the song will continue playing, and you have a good chance to catch it. Also, clicking anywhere on the screen (while paused or not) takes you to the active song in Spotify.
billmalarky 3 days ago 0 replies      
Kyle McDonald has a lot of cool projects. Check out this one http://vimeo.com/29348533 using the open source Facetracker library (built by Jason Saragih and maintained by Kyle).

Pretty friendly guy, helped me out via email with some questions I had when I was playing around with facetracker.

paul9290 3 days ago 2 replies      
Cool, how about 2 or more people listening to the same audio in sync on their different Internet devices, Spotify?

Together creating a stereo system with friends & or those in the crowd around them.

Anyone else interested in such a feature?

iLoch 3 days ago 2 replies      
I'm finding the pause button doesn't react in time for me to catch the song most of the time. By the time I realize I like what I'm hearing it's already too late to pause it. An adjustment for time per song would be great.
shalmanese 3 days ago 2 replies      
Every song selected was in English. I'm not sure if this is because it's built so only English songs show up or because English has become the defacto global language for music.
cheshire137 3 days ago 0 replies      
Very annoying that it started playing music by itself.
aparadja 3 days ago 2 replies      
Based on a few minutes of observation, Ed Sheeran is the most popular artist in the world.

Is there any sophistication behind the sound clip selection? Just a certain static point in each song, or some kind of algorithm to get to a recognisable part?

PaulJulius 3 days ago 2 replies      
As the music started to play I reached to pause the music I already had playing, but then I realized that it was paused automatically by Spotify. That's a pretty cool feature that they have - very well integrated.
netvarun 3 days ago 1 reply      
Off-topic: Could the admins change the link to point to the final, redirected url - https://www.spotify.com/us/arts/serendipity/ ?

Anyways, fantastic execution! Great visualization. My only super-minor complaint is the fade in/fade out could be a little less abrupt when the songs change :)

owenversteeg 3 days ago 0 replies      
If you want to keep a track playing, just hit ctrl-page up to switch to another tab. It'll play for the track's full 30 seconds.

Or you can click the background to listen to it on play.spotify.com.

theworst 3 days ago 0 replies      
I've always thought this would be cool for e.g. a cross-country team, or friends running together, to have.

Imagine incorporating a PA system so a coach could talk to and track his athletes on all their training runs...

Trufa 3 days ago 0 replies      
A missing feature would be to be able to see a list of the songs that were played, I missed a couple of songs I'd want to listen a little bit more.
madaxe_again 3 days ago 0 replies      
I call this phenomenon "radio".
huuu 3 days ago 0 replies      
While listening to this it made me realize how much music is compressed nowadays. I think this is a bad trend.
Grue3 3 days ago 0 replies      
That's nothing, last.fm would show who is listening to the same song you are listening to right now.
cmstoken 3 days ago 1 reply      
Wow, what an awesome project. Would be cool to read how it was made.
ris 3 days ago 0 replies      
Jesus, people have an awful taste in music.
taeric 3 days ago 1 reply      
Neat and all.... but with the beauty of "radio" one could basically light up a crapton of folks in any given area all listening to the same song.

I remember back when I delivered pizzas, it was not uncommon for most of us drivers to all be humming the same song as we are getting stuff inside, since we all listened to the same stations.

If it was a really good song ending as I got back to the store, it was not uncommon to find that I waited it out in the parking lot along with at least two other drivers. :)

The Harvard Classics: Download All 51 Volumes as Free EBooks
234 points by yammesicka  3 days ago   47 comments top 15
themodelplumber 3 days ago 0 replies      
Beautiful. Thank you for the reminder that these books exist. I read some of these books years back, and I still treasure the experience. I had a terrible job that started at 6:30 a.m. where by some miracle people kept assigning me tasks that could be automated, so I was about a month ahead on all of my work. In the early mornings I would read from these books on a Dell Axim that was propped up above my keyboard, next to my propped-up reversed CD-ROM disc.

One book that's not part of the collection but that I would recommend to the people here on HN is "James Nasmyth, Engineer: An Autobiography": http://www.gutenberg.org/ebooks/476

Here's a bit from a "coding interview" that went well for him:

"I carefully unpacked my working model of the steam-engine at the carpenter's shop, and had it conveyed, together with my drawings, on a hand-cart to Mr. Maudslay's next morning at the appointed hour. I was allowed to place my work for his inspection in a room next his office and counting-house. I then called at his residence close by, where he kindly received me in his library. He asked me to wait until he and his partner, Joshua Field, had inspected my handiwork.

I waited anxiously. Twenty long minutes passed. At last he entered the room, and from a lively expression in his countenance I observed in a moment that the great object of my long cherished ambition had been attained! He expressed, in good round terms, his satisfaction at my practical ability as a workman engineer and mechanical draughtsman. Then, opening the door which led from his library into his beautiful private workshop, he said, "This is where I wish you to work, beside me, as my assistant workman. From what I have seen there is no need of an apprenticeship in your case."

He then proceeded to show me the collection of exquisite tools of all sorts with which his private workshop was stored. They mostly bore the impress of his own clearheadedness and common-sense. They were very simple, and quite free from mere traditional forms and arrangements. At the same time they were perfect for the special purposes for which they had been designed. The workshop was surrounded with cabinets and drawers, filled with evidences of the master's skill and industry. Every tool had a purpose. It had been invented for some special reason. Sometimes it struck the keynote, as it were, to many of the important contrivances which enable man to obtain a complete mastery over materials."

Anyway, a pretty fun, educational book for someone with that mindset.

devindotcom 3 days ago 2 replies      
Great to have these, but if you're interested in a classic, five minutes' research will save you a lot of pain. The wrong translation can put you off a book or author for life, and a bad edit, abridgement, or lack of notes can render a work incomprehensible or weak.

Just take a second to look up whether there are any modern translations that might be up your alley, or whether you prefer accuracy over readability, or what have you.

wtbob 3 days ago 4 replies      
> It was in 1909, the nadir of this milieu, before the advent of modernism and world war, that The Harvard Classics took shape.

I think he means zenith, not nadir. 1909 was the high point of human civilisation, before barbarism and ugliness took hold.

Also, not covering Freud, Nietzsche & Marx was no mistake: this is a collection of lessons to learn, not lessons to learn from.

scottcha 3 days ago 2 replies      
I've owned the entire collection including the Shelf Of Fiction. The main thing to consider is that for the works written originally in english or are hard to find these are good resources. For the works which have been translated there are usually much better translations available (and worth paying for).

Very glad to see these freely available though.

atmosx 3 days ago 0 replies      
There's also the Gutenberg project[1] which offers a huge variety of classics for free in (almost) every format.

[1] http://www.gutenberg.org/

LaSombra 3 days ago 1 reply      
Just wrote a dirty Ruby script to download them. https://gist.github.com/lasombra/a489f715985715663595

P.S.: This is my first Ruby script. I'm still learning it.

walterbell 3 days ago 0 replies      
Archive.org has many out-of-copyright books, but there is little support for discovery of "related books" or "all books in a multi-volume series". Sorting by download count within categories is a start, for example:

https://archive.org/search.php?query=mediatype%3A%22texts%22... will lead to The Cambridge History of ___ (geography or topic, e.g. Literature, India) and The Cambridge ___ History (time or topic, e.g. Ancient, Medieval, Natural). Each of these titles are several volumes, 500-1000 pages per volume, covering centuries of events from a British perspective.

German Classics, https://archive.org/search.php?query=subject%3A%22German%20l...

Eastern Classics, https://archive.org/search.php?query=subject%3A%22Oriental%2...

arethuza 3 days ago 0 replies      
As a Scot, I was pleasantly surprised to see Robert Burns on the list, but digging around it looks like Burns was a keen supporter of the American Revolution and even wrote a "A Toast for George Washington":


mynameishere 3 days ago 1 reply      
Well, that's one ghastly website you pointed to. I have a physical edition of the Harvard Classics, and it's mostly boring stuff and speeches and political documents that are sufficiently summarized in other contexts (history books, Bartlett's, etc). One book that is worth reading is this (free):


minopret 3 days ago 1 reply      
Whoever would like to improve that list at gutenberg.org can follow directions on the site to get access to edit it. I hope they will.

I was glad to see that some like that page. I was actually the one who grabbed that list of contents from Wikipedia, requested access to edit Project Gutenberg's "Bookshelves" wiki, and added the links there to the Project Gutenberg versions of many of the selections. It was fun and not hard.

ensignavenger 3 days ago 1 reply      
My wife and I recently purchased this entire set, excepting books 1 and 5, at our local library book sale. We are now looking for the missing volumes, so if anyone happens to have them laying around, and would like them to go to a good home, get in touch :)
shimshim 3 days ago 0 replies      
I've spent a few years searching these out for fun in second-hand shops and used book stores, avoiding online simply for the thrill of trying to find them on the street. This is fantastic that they are available for free download now!
Paul12345534 3 days ago 0 replies      
Once upon a time when I was first learning to program, I wrote a Python script to download them from bartleby.com and make them into nice CHM files :) some good stuff
ChuckMcM 3 days ago 1 reply      
And if there was ever a testament to why Copyright should expire for the public good, this is it.
garric 3 days ago 4 replies      
It's fine to read these for the literature and/or a peek into how earlier people saw their world, but beware of ideas whose underpinnings are still touted as fact - such as those from the Wealth of Nations. Adam Smith may have been among the intelligentsia of his time, but he made claims far outside of his expertise which have long since been shown to be fantastical imaginings. And if you've ever seen A Christmas Carol, you'll have passing familiarity with the debtor prisons and Irish potato famines justified by classical liberalism (economic theory, not to be confused with the popular modern term) which has today become neoliberalism (which contains justification for neoconservatism, so let's not get partisan about it) since about 1980 with Reagan in the USA, Thatcher in the UK, and Deng in China and isn't any better for reasons I won't currently go in to. (Crosby, Harvey)

For instance, Adam Smith argued that barter was an inefficient way to make transactions because it required a dual coincidence of wants by both parties. Nevermind that communities simply didn't function this way, instead giving what they had now in a system of credit rather than debt. This is one of many examples undermining Smith's ideas, so be careful if you decide to read such books. Unless your degree concerns historiography, your time would be much better spent elsewhere. (Graeber)

Smith is easy to debunk, but ideas contained within many classical novels provide popular justification for cultural imperialism. They're not so easy to address. (Said)

Deep Learning: An MIT Press book in preparation
209 points by mutor  1 day ago   37 comments top 10
nfoz 1 day ago 7 replies      
Why is "deep learning" so hype nowadays? They seem like just another AI tool that will be prone to over-fitting datasets and provide an analysis that is difficult to mathematically characterize and understand in a reliable way.

Not here to be cynical/negative -- they might be of great value, this is not my expertise. Can someone explain why deep learning articles are receiving attention rather than, say, Support Vector Machines / kernel-based methods of pattern analysis? Or other nonlinear analysis? Are they related?

bentoner 1 day ago 1 reply      
See also Michael Nielsen's book Neural Networks and Deep Learning


fizixer 11 hours ago 0 replies      
Question: Does anyone have updated information about Hinton's 'trillion parameter network' progress (http://deeplearning.net/2013/05/20/g-hinton-wants-to-train-n...) from almost a year and a half ago?

It's been quite a while and even Ng has demonstrated that a billion parameter setup could be built for $20k using commodity hardware (https://news.ycombinator.com/item?id=5896684).

I wonder what's happening at Google labs as of August 2014.

jbarrow 1 day ago 0 replies      
This looks like it has the potential to be a great resource! Not to mention it's coming out of one of the big name schools of deep learning (along with UToronto and Stanford).

I imagine, though, that anyone not well versed in college mathematics may have issues with the explanations. If you want a good introductory resource, but either haven't covered or have forgotten some of the math in this book, I would recommend one of two resources:

[1] MetaCademy: http://metacademy.org[2] Neural Networks and Deep Learning (In Progress): http://neuralnetworksanddeeplearning.com

The first will take you through all the math first through some online courses and textbooks, and the second is a good general purpose introduction that I recommend to anybody interested in neural nets.

discardorama 1 day ago 0 replies      
Sigh. The authors have taken a PDF and generated HTML out of it. I can understand the desire to maintain copyright, but this is ridiculous.
iandanforth 1 day ago 0 replies      
Hrm ... there has got to be a better format for soliciting edits. Github, Google Doc, ???
justin66 1 day ago 1 reply      
Pages look ok in Firefox, borderline unreadable in Chrome. I wonder what that's about.
vonnik 1 day ago 0 replies      
I hear O'Reilly's coming out with a book soon as well.
plg 1 day ago 0 replies      
this is great, I hope the authors keep a .pdf version available for dl once its done
gamesbrainiac 1 day ago 1 reply      
First it was data mining, then machine learning, and now deep learning. What's the next name? Clairvoyant learning?
Hard Science About Diet
200 points by yaddayadda  3 days ago   223 comments top 21
bollockitis 2 days ago 9 replies      
If you haven't read either of Taubes's books, please do. I highly recommend Why We Get Fat[1]. It's a spectacular piece of scientific journalism. If that's too much for you, try one of his talks on the same topic[2].

When I first encountered the idea that we do not get fat from eating too much and that calories weren't responsible, I thought it ludicrousthe body can't disobey the laws of physics! Thermodynamics! But after seriously thinking about the idea, I realized Taubes was providing a far more complete understanding of metabolism. The human body doesn't run on calories, it runs on food. Yes, we can easily learn the caloric content of food, but that's largely irrelevant. What's important is how food affects the body, not its raw energy content. I see this misconception time and time again, especially among smart people who like to reduce the human body to merely a physical machine, often ignoring the whole biology thing.

I think the hormone theory of obesity is correct and I think these studies will prove it. But even if they show otherwise, this type of research is long overdue and we all stand to benefit from the results.

[1]: http://www.amazon.com/Why-We-Get-Fat-About/dp/0307474259

[2]: http://youtu.be/ywRV3GH5io0

jrapdx3 2 days ago 2 replies      
After 150 comments have been made, maybe 6 people will stop to read this. But I feel compelled to contribute a bit of what I've learned about obesity.

I was the medical director of an obesity treatment clinic for 10 years, working with thousands of obese patients.

The most important lesson is that obesity is a disease, and each obese person has a different disease. Each case requires a unique treatment approach. "Cookie-cutter" methods won't cut it.

I'm convinced that obesity is the most complex disease the art and science of medicine has ever faced. I can't even begin to describe the mind-boggling complexity of the situation.

A minimalist outline: factor in participation of the endocrine system (insulin resistance, role of cortisol, thyroid, reproductive hormones), the immune system products promoting obesity, as well as adverse inflammatory effects of adiposity contributing to metabolic disarray, and the brain's functional role in metabolism involving highly intertwined connections of neuronal circuits regulating metabolism and sleep/circadian rhythms. And so I could go on for gigabytes on these subjects, even before citing the enormous list of references.

Short answer: all of these body systems (neural, endocrine, immune) are interactive. Think many:many relationship with "many"==trillions. Therein are the solutions to obesity. Small needles, huge haystack.

Short answer: all of these body systems (neural, endocrine, immune) are interactive. Think many:many relationship with "many"==trillions. Therein are the solutions to obesity. Small needle, huge haystack.

A few years ago it was mentioned at a conference that at the time over 250 human genes (and their peptide products) had been identified to play a role in obesity. Considering the multitude of known and potential gene/environment interactions, what simple "cause and effect" paradigm could we glean?

So yes, many obese patients respond favorably to low CHO, high N diets. Altering PUFA intake to approximate a 1:1 intake of N3 and N6 EFA in adequate amounts is warranted. Elimination of physiologically incompatible trans-fatty acids in the diet is absolutely necessary. Mono-unsaturated or saturated fats within calorie constraints are not usually an issue. Behavioral approaches are always indicated.

Just remember, each of us is different, our systems are inherently quirky, and tremendous variation is common. The above general rules are fine to start with, but be prepared, understand the "reality paradox": exceptions are the rule and not the exception.

geoffc 2 days ago 1 reply      
For me the answer is simple. If I eat 2500 calories a day of vegetables, nuts, meat, eggs and fruit I have trouble finishing it all. If I eat 2500 calories with grains and sugar included I'm starving at the end of the day and it takes every ounce of will power not to eat 3000 calories. It might well be calories in, calories out but what I eat makes it dramatically harder or easier to regulate the calories in.
dangerlibrary 2 days ago 2 replies      
Holy crap, talk about burying the lede.

There's a table at the bottom of the article that contains the tl;dr about the scientific studies referenced. All are still underway, there are no published results yet.

alainv 2 days ago 1 reply      
Fascinating that the core study the article focuses on is using strictly male subjects. I thought this had been a controversial approach[1] for quite some time now - yet they still claim the study's main goal is "doing it right."

[1]: http://well.blogs.nytimes.com/2010/06/30/phys-ed-what-exerci...

scotty79 2 days ago 1 reply      
I read some time ago that there are only three dietary advices for general population backed by science:

  1. Eat food.  2. Not too much.  3. Mostly plants.
I wonder if anything changed since then.

ajcarpy2005 2 days ago 0 replies      
The body likely has ways of losing weight that are faster than simply eating itself (burning fat)

Not all weight is fat

Metabolic efficiency varies, including by calorie type

Much of the chemical energy output in the body is involved in actually repairing or replacing, not only in expanding the volume of fat reserves or even muscle.

It's all a thermodynamically-limited bunch of processes but thermodynamics is a limit rather than a driver of energy transformations.

Calorie REDUCTIONS don't guarantee weight loss because obviously the body can choose to expend less energy. And if the term CALORIE DEFICIT is used, it is not justifiably used because science currently can't determine the necessary level of granularity since energy, weight, and measurable metabolic output/activity all change in response to factors other than the ones which are thermodynamically relevant, and this makes thermodynamic equations/measurement of human dieing problematic. Essentially the system is kind of a 'black box' and some of the relevant inputs and outputs in the thermodynamic equation are 'inside' that mathematical 'black-box.'

Edits for spelling

Oh and a slightly less vague explanation can be expounded onto the concept of energy transformation to explain why it wouldn't always correlate with a weight change...combining or dividing molecules.

What if your body doesn't have enough energy to go through the processes of burning a fuel source (or the necessarily mistake or vitamins, or other nutrients...)

Al-Khwarizmi 2 days ago 1 reply      
I have a hard time believing the new theories that fat is not that bad and sugar is the evil. I used to have a diet with plenty of beef and pork meat. Then I went to live for a couple of months in Singapore, and there I ate noodles. LOADS of them, because I loved them. The result was that I lost a lot of weight.

In my experience what gets me fat is meat, and what makes me lose weight is eating less meat and more pasta and rice. But I suppose it varies per person.

honhon 2 days ago 0 replies      
I don't believe its necessary for all the experiments to last that long. Its possible to have shorter more controlled experiments to gain insight to health benefits of particular diets.

For example...

A British group of volunteers were locked in a zoo and were allowed to eat up to 5 kilos of raw fruit and vegetables per day - but only raw fruit and vegetables.

"Nine volunteers, aged 36 to 49, took on the 12-day Evo Diet, consuming up to five kilos of raw fruit and veg a day."

"The prescribed menu was:

- safe to eat raw; - met adult human daily nutritional requirements; and - provided 2,300 calories - between the 2,000 recommended for women and 2,500 for men,"

"Overall, the cholesterol levels dropped 23%, an amount usually achieved only through anti-cholesterol drugs statins.

The group's average blood pressure fell from a level of 140/83 - almost hypertensive - to 122/76. Though it was not intended to be a weight loss diet, they dropped 4.4kg (9.7lbs), on average."


tokenadult 2 days ago 0 replies      
We need new rigorously controlled experimental studies to tease out the causation patterns suggested by correlations observed in observational studies of human diet. The way to test a causal hypothesis is always, at bottom, to do a controlled experiment.[1] So we will tease out the effects of diet on different people by finding experimental volunteers and subjecting the volunteers to controlled diets, such as those planned for some of the experiments described in this interesting article.

This is very difficult to do, as almost all human beings eat when they feel like eating WHAT they feel like eating. Earlier human experiments on effects of diet in the 1970s actually required the experiment subjects to live in the laboratory long-term, and to have every gram of everything they ate during the experiment measured exactly by experiment team assistants. Even at that, those experiments came up with few clear conclusions, perhaps because the experiments weren't lengthy enough or didn't include enough subjects for strong inferences. Now the experimenting begins again. Whether the currently hotly debated hypotheses about human diet win or lose, it's important to put the hypotheses to the test of a rigorous experimental study to advance human knowledge.

[1] http://escholarship.org/uc/item/6hb3k0nz

tim333 2 days ago 1 reply      
Two striking things about dieting. Firstly its a matter of calories in vs calories burnt. Stop eating and you'll lose weight so it's mostly down to your controls, conscious or unconscious. Secondly everyone starts at about 8 lbs at age 0 and ends up about 140lbs at age 18 give or take 50% and that's not down to conscious planning - the unconscious bits of the brain make kids hungry if they need food and to not eat and run around if they have too much. And the mechanisms are powerful - no kids remain at 20 lbs because they choose to. When adults get obese its seldom because they choose too but because the unconscious bit goes wonky. I think the US mostly due to sugary food and not much exercise. It's interesting if you look at the book 'French Women Don't Get Fat' that it's mostly a recipe book but her actual story was she went from France to the US for a year or so, hit the sugary snacks and piled on the pounds and then on her return her dad was horrified so she dropped the snacks and the weight went. So a mix of factors there.
scarygliders 2 days ago 0 replies      
Reading the comments so far, it's interesting how much people's ire gets raised on this topic.

Also, have a look at this, originally written/published, it seems, in 1958: http://www.ourcivilisation.com/fat/index.htm

Makes for a fascinating read, and it amazes me how close it gets to what's currently being put forward now (high fat low carb == good).

rayiner 2 days ago 0 replies      
I think modern food marketing should get more scrutiny here. Aside from the 24/7 food ads with Photoshopped hamburgers, there are the new, more caloric, more addictive products. Starbucks, for example, has replaced the traditional American coffee and donut with a latte and pastry combo that has twice as many calories or more. You can't sell low-calorie coffee with creamer and sugar (~50 cals) for as much as you can sell a latte (~200 cals).
clumsysmurf 2 days ago 2 replies      
"Gardner's study stems from his previous research, which suggests a diet's effectiveness may be due to how insulin-resistant the dieter is at the outset."

What if it also depends on the subject's microbiota, which would be impacted by a number of things including the (unwanted) consumption of residual antibiotics in meats.

Seems like the more we find out, the more questions there are.

visarga 2 days ago 1 reply      
What about calorie counting? I think the best way to lose some fat is to add up the sum of the calories of what you're eating, as the day goes by. In time, this will create an ability to know which foods are too rich and which are ok. Also, they allow management of appetite/hunger by allocating the rest of the calories for the rest of time. I personally found it much easier to eat on a budget of 1200 or 1400 calories a day than following a regime that forbids some kinds of foods or aims to make food less palatable. I lost 30 pounds that way and was able to keep my new weight in the following 5 years. I used an iPhone App for actual counting and calorie database lookups. Also, physical activities can be tracked and added up to the daily budget. If I walk for 2 hours, then I can have an extra meal, if I want to take it.

TL;DR Calorie counting makes for mindful eating and changes habits, without suffering.

mcguire 22 hours ago 0 replies      
Am I missing something? Is there any actual information in this article beyond

* Science in general and nutritional science specifically may or may not be sketchy (And this is news?),

* There are at least three ongoing, very interesting, apparently well-designed studies exploring the topic, with an emphasis on ongoing, and

* These three studies are the children of a researcher who lost weight when he changed his diet, an Enron billionaire, and Gary Taubes, a science journalist with a history of being very, very partisan. (No, really, go read Bad Science and then track down Polywater by Felix Franks---different scientific episodes, but with roughly similar hoo-ha involved; I'm talking about the style of the two discussions.

poolcircle 2 days ago 0 replies      
I firmly believe in the saying, "You get sick because of what's eating you and not being of what you are eating".
yaddayadda 3 days ago 0 replies      
>NuSI's starting assumption, in other words, is that bad science got us into the state of confusion and ignorance we're in. Now Taubes and Attia want to see if good science can get us out.

NuSI's approach to test long-standing food science assumptions.

dang 2 days ago 3 replies      
If anyone can find a sentence from the article that would make a more descriptive title, we can change it. This is one case where subtitles and the opening paragraph both fail us.
yarou 2 days ago 2 replies      
I think it's important to note that every individual is different. I'm surprised that gene therapy has not made any inroads into weight loss management and diabetes/hypertension prevention. In an ideal world, diet and exercise should be tailored to your genetic makeup, instead of the "one size fits all" brute force approach.
wdewind 2 days ago 7 replies      
This seems intellectually interesting to me but it's frustrating because I feel it takes what is a relatively simple issue and makes it needlessly complex. Yes, maybe there is some amount of optimization you can do with your diet, but the simple fact is that there is a not a single study in the history of science which has been able to demonstrate eating at a caloric deficit and gaining weight. Show me an obese person not eating significantly too much.

From the practical standpoint of actually trying to lose weight/get people to lose weight, the challenges in nutrition are almost entirely around compliance (how to ensure someone sticks with the program) rather than substance (what people put in their bodies). Most people know, within reasonable terms, how to eat healthily. It may not be the most optimal way possible (perhaps keto or some other diet is), but if we spent more time studying how to teach compliance I think we'd be making a lot more progress towards stopping obesity.

Earthquake early-warning system gave 10-second alert before Napa quake felt
218 points by damian2000  13 hours ago   87 comments top 17
rdl 13 hours ago 12 replies      
A few seconds warning seems like it might be kind of useless for humans, especially at 3am, but it would be cool to have this feed into automatic systems to automatically put them in a "safer" state before an earthquake hits. It might even be that 10 false positives a day are worth it to catch one real event, if the "safing" operation is relatively non-disruptive.
melling 13 hours ago 1 reply      
To be clear, the detectors in Napa felt the tremors then transmitted the data to Berkeley. They got a 10 second warning because the tremors travel much slower than the speed of light. Being 10 seconds away means the quake is much less intense. This is helpful, but what we need is a warning for people within a few seconds of the epicenter.
peter303 33 minutes ago 1 reply      
"QuakeFinder" is crowdsourcing earthquake warning system. It uses accelerometers in laptops, tablets, smartphones and special PC boards. The hypothesis is that tens of thousands of networked accelerometers with so-so signals may be useful for seismology, compared to few hundred professional seismometers drilled into bedrock. I saw some promising early studies, but lost track of the project.
oldspiceman 45 minutes ago 0 replies      
I was in an earthquake in Hiroshima a few months ago. When the shaking started I was really confused. If my phone was blaring "earthquake" it would have been helpful.

Also, the warning on my iPhone was in Japanese and it was impossible to copy and paste it into a translator it so it was useless.

ghshephard 10 hours ago 1 reply      
Back in 1999/2000 I had a friend in Castro Valley call me in the morning to ask me if I was feeling the earthquake - I said nope, and then 5 seconds later - it hit me in Sunnyvale.

That's another way of earthquake advance warning - taking advantage of the latency between the epicenter and the surrounding area.

largote 11 hours ago 1 reply      
Japan, Mexico City, and other seismically active places, have such systems in place and have had them for years. Amazing that California, the epicenter of tech, is just getting on board with this.
adalyac 3 hours ago 3 replies      
So... why is it (geologically) not possible to predict an earthquake earlier than 10 seconds? Anyone know of research trying to beat that?
helperdev 3 hours ago 0 replies      
10 seconds might be enough time to trigger a custom alert on iPhones and Droids with a specific alarm that an earthquake is imminent. Enough time to get under a table.
itazula 9 hours ago 0 replies      
10 seconds can be a lifesaver for someone doing construction on a high-rise building.
phreeza 5 hours ago 0 replies      
There should be a kaggle challenge for this, I would love to give that data a shot.
hnriot 11 hours ago 0 replies      
I couldn't find how I could get this. I got a txt from the USGS but that was after the event and because I set up twitter to txt me that account, does anyone know how to get these early warnings?

I woke up, but in SF it wasn't much of a big deal.

fmela 12 hours ago 0 replies      
Relevant xkcd: http://xkcd.com/723/
astrocat 12 hours ago 1 reply      

[edit] tough crowd...

byteCoder 12 hours ago 1 reply      
Of course, we never hear about all the times the system has given false positives.
bigiain 12 hours ago 1 reply      
"The system works because while earthquakes travel at the speed of sound ..."

That sounds like a somewhat misleading simplification or a complete misunderstanding.

Presumably "the speed of sound in the earth" and "the speed at which earthquakes travel" is by definition the same - earthquakes just being "sound vibrations" in the earth with macro level amplitudes. I'd be very surprised if that was particularly close to what people think of as "the speed of sound" (which I'd assume means "about 350m/s").

blunte 2 hours ago 0 replies      
This post is a nice reminder of the privacy issues (and how users should really consider what information they choose to give away).

Yes scientifically this is interesting. But it also means that we are willingly allowing ourselves to be tracked to great detail. You know they have internal reports or queries to show who has sex and when. Not that this is a big deal - we're human, and humans have sex. But it also can show who is having sex with whom, in some cases.

How long until Jawbone starts receiving court requests for this? (probably already happens).

Lego Calendar
202 points by greenburger  2 days ago   36 comments top 10
jacquesm 2 days ago 1 reply      
For a while LEGO had 'modulex' and 'plancopy', at least one segment of which was targeted at lego based planning boards.


gurvinder 2 days ago 3 replies      
You will soon get a cease and desist letter from Lawyers of Lego for using their trademark. I am telling from my experience.
00bemccurrachp 2 days ago 0 replies      
Love the idea, especially it's accessibility. This feels like it would be fast to manage physically, except for the take-photo-and-email component, which could be replaced by a webcam pointed at the board. Then there's also no technical friction fiddling on your phone.
knes 2 days ago 0 replies      
FYI, This was posted 11 months ago too.


jpetersonmn 2 days ago 1 reply      
Looks pretty cool. Few questions.

1) Do you have to give your calendar login to a 3rd party? 2) What happens I add something to my calendar on my computer, is there some alert sent to someone that they need to add a lego to the board?3) What I schedule something on the calendar online, but the lego doesn't get added to the board. When someone takes a picture and syncs it, what will happen to my appointment? Will it think it's gone and erase it? Notify of the descrepency, etc....

I'm envisioning in my head some arduino powered lego calendar that automatically puts the blocks in place as appointments are added/moved/deleted from the cloud.

yzzxy 2 days ago 1 reply      
Although the image recognition software is cool, it's almost surely cheaper to just set up Mechanical Turk HITs, compared to however many programmer-hours were spent on the image recognition.
zheshishei 2 days ago 1 reply      
Can the synchronizer differentiate between single block and double block heights?

Also, another cool level of granularity (if needed) could be using 1x2 or 1x1 lego blocks to add more information that's easily seen in the photo. Not only do you have different colors of 1x2 and 1x1 blocks, you can also place them in different positions (left/right vertically, top/bottom horizontally).

All in all, great idea. I'd like to set one of these up myself in the future.

teamonkey 2 days ago 2 replies      
Can anyone explain what hiding blocks in a drawer achieves? I can't work it out.
sygma 2 days ago 0 replies      
I posted this two months ago [0] glad to see it gained traction this time :)

[0]: https://news.ycombinator.com/item?id=7914768

corbett3000 2 days ago 0 replies      
This is so 2012.
Chromecast Rooted
197 points by CSDude  1 day ago   98 comments top 8
thibauts 1 day ago 2 replies      
One thing it may allow is grabbing the private key it uses for Device Authentication and emulate a Chromecast on other devices. It would enable streaming from Chrome to anything using the Chromecast protocol. See [1]. I had a go at implementing the protocol server-side on node, so it's basically waiting for a valid cert. I couldn't test it much though it should work. See [2] and [3]. Any help welcome.

[1] https://github.com/thibauts/node-castv2/issues/2

[2] https://github.com/thibauts/node-castv2

[3] https://github.com/thibauts/node-castv2/blob/master/lib/serv...

userbinator 1 day ago 2 replies      
exploited a new vulnerability in the Chromecast which allows root access

Normally, vulnerabilities would be considered a bad thing. Heartbleed is a great example of that. But in cases like these, it's a very good thing. This is why I always like to remind those whose goal is to build more secure systems to consider the implications of their work, lest our devices become even more secure against us. They usually have in mind a world where everyone has full control of their devices which are then highly secure against attacks by others, and that's a good thing; but I think it's far more likely to turn into one where corporations have all the control and devices are secure against their owners, especially as typical users continue to choose security over freedom.

err4nt 1 day ago 3 replies      
What would the capabilities of a rooted Chromecast be? I finally just got mine, and it's still new in box.
mcescalante 1 day ago 1 reply      
Does anybody know anything more than I about what this will enable (now)? Or is this just the first step of many in creating a hacker community around the Chromecast and software is to come? I've got one, and I'd love to make better use of it, or even help develop some stuff for it if it's that time :)
ftoma 1 day ago 5 replies      
Sorry for being stupid but what effect does this have on a regular chromecast?
darklajid 1 day ago 10 replies      
Anyone having a Chromecast and able to tell me what I'm missing? Currently I've got xbmc running on a Raspberry Pi. Connected via HDMI, online via wifi and I can stream more or less everything (videos, images, music) from my phone to that thing - not sure if there's a decent way to do that from my laptop running Linux.

What are Chromecasts used for? Should I buy one?

tuxidomasx 1 day ago 2 replies      
The biggest problem I've had with Chromecast was using it in a hotel that had wifi login pages.

The device is ideal for hotels since you usually get a nice HD TV in the room. But half the time I can't stream from Chromecast because of the wifi login.

A rooted Chromecast would essentially let me log in to the hotel wifi like I would on my laptop or phone. Then I can stream away.

kusuriya 1 day ago 4 replies      
35 dollars for an android device that can now be turned into an XBMC device with netflix.... I think I may give the chromecast a second swing...
Docker 1.2.0, with restart policies
187 points by julien421  2 days ago   67 comments top 10
shykes 2 days ago 6 replies      
Hi all, no World-changing features in this one, but we believe that over time, relentless incremental improvements can make a huge difference.

This week we are freezing all feature merges and focusing on refactoring, code cleanup and generally repaying as much technical debt as possible.

We are also considering a gradual slowdown of the release cadence (we currently cut a release every month), to give more time for QA. Even though we work hard to keep master releasable at all times and run every merge through the full test suite, in practice there can never be enough real-world testing before a release. An 8-week cycle (which is roughly what Linux does) would allow us to freeze the release 1-2 weeks in advance and do more aggressive QA.

waffle_ss 2 days ago 3 replies      
This is excellent news. The lack of a container restart policy was the main reason why I was spending a bunch of time learning CoreOS and fleet.

Trying to get CoreOS installed on VPS providers is a huge pain[0], and fleet and etcd are technically not labelled as production-ready (only CoreOS used as a base OS is)[1], so I'm really glad I can go back to vanilla Docker.

[0]: http://serverfault.com/a/620513/85897

[1]: https://coreos.com/blog/stable-release/

IanCal 2 days ago 1 reply      
I'm not sure about how I feel about this (edit - restart policies). It's cool, but seems to ignore what the OTP part of erlang development learned. They've already gone to "X number of restarts = failure" but with no time involved. There's also no hierarchy, which is where you really start to get the benefits.

While great, I worry that this is a part-solution that will delay the implementation of a proper one.

troym 2 days ago 3 replies      
Maybe a bit off-topic.

I haven't found a satisfactory solution to having communicating containers across multiple hosts. There seems to be quite a few solutions in the making (libswarm, geard, etc). How are other people solving this (in production, beyond two or three hosts)?

charford 2 days ago 3 replies      
Any update on when the OS X version will be available? I'm only seeing version 1.1.2 here:


jijojv 2 days ago 1 reply      
Writable `/etc/hosts`, `/etc/resolv.conf` is huge - no more local dns hacks.
antocv 2 days ago 2 replies      
Oh this is juuuust great. /sarcasm.

So now docker is taking on the work of what systemd and other daemon-managers are supposed to solve? Looking forward to docker run --restart on-failure ubuntu /bin/bash exit -1

When you include a --restart "feature" you know for sure you have don goofed.

But anyway, the rest of the stuff looks like pure candy. Great job!

frik 2 days ago 3 replies      
How to deal with persistent storage (e.g. databases) in Docker 1.2?

is this info up-to-date? http://stackoverflow.com/questions/18496940/how-to-deal-with...

abraham_s 2 days ago 0 replies      
Any idea when AWS Elastic BeanStalk will start supporting this version?
LunaSea 2 days ago 0 replies      
Is it possible yet to build and "RUN" multiple sublayers inside the same Dockerfile ?
RTFM 0day in iOS apps
181 points by algorithm_dk  3 days ago   57 comments top 24
dperfect 3 days ago 1 reply      
This is not the default behavior for a UIWebView. It relies on a practice that is very common among developers of iOS apps with web content.

Specifically: every click/interaction that loads content in your custom web view sends the webView:shouldStartLoadWithRequest:navigationType: message to your web view delegate. Without implementing that method, clicking a tel: link will prompt first. However, many apps throw some logic in there to detect any URI schemes that don't match the standard HTTP/HTTPS schemes used in normal websites, and trying to do something "nice" for the user, they handle requests for those URIs by calling:

[[UIApplication sharedApplication] openURL:request.URL];

This is a reasonable thing to do (outside the context of tel: links) because it allows the app to spawn an external app for custom URIs.

Therein lies the problem: not that UIWebView opens tel: links without prompting (it doesn't), but that many app developers are just trying to improve the inter-app experience, and unknowingly open tel: links directly with that openURL: method.

EDIT: Just my opinion, but I think it's actually pretty cool that Apple gives developers the ability to dial phone numbers without an extra prompt. It makes third-party contact/phone apps much more useful (imagine having to confirm every phone number to dial after tapping the contact in the built-in phone app). In a way, this is the kind of trust / freedom that iOS developers rarely enjoy without a fight. It's just unfortunate that in this instance, it also happens to be very easy to overlook this pitfall when implementing web view logic that handles non-http links.

tolmasky 3 days ago 1 reply      
Seems infinitely more reasonable to have the default be a prompt, and to have to explicitly enable "auto calling". People making a contacts app for example would immediately notice the prompt and rectify it. Meanwhile everyone else can remain blissfully ignorant of the tel: scheme.

On the other hand, with this system, every single app that ever uses a web view has to somehow magically divine that this could be an issue. The UIWebView docs certainly don't warn you about this. So what, is the expected behavior is that if you ever use a WebView in your app you should read every RFC on the planet in case there's some weird edge case like this? Maybe instead of creating systems that require careful developers we could try creating systems that work well by default and need you to explicitly turn on dangerous features like this.

wlesieutre 3 days ago 1 reply      
Strange design choice on Apple's part. Having not read the documentation, my expectation would be that native buttons don't require a confirmation, but links coming from a webview do. It would have to provide an option to suppress the popups in use-cases where the developer is building their app in a webview, but if you're already jumping through all of the hoops for that sort of cross platform development, one more configuration to set isn't a big deal.

I'd blame Apple just as much as the devs. They made a choice to be insecure by default in a situation when a majority of developers are going to assume it functions like the rest of the OS does. Web views in any app ought to behave like Safari by default.

DanBlake 3 days ago 1 reply      
I would think a more likely to be exploited use case would be to find the telephone number of celebs. Send the celebrity some specially crafted message on FB or twitter with a good mix of social engineering and you should be good to go (provided they are on their phone when they view your message)
lukeqsee 3 days ago 2 replies      
Why was this information immediately released/zero-day'ed? Is this method ignoring responsible disclosure or am I missing something?

FB, Google, and others all pay for bugs such as these, so even monetarily, it doesn't make sense to just release it to the public immediately. Again, this is assuming these bugs were not disclosed previously to companies affected.

edit: clarification

username 3 days ago 3 replies      
> When a user opens a URL with the tel scheme in a native app, iOS does not display an alert and initiates dialing without further prompting the user.

What is the justification for this behavior? Why should the web browser open a prompt but not other apps?

gepeto42 3 days ago 1 reply      
Hi guys,

I just did a talk during BSidesLV on the subject of URL Schemes and dangerous implementations.

For those who want all the details:


For those who want to skip explanations on how they work and see the bad examples, auto skipping about 10min:


One example that I have in there is Yo. Yo will automatically Yo someone on your behalf. So if an inline frame has yo://gepeto42 (basically), and you have Yo installed, I have just "de-anonymized" your Yo account as you browsed my website (or any page where I could inject that iframe). A good tip on where to find out about those is to buy Launch Center Pro and to extract the plist it has. This has info about hundreds of iOS apps and how their URL Schemes work.

Happy hunting.

sprkyco 3 days ago 1 reply      
Well done I myself enjoy reading RFC's, but have yet to create something as crafty as this. Good work! Does not work on Android 4.4.2 requires application selection and then brings you to dialpad.
yincrash 3 days ago 0 replies      
You're saying that it's the app developer's fault that they haven't read all of the iOS developer documentation before opening webpages in a web view (rather than just the web view documentation)? That seems ludicrous.
thom_nic 3 days ago 1 reply      
Reminds me of the auto-reset Android bug that utilized a tel: URI that auto-dialed: http://gizmodo.com/5946334/samsung-security-bug-can-wipe-out...
adam-f 2 days ago 0 replies      
Being a bit pedantic here, but shouldn't it be specified as a URI, "tel:0000" not a URL-ish "tel://0000" with 0000 as the authority?
Tloewald 3 days ago 0 replies      
I'd call this bad design on Apple's part -- they should require the application to explicitly define a custom handler or fall back to default (secure) behavior. Yes, it's documented, but I'd call it a design flaw.
michaelmcmillan 3 days ago 1 reply      
Undoubtedly a poor design choice, I appreciate that you bring some attention to it.

  Facetime calls are instant. Imagine you clicking a link, your phone calls my (attacker) account, I instantly pick it up and (yes) save all the frames. Now I know how your face looks like and maybe where you are. Hello pretty!  Yes, it works. I tried.
Can you please provide some evidence that this is practically possible? Last time I used Facetime it took quite some time before the connection was established.

fullpint 3 days ago 0 replies      
There was a talk at BSidesLV called IOS URL Schemes omg://http://bsideslv2014.sched.org/event/21c84fe90196be5a475f6b33...You'll probably want to watch this on Youtube: https://www.youtube.com/watch?v=rJroherlZVo
paulfwalsh 3 days ago 0 replies      
There are a lot more security threats. My startup's URL reputation lookup service is being integrated with one of the biggest app platforms to help developers build security into apps. There are so many security threats that come with the standard WebView - mostly because I'm confident Apple and Google didn't think about how they could be used today.
gepeto42 3 days ago 0 replies      
Chromium Bug Thread about this: https://code.google.com/p/chromium/issues/detail?id=329259

"In practice, the closest to 'malicious' use I've seen the redict-to-app-store-from-ad case"

orblivion 3 days ago 0 replies      
Yeah, I think I disagree with the author. Unless someone can think of a reason it should be like this, I think it's Apples' fault. If there's a reason to allow no-confirmation telephone or facetime initiation, they should make it an option on WebView.
algorithm_dk 3 days ago 0 replies      
Send it using the Facebook Messenger app or GMail app.The fault is in the apps not in the system.Your code is correct.
losingthefight 3 days ago 2 replies      
I completely disagree that Apple is not at fault here. It should always prompt, end of story. More importantly though is that the devs at FB, Google, etc, likely saw how it worked in mobile Safari and, wrongly, assumed it would work the same in a webview. Why have the inconsistency in an a tag?
raviborgaonkar 3 days ago 0 replies      
well Apple did not learn from their previous mistakes and from the Android related Tel+USSD issues - http://www.securityfocus.com/archive/1/504414/30/0/threaded http://www.osvdb.org/show/osvdb/85806 . But I did follow responsible disclosure procedure before going to public and informed Google, Samsung. I hope he did the same :/
alex2626 1 day ago 0 replies      
exist any solution to send URL with command "Send iMessage "text" to "user" ?! automaticly without tap to "send" ???
S_A_P 3 days ago 1 reply      
this may be off topic, but I don't recognize some of the UI elements(battery life, signal strengh, etc) in his screen shots, and I can only assume that is an iOS8 beta. Isn't he breaking his NDA by showing off an unreleased OS? Security hole or not?
lsv1 2 days ago 0 replies      
I tried this but was unable to reproduce it.
api 3 days ago 1 reply      
I disagree that it's not Apple's fault. This is a violation of the "principle of least surprise." When I drop a web view into my app I am not expecting web pages to be able to do much other than just be web pages. I'm certainly not expecting them to be able to dial the phone without prompting.
6.0 Northern California earthquake
169 points by cpg  1 day ago   187 comments top 30
floatingatoll 1 day ago 1 reply      
Please take a moment to fill out the USGS "I felt it" form:


Especially if you don't live in the Bay Area, since they'll want to know the falloff curves for it.

(You can fill out the form even if you didn't feel it. They need that data too.)

ridgeguy 1 day ago 3 replies      
I'm curious about possible coupling between the ongoing drought in the western US and seismic activity.

There is published work indicating correlations between rainfall and seismicity (1) and rainfall and volcanic activity (2). There's other work relating seismicity to fracking, filling the Oroville reservoir, etc.

A study (3) this week indicated a median land uplift of 4mm ranging up to 15mm uplift in some California mountains due to a mass deficit of 240Gt of missing rainfall since 2013.

I wonder if the drought-related uplift could alter underground strain patterns enough to influence earthquake frequencies or magnitudes? Any geophysicists wanna weigh in?

(1) http://www.geophysik.uni-muenchen.de/~igel/PDF/hainzletal_gr...(2) http://envam1.env.uea.ac.uk/matthewsetal2009.pdf(3) http://www.sciencemag.org/content/early/2014/08/20/science.1...

te_chris 1 day ago 3 replies      
There's nothing quite like an earthquake to make you feel mortal.

Growing up in Wellington NZ we were always taught to expect and prepare for the 'big one', it was just part of life. Sometimes they completely come out of nowhere though, hitting places that are unprepared and often unaware that they are susceptible to seismic risk. This happened in Christchurch NZ in 2011 [1]. I'm not sure about the Valley, but there is nothing scarier than a new fault opening up.

[1] https://en.wikipedia.org/wiki/2011_Christchurch_earthquake

monochr 1 day ago 22 replies      
And this shows us why it is a bad idea to have a large portion of the worlds digital infrastructure in a place which will destroy it sometime in the next century.

Put it in the middle of the Australian outback, nothing's happened there for a billion years, nearly literally.

To the people down voting me: please explain why you think it's a good idea to put our digital infrastructure in a place which might well be destroyed in an afternoon when it can be put quite literally anywhere.

michaelq 22 hours ago 0 replies      
According to my wife, she woke me up and kept shouting "earthquake!" I was rolling around on the bed. I just grabbed her pillow, covered my head and muttered, "OK. Let's go back to sleep".
junto 20 hours ago 1 reply      
Out of interest, does anyone know what kind of disaster recovery plans big IT companies in Silicon Valley have if a really big one happens? The kind of earthquake where they lose both key staff members and core infrastructure?
batuhanicoz 1 day ago 0 replies      
Earthquakes really do scare me.

They are expecting a huge earthquake in my city and a recent analysis I read said if it happens (and happens in the magnitudes they are expecting) millions would die (not from the quake itself, but from not being able to get help, cold etc.). I believe in a case like that entire economy (and everything, really) of the country would fall irrecoverably for at least a 50 years.

Well, if it happens in the night, at least I won't be alive to see the effects of it. (My apartment is old and I live very near to the sea, so there is also the risk of tsunamis. YAY!)

locomojo 1 day ago 0 replies      
Title should say "Wine Country" or "North Bay". Silicon Valley was not the center.
camillomiller 1 day ago 4 replies      
Is the Valley ready for bigger earthquakes? Serious question
kenrikm 1 day ago 0 replies      
Indeed, woke me and my family up. Only lasted a few seconds and was a big side to side movement but very gentle rocking motion overall.
russell 21 hours ago 0 replies      
I lived through the Loma Prieta earthquake 6.9 and the San Simeon earthquake 6.5. Both times my house was about a dozen miles from the epicenter. We suffered no damage at all, not even things falling off the shelves. At the time of the Loma Prieta earthquake we lived in a forest of 100 foot pine trees. The ground and streets were covered with the tips of the branches of the pine trees.

The moral of the story is, if you are going to live in earthquake country, live in a well constructed wooden house on top of a mountain, or at least solid rock.

kmfrk 1 day ago 1 reply      
You can read about the implications of a harder Cascadian earthquake on SF here: http://crew.org/products-programs/cascadia-subduction-zone-e....
sgarrity 1 day ago 1 reply      
This was the Earth's crusts doing a 'pivot'. Probably quite disruptive.
k-mcgrady 1 day ago 3 replies      
This is a silly question but as someone who lives in a place that will never experience an earthquake can someone explain to me why they are so dangerous? I get that things can fall over/collapse but in areas such as CA aren't buildings structured to survive an earthquake? Don't you secure large objects (cabinets etc.) to the walls?
ryan-c 1 day ago 0 replies      
Welp, I'm sure glad that I actually bothered to anchor all my cabinets/shelves to the walls right now.
quattrofan 1 day ago 1 reply      
As I understand it the most dangerous fault in the area is the Hayward-Rogers which is historically due for a major quake. So the question is did this quake add or release pressure on that fault as it sits around 7 miles away (the epicenter).
suyash 1 day ago 3 replies      
Sad Truth: No local channel has woken up to it, only 1 Breaking news banner in KPIX Channel 5 but others are busy playing late night informercials. How do people using no HN, twitter, facebook etc get updates?
stretchwithme 1 day ago 0 replies      
Definitely felt it. Thousands of people without power in the North Bay:


gtremper 16 hours ago 0 replies      
I think I slept though it this morning. I always seems to miss earthquakes.
zbowling 1 day ago 0 replies      
At iOSDevCamp working on a hack in San Jose. Turned my coworker and said "Huh. That's a weird vibration."
shurcooL 1 day ago 3 replies      
Curious what the experience was like for anyone living on a high floor of a tall apartment building in SF, like nema.
Mc_Big_G 1 day ago 1 reply      
It didn't feel big North of Berkeley but it seemed longer than others I've experienced
suyash 1 day ago 1 reply      
Just woke up to it in city, felt a strong termor. Hope no Tsunami follows
wozniacki 1 day ago 1 reply      
Probability Report by the Northern California Seismic System (NCSS) [Operated by UC Berkeley and USGS]


bayesianhorse 1 day ago 0 replies      
Talk about disruptive events!
rbanffy 1 day ago 1 reply      
Could this hav been triggered by the drought? Just a couple days back it was mentioned the loss of groundwater has made the crust rise a couple inches.
wgo5 1 day ago 1 reply      
What is going on with all this geologic activity?? SESH!! first iceland, then chile, and now the bay area?? This has gotten me a little shaken up, I won't lie.

Hope everyone is okay. Be sure to have an evacuation plan with your significant others and expect aftershocks.

esmeralda9472 1 day ago 1 reply      
I felt it I was awake listening to music on my phone and I felt my bed shaking and I paused then looked at my baby's crib and it was moving side to side since we have tile floor it made the crib literally move and our bed was moving the key hanger were the keys are hanging were moving hard hitting against the wall I've never felt anything before like that this was my first time feeling this and it sucked a lot because I was the only one awake at home my husband and baby were asleep
prezjordan 1 day ago 1 reply      
Felt it here in lower Nob Hill! Lying half asleep wondering why my blinds were clacking against each other, then felt the entire room start to shake, very surreal.

I actually got up and walked around this time. Last time I felt an earth quake was 3 years ago in NJ and that was super weird.

Feeling a little spoiled with these Earthquakes! Only moved here a few weeks ago.

Judge Sentenced to 28 Years for Selling Kids to the Prison System (2013)
168 points by emhart  1 hour ago   79 comments top 23
jacquesm 57 minutes ago 6 replies      
What really really bugs me about this case is how little money he got. I mean, come on. Judges earn a pretty good living, this guy sold his soul and thousands of real people for a bit over a million. Incredible. I can see how some people might be tempted to do something as bad as this for 100's of millions (they obviously still should not do it, it is just as bad in every other way). But a mere million dollars for the lives of thousands of people? That makes a human life worth < $1000 per head to this judge.

I have similar feelings about how cheap politicians are to bribe.

spacefight 52 minutes ago 2 replies      
There must be monentary incentives somewhere else too, otherwise the US wouldn't lead the world on the list of imprisoned population: http://en.wikipedia.org/wiki/List_of_countries_by_incarcerat... juveniles not in the list
buf 26 minutes ago 3 replies      
I am disgusted at how little time he got.

He knows the full extent of what he is doing, as he is a judge. As a person who has seen what prison can do to a person, I feel this is unjust.

spacefight 45 minutes ago 1 reply      
I wouldn't be surprised, if this judge is just the tip of a very large big and still floating iceberg.
petilon 14 minutes ago 0 replies      
The real scandal here is the privatization of the prison system. Had the prison not been a for-profit corporation this kind of thing would not have happened.

This story shows that some things should not be privatized. Some people (Rand Paul) believe the Iraq war would not have happened had the US government not relied on for-profit corporations (Halliburton) for war-related contracts. See: http://www.washingtonpost.com/blogs/post-politics/wp/2014/04...

billmalarky 14 minutes ago 0 replies      
I remember this guy. I'll never forget this short video that came out during the case. It does a really good job of portraying just how despicable this man's actions were.


marcinx27 16 minutes ago 0 replies      
I'm from the area that was under Ciavarella. I remember being in middle school and having him say in an assembly "If you get in a fight, you're coming to me and you're going away. Miss too much school, you're coming to see me and you're going away."
patrickg 54 minutes ago 6 replies      
I am always astonished (not in the positive meaning) by the length of theses sentences. The maximum sentence in Germany is 15 years (except for a life long sentence for murder, which could be longer).

(disclaimer: I am a volunteer/part time judge)


I'd like to add that I will not comment in public whether I think the sentence is appropriate or not, as I don't ever want anybody in a trial to accuse me of a biased opinion, although I highly doubt that anyone of "my" indicted people will ever read HN.

forca 16 minutes ago 2 replies      
He should have gotten the death penalty or at the very least life in prison with mandatory chain gang labour for all the lives of children he ruined. I often wish the west would drop their squeamish attitude towards real punishment and actually start caning for minor offenses, and for capitol crimes, hanging. Singapore and some middle east states have it right. Punish harshly and quickly. Let's stop all of this unlimited appeals crap. If the person can be proven guilty beyond a shadow of a doubt, be quick to punish, not let it drag on.

I admire China for their swift execution of the criminals who were involved with the bombing. The west would still be hand wringing.

architek1 42 minutes ago 0 replies      
Original article from Reuter's in Aug 11, 2011.http://www.reuters.com/article/2011/08/11/us-crime-kidsforca...
devalnor 10 minutes ago 0 replies      
I can only suggest you to watch the PrisonValley documentary (2009) about the prison industry.


Fastidious 56 minutes ago 1 reply      
It should be noted that this is a year old news.
slowmotiony 54 minutes ago 0 replies      
What kind of a website is this? A couple of lines for an article, no sources and some shitty "how to get benefits" ads on the sidebar? Come on now.
cyanbane 30 minutes ago 0 replies      
Is there an aggregate source for sentencing data per state? I understand sentencing varies per judge and in accordance with state laws, but you would think this data exists at the state level and abnormalities (like this judges history?) might bubble up.
lasermike026 31 minutes ago 0 replies      
This is a decent sentence. I hope it sticks. I suspect there is more of this kind of the thing in the courts. The entire police, prison, and court systems needs to be disinfected. Reorganize the whole thing.
cmdrfred 55 minutes ago 0 replies      
If you think the current state of affairs in America isn't a problem you simply need to look to the above article. Disgraceful, hopefully he dies in prison.
thomasvendetta 51 minutes ago 1 reply      
His sentence should have been longer, but why are we giving this guy any more time of our day? This happened last year.
owenjones 55 minutes ago 0 replies      
I'm not a really vindictive person, but I'm so glad this guy is going to jail; hopefully for the rest of his life.
ddoolin 54 minutes ago 1 reply      
I'm shocked but also feel like I've seen something like this happening before, or at least some source speculating on it's possibility. Is there a precedent for this kind of corruption in the U.S? Elsewhere?
_pius 56 minutes ago 3 replies      
Should have been life.
colinbartlett 15 minutes ago 0 replies      
Can a mod please add "2013" to the end of this? It's pretty old news.
JoeAltmaier 47 minutes ago 0 replies      
That article is hardly informative. What did he do wrong? Sentence juveniles solely to a single contracted prison? So were his decisions actually compromised? Or was it just the kickbacks that are at issue.

There's a sad state of affairs on the internet, where a couple of paragraphs of slanted commentary are called an 'article'.

Project Gitenberg
172 points by mdturnerphys  2 days ago   70 comments top 15
transfire 2 days ago 3 replies      
The idea has a lot of merit. So for that two thumbs up. But I would much rather see a separate website for it. Using Github feels very strained. Perhaps Github would be willing to help set you up with your own instance of their platform which you could modify to better suit the purpose. Maybe even Project Gutenberg would be interested in participating in that.

BTW, I recently learned the Gutenberg was not his name and is really a significant historical inaccuracy. His name was Hannes Gensfleisch. "Gutenberg" was just one of the places his family resided.

DavidAdams 2 days ago 2 replies      
My biggest question is this: did the idea for this originate with the pun, or did they think up the great pun afterward?
prosody 2 days ago 3 replies      
What advantage does this offer over Project Gutenberg's own Distributed Proofreaders[1]?

[1] http://pgdp.net

ldng 2 days ago 4 replies      
That's a great step. I was toying with a related idea last week actually. To me the next great step would be to great around that a framework/tools to help translation of of those ebooks.

What often happens is that editors have one translation of a book, say Les Misrable, and keep reprinting the same translation independently of the quality. So I was thinking that a github like platform to foster translation would be a great idea. Looks like gitenberg might by the project just for that.

But maybe it should pick a clone (gitlab ?), self host and fork/extend that tool to ease the use so that non-developer could use the site without git knowledge. Then again, tailorisation for translation might not be needed.

kbar13 2 days ago 5 replies      
One thing I would like to see out of this project is a better version control system for prose. Git is great for code, but it's not at all any good for editing text.
chrisballinger 2 days ago 1 reply      
Congrats Seth! I had to unfollow you while you were making all those repos because it clogged my feed.

GitHub should really put some work into improving their feed algorithm so one project can't just clog it all.

FesterCluck 2 days ago 2 replies      
Has any consideration been given to works which may start in this platform? My wife is an aspiring author, and we'd like more information. I'm sure there are many topics to cover, and we're interested in hearing all of them. However, I specifically wonder about the adoption of open source licensing to such works.


dredmorbius 2 days ago 2 replies      
Nice, but NB that page is REALLY hard to read.

    body {        color: black;        font-weight: normal;        font-family: verdana;    }
Helps a lot from my experience.

alessiosantocs 2 days ago 0 replies      
I really love the idea behind this! I think it's a way to disrupt the books industry with all those editor firms. What's powerful about this is that every person could be listened and her book could easily spread around the globe.

I found https://www.penflip.com/ a few months ago... It isn't focused on building a digital library yet but what I like of this project is the good execution. It would be nice to merge them together!

lucb1e 2 days ago 0 replies      
For anyone else who finds the font too thin and light to comfortably read, this helps: https://readability.com/bookmarklets
ryanackley 2 days ago 3 replies      
I like the idea of git for ebooks. That being said, a lot of the free books available from project gutenberg have been around for quite some time.

Besides translations, what can people besides the author contribute? Doesn't it, on some level, ruin the character of these books? If you look at a non-fiction book from 80 years ago, is it worth bothering to correct the information when you can probably find it at your fingertips on wikipedia?

sethish 1 day ago 0 replies      
If folks are interested in contributing, the mailing list is here: https://groups.google.com/forum/#!forum/gitenberg-project
gluejar 1 day ago 0 replies      
One obvious need is for a build system that makes ebook files out of the git-managed source. And what should our source be, anyway?
fiatjaf 2 days ago 1 reply      
Why don't you add some kind of index/search?
Taylorious 2 days ago 6 replies      
I don't understand the weird obsession with Git. Its a version control system not the cure for cancer. Anytime someone shoe-horns it into a product they talk about how Git is so amazing and solves all these problems, but what they are really talking about is just a version control system, not Git specifically.

Using Git for just about anything other than what it was built for is a terrible idea. I mean the underlying system is incredibly powerful and could be useful in various projects, but the interface is horrific. I swear its like someone tried to make Git as difficult as possible to use. Programmers have a hard time understanding and using Git, non-programmers will just laugh and walk away. Every time a programmer has an issue with Git, whoever helps them has to sit down and explain the underlying system for 20 minutes and draw a bunch of sticks and bubbles. Non-programmers will never put up with this.

Revenge of the Types
160 points by rwosync  19 hours ago   95 comments top 19
ak217 12 hours ago 4 replies      
Of all Armin's articles to date, this one I agree the most with.

> Python is a language that suffers from not having a language specification ... There are so many quirks and odd little behaviors that the only thing a language specification would ever produce, is a textual description of the CPython interpreter... Keeping a language lean and well defined seems to be very much worth the troubles. Future language designers definitely should not make the mistake that PHP, Python and Ruby did, where the language's behavior ends up being "whatever the interpreter does".

This is an incredibly important point. The rise of PyPy is just one compelling illustration of how Python is at a point where a language specification is needed, and these crazy CPython-specific bugs need to be purged.

> I think for Python this is very unlikely to ever change at this point, because the time and work required to clean up language and interpreter outweighs the benefits.

I would disagree - I think it's possible for Python to change this. Any such bizarre behaviors need to be treated as a bug, and eliminated in the next release.

gordaco 14 hours ago 2 replies      
"Because there is basically no type system that fights against you, you are unrestricted in what you can do, which allows you to implement very nice APIs."

If you feel like the type system fights against you, chances are that you are doing something wrong. When I program, the type system definitely fights for me. It gives me a lot of guarantees, plus it's a really convenient way of self-documentation. I mean, I'm not even talking about Haskell or something really sophisticated: I see the advantages even in old plain Java or C++ (so much that, in fact, most of my gripes about Java are about its type system not being complex enough).

Also, being "unrestricted" is far from being an universally good thing, since it also means many more opportunities for mistakes. I know for a fact that I make more mistakes in languages without static typing, but well, I guess it's just me.

Cyther606 12 hours ago 1 reply      
I've been using Nimrod to replace Python on a Bitcoin project.

elliptic.nim: https://github.com/def-/bigints/blob/master/examples/ellipti...

elliptic.py: https://github.com/wobine/blackboard101/blob/master/Elliptic...

Nimrod looks and feels like python, but it compiles to C. It's like C except with Pythonic syntax and with Boehm GC optional. In addition, Nimrod has a burgeoning NPM-like module ecosystem developing, albeit in the early stages.

    import rdstdin, strutils        let      time24 = readLineFromStdin("Enter a 24-hour time: ").split(':').map(parseInt)      hours24 = time24[0]      minutes24 = time24[1]      flights: array[8, tuple[since: int,                              depart: string,                              arrive: string]] = [(480, "8:00 a.m.", "10:16 a.m."),                                                  (583, "9:43 a.m.", "11:52 a.m."),                                                  (679, "11:19 a.m.", "1:31 p.m."),                                                  (767, "12:47 p.m.", "3:00 p.m."),                                                  (840, "2:00 p.m.", "4:08 p.m."),                                                  (945, "3:45 p.m.", "5:55 p.m."),                                                  (1140, "7:00 p.m.", "9:20 p.m."),                                                  (1305, "9:45 p.m.", "11:58 p.m.")]        proc minutesSinceMidnight(hours: int = hours24, minutes: int = minutes24): int =      hours * 60 + minutes        proc cmpFlights(m = minutesSinceMidnight()): seq[int] =      result = newSeq[int](flights.len)      for i in 0 .. <flights.len:        result[i] = abs(m - flights[i].since)        proc getClosest(): int =      for k,v in cmpFlights():        if v == cmpFlights().min: return k        echo "Closest departure time is ", flights[getClosest()].depart,      ", arriving at ", flights[getClosest()].arrive

bjourne 17 hours ago 3 replies      
Armin didn't address what I belive is the main point of adding type annotations to Python: compiler checkable documentation and as hints to IDE:s. Seen in that perspective, a sucky type system is good enough because it's use isn't to verify program correctness. Personally, I think a standardized format for describing types in docstrings would be 100x better but that's not the way the Python core devs have choosen.

Another argument in favor of types is that it will enable Python to optimize code better. But since Python isn't built for static typing, the CPython bytecode interpreter has no facilities for exploiting the extra information. And even if it had, the V8 Javascript VM proves that you dont need static types to generate optimized code.

cygx 43 minutes ago 0 replies      
I find it interesting that this is exactly what Perl6 tried to handle gracefully, both on the technical side (a type system that supports both static and dynamic typing) as well as on the practical side (a re-implementation from scratch with some measure of interoperability).

However, they did not set out to just design the next version of Perl, but the last version, reasoning that if you have proper extension mechanism in place, you won't have to do a reboot ever again.

This resulted in gradual typing (which sometimes needs to fall-back to runtime checks), a pluggable syntax with extensible grammar, a flexible meta-object protocol, default numeric types that are objects (rationals or bigints), lazy list, reified language construct (variables as container objects) and other stuff that makes a straight-forward implementation horribly slow.

pixelmonkey 18 hours ago 1 reply      
Some people may not understand the context of this part:

    So not long ago someone apparently convinced     someone else at a conference that static typing    is awesome and should be a language feature. I'm     not exactly sure how that discussion went but the    end result was that mypy's type module in combination    with Python 3's annotation syntax were declared to be    the gold standard of typing in Python.
Ronacher is referring to the fact that Guido van Rossum, the Python language creator and BDFL, recently said he wanted to make mypy's type annotation standard into a standard by making use of Python 3 function annotations.

The original function annotations standard is PEP-3107[1], GvR's proposal is on the python-ideas list[2], and information on mypy can be found at the project's site[3].

I agree with Ronacher's conclusion; I don't think static types -- even if only used at runtime -- are a good fit for the language. As for function annotation syntax, I think we just need to admit that isn't really good for anything.

Great article!

[1]: http://legacy.python.org/dev/peps/pep-3107/

[2]: https://mail.python.org/pipermail/python-ideas/2014-August/0...

[3]: http://www.mypy-lang.org/

aikah 13 hours ago 4 replies      
We live in that wonderfull time in development,where a lot of things are questioned.A lot of languages that used to rule everywhere are questioned,like the OP,and devs try to come up with the ultimate language that would solve every use case.

There is,of course, no such a language but future languages wether they are dynamic or static ,strong or weak (type wise) will certainly not make the same mistake as their ancestors.

Personally I want a scripting language,with type inference but real strong static typing, that can be easily interfaced with C++, that handles concurrency the right way(ie not like javascript callbacks),that is trully multipurpose(like python) elegant(a bit like ruby), 00 with composition and strong encapsulation in mind and access modifiers, with immutable structures and variables by default but not limited to it,with some functional features without looking like Haskell,resonably fast for GUI dev,scientif computation and non trivial web apps,easy to deploy on a server, with sane error handling,IO streams everywhere, a clear syntax(no unreachable characters on non english keyboards everywhere),with a good package manager, an interactive repl(like IPython or the tool for swift,I forgot the name) and with battery included.

So we are definetly living in an exciting period.

pjungwir 17 hours ago 14 replies      
Random question for the type experts out there: is there any language that lets me track the units of my numeric variables? For instance, something like this:

    float<km> drop(float<m> x0, float<s> duration) {      float<m> x = x0;      float<s> t = 0;      float<m/s> v = 0;      float<m/s^2> g = -10;      float<s> dt = 0.01;      while (t < duration) {        v += g*dt;        x += v*dt;        t += dt;      }      return x * (1<km>/1000<m>);  // abbrev for a cast: (float<km/m>).001    }
Then I want the compiler to check that I'm not mixing up my units. It seems like this would be really useful, but I've never seen it before.

tiffanyh 2 hours ago 0 replies      

The more I read Armin's posts, the more I believe he should switch to Lua. It has all the core features he wants:

- simple design

- fast

- consistent behavior

In addition to what's mentioned above, LuaJIT is a marvelously designed JIT (please donate to the project [1]. Let's keep allowing Mike Pall to have a livelihood)

[1] http://luajit.org/sponsors.html

tosh 15 hours ago 0 replies      
If you want to learn more about how 'optional' and 'unsound' type systems can still deliver a lot of value there are some interesting articles on Dart's optional types:

* http://journal.stuffwithstuff.com/2011/10/21/wrapping-my-hea...

* https://www.dartlang.org/articles/why-dart-types/

* https://www.dartlang.org/articles/optional-types/

arthurdenture 17 hours ago 0 replies      
The argument seems to be that if the added type system is not perfect, then it will be useless. For a working counterexample, see the Closure Compiler (https://github.com/google/closure-compiler), which adds a bolt-on, underspecified, occasionally-changing type system to Javascript. Similarly to GvR's proposal (https://mail.python.org/pipermail/python-ideas/2014-August/0...), the types are only ever checked at compile time: there's no attempt to use them as runtime assertions and very limited attempts to use them for compile-time improvements. So, yes, because they are imperfect and optional, you don't catch every type error, and you need to add type hints / casts that in a perfect system wouldn't be necessary.

Is this kind of flawed type system worth it? Hell yes. I've maintained large programs in both Python and (closure-compiled) Javascript, and with the former I've wished I had the help of the limited type checking available in the latter.

ivoras 15 hours ago 2 replies      
Not only that, but look at the niche Python is occupying. It's a well established and respected niche to which, by definition, the language is suited very well.

By adding static types, the focus of the language would move to a different niche, which would probably be already occupied by some competitor language(s) which do(es) types much better.

If you want sort-of Python-ish syntax with elaborate types, just use Nimrod and leave Python alone. Get the right tool for the job, don't mutilate a perfectly good existing tool.

fish2000 14 hours ago 0 replies      
Python's API structure may be fast and loose, but that is a feature, I think. Its type system may have some threadbare implementation spots the _sre example from the standard library, for instance but there are some compelling examples as well.

I, for one, have been working on an app implemented mostly with PyObjC, the bridge between Python and Objective-C. I had all but written off PyObjC as a bizarre yet unuseful language mule... but lately I had the occasion to read through the PyObjC source code base, in service of my project. Did you know that when you subclass a wrapped Objective-C type in Python, an all-new Objective-C class is created and wrapped as the descendant class, behind the scenes? That blew my mind.

That happens transparently, in concordance with Python's type heiarchy and runtime ABI. As it turns out, PyObjC predates Mac OS X, and the authors have put a lot of work into mitigating things like the GIL and system events.

I am also a fan of Django's field type system, as the author mentioned and I am curious about what he thinks about descriptors (which he mentioned one but did not address) I think descriptors are an amazing addition to the duck-typing regime in Pythonville.

wirrbel 8 hours ago 1 reply      
This is a very nice article showing some of the issues troubling python and the proposed type anotations.

I would summarize my view of the type annotation proposal as follows: Statically typed languages can introduce inference heuristics that minimize the amount of type declarations. They can "jump" into the dynamically typed world more easily. The other way around is a lot harder. Not only are all those type annotations lacking in the standard library and the tools around, but there is also a lack of function design by types.

Jweb_Guru 16 hours ago 0 replies      
Hrm. I think this article does a great job of explaining weird inconsistencies in Python's current type system, but I think it does a somewhat less good job of demonstrating that adding annotations is actively harmful. What would be some examples of situations where inconsistencies in the type system made annotations problematic in practice? Are those situations compelling enough to warrant not adding any annotations to the language?
sjy 12 hours ago 1 reply      
If the author is reading this thread, I spotted this type-o:

  Type type claims that it's a subclass of object.

mmagin 17 hours ago 2 replies      
I didn't know Python users hate static typing so much.
notduncansmith 18 hours ago 0 replies      
Could you expand on why you feel that way?
jimmaswell 14 hours ago 2 replies      
>So what's the solution? Not having null references and having explicitly typed arrays.

Throwing the baby out with the bath water. Null types are extremely useful.

I don't get why the author claims the null type in C# is a form of "damage". It's just said that it's bad, not why. The problem with None in python was that you can't tell what it's supposed to be. In C# you know what type the null is meant to be.

Julia 0.3 released
174 points by StefanKarpinski  1 day ago   49 comments top 10
idunning 1 day ago 1 reply      
For anyone curious about the packages available in Julia 0.3, please check out http://pkg.julialang.org/. We hope to add keywords and such in the near-term to make package discovery easier. Until then you can check out some of the "organizations" (http://julialang.org/community/) such as JuliaStats (http://juliastats.github.io/) and JuliaOpt (http://juliaopt.org). Finally, we have a blog aggregator that you can follow at http://www.juliabloggers.com/

Julia 0.3 is a solid release and many Julia users have been using the master Github version for the past few months for production use, academic work, and just messing around quite happily. There are relatively few breaking changes from 0.2 to 0.3, with much better package support - so upgrade as soon as you can.

Julia 0.4 is likely to be a more "unstable" release in the tick-tock style that Linux used to have. Already been some great new things merged in, many more to come. I'd recommend not using the master branch of Julia at this time, and instead stay on release-0.3 if you like to build from source.

apl 1 day ago 0 replies      
For fans of the Python numeric stack (NumPy, SciPy, pandas, etc.): if you ever want to give Julia a go, there's an excellent Julia-to-Python bridge called PyCall.


It allowed me to incorporate Julia into my academic work without breaking a sweat.

thearn4 1 day ago 3 replies      
Python is my usual go-to language for technical computing, bit Julia is a lot of fun! I'd be curious to hear more from folks who have made use of it in "production" (sort of a tricky label in scientific programmiong) code.
toleavetheman 1 day ago 1 reply      
My favorite change in 0.3 isn't even in the changelog:

Startup time has been massively improved. It used to take 5-10sec to start the REPL or run a test, now it's about 0.2sec.

roye 1 day ago 1 reply      
When I last looked at Julia (as a candidate for writing a bioinfo. tool) it seemed a really appealing alternative to prototyping first in Python and then Cythonizing to gain speed, in that code would only have to be written once and no stitching together would be required. Ultimately, I decided against using it because it seemed packaging of binaries wasn't quite there yet (e.g., one would have to download Julia and then download my code to run it). Is this something that's likely to be addressed in 0.4? Was my understanding of the situation accurate?
marcodena 1 day ago 7 replies      
I'm curious. I would like to know if it is worth to learn a new language only for speed reasons or if it's better to hope in improvements in Python... What do you think?

Anyway awesome! It's going well :))

tapia 1 day ago 1 reply      
I gave julia a try some weeks ago, but it seems it has a big performance problem when importing libraries... it takes too much time. This release doesn't seem to solve this problem sadly :/
Stubb 1 day ago 1 reply      
Does redefining functions with dependencies in the REPL work with this release? How about deleting items from the symbol table?
beders 1 day ago 0 replies      
Has anyone spotted a buildpack for Heroku?
tomrod 1 day ago 0 replies      
Thanks for posting the release news!
       cached 25 August 2014 15:11:01 GMT