Why Can't Offline-Borns Tell Difference Between Voluntary And Forced Actions? - <AUTHOR> http://falkvinge.net/2013/07/12/why-cant-offline-borns-tell-difference-between-voluntary-and-forced-actions/

<comment><USER2> I'll leave the politics aside for a moment. What's really interesting to me is the human development around "online" and "offline".

One thing i've noticed since my mom discovered Facebook, is how she seemingly always forgets who can see what. It would seem like she is not capable of understanding the multiple contexts that exist... and frankly I don't blame her. There's a lot. In facebook alone, there are posts everyone can see of course I can restrict that. I can post on someone elses wall, of course then mutual friends can see, unless or course permissions are configured otherwise.

It can get really confusing when in the previous 50 years of your life, you really only had to deal with two contexts. Person at the other end of the phone, or other people in your proximity.

I've pretty much grown up dealing with multiple virtual contexts, so it's natural to me (and other people in my generation) but its definitely not natural to my mother.

I'd be really curious if there's actually something physiologically different between our brains?

<comment><USER3> > I'd be really curious if there's actually something physiologically > different between our brains?

I really, really doubt it.

Part of learning to do anything abstract is that eventually, the abstraction becomes real to you.

Money, musical notes, a "for loop", at some point, the abstraction becomes as real to you as a piece of wood you can knock on.

All human brains do this, all the time, for everything. I bet you don't know what the little sticky-up-pipe thing on the top of your house does, but plumbers do. It's a thing and it has a name.

It's hilarious to me to imagine that "online stuff" is special when the fact is that most people do not see the real world at all through the massive fog of abstractions we all live in.

Most people don't know where their water comes from or where their shit goes to either. Do we call them "on plumbing" or "off plumbing" people?

It's just practice, context, familiarity and importance.

<comment><USER4> No plumber thinks they live in the pipes, but "online" people can feel like they live in a separate place called "online".

<comment><USER3> That makes it a privileged delusion I suppose, as opposed to people who can read and temporarily relate to Julius Caesar. I suppose those people live in "Reading".

P.S: I do think things are radically different now, I don't think people or brains are.

<comment><USER4> Who are you to decide what is a delusion and what is not? Reality is what doesn't go away when you stop believing in it.

<comment><USER3> My original point was, and is, that the idea that your idea of reality inside the computer is exactly as real as you think it is. Which is as real as you would like it to be. Also, as unreal.

When the water doesn't come out of the tap, the shit doesn't get flushed away, or for some other reason you're forced to deal with the mundane reality of life, your perspective will change slightly. Your reality will shift. Or if you buy a house, or have to do repairs.

What I am saying is, is that this is absolutely no different than everyone else - the other people, who also do not live in reality. They don't understand how the plumbing works either, but their reality most likely involves intrigues, dramas and scripts with other people, played out perhaps on a slightly different stage.

There is nothing in understanding facebook or moving a mouse around which requires new neural hardware.

P.S: > "Reality is what doesn't go away when you stop believing in it" This is kind of ironic when you're talking about "online" as a place. If we're to use that metric, "online" is extremely unreal. (I think it's as real a place as any other, and not especially more unreal than other unrealities we live in).

<comment><USER4> I'll concede that perhaps the experience of being one with the network is somehow similar to the experience of being one with a car, or one with the scenery and characters in a good book, but my point still stands that politicians who don't experience that connection are ill equipped to make decisions affecting those who do.

</comment></comment></comment></comment></comment></comment></comment><comment><USER5> This article is really out of left field for me. It doesn't do anything to justify the assumption that online-born people value privacy and offline-born people don't. It just launches into a tirade about how offline-born people are abusing their power.

However I see plenty of young people who don't care about the NSA scandal ranging from apathy to "what do I have to hide?", and I see plenty of old people who understand the evils of mass surveillance even if they don't understand the technology.

If there's a generational correlation then first that should be established. It seems dangerous to simply assume it is generational warfare and demonize the older generation who actually should know a thing or two about surveillance states since they've definitely been around for a while.

<comment><USER6> _" It doesn't do anything to justify the assumption that online-born people value privacy and offline-born people don't"_

I think you misunderstood, and that his point is that offline-born do not understand and value privacy _online_. He backs it up, kind of, with the statements he then goes on to discuss.

<comment><USER5> Yeah I guess I glossed over that. Certainly a lot of people, particularly older people don't really understand tech and the magnitude of spying that is possible through Google, Facebook, et al. That's pretty much a moot point though, when you consider what this surveillance apparatus enables. The vast majority of people use some tech (eg. telephone) that will enable inappropriate data to be collected and stored, and even if they are hermits living off the grid, they can still be implicated as a subject of interest simply by being named in a third-party email exchange. Getting all up in arms about the government snooping our Facebook data seems to be almost completely missing the point.

<comment><USER3> > they can still be implicated as a subject of interest simply by being named > in a third-party email exchange.

Facebook and Glass both have this property. Technologies which harness the privacy-unaware to compromise the privacy-aware really shit me.

Fortunately I have nothing to hide. Naturally ;)

</comment></comment></comment></comment><comment><USER7> Online people are not "open about some parts of their life voluntarily in ways that the offline-borns wouldn't". Given how Facebook and such services work, they're being open about everything they do online with service providers which (they hope) will only divulge what they choose to the people that they choose.

The online generation, technically speaking, _is_ giving away their private information to third parties which (in their TOS) state that they take no responsibility for it, make no guarantees about privacy, and will comply with government requests if they believe it is in their best interests. The problem isn't that governments can require service providers to hand over the data, as many of those service providers are usually very happy to comply. The problem is that we are using services implemented in a way which does not conform to our expectations.

Chatting online with end-to-end encryption and trustworthy software and hardware is reasonably analogous to chatting in real life: you are communicating with the individual identified by the key, whom you trust not to share your conversation with the world. Chatting on Facebook has nothing to do with this: you're chatting with a third party that you assume is relaying the messages to someone you assume is the person you want to talk to.

</comment><comment><USER8> Very interesting analogies, I thought this one was particularly poignant:

 _"These people are having sex with a lot of people. Obviously, they don't mind having sex with other people, and that gives me the right to have sex with them, by force if necessary."_

People unfortunately actually have made (and still make) similar statements to justify objectification and sexual predation of people labeled as promiscuous. It doesn't seem like something that has changed though at a certain point in time due to a watershed reconceptualization (the sexual revolution?) equivalent to the generational shift of offline-born to online-born.

It is about societal conceptualization of sexuality and (in the case of NSA situation) privacy, but I don't think it maps cleanly onto generational change. When people see sexuality or privacy as "all-or-nothing" matters, the same crude logic pervades, whether it's "they aren't a virgin, so they can't refuse sex" or "they share everything on facebook anyways, so they can't refuse giving it to us."

</comment><comment><USER9> Falkvinge is often insightful and I generally agree with him on issues, but in this case he is attributing to "online born vs. offline born" something that really has other causes.

His premise seems to be that the governments would respect privacy if only they understood the implications of their policies. But that's silly. In fact some older-generation people may fail to understand tech-related issues, but others do, and in either case the ruling class simply couldn't care about citizens' rights. They see an opportunity to gain more power for their respective governments, and a better position in relation to other nations, and that's all there is to it. They don't mind lying, concealing or spewing whatever euphemistic rhetoric or pretexts they can think of to mollify the public, but it has little to do with their actual policy objectives.

There is a valid point however, that privacy is not about who knows what, rather it is about being in control of what others know about oneself.

</comment><comment><USER10> So what's the threshold for being online-born or offline-born?

I was born in the early 80s, but didn't become aware of the existence of a thing called an "Internet" until the mid-late 90s. So I can recall a time when there wasn't a thing called an "Internet". Does that make me an offline-born?

On the other hand, since discovering the Internet, it's been an integral part of my life. Though I understand that society actually managed to somehow exist before the Internet did, the concept still feels somewhat alien to me now. It is like reading about the Dark Ages in a history book. Things couldn't have truly been like that, could they? Does that make me an online-born?

Am I both?

</comment><comment><USER11> I think this is a distinction borne of poor communication. I've never yet talked to a person over 60 who thinks recording their phone conversations is wise, let alone tracking their movements or assembling their social network. To them the technology is beside the point; focus on the outcomes -- the real information being collected.

</comment><comment><USER12> The use of "offline-born" in this article is very disconcerting and seems to express something of a "superior-us vs. inferior-them" mentality. While I agree with the majority of the article and the need to preserve the right to privacy, calling a large group of people "offline-borns" and equating their actions with theft and rape is dehumanising and should not be considered acceptable!

<comment><USER6> _"..and equating their actions with theft and rape is dehumanising and should not be considered acceptable!"_

He didn't.

<comment><USER12> To quote:

"This old lady is giving some of her money away for free to charities she picks. Obviously, she doesn't care to keep her money, so it can't possibly be a big deal that we take the rest of her money without giving her a say about it."

"These people are having sex with a lot of people. Obviously, they don't mind having sex with other people, and that gives me the right to have sex with them, by force if necessary."

If these two statements come across as shockingly arrogant to you as an offline-born, then you need to learn and understand that the first statement, which treats privacy as up for grabs, is perceived exactly as shockingly arrogant to the net generation.

maybe privacy invasion and theft can be compared against each other, but bringing rape into the equation as if it somehow sits on the same level is ridiculous.

</comment></comment></comment><comment><USER13> One annoying thing about this article is the "born" aspect - it seems to be a synonym for "old" and "young". It's a gross generalization to equate old people with technophobes.</comment>


