TikTok to challenge U.S. order banning transactions with the video app - <AUTHOR> https://www.reuters.com/article/us-usa-tiktok-trump-exclusive/exclusive-tiktok-to-challenge-u-s-order-banning-transactions-with-the-video-app-idUSKBN25H2QG <comment><USER2> Of course they are.

CFIUS is the governing body who decides which foreign investments are a threat to the U.S., not the president, and they have been investigating TikTok for two years without finding anything despite the recent executive order. It makes the executive order look more like political headline bait than having actual teeth, especially considering IEEPA prohibits executive power from being used to block speech or media.

<comment><USER3> I recall people were quite willing to "block speech or media" when Russian operatives were organizing anti-Trump protests on Facebook in 2016. What has changed since?

<comment><USER4> > Russian operatives were organizing anti-Trump protests

That seems unlikely. Source?

<comment> kube-system If I recall what I read in the Mueller report correctly, Russia sponsored protests on both sides of the political spectrum, reportedly focusing on topics they thought would increase racial tensions

<comment><USER3> > sponsored

Why the past tense? Seems to me like someone is still "sponsoring" racial tensions in the US. This has been in the works for quite some time, and it's paying dividends now: [https://www.youtube.com/watch?v=IQPsKvG6WMI](https://www.youtube.com/watch?v=IQPsKvG6WMI). The entirety of the US media apparatus, as well as the entirety of the political establishment is happy to play along.

<comment> kube-system > Why the past tense?

Because the Mueller report did not contain any information from the future as far as I am aware. :)

But yes, I don't think we have any reason to believe that Russia is acting any differently today.

</comment></comment></comment></comment></comment></comment><comment><USER5> Maybe Congress could get off its ass and pass some data privacy laws first?

<comment><USER6> No, no, we can't have that because then the US government and American companies couldn't siphon all the data up for nefarious, I mean patriotic, purposes.

<comment><USER7> Exactly, if we fix that how are we going to deflect everything accurate and bad by yelling "whataboutism" at anyone with a brain

</comment></comment></comment><comment><USER8> American companies are blocked from doing business in China either by the great firewall, having to transfer intellectual property, having to give the government unfettered access to user data or by having to have Chinese ownership. Bytedance has no legs to stand on here.

<comment><USER9> Do you think America becoming more like China is a desirable outcome?

<comment><USER10> > _Do you think America becoming more like China is a desirable outcome?_

Last I checked, American companies can't challenge Beijing in court the way Tik Tok is here.

<comment><USER11> So because we're better in one or two or so ways, we can't say that the bad things are comparable?

<comment><USER10> > _because we're better in one or two or so ways, we can't say that the bad > things are comparable_

