PLT Scheme 4.0 to introduce major new changes to Scheme - <AUTHOR> http://blog.plt-scheme.org/2008/06/plt-scheme-version-40-is-coming-soon.html

<comment><USER2> Unfortunate title. PLT Scheme 4.0 introduces major new changes to _PLT_ Scheme.

</comment><comment><USER3> "Improvements to the PLT Scheme language include better syntax for modules, better support for optional and keyword function arguments, more expressive syntax for structure types, streamlined hash-table operations, new syntax for list comprehensions and iterations, a more complete and consistent set of list and string operations, and reduced dependence on mutable pairs."

In the abstract, sounds like a Scheme that can compete with Python and Ruby.

<comment><USER4> One can only hope. With all the furor over the quality of interpreters that SquirrelFish has kicked off in the community, the MzScheme interpreter is looking pretty good. It's extremely fast and also very lean, and the plt- scheme is a very good language with a competent FFI, multi-platform support, and a lot of advanced features.

</comment></comment><comment><USER5> I've been using the pre-release versions for a while now and there are some nice improvements. Some of the syntactic sugar is really nice to use, like the new module and require forms, and the generalized lambda forms (combined lambda, opt-lambda, define/kw,...).

</comment><comment><USER6> Does anyone else think that PLT Scheme dialect is moving closer to Common Lisp?

<comment><USER3> Stone soup.

Quick summary:

A stranger walks into a village, puts a pot on a fire, fills it with water and, in full view of the villagers, drops in a single stone. Curious, the villagers ask what he's up to.

"Making stone soup."

"You can make soup from a stone?"

"Yes, it's very good. However, it's even better with a little bit of..."

You see how this is going to go. One by one, the villagers bring some little thing or other to add to the stone soup, and in the end they all enjoy some, shocked at how good a soup made from a stone can taste.

The relevance: The whole point of Scheme is to be a minimalist programming language. However, then someone says, "Yes, I love this minimal programming language. Very elegant. However, if you just had support for hash tables..."

After several iterations of this, you have users of this programming language saying "Amazing how much you can do with this minimalist programming language..."

<comment><USER7> No, it doesn't happen that way.

It's SICP that amazes people at what can be done with a minimalist programming language.

People who use a Scheme implementation with lots of additions have no illusions of minimalism.

<comment><USER8> im watching the videos from/about sicp now:

