PHP 5.4.6 released - <AUTHOR> http://php.net/ChangeLog-5.php#5.4.6

<comment><AUTHOR> I wish I understood why # is no longer allowed as a commentline character in php.ini for 5.4

Isn't it nearly universally accepted in every other language?

Let me know if you spot the developer discussion on this logic?

(update: apparently this started with 5.3 not 5.4)

<comment> X-Istence This change was made to fall in line with other .ini parsers, it is after all an "official" configuration file format: <http://en.wikipedia.org/wiki/INI_file>

Using # was an extension on top of what is allowed in Windows...

<comment><USER2> Per that page:

"Some software supports the use of the number sign (#) as an alternative to the semicolon for indicating comments."

What's the 'official' definition of the ini format and what's really _not allowed_?

<comment> X-Istence The ini file format was first introduced in Microsoft Windows. The API's that are available in WIN/WIN32 are probably considered the most official and it does not support # as a comment delimiter...

</comment></comment></comment></comment><comment><USER3> Pleasing to see regular iteration on PHP 5.x after the weirdness around PHP 6.

</comment><comment><USER4> Help me understand what's happening here.

According to the referenced ChangeLog

        Version 5.4.6    16-August-2012
        Version 5.3.16   16-August-2012
        Version 5.4.5    19-July-2012
        Version 5.3.15   19-July-2012

There is a 5.3.X and a 5.4.X version happening concurrently?

<comment><USER5> Perhaps 5.4 made some breaking changes so they'll keep updating 5.3 with security fixes and such for a while until it's fair to ask people to upgrade.

<comment><USER6> Yes, 5.4 introduced breaking changes such as the new array syntax (finally!), among other things. There was also a very heavy amount of refactoring internally in the Zend Engine, which could cause extensions to break.

<comment><USER7> The new array syntax isn't a breaking change; however there was a lot of functionality deprecated in 5.3 that was completely removed in 5.4 which would definitely break some code.

Unfortunately there were some bugs introduced in 5.4 that are preventing us from upgrading (our actual code is fine). Quite a shame as I'm quite looking forward to the new additions.

<comment><USER6> I probably should have worded that better, but what I meant was that the new syntax will cause errors on 5.3.

</comment></comment></comment></comment></comment><comment><USER8> This makes me sad. I have been self-taught PHP developer for 10+ years but after I "discovered" Ruby on Rails there is no going back.

For those of you who still thinks PHP is the best thing - don't give me bad karma :)

<comment><USER9> Why exactly does an update to a language make you sad?

<comment><USER10> Especially one seeing many improvements.</comment></comment></comment>


Things I've Learned in Starting, Running, and Quitting Living for Monday - <AUTHOR> http://livingvalues.wordpress.com/2014/04/07/50-things-ive-learned-in-starting-running-and-quitting-living-for-monday/ <comment><USER2> I'm confused why this is on the front page. The title left me with the impression that this post was about someone quitting to live for Monday aka the start of the work week in most parts of the world, and doing something else.

On clicking the link, I found a blog post with 50 reasons the author of the post came up with for shuttering his business that was called "Living for Monday".

I didn't read the list, just skimmed through the top few and there was nothing profound there.

Just fyi for others.

<comment><USER3> I also expected a completely different article. I'm not sure what the exact point was based on the title and actual article.

</comment></comment><comment><USER4> There is absolutely no context around this post what so ever. I'm going to ask the obvious here; So what exactly "was" Living for Monday?