The existence of an independent judiciary makes the two incomparable. The American executive is constrained in his actions by the law. That gives the landscape a degree of predictability (albeit less than I'd like).

Comparing this to China, where the law begins and ends with the party's whims, is a slippery slope fallacy.

<comment><USER12> Make no mistake, the US judiciary is also fully captured by the two parties. Just because one person doesn't have total power means nothing, Xi Jinping doesn't have total power either.

But the the two US parties and sometimes even one party alone can totally make anything legal. The judiciary is independent only instantenaousely, not long term.

Mind you, this is because the US political system is not made to deal with parties. When you add a duopoly of power every single check and balance of the US political system breaks down.

That, makes the two comparable.

<comment><USER10> > _Just because one person doesn 't have total power means nothing_

Straw man. Power is always several amongst elites. The question is one of degree and checks. Xi's China has no rule of law. In America, no person nor public servant is reliably above the law.

Moreover, rulers can be challenged in fair courts. The U.S. government loses in court. Xi never loses in a CCP court.

> _When you add a duopoly of power every single check and balance of the US > political system breaks down_

Judges are not loyal to their parties. Almost every nominee has prominent cases where they rule against their party ( _e.g._ Gorsuch on gay rights).

<comment><USER12> > _Straw man. Power is always several amongst elites. The question is one of > degree and checks. Xi's China has no rule of law. In America, no person nor > public servant is reliably above the law._

> _Moreover, rulers can be challenged in fair courts. The U.S. government > loses in court. Xi never loses in a CCP court._

>>>>>>>>>>>> _one person doesn 't have total power means nothing_ >>>>>>>>>>Straw man >>>>>>>>>>no person or public servant is reliably above the law

First, I don't think you can call my argument a straw man then restate the argument I was arguing in the very same sentence.

Second, Xi Jinping can easily lose in a CCP court, he just has to go against the will of the party members of the CCP enough. Xi Jinping is below the Politburo as well as the National People's Congress. He simply is kindly advised not to act in ways that would lead to his removal, just as other Chinese presidents often had their hands tied. He is not reliably above the law.

Also, the Department of Justice in the US de facto affirmed that the US president is above federal law.

> Moreover, rulers can be challenged in fair courts. The U.S. government loses > in court. Xi never loses in a CCP court.

This absurd conflation. Xi <=!=> the US government. An apt comparison is to claim that the Chinese State never loses in court.

Now, to the core of the claim, the US State cannot lose in courts, because the US State _is_ the courts.

More so, _the US government can only ever, ever be sued with its agreement_. Indeed, as Wikipedia puts it:

> _In the United States, the federal government has sovereign immunity and may > not be sued unless it has waived its immunity or consented to suit.[7] The > United States as a sovereign is immune from suit unless it unequivocally > consents to being sued.[8] The United States Supreme Court in Price v. > United States observed: "It is an axiom of our jurisprudence. The government > is not liable to suit unless it consents thereto, and its liability in suit > cannot be extended beyond the plain language of the statute authorizing > it."[9]_

[https://en.wikipedia.org/wiki/Sovereign_immunity_in_the_Unit...](https://en.wikipedia.org/wiki/Sovereign_immunity_in_the_United_States)

In conclusion, the U.S. government only ever loses to a non-state entity in court when it consents to, and even then liability is severely restrained.

This is, ironically, exactly the same standard as in China. The Chinese Basic Law forbids the state from legal liability unless it specifically agrees to it and states it's liability, which is stated under the Administative Litigation Law : [https://en.wikipedia.org/wiki/Administrative_law_in_China#Ad...](https://en.wikipedia.org/wiki/Administrative_law_in_China#Administrative_litigation)

In practice, this means that you can sue the Chinese State, the CCP, Xi Jinping, or any other administrative body in China, and win, as long as the Chinese State agrees to the litigation. So, yes, Xi Jinping's government can, and _does_ lose in Chinese courts (which technically are not affiliated with the CCP or any party, in theory). In fact, there have been many cases of such loses, which can be easily googled.

However, if the government ever loses, _both in China and the US!_ , under the doctrine of Sovereign Immunity, they can simply change the law and absolve themselves of liability.

>Judges are not loyal to their parties. Almost every nominee has prominent cases where they rule against their party (e.g. Gorsuch on gay rights).

Cases of Federal judges ruling against their parties are few and far between, judges nominated by the same party vote together the vast majority of the time, especially Republican judges. As for the cases where they _do_ , they almost always differ on points of heterogeneity in their party. Which you'd be surprised to hear, is also the case in China - there is massive heterogeneity within the party and judges sometimes go against the dominant position and are protected because are amongst a large faction.

In conclusion, there is still no real difference that can discerned.

<comment><USER10> > _the Department of Justice in the US de facto affirmed that the US president > is above federal law_

Incorrect. DoJ have an administrative rule that a _sitting_ President cannot be charged by them. As for official acts by the government, they're subject to judicial review. No analogous process exists in China.

> _the US State cannot lose in courts, because the US State is the courts_

This betrays ignorance of the American Constitutional system. The U.S. government _routinely_ loses in court. Prior rulings are overturned. The legislature is checked. The President stayed.

> _under the doctrine of Sovereign Immunity_

Sovereign immunity is a courtesy granted to other nations under common law. It does not exist _per se_ and makes no sense to be invoked with respect to a state without the rule of law.

With respect to American courts, the U.S. government has broadly consented to being sued by virtue of the Constitution. To claim sovereign immunity, a creature of the law, limits the legal system is to misunderstand one of the basic tenets of the system.

<comment><USER12> > _Incorrect. DoJ have an administrative rule that a sitting President cannot > be charged by them. As for official acts by the government, they're subject > to judicial review. No analogous process exists in China._

Judicial review is simply enforcement of laws that are found to have primacy. Chinese retired officials have been charged, found guilty, and found liable hundreds of times. As for the analogous process of "judicial review" in China, it's called... Judicial Review. It has many flaws in practice due to partisanship of the judges, they are all also present in the US. The procedure for Chinese judicial review is codified under the Administrative Procedure Law I mentioned in my previous comment. The main difference is that Chinese judicial review applies only to acts and not to laws, because the Chinese constitution mandates primacy of the National People's Congress, therefore any power to strike laws would ironically enough be unconstitutional.

Moreover, former officials frequently get sued in China for crimes performed during their tenure.

>This betrays ignorance of the American Constitutional system. The U.S. government routinely loses in court. Prior rulings are overturned. The legislature is checked. The President stayed.

The _legislative is checked, but not the State_. I don't understand why you keep confusing the U.S. Government sometimes with the US legislative branch and sometimes with the US executive branch. _Courts are part of the State_. This should be evident after an analysis of the US Constitution, not just a cursory reading, and is indeed the interpretation taken by the Supreme Court as well as the basis for Sovereign immunity. See the last paragraph pf the next quotation of ever-helpful Wikipedia.

> _Sovereign immunity is a courtesy granted to other nations under common law. > It does not exist per se_

Incorrect :

 _In the United States, the federal government has sovereign immunity and may not be sued unless it has waived its immunity or consented to suit.[7] The United States as a sovereign is immune from suit unless it unequivocally consents to being sued.[8] The United States Supreme Court in Price v. United States observed: "It is an axiom of our jurisprudence. The government is not liable to suit unless it consents thereto, and its liability in suit cannot be extended beyond the plain language of the statute authorizing it."[9]

The principle was not mentioned in the original United States Constitution. The courts have recognized it both as a principle that was inherited from English common law, and as a practical, logical inference (that the government cannot be compelled by the courts because it is the power of the government that creates the courts in the first place).[10] _

[https://en.wikipedia.org/wiki/Sovereign_immunity_in_the_Unit...](https://en.wikipedia.org/wiki/Sovereign_immunity_in_the_United_States)

You seem to be confusing Sovereign Immunity, which only applies to the Federal and Local governments of the United States, with State Immunity, which is much weaker than Sovereign Immunity : [https://en.wikipedia.org/wiki/State_immunity](https://en.wikipedia.org/wiki/State_immunity)

> makes no sense to be invoked with respect to a state without the rule of law

This is a circular argument as it the conclusion is also a premise.

>With respect to American courts, the U.S. government has broadly consented to being sued by virtue of the Constitution. To claim sovereign immunity, a creature of the law, limits the legal system is to misunderstand one of the basic tenets of the system.

Incorrect. See, The Eleventh Amendment: [https://en.wikipedia.org/wiki/Eleventh_Amendment_to_the_Unit...](https://en.wikipedia.org/wiki/Eleventh_Amendment_to_the_United_States_Constitution)

<comment><USER10> > _the Chinese constitution mandates primacy of the National People 's > Congress, therefore any power to strike laws would ironically enough be > unconstitutional_

This is the core difference. No single body can exercise the U.S. state's power with such primacy.

There are a lot of other errors in this comment, but your sources should are good and are worth reading together with their references.

<comment><USER12> >This is the core difference. No single body can exercise the U.S. state's power with such primacy.

Incorrect. A ratifying convention of the states has the power to amend the US constitution.

If you believe that I made a factual error, it is reasonable to point it out with quoted or at least sourced references.

<comment><USER13> > _A ratifying convention of the states has the power to amend the US > constitution._

No, it does not. Article V allows two-thirds of the state to call for a convention of the states to be assembled to _propose_ amendments; three- fourths of the state legislatures, or three-fourths of state conventions assembled for the purpose, must ratify any proposals made.

So in the current setup, 67 legislative bodies are required to call for the assembly of a single body that can write up amendment proposals, but then 75 legislative bodies (or 75 conventions) then have to vote to ratify those proposals.

That is a far cry from a single body ratifying amendments.

The full text of Article V, for reference (emphasis mine):

> The Congress, whenever two thirds of both houses shall deem it necessary, > shall propose amendments to this Constitution, or, on the application of the > legislatures of two thirds of the several states, _shall call a convention > for proposing amendments_ , which, in either case, shall be valid to all > intents and purposes, as part of this Constitution, _when ratified by the > legislatures of three fourths of the several states, or by conventions in > three fourths thereof_ , as the one or the other mode of ratification may be > proposed by the Congress; provided that no amendment which may be made prior > to the year one thousand eight hundred and eight shall in any manner affect > the first and fourth clauses in the ninth section of the first article; and > that no state, without its consent, shall be deprived of its equal suffrage > in the Senate.

</comment></comment></comment></comment></comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER14> I found YouTube's Legal Eagle's analysis of the legality of the ban interesting. Would be interesting to hear HN's take:

[https://youtu.be/BnjhHPU-uRw](https://youtu.be/BnjhHPU-uRw)

<comment><USER15> The president has extremely broad powers. In general I think it safe to assume he can do these things (sans demanding a cut of the proceeds). Typically these powers are granted during emergencies, but again, the president seems to be able to declare those whenever he wants.

It's just before now they were wielded with restraint and mostly ignored. This should be a wake up call.

Part of the issue is there is now a real discussion over whether or not this is allowed. In a previous United States that this discussion would have existed would have been ludicrous. The basic premise of the IEEPA seems valid, but there seems to be very little effective check by congress.

</comment></comment><comment><USER16> Still trying to exploit the assimetry I see.

When did the last American company manage to challenge being banned or forced to take on a local "slightly more than equal" partner in china?

</comment><comment><USER17> I feel there might be disparate impacts between the reactions from CCP threats and USFG threats...

</comment><comment><USER18> It feels like they don't need to take any action, the danger has probably passed. Trump extended the window to 90 days which will be after the election. He achieved what he wanted, to appear tough on China and so if history is any indication about how he deals with China, this will be ignored and things will be go back to normal without any issues for China. The president is all talk and no action usually.

</comment><comment><USER19> Facebook's Instagram came out with "reels", essentially a clone of Tik Tok. And isn't that act a complaint by us companies against China?

</comment><comment><USER20> How would Americans be better off with TikTok in Microsoft's hands?

THE MICROSOFT POLICE STATE: MASS SURVEILLANCE, FACIAL RECOGNITION, AND THE AZURE CLOUD [https://theintercept.com/2020/07/14/microsoft-police- state-m...](https://theintercept.com/2020/07/14/microsoft-police-state-mass- surveillance-facial-recognition/)

<comment> kube-system The US government's concern with ByteDance is, and always has been, a question of national security, not privacy.

But for that matter, privacy laws are stronger in the US too.

<comment><USER21> Privacy _is_ a national security issue. Actively monitoring citizens, privately and publicly, and smearing the data across the US and the rest of the world is going to prove to be a massive national vulnerability in the long run.

<comment> kube-system Yes, it is well established that the data being collected by social media platforms is ripe for abuse.

The question is: which regulators do the social media companies answer to?

Don't forget that that national security includes other concerns outside of your _personal_ privacy, for example: [https://www.forbes.com/sites/andrewsolender/2020/05/18/repor...](https://www.forbes.com/sites/andrewsolender/2020/05/18/report- beer-review-app-can-be-used-to-track-military-personnel-and-secret-military- locations/#411b5e6b3106)

<comment><USER20> > The question is: which regulators do the social media companies answer to?

That's not the question I posed, kube-system. I asked, "How would Americans be better off with TikTok in Microsoft's hands?"

The issue you raise, about which regulators social media companies answer to, dismisses the conflict of interest that occurs when those regulators' align with the police departments that contract Microsoft to surveil citizens. When that happens, are American citizens better off? Clearly not, when they are being targeted by unconstitutional police actions, e.g. actions that violate the first amendment.

<comment> kube-system ByteDance's policy for responding to law enforcement requests is the same as Microsoft. Of all the domestic privacy issues you could have brought up, I don't think local law enforcement is a differentiating concern.

</comment></comment></comment></comment></comment></comment><comment><USER22> I wonder why there isn't a tinder like app where there are no photos but you ask for a price to meet and when you pay that price, then it opens a conversation channel where photos can be exchanged with single click and it's on you to see if you wish to accept or decline the proposal.

There are tons of fake people on tinder, who never show up. Payment will act as deterrent for these con people.

And dating app makes money as % of the transaction that occurs on the app.

And it never charges you without actually getting a "meeting" out of the app so experience is fair.

And if women are looking to meet man, they can also initiate and offer to pay.

Tinder sucks you can pay for Tinder Gold but it doesn't guarantee even a single date.</comment>


Plan B: Why "What Got Us Here, Can't Take Us There." - <AUTHOR> http://foundread.com/2007/12/24/plan-b-why-what-got-us-here-cant-take-us-there/ <comment><USER2> "Plan B (R) is not a substitute for routine birth control. It's important to remember that Plan B (R) does not protect you from HIV infection (the virus that causes AIDS) or any other sexually transmitted disease (STD)."</comment>


Ask HN: Entrepreneurship culture vs. Economic freedom  - <AUTHOR>

This question is primarily for Americans.  If you had to give a number percentage wise, how much would you say the entrepreneurship culture of America contributes towards innovation and business success vs the economic freedom (ie. lower taxes) of America.<p>I am asking because while i think both are important i don't think low taxes alone speaks to America's economic success. <comment><USER2> 80%</comment>


15 Top Freeware Registry Cleaners Reviewed - <AUTHOR> http://ashwynm.blogspot.com/2008/09/15-top-freeware-registry-cleaners.html It is generally believed that cleaning registry speeds up your pc. I have directly experienced, that it does sometimes, after many install and uninstall of programs.
In search of free registry cleaners, I ended up trying about 15 or more products. So I just thought of sharing my experiences with you. <comment><AUTHOR> If you have any other freeware list or good registry cleaners let me know I will incorporate it in this article.</comment>


JLua: Yet another Lua implementation in JavaScript - <AUTHOR> https://github.com/hsiaosiyuan0/jlua <comment><USER2> I've recently compiled a Lua-based project into WASM with Emscripten, but transpiling Lua into JS to avoid the engine overhead is compelling. I wonder how these approaches compare. For me it's very alluring to use most of the same codebase as other deployment targets. This also has the potential to add better contextual intelligence to a web-based Lua editor- I'll have to race it against Regex to see which is faster/better at pulling lists of locals/globals/functions out of Lua input for use in auto-complete.

<comment><USER3> Honestly I'd love to go the other way, the Lua VMs are so far ahead in terms of portability, ease of integration and speed(luajit is still a marvel of engineering) but so many people are turned off by parts of the language it'd be great to present a JS interface to these runtimes.

I still remember shipping the entire game logic for a title on the PSP inside of a 400kb block and that's was before the days of luajit. It's really an incredible language and I really wish it saw more mainstream use.

<comment><USER2> Me too! I think it's gaining a little extra appreciation lately. For us the wow-factor was the ease of tying it together with a C host program in lieu of some conf file based alternative. For example our Keybow (Raspberry Pi-powered mechanical macro keyboard) product uses Lua to let users easily define and share macros. Not only does this trivially exceed any effort I could have made to design a domain-specific configuration file format, but it's allowed users to try things I'd never conceived.

<comment><USER4> This is what it was initially designed for.

</comment></comment></comment></comment><comment><USER5> that's some beautiful javascript code and great project structure here. got me thinking about a few things: 1\. is the "index.js" in subfolders a nodejs thing? 2\. does that turn subfolders into modules? 3\. can you write and run that kind of javascript without nodejs?

<comment><USER6> 1\. The "index.js" thing is due to how module resolution is handled with CommonJS and ES modules. If you have a file at "./lib/index.js", then you can omit the "index.js" and just write "require('./lib')" from another file.

2\. Not exactly. In JS, every file with an "import" or "export" statement somewhere is its own module.

3\. You can write code like this for the browser. Most browsers support ES modules now. However, you do need a bundler tool like Webpack if your code depends on other node modules.

</comment></comment><comment><USER7> \tangent Time was, a _J_ prefix initialized _Java_.

</comment><comment><USER8> The description of the project begs the question: how is this different from other Javascript implementations of Lua?

</comment><comment><USER9> @op I run the newsletter Lua Digest, what's your email?

<comment><USER10> The GitHub profile of the user has an email.

</comment></comment><comment><USER11> I would name this project yajslua instead of jlua.

</comment><comment><USER12> Why do people put time and effort into a project and then name it as if its a generic, disposable, piece of garbage? Very strange

<comment><USER10> It's a tradition, apparently: [https://en.wikipedia.org/wiki/Yet_another](https://en.wikipedia.org/wiki/Yet_another)

<comment><USER12> Interesting, I didn't know Yahoo! was based on this. +1

</comment></comment></comment><comment><USER13> I'm really not interested in "Lua now implemented in x", what Lua needs is the new Luajit finished with the advanced garbage collection.

<comment><USER14> Why take the time to comment then?

<comment><USER15> To be fair, they did at least mention an alternative direction to pursue, so it's probably more useful than many of the dismissive comments that I see. I'm not convinced every comment on a project needs to be supportive of the project and its goals.</comment></comment></comment>


Sh.py - <AUTHOR> http://amoffat.github.com/sh/index.html <comment><USER2> For a similar library with a slightly different take, check out plumbum:

<http://plumbum.readthedocs.org/en/latest/index.html>

Here's the explanation on the differences:

"The project has been inspired by PBS of Andrew Moffat, and has borrowed some of his ideas (namely treating programs like functions and the nice trick for importing commands). However, I felt there was too much magic going on in PBS, and that the syntax wasn't what I had in mind when I came to write shell-like programs. I contacted Andrew about these issues, but he wanted to keep PBS this way. Other than that, the two libraries go in different directions, where Plumbum attempts to provide a more wholesome approach."

<comment><USER3> Ooh, I like the piping syntax better. The module name is a bit long and hard to remember though.

<comment><USER4> Plumbum is the latin name for lead, periodic table symbol "Pb", perhaps memorable enough considering Plumbum was inspired by an earlier project called PBS.

<comment><USER3> Still doesn't roll of the keyboard, does it?

</comment></comment></comment></comment><comment><USER5> Perl has this too: <https://metacpan.org/module/Shell>

Written in 1994, by Larry himself!

<comment><USER6> The module documentation doesn't mention error handling. Perl has no consistent exception system and this makes it very difficult to build reliable programs in the language. The standard library has inconsistent error handling. And CPAN modules like this usually have none at all.

</comment></comment><comment><USER7> So, this feature:

[http://amoffat.github.com/sh/index.html#interactive- callback...](http://amoffat.github.com/sh/index.html#interactive-callbacks)

Lets you replace `expect` with Python code pretty darn easily.

<comment><USER8> why not use pexpect, it has worked great for me in the past.

<http://www.noah.org/wiki/pexpect>

<comment><USER9> +1 for pexpect. it is very handy to automate user inputs

</comment></comment></comment><comment><USER10> I like PBS (now sh.py) for certain use cases. If I'm writing an actual shell script, I think it is brilliant. It keeps the script focused on the task at hand instead of Python's somewhat painful process communication.

On the other hand, if I have an application that needs to communicate with a subprocess as a small piece of the whole, I'll use other methods that are less "magical". It's not that I'm inherently against magic, but rather that, in that use case, I generally want very explicit control over what is happening.

<comment><USER11> Not sure I agree that this is magic. Syntactic sugar? Definitely. But it doesn't obscure any of the underlying logic.

<comment><USER12> It causes "import" to behave in ways you wouldn't expect.

<comment><USER13> Could you elaborate on this point? What happens and what would you expect?

<comment><USER14> This tool hijacks the import mechanism by directly writing to Python's look-up tables. After all, when you do

      from sh import git

there's no module 'sh' invoked in the normal sense. Instead, the library generates a wrapper for the shell command 'git' on the fly. While that kind of monkey patching may be neat, it's also a bit brittle and a potential security issue.

<comment><USER15> You must consider Ruby on Rails to be pure hellspawn then. (I agree, but for different reasons ...)

<comment><USER16> Well, the Python and Ruby communities have different engineering cultures and this is part of that. "Explicit is better than implicit" is one of the mantras on the Python side.

<http://www.python.org/dev/peps/pep-0020/>

</comment></comment></comment></comment></comment></comment></comment><comment><USER17> I spent a few minutes trying to figure out how to install the thing so for anyone that is equally as lost

        $ pip install sh

or goto the github page <https://github.com/amoffat/sh>

<comment><USER18> To the parent and anyone else who hasn't experienced the wonders of `pip`, check out the article "Tools of the Modern Python Hacker: Virtualenv, Fabric and Pip" [1]. All three of these tools are invaluable for even the most trivial of Python projects, and make developing in Python much more enjoyable.

[1]: [http://www.clemesha.org/blog/modern-python-hacker-tools- virt...](http://www.clemesha.org/blog/modern-python-hacker-tools-virtualenv- fabric-pip/)

<comment><USER19> I just learned Python a week ago, and PIP was an important part of that.

For those of you who are just learning, PIP will automatically download, install, and then compile any python modules you point it at. Just make sure you have the module's recommended compilers installed first.

</comment></comment></comment><comment><USER20> I have found this extremely useful - used it to write many things - from a set of scripts that bootstrap chef server onto a node from scratch to a file chunking program that optimizes log files to align with hadoop block sizes using multiprocessing and this. It made a lot of things very easy.

This version introduces many positive changes: specially 'Iterating over output' that I have been waiting for a long time.

Andrew wants to increase his support for MacOS and would like to have test results from "python setup.py test" (to run the whole test suite). One identified bug is: <http://bugs.python.org/issue15898>

I would love to see more people use this to simplify their work!

If anyone is interested in looking into the scripts I wrote to see what's possible, let me know.

<comment><USER21> Yes. Please publish it.

</comment></comment><comment><USER22> Could somebody explain to me how this is different from envoy? <https://github.com/kennethreitz/envoy>

Not meant as a snide remark; genuinely curious.

<comment><USER23> Just look at how it's used. It's not the same. sh imports shell commands as functions. envoy allows you to run shell commands _very_ easily, like perl's ``.

</comment></comment><comment><USER24> For anyone looking for a nice subprocess library for Ruby, my friend Greg released one earlier this week - <https://github.com/gdb/rubysh>

<comment><USER25> I write another one for ruby, check out samples here: <https://github.com/quark-zju/easysh>

Although its functions are a subset of sh for python. It has many synatactic sugars, makes full use of ruby Enumerable, and does lazy-execute.

</comment></comment><comment><USER26> Definitely neat, but of course platform-dependent.

Due to the cross-platform needs of Mozilla's PDF.js build scripts, we've been writing a Node.js lib on top of Node's APIs that enables you to write shell- like scripts that run seamlessly on multiple platforms:

<http://shelljs.org>

Like Sh.py, you can (if you must) also run external commands, either synchronously or asynchronously.

<comment><USER27> This seems only tangentially related. The point of something like sh.py is to ease the use of external commands you need to use. The functions that shelljs partially implements (cd, pwd, ls, find, cp, rm, mv, mkdir, test, cat, sed, grep, which, echo, exit, env) are already trivially accomplished in Python.

</comment></comment><comment><USER28> I wrote something similar on top of nodejs to simplify some problems at Game Closure.

<http://www.github.com/gameclosure/jash>

It's probably not ready for prime time - past it's initial use cases it hasn't been tested much. Things like sh.py and jash are a really neat solution for some problems.

<comment><USER29> I was hoping for a Node.js alternative. One question, have you thought about using <https://github.com/samshull/node-proxy> instead of searching through the environment to find binaries? Using .get() you would only need to identify programs that are requested, rather than knowing them all up front.

</comment></comment><comment><USER30> Rather tempting to use this with aa Python REPL to replace a more traditional shell.

</comment><comment><USER31> I foresee a lot of frustrated users trying to google things about this project.

</comment><comment><USER32> Founder of Commando.io (<http://commando.io>) here. The tutorial on SSH was particularly interesting, since we are doing some of the same sort of things to help with orchestration of servers. Currently we are using `libssh2` via a PHP module, but switching to a sparkling new node.js interface for the SSH and SCP connections and executions shortly.

</comment><comment><USER33> This is beautiful. Thank you.

</comment><comment><USER34> Throwing exceptions when a command returns non-zero exit status is very useful indeed. However, this isn't very different from using the shell's own && operator.

I still believe that wrapping shell commands with functions is the way to go. Functions can intelligently check their arguments and prevent propagation of dangerous (or otherwise obviously incorrect) arguments.

<comment><USER35> Surely implementing the shell commands natively is the way to go?

This way you then have to parse the output of ifconfig, say.

eg I have been doing this for Lua [1] you can do

> i = nl.interfaces()

> print(i.lo)

lo Link encap:Local Loopback inet addr: 127.0.0.1/8 inet6 addr: ::1/128 UP LOOPBACK RUNNING LOWER_UP MTU: 16436 RX packets:261454 errors:0 dropped:0 TX packets:261454 errors:0 dropped:0

> print(i.eth0.macaddr)

f0:da:f0:38:36:39

The functionality is now reasonably comprehensive, so you can rename interfaces, add addresses, although it is still a work in progress, as there is a fair amount of work involved as there is a lot of shell to implement, but it can be incrementally useful.

[1] <https://github.com/justincormack/ljsyscall>

</comment></comment><comment><USER36> Do the python3 print statements imply anything about whether it's compatible with python2?

And what's the best way to quickly look and see which versions a package is compatible with?

<comment><AUTHOR> It's confirmed compatible with python 2.6-3.2

</comment></comment><comment><USER37> I would rather have py.sh ... a unix shell running python.

</comment><comment><USER38> It saved my day, I expected partials with cwd parameter and they were there. I used this instead of GitPython + manual popen for some git management tasks.

</comment><comment><USER39> for those wondering how "import madeupname" works, basically the incantation is:

        # unless __name__ == "__main__"
        self = sys.modules[__name__]
        # SelfWrapper has a custom __getattr__
        sys.modules[__name__] = SelfWrapper(self)

which seems somewhat unpythonesque (aren't import hooks supposed to be used for this?) but it's cool and I hadn't seen it before.

<comment><USER40> import hooks leave crap in your global state. this only modifies sys.modules, which is probably a much better option.

</comment></comment><comment><USER41> What happens to the order of keyword arguments?

<comment><USER42> Good point. I guess if order matters you can do everything as positional args, then order will be preserved.

</comment></comment><comment><USER43> Ohh this looks awesome, I wish it would work for windows thought.

</comment><comment><USER44> This is cool. Could have used it yesterday, literally.

<comment><USER45> In that case you'll have to hurry.

</comment></comment><comment><USER46> Does this include scp/rsync?

<comment><USER45> from sh import anythingyoudamnwellplease

</comment></comment><comment><USER47> this is awesome, thank you for posting

</comment><comment><USER48> Hey, just like groovy's "".execute()

<comment><USER49> Lua has a function called os.execute() where you can call programs and utilities from the command line. Cross platform as well; I've got more than one Lua script where it's working in the command line and can handle being on Unix or on Windows.

A common example of this that I use quite often is "clear" or "cls". It makes the determination what OS it's using, then issues the appropriate command to clear the terminal window.</comment></comment>


Git Source Control Provider for Visual Studio 2010 - <AUTHOR> http://visualstudiogallery.msdn.microsoft.com/en-us/63a7e40d-4d71-4fbb-a23b-d262124b8f4c <comment><AUTHOR> After installing the extension if you aren't seeing the integration in VS.NET. Right click on a GIT controlled file and choose "Refresh GIT File Status".</comment>


Simple and Modern C++14 Command Line Parsing - <AUTHOR> https://github.com/matt-42/iod/blob/master/tests/parse_command_line.cc <comment><AUTHOR> Author here, remarks and questions are welcome.</comment>


Voynich Manuscript Revealed (2018) - <AUTHOR> https://www.youtube.com/watch?v=p6keMgLmFEk <comment><USER2> I'm no expert in this, but this would definitely not be the first to claim to have solved this manuscript. In fact, less than a year ago, another person claimed that it was written in Latin shorthand and was a women's health book. Although apparently that translation was debunked.</comment>


Is it worth it to buy an iPhone 4S for Siri? - <AUTHOR>

Hi HN,
I've been quite intrigued by Siri. I recall the voice controls of the last iPod shuffle didn't impress anyone so I didn't buy one, but the Siri thing seems like a introduction in the real world of the fictive HAL.
Like everyone I've seen the videos or the funny screenshots but no discussion thread here on HN. Is it that good? Or should I wait for it to be mature and debugged to try it. <comment><USER2> Siri is pretty good, but in my opinion there are few cases where it's really that much faster than using the touch gestures. It takes a surprising long time for Siri to respond since it has to contact Apple servers for every request. For example, I can set a 3-min tea timer using the touch UI faster than asking Siri to do it for me.

Also keep in mind that Siri is terrible in any kind of noisy environment, especially with other people talking.

I will say that Siri excels at playing specific songs, artists, albums, etc. It's much faster than using the touch UI. Siri is also good for when you don't have your hands free.

Overall, Siri is pretty amazing but it hasn't fundamentally changed the way I use my iPhone 4s. I will say the iPhone 4s is ridiculously fast and smooth, although I upgraded from an iPhone 3G so YMMV.

<comment><USER3> On older iPhones you can already play specific albums/songs/artist using voice recognition (eg: 'Play artist Nine Inch Nails') and that doesn't need to send your request to the cloud first.

From what I've seen/heard of Siri I'm totally underwhelmed, and planning on upgrading to a Galaxy SII from my iPhone 3Gs.

I should point out that I'm in the UK, so most of Siri's location based stuff wouldn't work for me, which is a bit of a deal breaker in my eyes.</comment></comment>


Worst Puzzle Ever  (2009) - <AUTHOR> http://blog.rongarret.info/2009/12/worst-puzzle-ever.html <comment><USER2> Mr Puzzle did a set of videos exploring the flaws of the ISIS Orb:

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

The Mr Puzzle channel as a whole is highly recommended if you're into puzzles of this sort.

<comment><USER3> > The Mr Puzzle channel as a whole is highly recommended if you're into > puzzles of this sort.

Or even if you're not, I found that video highly entertaining. :)

</comment></comment><comment><USER4> > And they know something much more important: every one of these people was > affluent enough (or knew someone affluent enough) to spend a three-digit sum > on a puzzle in the middle of the worst economic downturn in living memory.

Let's not hyperventilate _too_ much; on any given weekend you can find people who hover around the poverty line spending hundreds of dollars on "toys", although those toys will probably continue to provide value and enjoyment significantly longer than this dumb puzzle.

Also, I would hardly consider the Great Depression to be out of "living memory", and are we still going to say we're "in the middle of" a huge economic downturn in 2028 just to support whatever histrionic point we need to make that day?

Edit: Either the (2009) wasn't in the title when I first clicked, or I just missed the damn thing. Thanks for pointing that out, Shaanie

<comment><USER5> > I would hardly consider the Great Depression to be out of "living memory"

If you were 5 in 1938, you'd be 85 today. And your memories of the Depression probably wouldn't be that good.

The older you were in the Depression, the more dead you are now.

</comment></comment><comment><AUTHOR> Follow up post is here:

[https://blog.rongarret.info/2009/12/isis- update.html](https://blog.rongarret.info/2009/12/isis-update.html)

</comment><comment><USER6> The puzzle website is obviously dead, but the domain is still registered: isisadventure.com. Good luck to anyone doing anything with that domain

<comment><USER7> the domain is registered by email@example.com, which registered over 500 domains, 2 of them marked malicious. the cisco umbrella risk of the domain is 77, medium

<comment><USER8> Yes, it's just there's certain bad publicity associated with the name these days due to some other people known by the appellation Isis.

</comment></comment></comment><comment><USER9> Puzzle companies need a lot of trust from their customers for hobbyists to buy them and spend hours working on them. To solve this problem, is there a community review site for puzzles without spoilers? Solvers would want to avoid Googling around, since the solution could accidentally be revealed, making the $200 purchase worthless.

<comment><USER10> I have seen youtube reviewers that give difficulty ratings etc before showing solutions.

</comment></comment><comment><USER11> So did he ever get spam at the fake address?

<comment><AUTHOR> That's a good question. No, I didn't.

</comment></comment><comment><USER12> The comments on that post are particularly interesting.

<comment><USER13> Like the first one comparing the puzzles registration flow to the holocaust?

WTF.

<comment><USER14> It was an example of seemingly innocuous compliance with "please provide us with your personal info, we promise we won't do anything bad with it!" leading to horrific consequences.

<comment><USER13> Oh I thought it was a brilliant illustration of the risk of complying with ISIS requests.

</comment></comment></comment></comment><comment><USER15> Why would anyone call a puzzle Isis.

<comment><USER16> Isis was an Egyptian goddess before her name got coopted by a terrorist group.

<comment><USER6> My brother adopted a dog a few years back named Isis (after the Egyptian god). Even though Isis now had a very different connotation, they felt bad to change the dog's name. They recently adopted another dog which I jokingly recommended they name Al Qaeda.

<comment><USER17> I didn't know the name "Isis" had actually seen its popularity affected that much in the US? It still feels like a beautiful classical name to me, but then we never used the English name "ISIS" for the organisation, here in France.

It's a shame that the multimillenial name of an ancient god could be ruined for some people by an organization that lasted less than a decade, I hope this effect doesn't last.

</comment></comment></comment></comment><comment><USER18> He's clearly insanely paranoid about personal information, but that does sound like a terrible puzzle.

<comment><USER19> Maybe he is paranoid, but it is his information, so he has every right to be! If only more people are like him, we wouldn't have all these multi billion dollar companies doing whatever they feel like with their users' info

<comment><USER20> Sure, but why not just create a fake persona and call it a day. Transient email address, fake name, google voice phone number, done...

<comment><USER21> _> why not just create a fake persona_

If you read the article, you will see that the author did exactly that.</comment></comment></comment></comment>


Don't Email Me Without: 1) Agenda 2) Times (please) - <AUTHOR> http://meeteor.posterous.com/email-etiquette-part-iii-remove-the-work

<comment><USER2> I hate meetings and am one of those who refuse them if I don't know why I am being asked to attend. If something is serious enough to require a face to face, then it warrants a few details about the topic. No chance of a reply if you cant say when you want to meet, because I can fill my day with productive tasks and meetings easily, no room for meetings with vague times or topics. I'm with you on this.

<comment><AUTHOR> Totally right there with you. Pretty arrogant to want to meet without an agenda!</comment></comment>


Ask HN: Do we have a case against Facebook for infringement? - <AUTHOR> Facebook launched an app with a nearly identical name, very close feel and similar concept as ours - is there anything we can do?<p>We cannot afford a lawyer, but could be generous with contingencies. <comment><USER2> Are you sure you're asking the right questions? Someone clever once told me "If someone has the same idea, at least you know it was a good idea". How are you going to prove infringement? Many apps have a similar feel.

Move importantly, are you prepared and willing to go to court, knowing that justice (from your perspective) might not be served? It might be healthier to move on. You can still try and compete - not everybody likes Facebook and your app might be better. Just don't let it get to you, and if you can't, walk away.

I suspect you know most of these things on some level, and that this post was more to let of steam. I can only imagine how very frustrating this is. Good luck.

</comment><comment><USER3> No, there is nothing (little) you can do.

A contingency is meaningless because any firm would look at who they were up against and the cost and the risk would outweigh the payoff.

If you had the money and years to repeatedly sue and appeal, then maybe, some firm would take the case, eventually, as a PR stunt to champion "David" vs "Goliath." That's assuming your claim of infringement has any weight.

Besides, most marketing has some logical path to it. So, if the look and feel matches up with the product in a logical way then it's reasonable they came to a similar conclusion on a parallel path, as opposed to seeing and taking your product, or borrowing liberally from it.

Can you share your product and the Facebook product you think infringes?

</comment><comment><USER4> It is of course a cliche for technical people to hear "I've got the perfect million-dollar idea, now all I need is someone to implement it." "We cannot afford a lawyer, but could be generous with contingencies" is surely the similar phrase that lawyers snicker to themselves over the water cooler about. Either phrase ultimately means: This person is not serious, stay far away.

</comment><comment><USER5> Do you have a shipped product already with users?

If you can't afford a lawyer, create publicity. Give the public the facts so they can make a determination whether they ripped you off or didn't, and whether your product is truly as good as you claim. You can't control which way the outcome will go, but you can do your best to be forthcoming, honest, and play the underdog (which you are).

This way, you could walk away with a ton of publicity and public goodwill, from average users, but also potentially from investors.

</comment><comment><USER6> I expect it would be cost prohibitive to take on Fbook.

I would keep doing what you're doing, maybe start picking out an alternative domain/name in case they would approach you at some point wanting you to change your name.

Good luck with your app.

</comment><comment><USER7> just file a complaint to Apple (assuming it's an iOS app) with the details and they'll put you guys in touch to resolve it.</comment>


Is Haskell the right language for teaching functional programming principles? - <AUTHOR> http://profsjt.blogspot.com/2017/10/is-haskell-right-language-for-teaching.html <comment><USER2> Beginner programmer here – I just want to say that I credit Elm with getting me hooked on programming. I tried other languages (Ruby, Javascript, even Elixir) but I never made it past the first project. With Elm, I've made a few projects and show no sign of stopping. Here's the best I can determine why:

1\. Elm is simple, so I have fewer options to choose from when solving a problem. This means I learn a few ideas really well.

2\. Even thought Elm is very much about the web (as the article mentioned), it's awesome to be able to see things in your browser immediately. It's also helpful to be able to build an application without a backend. You can see your model in the same file that you see your view, which helps you more easily think about each part together.

3\. Complier/Type System: Once I finally figured out Union Types, the compiler is super helpful and friendly.

4\. Elm forces you to handle errors, functions that can fail, and "Nothing", all things that you have to (a) know about and (b) remember to do in other languages.

5\. Lack of tutorials, documentation and libraries to rely on means less "productivity" but it forced me to really learn the language and how things worked. I had to implement OAuth without a library, read source code to figure out what a function did, and couldn't google every problem.

I'm too new to know if Elm taught me the most important things a I should know about programming, or if there are better options out there. I do know that it's really fun. As a beginner, that might be the most important thing.

<comment><USER3> This is so true. Anyone who wants to see the ideas behind Haskell and It's style of languages succeed should be doing everything they can to support elm. You can't find and easier, more straightforward introduction to the concepts and style of programming than it.

Yes purists will complain about the bells and whistles it does have, and that's exactly the point.

You can learn elm and be productive in it in after a single weekend. And it's error messages should be _the_ industry standard for language messages in any language. It's incredible how simple and accurate they are. It will change your view of what a compiler is capable of.

Not to mention it's not a far leap for people already doing web coding.

<comment><USER4> I would just like to mention that as of 1.5, Elixir has stepped it's game up on error messaging as well, to get as close it can get to Elm's(which truly are fantastic) without static typing.

</comment></comment></comment><comment><USER5> As much as I hate to say this, I think untyped functional programming is the way to go to teach about the virtues of functional programming.

We do this at my university using the obscure but awesome Oz programming language (1). But then students (and some professors, truth be told) complain that it's obscure...

If I had to pick one, I'd say Elixir. It's like Erland with less wonky syntax. Another option is a pure scheme. But people hate on the parens (yes, it's not very smart, but people are going to do it anyway).

Pyret (2) is also made for this purpose, but that's sort of the caveat: it's a teaching language and people don't like that.

(1) [https://www.info.ucl.ac.be/~pvr/book.html](https://www.info.ucl.ac.be/~pvr/book.html) (2) [https://www.pyret.org/](https://www.pyret.org/)

<comment><USER6> Too bad about scheme, that's the language I used to learn functional programming and it seemed to make so much sense in that context.

<comment><USER7> I got in touch with Scheme twenty years ago. Read the specification (R5RS) and that was the first time programming in Lisp made sense to me. Because the specification was so short, I could remember every detail after a short time. Also the syntax was so predictable unlike Common Lisp with its myriad of operations. Without reading too many books about Scheme I started programming in it. Learned about tail recursion. About destructive vs non destructive operations. About functions that always returned values. Then I got in touch with SICP ("Structure and Interpretation of Computer Programs"). Man, that book was a revelation.

Scheme was a breathe of fresh air coming from C/Pascal/Java. It was a totally different way to tell the computer what I wanted to do (although I had similar thoughts several years earlier programming my HP28s calculator in a Forth like language, then later when I started using Mathematica).

</comment></comment></comment><comment><USER8> Haskell is really the intersection of functional programming and static typing at the highest level, and these are 2 very different things, and it will be very easy to get lost in the typing aspect for fear of not grasping the functional aspect.

If your goal is to teach just functional programming, then Haskell may be too much since the language is about a lot more than just functional programming.

Scheme or a light lisp (including Clojure) is often the way FP is initially taught, since you can focus directly on the functional aspects and leave the complexities of static typing out of it. This was the tradition at MIT for a long time (maybe still is).

<comment><USER9> Hackett ([https://github.com/lexi-lambda/hackett](https://github.com/lexi- lambda/hackett)) seems like an interesting project in this regard.

</comment></comment><comment><USER10> My feeling is Haskell is a bad teaching language for the same reason C++ is -- there is too much "this is some crazy stuff you have to learn about the language" early on.

One reason I have learned to love teaching Java over C++ is that the language- based bugs tend to be "shallow", at least in the first few weeks. The error messages tend to be easy to interpret, and when programs crash it is easy to understand why (how to fix it might be hard of course!)

For later year students, it's fine to expect them to learn the weirdnesses of Haskell and C++, but not for a student on day one.

<comment><USER11> It's all in the approach. I've noticed most universities these days either get students started on Python or C. I believe the idea behind starting with Python is that most beginning students will hit the ground running, whereas the idea for C is that you get thrown in the deep end but will have a deeper understanding (and perhaps foundation) going forward. Which approach is better I dare not say..

<comment><USER12> C is good for teaching a simplified machine model, one with a distinction between stack and heap, pointers, and a purely sequential execution model. This is enhanced if you use it to program an Arduino or similar trivial hardware, collapsing the division between hardware and software to one piece of hardware (the single-board computer) and one piece of software (the code the student wrote) and nothing else.

C, in short, gives a good way to control actual hardware without having to introduce students to the complexities of actual hardware.

Python is good for teaching algorithms and OO design, precisely because it allows students to focus on the algorithm while not having to slow down the course with memory management.

In both cases, the idea is clear: Only teach one hard thing at a time, and then build.

</comment></comment></comment><comment><USER13> Racket / HtDP is the best way to teach functional programming to beginners.

[http://www.ccs.neu.edu/home/matthias/Thoughts/Growing_a_Prog...](http://www.ccs.neu.edu/home/matthias/Thoughts/Growing_a_Programmer.html)

Haskell obviously has its place, but it is much better used when looking at something like PL Theory at a 3000-400 level.

<comment><USER14> Definitely agreed. I was introduced to functional programming via Pyret, which is similar to Racket and draws from HtDP in terms of pedagogy. It's a much gentler introduction than being thrown to the wolves with Haskell or OCaml. I'm sure one could learn FP effectively with those languages too, but if you're still trying to wrap your head around the functional paradigm you don't really want to have to stumble across words like "endofunctor" while reading the documentation. I even have a good math background but I would have found that confusing at the time.

[https://www.pyret.org/](https://www.pyret.org/)

<comment><USER13> Glad to see people are enjoying Pyret! If you don't like the parenthesis in Racket, this is the path for you.

</comment></comment></comment><comment><USER15> I wouldn't think so. Maybe Clojure?

I kind of like Haskell but I've been turned off by the way some of the development is done.

There is, for all intents and purposes, only GHC. Yet everyone uses it by tuning on all sorts of special options to make it more usable. Why are they options? To remain 'compatible' with the 'other Haskell compilers' that basically no one seems to use.

It's like if JS all defaulted to 1.0 and you had to pile on options to use any features after 1998.

It just makes things much more confusing and odd than necessary. To support something it seems like no one uses.

It will also be easier once the whole applicable/monad thing is done.

<comment><USER16> Clojure's focus, after simplicity, is functional programming.

Haskell's focus is as an experimental vehicle for type system theory. If you want to teach type system and category theory, use Haskell.

Functional programming does not require Hindley-Milner type inference, and that happens to be one of the larger cognitive hurdles in Haskell. Algorithm W is a layer on top of the Lambda Calculus, not something essential for understanding it.

+1 for using Clojure to teach Lambda Calculus^h^h^h functional programming.

<comment><USER17> Just because there are _some_ folks that use Haskell for for experimental studies, doesn't mean that Haskell is _not_ a great language for line-of- business programming.

I can't say it better than Gabriel Gonzalez:

"Haskell is unbelievably awesome for maintaining large projects. There's nothing that I can say that will fully convey how nice it is to modify existing Haskell code. You can only appreciate this through experience.

When I say that Haskell is easy to maintain, I mean that you can easily approach a large Haskell code base written by somebody else and make sweeping architectural changes to the project without breaking the code."

</comment></comment></comment><comment><USER18> Having learnt Haskell as my first programming language, sure it has a high learning curve but it pays off in so many ways. It is without doubt the most beautiful language ever conceived. Without doubt it is the right language to unlearn imperative bs and the right language to learn functional programming principles. Even against the likes the of lispy langs and other ml flava, Haskell reigns supreme with it's purity

<comment><USER19> The question is about learning functional programming, Haskell forces you to learn much more than that to use it. Functional programming should be taught in something like Scheme, which lets you focus on the functional without being forced to also deal with a crazy Hindley-Milner type system that has nothing to do with functional programming. Haskell is not the right language to learn functional programming in, it's not the right language to learn anything in, beginners should start in easier languages.

> It is without doubt the most beautiful language ever conceived.

Only if you're a masochist.

<comment><USER18> Quite honestly, I feel if you think Haskell's beauty is somehow in any way associated with masochist mindset , you most likely think Maths is associated with a masochist mindset and (assuming math defines reality) the true nature reality is only viewable to those with a masochist mind. Then friend, I truly am a masochist

<comment><USER19> Yep :). I don't agree math defines reality however; it can describe reality, it doesn't define it.

</comment></comment></comment></comment><comment><USER20> I think there is also an emotional/social dimension to choosing a beginner's language that is important to take into account.

Imagine (putting Haskell's static typing aside), the difference in feeling between learning the basics of FP (say higher order functions, streams, all the different ways of dispatching function calls, etc.) in Haskell, vs OCaml, vs Clojure, vs scheme, vs javascript. Poking around on the internet, the beginner is going to get really different aesthetic vibes from each of these languages.

To shamelessly generalize: \- Haskell/OCaml feels cerebral, academic, Mathematical, maybe even elitist \- Clojure/scheme has that dark-terminal screen, classic 80s vibe- to me it feels nostalgic and quirky. \- Javascript is, of course, javascript- it's bright, active, and, most of all, popular

All of these will bore/intimidate/comfort/excite different student demographics in different ways, completely independently of the programming concepts that you're teaching. So I think it's important to keep in mind the aesthetic preferences of the students you're trying to catch.

</comment><comment><USER21> What do you think about Standard ML as a language for teaching?

I like it because the syntax is clean, it is functional and higher-order, but also has an explicit concept of references (i.e. mutable memory) and using functions with side effects (i.e. printing) is no trouble at all.

<comment><USER22> I have been programming for over 20 years, most of it in FP land. ML is tractable, a beautiful prism through which one can peek at Computer Science as a subject, but it has a frustrating lack of _practical_ tooling and beginner- friendly community. For anything outside basic I/O, you will need to dust off compiler-specific extensions, most of them last used on "Un*x Workstations".

Just look at the Basis library. Safe to say it's nowhere near Racket, Scala, Clojure, Kotlin, ...

[http://sml-family.org/Basis/manpages.html](http://sml- family.org/Basis/manpages.html)

<comment><USER23> I never understood why a lack of tooling would be a serious problem for a language used for teaching FP.

<comment><USER24> It's a tough sell if the language has no hope of industry adoption. Also tough to use a language, especially one with type inference, without editor support.

<comment><USER23> Most people in my SML class seemed to have no problem with either of those.

<comment><USER24> Maybe some classes are just that good. A lot aren't, I'm guessing, and you would want to at least take away something you could use in the real world from them.

</comment></comment></comment></comment></comment></comment><comment><USER25> Robert Harper has written a few posts on his personal blog why they use SML to teach functional programming, why they teach it to freshmen, why they don't use Haskell ect [https://existentialtype.wordpress.com/2011/03/21/the-dog- tha...](https://existentialtype.wordpress.com/2011/03/21/the-dog-that-didnt- bark/)

 _" Finally, this article explains why Haskell is not suitable for my purposes: the principle of induction is never valid for a Haskell program! The problem is that Haskell is a lazy language, rather than a language with laziness. It forces on you the existence of "undefined" values of every type, invalidating the bedrock principle of proof by induction. Put in other terms suggested to me by John Launchbury, Haskell has a paucity of types, lacking even the bog standard type of natural numbers."_

</comment><comment><USER26> I think Haskell is a beautiful language, but it's community seems too elitist and pedantic, which from my perspective makes people value sophistication and "elegance" over readability and ease of comprehension. I'd recommend Elixir, it's code is beautifully readable, it's pragmatically functional since it's based on Erlang, I'm not refuting Haskell usefulness in the real world, I'm just pointing out it's functional nature is academic, while Erlang's functional essence is pretty much a colateral effect of the problems it was aimed to solve. edit: Thinking again, even from the academic perspective, I'd still go for something like Racket, in my sense of aesthetic there's no competition to the beautiful simplicity of lisp.

<comment><USER27> Could you clarify what you mean by elitist/pedantic? I've found the Haskell community to be fairly friendly, and very open to beginners (including when they ask basic questions).

I've mostly been on /r/haskell and Quora, and watched talks by Haskellers though, so maybe the community is different on other platforms.

<comment><USER28> I'd say this thread is a perfect microcosm of it. In JavaScript, the general attitude is "you're right, this thing you're complaining about _is_ kinda stupid, here's this tool to make it go away" versus "no, you're wrong, Haskell is great, STFU"

<comment><USER27> I don't think that's really true in the Haskell community. I've seen lots of self-criticism of Haskell on /r/haskell. Even SPJ himself is willing to admit that Haskell has design mistakes.

Some things Haskellers readily admit as issues with Haskell:

\- the String type

\- records

\- laziness (more contentious, but many people agree that this might not have been the right choice)

\- error messages

\- the prelude

Essentially, my experience has been that Haskellers are willing to accept that Haskell is not perfect.

<comment><USER29> Indeed, the Haskell community is very self critical, much to its credit.

[https://www.reddit.com/r/haskell/comments/3b498l/if_you_coul...](https://www.reddit.com/r/haskell/comments/3b498l/if_you_could_change_one_thing_about_haskell_what/)

</comment></comment></comment></comment></comment><comment><USER30> I learned FP using Racket. It was a good experience, but the parenthesis were really annoying. It makes you feel stupid.

I believe Elm would be better choice. It would allow to get a visual result easily (html), there is a clear convention about code formatting and the compiler errors are really friendly.

</comment><comment><USER31> I think Haskell is very akin to C++ in terms of learning curve.

There are a ton of concepts you have to learn up front to even get started. The compiler is generally unhelpful if you've never dealt with it before. There are a lot of approaches to solving a problem and the language does not make it clear which approach is preferred when. Unless you're a masochist, these qualities can be quite off putting.

I think a language like OCaml is a good entry point into functional programming. The compiler errors are really useful. The language pushes you towards a sane functional approach. The learning curve is pretty smooth, too.

My alma mater seems to agree and FP with OCaml in the upper level CS intro course ([https://www.seas.upenn.edu/~cis120/current/index.shtml](https://www.seas.upenn.edu/~cis120/current/index.shtml)).

</comment><comment><USER32> My path to functional programming started with Paul Graham's lisp essays and books and then SICP and Scheme. I visited the world of Haskell but only half heartedly as I was much happier in a dynamically typed world for my hobby projects. As a daytime C++ coder I found types an annoyance; so much time wasted getting something to compile. Later I came to discover types again with Scala and now I'm fully sold. I will revisit Haskell again some day but most likely will learn Elm first. Elm is a much friendlier ML style language and much more explicit about things like monads. Moving from Elm to Haskell is much easier since the programmer will have "aha" moments mapping what they did explicitly in Elm to what you can do more generically with type classes in Haskell

<comment><USER33> I'm lucky enough to own copies of On Lisp and ANSI Common Lisp. These books are a pure pleasure to read -- a lot like reading a novel.

<comment><USER34> May the warm light of Lisp enlightenment shine on you -- CL blew my mind!!

<comment><USER33> I strongly recommend these two books. They are amazing!

</comment></comment></comment></comment><comment><USER35> I love Purescript, but I think in some ways it is even more arcane than Haskell for a beginner.

e.g.,

        > :t (+)
        forall a. Semiring a => a -> a -> a

        > :t (&&)
        forall a. HeytingAlgebra a => a -> a -> a

<comment><USER36> But it requires a different kind of skill altogether. A semiring is a concept in abstract algebra that's quite independent from general functional programming.

<comment><USER35> That's kind of my point. Usually when you're just learning "general functional programming", you're thinking about, say, (+) as a function that takes two numbers, and returns a number, because you're at the stage of figuring out how something like

        fold (+) 0 [1,2,3]

works. Introducing "Semiring" as a concept at the same time can be a bit much for a beginner!

I do think it's a useful concept, and that Purescript is an excellent, intermediate-level FP language.

</comment></comment></comment><comment><USER37> I do believe that Haskell is the wrong language to learn functional programming principles. Right off of the bat Haskell forces learners to use monads for IO. Monads are an advanced concept; too advanced for beginners. If learners end up do kind of getting the IO monad, a big number of them actually end up not being able to understand why it's good or even understanding what a monad is completely... and see it as a pointless overcomplicated abstraction. I knew a person who learned Haskell then moved on to javascript due to the wall he hit while trying to understand monads. I've looked at his javascript code and his idea of functional programming is just littering his imperative javascript code with maps, reduces and filters.

Thanks to redux, a lot of people are getting a broken view of what functional programming really is via javascript. If you think you've learned functional programming via react/redux and javascript... chances are you haven't really understood it yet. Ask yourself, why is functional programming called functional programming and not called immutable programming? If you don't know the answer... you haven't really grokked functional programming yet.

The right language? Racket maybe?

<comment><USER24> I disagree that you have to learn monads for IO. I know some tutorials mention monads right off the bat while teaching IO but that is not a recommended teaching approach.

For IO what you would need to learn is that all IO actions are values of the `IO` type and they can be sequenced together for guaranteed ordering using the `do` notation. That's it. No monads. We can introduce monads after we show using the same `do` notation for lists, `Maybe`s, and `IO`.

<comment><USER37> >For IO what you would need to learn is that all IO actions are values of the `IO` type and they can be sequenced together for guaranteed ordering using the `do` notation. That's it. No monads. We can introduce monads after we show using the same `do` notation for lists, `Maybe`s, and `IO`.

This is an awkward teaching approach. Forcing learners to use advanced concepts without fully understanding them. Why can't haskell just have a print function that returns a void? How come when I use haskell with input it starts polluting the input with this IO thing? This all seems stupid initially and it takes a lot of learning to understand why things are done this way.... I mean that person I know thinks javascript is better than haskell because console.log("hello") is ten times more straightforward.

<comment><USER24> I disagree that it's forcing learners to use advanced concepts. It's giving them syntax sugar and a fairly clear introductory explanation (IO is done only with the `IO` type for safety reasons) and giving them all the capabilities of IO in other languages straight from day one.

Forgetting about types for a second, can you really say that `putStrLn "hello"` is harder to understand than `console.log("hello")`? Trust me when I say this, plenty of people have taught Haskell to kids and the result has always been that they pick it up easily. Programmers from other backgrounds worry away too much of their mental capacity thinking about monads. Stop worrying about it and just hack away.

<comment><USER37> Understanding a pattern is different from copying a pattern. Our disagreement lies not with kids copying a pattern but with people fully comprehending the philosophy and true nature of the monad abstraction. This is not easy for a beginner. Allow me to elucidate:

Here is a an example of a trivial operation in imperative programming that becomes a bit more complicated in Haskell: Create a function that prints everything in an array:

naive implementation in haskell (won't work):

      printElements arrayOfStrings= map putStrLn arrayOfStrings
      main = printElements ["Hello", "World"]

True implementation:

      printElements [] = return ()
      printElements x:xs = (putStrLn x) >> (printElements xs)
      main = printElements ["Hello", "World"]

The second implementation requires understanding of types and the IO monad while the first implementation is a naive and broken implementation that most people turn to when learning Haskell.

It is not trivial to explain to a person why it must be done the second way... All of this and all we were doing was printing something to the console! It's too much! Monads aren't even a required part of functional programming. Haskell is not a great language to learn about functional programming.

<comment><USER29> Actually the "true" implementation is

        printElements arrayOfStrings = traverse putStrLn arrayOfStrings
        main = printElements ["Hello", "World"]

but the difference between map and traverse is sufficient for your point to still hold water.

<comment><USER24> I think we would actually use `mapM_` rather than `traverse`.

<comment><USER29> Or rather `traverse_`. (I still don't know why `traverse` is not renamed `mapA`.)

<comment><USER24> Interesting, I don't see `traverse_` in Prelude in 8.0.2 that I have on my machine.

<comment><USER29> It's not in Prelude, it's in Data.Foldable.

</comment></comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER38> Absolutely not. You need a gateway drug before Haskell becomes interesting.

It's one of those things where you should not use a solution to a problem until you understand what the problem IS. Otherwise you'll feel like things are complicated for no reason.

ML, Elm, Elixir, Closure or even (yes, really) JavaScript are much better places to start.

<comment><USER8> I think you mean Clojure, not Closure. The latter is a library by Google.

<comment><USER38> Yes, Clojure :) I wasn't even thinking the library, but the programming concept when I typoed it. Whoops!

</comment></comment></comment><comment><USER39> I have taught FP to more than one thousand students over 5 years. For all of them, the language was OCaml (at several universities, in Paris).

At the time and still today, I think that OCaml is a very good language to learn FP. Students that learn FP before any other programming language get it quickly, and others can compare and write both the imperative and the functional form of a given program. But as a whole, the installation is easy and uniform (which matters a lot when teaching) and the standard library sufficient for everything, as you never want to have a lot of dependencies for the same reason.

Of course, OCaml has its drawbacks: A weird syntax, terrible tooling... but you don't really see that when learning programming concepts. The only students which complained were the ones which already spent a lot of time programming before class _and_ trollers at the same time.

<comment><USER24> For dismissing syntax complaints, have you looked at ReasonML?

</comment></comment><comment><USER40> Haskell syntax is terse but not simple. Not good for teaching Functional Programming PRINCIPLES. See: [https://www.haskell.org/onlinereport/haskell2010/haskellch10...](https://www.haskell.org/onlinereport/haskell2010/haskellch10.html) .

How about using Lisp to teach functional programming? Lisp syntax is small, simple. You don't need to teach so much Lisp as teach with Lisp.

</comment><comment><USER41> Given your constraints, I'd say that Elm is an excellent choice. It's simplistic enough to be approachable, the easy web integration is a feature (not a drawback as you mentioned), and people are doing "real work" in Elm so they will be able to use it for years moving forward.

</comment><comment><USER42> This question leaves me with more questions. The post looks at a few alternatives without giving context.

1\. How does the course fit the overall curriculum? 2\. What is the experience and maturity of the people taking the course? 3\. How strong are the teaching skills of the instructor?

The density of functional features taught in a certain time period matters. A drastic change in mindset simply takes time that, I would say, is greater than a standard semester. A single semester is fine if FP is going to be reinforced, thereafter, in other courses.

Also, starting students with FP instead of imperative or OO means less to break down and relearn.

I've read numerous debates that try to define functional programming. I don't want to start another one because they're tedious. My experience is that functional programming is a change in mindset in how to solve a problem and organize code. The instructor's ability to teach matters. The time given to learn matters. Reinforcing the concepts throughout a curriculum matters.

For each point I make above, you could make a valid case for a different FP language/ecosystem. As much as I like Haskell, it's not a "one size fits all".

</comment><comment><USER43> I learned Haskell in a course called "Comparative Programming Languages" by Cormac Flannigan ([https://users.soe.ucsc.edu/~cormac/](https://users.soe.ucsc.edu/~cormac/)) my last year in college, so I had done a lot of procedural, object oriented programming by then, but no real emphasis on functional and especially not purely functional.

It was probably my favorite course I took in college, owing a lot to his outstanding teaching style. It awoke an interest in programming languages and a strange fetish for the beauty of them. I was probably the odd one out, few other students enjoyed it as much as I did. I became a slightly rabid Haskell promoter for a little while. I realize it's not great to build most things in but I think everyone should have the same experience I did with it (after learning some basic programming and gaining a working knowledge of at least one "easy" language like Java or Python, but before you've spent too much time with them and have solidified your opinions).

</comment><comment><USER44> In my personal experience: No. I tried Haskell and Scala multiple times but never worked. Once I got to elixir everything just sunk in and felt easy. YMMV

</comment><comment><USER45> Buy this: [http://haskellbook.com/](http://haskellbook.com/)

I tried LYAH and some other sources a few times, but was really turned off by those approaches. It wasn't until i found HaskellBook that I really started liking it.

I think a lot of it depends on the background of the person learning. I came from a strong math/stats background before I learned to code and so much of it clicked a lot better than other imperative languages.

</comment><comment><USER46> I'm currently learning Haskell from "Haskell Programming From First Principles"[1] and enjoying it so far (even attending a local weekly study group). I'm absolutely learning functional programming principles and then some. Pretty effective thus far, and I find it extremely accessible.

[1] [http://haskellbook.com/](http://haskellbook.com/)

</comment><comment><USER47> I've mostly learned functional programming with SML at university, and then I learned Clojure with no problems, and after that I still had problems with learning Haskell.

So I'd say - no.

I especially had problems with searching for varios operators and what exactly they do. Also (despite having some experience with SML) - currying makes function definitions hard to read.

<comment><USER48> I have never seen an operator that I couldn't find with Hoogle.

E.g. for (&&&): [https://www.haskell.org/hoogle/?hoogle=%26%26%26](https://www.haskell.org/hoogle/?hoogle=%26%26%26)

You can also search by type: [https://www.haskell.org/hoogle/?hoogle=%3A%3A+String+-%3E+IO...](https://www.haskell.org/hoogle/?hoogle=%3A%3A+String+-%3E+IO+%28%29)

</comment></comment><comment><USER49> It worked for me, but I guess (also based on comments here) it depends on personality. I like to learn (work things out) from theory and I generally prefer to learn elegant languages that introduced some concept rather than a watered down version of that concept as it was adopted in more pragmatic languages. Some other people might prefer to be more practical and understand the theory later, and so prefer languages that are more pragmatic before they accept a new paradigm.

Haskell, due to its annoying insistence on pure functions, made functional programming click for me. I have seen functional style in impure languages before (Common Lisp) but I didn't have the discipline to really code that way - I only saw the downsides. Haskell forced that discipline on me, so I could also see the upsides. One significant upside is that one is forced to make functions really small, which leads to more readable and composable code.

</comment><comment><USER50> Haskell itself is difficult to understand unless you give someone to read "Learn you a Haskell for great good". I was giving this book to my junior developers to read for understanding such principles like recursion, list manipulation functions like map, filter, reduce etc. and it worked pretty well.

</comment><comment><USER51> SICP in Scheme is the only true answer. You are all heretics.

</comment><comment><USER52> I actually enjoy the benefits of my course in Clean at university ( [http://clean.cs.ru.nl/Clean](http://clean.cs.ru.nl/Clean) => "Clean is a general purpose, state-of-the-art, pure and lazy functional programming language"). While challenging, it taught me all the functional principles. Many of the language features and principles can be applied and useful for understanding Python, Scala, Kotlin, etc.

Applying it to something that wasn't just plain 'ol boring was slightly hard, but creating soccer team logic as the final project with a pre-written GUI module was lots of fun. Before that I never thought exams that required writing actual code were a good idea, but this one pulled it off well.

</comment><comment><USER53> Why not ML? Our programming languages course had a unit in ML and the transfer to Haskell after that was not trivial but still a smooth learning curve -- I could read not just getting-start or for-beginner guides.

</comment><comment><USER54> One might consider using a functional language which isn't lazy. Haskell's laziness makes its behavior harder to understand and is not necessary to illustrate the core concepts of FP.

</comment><comment><USER55> Not entirely on topic, but related, I have an evolving attempt at introducing programming language concepts by building a forth-like language in JavaScript - [https://github.com/srikumarks/nospoon](https://github.com/srikumarks/nospoon)

It is written in a stream-of-thought literate style. Feedback welcome as issues.

</comment><comment><USER56> Use a good _library_ of persistent immutable data structures. In any language your audience is already familiar with.

<comment><USER57> Functional programming is not just about using immutable data structures.

</comment></comment><comment><USER58> I had an FP course on F#, really liked it.

</comment><comment> Chiba-City Haskell Type Classes are brilliant. But I would recommend a strict evaluation language like ML (and modules with signatures) for Semester #1 and lazy Haskell for Semester #2. Anyone could cover a ton of useful contextual material taking just a little more time.

</comment><comment><USER59> I'm in the boat of learning FP right now. What would really help me, and folks in the same process, is for people to suggest languages that _would_ be better, and why, instead of doing the stereotypically HN commenter thing that I'm already seeing.

<comment><USER24> I always recommend [https://www.coursera.org/learn/programming- languages](https://www.coursera.org/learn/programming-languages) for learning FP, the professor has fantastic explanatory videos that are really clear and concise. You'll get the most out of it from doing the exercises, but you can still take away a lot from just watching the videos.

<comment><USER59> Thank you. I'll check that out.

</comment></comment></comment><comment><USER60> Probably not, because it's lazily evaluated and almost no other language is.

</comment><comment><USER61> > Full disclosure: at Kent, after teaching Haskell for many years, we > currently a compulsory second year course on "functional and concurrent > programming"

s/currently/currently dispense/

</comment><comment><USER62> We were thought functional programming with Dr. Scheme and Miranda. I think they were ok. Never had any problems with them. Have no idea about haskell.

<comment><USER63> > Have no idea about haskell

Born as a non-proprietary Miranda alternative, but instructors would have to be careful to side-step various modern quirks across the libs ("SQL as a free- monadic-profunctor-optics" and such broohaha) for a similar teaching experience.

</comment></comment><comment><USER64> Is there any other language with purity, laziness, and static types that could possibly be put forward as an alternative to Haskell?

</comment><comment><USER65> Functional programmers practice a form of no-true-Scotsmanism wherein type and category theory are an intrinsic part of "true" functional programming. So unless you are working in something with a type system _at least_ as expressive as Haskell's, you are -- arguably -- not doing _true_ functional programming. (Sorry, Schemers.)

</comment><comment><USER66> I knew the answer after just reading "Is Haskell the right language..."

</comment><comment><USER67> Go SJT! He taught me haskell back in 2003 - rotating ascii horses

</comment><comment><USER68> I think Python is a wonderful language to teach functional programming since it is so accessible for many definitions. One has to go a little off the rails to get all the functional features, but it is possible.

<comment><USER69> I also suspect this makes sense for an introductory FP class (FP, not static typing). The students have already already met the language, and they can compare functional and imperative styles of solutions to the same problem. I think I'd go with python, and then have one or two lectures near the end showing a language dedicated to FP / static typing.

<comment><USER68> Yeah, and by using a widely available language, they can actually use these techniques in the field.

</comment></comment></comment><comment><USER70> No. It's a great way to turn people off from the whole idea.

I suffered through a course in Haskell and functional programming in college, and the course material was so up its own butt about monads and type classes and algebraic data types and such, that I essentially wrote the whole thing off as academic flubbery. It didn't help that whatever version of GHC we had then gave off error messages more cryptic than C++ template metaprogramming, and it was such a cluster to have to bounce into the IO monad to just to do some intermediate printf debugging.

It wasn't until years later and exposure to .NET LINQ that it started to click and the motivations for why you would want to use functional programming became apparent.

<comment><USER71> While I agree that many courses on Haskell are no good ...

>> " _up its own butt about monads and type classes and algebraic data types_ "

Well, those are some of the best things about doing functional programming in languages that can afford them.

>> " _I essentially wrote the whole thing off as academic flubbery_ "

And maybe it was your attitude to the whole thing.

>> " _It wasn 't until years later and exposure to .NET LINQ that it started to click..._"

So seriously, can't you find anything else that changed " _years later_ "? Haven't _you_ changed? Aren't we talking about years of accumulated experience?

Also, .NET LINQ might be a cool example of what you can do with FP, there are elements of FP in it, certainly that's a monadic interface that makes it tick. But filtering an IEnumerable or an IQueryable is as interesting as executing an SQL query.

What have you learned about FP from executing SQL queries? Probably nothing.

Just saying.

<comment><USER72> Functional languages and strongly typed languages are not the same set. Most functional languages focus on typing (e.g. Haskell, Scala), but there are functional languages that do not (e.g. Clojure, Common LISP). You can easily do functional programming in clojure without using any monad concepts directly (though obviously it's easy to say "that's just a monad" in a lot of cases).

IMO the biggest win from functional programming is referential transparency. Automated verification (i.e. type checking) can definitely be useful on larger projects with bigger teams since it's self documenting. That's just my personal take on it though - there's plenty for everyone to like.

<comment><USER71> You're mentioning Clojure.

Clojure has _protocols_ which are probably inspired by type classes. Just like Clojure's protocols, type classes are a mechanism for ad hoc polymorphism that allows decoupling between data and the functions operating on that data.

Clojure indeed doesn't have monads, but this has to do with Clojure's culture (like all LISPs) of using macros for describing APIs for composing stuff. But those APIs aren't unified and some of the DSLs I've seen do not have a theoretical foundation, which really means they aren't reusable and some of them are flawed.

Due to its evolution and backwards compatibility concerns, some of its design shows its age as well. You can't make operations like "map" work on your own data types because it doesn't have a protocol defined for it.

Don't get me wrong, I actually like Clojure, but that the community is not using types like monads to drive their design is a flaw.

<comment><USER16> What do you mean by "doesn't have monads?" You just write monads in Clojure. They are only a structural formalism. [1]

If you meant doesn't have the Maybe monad built in... why would you want that tangled up in your data? [2]

      [1] https://github.com/khinsen/monads-in-clojure/blob/master/PART1.md

      [2] https://youtu.be/2V1FtfBDsLU?t=2381

</comment></comment></comment></comment></comment><comment><USER19> No, teach in Scheme; functional programming has shit to do with advanced static type systems.

</comment><comment><USER73> No. The best language is likely the one you know best. Be that Ruby, JS, Rust, or C++.

That way you can concentrate learning the _principles_ and you'll immediately know how to apply them.

The basic principles aren't hard anyhow - you can learn them completely in a day. The hard part is _applying_ them and understanding the trade offs.

</comment><comment><USER74> No

</comment><comment><USER75> No. You need to understand monads before learning FP and you need to learn FP for understanding monads. This is chicken/egg problem. Functional programming is overrated.

<comment><USER76> > You need to understand monads before learning FP

No, you don't. You don't even need to understand them before learning Haskell, much less before learning FP using a language which doesn't use monads as pervasively as Haskell does.

You obviously need to learn at least something about monads _as_ you learn Haskell, but understanding them is not a prerequisite.</comment></comment>


Things to Teach or Learn Before Programming - <AUTHOR> https://medium.com/@karti/things-to-teach-or-learn-before-programming-9027511c2606 <comment><USER2> I strongly disagree with the author. I've introduced tens (maybe hundreds) of people to code and starting with code (instead of a GUI) and preferably lower level (like C or VB) code is the best way to keep people motivated. What I've found is that people tend to settle in the less difficult path. After teaching python, no one cared to learn C, after teaching things like dreamweaver, no one cared about html. Even when they realised the benefits, they already had a tool that was good enough. If your objective is to simply make people more maker, ok, but I yet have to meet someone that would follow the described path.

<comment><AUTHOR> Author here. Thanks for sharing your experience. But how do you know whether Python or C served his needs better? For all I know it could be Python -- you can build a web server using Django, write scripts, do machine learning, do computer vision using OpenCV... These might very well be more useful to that person than what C lets you do. Nobody should learn C because you think it's important; they should learn it if, and only if, it's the best tool for what they want to do.</comment></comment>


How does HN get traffic to their github repositories? - <AUTHOR>

The question is simple: How does HN get traffic to their github repositories?<p>I've post a few scripts lately on github and am not sure how to get people to use them! <comment><USER2> It takes consistent and dedicated effort. I learned this the hard way of course =). Also what I've become completely sold on because it worked for me, is to contribute to _someone else's_ project that has some traction already.

As a developer, I love creating things, I need to create things, so my first thought is always "let me create this great thing from the ground up". But the problem there is once its done, no matter how good it is, it still has zero users.

Finally I decided to make it less about me needing to create and more about _people_. So I created a bootstrapping framework for Jekyll because my first time trying to use Jekyll was a train-wreck to say the least. Not because Jekyll is bad, but because there is no user-focused introduction, no 'hello- world' application, it's just raw in your face code.

Anyway check it out : <https://github.com/plusjade/jekyll-bootstrap> \- 400 watchers man - I'm so happy about that!

Jekyll has had momentum for some time now. It's repo is watched by just under 5k users. So one small 'jekyll tutorial' link in the documentation wiki was all I needed to start the ball rolling.

The key word there is _start_. I still needed to reply to everyone's questions, monitor tweets everyday, write to anybody I knew using Jekyll for blogging, and above all painstakingly create _great_ , _well-crafted_ , _easy to understand_ _get started now!_ documentation : <http://jekyllbootstrap.com>

Sorry to make this sound like an ad for JB, I just really have been in the same place you are and the one and only thing that has worked for me so far is to embrace Open Source, put everyone else's problems before my own, and code for _people_ not (only) for myself.

HTH

<comment><AUTHOR> Some good tips. Thank you very much. Sounds like just making it as easy to use, constantly staying on top of things & being involved. Pretty standard advice, but good use case. Thanks again =)

<comment><USER2> I think that's the key there, and you said it in much less words than I did =). You have to give people no excuse to not try your product and every reason to try it. In other words good, easy to understand hello-world examples are a must, then backed up by what's next, and next, and next etc.

People don't have time nor the patience to jump through hoops to use your software. Make it really easy to try and people will try! Then it's up to you to follow through on taking them through the "funnel" if you will. Best of luck.

</comment></comment></comment><comment><USER3> Post on your blog, your Twitter feed, your Facebook stream, forums... you need a social network with which to propagate these things if you want anyone to know about them.

<comment><AUTHOR> So it sounds like you cant really get your scripts found, unless you have relationships built elsewhere already? Would you say that's the case?

And appreciate the input. Do you have any github code?</comment></comment>


Show HN: I will convert your website design to HTML/CSS for $25 - <AUTHOR> Hi HN! Do you have website design you want to convert to HTML/CSS? I'll do it for you for $25/page. Pure HTML/CSS. No framework, preprocessor, or whatever.
I'm testing my idea, so I don't have any website yet. But if you want to see the code I wrote, I built Uidea (https://uidea.co). Have a look. It's beautiful, fast, and usable. Built with Hugo.
PS: I can build your personal blog with Hugo too if you want. <comment><USER2> Portfolio looks great, are you in any marketplace like upwork, fiverr, UserCV ?

</comment><comment><USER3> Show HN is not meant for promoting your services or soliciting work.

</comment><comment><USER4> Why so cheap? Ask for $200 at least.</comment>


Free color themes for Emacs 24 - <AUTHOR> https://github.com/owainlewis/emacs-color-themes A collection of brand new color themes for Emacs 24. <comment><AUTHOR> Feel free to contribute to these themes.</comment>