Running a full IBM System/370 Mainframe on a Raspberry Pi Zero - <AUTHOR> https://twitter.com/BrianRoemmele/status/1257832168455208963 <comment><USER2> This is apparently greatly over-hyped (or a complete lie, depending on your interpretation) :

[https://mobile.twitter.com/mainframed767/status/125801882682...](https://mobile.twitter.com/mainframed767/status/1258018826823729154)

<comment><USER3> It's possible the original tweet poster was running a much newer mainframe OS on his Hercules emulator, but didn't want to say it directly, since he might get a license bill for that.

 _" 7 times faster than System/370"_ is an odd claim though. There's several models and 19 years of upgrades.

<comment><USER4> System/370 ended in the eighties I think? Maybe it is reasonable to be 7 times faster than the fastest System/370.

<comment><USER5> The fastest S/370 (pre-S/390) machine in the line was, I think, the 3090; these were multiprocessors, but a single processor had a 69 MhZ clock rate. Even if you assume it retired one instruction per cycle (and I'm not at all sure it did), it wouldn't be a shock for Hercules on an RPi to manage that.

</comment></comment></comment></comment><comment><USER3> Should probably be a link to the Hercules emulator, since it's the real magic here. [http://www.hercules-390.eu/](http://www.hercules-390.eu/)

Even runs current z/OS, though there is no practical legal way to do that.

<comment><USER6> [http://wotho.ethz.ch/tk4-/](http://wotho.ethz.ch/tk4-/) just in case

How is it relates to Hercules?

<comment><USER3> Tk4- is a custom "Hercules ready" packaging of the last version of MVS (3.8j, 24 bit, released in 1981) that you're legally allowed to use with Hercules. And probably other nice add-ons around installation, docs, etc.

</comment></comment></comment><comment><USER7> I find it somewhat ironic that IBM is struggling so hard to find COBOL programmers to keep mainframe alive, but they also insist on locking down z/os to the point that you can't get access to a terminal unless you already know COBOL and work for an enterprise spending millions with IBM.

You want nerds to flock to your platform, you have to give them access...

<comment><USER8> There's no problem finding "cobol programmers"; "cobol programming ability" isn't their bottleneck. Finding someone competent to do professional software archaeology & borderline forensics for 40K/y is their bottleneck.

<comment><USER9> "Shortage of programmers" almost always means "we don't want to pay full price for programmers".

<comment><USER10> Isn't that the definition of shortage? When we say there is a shortage of X, it means that there is X, but not enough of it to keep the prices at an affordable level, so the prices have risen and some people who need X, want X, and/or previously could afford X no longer can. This is true as long as there is a _shortage_ , not an absolute _lack_ of something.

I mean, famines happened because sometimes there would be a shortage of food, perhaps due to drought, or a sudden increase in population not matched by an increase in food production. Prices would go through the roof. Rich people could afford the new prices and persevered. Poor people died of hunger. But if the poor mustered enough gold, they could go buy food like rich people did.

So my question is, do you consider famines shortages? If not, what even is a shortage? In yes, how is labour shortage any different, except in scale?

<comment><USER11> Note that your example of a famine brings up 'shortage' before any mention of prices. There are multiple ideas of shortage at play. At the most basic level shortage can mean that there is not enough of a good/service for everyone to have it at any price (food in a famine, medicine in a pandemic). Typically we apply shortage to situations where the supply and demand curves reach some hard stop at the edges (elasticity goes to 0). In the case of normal market dynamics where supply and demand are both reasonably elastic then there really are no shortages per say - just cheapskates.

</comment></comment></comment></comment></comment><comment><USER12> I used to experiment with a Hercules MVS (my first real computer job was sysop at an institutional datacenter with an MVS) on my eeepc on my second tour in Iraq. Doing convoy security, of course we never had any network connection of any kind (it being the middle of the desert and also having active RF-jammers on our guntrucks), and there was always a long wait for the MWR computers at whatever base we'd stopped at for the night, so we were left with only whatever data we could pack before each mission. I spent hours and hours hacking on that thing. It was a pretty absurd situation, but I had a lot of fun.

<comment><USER13> On my last two sub deployments I bought a midrange laptop and Mandrake Linux 8.0, had a grand time installing, reinstalling, tweaking the hell out of it, learning to handle a running *nix.

Came in handy when an onboard system based on HP-UX cut out while underway and out of contact with fleet technical support.

<comment><USER14> I was on a surface (aka "target" to you) cruise, and spent all my downtime in the medical department hacking away on an unused little laptop. This was when MARSGRAMs were the height of fast communications, and the procedure for sending them was to handwrite your message on a slip of paper and pass it to the radio guys, who would then type a bunch of them into a computer hooked up to a packet modem. That was pretty low priority for them, understandably, so things would wait in queue for quite a while before they could get around to doing some data entry.

I knocked up a little QBasic app that let you type in your MARSGRAM message and then write it out to a floppy, batched alongside everyone else's messages. Once every couple of days, we'd run that floppy to the radio guys who'd pop it in their computer, blast out the messages, and write any replies they'd received to it back out so you could take them back to the department and everyone could read notes from their loved ones.

I'd have a hard time exaggerating how well this went over with everyone involved (except maybe the MARSGRAM operators who were suddenly carrying a lot more messages than they were before because it was so easy to send them). "Hey Captain, I heard you say you were missing your wife. Want to send her a message and hear a response in a couple of days instead of months?"

It worked out pretty well for me personally, too. I had a great boss at the time who told me flat-out that I was an idiot for pretending to want to work in medicine, when my heart was clearly elsewhere. It'd never occurred to me to make a career out of computer stuff before then, and a short time later I was out of the Navy and enrolled in a compsci program. Thanks for the kick in the right direction, Ken!

<comment><USER15> In 2006 on my first mission with MSF, we had a BGAN satellite terminal. Luxury! Because in my downtime, I'd read the tech library on CDROM, which explained how to organise a mail service with floppy disks and Landcruisers, with a relay to Paris over HF radio via Portishead, UK..

<comment><USER14> That's beautiful.

</comment></comment></comment></comment></comment><comment><USER16> This is the power of Moore's law. A computer that cost millions reduced to $5. Shame we waste all the power we have now days.

<comment><USER17> The bitcoins must be mined!

</comment></comment><comment><USER18> For a bit more fun with mainframe emulation if you're not already a mainframe programmer, check out MUSIC/SP on the System390 emulator [1]. You can run MUSIC/SP on Hercules also, with some limitations [2].

[1] [http://www.canpub.com/teammpg/de/sim390/](http://www.canpub.com/teammpg/de/sim390/)

[2] [http://www.canpub.com/teammpg/de/sim390/hercnote.txt](http://www.canpub.com/teammpg/de/sim390/hercnote.txt)

<comment><USER19> EDSAC[1], on BCPL[2], on raspberry Pi et al, ..

[1] [https://www.cl.cam.ac.uk/~mr10/Edsac.html](https://www.cl.cam.ac.uk/~mr10/Edsac.html)

[2] [https://www.cl.cam.ac.uk/~mr10/BCPL.html](https://www.cl.cam.ac.uk/~mr10/BCPL.html)

</comment></comment><comment><USER20> I wonder how the uptime and stability is on the Pi? IBM mainframes rarely go down and are up from setup to decommissioning.

<comment><USER21> Except when they do go down. Not as a result of the processor itself, but as a result of the hiccups in the dependency chain.

In one case ours went down for a day when a backhoe hired for construction cut a power supply line. The data center batteries designed to give time for the desiel generator to kick-in were fine. The generator failed to start as a result of contaminated fuel despite monthly tests.

The second time was when an employee brought their 12 year old son into the raised floor environment. He found and pressed the haylon dump button for fire suppression. Staff were lucky to escape without suffocation.

The employee was fired and stricter entry requirements to the raised floor area were implemented.

<comment><USER22> > The generator failed to start as a result of contaminated fuel despite > monthly tests.

I don't think this is he first time I've heard such a thing. I wonder if the people running such tests know how long you have to run the generator to flush the fuel lines? And aren't there failure modes for ICEs - and diesel in particular - where the engine stops working once it reaches operating temperatures?

I had a car that would occasionally conk out due to a damaged O2 sensor (due in turn to a crack in the manifold).

</comment></comment></comment><comment><USER23> IBM System/370 = $2,248,550 [0] Raspberry Pi Zero = $5 [1]

[0] [https://www.ibm.com/ibm/history/exhibits/mainframe/mainframe...](https://www.ibm.com/ibm/history/exhibits/mainframe/mainframe_PR370.html) [1] [https://www.adafruit.com/category/934?src=raspberrypi](https://www.adafruit.com/category/934?src=raspberrypi)

<comment><USER24> That's $2,248,550 in 1970 dollars. In today's money, that would be more like $15 million.

<comment><USER25> alternately, its much < $87k based on Computers, peripherals, and smart home assistants CPI-U.

[https://www.bls.gov/cpi/tables/supplemental- files/home.htm](https://www.bls.gov/cpi/tables/supplemental-files/home.htm)

</comment></comment></comment><comment><USER26> In the meantime, somewhere in the universe, people are buying mainframes ... for personal use: [https://blog.mainframe.dev/2019/05/buying-ibm- mainframe.html](https://blog.mainframe.dev/2019/05/buying-ibm-mainframe.html). Go figure! :-)

</comment><comment><USER27> I have a friend who used to work at IBM... and does Model railroading... there could be an interesting intersection there. 8)</comment>


Urban Camouflage (Photos) - <AUTHOR> http://www.urbancamouflage.de/photo.htm

<comment><USER2> I can't say if it's really "hacker" news, but it's definitely sugoi!

<comment><USER3> I can't say if it's great, but it's definitely reddit.</comment></comment>


Considering Applying to Y Combinator? - <AUTHOR> http://www.tonywright.com/2010/considering-y-combinator-or-any-seed-funding/

<comment><USER2> "It may seem like selling for millions to Google is a foregone conclusion given how brilliant you are, but it's not. ...If you can trade a little bit of equity to nudge up your shot at success by a few percentage points, you should do so."

I love this point. Many people I've talked to dislike going the YC route because it's "so little money for the amount of equity they take" as if their idea (which has been a PT thing for over a year and there's still no MVP) is pre-destined to be the next $750MM hit and the sacrificing of 6-8% is a dumb idea.

It's what I like to call a false statistic or misleading math. If your startup never goes anywhere then it's pretty much worth $0 even if it's $750MM in your head. PG has a great article about how YC is not about the money (except in the analogous sense that one is funding a poor grad student).

<comment><AUTHOR> Yaw, I find that to me one of the most common misconceptions (or maybe mis- judgements!) about YC. 6-7% feels like a lot. But when you do the math with 3 founders and a $50m exit, that's basically each of you walking away with somewhere between 10-15m and YC walking away with 3-3.5m. So the YC experience is shedding your personal take by $1m or so before taxes... But very well could make the difference in you succeeding or failing.

It could also make the difference in the price tag. The YC brand and the early boost you get from it almost certainly would up the price tag by $3m in that scenario.

(NB: it's a bit more complex than that if/when you take a Series A round, offer employee stock options, etc-- but bottom line is that the YC stock isn't going to make big difference. If you exit, you'll likely be freakin' rich)

</comment></comment><comment><USER3> The "demo" will be less like Steve Jobs and more like Guantanamo Bay

<comment><USER4> That was alarming. We try to make the interview as low stress as possible, believe it or not. But unfortunately we end up having a lot of questions and only 10 minutes to ask them.

<comment><USER5> I find the 10 minute limit quite odd. I assume you've thought it through, but it seems to me that the cost of spending a little more time interviewing would likely pay for itself many times over in better decision making. Especially after watching your Mixergy interview, where you emphasize how poor you consider yourselves at choosing who to invest in.

<comment><USER6> Thin slicing <http://en.wikipedia.org/wiki/Blink_%28book%29>

<comment><USER7> Ah, bless Gladwell. You say thin slicing, I say gut instinct or intuition. I'd say Gladwell is not worth reading. He takes an obvious, folksy thing, adds a bit of a twist to it, presents several anecdotes as dramatic stories illustrating his point, then slaps on some "science" to make it seem like its true. It's not. He's just making stuff up that sounds plausible but surprising.

As an example, in Blink he refers to the mostly excellent work of John Gottman [1]. Gladwell's thesis is in Blink is that by "thinking without thinking", i.e. intuition, experts make better decisions. Now Gottman has developed a technique that can predict if a couple will stay together with frightening accuracy, simply by watching them argue. However, the longer he watches, the _more_ accurate his prediction are. And it's not an instinctive thing; it's measuring expressions using a system [2].

Gladwell writes well, and seems believable. That doesn't make him right.

[1] <http://en.wikipedia.org/wiki/John_Gottman> [2] <http://en.wikipedia.org/wiki/Facial_Action_Coding_System>

</comment></comment></comment></comment></comment><comment><USER8> Founders at Work seems like a great book. I'll check that out.

Overall these tips are great. Thanks.

<comment><USER9> I'll vouch for it. Picked it up a few weeks ago and was sucked right in by these stories. Great mix of drama, comedy, and wisdom. Read a chapter or two over on Google Books: <http://bit.ly/dAFbnw>

</comment></comment><comment><USER10> I've been writing down some notes for advice for applicants but Tony's article covers everything I would have said and then some. Great job!

If you're applying or thinking of applying, take what he says to heart.</comment>


Roy: Small functional language that compiles to JavaScript - <AUTHOR> https://github.com/pufuwozu/roy <comment><USER2> All these languages compiling to javascript makes me think we really need a more low level language to compile to for the web. A C for the web, if you will (like how a lot of Lisp implementations will generate C to compile). Not necessarily byte-code per se, but something at a low enough level that provides enough guarantees that it can be compiled into something that performs well without the need for exotic jit compilers and so on. Javascript is not that language.

(Obviously C can't be that language for the web (NaCl possibly excluded), but when I say C, I mean in the general profile: extremely simple and maps very closely to what the hardware is actually doing)

<comment><USER3> I would love to see this. But there's two problems with it:

1\. Bytecode formats are never completely language independent - there's always a feature or change that would make language X better

2\. Browser vendors will never be able to agree on a bytecode format

So, to solve those problems, I've been thinking the following approach might work:

1\. Write a JavaScript interpeter for a fairly language-independent bytecode

2\. Write some small languages, targeting that bytecode (something for everyone: Haskell-like, C-like, Lisp-like, Forth-like, etc)

3\. Hope people start writing more languages to target the bytecode

4\. Hope that it's hard for browser vendors to ignore implementing the bytecode natively - for performance reasons

This way we avoid committees and just get it done. Let me know if you think this is a good or bad idea. I'm very willing to work on it.

<comment><USER4> Agreed. This sounds plausible. Feel free to contact me by email if you need another developer—I'll offer what time I can—or just a sounding board.

</comment></comment></comment><comment><USER5> This would be interesting if the meta-language weren't JavaScript. By choosing JS as the ML, you lose static typing and type inference in the compiler and severely restrict the target platforms and future growth and metaprogramming.

I would love to see a formal specification for the language mapping Roy's syntax to a subset of JS. It would also be nice if the primary implementation were written in OCaml or Haskell. Both of these languages now have very reliable ML->JS compilers and support algebraic data types allowing you to precisely model your object language.

<comment><USER3> I would love to write Roy in a language with static typing (I'm definitely up for writing Roy in Roy).

But I think CoffeeScript has shown that in-browser compilation and execution is very useful. For example, if I wrote Roy in Haskell, I wouldn't have been able to easily write this demo site:

<http://roy.brianmckenna.org/>

It means you can play with Roy just by hitting a URL - low barrier to entry.

Another benefit is that you can include the Roy compiler in a page and use that to compile your Roy code - no pre-compilation necessary.

<comment><USER5> <http://ocsigen.org/js_of_ocaml/> <http://try.ocamlpro.com/>

I will actively contribute to your language implementation and use of these tools should you adopt them. With a proper type system, you can change the world. Without a proper type system, we will all suffer and kill ourselves by a thousand cuts.

If you have further doubts about the viability of this approach, see <http://ashimagroup.net/demo/game/ooman/tutorial/> for a rigid body motion model in an OCaml WebGL game compiled to JS.

<comment><USER3> _> With a proper type system, you can change the world._

You don't have to sell me on type systems - they're exactly why I'm working on Roy.

 _> If you have further doubts about the viability of this approach, see <http://ashimagroup.net/demo/game/ooman/tutorial/> for a rigid body motion model in an OCaml WebGL game compiled to JS._

I know that compiling languages with completely different semantics to JavaScript is possible (I even maintain <http://altjs.org/>). But they present two problems:

1\. They output to ugly JavaScript that is hard to interop with and/or people can't reason about

2\. They need a huge runtime

The resultant JavaScript you linked to was ~300K.

Roy takes a different approach and tries to stay semantically close to JavaScript when possible. This is to combat both of the above problems. I'd love to see a Roy example of that demo - I imagine the JavaScript would be a lot more readable and smaller.

<comment><USER5> Please excuse me, perhaps I was not clear in my language objection. I am very excited about Roy! I am concerned about the language that you have chosen to define it in and what it means for the future of the Roy community.

 _> I know that compiling languages with completely different semantics to JavaScript is possible (I even maintain <http://altjs.org/>). But they present two problems:_

 _> 1\. They output to ugly JavaScript that is hard to interop with and/or people can't reason about_

As I am suggesting that you change your metalanguage for Roy's implementation to something with stronger type safety than JavaScript, I am proposing that you increase the ability for both humans and computers to reason about it. Will you commit to implementing Roy in Roy? Will Roy offer a subset or a superset of the type system of the metalanguage (JavaScript)?

I am super-excited about having a thin, HM type system on top of JS. If I could reason about, contribute, and extend the type-checker and compiler, I would adopt Roy in a heartbeat.

 _> 2\. They need a huge runtime_

 _> The resultant JavaScript you linked to was ~300K._

This is not very big for a 3-D game or a compiler. Most of this is runtime and libraries (type-checked JSON, perhaps?) so application code will increase size relatively slowly.

Again, I am not advocating js_of_ocaml as a replacement for Roy. It fulfills a different role. I would love to write type-checked DOM manipulations in Roy natively and produce tiny JS or HTML!

 _> Roy takes a different approach and tries to stay semantically close to JavaScript when possible. This is to combat both of the above problems. I'd love to see a Roy example of that demo - I imagine the JavaScript would be a lot more readable and smaller._

Do you support persistent objects? Exhaustive case analysis _and_ polymorphic variants? Will you be able to implement the type-checker correctly and safely in JavaScript? Will your users ever be able to compile their pure Roy code into another functional language? Even if Roy is a subset?

<comment><USER3> _> ... I am proposing that you increase the ability for both humans and computers to reason about it_

Ah :)

On my TODO list is to create an intermediate representation to more easily reason about Roy's semantics:

<https://github.com/pufuwozu/roy/issues/41>

I think this would satisfy your objections: hopefully the core semantics are so small that writing a JavaScript version from them wouldn't be so scary.

I should try that as soon as possible. Simon Peyton-Jones has said multiple times that defining a core intermediate-language for Haskell was very important as it meant they wouldn't add things that didn't make complete sense. Working on Roy doesn't give such a strong sense.

My worry about separating the semantics out into an IR is that we might lose information that makes outputting readable JavaScript possible. But we'll never know until I try.

 _> Will you commit to implementing Roy in Roy?_

Would really like to - or at least some modules:

<https://github.com/pufuwozu/roy/issues/1>

 _> Will Roy offer a subset or a superset of the type system of the metalanguage (JavaScript)?_

Mostly a superset of JavaScript.

 _> Exhaustive case analysis and polymorphic variants?_

Not yet.

 _> Will you be able to implement the type-checker correctly and safely in JavaScript?_

With enough tests I'll have some confidence in it. I don't have enough tests. ;)

 _> Will your users ever be able to compile their pure Roy code into another functional language?_

Probably not - at least not written by me since that's not what I designed it for. But no objections if someone does it. :)

Hopefully some core semantics will make it possible for someone to do that.

</comment></comment></comment></comment></comment></comment><comment><USER6> I particularly like the example of Literate Roy: [https://github.com/pufuwozu/roy/blob/master/examples/sqrt.lr...](https://github.com/pufuwozu/roy/blob/master/examples/sqrt.lroy). This example demonstrates some of the language features and syntax: [https://github.com/pufuwozu/roy/blob/master/examples/structu...](https://github.com/pufuwozu/roy/blob/master/examples/structural.roy).

</comment><comment><USER7> previous discussion: <http://news.ycombinator.com/item?id=3277027>

not sure how much has changed since then.

<comment><USER3> The thing that has gotten me the most excited since then has been an initial version of type-safe node.js modules:

<http://brianmckenna.org/blog/roy_node_modules>

</comment></comment><comment><USER8> The page doesn't work hard to sell me on the idea.

<comment><USER3> Welcome any ideas on how to make the README better. Better yet, I'll very happily accept pull requests ;)

</comment></comment><comment><USER9> Why would I use this over coffeescript, that I'm already used to?

<comment><USER10> Some programmers value type safety. That is the niche that Roy fills I believe. I'm certainly excited about it.

CoffeeScript is certainly a pleasure to work with but it lacks a type system and static type checking.

<comment><USER11> Also, Roy supports Algebraic DataTypes (ADTs) - i.e. pattern matching.

Though I think it takes quite some experience programming in Ocaml/ML/Haskell to fully appreciate its power.

</comment></comment></comment><comment><USER12> Someone shares this every other month

</comment><comment><USER13> I wouldn't consider it unless it compiled to coffee script first.

<comment><USER14> Isn't there a js to coffee script compiler? You could compile from Roy -> js -> coffee script -> js if you really wanted to.</comment></comment>


Public CDN traffic and performance stats - <AUTHOR> http://www.jsdelivr.com/statistics <comment><AUTHOR> The source code of the site is available at [https://github.com/jsdelivr/www.jsdelivr.com](https://github.com/jsdelivr/www.jsdelivr.com)</comment>


Show HN: My dogfooded Bookmarking Site / rss-crawler / ... - <AUTHOR> http://handlr.sapico.me/?SearchTerm=%5BARTIFICIAL-INTELLIGENCE%5D+ <comment><USER2> Nice work! Looks like HN / Reddit in terms of functionality and layout.

Really impressed that you've built all the features like RSS crawler, taxonomy, user and role management etc.

</comment><comment><AUTHOR> Side note:

I have been low-level dogfeeding this for a couple of years for personal use ( it was a MVP for a company). It's actually quite usefull.

Things i have included:

\- RSS crawler ( depending on the user that submitted it. Eg. TaglyBot is mostly the one i used for adding RSS-Feeds)

\- Tag Synonyms/Hierarchy/Administration ( that's why i used the A.I. tag)

\- Comments

\- User Management / Role Management

\- Popular /Upvoted tags

\- You can drag tags to the top, to bookmark them for personal use ( if loggedin)

\- Url modifiers through prefixes or affixes on the url ( Reason: circomventing paywalls by using the facebook sharer as a prefix, ... - Companies mostly use this kind of trick for Social Media)

\- Custom js elements depending on a certain tag ( eg. you can add HTML through using the HTML tag) - yeah, enjoy screwing me :p

\- Those custom JS elements are generated server using the V8 engine ( for SEO purpose)

\- generic button / link behaviour ( eg. there's a button to "Post to HN" ). I posted too much on HN for a while as i found it easier to "Bookmark it to HandlR", add the tags and then press "Post To HN"

\- There's a private mode that only lists your own votes and submitted items ( not sql optimized though, very slow for now)

\- There's a bookmarklet, so you can drag a URL to the bookmarklet. It will redirect you to the handler site so you can submit it.

\- If you only add a link, it will fetch the <Title> of the remote site ( easy for fast submitting)

\- Create alternative url's ( eg. [http://brugge.sapico.me](http://brugge.sapico.me) for crawling the local news/ activities related to where i live)

\- ...

It's just a side project, but i just improved the sql index for the many-to- many relationship for Tags/Items and planned to do a Show HN for fun.

Tech related:

\- Plain old Asp.Net MVC with some jquery and mustache ( for the custom html elements), a V8 engine as custom javascript view engine and a DDD-layered application.

I mostly use IQueryable instead of Lists though, for ease of programming.

I ( before i submitted it here) also added a cache for 60 seconds ( hug of death is expected) and a new post doesn't go to the Newest url now ( since it would be confusing because of the caching).

PS. HN is amazingly simple though

PS 2. The company went for sharepoint a couple of years ago and very recently they contacted me again :p</comment>


Show HN: Precompiled libraries for Visual Studio - <AUTHOR> https://precompiled.io/ <comment><USER2> isb't it what we could do with vcpkg?</comment>


A missing raptor and the Mojolicious user experience (Perl) - <AUTHOR> http://blog.kraih.com/a-missing-raptor-and-the-mojolicious-user-exp

<comment><USER2> It's refreshing to see Perl web design that doesn't look like it was made in the 90s.</comment>


Jeb Bush Comes Out Against Encryption - <AUTHOR> https://firstlook.org/theintercept/2015/08/19/jeb-bush-comes-encryption/

<comment><USER2> That's not a real surprise, though, is it? It's a further confirmation that's he's just another branch of the same tree.

Please don't take that as a fling against republicans, or support for another party. I despise them all, quite equally.

</comment><comment><USER3> Jeb Bush doesn't know anything about computers or software, and neither does any major politician. I guarantee you JB's 'Technology Advisor' advised him on this policy position and a few talking points, and now he's saying them.</comment>


GraphicsMagick and ImageMagick popen() shell vulnerability via filename - <AUTHOR> http://permalink.gmane.org/gmane.comp.security.oss.general/19669 <comment><USER3> Thanks HN, I have now lost my Twitter profile image and can't upload a new one:

[https://twitter.com/_jom0/status/737081667215601664](https://twitter.com/_jom0/status/737081667215601664)

<comment><USER4> I love that you did that. Never be afraid of breaking things. In this case it's amusing but imagine you would have done this in a banking application and you'd probably be arrested for hacking.

<comment><USER5> [https://twitter.com/ajlobster/status/735240869859753985](https://twitter.com/ajlobster/status/735240869859753985)

:-)

</comment></comment></comment><comment><USER6> The current situation reminds me of OpenSSL after Heartbleed - <USER2> start paying lots of attention and finding other issues after the "main" one. Sad that this is what it takes for a big, old project like ImageMagick to get some TLC.

<comment><USER7> There's a crucial difference; OpenSSL was designed to be secure. ImageMagick was designed to support hundreds of codecs and thousands of operations.

You can't pivot design on 1.25 million lines of code (est.) very quickly after 25 years of feature-first development process.

I'm a bit skeptical it will happen at all; it would be a multi-million dollar undertaking. Better to describe its design scope and tradeoffs, and get people to use it properly - sandbox it if it's on the server.

I started Imageflow to solve that problem - a server-focused design with strict design rules: security is first, followed by visual quality, followed by performance. We've kept the codebase to just 10kloc and we are 50% feature complete, but need to get a lot more momentum on Kickstarter to make completion possible. See [https://www.imageflow.io](https://www.imageflow.io)

</comment></comment><comment><USER8> The particularly troublesome part of this issue (and the previous big one) is the interaction between all the "power" ImageMagick provides in its filename parsing and its MVG and SVG decoders.

You'd think that just having applications not use user-provided filenames during the conversion process would prevent much of what's been disclosed lately, but no: the MVG decoder exposes all those features to a user that merely controls the content of the input file.

The mitigations from the last big vulnerability will still work against this, but people who merely updated to an ImageMagick that fixed the curl command escaping would be in trouble.

<comment><USER9> The biggest question I have is why filenames would even need to be treated specially by ImageMagick anyway. Almost all command-line utilities that are designed to be used in pipelines have the convention of using stdin/stdout, and do so without requiring they spawn shells themselves.

<comment><USER8> "Why?" can be an interesting question with ImageMagick.

Does it _need_ a prefix you can put on a filename that makes the file automatically get deleted after it's read? I don't think so, but there it is.

</comment></comment></comment><comment><USER10> > The simple solution to the problem is to disable the popen support > (HAVE_POPEN)

Is it just me or is this the wrong way to tackle this? The question to me is why the file name being interpreted in some way in the first place, not why popen is being used on the result of the interpretation.

Also, why are pipes even being allowed in the file name in the first place? (I'm asking about POSIX/*nix here, not about ImageMagick.)

<comment><USER11> Linux allows any byte to be a part of a filename except for the null byte and '/'. It's not the kernel or filesystem's fault if some program like sh treats some characters like '|' specially.

<comment><USER12> Interestingly enough, Cocoa on OS X allows '/' but disallows ':', and maps them back and forth when going down to the Darwin layer, as ':' used to be the (always invisible in the UI) path separator pre-OS X.

<comment><USER5> I'm wondering now if you're as old as I am (old enough to have written code for OS9), or if you're younger but curious about archeological wierdnesses in modern OSs...

</comment></comment></comment></comment><comment><USER13> Wow. This is really scary. Especially the SVG issue. Is it common to support xlink:href on servers that use ImageMagick? It seems like that would allow you to read any readable image on the FS anyway, which is a vulnerability in itself.

<comment><USER8> > It seems like that would allow you to read any readable image on the FS > anyway, which is a vulnerability in itself.

It does. You can trivially use the same feature to render the contents of a readable text file into the output image, too.

</comment></comment><comment><USER14> This is not the first time popen with | has led to security issues. At the same time it doesn't have any legitimate use cases that I can think of. Is there any good reason to not patch popen and remove the support for |s instead?

<comment><USER15> It can be useful if you want to offload some of the processing to other processes.

        // Open a gzipped file, display progress bar
        snprintf(buf, sizeof(buf), "pv %s | zcat", filename);
        FILE* f = popen(buf, "r");

        // Add an additional processing step when reading file
        FILE* f = NULL;
        if(do_extra_step) {
            snprintf(buf, sizeof(buf), "zcat %s | extra_step", filename);
            f = popen(buf, "r");
        } else {
            snprintf(buf, sizeof(buf), "zcat %s", filename);
            f = popen(buf, "r");
        }

The first example could be replicated by using zlib and reproducing pv's progress bar in-app. More work, but nothing especially tricky about it.

For the second example, it would be more difficult, for two reasons. First, popen() can open either a read or a write pipe, but not both. In order to write to extra_step's stdin, then read from stdout, you'll need to switch over to fork/exec. Second, you'll have to handle all the buffering between zcat and extra_step yourself, rather than getting it for free.

</comment></comment><comment><USER16> Unfortunately, this is not the only one. In fact, there are so many that there is a dedicate site:

[https://imagetragick.com/](https://imagetragick.com/)

It also contains several PoC.

</comment><comment><USER17> Does this affect non-SVG (and other weird format I've never heard of) images? (such as jpg, png, bmp, gif)

I'm trying to figure out a way to patch this that doesn't involve recompiling imagemagick. Like most people I get it from dist, compiling it is kindof a PITA.

</comment><comment><USER18> In case anyone is interested, here's another mirror of the CVE: [https://marc.ttias.be/oss- security/2016-05/msg00255.php](https://marc.ttias.be/oss- security/2016-05/msg00255.php)

</comment><comment><USER19> So, just like Perl?

<comment><USER20> Only badly-written perl.

It's a bit like claiming that SQL allows for SQL injection attacks.

<comment><USER19> Well, the default open() method do perform pipe execs if you prepend or append "|", just like here.

[http://docstore.mik.ua/orelly/perl3/prog/ch16_03.htm](http://docstore.mik.ua/orelly/perl3/prog/ch16_03.htm)

<comment><USER21> If you're not using two-argument open() in Perl 5, you deserve what you get.

<comment><USER5> "If you're not using two-argument open() in Perl 5, you deserve what you get."

Pretty sure that's not quite what you meant to say...

[http://modernperlbooks.com/mt/2010/04/three-arg-open- migrati...](http://modernperlbooks.com/mt/2010/04/three-arg-open-migrating-to- modern-perl.html)

If you _are_ using two-arg open, or if you're _not_ using three-arg open.

(Or, the more general case: "If you're using Perl you deserve what you get - if you don't understand all the language features you're using." (And feel free to substitute whatever language will start the argument in place of Perl in that claim...)

</comment></comment></comment></comment></comment><comment><USER22> Who on earth still uses ImageMagick? Security holes in it are old news. Like 15 year old news.

<comment><USER23> What replacement would you suggest?

<comment><USER24> Most basic image manipulation can be performed using only the standard library packages, if your language includes such (PHP's bundled `libgd2` fork / Golang's `image` package / Qt QImage+QPixMap ). For Python `pillow` is popular.

<comment><USER25> I believe php uses imagick under the hood, and even if it does not, I'd rather rely on imagick than on PHP code when accepting exotic formats.

<comment><USER6> From a security standpoint, wouldn't it be better to rely on PHP (first)? Are you more or less likely to get RCE from PHP or ImageMagick? I'd say PHP has had a lot more eyes on it, security wise.

<comment><USER26> > From a security standpoint, wouldn't it be better to rely on PHP (first)?

You're joking, right? Popping PHP boxes is script kiddie 101. You might argue that "bad developers make insecure software" but when you're given a toolbox with nothing but oddly shaped hammers it's very hard to make a house.

<comment><USER27> That's rarely PHP failing but whatever framework/CMS is used. That's like saying C++ is inherently insecure because there exists a lot of software written in C++ with security holes.

<comment><USER26> Did you read the second sentence I wrote? Just because you can write safe code in a language that tries to make you footgun at every turn, doesn't mean that language is a good language. Pick a language that doesn't suffer from crippling security issues (which, sure, you can workaround -- but why use a language that requires workarounds to get security?).

<comment><USER7> We started Imageflow ([https://www.imageflow.io](https://www.imageflow.io) ) in C to design the C ABI for interop with all the host languages, but we're swapping out components for Rust every time it's possible/practical.</comment></comment></comment></comment></comment></comment></comment></comment></comment>


Ask HN: We're going in circles, chasing shiny objects, now what? - <AUTHOR>

I'm working for a start up in which we started over a year ago building something that everyone was very excited about.  From what we saw people wanted to use it, and were very excited about what it was going to bring.  We launched it a few months later, and got mild attention.  We stayed under the radar as we onboarded people, however it seemed like people would come, look around and leave.
Now we have over engineered as we tried to guess the market, with very little feedback.  We have gotten to the point at one part we uncommented a line of code and brought a 'new' feature back.  Basically we're now going in circles.
We admit the design of the product wasn't spectacular, however the very small feedback/interaction it would seem that the demand just isn't there, at least in the quantity we want it to be.
We listened to some potential customers and built their feature/product however after it was built few used it, despite it was what they said they wanted and worked as requested.
Now it seems we are just chasing after anything that seems to have a hope with the customers, and not keeping focus long enough.
We're at the crossroads where it feels like if we stay focused on our original focus, we might miss what we should adapt to after seeing the market more in depth.
Have you been in this situation?  Do you have suggestions? <comment><USER2> Hi,

If you could you freeze development for a small amount of time (other than keeping servers/lights on) and take some time out and basiclly take deep breath and relook over everything.

Its kind of hard to talk generalised and understand why you need to be secretive but financially long term if it is not flying then sometimes the easiet thing to do is pull the plug and work on something else whilst using the code/tool/ and most importantly knowledge and experience you gained.

If you've been working 20 hours a day, 7 days a week and perhaps feeled burn out then take deep breath and take time out, perhaps get some perspective on whats happening.

You could alwatys do like a weekend thing, get some beers/drink/pizzas/bbq, and relax and go over things with everyone being able to talk freely about what they think. Trying to get as many opinions as you can, different perspectives on where you and your other founders/team ideas are.

You don't have to set anything in stone but like a focus group and make it as informal as possible. Just for one brief weekend forget about stress/burnout and just focus on the future.

Think about whats working, whats not working, where do you want your start up to be in 6 weeks, 1 year, 5 years etc.

Then Marketing wise, is your site doing well in google/bing organiclly? Can you improve it with better marketing? Have you looked into SEO stuff, making sure your not missing anything?

Is your business idea sound or does it need to be reworked?

Sometimes you can a really good idea and your just going about it in the wrong way, execution wise? (sorry im not trying to be blunt but these things do happen.)

Then there is minute things like is your signup page asking too many questions? Do? you have a trial/free evaulation? Are you publishing prices or are you having people directly contacting your sales team so there is a delay in people signing up/paying for your widget? Does your site work in "the browser that shall not be named" aka IE6 or is it just one giant fancy flash thingy bob that takes 5 years to download when a simple static html page could do same job in 0.005 seconds of a time ?

If your business is making some money, could you afford to let developers work on things they want for 20% of time like say at google in the hopes of incubating new ideas. You'd be surprised at how many things get developed out of someones spare time that just grow or startups changing their business and model mid stream.

To be honest there's so many things that can be preventing your startup from suceeding without knowing more or you could be doing everything perfectly and its just not working such has no real customers. It happens.

Just take some time out, reveulate everything. If things have to change because they are not working then its better to make changes when your small and nimble(?)then when your a mega corp with shareholders.

Just be honest, don't hide away from awkward questions and just remember your not loosing anything by having a rethink. You have all the experience, code and technology that you have gained working on your startup. People often think they've failed because it didn't work out but don't realise what they gained through experience.

<comment><AUTHOR> We have actually done this a couple of times. I think the problem is that we each time sit there thinking oh we could just make it simpler. But in realty what our original idea was and what we need to be are different. it'd seem the market is not rich enough for what we want, and that we need to try another approach, even if it does abandon our original 'core idea'. I look at it like many of the start up stories which are we started with idea X and ended with A.

The original idea is sound, however we cannot find a way yet to engage the user enough to make it work. I stress yet, as we all agree there is a way, we just aren't sure the way to flip it so the user is engaged. it is a hot topic, just a difficult one to get people to act on.

We keep rethinking our idea, and is just apparent that at least while we try to get the original idea some spice, we need to deviate for a while to raise money. I understand this isn't optimal, but made need to be done.

</comment></comment><comment><USER3> Will people pay for your web-service?

Will charging increase the perceived value?

The DropBox article that was posted a couple of weeks back was interesting, since they were able to monetize the service at differing tiers depending on how people entered the site.

<comment><AUTHOR> I think that the non-original idea we can definitely get paid for. The original idea is different though, it requires a community before people will pay for it.

</comment></comment><comment><USER4> Any link to the product?

<comment><USER5> He's on a throwaway account; I would venture a guess that anonymity is valuable to him/her.

<comment><USER4> Indeed.</comment></comment></comment>


Ask HN: Is anyone else waking up to the lie of "recycling" - <AUTHOR> The numbers don't stack up.  There is no possible way that the tidal wave of garbage being manufactured by the "packaging industry" could possibly ever be "recycled" into some other useful thing.<p>It's a lie.  Who else is waking up to this? <comment><USER2> Interesting. What numbers are you looking at, that give you the impression that they don't stack up? I ask to understand whether you are talking about recycling being a complete failure, or it being hyped up to be more than it is.

</comment><comment><USER3> You're absolutely right, the plastics and "garbage" being manufactured by the packaging industry is not all being recycled into other useful things. Who ever said it was or would. Only a percentage of recyclable plastics even end up in the recycling bin.

So, does that make recycling a lie? Is there another alternative?

Please don't stop recycling, but how about focusing on buying products with less packaging, make sure you recycle what you can.

Find a better way. Calling recycling a "lie" I don't think helps anything.</comment>


Exact numeric nth derivatives - <AUTHOR> http://jliszka.github.io/2013/10/24/exact-numeric-nth-derivatives.html <comment><USER2> Am I missing something or is this begging the question?

For any function that is not a combination of polynomials, you need to have its Taylor expansion up to the desired order of derivatives, so you can't just take an "arbitrary" function and use this method to compute its derivative in exact arithmetic.

So for anything other than polynomials, you just reword the problem of finding exact derivatives to finding exact Taylor series, and in order to find Taylor series in most cases, you have to differentiate or express your function in terms of the Taylor series of known functions.

Edit: Indeed, take the only non-polynomial example here, a rational function (division by a polynomial). In order to make this work, you have to know the geometric series expansion of 1/(1-x). For each function that you want to differentiate this way, you have to keep adding more such pre-computed Taylor expansions.

<comment><USER3> The typical approach is to provide overloaded versions of primitive functions (generally addition, multiplication, subtraction, division, powers, trig and hyperbolic trig functions, exponential and logarithm) for which you explicitly tell the program what the first N terms in the Taylor series are.

The magic is that you also tell it how to compute Taylor series of function compositions, if the Taylor series of the functions being composed are already known - then any arbitrary function composed out the primitive functions can have its Taylor series computed automatically!

For your example, the function 1/(1-x) is the composition of

        x -> -x
        x -> 1+x
        x -> 1/x

and so its Taylor series is already known as long as you have already defined negation, addition and reciprocation.

<comment><USER2> So instead of implementing a full CAS that knows linearity of differentiation along with the product and chain rules, you implement something that for a little less computation can give you exact derivatives at any given point. Am I understanding this correctly?

<comment><USER3> Yes, that's more or less it. The system you implement still knows about linearity of differentiation, the product rule, chain rule etc but it's not a full blown CAS. It can't give you the symbolic derivative of a function (although I guess you can technically apply AD to any numeric type, including a symbolic type..) but it can compute the numerical value of the derivatives at arbitrary points.

</comment></comment></comment></comment><comment><USER3> Very neat. Presumably there is a more efficient method for implementing Nth order automatic differentiation than encoding the dual numbers as NxN matrices, though? To multiply the matrices takes O(N^3) time, whereas by exploiting their known structure I think you should be able to do it in O(N^2) time. Am I wrong?

<comment><AUTHOR> You're right, there's only O(n) information in these particular n x n matrices, so you can multiply them in O(n^2).

The code provided memoizes cell values using the key (r - c), so only O(n^2) work is required to read off the top row of the matrix. I'm planning to make that more explicit in a follow-up post.

</comment></comment><comment><USER4> There's an interesting python library [1] which implements AD as well as has some neat features like automatic compilation to optimized C. It's developed by the AI lab at the University of Montreal, and is pretty popular in deep learning circles. I've found it to be a huge time saver to not worry whether you screwed up your gradient calculations when doing exploratory research!

[1] [http://deeplearning.net/software/theano/](http://deeplearning.net/software/theano/)

<comment><USER5> My personal favorite feature of Theano is the automatic compilation to CUDA code (which would get about 8-15x speed-up over the optimized C code for the deep learning research I was doing).

</comment></comment><comment><USER6> See also the ad package [1] for Haskell which has a number of interesting features of this vein.

[1] [http://hackage.haskell.org/package/ad](http://hackage.haskell.org/package/ad)

</comment><comment><USER7> This seems to be essentially the same thing as "power series arithmetic" (first-order "dual arithmetic" is equivalent to arithmetic in the ring of formal power series modulo x^2, but you can make that x^n).

Encoding power series as matrices is sometimes convenient for theoretical analysis (or, as here, educational purposes), but it's not very efficient. The space and time complexities with matrices are O(n^2) and O(n^3), versus O(n) and O(n^2) (or even O(n log n) using FFT) using the straightforward polynomial representation (in which working with hundreds of thousands of derivatives is feasible). In fact some of my current research focuses on doing this efficiently with huge-precision numbers, and with transcendental functions involved.

</comment><comment><USER8> I couldn't believe it would work, so I made a toy implementation in Python using simple operator overloading: [https://github.com/boppreh/derivative](https://github.com/boppreh/derivative)

All values tried so far agree with Wolfram Alpha, so color me surprised and happy for learning something new.

</comment><comment><USER9> I think it's worth noting that the problem with numerical differentiation, fundamentally, is that differentiation is an unbounded operator. In finite- differences, (the more obvious approach), you assume that your data are samples of some, general, function.

The problem then, is that that general functions have no (essential) bandlimit [1]. Remember that differentiation acts as a multiplication by a monomial, in the frequency domain [2]. Non-constant polynomials always eventually blow up away from 0, so in differentiating, you're multiplying a function by something that blows up, in the frequency domain. This means that, in the result, higher frequencies are going to dominate over lower frequencies, at a polynomial rate.

Let me be clear, the problem with numerical differentiation is not just that rounding errors accumulate, it's that differentiation is fundamentally unstable, and not something you want to apply to real-world data.

It depends very much on what your application is, however, I think generally a better approach to AD is to redefine your differentiation, by composing it with a low-pass filter. If designed properly, your low-pass filter will 'go to zero' faster (in the frequency-domain) than any polynomial, thus making this new operator bounded, and hence numerically more stable. It's not a panacea, but it begins to address the fundamental problem.

One example of such a filter is Gamma(n+1, n x^2)/Factorial[n], where Gamma is the incomplete gamma function [3].

In Python:

scipy.special.gammaincc(n+1,n _x_ _2) or mpmath.gammainc(n+1,n_ x __2, regularized=True)

To see why this is a nice choice, notice item 2 in [4]. This filter is simply the product of exp(- x^2) (the Gaussian) multiplied by the first n-terms of the Taylor series of exp(+ x^2), (1/ the-Gaussian). Since this series converges unconditionally everywhere, as n-> +infinity, this filter converges to 1 for a fixed x (as you increase n), however, since it's still a gaussian times a polynomial, it always converges to 0 as you increase x, but fix n.

This is my area of research, so if anyone's interested I can give more details.

[1] [https://en.wikipedia.org/wiki/Band- limit](https://en.wikipedia.org/wiki/Band-limit) [2] [https://en.wikipedia.org/wiki/Fourier_transform#Analysis_of_...](https://en.wikipedia.org/wiki/Fourier_transform#Analysis_of_differential_equations) [3] [https://en.wikipedia.org/wiki/Incomplete_gamma_function](https://en.wikipedia.org/wiki/Incomplete_gamma_function) [4] [https://en.wikipedia.org/wiki/Incomplete_gamma_function#Spec...](https://en.wikipedia.org/wiki/Incomplete_gamma_function#Special_values)

<comment><USER10> Read the article, it's not about computing derivatives of real world data (using finite differences or whatever), it's about exact derivatives of rational functions specified by a computer program. While what you wrote is interesting, none of it applies to this article.

<comment><USER11> ^ Totally this. It's not meant for differentiating a function known only by its points. It's meant for evaluating nth-order derivatives of functions you can _already evaluate at arbitrary values_. The functions don't even have to be rational. As long as the function can be calculated by a computer by some method, so can its derivatives.

This comes in handy in all sorts of things where you might have designed this fancy kernel function to use in some process where you need to be able to calculate the value of the function and also of some derivatives-- backpropagation for example [1].

As I was told by someone in the field, at one point, people used to generate machine learning publications simply by finding functions that required fancy mathematical tricks to find closed-form derivatives of chosen functions so that they would be usable in learning algorithms. But in many cases, this work is unnecessary if you use automatic differentiation.

It's a really cool concept, applicable in specific situations. If you need to know the derivative of a function that's not fully specified, you need numerical differentiation [2]. If you need a closed-form expression for your derivative function, that's when you need symbolic differentiation [3].

[1] [http://en.wikipedia.org/wiki/Backpropagation](http://en.wikipedia.org/wiki/Backpropagation) [2] [http://en.wikipedia.org/wiki/Numerical_differentiation](http://en.wikipedia.org/wiki/Numerical_differentiation) [3] [http://en.wikipedia.org/wiki/Symbolic_differentiation](http://en.wikipedia.org/wiki/Symbolic_differentiation)

<comment><USER9> > It's not meant for differentiating a function known only by its points. It's > meant for evaluating nth-order derivatives of functions you can already > evaluate at arbitrary values

This is correct. So my comment "I think generally a better approach to AD is to redefine your differentiation", doesn't really apply to AD. Essentially, AD is about differentiating functions, not data.

</comment></comment></comment></comment><comment><USER12> Very neat article. This is essentially calculus with infinitesimals (also called "nonstandard analysis") implemented on the machine. If you like the approach, a more general and rigorous investigation can be had by reading H. Jerome Keisler's book _Elementary Calculus_ , which is freely available online in the 2nd edition here:

      http://www.math.wisc.edu/~keisler/calc.html

The third edition is now in print. I've been studying calculus with it off- and-on for a while and I find the approach very intuitive, though Spivak's _Calculus_ is probably a better book, the "standard analysis" is a little less intuitive (and now, evidently, harder to teach a machine).

</comment><comment><USER13> congratulations, you have implmented the Zariski tangent space using nilpotent matrices. welcome to the beautiful theory of algebraic geometry and schemes.

[http://math.stanford.edu/~vakil/0708-216/216class21.pdf](http://math.stanford.edu/~vakil/0708-216/216class21.pdf)

This really does fall in the ream of algebraic geometry since this method only works for rational functions - as he implemented it.

To numerically compute sin(x + ε) you need the Taylor series.

</comment><comment><USER14> Nice analysis. Hope you don't mind me adding that by omitting terms of the Taylor series you do have some loss of precision, however small. Also, solving linear equation systems may even introduce instability as the following must be preserved: [http://en.wikipedia.org/wiki/Diagonally_dominant_matrix](http://en.wikipedia.org/wiki/Diagonally_dominant_matrix)

<comment><USER3> The point is that when you're considering the Taylor series for a _dual number_ argument, you don't lose any precision, because higher powers of the "imaginary" part of the dual number vanish. The example he gives is

        f(a + be) = f(a) + f'(a)be + 0.5 * f''(a) b^2 e^2 + O(e^3)
                  = f(a) + f'(a)be

because e^n=0 for all n>1\. This isn't an approximation - it's an exact relationship for dual numbers!

You _will_ lose some precision by using floating point numbers instead of an arbitrary-precision real number type, but this is a limitation of the machine you're working on. The method is exact.

</comment></comment><comment><USER15> How does this technique compare to a computer implementation of the kinds of techniques we learnt in High School? Is it easier to implement? More efficient? Are there some situations where it isn't appropriate?

</comment><comment><USER16> There seems to be a typo at the beginning of the "Implementing dual numbers" section. It says:

      The number a+bd can be encoded as...

Should be:

      The number a+b*epsilon can be encoded as...

<comment><AUTHOR> Thanks! fixing...

</comment></comment><comment><USER17> This read nicely until I got to the code block. Does anyone else see this as yellow and gray (with syntax highlighting) coloration--such that it's virtually impossible to read?

</comment><comment><USER18> Is it just me or this article pretty naive? The headline's use of the word "exact" would imply integer arithmetic only, but the computations are done with floating point. So basically (s)he is trading one rounding error for another, which seems to be small-ish in some particular cases. What about discontinuities? And why forward derivatives only? I hope noone will use this for any application that actually relies on exact derivatives.

<comment><USER19> They're exact in the sense that they give the same value as if you had calculated the value of the analytic derivative. This is different from numerical differentiation, which approximates the derivative with finite differences.

</comment></comment><comment><USER20> As a former mathematician, the second sentence is an abomination:

"...but to give you an overview, the idea is that you introduce an algebraic symbol ϵ such that ϵ≠0 but ϵ^2=0"</comment>


What Not To Say When a Friend's Company is Failing - <AUTHOR> http://www.charleshudson.net/what-not-to-say-when-a-friends-company-is-failing <comment><USER2> The two good things I think you can say are:

1\. It is good that you had the wisdom to know when it is time to give up.

2\. This is a good chance to demonstrate that your personal ethnics can standup to adversity.</comment>


Measuring Price Elasticity and More - <AUTHOR> http://avc.com/2015/12/measuring-price-elasticity-and-more/ <comment><USER2> I worked for a product strategy consultant and one of his tools was a detailed chart of the price elasticity of many everyday common objects with very high market penetration.

Pens, for example, are available at basically every price point, and everyone uses them. With a lot homework he was able to define the price elasticity curve for pens. Same with TVs, refrigerators, pads of paper, cars, computers, washing machines, watches, etc.

The key was to treat these curves as the likely outside edges of the envelope for new, similar products.

For example, comparing a prospective pen-based computing system to the elasticity curves for pens, pads of paper, and computers would give us a hint as to the best possible likely unit sales of a pen computing system, based on the predicted price.

He also built a combined curve of all products, which defined the outside edge of price elasticity for the U.S. market in general. We all know that a car costing $100,000 is not going to sell 50 million units a year in the U.S. But what is the maximum volume that _any_ product costing $100,000 can expect to sell? There is an answer! Or at least there was. Sadly, I don't have those documents handy right now.

Then we could plot individual products into that general elasticity envelope. Products closer to the edge were incredibly successful; products deeper in the envelope were not as successful and might be more ripe for competition.

<comment><USER3> Super interesting! Can you share the name of the consultant or advise or where to read a similar report? I'd love to create a similar graph.

<comment><USER2> The name of the company was 4th Wave, it was basically one guy with an EE PhD and a couple of young helpers (that was me for a couple years).

I don't know if he is still in business; this is still basically the same crappy website I built for him in 2002:

[http://fourthwave.com/](http://fourthwave.com/)

</comment></comment></comment><comment><USER4> We are launching a preorder campaing shortly, and I just don't see how I could do this without upsetting people. In our press releases, emails and other places the pricing is clearly laid out. If you are selling a commidity on amazon, this could work, but I think it is easy to ignore the risk to your brand/integrity if you sell something to one person for 100 and the next person gets 60...

</comment><comment><USER5> would it be better to start off selling at cost or lowest acceptable margin and increasing price? having an extended period of time early on with low sales could be pretty harmful, no?

<comment><USER6> I don't think the intention is to run this test for "an extended period of time." You want to gather enough data for it to be significant and then move on to the next price you're testing.

But, it's a very good question about starting high or low. The common wisdom is to always price high and then move lower. I've seen this work well for sales by being able to offer a discount to close a deal. There's also the perception that expensive = high quality. The only real way to know for sure, however, would be to duplicate the test and go high-to-low on one and low-to- high on the other.

</comment></comment><comment><USER7> You need a lot of volume to measure this.

For a new company/product I think it's better to start low and then increase the price if/when you get more business.

<comment><USER8> Does this work for services too?

Wouldn't you upset long term customers?

<comment><USER7> You let old customers stay on their current rate. Then they will think they got a good deal. But of course it works best on products with a lot of growth, making buyers think it's good to buy in now and not later when it's more expensive.</comment></comment></comment>


At Penn, students can get credit for 'Wasting Time on the Internet' - <AUTHOR> http://www.washingtonpost.com/news/the-intersect/wp/2014/10/28/at-penn-students-can-get-credit-for-wasting-time-on-the-internet/ <comment><USER2> It's worth taking a look at the instructor, Kenneth Goldsmith's, bio[0]. He's one of the founders of UBUweb and MoMA's first poet laureate. He also had a recent interview with Stephen Colbert where they talk about his new book which consists of live television and radio transcripts of the moment announcers found out about major events in US history (JFK's assassination, 9/11, etc.) as a study on the language of improvisation.[1]

[0] [http://en.wikipedia.org/wiki/Kenneth_Goldsmith](http://en.wikipedia.org/wiki/Kenneth_Goldsmith)

[1] [http://thecolbertreport.cc.com/videos/5tqazj/kenneth- goldsmi...](http://thecolbertreport.cc.com/videos/5tqazj/kenneth-goldsmith)

<comment><USER3> that sounds like a really interesting idea for a book

<comment><USER4> This appears to be the book in question. [http://www.amazon.com/American- Deaths-Disasters-Kenneth-Gold...](http://www.amazon.com/American-Deaths- Disasters-Kenneth- Goldsmith/dp/1576876365/ref=sr_1_1?ie=UTF8&qid=1414796227&sr=8-1&keywords=Seven+American+Deaths+and+Disasters)

</comment></comment></comment><comment><USER5> I love this. I unsuccessfully tried to get my University to let me create my own major in Pop Culture back in 2005. A decade later, it's an actual option for comms students now.

Also, I bet doing well in this class will be much harder than it appears.

</comment><comment><USER6> Worth noting from the course listing that this is an English/Creative Writing class, not a Computer Science class. So I imagine you would be writing papers about wasting time on the internet rather than actually doing so.

<comment><USER7> As part of its so-called core curriculum, Penn typically requires students in all schools to take a writing class. They kinda go out of their way to offer a variety of interesting options because writing is not everyone's thing. My class was "Man in Nature" and featured Thorough, Emerson, etc. It focused a lot on being in nature, which is also atypical for an English class, just not the kind of atypical that gets reported.

<comment><USER8> I read Thorough in high school. So it's not that atypical...

<comment><USER9> Surely you mean Thoreau...? Given that you read him in high school..

<comment><USER10> His name didn't appear that often...

</comment></comment></comment></comment></comment><comment><USER11> Kenny Goldsmith [0], the guy who teaches this class, has done a lot of thinking about internet-based poetics... highly recommend his book "Uncreative Writing"[1] for those interested

[0] [http://en.wikipedia.org/wiki/Kenneth_Goldsmith](http://en.wikipedia.org/wiki/Kenneth_Goldsmith)

[1] [http://www.amazon.com/Uncreative-Writing-Managing- Language-D...](http://www.amazon.com/Uncreative-Writing-Managing-Language- Digital/dp/0231149913)

</comment><comment><USER12> Love the idea, and how it exposes the absurd rip-off of american higher education. $60K a year to waste time on the internet? That's what you do in most classes anyway. I seriously love this guy. He and UPenn are just flagrantly robbing all these rich, Ivy League kids' parents. Now I really don't feel bad about Googling the course material the 10 minutes before the MIT classes I TA'd.

<comment><USER13> I go to UPenn. I grew up with a single parent making less than 15k a year, but that is less important then the fact that I find classes at Upenn incredibly rewarding in both education and improving my industry skills.

Its an undergrad class ENG 111 (15 seats), so I imagine those who take it costs them around 3600$, so its hardly fair to say they are spending 60k to waste time on the internet. Who knows, maybe people who take it find it rewarding / helpful.

<comment><USER12> Of course, focusing on details. It is more about spending money on something that you can easily do for free. This was not to pick on UPenn. Rather it was more to point out the irony of this professor's class when thinking about the value of American college education.

</comment></comment></comment><comment><USER14> This could also read: "At Penn, students get credit for going to college."

</comment><comment><USER15> I suppose we'll have some post-course experience shared on the internet, but I fail to see the point of the course only from the news article. Maybe I lack creativity?

Although I agree that "[...] the Internet is actually making us smarter.", I wonder what will students write after a semester of 3-hour weekly lectures surfing the web.

</comment><comment><USER16> But that sounds like work.

</comment><comment><USER17> The WaPo article provides so much more info that we changed to it from [http://www.english.upenn.edu/Courses/Undergraduate/2015/Spri...](http://www.english.upenn.edu/Courses/Undergraduate/2015/Spring/ENGL111.301), even though the latter is an original source.

<comment><USER7> This is a great example of how journalism can provide narrative value.</comment></comment>


Sentiment analysis on Trump's tweets using Python - <AUTHOR> https://dev.to/rodolfoferro/sentiment-analysis-on-trumpss-tweets-using-python- <comment><USER2> I see this sort of thing becoming a bigger part of journalism in the future.</comment>


Advice for first time founders - <AUTHOR> https://medium.com/@DavidMack/advice-for-first-time-founders-3834f02cd3b0

<comment><USER4> There are many truths here, but I keep seeing HN articles with variants on the following piece of advice:

"As a founder your sole aim is growth. If you don't have growth now, you are failing."

That's only half-true.

To simplify a bit, there are two types of startups in the world: Twitter, and the hoverboard.

Twitter is easy to build, but the question is: does somebody actually want it? Twitter startups are all about _market risk._

Conversely, if you could build a hoverboard, then _of course_ people would buy it. Hoverboards are awesome. The question is, can you actually build it? Hoverboard startups are all about _technical risk_.

The advice to focus on nothing but growth applies to startups where market risk is the dominant risk. You need to validate that there's actual demand for your product. And that's where advice like "If you don't have scale, you probably don't need (much) technology", "try no-tech," "[edit] static content and embedding some forms" applies.

But if you're building Tesla, or a cure for cancer, or self-driving cars, or most enterprise products, or any number of startups which require a technical breakthrough, you literally _cannot_ focus on growth from the start. The minimum viable product for these types of areas may take months or even years to build. The experiments you should run for those types of startups should validate technical assumptions: for example, can we make a battery energy- dense enough to power an electric car? Or they should validate market demand through customer development, which is actually quite useful in many areas such as enterprise sales where achieving growth may take 6-18 months even in the best case.

In general, when you hear startup advice, it's wise to remember whether the author's startup comes from the world of technical risk or market risk. The right things to do for each type of startup are often complete opposites, and it's easy to get confused since most people give advice based on what worked for them, but don't necessarily include the context which circumscribes where the advice applies.

As always, Steve Blank said it first and better: [http://steveblank.com/2009/05/28/vertical- markets-2-customer...](http://steveblank.com/2009/05/28/vertical- markets-2-customermarket-risk-versus-invention-risk/)

<comment><USER5> _" The advice to focus on nothing but growth applies to startups where market risk is the dominant risk."_

Yep. But there's also a class of startup that we might call the Secret Hoverboard: it's the sort of problem that looks like a Twitter ( _" would people want to get more stuff delivered if it only costs $5?"_), and when you poke at it with the stick of "doing things that don't scale", you see strong consumer demand -- market validation! Secretly, however, there's a hoverboard- sized technical problem between manual labor and profitability (e.g. _" if we can just get our fleet of bicycle messengers operating with X% efficiency we can deliver anything by bicycle for a flat $5 surcharge, which will undercut the business models of all existing delivery services!"_)

These are tricky, because people are so used to market risk being the dominant factor that they can be fooled into believing that the strong consumer demand means that the rest is easy. But really, it's telling you that people _love_ to get something for nothing, and the market got the solution right the first time.

</comment></comment><comment><USER6> "Technology is bad. It distances you from users. It slows down iterations. It's expensive to build. It provides a worse experience than you could provide in person or over email."

I don't quite agree with the saying that "technology is bad". Obviously like anything else, if you mis-use it, it will not generate the benefits you expect, but unilaterally claiming that "tech is something to avoid as much as possible" seems like pretty bad advice.

That's kind of like a pure tech company claiming that "accounting is bad" and "try to avoid accounting as much as possible". Every company needs good accounting at some point. It's foolish to unilaterally assume it will be bad to have it.

Good luck finding good engineers to work for your company. Or maybe, good engineers are really not that important for the company / product you're running / building, which is actually fine for a non-tech-oriented product/company. Most companies aren't tech companies and don't need strong engineering, or even any engineering at all in most cases. Just don't call yourself a tech company, when the focus isn't on tech.

<comment><USER7> You have a valid view. I interpreted the author to be re-stating the "do things that don't scale" advice from Paul Graham.

</comment></comment><comment><USER8> Hmm, we definitely have a different view.

[http://qbix.com/blog/index.php/2011/04/business- models/](http://qbix.com/blog/index.php/2011/04/business-models/)

1\. People live lives. Companies create products.

2\. Make a business model that works

3\. Make it safe to fail over and over, so you can iterate

4\. Measure everything

5\. Nail your engagement metrics

6\. Take advantage of viral loops and optimize them

7\. Optimize engagement

8\. Optimize monetization

9\. Prepare onboarding process and system for future hires, including Partnering Per Project agreements

10\. Attract great people by following 3 - <USER3>

11\. Reinvest into the company.

Optional:

12\. Raise money from investors following 3 - <USER3>

Repeat endlessly until mission accomplished.

</comment><comment><USER9> Many points DNA to hardware/software startups fyi.</comment>


ASK HN: Swift Philosophy - <AUTHOR> The more I develop for MacOS + iOS the more I love it, nevertheless I have the feeling I'm missing some of the ground philosophies of the Swift language. Is there any book, blog you can recommend, where those kind of concepts are written? <comment><USER2> Cocoacasts is good... Not sure if that's what you mean though.</comment>


4 Python Web Frameworks Compared (video, tuts & code) - <AUTHOR> http://www.sixfeetup.com/blog/4-python-web-frameworks-compared

<comment><USER2> Django and Flask rock respectively... The other two not so much...

The article has left out Plones and Zope</comment>


United extends grounding of 737 Max fleet to early March - <AUTHOR> https://www.cnbc.com/2019/11/15/united-extends-grounding-of-737-max-fleet-to-early-march.html <comment><USER2> "Boeing has changed the system to include data from two sensors."

"Boeing also has to to bring airline pilots into 737 Max simulators to assess how cockpit alerts and other factors affect pilot workload."

"Boeing needs to conduct a certification flight with officials and regulators also still have to sign off on new pilot training, which the company expects to have in January."

"Even after the planes are fully cleared to fly, airlines will have to train thousands of their 737 pilots before they can operate commercially. That process can take more than a month."

[https://www.cnbc.com/2019/11/11/boeing-expects-to- resume-737...](https://www.cnbc.com/2019/11/11/boeing-expects-to- resume-737-max-deliveries-in-december.html)</comment>