[http://www.swiss.ai.mit.edu/classes/6.001/abelson-sussman- le...](http://www.swiss.ai.mit.edu/classes/6.001/abelson-sussman- lectures/videos/)

amazing stuff, recommend everyone to watch.

</comment></comment></comment></comment><comment><USER9> I just did a little wandering around the available documentation on PLT-Scheme and noticed that large pieces are untouched since 2004. Other large pieces seem to be missing. Seems like an un-propitious start for 4.0! Or perhaps this is what they meant by new work for 4.0 docs...

<comment><USER5> try here: <http://pre.plt-scheme.org/docs/html/></comment></comment>


Microsoft: Windows Phone isn't our focus this year - chris-at http://www.theverge.com/2016/3/30/11333378/microsoft-windows-phone-windows-mobile-plans <comment><AUTHOR> This just makes sense. Their business-oriented phone OS currently doesn't work on the US market's primary business mobile provider (Verizon), and the market share doesn't drive enough apps to the platform for consumers to pick it up. There's not a great angle to go at the phone ecosystem directly.

However, converged OSes are becoming the new thing. Windows, Ubuntu, and now even Android (6.x with multi-window) are looking at a single OS for multiple shapes and sizes. If Microsoft can use it's lead here to drive UWP apps, it's a lot easier to push people to their phones later, since moving UWP apps to mobile is easy.</comment>


Uber now 5th largest "employer" in Bay Area with 20,000 jobs - <AUTHOR> http://www.sfgate.com/business/article/Uber-among-region-s-biggest-employers-but-6199850.php

<comment><USER2> It would be nice to know the breakdown by weekly hours. I suspect this number is just registered drivers.</comment>


China's losing its taste for nuclear power. That's bad news - <AUTHOR> https://www.technologyreview.com/s/612564/chinas-losing-its-taste-for-nuclear-power-thats-bad-news/ <comment><USER2> "Officially China still sees nuclear power as a must-have. But unofficially, the technology is on a death watch. Experts, including some with links to the government, see China's nuclear sector succumbing to the same problems affecting the West: the technology is too expensive, and the public doesn't want it.

The 2011 meltdown at Japan's Fukushima Daiichi plant shocked Chinese officials and made a strong impression on many Chinese citizens. A government survey in August 2017 found that only 40% of the public supported nuclear power development.

The bigger problem is financial. Reactors built with extra safety features and more robust cooling systems to avoid a Fukushima-like disaster are expensive, while the costs of wind and solar power continue to plummet: they are now 20% cheaper than electricity from new nuclear plants in China, according to Bloomberg New Energy Finance. Moreover, high construction costs make nuclear a risky investment."</comment>


AwesomeBall source code on github (over 2M app store downloads) - <AUTHOR> http://github.com/brianpratt/awesomeball

<comment><AUTHOR> Several years ago, this app was written in about a month for an iPhone app development contest sponsored by Omniture at Brigham Young University. The app won the contest and was at one point the #1 free iPhone app in the app store. It has since been neglected as its creators moved on to professional careers unrelated to app development, but we thought it would be nice to release the source finally in case anyone can get any use out of it.</comment>


Why Twitter should fear the new Facebook - <AUTHOR> http://peterharrington.info/post/88959959/why-twitter-should-fear-the-new-facebook-design Why twitter should fear the new facebook <comment><USER2> I find this logic flawed. The problem Peter has is that not 100% of his friends are on Twitter, so he is not getting the response rate he does from Facebook.

It does not matter if 95% of your Twitter followers are not real friends, as long as the 5% that are choose to engage, they will see your posts and be able to respond just like facebook.

There is more 'noise' on twitter, but only people choosing to listen to it, are affected by it.</comment>


Show HN: Lit – a modern literate programming tool - <AUTHOR> https://github.com/cdosborn/lit <comment><USER2> I don't know if this counts as literate programming, but one of my favourite outputs for learning about code is Docco: [http://jashkenas.github.io/docco/](http://jashkenas.github.io/docco/)

Sample output: [http://backbonejs.org/docs/backbone.html](http://backbonejs.org/docs/backbone.html)

<comment><USER3> Yep, he pretty much applied literate programming and first made it practical

</comment></comment><comment><AUTHOR> I think the greatest motivation for literate programming is providing context. After five minutes of reading, you can have a very good high level understanding of a complex program. This just isn't achievable in the same amount of time otherwise.

<comment><USER4> In that vein, you should consider the ability to coordinate a project using literate programming. It is hard enough to understand a code-base in a single file, but when a project has several different directories with a variety of files in each, having a starting document that describes all this structure is extremely important. And one can write the compiler to use that starting document itself to generate that complex structure.

</comment></comment><comment><USER5> I love literate programming, however my main issue with most tools like this one is that they do not properly support compiler/debugger error messages. This is a huge, often unstated caveat. It is very important to be able to read error messages and quickly locate the offending line in the literate source.

For languages that support file/line pragmas like C, literate programming works very well. Alternately, if the language supports goto and can sensibly unravel these statements, one can cobble a weave/tangle script to still have a 1-1 mapping between program and source line numbers.

Otherwise, I find that I need to program in a very functional style in order to force my tangled program to have the exact same line numbers as the literate source. This is possible, but it also negates the advantages of having natural language macro names, since they are essentially equivalent to the function names. In this case, tangle becomes an identity mapping.

<comment><AUTHOR> This is a feature I'm looking to add. It was designed to be included. When I parse the lit file, I record the line no. which will be represented in comments in the generated source file. Hopefully, this will mitigate some of the extra workflow.

The granularity will be for every macro defn, so there will be some ambiguity.

</comment></comment><comment><USER6> The main issue I had with LP in the past is that sometimes you want to modify the code directly, not the literate document and synchronize them. I made such a tool: [https://github.com/aryx/syncweb](https://github.com/aryx/syncweb)

<comment><USER4> Neat. Do you find that you use that a lot? I have thought about it implementing it in the literate-programming tool I wrote, but so far I have found a split screen editor (vim for me) with search to be fairly effective.

On the opposite side of things, I rather enjoy mucking about with the compiled code to diagnose it, and then recompiling to get rid of the diagnostic debris.

<comment><USER6> I use syncweb all the time. I can't go back to just using noweb. Many of the subprojects in pfff have a literate document that is synchronized with the code using syncweb (e.g [https://github.com/facebook/pfff/blob/master/h_visualization...](https://github.com/facebook/pfff/blob/master/h_visualization/Treemap.tex.nw) ). When I have errors in my code, or when I debug my code, I do it on the generated code, not the tex document, so of course if there is a fix it's easier to fix the code directly and far later to synchronize.

</comment></comment></comment><comment><USER7> Telling from the number of recent implementations, Literate Programming enjoys a bigger following than I had expected. Here is my implementation of a similar tool in OCaml: [https://github.com/lindig/lipsum](https://github.com/lindig/lipsum). I have some projects using it on GitHub like [https://github.com/lindig/ocaml- hyphenate](https://github.com/lindig/ocaml-hyphenate), which implements Knuth's algorithm for hyphenation. The README is basically the literate program of the project.

Question for the author: Are the spaces around `<<`, `>>`, and `>>=` mandatory?

<comment><AUTHOR> No they are not

</comment></comment><comment><USER8> From the description in the README I feared that the entire source-code of the program would appear twice in the resulting document; first under the definition of the " _" macro and again wherever each code-fragment was defined. Looking at the contents of the "examples" directory, however, I can see that the "_" macro works more like a table-of-contents.

That's reasonable, in a minimalist kind of way, but it's a bit unfortunate that Lit syntax winds up unmodified in the output document; I'd wind up having to put a paragraph at the top of each document explaining what Lit was and why all the "<< >>" tokens throughout the code weren't actually part of the code.

Also, the resulting HTML doesn't actually validate: [http://validator.nu/?doc=https%3A%2F%2Fraw.githubusercontent...](http://validator.nu/?doc=https%3A%2F%2Fraw.githubusercontent.com%2Fcdosborn%2Flit%2Fmaster%2Fexamples%2FhelloWorld.hs.html&schema=http%3A%2F%2Fs.validator.nu%2Fhtml5.rnc+http%3A%2F%2Fs.validator.nu%2Fhtml5%2Fassertions.sch+http%3A%2F%2Fc.validator.nu%2Fall%2F&parser=html5&laxtype=yes)

<comment><AUTHOR> The project is still early, and the html generation is rudimentary. Will be working soon to validate.

Not sure what you mean by appearing twice. I debated removing the "<< >>" syntax in the generated html, but I don't think it's bad. It's essentially the syntax for macros, which aid in providing context. It's useful in html, because you can quickly refer to the defn of a macro by following the anchor.

<comment><USER8> The readme says:

 _lit only has two valid constructs: A macro definition: << ... >>= and a macro reference: << ... >>_

...from my experience with other macro systems, I assumed that a "macro reference" would be replaced with the content of the macro definition, leading the code-block to appear at the top (under the star macro) and also in the macro definition. I'm pleased to see that's not the case.

I'd rather not have the "<< >>" syntax in the resulting HTML, because it's the syntax for _Lit_ macros... if I'm writing a document in human language A to explain concept B in programming language C, that's already a lot of context, and requiring the reader to also be familiar with literate-programming-tool D is a drawback.

Linking to macro definitions is definitely a useful feature, but I'd rather those links were distinguished with a CSS class so that I could define their location and appearance in the stylesheet, rather than giving them specific text and markup.

<comment><AUTHOR> There should be an HTML class. In the resulting docs I still need a way to separate them from the underlying language (that could be anything). Initially I thought `<<>>` looked archaic, but its rather unique and probably the syntax which clashes with the least number of programming langs.

</comment></comment></comment></comment><comment><USER9> I really really want to like this. Org mode for emacs has really expanded what I could want from a literate programming tool, though. Specifically, being able to execute small segments and have the output immediately usable is rather nice. That you can also feed tables of data directly into the language is also nice.

Granted, I do feel I have a fair bit to learn in how to structure code for others to read. Myself included. I am learning the rather obvious point that keeping a narrative to the code is not easy. And, of course, in the couple of attempts I've done recently, I end with a fairly large dump of "and here is the boring stuff" at the end.[1]

Also, I can't recommend reading straight from Knuth's site heavily enough. His programs are rather interesting by modern aesthetics, but they are all still runnable.

[1] [http://taeric.github.io/DancingLinks.html](http://taeric.github.io/DancingLinks.html)

<comment><USER4> My literate-programming tool, [https://github.com/jostylr/literate- programming](https://github.com/jostylr/literate-programming), has this feature. It really is nice to be able to pipe bits of code into various other functions for compiling (or evaling).

The notion I am working towards is actually more of a literate-project. Something that can do all the grunt tasks, such as linting and testing code, importing data, etc. and weave together bits from multiple literate documents.

<comment><USER9> Do check out org-mode, then. It is surprising how far that tool has been extended.

Many of these features are actually under the label "reproducible research" nowdays. There was a really good talk given on this at a pypy convention a couple of years ago.[1]

[1] [https://www.youtube.com/watch?v=1-dUkyn_fZA](https://www.youtube.com/watch?v=1-dUkyn_fZA)

</comment></comment></comment><comment><USER10> Nice! What do people use literate programming for? I've yet to, but I'm sure I'm missing some cool benefits.

<comment><USER9> It really is a great way to introduce a narrative into the code. Too much of reading programs feels like taking a look at either just a plain convoluted mess, or an index that someone put together for another larger work. (This is especially true for pieces where someone makes a lot of single use functions. Sure, the pieces may be "self documenting," but it is almost akin to just seeing a bag of screws. You know what they do individually, but you don't know why they are there.)

If you have the time, take a look at any of Knuth's programs[1]. Obviously, they are not all immediately approachable, but render them to pdf and give them a try. You'll hopefully be surprised just how much you do pick up.

The only downside, to me, is that I become less concerned with modern trends of long variable names and abstractions that "self document." These are still great, of course, but they don't go nearly as far as knowing the narrative of why a piece of code was written.

[1] [http://www-cs-faculty.stanford.edu/~uno/programs.html](http://www-cs- faculty.stanford.edu/~uno/programs.html)

</comment></comment><comment><USER11> Wouldn't literate programming encourage a very linear style of programming with long methods? It seems like it would encourage the opposite of single- responsibility-principle, since it's really hard to read a narrative that jumps all over the place.

<comment><USER9> I think the catch is the the majority of programs are more linear than the index of methods would give credit to. Sure, some folks are making utility data structures that don't really have much of a narrative to them, I suppose.

I would think for most programs there is a very direct sense of linearity in getting a task done. Sure, you will often have a lot of support methods. But seeing them just directly listed can be as much of a distraction as anything else.

Note, also, for nontrivial applications, you will likely have a collection of literate programs. Not just one giant literate program.

</comment></comment><comment> mck- Literate Coffeescript comes out of the box with Coffeescript. I kind of like it, especially for complicated algorithms where the ammount of comments exceed the lines of code. Here's an example [1] of a kd-tree implementation in literate coffee. It reads beautifully on Github as well, since it's Markdown!

[1] [https://github.com/axiomzen/Look- Alike/blob/master/coffee/kd...](https://github.com/axiomzen/Look- Alike/blob/master/coffee/kdtree.coffee.md)

<comment><AUTHOR> Literate coffescript falls under one one of the pseudo literate tools, i.e. just nice comments. Not to discredit that approach, its just a compromise for most of the benefit. Many of those tools avoid the extra step of having to expand macros and such, before compilation/being interpreted. I ended up borrowing the watch feature, which aids the workflow

</comment></comment><comment><USER12> Erlang uses <<stuff>> to express binary strings. In other literate programming environments, e.g., org mode and noweb, I have to break up the string like

        <<"word"
        >>

...which is ugly. I've tried other workarounds like defining a macro

        -define (bs(X), <<X
        >>

and then use

        bs("word")

...which is still ugly. Any better suggestions?

<comment><AUTHOR> My program has only the two constructs `<<>>` and `<<>>=` which you could rather easily alter. src/Processing.he and src/Parse.hs

</comment></comment><comment><USER13> My gut reaction is that I don't want to be creating a table of contents list of sections by hand.

I feel it's a design error to require the sections be listed at the top _and_ named below. If I want to change a name below, then I have to remember to make the identical change above.

Unless there's something obvious I'm missing about how literate programming works, it seems like a "generate table of contents" macro would be vastly superior to having to maintain it by hand.

<comment><USER14> NB: I've only read the README.md.

My first thought was to use emacs org-mode to manage these .lit files.

My second thought was to consider: do I want name.lang.org.lit or name.lang.lit.org? ... I am leaning towards the latter.

<comment><USER15> If you are using org-mode you should consider org-babel which does all you need for litrate programming and more.

<comment><USER14> I've used org-babel, but I'm still interested in Lit. The 'watch directory' feature interests me, as does the 'proper and complete' aura of Haskell.

I'd previously played around with getting org to do stuff "on commit", via git hooks, but I didn't make much progress (and given the environment I was committing from, I was sure that I was going about it backwards anyway).

Org still doesn't have a universal character escape mechanism!

</comment></comment></comment></comment><comment><AUTHOR> Here is an updated example, because a few people were asking for a more complex example. This is the literate version of the root of the program. *Note that the markdown doesn't include links (in the macro names) like the html, it's just the most convenient to share.

[https://github.com/cdosborn/lit/blob/master/examples/lit.hs....](https://github.com/cdosborn/lit/blob/master/examples/lit.hs.md)

</comment><comment><USER16> What does Lit offer beyond the standard tools?

[http://www.haskell.org/haskellwiki/Literate_programming](http://www.haskell.org/haskellwiki/Literate_programming) [http://www.haskell.org/haskellwiki/Haddock](http://www.haskell.org/haskellwiki/Haddock)

In the README, the example shows a "literate" comment above a Haskell comment -- what's the point of having two kinds of comment?

<comment><AUTHOR> I really need a more mature example to show, which will be coming soon. However, many tools exist which are just eesentially auto documentation (java docs, literate Haskell, docco). Mine is the simplest iteration of a true literate programming tool which allows for code to be restructured in the way best fit for explanation. If you look at cweb, funnel-web, noweb, mine attempts to be a modern version that still implements macro functionality in a modern context (markdown, HTML, easy to build). Literate programming is more than just comments.

</comment></comment><comment><USER4> Great to see more tools like this out there. I wrote [https://github.com/jostylr/literate- programming](https://github.com/jostylr/literate-programming) which is similarly based on markdown. I use _"section name" to insert code from the named section and use markdown headings to delineate the sections.

</comment><comment><USER17> I'm interested - but literate programming like this, as far as I understand from README is not a lot more than having good docstrings in each function.

So maybe I am missing something but sphinx / python seems as good a replacement as can be - although the easy mixing of real code and docs is nice

</comment><comment><USER18> Let's say you broke down your code in good small functions with comments on its purpose, params etc. You also commented blocks of the code with good comments.

I know people often say LP is not just "good commenting". But, really, is above so different than LP?

<comment><AUTHOR> This is my opinion [https://news.ycombinator.com/item?id=8185142](https://news.ycombinator.com/item?id=8185142)

In some cases LP won't provide a benefit over commenting. But the idea is that you step outside of the rules of the language (or more appropriately the interpreter/compiler) and write a story where the order is defined by the ease of explanation, not the order mandated by the machine.

<comment><USER19> Though in Haskell's case, the compiler leaves enough freedom in most cases anyway.

</comment></comment></comment><comment><USER20> Would like to see some more complex examples. I like the philosophy behind it though.

<comment><AUTHOR> I need to read more of Knuth on literate programming. The plan is to finish the source in literate style.

<comment><USER4> You definitely should. It is fantastic stuff. His primes example program is good to do.

You should also consider writing up some easy programming example such as FizzBuzz.

Bootstrapping your code into your own literate programming environment is a must to sit at the lit table :)

</comment></comment></comment><comment><USER21> Not bad. Not sure it'd come close to replacing org-habits for me.

</comment><comment><USER22> Litescript is literate from the start. [https://github.com/luciotato/LiteScript](https://github.com/luciotato/LiteScript)

</comment><comment><USER23> I like it but if you can give some more detailed examples on complex issues, it would be much better. :)

<comment><AUTHOR> If you follow the project, I'm currently writing up the src in literate style :).</comment></comment>


Qatar paid al-Qaeda affiliate up to $1bn ransom for 26 members of royal family - <AUTHOR> https://www.ft.com/content/dd033082-49e9-11e7-a3f4-c742b9791d43 <comment><USER2> "U.S. security agencies believe Russian hackers helped stoke the current crisis in Qatar, planting a fake news story that led to four Arab nations cutting off diplomatic relations, according to a new report." [1]

[1] [http://www.marketwatch.com/story/us-suspects-russian- hackers...](http://www.marketwatch.com/story/us-suspects-russian-hackers- planted-fake-news-to-provoke-qatar-crisis-report-2017-06-06)

</comment><comment><USER3> Interesting this reason was absent from reports about naval ports being shut down surrounding Qatar. [http://www.zerohedge.com/news/2017-06-06/gulf-states- launch-...](http://www.zerohedge.com/news/2017-06-06/gulf-states-launch-naval- blockade-qatar)

</comment><comment><AUTHOR> Direct click-throughs will likely lead to the paywall. Be creative :)</comment>


Baidu unfazed by Google's China inroads - <AUTHOR> http://www.reuters.com/article/internetNews/idUSTRE58A4Q820090911

<comment><USER2> I can't imagine they'd be worried, in the past they've simply routed all Chinese traffic intended for Google, Yahoo, et all to Baidu.

</comment><comment><USER3> Doesn't Google own a stake in Baidu?

<comment><USER4> Used to. They sold it if I remember right. It was like 5 to 10%</comment></comment>


FB event to walk to NSA's Dagger Complex results in a visit by the German police - <AUTHOR> http://www.thelocal.de/national/20130715-50859.html

<comment><USER2> What I don't understand is why the Germans allow the US to setup a base that spies on them. According to the Spiegel the base was setup without local approval. Also also locals have been concerned for a long time because of possible radiation from the large antennas but for what ever reason the local government cant even inquire about it.

Imagine a German military base in the middle of the US that has who knows what kind of equipment on it and the local town can't question it.

<comment><USER3> There's a similar base in the UK at Menwith Hill. They don't welcome visitors as such, but activist/comedian Mark Thomas discovered that due to a quirk in a law, it was legal to fly a hot air balloon over it.

So that's what he did:

[http://www.youtube.com/watch?v=IBksQsAZ2hQ](http://www.youtube.com/watch?v=IBksQsAZ2hQ) (short version)

[http://www.youtube.com/watch?v=epWTJUajIdI](http://www.youtube.com/watch?v=epWTJUajIdI) (full episode)

<comment><USER4> That's just simply fantastic.

<comment><USER5> Mark Thomas is hilarious.

He once organised a bunch of people who went to the big Apple Store on Regent Street and opened a webpage on all the devices there. The contents of said page informed readers (potential buyers) that they could get the same devices at a nearby high street retailer who didn't indulge in shady tax avoidance schemes.

Another time he went around sticking Margaret Thatcher heads on the ladies in girlie mags.

<comment><USER6> Is he still doing any TV shows? I would be so up for that stuff. Just brilliant!

</comment></comment></comment></comment></comment><comment><USER7> Question authority and authority will question you.

</comment><comment><USER8> Not that this justifies what happened at all, but:

 _" Bangert, a veteran of the Blockupy protests in Frankfurt, had set up a group calling itself "NSA spy protection league" (NSA Spion Schutzbund), as if the US spies were an endangered species of birds"_

Would it be more reasonable to think that this individual was probably already being monitored as part of his Blockupy, and perhaps the German government was the one watching him more than the NSA was?

<comment><USER9> German police is monitoring Facebook and has been for years. We once had a Conference at our University. Someone posted something about a party (back when everyone was afraid of facebook parties) and 15 minutes later the police arrived.

They were not allowed to enter the premises, but by coincidence _wink_ _wink_ someone pulled the fire alarm in a then-vacant building 15 minutes later, which opened the gates and barriers for the cop cruisers waiting just around the corner. By coincidence of course.

<comment><USER8> Wow, that sounds like something American cops would do. That's awful.

</comment></comment></comment><comment><USER10> With all the talk of spying and monitoring citizens' whereabouts via license plate scans -- can anybody setup a camera to take snapshots of license plates of cars entering & leaving NSA & other such installations, and cross-reference these against license records?

<comment><USER11> A few years ago at Defcon someone rigged up a Twitter scraper, and found all the tweets that geolocated to the massive NSA headquarters parking lot. That said, it's not clear to me that it's legal to actively attempt to "out" NSA employees.

<comment><USER12> Regardless of its legality, I'm sure the spooks would find an excuse to come shake you down.

<comment> brown9-2 I think most of the time you would want some sort of official response to an attempt to systematically catalog the employees of your nation's clandestine intelligence agencies.

</comment></comment></comment></comment><comment><USER13> Well...at least the German authorities were civilized about it.

Not so sure our authorities (in the US) would have the same reaction.

<comment><USER14> Is that really the point it's gotten to? "At least they didn't kill me for trying to protect my rights".

<comment><USER15> "Jolly good of them to only take a toe"

</comment></comment></comment><comment><USER16> Europe is like Marsellus Wallace in Pulp Fiction (where he's bent over). The US is the thug behind him.

And both seem to be enjoying it.

<comment><USER17> According to released information most of the espionage occurring against Europe is economic. From the UK wanting to know what German interest rate policies were back in the 1980s to Airbus to current the current state of EU finances and what they are planning to do.

Germany is in a fantastic economic situation and has unparalleled soft power across Europe at the moment. So yes, certain European nations are enjoying it, and are not in the slightest bent over.</comment></comment>


Seattle-area provider becomes haven for online extremism after El Paso shooting - <AUTHOR> https://www.geekwire.com/2019/seattle-area-web-services-provider-becomes-haven-online-extremism-following-el-paso-shooting/ <comment><USER2> I understand the argument by Epik... I'm not sure moderating this content by law is helping anything. Can the FBI not use sites like these to its advantage in some way? I also understand the existence of these sorts of sites leaves a sanctuary for hateful ideas to spread and grow. And that even if we certainly can't stop them, the big popular ones are easier for people to fall into than some dark net site.

However, I certainly don't agree that Cloudflare should be content arbiter unless they've been instructed to chop 8Chan by the Government. And I believe there is great value in the ability for people to see these extremists ideas and not forget their existence. Not forget our past.

<comment><USER3> > And I believe there is great value in the ability for people to see these > extremists ideas and not forget their existence. Not forget our past.

If that's your argument... why not just build a museum? Or have an educational program in schools?

Insofar as racially motivated terrorism is a plague, it seems like you're suggesting that we allow a reservoir for the plague so that we don't "forget our past" experiences with that plague. Contrarily, I'm happy to learn about Yersinia pestis in school or at museums, not by allowing an ecosystem for it to exist.

</comment></comment><comment><USER4> Extremist web sites do seem like awful incubators. I also have to think that a culture that worships celebrity, combined with guaranteed instant fame/notoriety for perpetrators via extensive news coverage ("if it bleeds, it leads") is also part of the incentive for murder. But a free press is essential to democracy - I don't think we want to go back to press censorship.

</comment><comment><USER5> I don't really understand the reasoning so many people here have behind shutting down 8chan. Twitter, Facebook, and many other mainstream websites are replete with mass murderers. The response presumably will be that those sites are also replete with non-mass murderers - I agree! So is 8chan. Then the response presumably will be that the vast majority of 8chan users aren't mass murderers, but the site doesn't have a legitimate purpose like Facebook and Twitter and is "a breeding ground for hate".

Now we're in the business of deciding whether a site has a legitimate purpose because potentially (and I haven't seen any data on this - it sounds true, but would be nice to have before making these big assumptions) an outsized proportion of its users discuss controversial subjects. So, okay, private companies don't have to associate with 8chan...now we're seeing supporters of 8chan creating their own companies and services and choosing to associate with them, who inevitably are accused of creating "havens for online extremism" and hate and often are cut off from payment processors, banks, and other essential services a company needs to get by. I wonder - when this "just build your own website/hosting company/payment processor/undersea cable" free market treadmill reaches its logical conclusion, if people somehow do manage to build their own banks and undersea cables and whatever, won't they all be accused of the same thing and face some fresh shutdown attempt?

Let's just be honest, many of you don't like the content of their speech and want it gone. I would rather have an honest debate about whether free speech should exist or not rather than these ancillary discussions that don't really have much to do with the true intentions at play.

<comment><USER6> Twitter, Facebook, and many other mainstream websites will remove accounts and threads of those with certain content (beyond what is strictly illegal), and 8chan will not. This is the reasoning why it's OK to shut down 8chan but not the other providers.

There is a difference between a real discussion of controversial subjects and emotional-driven posts that don't further a logical point but just provide fuel to get someone to do something (i.e. incite). So it's possible to draw an actual, objective line.

> when this "just build your own website/hosting company/payment > processor/undersea cable" free market treadmill reaches its logical > conclusion, if people somehow do manage to build their own banks and > undersea cables and whatever, won't they all be accused of the same thing > and face some fresh shutdown attempt

Probably.

> Let's just be honest, many of you don't like the content of their speech and > want it gone.

Content that does nothing but encourage/get other people to kill innocent people is useful for a society to suppress and I support it. I happen to also not like this content, but it's a coincidence.

Hard absolutist points of views in respect to rights leads to them eventually being trampled or effectively useless for real people. An example for speech - advertising/marketing is speech, but too much of it makes a communication medium useless (part of why no one wants a landline phone anymore).

<comment><USER7> I haven't used 8chan but I doubt 100% of their content is hateful content. I also doubt most of their users are hateful...

If you penalize and normalize website censorship because of bad actors then what's to stop a big company from barraging a smaller site with malicious users to get it taken down thus removing competition?

It's a dangerous game to play if anything. You can only do so much with the money you have. I know I couldn't stop people from commenting hate on my websites, I don't have the resources or people to deal with that. Should I be taken down for something I can't control? Do I have to have a certain ratio of content to get by? How long is the window to fix bad content?

<comment><USER6> > If you penalize and normalize website censorship because of bad actors then > what's to stop a big company from barraging a smaller site with malicious > users to get it taken down thus removing competition?

The smaller site will have to do what Voat is currently doing and restrict registrations and access for a while. Ultimately the fact that big players can shove smaller players off line is weakness of IPv4 address exhaustion and designing platforms on a strict centralized client-server model, not a model of suppressing violence-inducing speech.

> I don't have the resources or people to deal with that. Should I be taken > down for something I can't control?

Yes, because you can put a banner on your page "Hey users, we can only support X users for required moderation of violent content with our current resources. Will you give us more money to support X+Y users?"

<comment><USER7> Well with that it means the internet belongs to Google, Facebook, and Amazon.

No point in even trying to build anything because they'll just DoS you with malicious users and you get rejected from all platforms.

Great solution chief.</comment></comment></comment></comment></comment>


Ask HN: Favorite domain registrar? - <AUTHOR>

This has come up before, but it's nice to revisit every now and then in case some new, better options have surfaced. <comment><USER2> I like [http://namecheap.com](http://namecheap.com) \- It is cheap, and does everything I need it to.

<comment><USER3> I go with namecheap too, no problems at all, just works and it's not complicated. Can't be happier.

</comment></comment><comment><USER4> [https://www.gandi.net/](https://www.gandi.net/) might not be the cheapest, but is without doubt the most trustworthy and ethical

<comment><USER5> They also give you a free SSL cert with your domain, and their UX for things beyond purchasing the domain doesn't suck.

</comment></comment><comment><USER6> [https://iwantmyname.com/](https://iwantmyname.com/) is very, very good.

<comment><USER7> Seconding this. I've used it for more than a year, very happy with the spartan no-nonsense interface.

</comment></comment><comment><USER8> I recently switched from [http://www.name.com/](http://www.name.com/) to [http://www.namecheap.com/](http://www.namecheap.com/) because Namecheap accepts Bitcoin. All has been well thus far.

<comment><USER9> Aside from the bitcoin reason, was there anything wrong with Name.com?

</comment></comment><comment><USER10> [http://domainhelp.tucows.com/](http://domainhelp.tucows.com/)

</comment><comment><USER11> [http://www.name.com](http://www.name.com)

</comment><comment><USER12> dnsimple.com</comment>


Show HN: Our response to a competitor with 4M users that was acquired - <AUTHOR> https://www.sandglaz.com/promo/astrid

<comment><USER2> Mind sharing results?

<comment><USER3> Hi there, I'm with Sandglaz.

We launched this late Monday evening and saw our first handful of signups and data imports.

Yesterday, our new user sign ups were 83% higher than an average Tuesday for us. Also got some media coverage.

Today at Noon, we've generated more new sign ups and traffic than an average Wednesday.</comment></comment>


Machine Translates Thoughts into Speech in Real Time - <AUTHOR> http://www.physorg.com/news180620740.html

<comment><USER2> wow.

<comment><USER3> x2. This is some really impressive work. I wonder which platform they will use for the synthesis? This (regrettably discontinued) device yields the most impressive results that I'm aware of without using pre-programmed phonemes: [http://music.yamaha.com/products/features.html?productId=624...](http://music.yamaha.com/products/features.html?productId=624855&hierarchy_id=16392_16244)</comment></comment>


Free-to-play Revenue Overtakes Premium Revenue in the App Store - <AUTHOR> http://blog.flurry.com/bid/65656/Free-to-play-Revenue-Overtakes-Premium-Revenue-in-the-App-Store <comment><USER2> this jibes with what i know about friends with their own android apps; most of the revenue is coming from ads and virtual purchases</comment>


The Nasty Exploding Term Sheet - <AUTHOR> http://www.techcrunch.com/2009/03/22/the-nasty-exploding-term-sheet/ <comment><USER2> Doesn't it seem like some of these tactics select for the type of person who shouldn't be starting a business? Maybe there are some positions where you want people you can push around, but certainly you want a founder who's capable of pushing back. It would seem more rational to verbally bring up the exploding term and then opt not to provide the termsheet unless the founder argued it.</comment>


SMS Notice or PoorMansBerry: comments please - <AUTHOR> http://defcraft.org/sms-notice/user/index <comment><USER2> This ability comes in handy occasionally (rarely) for me, but I just use Verizon's email-to-SMS service and procmail. What would get me to switch to this, though, would be if you offered a command-line of sorts that lets me control it by sending it SMS messages. For example, let me tell it to start forwarding or ignoring emails that match certain rules.

</comment><comment><USER3> Cool, but how is this different than <http://teleflip.com?>

Also, it's been possible to send text messages to your phone for a while, see: <http://lifehacker.com/software/cell-phones/send-sms-from-email-127033.php>

<comment><AUTHOR> i don't know what teleflip does, but this app has started out of a basic need: when i'm away from my computer, i would like to know if i have received any (important) emails. right now it truncates an email to 140 characters, so you can't read the entire mail (most of the time) -- just know the sender and subject and the first line...

</comment></comment><comment><AUTHOR> btw it only works for cell phones in the US. and on popular carriers... (using the email-to-sms interface the carriers provide -- for example if you send an email to email@example.com, then a sms message will be delivered to PHONENUMBER) see the lifehacker link that sam odio provides above.

</comment><comment><AUTHOR> if someone wants to work with me on this, email me (sri at defcraft dot org). work to take this public (right now it won't handle a massive load) -- it is build with ruby on rails and python, so if you have productions experience with rails -- that'll be helpful.</comment>


50 Things I Pretend to Know Now That I Am Nearing 50 - <AUTHOR> http://www.jamesaltucher.com/2016/07/50-things-pretend-know-now-nearing-50/ <comment><USER2> _23) War is never justified._

Is arresting criminals justified? Is protecting yourself against criminals justified? Is keeping the justice system justified?

If you believe that the war is never justified then you lost it before it even started.

Yes, we should be disgusted by using the violence. Yet we should be ready and willing to use it when it is the only option left.

 _25) Only math you need ..._

What about derivatives? Integrals? What about Fourier transform? Sorry, but I am not buying.

But I guess that it is a great advancement from believing that it is enough when you know how to count.

 _45) Nobody knows how World War I was started..._

Sorry, but we have at least by now quite good understanding about how the things got escalated and what was the historical background for it. The war was escapable till the last minute. Just the people involved saw it more profitable to let it happen.

</comment><comment><USER3> Is this parody?

> War is never justified.

> Ability is 99 parts skill, one part talent.

> The only math you need is: add/divide/multiply in your head. And basic > probability and statistics and percentages.

I mean, if it makes you happy, keep telling yourself that.</comment>


A proof that the quicksort algorithm terminates on all inputs - <AUTHOR> https://gist.github.com/868615 Testing my new language... This might be the slowest quicksort implementation yet, but hey, I didn't claim the code was optimal. <comment><USER2> When I read proof, I assumed you meant you proved your quicksort returned an ordered permutation, but after looking at your webpage, I see you are only claiming to have proved termination.

Not sure why you posted the github instead of your webpage, as without any explanation this code is nearly unintelligible. It would be interesting to hear an explanation of your example, it really is difficult to decipher.

If you are interested in proving things about programs, you may want to check out some mechanical theorem provers such as ACL2, HOL or PVS.

</comment><comment><USER3> That's very cool. Can you extend the type system such that functions are known to terminate?

I've been curious about this since graduate school ( [http://blog.mathgladiator.com/2011/03/research-problems- for-...](http://blog.mathgladiator.com/2011/03/research-problems-for-2011-and- beyond.html) ), and I've known for a while now that if you drop the turing machine capability, then you can build machines where halting is decidable.

Does your language actually prove it halts, or more aptly, can you answer "Does it halt with either yes, no, unknown?"

</comment><comment><AUTHOR> Testing my new language, see <http://typesandotherdistractions.com>

</comment><comment><AUTHOR> Everything involving only catamorphisms (|...|) terminates, since all atoms in the language define terminating functions, and least fixed point types can only be constructed in finite ways using the 'in' function or by catamorphism themselves, so are necessarily finite.

</comment><comment><AUTHOR> You may also be interested in Charity : <http://pll.cpsc.ucalgary.ca/charity1/www/home.html> \- there is a similar quicksort algorithm on the Examples page.</comment>


Show HN: Thought Train 2 – Replace your Sticky Notes with this menubar app - <AUTHOR> https://thoughttrain.cc/ <comment><AUTHOR> Hey fam!

A few months ago I linked a preview to the second version of the app I've been working on.

Thought Train originated by me losing my train of thought while busy at work, and morphed neatly into a way for myself and others to replace the plethora of sticky notes lying around our desks.

The app sits neatly in your Mac menubar or Windows taskbar and is quick to access with a useful short cut on both OS's.

The features are lightweight, focussed on productivity.

Cloud syncing with full note encryption. Drag & drop re-ordering. Edit, copy and paste functionality for quick use. A full markdown editor for more in- depth note taking. Cross-device compatibility. A shortcut key for quick app access. Windows and Mac support

Let me know what you think!

</comment><comment><USER2> This could work as a conventional desktop app with a one-time fee license, or possibly as a subscription-based _web_ app. But a native desktop app + subscription is an instant No for many people, me included. Subjective and irrational, granted, but that's how it is. What is _installed_ must belong to me.

<comment><AUTHOR> Really appreciate the comment thanks!

That's interesting thinking, definitely something I'm going to take on and see how I can implement.</comment></comment>


Facebook spam king to pay $711M to Zuck et al according to CA court ruling - <AUTHOR> http://www.mediapost.com/publications/?fa=Articles.showArticle&art_aid=116534

<comment><USER2> See also discussion at:

<http://news.ycombinator.com/item?id=912295></comment>


Why I Want to Build Lyft for Kazakhstan and Why It Can Fail - <AUTHOR> http://nowaternomoon.com/post/75473498077/why-i-want-to-build-lyft-for-kazakhstan-and-why-it-can

<comment><AUTHOR> Is the 'awesomeness' control across all the drivers the top operational challenge?</comment>


Show HN: I made a web app to help me keep habits as weekend project. Feedback? - <AUTHOR> http://circlehabits.appspot.com/

<comment><USER2> Looks nice. How do you store the amount of days, is it in cookies or using the HTML5 storage API? I think I might use it though I don't have any ideas.

<comment><AUTHOR> I am using localStorage. This allows me to expand to tabbed habits in future, if people find them useful

</comment></comment><comment><USER3> Nice UI. Looks clean, but why did you limit to only 30 days? Habits take longer to form</comment>


Show HN: Orbital Index - <AUTHOR> https://orbitalindex.com/ <comment><AUTHOR> A friend and I have been writing Orbital Index for about 2 months now. Our subscriber base has been growing slowly but steadily. Any feedback greatly appreciated! Here's the most recent issue: [https://orbitalindex.com/archive/2019-05-14-archive- Issue-12...](https://orbitalindex.com/archive/2019-05-14-archive-Issue-12/)

</comment><comment><USER2> I subscribed maybe a month ago. They seem to have an enthusiast's eye for cool articles. I recommend this for what that's worth.

<comment><AUTHOR> Thank you for the unsolicited recommendation! I'm glad you're enjoying our work.</comment></comment>


Ask HN: Which tech company is most transparent internally? - <AUTHOR> Which tech company has a culture of openly sharing with all of its employees how and why it comes to its strategic decisions?
At team meetings, this would manifest itself as the leadership presenting the different difficult options they could have chosen from, and then explain why they went with a certain option despite the uncertainties.
Do cultures like this exist at larger companies? Where? <comment><USER2> Gitlab, a lot of there stuff is super well documented because of their remote culture.

</comment><comment><USER3> At Mobile Jazz we've a weekly meeting every Wednesday with everyone where we share all company updates. We're not a large company (~20 team members) and we also deliberately want to stay small, simply because we really enjoy this culture of being fully transparent (amongst other reasons). The bigger it gets, my feeling is that it's harder to make everyone happy and transparency turns into endless debates, so bigger companies, as a result of that, usually end up being less transparent.

Coincidentally, we just released today our company handbook:

* [https://mobilejazz.com/company-handbook](https://mobilejazz.com/company-handbook) (landing page, if you want to get email updates)

* [https://mobilejazz.com/docs/company-handbook/mobile-jazz-com...](https://mobilejazz.com/docs/company-handbook/mobile-jazz-company-handbook.pdf) (direct link to the PDF)

Hope someone finds it helpful! :-)

Edit: typo

</comment><comment><USER4> Stripe have an open email system where all emails are visible to all employees [https://stripe.com/blog/email-transparency](https://stripe.com/blog/email- transparency)

</comment><comment><USER5> I don't know, Buffer considers a small or medium company (you asked a larger company), but they have transparency on equity, salary, revenue, pricing, and soon. Details of transparency are presented on [https://buffer.com/transparency](https://buffer.com/transparency).

They also share inside their company on [https://open.buffer.com](https://open.buffer.com).

<comment><USER6> I second this. The fact that their salaries are all publicly posted, from CEO down, is mind blowing to me.

</comment></comment><comment><USER7> The smallest one.</comment>


How we can learn from a baby's brain - <AUTHOR> http://www.boston.com/bostonglobe/ideas/articles/2009/04/26/inside_the_baby_mind/?page=full

<comment><USER2> "'We sometimes say that adults are better at paying attention than children,' writes Gopnik. 'But really we mean just the opposite. Adults are better at not paying attention. They're better at screening out everything else and restricting their consciousness to a single focus.'"

That's a useful distinction. I remember reading somewhere (and I suppose that robg, the submitter here, is familiar with the professional research literature on this subject) that the human brain has HUGE processing and storage capacity, and the human sensory systems have enormous sensory capacity, and the role of attention is to decide which subset of the enormous amount of sensory information taken in minute-by-minute goes along the (comparatively) narrow-bandwidth pathway from sensory organs to the brain. A big part of learning while growing up is learning what to attend to, and practicing making the most expedient direction of attention habitual.

Thanks for posting the interesting article.

<comment><USER3> I agree.

Compare <http://en.wikipedia.org/wiki/Exformation>

</comment></comment><comment><USER4> It's often said that it becomes very difficult for children to become fluent in another language after a certain age (some say 7, some say 12) - Regardless, as someone who has tried off/on foreign language study, the experience is humbling.

I wonder if babies and young children can acquire language quicker simply because their brain is optimally tuned for maximum language learning (e.g. if they hear a word they might not just be thinking of the meaning but the emotional context, what it means to them, improving recall or if they learn a word, they intuitively understand the concept behind the word because they learned the world for the first-time in the real context [e.g. 'fork' in kitchen]).

I dream about a virtual reality add-on that would let you roam outside in the real-world and it would augment your reality - through pop-ups of the Spanish/French whatever word for objects that you see. As one of my Spanish tutors told me, the key to learning vocabulary is to be able to associate the concept of the word with the word (in whichever language).

<comment><USER2> _I wonder if babies and young children can acquire language quicker simply because their brain is optimally tuned for maximum language learning_

The most readily noticeable part of the adult barrier to language learning, which I have run into more than a dozen times as an adult learner of a variety of languages, is acquiring sufficient phonological proficiency to speak understandably and listen with good comprehension. That's because production of the phonemes (and perception of the phonemes) of your native language(s) is based on ARBITRARY grouping of sound distinctions that are grouped differently, or entirely ignored, in other languages. Each language has its own sound system, and generally any learner who begins study of a language after puberty (especially if male) will have a noticeable foreign accent.

[http://books.google.com/books?id=r2HEqsWeQTYC&pg=PA30...](http://books.google.com/books?id=r2HEqsWeQTYC&pg=PA30&lpg=PA30&dq=%22Joseph+Conrad%22+%22language+acquisition%22&source=bl&ots=70TbzX0t4A&sig=TZJ9ipBViGWz_2dk- FjZz76q_9M&hl=en)

But there are also more subtle problems with second-language acquisition of vocabulary and grammar. Each language groups concepts with words in a different way from any other language, and each language has grammatical rules that are wholly arbitrary from the point of view of any other language. But usually second-language speakers and writers can bluff better as to vocabulary and grammar than they can as to pronunciation.

I've often worked as a Chinese-English interpreter. I didn't speak any Chinese until age seventeen, definitely after puberty for me, but I have acquired a decent accent, not such a thick American accent that I can't occasionally pass a Chinese person over the telephone--but mostly as a southern-Chinese second- language speaker of Mandarin to other southern-Chinese second-language speakers of Mandarin. The issue of "lexicalization" (really knowing the correct word in the acquired language) really never goes away. And there are whole thick books about Chinese grammar that few Westerners have read cover to cover.

All the time and effort needed to learn a second language has given me much incentive to encourage my children to grow up as bilingual persons--but even at that it's hard to find an adequately bilingual environment to support daily use of both Mandarin and English.

<comment><USER5> There's research suggesting that phoneme patterns are not arbitrary. Have a look at Theo Vennemann (Berkeley, Munich) and his work on syllabic structure -- I recall some very interesting stuff from the latter '80's.

<comment><USER2> The intended meaning here is that the phoneme patterns of English will be reliably mistaken by a speaker habituated to speaking German, or the other way around. (I have some acquaintance with both languages.) If there is some rule of universal grammar in the general case about how sounds can combine, the fact still remains that the particular case of each speaker's native language is not a reliable guide to the phonological structure of any other particular language.

</comment></comment></comment></comment><comment><USER6> This research seems to indicate that ADHD is actually a _feature_ of childhood, rather than a bug to be fixed.</comment>


Ask HN: Is my account flagged? I don't earn upvotes - <AUTHOR>

I noticed that for my last few posts to HN, I am not earning any upvotes. I tested this with two friends today and asked them to upvote my link from the new page. No points were registered.<p>Any ideas as to what is causing this, or how I can correct it? <comment><USER2> No; there is no code that can do that. There's a lot of code for ignoring voting rings though. That's probably what's happening.

<comment><USER3> Code to ignore voting rings would be very interesting - I would imagine the way to do it might be to occasionally do some kind of maximum flow analysis on the graph between users (with arcs between u_i and u_j representing the proportion of upvotes for user u_j by user u_i as a proportion of u_i's total upvotes). Users with a high maximum flow between them could be considered part of the voting ring. The trouble is that this would be very computationally expensive, even to do offline - and the cost of storing a matrix of size n^2 for n users might be prohibitive.

I was curious about what Hacker News does so looked at the code from the Arc tarball.

I found this: (def biased-voter (i vote) nil)

I presume this is a case of security by obscurity and the live Hacker News site has a non-public definition of biased-voter to stop people working around it?

Or are you referring to the code that guards (++ (karma i!by) (case dir up 1 down -1)) (on lines 1368 to 1370)?

<comment><USER2> None of the anti-abuse code is published.

</comment></comment></comment><comment><USER4> I have the same problem. Seem to comment and the karma doesn't increase except when the points surpass my average commenting threshold. Maybe this is the new karma system.

<comment><USER5> So I upvoted both yours and kurtvarner's posts so you can perhaps determine if your vote counts changed.</comment></comment>


Goldman Emails Contradict Their Assertion That It Lost Money in Mortgages - <AUTHOR> http://www.nytimes.com/2010/04/25/business/25goldman.html?hp

<comment><USER2> It's a good entertainment read but taking apart a hedge to prove a point can get misleading pretty fast. For instance, if you don't like Goldman's shorts, Goldman could have created the same hedge results by taking a long position in gold. Hopefully the result of the discussions will lead to better transparency.</comment>


Python to OCaml: Retrospective - <AUTHOR> http://roscidus.com/blog/blog/2014/06/06/python-to-ocaml-retrospective/ <comment><USER2> As a language, OCaml gets most things right: being functional by default appeals to me very much, as does the easy path into imperative programming when you need it. Its type system is awesome not only at catching bugs at compile-time, but also at guiding you in your design. There are a couple of nice-to-have that would be cool though: Haskell-like type classes come to mind, and some minor syntax warts could be improved. Its implementation is also extremely solid: I always expect the code generated by OCaml to perform well. With tools like OPAM, getting the latest compiler and libraries is very easy. Definitely one of my favorite language toolset.

<comment><USER3> And there is always an option of using F# when needed.

</comment></comment><comment><USER4> This is possibly the best language writeup I have seen in years, if ever. Congratulations, sir!

</comment><comment><USER5> His earlier post "OCaml: What you gain"[1] is also an interesting read.

[1] [http://roscidus.com/blog/blog/2014/02/13/ocaml-what-you- gain...](http://roscidus.com/blog/blog/2014/02/13/ocaml-what-you-gain/)

</comment><comment><USER6> This was a fascinating read. What I'd like to see more of is how the migration was managed, concentrating on how the mix of the two languages was managed. It talks about replacing functions and using JSON to glue them together and/or allow them to communicate.

I'd like to know more about that. Have I missed something?

Regardless, excellent write-up. Thank you.

<comment><USER7> Running both in a single process looked tricky because we need to work with the already-installed Python version, which could be 2.6, 2.7, 3.3, etc... so we'd have to provide a separate Python module for each one to do that.

Instead, the OCaml created a pair of pipes and spawned a Python subprocess (you need to use two pipes, not a single socket, because Windows doesn't support Unix sockets).

The protocol was asynchronous (replies can arrive out of order). Although the original JSON bridge is now gone, the new "0install slave" command (which allows other programs to control a 0install subprocess) uses a very similar system. It's documented here:

[http://0install.net/json-api.html](http://0install.net/json-api.html)

</comment></comment><comment><USER8> The thing not described by the author is what oCaml is like to program. Python is easy to write and understand and makes sense and is a joy and not cryptic. What about OCaml?

<comment><USER9> Maybe not in the main article, but he gives an overall view of OCaml in the sublinks. For example, in the summary for "OCaml: what you gain": [http://roscidus.com/blog/blog/2014/02/13/ocaml-what-you- gain...](http://roscidus.com/blog/blog/2014/02/13/ocaml-what-you-gain/)

The summary:

\----

"OCaml's main strengths are correctness and speed. Its type checking is very good at catching errors, and its "polymorphic variants" are a particularly useful feature, which I haven't seen in other languages. Separate module interface files, abstract types, cycle-free dependencies, and data structures that are immutable by default help to make clean APIs.

Surprisingly, writing GTK GUI code in OCaml was easier than in Python. The resulting code was significantly shorter and, I suspect, will prove far more reliable. OCaml's type checking is particularly welcome here, as GUI code is often difficult to unit-test.

The OCaml community is very good at maintaining API stability, allowing the same code to compile on old and new systems and (hopefully) minimising time spent updating it later."

\----

This gives me the impression that OCaml is also a joy to program with, and _additionally_ is more reliable and better at catching errors earlier than Python.

</comment></comment><comment><USER10> And this is the reason while I like Python a lot, nowadays only use it for scripting under UNIX.

<comment><USER11> Well, I would say this is a pretty positive post for Python as well. Only 8x slower than OCaml... Not bad for an interpreted dynamically typed language.

This makes a good case for prototyping in Python and only moving to something else when performance becomes an issue.

<comment><USER10> Hindley Milner type system makes strong typed languages also quite pleasant to use for prototyping.

I mentioned UNIX, because on Windows my to go language for private scripts is F#.

<comment><USER12> Interesting. Do you find it more or less terse than PowerShell?

<comment><USER10> I use both actually.

F# scripts for my own stuff, Powershell when those scripts need to be shared across the team or I need to interoperate with third party cmdlets.

It is quite terse, specially because Powershell has a bit of VB flavour to its syntax, mixed with attributes everywhere.

I rather use the cleanliness of the ML syntax, if possible.

</comment></comment></comment></comment></comment><comment><USER13> Ocaml is very enticing in many ways, with a lot of the features I love about Haskell; a few that are missing but also several that are not present in Haskell. Certainly, the strictness is a big plus for me, and being able to do mutability and IO without a monad (purity isn't as important to me). I've been averse to picking it up because I've invested so much time and effort in Haskell, because I'm used to the Haskell way of FP, and because I much prefer haskell's syntax. But maybe if I just dived in, then I'd find I even preferred it to Haskell.

<comment><USER14> I've actually thought about ocaml myself, but one silly thing keeps putting me off. It feels like typing "let" over and over again would drive me crazy!

I guess it's not that bad after looking at this for example:

[https://github.com/0install/0install/blob/master/ocaml/zeroi...](https://github.com/0install/0install/blob/master/ocaml/zeroinstall/driver.ml)

</comment></comment><comment><USER15> Here's a copy of a previous post I've made on HN about why you might want to choose OCaml instead of another language. Nothing has changed about my opinion since the time I wrote it: Original link: [https://news.ycombinator.com/item?id=7766315](https://news.ycombinator.com/item?id=7766315)

\</comment><comment>

A couple of people have asked why you might choose OCaml over other languages. I've not done as much OCaml work as others on this thread (I work primarily on ReactJS (Facebook/Instagram's) functional UI framework), but I can offer a different perspective as someone who is outside of the OCaml community, but asking the same questions. Here are some of my personal findings. I'll narrow any comparison down to the ML family of languages. Java/C++/ and many other languages are just now beginning their slow, but inevitable evolution into becoming a dialect of ML (which IMHO is a sort of admission of the ML/functional family superiority). Once you embrace the power of pattern matching, it's hard to use anything but an ML family language (StandardML/Haskell/F#/OCaml). I would program in any one of those languages over Java/C++/Objective-C/JS. Practical reasons why you might choose OCaml:

\- OCaml's records aren't as elegant as SML's but OCaml has labeled arguments with optional default values which can satisfy many of the reasons why you'd use records as arguments in the first place (and may be even more powerful in some cases).

\- Two modes of compilation (fast native executable XOR fast compilation). Who doesn't like options.

\- All the benchmarks I can find show that OCaml is very fast (around as fast as C++).

\- Excellent JS target and and apparent commitment to maintaining it (as someone building a JS library, this is very important to me) (and as someone who wants to build apps and be able to instantly share them with everyone in the world.)

\- Someone has built an autocomplete plugin for Vim/Emacs (merlin). ("VimBox" ([https://github.com/jordwalke/VimBox/](https://github.com/jordwalke/VimBox/)) has configured it to complete as you type - like in Visual Studio etc.)

\- On very rare occasion, you'll run into a problem that is inherently better suited to OO (dynamic dispatch). I can usually find a way to solve it with functors/modules, but it's nice to know that you have OO in your back pocket in case you ever need it. It's also nice to know you probably won't have to.

\- Finally, a common package manager (OPAM) is becoming standard. I look forward to seeing how OPAM helps make the new dev experience and the code- sharing/development experience seamless.

\- The module system is very powerful (SML's). Haskell does not have this, and strangely F# dropped it. (I hear, Haskell's type classes fulfill similar roles (but with more sugar)).

\- There's usually ocamlyacc grammars for most languages. Most examples of languages, type systems, parsers are already in OCaml (or ML). It's a nice (but small) perk.

\- Predictability. OCaml is not lazy by default. Lazy computations could become problematic for low-latency applications (such as UIs) if a lot of computation becomes is deferred until the moment a final dependency has been satisfied, but by that time you may be close to your screen refresh deadline and it may lead to a dropped frame. It would have been better to have been computing while waiting for a final dependency. I'm not sure if Haskell (a lazy language) has had this problem. You can opt into laziness in OCaml if you would like to.

\- Mutability. I feel strange saying this, as such a huge proponent of immutability, but sometimes you just need to hack something in place, mutate some state and come back to clean it up later. (You can still use monads in OCaml).

\- Tagged Variants (no need to predeclare variants, just pattern match on them and OCaml ensures that only properly matched values ever make their way into that expression).

\- Industry use is growing. OCaml is used here at Facebook and many other places as mentioned.

\- There are many abstractions to choose from (Records, Objects, Modules, Functors, First Class Modules, GADTs, ...).

OCaml Cons: - There are many abstractions to choose from (Records, Objects, Modules, Functors, First Class Modules, GADTs, ...). (Edited for formatting)

<comment><USER15> Two weeks after the original time of writing, Apple released Swift - which is considerably influenced by the ML family of languages.

<comment><USER16> Indeed. I heard someone comment that every FP conference will be doing a 'victory lap' due to Apple's announcement. At the very least, I hope people/devs will explore ML based languages for their next project.

It would be interesting to get your take on the toolstack we're building using OCaml - [http://nymote.org](http://nymote.org) (I'm aware the copy on the site needs works but it's the tools I'm referring to).

<comment><USER17> Bryan O'Sullivan commented that [https://mobile.twitter.com/bos31337/status/47356953136621158...](https://mobile.twitter.com/bos31337/status/473569531366211584) and Graydon Hoare referenced it in his post on Swift [http://graydon2.dreamwidth.org/5785.html](http://graydon2.dreamwidth.org/5785.html)

<comment><USER16> Yup, that's what I heard (obviously 3rd hand). Second like is very useful as I've not had a chance to look at the swift docs yet.

</comment></comment></comment></comment></comment><comment><USER18> It takes a full minute to build the finished project - is this normal or..?

<comment><USER19> That's without parallelisation. There is a slowdown when building OCaml projects with a lot of packages, but this is being fixed with some build system improvements (removing the need for ocamlfind on every compiler invocation, switching from camlp4 to ppx extensions, and using the native code compiler instead of a bytecode one). It only affects large projects though, as most of the time you just modify a few files and do an incremental build.

<comment><USER20> That made me curious and did a quick profile:

        25.52%        camlp4  ocamlrun                           [.] caml_interprete
     14.60%  ocamlopt.opt  ocamlopt.opt                       [.] 0x000000000016ec61
     10.51%     ocamlfind  ocamlfind                          [.] caml_interprete

Looks like ocamlfind is the bytecode version too ... I opened a bug.

</comment></comment></comment><comment><USER21> Is my impression correct that the general interest in OCaml has waned & its development has somewhat stalled? I played with OCaml when it was at version 3. I remember the mailing list to be rather vibrant. Now there seem to be fewer posts. I think this is a pity because I really would like to see OCaml to take off. Projects like ocamljava and js_of_ocaml also sound quite promising.

<comment><USER16> I don't think you've looked very closely (if at all?). There is tons of stuff happening in the OCaml ecosystem. Compiler improvements, large scale projects, more industrial uses and also new books. Try looking at [http://OCaml.org](http://OCaml.org) for some links (and the planet newsfeed), as well as the websites of OCaml Labs (see the article) or OCamlPro.

<comment><USER22> He s right for the mailing list though. I regret there is not more discussion happening there

<comment><USER16> Why? Frankly, I'm glad that there is more stuff happening out on the net at large rather than trapped on one list. I consider it a sign of success (there are probably many more users out there than who are on the mailing list anyway). I've used Python, Ruby, etc but I haven't ever joined their main lists and I don't feel I'm missing out (anything important will spread in other ways).

<comment><USER22> As a beginner, it is interesting to read more advanced questions and their answers. I learned a lot of ruby that way at the time, and i miss it for 0caml now.

<comment><USER16> This does still happen (e.g [1]), though I've no idea if the frequency of such posts has changed. If no-one asks questions, then there's nothing to answer (so please do ask!). On the other hand, I've noticed that more people have started to ask/answer questions on StackOverflow [2] so perhaps this just represents the general shift that other langs have already been through.

[1] [https://sympa.inria.fr/sympa/arc/caml- list/2014-05/msg00146....](https://sympa.inria.fr/sympa/arc/caml- list/2014-05/msg00146.html)

[2] [http://stackoverflow.com/questions/tagged/ocaml](http://stackoverflow.com/questions/tagged/ocaml)

</comment></comment></comment></comment></comment></comment><comment><USER23> Is it me, or are the "Big and Slow" and "Small and Fast" labels in the Speed vs Size chart placed in the wrong corners?

<comment><USER24> it's startup time, not general speed

<comment><USER23> I was just misreading the graph, assuming farther out on each axis was better (faster/smaller)

</comment></comment></comment><comment><USER25> Wonder what he mean by "lack of support for shared libraries".

<comment><USER26> Does Ocaml support dylibs/so/dll's?

<comment><USER25> [http://www.camlcity.org/knowledge/kb_002_shared_library.html](http://www.camlcity.org/knowledge/kb_002_shared_library.html)

</comment></comment></comment><comment><USER27> Very informative post, thanks a lot!

      Epilogue
      Mirage unikernel - an operating system written in OCaml
      (the Mirage web-site is all implemented in OCaml, down to
      and including the TCP/IP stack!). That will have to be
      the subject for another blog post though...

I am looking forward to such posts. Keep up your good work!

<comment><USER24> Mirage was also featured on the latest Software Engineering Radio podcast: [http://www.se-radio.net/2014/05/episode-204-anil- madhavapedd...](http://www.se-radio.net/2014/05/episode-204-anil-madhavapeddy- on-the-mirage-cloud-operating-system-and-the-ocaml-language/)

</comment></comment><comment><USER28> A year. A year of an apparently excellent programmer's output -- perhaps 2% of everything he will ever accomplish. To port a stable project to an 18 year old language.

<comment><USER29> and in which he gained a massive speedup in the project, made it a lot easier to maintain and extend, learnt a lot about ocaml, and finally managed to get a really exciting job due to the exposure his blog gave him.

<comment><USER28> Wow, hate-haters gonna hate my hate. The slowest metric for the old code is about 1/3 of a second -- how much benefit does slicing that deliver in real world 0install invocations? "Easier to maintain and extend" \-- well, he just cut the population of potential contributors to the project by a factor of 1000. The exciting job he got because it required knowing OCaml, and he spent a year advertising himself as a competent OCaml hacker. I find it very strange to care more about what language a project is written in than _what the project actually does_.

<comment><USER30> I'm going to feed the troll here, but "cut the population of potential contributors to the project by a factor 1000" is a flawed argument : The value of potential contributors is very low. You're better of trying to increase the comfort and power of the _current_ contributors.</comment></comment></comment></comment>