<comment><AUTHOR> Just posted some context here: [http://livingvalues.wordpress.com/2014/04/07/what-was- living...](http://livingvalues.wordpress.com/2014/04/07/what-was-living-for- monday/)

<comment><USER5> A shorter explanation would be nicer...

<comment><AUTHOR> It was a company that went through several iterations, like many startups. The latest iteration was built on a recurring revenue model for professional development training targeting Millennials at work. Think Lynda meets CreativeLive for people under 35 trying to figure out how to navigate the professional world, especially within corporations and agencies.

The shutdown was a direct result of misalignment of vision with our main investor.</comment></comment></comment></comment>


Lunar mystery solved by recovery of lost Apollo mission tapes - <AUTHOR> https://www.cnn.com/2018/07/09/us/apollo-moon-landings-study/index.html <comment><USER2> Summary: "raw data on the temperature of the moon's surface, as well as a few meters below it, was transmitted from the probes and recorded on magnetic tapes". Some of the tapes were not correctly archived and were only recently found. The previously available tapes showed that "the moon unexpectedly rose in temperature by 1.8°F to 3.6°F near the probes. The possible reasons for this change were debated by planetary scientists for decades." Now with the new data, and because "researchers were also able to look at recently acquired images from the Lunar Reconnaissance Orbiter Camera over the two landing sites, [t]he only scenario that fits this type of warming is that the astronauts caused it. While they were driving[/walking] over the surface, [they] disturbed the moon's surface, which is covered in regolith, a layer of dust and debris. Images from the camera show that those paths were darker, which lowered their albedo, or ability to reflect the sun's light into space", thereby absorbing more heat.

<comment><USER3> Right. Lost mission tapes. We are lucky they happened to appear. Super convenient, how those astronauts happened to double the surface temperature of the moon (oh, near the probes) by just standing there.

<comment><USER4> A change from 1.8 degrees Fahrenheit to 3.6 degrees Fahrenheit is not a doubling by any measure, because Fahrenheit is a relative temperature scale. 3.6F is 0.0039 times bigger than 1.8F

</comment></comment></comment><comment><USER5> Here's the paper ...

Examination of the Long‐Term Subsurface Warming Observed at the Apollo 15 and 17 Sites Utilizing the Newly Restored Heat Flow Experiment Data From 1975 to 1977

> The Apollo heat flow experiment (HFE) was conducted at landing sites 15 and > 17. On Apollo 15, surface and subsurface temperatures were monitored from > July 1971 to January 1977. On Apollo 17, monitoring took place from December > 1972 to September 1977. The investigators involved in the HFE examined and > archived only data from the time of deployment to December 1974. The present > authors recovered and restored major portions of the previously unarchived > HFE data from January 1975 through September 1977. The HFE investigators > noted that temperature of the regolith well below the reach of insolation > cycles (~1 m) rose gradually through December 1974 at both sites. The > restored data showed that the subsurface warming continued until the end of > observations in 1977. Simultaneously, the thermal gradient decreased, > because the warming was more pronounced at shallower depths. The present > study has examined potential causes for the warming. Recently acquired > images of the Lunar Reconnaissance Orbiter Camera over the two landing sites > show that the regolith on the paths of the astronauts turned darker, > lowering the albedo. We suggest that, as a result of the astronauts' > activities, solar heat intake by the regolith increased slightly on average, > and that resulted in the observed warming. Simple analytical heat conduction > models with constant regolith thermal properties can show that an abrupt > increase in surface temperature of 1.6 to 3.5 K at the time of probe > deployment best duplicates the magnitude and the timing of the observed > subsurface warmings at both Apollo sites.

[https://agupubs.onlinelibrary.wiley.com/doi/abs/10.1029/2018...](https://agupubs.onlinelibrary.wiley.com/doi/abs/10.1029/2018JE005579)

</comment><comment><USER6> Anthropogenic Lunar Warming!

(Humans are the worst...)

</comment><comment><USER7> I thought it was talking about these missing tapes: [https://en.wikipedia.org/wiki/Apollo_11_missing_tapes](https://en.wikipedia.org/wiki/Apollo_11_missing_tapes). That would have been amazing.

<comment><USER8> Me too. Some people spent -a lot- of time look for them.

But, ya never know. Remember that warehouse they put Indiana's 'Lost Ark' in? Bet there are -a bunch- of those.

</comment></comment><comment><USER9> This is the experiment in question, for those curious: [https://www.lpi.usra.edu/lunar/missions/apollo/apollo_17/exp...](https://www.lpi.usra.edu/lunar/missions/apollo/apollo_17/experiments/hf/)

The article outlines some of the details as well, but it was lacking in depth, which can be found in the experiment results and details links in the page above.

<comment><USER10> More background on the device:

[https://en.m.wikipedia.org/wiki/Apollo_Lunar_Surface_Experim...](https://en.m.wikipedia.org/wiki/Apollo_Lunar_Surface_Experiments_Package)

Apparently just the plutonium in the power supply of only one of these units would cost today some 20 million USD.

[https://news.ycombinator.com/item?id=17492902](https://news.ycombinator.com/item?id=17492902)

</comment></comment><comment><USER11> Does anyone know how effectively block that annoying video?

<comment><USER12> I have javascript disabled - I don't see a video. Rest of the article loads fine.

</comment></comment><comment><USER13> No. No need to loop around for 80 years. NO. Seriously. No way. STFU

<comment><USER14> If you can't or won't stop posting unsubstantive comments, as we've already asked, we're going to have to ban you.

[https://news.ycombinator.com/newsguidelines.html](https://news.ycombinator.com/newsguidelines.html)

<comment><USER13> [https://en.wikipedia.org/wiki/Russell%27s_teapot](https://en.wikipedia.org/wiki/Russell%27s_teapot)

</comment></comment></comment><comment><USER15> How do tapes like this get lost in the first place? I mean, if you were a startup funding this mission, and your CTO said, "Oops! I totally lost all that data from our multibillion dollar mission!" wouldn't you fire them immediately?

<comment><USER16> Yes.

Except the CTO is dead and his grandson is in charge. And oh, the original building is no longer there. Also, there's no more funding for storage. By the way, the computer systems are no longer compatible and the paper records have faded.

<comment><USER17> And your department is only concerned with future capabilities, historical records are someone else's job. And your company just pivoted from lunar exploration to lunar colonization, no, Mars exploration, no, space stations, no, space defense, no, Mars exploration again.</comment></comment></comment>


Are there any interesting companies out there pushing Augmented Reality? - <AUTHOR>

Are there any interesting companies out there doing new work with Augmented Reality?  I have a personal interest (as I work on an open source library to support it) but I'm also looking to relocate to the Manhattan area and would like to make a career move in this direction.  Apologies, as this is more of a personal appeal, but it would be interesting to see what's going on out there in this new field... <comment><USER2> Go check out Bruce Sterling's blog: <http://www.wired.com/beyond_the_beyond/>

He's got a whole lot of AR links</comment>


The Case for Ending All Traffic Stops - <AUTHOR> https://jalopnik.com/the-case-for-ending-all-traffic-stops-1843925565 <comment><USER2> End ticket quotes. Traffic stops would ease up a bit imho.</comment>


Independent Music Is Big - <AUTHOR> https://medium.com/startup-study-group/independent-music-is-big-really-really-big-242641a2cbee?source=featured<comment>---1 </comment><comment> guard-of-terra The situation with "Music Industry" and "Majors" gives rise to this parable:

Imagine that we would consider "Eating Out Industry" as consisting of McDonalds, KFC and the like - drawing elaborate charts on how they divide market.

And then shove everything else, from falafel shops to Michelin rated restaurants, as "Independent Eating Out". The package includes barely mentioning those "indie" offerings in any media, magazines, etc.

We don't do this for some reason. But we actually could.

<comment><USER2> We don't do this because competition doesn't work that way in the restaurant industry. Location in most cases trumps content. When I look to eat out, I choose amongst the restaurants close to me. Occasionally there's a restaurant I might drive more than ten miles to eat at. But it would be foolish for any restaurant to specifically cater to the long tail when 90% the money is in a 5 mile radius.

<comment> guard-of-terra Believe it or not, people actually travel half the world to experience genuine eating out. Example: Argentinean steaks.

Anyway, you can fit a lot of diverse restaurants into 5 miles radius. The mainstream music selection is much narrower.

</comment></comment></comment><comment><USER3> As a musician, I would tentatively suggest that it is unbelievably difficult to build genuine connections with large numbers of fans.

Call it the data deluge or whatever, the sheer volume of attention seeking content out there just swamps timid voices.

Perhaps this is nothing new, however.

<comment><USER4> Just to play the other side of the argument - does this really matter? Most of the major label music industry now is based on, at best, flimsy (if not outright false) connections between fans and artists. Genuine connections are very different things. If, for example, you could get every fan to pay £1 a month to their favourite musicians you'd only need a few thousand fans to be doing well. Contrast that with the millions of "fans" you need to succeed via traditional, major label routes. I imagine artists who really love their job would find that pretty attractive.

I'm no expert on the industry, but Ben Horowitz has been thinking about this sort of thing for a while afaik - I only know of it through Ryan Leslie, but this article's worth reading: [https://pando.com/2014/11/20/with-the-help-of- ben-horowitz-r...](https://pando.com/2014/11/20/with-the-help-of-ben-horowitz- rapper-ryan-leslie-wants-to-reinvent-the-record-label-for-the-new-music- economy/)

</comment></comment><comment><USER5> "The internet renders business models focused on scarcity and litigation obsolete."

Translation: The whole concept of intellectual property is kind of troublesome for the content aggregators that I invest in and we'd prefer not to pay for any of the media that we sell advertisements around.

<comment><USER5> To make this litigation actually obsolete it will take a constitutional amendment to repeal the Copyright Clause.

The whole point of royalties is to reduce the amount of litigation by having an organized and honorable system of compensation.

The reason YouTube and Pandora have spent the last decade in the courts is precisely because they don't want to have to pay. Instead of being respectful members of society, they decided to hide behind lawyers and put a burden on our publicly funded civil justice systems.

There is nothing in our legal system that will ever allow someone to use someone else's intellectual property and profit from it without compensating the original author. That means that every time someone is selling advertisements on a website around content that is not being compensated, they can be successfully sued for damages, with hundreds of years of common law precedent and statute.

There is no doubt in my mind that intellectual property and copyright have changed drastically from the author-centric in to the corporate-centric form that we have today.

What's needed is reform and a return to an author-centric model, not the wholesale abandonment of copyright.

<comment><USER6> > The Congress shall have Power ... To promote the Progress of Science and > useful Arts, by securing for limited Times to Authors and Inventors the > exclusive Right to their respective Writings and Discoveries.

"Shall have the power", "to promote the progress".

As far as I see it, that's all we need to drop every single copyright law now founded on actual research (just about all of them) and swap them out for something else entirely, if we find something that has a better effect for society.

And I disagree entirely on the view on Youtube and Pandora. You may not like their position, but as far as I can see they haven't destroyed anybody's creative career. We shouldn't be building intellectual minefields and be petty and territorial.

<comment><USER7> How would you know? How would people whose creative careers have been destroyed be visible to you?

I don't dislike their "position", I dislike the fact that they're essentially even more parasitic on musical creators than the old majors used to be.

Have you ever heard of a streaming service paying a talented band/singer an advance? Or taking out ads? Or setting up press interviews?

<comment><USER6> They should be visible SOMEHOW through all the research done on the effect of piracy. How would they go under? Sales displacement, which studies can't prove are widespread?

Spotify pays about the same per play and listener as radio does. How is that worse than the labels?

</comment></comment></comment></comment></comment><comment><USER8> This was bad and dumb.

<comment><AUTHOR> Thank you for the feedback, that helps the author and the community to grow, also is insightful, showing your respect towards other people.

</comment></comment><comment><USER9> This reads as parody. Fawning over some self-important VC, doing 'analysis' that amounts to nothing more than shooting the shit with words and graphs that he doesn't understand. Decrying mistakes startups apparently always make, and using Buzzfeed as an example of some apparently satanic definition of success. Pushing a worldview, not a thought.

The music industry is immensely inefficient; the value of a piece is independent of it's economic value. It's smaller than the porn industry [3], and the top earners are not too distant from it artistically. It's a tenth the size of Apple, though much of the money is concentrated on zero-sum executives lacking a moral compass[5]. My Bloody Valentine's Loveless, Pitchfork's best album of the 90's, never went gold, even in their home country [1]. It bankrupt a studio and broke up the band, and to this day is about 1/100th as popular as Drake albums on Spotify [2]. Still, there is a vast swarm of people for whom Loveless means the world, in a way Drake has never meant to anyone. It's a stoic, effervescent, and unmonetizable titan.

It would be fallacy to assert that the developed world is improving emotionally [6][7], and for many in it music is a mood-regulating sidekick, thereby providing added value where TV et al. provide replacement. It is a levee against the disgusting world neoliberalism and tech utopianism has built for us. Final thoughts:

* Never use the word 'consumer' non-ironically.

* Or write that "there are in fact multiple paradigms that exist within the music universe, all of which operate according to very different rules." Amongst a few other choice phrases.

* Or, in your profile bio, "Lover of Art, Poetry, Startups, Music, Journalism // Tech Founder and Deadpan Humorist".

* Walled-Garden doesn't exist on streaming services; your demented Grandma has recordings of her playing piano on her Soundcloud.

* Streaming does work... if only because nothing else does. And no, no one will tell you 'community'/'live' will work for artists who have enough integrity not to become a living meme.

[1]: en.wikipedia.org/wiki/Loveless_(album)#Certifications

[2]: look it up. There are a few reasons for this, including that MBV listeners probably skew towards torrenting, and that those who stream tend not to leave it on as background music.

[3]: nbcnews.com/business/business-news/things-are-looking-americas-porn- industry-n289431, statista.com/topics/1639/music/

[4]: en.wikipedia.org/wiki/Apple_Inc.

[5]: celebritynetworth.com/richest-businessmen/ceos/lyor-cohen-net-worth/

[6]: monbiot.com/2014/10/14/falling-apart/

[7]: nytimes.com/2015/11/03/health/death-rates-rising-for-middle-aged-white- americans-study-finds.html

<comment><USER10> I agree with you and there is plenty of room for technology to address some of these problems, both in facilitating the creation of music and getting it to the right audience.</comment></comment>


Stephen Wolfram: Something Very Big Is Coming - <AUTHOR> http://blog.wolframalpha.com/2013/11/13/something-very-big-is-coming-our-most-important-technology-project-yet/

<comment> mck- > In most languages there's a sharp distinction between programs, and data, > and the output of programs. Not so in the Wolfram Language. It's all > completely fluid. Data becomes algorithmic. Algorithms become data. There's > no distinction needed between code and data. And everything becomes both > intrinsically scriptable, and intrinsically interactive. And there's both a > new level of interoperability, and a new level of modularity.

Sounds like Lisp :p

<comment><USER2> It's a little beyond that, in some ways. In the LISPs, you can view programs as data, but macros are different from, say, 'if'. The Read and Evaluate parts of the REPL are distinct phases.

Whereas in Wolfram Language, If is just an ordinary symbol that has attribute HoldRest to ensure that it can prevent evaluation of its two clauses until it knows which one to evaluate.

In other words, code is just data (expression) that happens to have specific rules that will cause it to evaluate in some way, yielding a new expression (which could be more code, or partially evaluated code, or data, or whatever).

But you can also have rules attached to several symbols _together_. So for example, when you see a Foo containing a Bar, replace it with a Baz:

       Foo[___, Bar, ___] := Baz;

It's a little like multiple dispatch, but it is slightly more general than even that. And totally pattern based (the pattern language is ridiculously rich).

There's one more twist, which is that everything is not just serializable, but in some sense it _is_ its serialization (called FullForm). It's hard to explain what this means without playing around with stuff.

Also, the language has actual m-expressions, thank god, unlike most LISPs.

</comment></comment><comment><USER3> Sounds to me a little like the Semantic Web and something like Heroku together as a cohesive system. Sounds okay!

</comment><comment><USER4> I may loose some karma here, but I could not decide if the post is pure genius or something written during the maniac phase of a bipolar disorder.

<comment><USER5> Often there's no difference.

</comment></comment><comment><USER6> Existing discussion: [https://news.ycombinator.com/item?id=6726070](https://news.ycombinator.com/item?id=6726070)

</comment><comment><USER7> If you don't have time to read all of the way through, the "coming soon" portion is ready to take your e-mail at [http://www.wolframcloud.com](http://www.wolframcloud.com).

<comment><USER8> So is Wolfram Language: [http://www.wolfram.com/wolfram- language/](http://www.wolfram.com/wolfram-language/)

</comment></comment><comment><USER9> Reminds me of Brett Victor's "The future of programming" ([http://vimeo.com/71278954](http://vimeo.com/71278954)), "Learnable Programming" ([http://worrydream.com/LearnableProgramming/](http://worrydream.com/LearnableProgramming/)) and "Inventing on principle" ([http://vimeo.com/36579366](http://vimeo.com/36579366))

<comment><USER10> Reminds me of Wolfram's earlier book... [http://en.wikipedia.org/wiki/A_New_Kind_of_Science](http://en.wikipedia.org/wiki/A_New_Kind_of_Science)

</comment></comment><comment><USER11> One thing is for sure; clouds are gathering.

<comment><USER12> Winter is coming.

(... at least in the Northern Hemisphere)

</comment></comment><comment><USER13> I remember wolfram alpha being marketed pre-release as something that would make Google obsolete. The only reason I ever use this is for math when I do not have access to a native alternative such as matlab. Considering that I use less math than I used to, I wonder why it is still relevant.

</comment><comment><USER14> Is the language Mathematica and Wolfram | Alpha now use not called the Wolfram Language?

<comment><USER15> The Mathematica language is usually simply referred to as "Mathematica", at least from what I can tell from my experience on mathematica.stackoverflow.com. Probably because the only frontend that allows doing actual work is the Mathematica software (excluding development of own modules).

</comment></comment><comment><USER16> A New New Kind of Science?

<comment><USER17> Sounds like an amped up Wolfram Alpha so more like...

A New Science Of Kinds.

<comment><USER16> Maybe Wolfram Alpha will receive a bunch of bug fixes and finally move up to Beta version?

</joke>

</comment></comment></comment><comment><USER18> It sounds VERY locked to the Wolfram cloud platform and NOT very open sourced… Just makes me think about Oracle type of lock-ins immediately :P

</comment><comment><USER19> Does "embeddable programs everywhere" [paraphrase] sound like a maintenance nightmare to anyone else?

</comment><comment><USER20> Prolog 2.0 , big database included!

</comment><comment><USER21> Mathematica finally gets undo?

</comment><comment><USER22> Oh yeah? Is it a new Segway?

<comment><USER23> That was the biggest "product release" disappointment I've had in my life. I was a naive kid ... huge fan of Kamen (actually, I still am a big fan of the man). IT was going to change everything!!! Bezos and a bunch of other big wigs are investing in it!!! I grew up a bit after that ...

<comment><USER12> If only they had followed Amazon's business model (screw the margins, and scale up as fast as possible) it might actually have taken off...

<comment><USER23> I didn't have as big of an issue with the business model than I had with the product itself. Seriously ... what happens when it rains? How do you navigate pedestrian-dense sidewalks? I'm not George W. but I have managed to crash one.

<comment><USER24> GWB wasn't told the important tip of turning the damn thing on which, for a demo, told me the company had no marketing sense. If you get POTUS with your product, you nail the damn demo or just close the company. GWB is a pretty athletic guy and they couldn't get the demo right.

It goes with the Tonight Show appearance that is probably the single best sales pitch except for the Segway rep trying to play nanny with Jay Leno, Russell Crowe, and Sting with Russell Crowe promoting Gladiator and yelling lines from the movie.</comment></comment></comment></comment></comment>


PHP 5.3.7 release has a major bug in MD5 crypt - <AUTHOR> https://bugs.php.net/bug.php?id=55439

<comment><USER2> Someone forgot to run the unit tests before releasing... So much for a release checklist.

<comment><USER3> Everyone can still log in, what's the problem?

Also, I just checked, there don't seem to be PHP unit tests for crypt(), in their tests directory. ([http://svn.php.net/viewvc/php/php- src/branches/PHP_5_3/tests...](http://svn.php.net/viewvc/php/php- src/branches/PHP_5_3/tests/)).

</comment></comment><comment><USER4> Looks like the bug was introduced by Rasmus Lerdorf, the creator of PHP.

[http://svn.php.net/viewvc/php/php- src/branches/PHP_5_4/ext/s...](http://svn.php.net/viewvc/php/php- src/branches/PHP_5_4/ext/standard/php_crypt_r.c?r1=314437&r2=314438&pathrev=315217)</comment>


How I Asked Mara To Marry Me or The Best PCB Design Ever - <AUTHOR> http://www.billporter.info/how-i-asked-mara-to-marry-me-or-the-best-pcb-design-ever/ <comment><USER2> Definitely passes the geeky test :-)</comment>


SpaceX Starlink satellite almost collided with a weather satellite - <AUTHOR> https://www.technologyreview.com/f/614250/one-of-spacexs-starlink-satellites-almost-collided-with-a-weather-forecasting-satellite/ <comment><USER2> Also on HN, the same story from several different sources in case you prefer one source's bias to another:

[https://news.ycombinator.com/item?id=20861508](https://news.ycombinator.com/item?id=20861508) (215 comments)

[https://news.ycombinator.com/item?id=20861202](https://news.ycombinator.com/item?id=20861202) (comments moved)

[https://news.ycombinator.com/item?id=20871208](https://news.ycombinator.com/item?id=20871208) (1 comment)

[https://news.ycombinator.com/item?id=20873105](https://news.ycombinator.com/item?id=20873105) (1 comment)

[https://news.ycombinator.com/item?id=20867879](https://news.ycombinator.com/item?id=20867879)

[https://news.ycombinator.com/item?id=20869858](https://news.ycombinator.com/item?id=20869858)

[https://news.ycombinator.com/item?id=20873568](https://news.ycombinator.com/item?id=20873568)

[https://news.ycombinator.com/item?id=20874753](https://news.ycombinator.com/item?id=20874753)</comment>


Show HN: Sucrase, 20x faster smaller-scoped alternative to Babel - <AUTHOR> https://github.com/alangpierce/sucrase <comment><USER2> Does anyone have any idea how much performance is being left on the table by writing these compile-to-js compilers in JS? Could we get another 10x improvement by writing the transpilers in something like Go/Rust/C++? Frontend compile performance is beginning to get painful with large codebases...

<comment><USER3> Depending on what you're doing, yes I think there can be a significant speedup.

We had a custom parser in our build toolchain in Perl that needed ~40min for a normal build. I rewrote it in F# (similar performance to C#) and got it down to 3min. Because I thought it was fun I ported it to Rust, and it now runs in 15 secs (mostly because of memory safe, zero-copy string handling and generally better control of memory allocation).

Probably in C# it could have been a bit faster than in F# if you use some of the optimization capabilities. But I doubt you could get close to Rust. Even reading one of the files in .NET takes as long as Rust takes for everything.

In C++ it would definitely be possible to reach Rust performance, it's just way harder to keep your memory intact without the borrow-checking compiler.

Now I don't know how Perl and JS compare, but I'd guess they're in a similar ballpark for performance.

<comment><USER4> Modern JS engines can be significantly faster than Perl in many workloads. Perl's closest performing neighbours are Ruby, PHP and Python.

<comment><USER3> I don't know and I'll take your word for JS (on V8). For Perl vs Python my experience is they are in a similar ballpark in, but Perl has an edge on text processing and Python on numerics (mostly because of better regex engine in Perl and numpy being pretty good in Python). So for parsing stuff Perl is still usually the faster alternative.

I still doubt JS/V8 is faster than one of the VM languages (.NET or JVM), they don't need to be interpreted and have much less dynamic stuff so they can optimize better.

<comment><AUTHOR> My general intuition is that you shouldn't expect JS to beat Java or .NET, but you should expect it to be by far the fastest among similarly-dynamic languages. Browsers have been under fierce competition for many years, and are backed by well-funded engineering teams, so JS performance in particular has repeatedly pushed the limits on what kind of optimizations are possible in a dynamic language. Other dynamic languages haven't had the same incentives.

</comment></comment></comment></comment></comment><comment><USER5> Is there a good way to use this from Webpack?

Edit: [https://github.com/alangpierce/sucrase/blob/master/integrati...](https://github.com/alangpierce/sucrase/blob/master/integrations/webpack- loader/)

<comment><AUTHOR> Yep, looks like you found the plugin! Note that if you're using Webpack 4, you won't need webpack-object-rest-spread-plugin anymore, since it uses the newest Acorn, which should handle object rest/spread syntax without needing a plugin.

Annoyingly, Webpack still spends a lot of time parsing the JS files with its own parser, so you cut down on the transpile time but still need to do a relatively slow parse of all files. I've thought about making Webpack (or similar) use a fast parser like the one Sucrase uses, although it certainly seems like it would be a lot of work.

<comment><USER6> Do you have any benchmarks showing how much time is spent in on webpack plumbing vs babel, comparing to sucrase?

As in, how much does this actually buy you in a real world scenario?

<comment><AUTHOR> I'm not very optimistic about webpack build times getting dramatically better with Sucrase in its current state. I've seen more clear benefits when running tests using sucrase/register. That said, I think it depends quite a bit on your webpack config. Certainly, if you run Babel single-threaded and don't cache the output, then you'll probably get a significant benefit, but that's likely not a realistic scenario.

Some specific numbers I just measured for my codebase at work:

        Babel/TypeScript, cold cache: 66 seconds
        Babel/TypeScript, warm cache: 55 seconds
        Sucrase, cold cache: 52 seconds
        Sucrase, warm cache: 49 seconds

This is on a codebase of about 400,000 lines of code (some JS compiled with Babel, some TypeScript compiled with tsc). Transpilation is parallelized using happypack (and I'm running it on a 4-core machine), but webpack parsing/processing is all single-threaded, so it ends up taking more time. I've done a little prototyping on using a Sucrase-like approach to speed up webpack (most of it is indeed parse time), but it would certainly be a project to get it working in practice.

With a warm cache, it's not running sucrase/babel/typescript at all. I think the running time difference there is because Babel and TypeScript are emitting ES5, which is a little more code for webpack to parse. Probably a more correct comparison would be to configure Babel and TypeScript to target newer JS, but these should all be seen as rough numbers anyway.

</comment></comment></comment></comment><comment><USER7> How does it compare to Bublé?

[https://buble.surge.sh/guide/](https://buble.surge.sh/guide/)

<comment><USER8> Bublé creator here. The obvious big difference is that this supports TypeScript and Flow, which Bublé doesn't. Bublé is designed to compile a subset of ES6+ into ES5 (the subset of ES6+ that transpiles well without causing bloat, which excludes some features like generators), whereas this seems to be focused on more modern targets.

Technically there are a few interesting differences under the hood, such as Sucrase not wasting time generating a full-blown AST (which Bublé needs to do in order to handle things like block scoping).

Anyway, I won't waffle on any further as I'm sure Alan can explain the differences better — I just wanted to chime in to say that I'm excited about Sucrase. I've written a [Rollup plugin][1] for it, and I'm planning to use it with my TypeScript projects.

[1]: [https://github.com/rollup/rollup-plugin- sucrase](https://github.com/rollup/rollup-plugin-sucrase)

</comment></comment><comment><USER9> Would targeting modern Js runtimes yield faster performance in browser as well?

I am guessing some loading time would be improved if code converted from ES2105 to ES5 is not required

</comment><comment><USER10> Thank you for making this. Babel really needs some alternatives.

It would be great to have a Browserify plugin (I'm not asking for anything, just speaking my thoughts).

<comment><AUTHOR> Yep, hopefully this will motivate more of a performance focus in general. To be clear, Sucrase's parser is a slimmed-down fork of Babel's parser, so Sucrase wouldn't be possible without Babel. Also, Babel has a much broader scope as a pluginizable code transformation tool, so it's much better suited for things like prototyping future language features and doing other nontrivial transformations.

Regarding Browserify support, PRs are welcome. :-) [https://github.com/alangpierce/sucrase/tree/master/integrati...](https://github.com/alangpierce/sucrase/tree/master/integrations)

</comment></comment><comment><USER11> I could imagine using the jest plugin, could be useful as a presumably faster alternative to babel-jest.

<comment><AUTHOR> That's the hope! To be honest, I haven't worked with Jest a lot, and the plugin is sort of a first pass to get things working on the Apollo codebase (which uses Jest), so e.g. it may not be as smart as babel-jest for things like caching. Contributions welcome, though!

My specific use case so far has been running Mocha tests on a large codebase, so it's replacing babel-register (which uses a cache) with sucrase/register (which doesn't). For that use case, it seems to significantly speed up test startup time with a cold cache and somewhat speed up startup time with a warm cache. Just loading and saving the babel-register cache takes a fair amount of time, at least in Babel 6.

It's good to keep caching in mind when thinking about this stuff. In many cases, Sucrase won't be faster than loading results from cache. Sucrase helps with initial startup time and avoids the cache fragility issues that I've seen with lots of caching systems. And, of course, you could cache Sucrase results and get something at least as fast as cached Babel.</comment></comment>


Octojam 3: A CHIP-8 Game Jam - <AUTHOR> http://www.awfuljams.com/octojam-iii <comment><AUTHOR> There were video recordings of playthroughs of every game from the previous two years:

[https://www.youtube.com/watch?v=B-FROP4pYe0](https://www.youtube.com/watch?v=B-FROP4pYe0) (2014)

[https://www.youtube.com/watch?v=fxPoscaB8aE](https://www.youtube.com/watch?v=fxPoscaB8aE) (2015)

<comment><USER2> Glitch Ghost seemed to be the favorite of 2014 [https://youtu.be/B-FROP4pYe0?t=17m37s](https://youtu.be/B-FROP4pYe0?t=17m37s)

</comment></comment><comment><USER3> If anyone's interested, I just added the source to a CHIP-8/SCHIP emulator I wrote in Java/OpenGL (through LWJGL) waaay back in the day. It's got a unique rendering style (screenshot at repository) and a hack to try and smooth out the flicker from XOR rendering you get in the original.

[https://github.com/westoncb/java- chip8-emulator](https://github.com/westoncb/java-chip8-emulator)

It might take a minute to get it set up with an old version of lwjgl, but at least the source is there for now. I'll try and get it working and commit the necessary lib files later today, but thought I'd at least make the source available for now.

</comment><comment><USER4> A bit off topic, but if anyone wants to code review/check out my C CHIP-8 emulator using SDL2, I'd love some feedback!

[https://github.com/scanlong/c8](https://github.com/scanlong/c8)

<comment><AUTHOR> I see that you used Cowgod's Chip8 reference. That document gets a number of details subtly wrong. In particular, shift and load/store instructions. I strongly encourage referring to the more accurate "Mastering Chip8":

[http://mattmik.com/files/chip8/mastering/chip8.html](http://mattmik.com/files/chip8/mastering/chip8.html)

</comment></comment><comment><USER5> Since everyone else seems to be posting theirs, here's my CHIP-8 emulator written in C with a GTK+ frontend:

[https://github.com/DavidBuchanan314/chip8](https://github.com/DavidBuchanan314/chip8)

Side note: I used this project to learn both C and GTK+, so there are undoubtedly some bad practices etc.

</comment><comment><USER6> I used to have a chip-8 emulator on my HP48 calculator 20 years ago. Amazing that this kind of software sticks around so long.

<comment><USER7> Oh, it was old even then. It was originally for 1970s microcomputers.

</comment></comment><comment><USER8> I should look into CHIP-8. It seems cool.

Mind, I'm not really sure what it is, or where to start...

</comment><comment><USER9> I just started writing a CHIP-8 emulator yesterday. I have no idea what I'm doing!

<comment><AUTHOR> The resources on the Octojam site may be useful, and Octo can make it easier to produce ROMs for testing purposes. (that's how the project started!)

If you're running into specific problems and you need advice, ask away!

<comment><USER9> Awesome. I didn't know. I'm going to try to get as far as I can using my rudimentary knowledge of how an emulator is supposed to behave and a reference to opcodes and such.

When you say to just ask, do you mean here on hn?

<comment><AUTHOR> Sure. If it's a question that might be relevant to Octo (especially things to do with quirks modes or programming techniques or ergonomics) you can ask a question on the Octo Github page or mailing list.

Despite the widespread cursory interest in CHIP-8, as exemplified in all the VM implementations in this comment thread alone, there isn't currently any sort of centralized community for it. The users and developers of Octo are open to furnishing that to the extent they're able.</comment></comment></comment></comment>


Ask HN: Heroku vs EngineYard - <AUTHOR>

What do you prefer, and why?
Other than the support plan, I don't quite understand why I should use EY instead of Heroku. Why do you use one instead of the other?
Thanks!
Edit: I use Heroku but I see a lot of companies using EY. <comment><USER2> I use EC2 for one project and Heroku for everything else. I don't think I'll use anything besides Heroku moving forward because it's so ridiculously easy to set up and use.

A couple days ago, I needed to set up a new website, so I registered the domain at Godaddy, created a new (free) app on Heroku, and pointed the new domain at the Heroku app via the free, integrated Zerigo solution. I had the app running on a Heroku subdomain within minutes, and was done within 4 hours, including domain resolution.

The speed and cost at which I can produce and validate an idea on Heroku is unmatched by anything else I've seen. Outside of the cost of the domain and my time, I have zero costs to toss a domain up on Heroku. If the idea bears fruit, I can transition over to a paid Heroku plan and keep running with it. If it doesn't, there's no real loss to me.

Meanwhile, it doesn't look like EY offers anything that would cost me less than $85/month.

<comment><AUTHOR> Heroku is nice but I want to know more about EY. If Heroku is so overwhelming, why does anyone uses EY?

</comment></comment><comment><USER3> When in doubt go with Heroku.

P.S -- No one fired for choosing Heroku, yet.

</comment><comment><USER4> Both are great, but different. EngineYard provides much more.

For example, I'm an EngineYard customer. EngineYard developers and support people have spent upwards of 100 hours with me discussing more advanced needs for security, scaling, integration, and professional services.

EngineYard's leadership has especially impressed me with Rails 3, JRuby, and Rubinius.

[http://www.engineyard.com/company/press/10-06-09-engine- yard...](http://www.engineyard.com/company/press/10-06-09-engine-yard- announces-ga-of-rubinius-1)

<comment><AUTHOR> But you pay a lot of money for that. Like I said, other than support I don't see any reason for EY.

</comment></comment><comment><USER5> Use EngineYard if you need better control over servers, installing custom unix packets and stuff like that. Use Heroku for everything else. I've had great experience with both companies, so I believe that you can't go wrong with any of them.

</comment><comment><USER6> I'd love to see a benchmark of per dollar performance of Heroku vs. EC2. Heroku seems more expensive to me, but I may be wrong.</comment>


Fix All Conflicts: Easy-To-use CUI for Fixing Git Conflicts - <AUTHOR> https://github.com/mkchoi212/fac#readme <comment><USER2> One thing I miss on every merge tool is full history context for both sides ("side" == ours/theirs).

i.e., I don't want to just see the _final_ state of ours/theirs, but the _changes_ that us/them did in order to get to those final states.

IOW, often, both sides of the diff are nearly identical, and I have to squint to see the actual difference, and make some additional effort to figure out the _intent_ of each side.

A better format would be, for each side:

Original state -> change -> final state

\- "Original state" would be normally identical for both sides

\- "change" would be tiny and unique for each side, helps you see the intent of each side clearly

\- "final state" is normally pretty similar between sides, (which is what troubles me, if no context given).

Maybe I'm missing something, feel free to correct

<comment><USER3> This is one reason I enjoy doing rebases more than merges - you apply one change at a time, and so get to see the history for at least one of the sides.

<comment><USER4> One thing that always hits me during rebasing is trying to figure out which side is which. Somehow it feels like sometimes they switch, though I'm sure that doesn't make sense.

<comment><USER5> I usually can keep it straight by thinking, which branch would Linus think is his? That's 'ours', and the new, potentially code-breaking branch is 'theirs'.

</comment></comment></comment></comment><comment><USER6> Any non-trivial merge conflict requires producing a hybrid of the two versions. From the screenshot it looks like all you can do is select one of the two versions. Isn't that extremely limiting?

Also it looks like this doesn't show the ancestor version, which is a shame as that's extremely useful.

</comment><comment><USER7> What I frequently have trouble with is knowing what is represented by "theirs" and "ours". I wish it would just tell me the branch name instead because sometimes both commits are logically "ours" or "theirs".

Obviously that would only work for 'git merge branch' scenarios and the like but it'd be great.

</comment><comment><USER8> If I hate one thing, its merges denoted by <<<< old blah >>>> new bleaugh <<<<

of all the diff notations, for some reason FreeBSD updater and git merge chose the worst (for me at least)

<comment><USER9> What is your favorite notation for merge boundaries?

<comment><USER8> See above: the one which provides the most context.

</comment></comment></comment><comment><USER10> For anyone using JetBrains tools like IntelliJ or similar, note that they all include a nice diff/merge tool: [https://www.jetbrains.com/help/idea/running- intellij-idea-as...](https://www.jetbrains.com/help/idea/running-intellij- idea-as-a-diff-or-merge-command-line-tool.html)

</comment><comment><USER11> If you can't install with brew: [https://github.com/mkchoi212/fac/issues/9](https://github.com/mkchoi212/fac/issues/9)

<comment><USER12> It works now! `brew tap mkchoi212/fac [https://github.com/mkchoi212/fac.git](https://github.com/mkchoi212/fac.git) && brew install fac`

</comment></comment><comment><USER13> What's the difference between a TUI and a CUI?

<comment><USER14> Curses User Interface?

</comment></comment><comment><USER15> I like the merge tool i Gitkraken, it makes it easy to choose one side for each conflict or edit the result directly.

[https://support.gitkraken.com/working-with- repositories/bran...](https://support.gitkraken.com/working-with- repositories/branching-and-merging)

</comment><comment><USER16> Haven't tested this yet but for now my preferred solution is to edit the conflict markers directly in vs code then stage.

</comment><comment><USER17> I have basically the same complaint about most of the mergetools I've used; they tend to just do more than I want. I'm sure that's largely a PEBKAC problem, but..... ¯\\_(ツ)_/¯

Definitely going to take a look at this; you screenshots look promising.

<comment><USER18> Have you looked at [https://github.com/Peaker/git- mediate](https://github.com/Peaker/git-mediate) ?

Everyone I talked into using it had always initially thought "meh" but later thanked me - claiming it's a huge life-saver :)

It makes solving conflicts into a fun mechanical game while reducing erroneous merges by a lot.

</comment></comment><comment><USER19> Yeah most CLI mergetools are awefull.. if you want a nice git GUI, just use SmartGit. [https://www.syntevo.com/smartgit](https://www.syntevo.com/smartgit)

<comment><USER20> Or Visual Studio Code.

</comment></comment><comment><USER21> I use mostly [https://github.com/mhagger/git- imerge](https://github.com/mhagger/git-imerge) for complex merges. imerge + meld is wonderful...

</comment><comment><USER22> Looks nice! Would be great if it could show a 3-way diff with the common parent.

</comment><comment><USER23> I had a merge to do today so I installed and tried it. I liked it! Great context for each side of the change and great keyboard controls.

Thanks for creating this mkchoi212!

</comment><comment><USER24> The diff/merge tools shipped with Perforce are good.

They can be used with git as well.

<comment><USER25> I find "beyond compare" to be a very good merge tool. It's not free, but not very expensive either, and works well with git.

(I'm not affiliated with them in any way)

<comment><USER24> Beyond Compare is a good tool. It allows to compare full directories, ignore whitespace, etc.

I recommend Perforce's as a merge tool because it is better than average at the specific task of merging.

</comment></comment></comment><comment><USER26> First, what is CUI??

<comment><USER27> Following links on github, apparently it's Console User Interface. Looking at the project, it's what I've always known as a TUI (Text User Interface). I wonder why this new acronym appeared. It's even causing confusion with Commandline User Interface which sounds like CLI (Command Line Interface) which should be a different type of interface from TUI.

</comment></comment><comment><USER28> wow!

</comment><comment><USER29> What's [https://avatars0.githubusercontent.com/u/5487597](https://avatars0.githubusercontent.com/u/5487597) supposed to be, funny?

<comment><USER30> [https://en.wikipedia.org/wiki/Maggot_Brain](https://en.wikipedia.org/wiki/Maggot_Brain)</comment></comment>


Ask HN: What are the challenges of building a personal assistant like Siri? - <AUTHOR> I'm thinking to build a language-specific personal assistant, like Siri or Cortana. I'm excited about the technical challenge but wondering about its feasibility.
Some of the challenges are:
1. NLP: I am not aware of any non-English library and don't have much background on the subject.
2. Voice recognition: same as the above.
3. Web crawling: there are tons of libraries for doing crawling and I have a decent understanding of the subject.
So few questions:
1. are there any other challenge that I have not considered?
2. is the project feasible?
3. will it succeed? <comment><USER2> Most of the comments here are pretty discouraging, which is reasonable. It sounds like an insanely ambitious project for a single non-expert to take on. But I completely disagree.

You should go for it. Even if you never really get it to work you'll most likely learn a ton along the way. And if you even halfway pull it off it would make an epic "Show HN". Also, a lot of the required technologies are advancing at an incredible rate (both the state of the art and public accessibility). It may well be an order of magnitude easier now than it would have been a few years ago.

I don't have any specific advice other than the usual for any large project: start small and focused, then take it one step at a time. Oh, and read lots of academic research papers.

Good luck!

<comment><USER3> >> "start small and focused"

I'd even go as far you say, use an existing platform like Amazon's Alexa with their hardware to start.

Reading a books like "Calm Technology" and books on lean startups would be good too.

Books: [http://www.amazon.com/Calm-Technology-Principles-Patterns- No...](http://www.amazon.com/Calm-Technology-Principles-Patterns-Non- Intrusive/dp/1491925884)

[http://www.amazon.com/Running-Lean-Iterate-Works- OReilly/dp/...](http://www.amazon.com/Running-Lean-Iterate-Works- OReilly/dp/1449305172)

</comment></comment><comment><USER4> I'm building Abot, an open-source framework that makes it easy and fun to build digital assistants. We try to handle a lot of the heavy lifting you describe above, leaving you to create some cool things! You can see it here: [https://github.com/itsabot/abot](https://github.com/itsabot/abot)

I set out six months ago to do exactly what you describe (build my own digital assistant) but decided it would be more helpful to convert it into a framework and open-source it.

I'm happy to help you get started via our IRC or the mailing list, or discuss the challenges we've faced and specific solutions we chose and why.

<comment><USER2> That's awesome. I'm on my phone and just quickly read through the readme, but it seems a bit like Hubot on steroids. In other words, as easy to deploy and extend as Hubot, but with much more powerful NLP (and voice recognition too, no?)

It's a fantastic idea. I wonder if there's a way to share the data generated as people use it. I would imagine that everyone would benefit from this, though it would have to be anonimized effectively.

<comment><USER4> Thank you :) No voice support yet but it's easy to add your own drivers to support external APIs. Official support for voice is coming in v.2 (ETA June 1st).

Yes, we will absolutely make it easy to share training data via opt-in! If I train a plugin, everyone should benefit without needing a GPU rig or 2 TB of data.

</comment></comment></comment><comment><USER5> Your challenges are almost immaterial compared with what goes into something like Siri.

First you need a way to get input. Is that a text input or do you need voice to text? Google and others can provide a voice to text API to help along here at least at first.

Second you need to make that text meaningful. But what the heck is "meaningful" in this context? Generically running an NLP over this is going to get you sentence structure, etc which may or may not be all you need.

Essentially you need to take this text and turn it into a graph of decisions which can then be executed.

Basically distill the sentence "send a text to Josh saying hi"

To a graph that might have a branch like: Action -> Send -> SMS -> ("email@example.com", "hi")

Categorization is hard. If you can get it reasonable (85% solution) then you'll be pretty good. This is how Siri essentially works.

Things to consider:

\- "How long is the Titanic" is this referring to a movie or the boat?

\- "Where is Aaron's?" Is this referring to the furniture store chain, a friend in your contact list or even the street name?

Source: been looking into this a ton. Wrote this during a hackathon: [http://devpost.com/software/sim](http://devpost.com/software/sim). So this is all very possible :)

</comment><comment><USER6> If you'd like to start simple, you could skip the voice interface and go for a text-based interface like Messenger.

Voice can be a layer that you put on top later, with the extra complexity that the recognition may not be perfect. I guess it really depends which is the most interesting aspect for you.

<comment><USER7> I find with all the voice APIs out there, I would recommend choosing one and diving in. One of the skills is getting comfortable with the interactions between the voice API and the back-end.

</comment></comment><comment><USER8> I would check out Sirius (open source Siri) if I was you:

[http://motherboard.vice.com/read/sirius-is-the-google- backed...](http://motherboard.vice.com/read/sirius-is-the-google-backed-open- source-siri?utm_source=howtogeek&utm_medium=email&utm_campaign=newsletter)

[https://github.com/jhauswald/lucida](https://github.com/jhauswald/lucida)

[http://sirius.clarity-lab.org/](http://sirius.clarity-lab.org/)

</comment><comment><USER9> If George Hotz came in HN and asked about the feasability of doing a self driving car by himself, people would say the same thing, tell him that was impossible. Lucky for us he neither asked HN if he could hack the iphone or the playstation 3 because if he did he could be desencouraged.

Anyway, geohot built a self-driving car and received investment from a16z to hire more people and expand it further. [http://www.bloomberg.com/features/2015-george-hotz-self- driv...](http://www.bloomberg.com/features/2015-george-hotz-self-driving-car/)

My advice to you is study really hard and make it happen. use other people work to leverage your software and go faster. And after that show me and the others what have you made.

</comment><comment><USER10> You can offload both 1 and 2 to third party services - one of the major ones with a properly public API that officially supports (and thus charges for high volume use) use by other parties is Microsoft's Project Oxford [0].

You could also use some of the Google APIs, but those are more-or-less unsupported, and subject to change as Google needs to change them.

From there, it's a matter of transforming intent into action.

It's entirely possible to do, but you'll have a lot of learning to do to implement it. One place you might start looking is at the Microsoft Python blog [1].

[0] [https://www.microsoft.com/cognitive- services/](https://www.microsoft.com/cognitive-services/) [1] [https://blogs.msdn.microsoft.com/pythonengineering/2016/02/1...](https://blogs.msdn.microsoft.com/pythonengineering/2016/02/15/talking- with-python-fabrikam-pizza-shack/)

<comment><USER11> As much as possible, this.

If you, singular, are building Siri v2, you need to do as little as possible yourself. Find an OSS library / tool that does the thing you want, use Caffe/Theano/etc. instead of rolling your own code, use a commercial package if you absolutely have to. Concentrate on the "hard" parts, understanding and translating language to action. Build that part, and glue on all the other stuff. After you get a working thing you can peel off the layers and replace them with something of your own, maybe, or more likely something better will come out by that time and you can plug it in with minimal effort.

</comment></comment><comment><USER12> I was one of those who wanted to build their own Jarvis. If you want it to do certain -pre-defined- tasks like opening Facebook or a website etc., it is not that hard. However, if you want to create something like Siri, you need to use almost everything humanity has in terms of AI/ML until today.

<comment><USER13> It seems to me though that there is a continuum between "multi-channel interactive semi-declarative rule engine" (Frankly, the continuum probably starts back in oldschool IRC bots and expert systems) and "strong AI", wherein the bulk of the value, for me at least, is on the former side of that scale.

The vast majority of the pragmatic functionality I'd use on a day to day basis could probably be built by someone with the willingness to learn about the systems involved, no rocket science or all of humanities ML required :) (I certainly didn't know about anything from scraping to relay control to information retrieval at the start of my pet project)

I guess why I'm saying this is to address yours and some other child comments that seemed more dismissive of the idea due to the complexity (Responded to yours largely because you had gone through the steps of "try it yourself" which I see as the crux of all of this). To the op, Try it! What does it matter if it's out of your grasp. Learn new shit. Realize the extents of your knowledge, and in the process, push them a bit further. If you fail, I would be hesitant to ever call it failure if you even learned a little; I can't tell you the number of pipe dream impossible projects (microkernels, distributed OSes, rewriting AML on my own platform, etc) I've taken on, and despite failing at many of them, the learnings were well worth the time, not to mention the once in a while surprising success at someone you thought was out of your reach.

</comment></comment><comment><USER14> 1\. are there any other challenge that I have not considered?

Always. NLP is a valid way to accept requests. Web crawling is a valid way to get data into the system. How do you tie these two together? How is the data stored? How do create relationships between the data in your system?

2\. is the project feasible?

You have not yet defined your project beyond "like Siri or Cortana". What does that mean to you? How will you know when that has been accomplished? Can you first define a more limited scope for testing the feasibility of the different parts of your system?

3\. will it succeed?

First you must define success.

</comment><comment><USER15> At my company we did it reasonably well, we just released our product to the market. We do have the advantage of having an app-based model, which means that every app the user installs on our product improves the speech recognition and the amount of actions installed.

Getting started is not that hard, getting good is. It's a hard problem to parse speech correctly, take numbers for example: Nineteen-Eightyfour can be parsed as 19 and 84, or as 1948, or as 9 10 80 4. There are challenges, certainly, but creating a simple program with things like wit.ai is do-able. Prepare to write a lot of speech parsing logic, and implement every piece of functionality by hand. Magic as Siri, Google Now, and Cortana may seem, most of it is just hardcoded responses and actions. That need not be a problem, but I can promise you, smart assistants will lose a lot of their magic once your realize it's just a bunch of responses and actions hard coded.

Anyway, I don't want to discourage you from trying, because it's really interesting to try and see what challenges you're going to encounter. The getting started pack for speech recognition is mostly wit.ai, or the Google STT engine. Keep in mind: none of the big companies are doing everything from scratch. Sure, Google has their own speech recognition, but recognizing the trigger phrase (jargon for 'OK Google', or 'Hey Siri') is outsourced. Every piece of software that has such a trigger uses the same library. Remember: using libraries is not cheating, it's just focusing on your core task, which is writing the parsing and actions.

</comment><comment><USER16> "I would like to build a space programme in my back garden, but I'm wondering about its feasibility and I don't have a background in rocketry"

Yes, no and no.

<comment><USER17> Your fake quote sounds a bit like what Elon Musk might've said when he started SpaceX.

<comment><USER16> He didn't start by asking around on HN. Generally people aren't Elon Musk. Even he probably isn't Elon Musk all of the time.

<comment> awinter-py A young composer met mozart and said 'I want to write a symphony, where do I start?'. Mozart spins him a story about starting with short pieces, then apprenticing to a serious composer, mastering the different instruments and gradually working up to it.

The young composer is surprised. 'You didn't do all that'. 'Ah,' says mozart, 'but I didn't ask anybody how'.

<comment><USER18> I used to think that all the "geniuses" didn't ask anyone on how to do things at all, and just go for it. Turned out that they do, and luckily for us, in the internet age we have history.

[https://groups.google.com/forum/#!msg/comp.lang.java/aSPAJO0...](https://groups.google.com/forum/#!msg/comp.lang.java/aSPAJO05LIU/ushhUIQQ- ogJ)

<comment> awinter-py I like how your interpretation of 'do things' is 'set UA string in java spiders'. Einstein visited bohr to rap about the speed of light and larry page asked a mailing list how to use java libraries.

</comment></comment></comment></comment></comment></comment><comment><USER19> The possibility of deep NLP suggest that there are tremendous opportunities for building a personal assistant. For Deep NLP, I would suggest course CS224D at Stanford on YouTube (going on now but also delivered last year: [https://www.youtube.com/watch?v=kZteabVD8sU](https://www.youtube.com/watch?v=kZteabVD8sU)

For Deep NLP, you will need to be solid on linear algebra and machine learning. For introduction to machine learning, check out Andrew Ng at Coursera: [https://www.coursera.org/learn/machine- learning](https://www.coursera.org/learn/machine-learning) and my favorite talks on Linear Algebra are the ones done by Gilbert Strang: [http://ocw.mit.edu/courses/mathematics/18-06-linear- algebra-...](http://ocw.mit.edu/courses/mathematics/18-06-linear-algebra- spring-2010/video-lectures/)

For web crawling, there are plenty of open source libraries. If you are not familiar with it, check out the Common Crawl: [http://commoncrawl.org/](http://commoncrawl.org/) This is a great source of data to crawl.

If you focus solely on NLP and data from the Common Crawl (or even Wikipedia), then you will see where you stand as the smoke clears and you feel comfortable with the state of the art techniques.

Ignore all the naysayers. The good news is that it has never been easier to get started in deep NLP. Once you have the experience of training a model and seeing how well it works, you can decide on the next steps. Perhaps, you will find a niche that is not well-served that you can go after as a first step of a personal assistant.

Good luck.

</comment><comment><USER20> To get an idea of where to start you could check out Sirius [1] which is "an open end-to-end standalone speech and vision based intelligent personal assistant (IPA) similar to Apple's Siri, Google's Google Now, Microsoft's Cortana, and Amazon's Echo."

[1] [http://sirius.clarity-lab.org/](http://sirius.clarity-lab.org/)

</comment><comment><USER21> In this specific case, I would start by trying to come up with an idea for a solution to an existing problem instead of trying to build a solution looking for a problem. Trying to build just another Siri will be wasting your time because you're just one person competing with pretty much all the big tech companies, whereas if you try to build a useful tech for a specific use case and people like it, then you can build your platform on top of it. I've never seen any small startup succeed by trying to build an ambitious "platform" from scratch. Most successful platform companies started out as small application providers and went from there. Some people are encouraging you to do it because that's how you learn things, but I would rather make something people like AND learn something new at the same time, instead of spending the same amount of time working on something that will never see the light of the day.

</comment><comment><USER22> Take a few minutes to discern your motivation.

If you're motivated by learning, you'll certainly do so. You'll probably learn about topics you hadn't considered learning about. Start small and build incrementally. Be patient, you're in for a lot of reading.

If you're motivated by profit, i.e. starting a company, then you need to be strategic. The Big Guys - Apple, Google, MS, etc. - are mostly looking at "general purpose" assistants. Keep in mind that they're putting massive effort into these assistants because the technology will become a central part of products like automobiles.

Perhaps you can find a niche market they're missing so that you can target your research and coding efforts.

As others said, pick a small, focused goal in building an assistant and add goals as you succeed.

</comment><comment> V-2 For what it's worth, the BotBuilder from Microsoft is open-source: [https://github.com/Microsoft/BotBuilder](https://github.com/Microsoft/BotBuilder) \- could be worth a peek.

As the website states, this SDK is only "one of three main components of the Microsoft Bot Framework", and I'm not sure if the other two are open-source, but it shouldn't be all that significant given that it's just integration with Microsoft products, like Office 365, plus the bot directory, which I imagine consists of some ready-to-use bots one could possibly piggyback on.

This is not voice recognition, but once you're past that stage what you have on your hands is a piece of text anyway - which has to be parsed and processed.

<comment><USER23> Please read up what SDK means. It's worthless in OP case.

</comment></comment><comment><USER24> If you dont' want to start from scratch you can use [http://api.ai](http://api.ai) or [http://wit.ai](http://wit.ai)

</comment><comment><USER25> The biggest challenge is probably covering all the corner cases. In this regard, building such a thing is more about "caring/nursing" than it is about "engineering".

But of course, there are some engineering challenges as well, although you might want to use existing solutions (open source or APIs) for that. For speech-to-text you can find many APIs. Here's a nice demo for doing NLP: [http://nlp.stanford.edu:8080/corenlp/](http://nlp.stanford.edu:8080/corenlp/)

</comment><comment><USER26> That mostly depends on what scale you have in mind.

If you simply want to make an app for your own personal use, and you imagine a restricted form of dialog (by which I mean e.g. "query/reply" or "command"-type of dialogs as opposed to open discussions) to trigger a limited set of actions (say, verbatim web searches, control the built-in functionality of a smart phone, etc.) it is feasible.

But that doesn't mean it's easy. But for a project to hack on, why not?

The good news is that there are a lot of tools that can do some of the heavy lifting for you, especially if you restrict yourself to English. You are right that the situation for other languages is not quite as luxurious, but there are tools (of varying quality) for other languages as well, as specially Western European languages.

However, because it's a complex subject matter, expect that you might need to first dig into some linguistic and/or NLP theory in order to get the most out of these tools.

For instance, the Kaldi speech recognition toolkit is a state-of-the-art research software for automatic speech recognition (ASR), and it's open source. The thing is, to get really good recognition results, you might need to train your own acoustic and language models. Hence, you'd need to learn about these things.

For NLU (natural language understanding) there are also a bunch of free software packages available; however, they often follow completely different philosophies and goals. Thus, in order to make an informed decision which one would be the best for you, you'd again have to be prepared to do some reading.

One quite user-friendly service for NLU you might want to check out is wit.ai which was acquired by Facebook last year. They focus on setting the entrance barrier really low for the task of turning spoken input into a domain representation. For example, you can quite easily define rules that turn the utterance "turn down the radio please" into a symbolic representation that you can use in your downstream processing. The big plus here is that they do the ASR for you, so you don't have to worry about that.

If you prefer to have more control over your tool chain, there are a wide variety of scripting languages that you can use to get your feet wet. AIML is sort of popular for writing bots, but it's quite limited and you have to write rules in XML. VoiceXML is a standard that is great for form-filling applications, ie., situations where your system needs to elicit a specific set of information that's required to run a task. A classic example would be traveling: for your system to find a flight for you, it needs to know (a) point of departure, (b) destination, (c) preferred date and time, (perhaps others). So you need to tell the system, or it has to ask about this information.

There are also domain-specific languages like Platon ([https://github.com/uds- lsv/platon](https://github.com/uds-lsv/platon)) that, again, give you more control but also try to make it quite easy to write a simple application.

A next aspect more complex dialog systems typically care about is what the intent of a specific user utterance is. Say, you ask your personal assistant: "do you know when the next bus comes?", you don't want it to answer "yes". That's because your (what is called) "dialog act" was not a yes-no-question, but a request for information. So, you might want to care about how to detect the correct dialog act. Well, first you might want to care about what kinds of dialog acts there are and which of those your system should be prepared to handle.

There are many different dialog act sets developed for different domains and situations. There's also an ISO standard (ISO 24617-2) that defines such a set, but then you'd go into more advanced areas again.

Next, say your system has done all of the above processing, recognized speech, analyzed the meaning, etc. -- now your system has to make the next move! So how does it decide what's the best reaction? What's by some considered the state-of-the-art for dialog management these days runs under the label POMDP -- Partially Observable Markov Decision Processes. These are systems that learn the best strategy on how to behave from data, typically using reinforcement learning. But you also still have the more traditional approaches in which an "expert" (in this case: you) authors the dialog behavior somehow, and there are tools for that as well.

But again, the more simple languages mentioned above like, e.g. Platon etc., also cover this in a way, so don't get discouraged just because you've never even heard of POMDPs so far, nor do you have a large data set that is required for the machine learning part: like with all of the different tasks here, there's always alternatives.

Once your assistant has made up its mind about what to do and what to say, you need to turn that into an actual utterance, right? If you just want to start, having a large-ish set of canned sentences that you simply need to select from can get you a long way. The next step would be to insert some variables into those canned sentences that your system can fill depending on the situation. That's called template-based natural language generation (NLG). More recently, machine learning has also been applied with some success to NLG, but that's (a) still researchy and (b) not even necessary for a first dab into writing a dialog system.

Unless you just want to display the system utterance on the screen, you'd finally need to use some text-to-speech (TTS) component to vocalize the system utterance. There are some free options, such as Festival or MaryTTS, but unfortunately, they don't quite reach the quality of commercial solutions yet. But hey, who cares, right?

One topic I haven't talked about at all yet is uncertainty. Typically, a lot of the steps on the input side of a dialog system use probabilistic approaches because, starting from the audio signal, there's inevitably noise in the input and so the outputs produced on the input side should always be taken with a grain of salt. For ASR, you can often get not just one recognized utterance, but a whole list of hypotheses on what it was the user actually said. Each of these alternatives might come with a confidence score.

That, of course, has implications on all the processing that comes afterwards.

Now, I've written a whole lot -- and yet, there's so much more I haven't touched yet, such as e.g. prosody processing, multimodality (e.g., using (touch) gestures together with speech), handling of speech disfluencies, barge-in, etc.

But I think that shouldn't keep you from just giving it a try. You don't have to write a Siri clone in one weekend. Just like the first video game you write doesn't have to be the next "Last of Us". You can start with Pac-Man just fine, and likewise you can write your first small voice-based assistant that cannot do half the stuff Siri can, and yet have a great time.

<comment><USER27> woa very thorough answer. I wonder what's the reward in dialog pomdp, where does it come from?

</comment></comment><comment><USER28> Apple and Microsoft are investing many millions of dollars [citation needed] in this, there's just no way that you can compete. Not that miracles don't happen and it's only huge corporations that build amazing things, but statistically speaking, the answer is a clear "No, it's not feasible".

If you, however, want to learn a lot, then it's a definite "Go for it".

</comment><comment><USER29> I think the hardest part might be getting lots of context information. Google has a huge database, you probably don't. And Google has access to your calendar, your contacts, your search requests, your location history - and the same for your contacts. They can infer a lot from that.

</comment><comment><USER30> The most epic challenge is to start and get back to work when thing will go wrong. Do it, you'll learn a lot. It will be hard. Post it on Github, ask questions on SO and I hope to see it here as 'Show HN: My f*ckn awesome personal assistant' =)

</comment><comment><USER31> Email me kespindler at gmail. I have relevant work that you'd be interested to hear about.

</comment><comment><USER32> Re 2) Speech Recognition: it seems like using the new Google Speech API is the way to go but I wonder if you can obtain access or if it is very expensive for small companies. I applied a few weeks ago and haven't heard anything from them.

</comment><comment><USER33> What is the scoope for your project?? I mean, emmbedded system this is?? (Hardware/software). Do you think running on dsp/arduino/raspberry?? Exist a lot of doubts. Im working in something like that. Good luck the road is long.

</comment><comment><USER34> Hey, I am also thinking to work on something similar (as a side project). Do let me know if you want to collaborate.

</comment><comment><USER35> It's tricky but there are some nice ways to check the water quickly. Check out LUIS - [https://www.luis.ai](https://www.luis.ai)

</comment><comment><USER36> [https://en.wikipedia.org/wiki/Siri#Supported_languages](https://en.wikipedia.org/wiki/Siri#Supported_languages)

</comment><comment><USER37> To add a few, in addition to the ones you mentioned: 1\. Infrastructure 2\. Scaling 3\. Huge datasets for machine learning

</comment><comment><USER38> 1\. Do you know what you are doing? (not trying to be harsh... it's a serious question.)

2\. Have you read any of the latest research in this area? (think Google scholar).

3\. Often, apps like siri and cortana do not process the sound on the device, but rather send it to a server for processing. There is, of course, exception in cases of small, well-defined applications with limited pattern matching required.

4\. Whether or not it is feasible and/or succeed is based on your ability, performance, and approach. We cannot predict any of that here.

</comment><comment><USER7> Hi Mandela:

By Siri, I am assuming your mean some application that understands speech and carries out commands like answering queries, or carrying out a command? Answering queries is specific domain of NLP. As is developing the acoustic model (roughly the part that links the audio with linguistic units). You will find that there are many sub-problems to tackle. You have to decide on which problems to tackle.

I have very limited experience in this field. If I didn't try out Nuance NLU/MIX at a hackathon a few months ago (and get a lot of help from the Nuance representatives), I would have never taken a stab at writing a voice application.

I am currently building a simple request/response system. Requests of a "HAL, open the pod bay door" nature. As opposed to something more free form and conversational. One has to start somewhere.

 _2\. Voice recognition: same as the above._

As many posters have commented, there are many speech recognition and synthesis systems out there that handle the acoustic model. Some of the system handle languages other than English.

I have tried the Amazon Alexa SDK, Wit.ai and Nuance NLU/MIX. For the most part, they are essentially a client/server model.

1 - At "compile" time, one builds up an acoustic model/language model with samples (at least this is how Nuance works). Or maybe the language model already exists and training through additional use makes it better.

2- At "runtime," a client such as a mobile application interacts with the speech recognition system, via an API. Audio is sent. The speech system parses the audio stream and returns some data structure (or audio if speech synthesis is done). Or in a slight variation, the speech system sends the AST to an end- point for back-end processing. Most of your application will be the back-end that does the meaningful domain specific stuff. For instance, in Alexa, one is developing "Skills"

One of the things I am learning is that there is not a clear cut distinction between what is in the language model and in the back-end. Although the language model allows it, I don't necessarily want to bake in business logic (i.e. Pod bay Door maps onto part number 42). Also the back-end may have to do additional NLP related processing ("Cod bay" is probably "Pod bay").

 _NLP: I am not aware of any non-English library and don 't have much background on the subject._

I found the Stanford course cs224n to be super useful ([https://www.coursera.org/course/nlp](https://www.coursera.org/course/nlp)). There is a book (Speech and Language Processing) associated with the course.

The Peter Norvig paper "How to write a Spell Corrector" ([http://norvig.com/spell-correct.html](http://norvig.com/spell-correct.html)) is very helpful.

Since I am working with Python, I use the book "Natural Language Processing with Python" by Bird, Klein, and Loper and the Python NLTK.

Finally I find that reading the documentation associated with the various speech systems to be very helpful. Vary to suit your needs. For instance, Alexa provides guidelines for U/X like Voice Design Best Practices ([https://developer.amazon.com/public/solutions/alexa/alexa- sk...](https://developer.amazon.com/public/solutions/alexa/alexa-skills- kit/docs/alexa-skills-kit-voice-design-best-practices)).

 _3\. Web crawling: there are tons of libraries for doing crawling and I have a decent understanding of the subject._

I think crawling is the least of your problems. Look at Week 8, Information Retrieval of the Stanford NLP Course.

Mandela, at this point all I can say is go for it! Look at the speech SDKs out there and pick one, preferably one with a large community. Build something small. See if you can work in a computer language and system you are comfortable with (With Nuance, I could work with mostly with Python and avoid Android and Java).

Have fun!!!</comment>


Microsoft's rape joke vs. Nintendo's socially progressive games - <AUTHOR> http://bradofarrell.tumblr.com/post/52826618740/this-year-at-e3-during-the-xbox-panel-during-a

<comment><USER2> 1) [http://i.imgur.com/nqbLmXX.png](http://i.imgur.com/nqbLmXX.png)

2) Subliminial messaging is not much compared to what happened in the magic community a few years back. [http://fivewithflores.com/2012/12/words-mean- things-by-patri...](http://fivewithflores.com/2012/12/words-mean-things-by- patrick-chapin/) "Don't worry, it'll be over soon" is not much by comparison.

3)

>Also they added a pink letter to the Mario logo just to accommodate Peach's re-inclusion into the franchise as a character with actual agency!

This is the same damsel in distress that's been getting kidnapped by Bowser in almost every single mario game? And she's a do nothing royal that was born into her place of agency? And she's being represented by the color pink, because she's a girl.

Social change folks!</comment>


Time-Delayed Eating Leads to Better Food Choices - <AUTHOR> http://well.blogs.nytimes.com/2016/08/09/time-delayed-eating-leads-to-better-food-choices/ <comment><AUTHOR> Possibly useful as part of PR buzz for food delivery services and grocery proxy-shopping services...</comment>