Ask HN: Would you be interested in a Python to WebAssembly compiler? - <AUTHOR> Hi HN!
I'm Syrus, from Wasmer (server-side WebAssembly runtime [1]). We are in the midst of prioritizing our next quarter and I thought it could be interesting to ask here if you would be interested in a Python to Wasm compiler.
We already have a prototype working, but need a bit more time to perfection it.
Here are some use cases of a Python-to-Wasm compiler: 1. Usage of python libraries in the browser easily 2. Creating universal binaries that work anywhere
How would you use a Python to Wasm compiler? I'm eager to hear your thoughts. Thanks!!
[1]: https://wasmer.io/ <comment><USER2> I have used: [https://github.com/iodide- project/pyodide](https://github.com/iodide-project/pyodide)

on my project [https://epiphany.pub/post?refId=2684bc94f9fcb9ffe637ebfbeba2...](https://epiphany.pub/post?refId=2684bc94f9fcb9ffe637ebfbeba2af8c797c6ad9a66181026ee4bd3806b6f211)

the experience is kinda poor, it's very very slow. At first I thought the reason was the packages are too huge, it took a very long time to download them. But it turned out that the slowness comes from the python runtime when loading a package.

I guess directly compile python into wasm will make code execution faster, but I'm interested in building a scripting environment.

<comment><AUTHOR> Yeah, Pyodide is great, although a bit slow.

I think the targets are a bit diferent: Pyodide is just a notebook for executing Python code and what I wanted is to transform Python code to Wasm (this implies some speedup as well).

</comment></comment><comment><USER3> I'd use it for something. I wanted to use pyiodide but the learning curve and the browser fiddling did me in. If it was fast, could be embedded in nodejs and deno it would fill a void. Granted, a big part of pythons draw is the std library, which is also part of why I don't think pyiodide is ideal.

<comment><AUTHOR> Great feedback, thanks!!

</comment></comment><comment><USER4> Yep. But Pyodide is under development and has numpy and friends already...

[https://github.com/iodide-project/pyodide](https://github.com/iodide- project/pyodide)

</comment><comment><USER5> Tell Beeware about it

[https://gitter.im/beeware/general](https://gitter.im/beeware/general)</comment>


Australian ISPs required to block pirate sites - <AUTHOR> http://www.news.com.au/technology/online/piracy/federal-court-expected-to-hand-down-decision-on-blocking-illegal-torrent-and-streaming-sites-today/news-story/c1b0349a2cc6e3fb96007ddf04742efc <comment><USER2> Incredibly disappointing.

This is heading to be a DCMA for entire websites. ("The judge also appears to support the application of rolling injunctions to make it easier to chase offending sites").

Yet, the most effective thing to decrease piracy in Australia was the national launch of Netflix.

The decrease of portfolio was swiftly reflected by a rise in piracy.

Providers like Netflix, Stan and Quickflix do a hell of a better job at reducing copyright infringement.

Spotify and Pandora effectively killed music piracy.

Laws that require the ISP to spy more and more on the people that pay them to transfer bits are doing nothing for our shoddy infrastructure, and seem to be nothing more than badly directed efforts at a problemspace that the industries affected seem to want to ignore exists: Legal means are often times a multitude of difficulty harder than illegal means.</comment>


Secret U.S. memo makes legal case to kill a citizen. - <AUTHOR> http://www.nytimes.com/2011/10/09/world/middleeast/secret-us-memo-made-legal-case-to-kill-a-citizen.html?_r=1&emc=na

<comment><USER2> It is common that fugitives, American citizens, are shot dead. For example, last week Aaron Bassler was shot dead in northern California [1].

[1] [http://www.reuters.com/article/2011/10/02/us-fugitive- califo...](http://www.reuters.com/article/2011/10/02/us-fugitive-california- idUSTRE79106520111002)

<comment><USER3> The SWAT team who shot Aaron Bassler didn't have a shoot-to-kill order and made a hasty decision with their lives at risk. The decision by President Obama to kill Anwar al-Awlaki via drone without a trial is on a different level.</comment></comment>


Peak Phosphorus, and Why It Matters - <AUTHOR> http://www.foreignpolicy.com/articles/2010/04/20/peak_phosphorus <comment><USER2> I guess that peak oil is like the tip of the iceberg...

It is to be expected... all of us in the developing countries would like to consume like the U.S, and according to a persistent useless factoid, we would need 5 Earths to sustain that: <http://www.useless.org/node/70>

OTOH the article sounds a bit alarmist "humanity faces a Malthusian trap of widespread famine on a scale that we have not yet experienced" - is the source reliable, yellow journalism or what?

</comment><comment><USER3> So the obesity problem is solved then?</comment>


ClojureDB - a networked document database engine - <AUTHOR> https://github.com/HouzuoGuo/ClojureDB

<comment><USER2> Seems to only be written in Clojure, and has no relation to the people behind Clojure... should not be using the Clojure name/brand in this fashion.

<comment><AUTHOR> thank you, will do</comment></comment>


Creating the Go Programming Language [audio] - <AUTHOR> https://changelog.com/gotime/100 <comment><USER2> HN comments seem to lack focus on the podcast's contents (which isn't too surprising, as the podcast is nearly as long as the post is old.) Having already listened, here are some highlights:

* How work started on the language in the beginning, including social factors such as support from their managers.

* The value of starting a language with its spec instead of an implementation. Why it's a good idea and when it's maybe not.

* Learning how to work in on an open source project coming from a closed source world, how to make that project successful.

* Feature rich vs feature parse languages. What Go chose, and the trade-offs it took when choosing so.

* What influences Go has had on other programming languages, with a focus on gofmt and code formatting in general.

</comment><comment><USER3> For those wanting to read a transcript...

Transcripts are delayed a few days but there will be a transcript. We have a human on staff (Alex) to ensure every podcast we produce a highly readable transcript that can also be contributed to via Github.

<comment><USER4> Transcript is now up, at the linked article.

</comment></comment><comment><USER5> I think I'm the only Go programmer who enjoys the idea behind GOPATH :)

<comment><USER6> \o

I still use GOPATH structure since it's such a nice way to organize my code.

<comment> duncan-donuts I didn't like it at first but didn't have much choice. After a while I liked the structure. I don't even write go anymore and I still use gopath structure for my work

<comment><USER7> This is a common pattern with many of Go's features. Experienced folk sometimes tend to make unconventional design decisions. You don't appreciate them until you've tried out all the alternatives, and arrived at the same conclusions yourself.

</comment></comment></comment></comment><comment><USER8> Mods, please add (podcast) warning to title.

There is no transcript.

<comment><USER3> Transcripts are delayed a few days but there will be a transcript. We have a human on staff (Alex) to ensure every podcast we produce a highly readable transcript that can also be contributed to via Github.

</comment></comment><comment><USER9> I write primarily in Go, I have to admit that I can't stand the name of it. When doing a search I constantly have to write "go golang" in my searches to get relevant results. It's too generically named, like naming something "The"

<comment> forgot-my-pw Let's make a new language called Lang. We can also call it langlang. I'm sure there's nothing using that name~

</comment></comment><comment><USER10> Slightly off topic: Why was the language named "Go"?

I originally assumed that it was an abbreviation of _Google_ (where it was developed) but I can't seem to find an information confirming that...

<comment><USER11> I recall reading that one of the reasons was the fact that "go" sounded good

1\. when used as a keyword to start a "goroutine"

      go f()

2\. when used from the command line for compilation etc.

      go build ...
      go get ...

</comment></comment><comment><USER12> are basic languages good though? the amount of go concurrency bugs I've dealt with has been outstanding and quite brutal over the last few years; I feel like many times the same sort of c "i dont make mistakes" programmers are attracted to go and they also don't make mistakes there as well...

<comment><USER13> _> the amount of go concurrency bugs I've dealt with has been outstanding and quite brutal over the last few years_

Concurrency is hard. Maybe something like Erlang does it better, but compared the concurrency options in most popular languages, and the bugs that go along with those options, I think I would far rather deal with them in Go.

Perhaps the only reason you find concurrency issues in Go so frequently is because Go is more often used where concurrency is necessary, due to it being more suitable to writing concurrent code compared to many other popular languages? I certainly find more DOM bugs in Javascript than other languages, but I'm not sure that is a reflection of the language, only where the language is most often used.

<comment><USER14> > Concurrency is hard. Maybe something like Erlang does it better, but > compared the concurrency options in most popular languages, and the bugs > that go along with those options, I think I would far rather deal with them > in Go.

Concurrency isn't really that hard in Erlang, and Erlang isn't the only language that handles concurrency well. "Concurrency is hard" is usually paired with an implicit refusal to learn paradigms that make concurrency easier.

Why are we only comparing Go to popular languages? When I first came across Go, _before_ it was a popular language, I immediately started criticizing it because of the weak type system and ineffective concurrency model: I wanted the attention being given to Go to be given to a better language. Now I'm seeing the same people saying, "Okay, but the type system and concurrency are better than other popular languages." At face value, it makes sense to compare a popular language to other popular languages, but that logic breaks down because the only reason Go is popular is that a lot of people made the bad decision of choosing it before it was popular.

</comment></comment></comment><comment><USER15> first two minutes are ads and fluff, fast forward them

<comment><USER16> Please consume the ads. Content isn't free.

<comment><USER17> What an ironic comment on an article whose subject is a massive, free, open- source piece of "content."

<comment><USER16> You know it's "free as in freedom, not beer," right?

<comment><USER17> Go is both free as in freedom _and_ free as in beer. Binaries and source are available for use or modification to anybody, free of charge. No ads either.

<comment><USER18> Go is free as in freedom and paid for by someone else.

<comment><USER16> Specifically paid for by Google which, as far as I'm concerned, is the definition of ad supported.

<comment><USER17> Clever, but beside the point. "Content isn't free" is still not a reason to plead that others "consume the ads." Google doesn't offer Go on the _condition_ that you consume ads, nor does this podcast or interview offer itself to the Internet on the condition that you don't skip the first two minutes of it. If you're somebody who is opposed to the practice of advertising in general, by all means, skip it. Nobody should tell you not to.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER19> No progress bar. No fast forward button. No speed-up.

Man this UX is frustrating.

<comment><USER20> There's a clickable progress bar with fast-forward button.

[https://i.imgur.com/TMe45IJ.png](https://i.imgur.com/TMe45IJ.png)

Also a download link for mp3.

</comment></comment><comment><USER21> Don't.

</comment><comment><USER22> Step 1: be rob pike. Step 2: invent a pretty basic programming language using your old compiler from Plan 9 while at google. Step 3: be rob pike. ^_^

<comment><USER23> Pretty much this, the only reason anyone gave Go any attention was:

1\. The pedigree of the creators 2\. Google's developer marketing

And now we are stuck with it thanks to traction.

<comment><USER24> Or maybe because it is a useful and productive language?

<comment><USER25> I have feeling the people who praise Go didn't use too many other languages.

In my workplace Go is the preferred language, but I don't enjoy it, its type system stands in the way on every step.

</comment></comment></comment></comment><comment><USER26> Go is a new Visual Basic. Probably good for business owners, because of the lowbrow nature of Go language, developers are easily interchangeable, like a commodity.

</comment><comment><USER27> While I dislike golang its runtime and compiler are nice. Also lot of its simplicity aspects are nice.

if vlang can implement what it is trying to implement then probably it will be a nice contender to golang in all aspects. But that looks too good to be true.

The other language is rust, but the higher learning curve make it a bit harder for adoption in non systems where go/java like performance is enough.

<comment><USER28> I mean, Crystal would be my next go-to. If you have never written Ruby (like me) the appeal isn't the Ruby-like syntax, it's just _a_ reasonable syntax with a very pragmatic type system and niceties (like classes, which are more open to hacking / composition than in other languages). It's like Go++ in my mind.

<comment><USER29> Crystal is dead, exactly how can you expect to have a language that compete with Go with only 2 full time devs?

<comment><USER30> Does it have to "beat" Go or die?

<comment><USER31> No, but it definitely needs a community big enough to keep it alive.</comment></comment></comment></comment></comment>


PJSON: pretty, colorful json output formatting for terminal - <AUTHOR> http://igorgue.com/pjson/

<comment><USER2> If this is based on pygments, is it reasonable to have a command like this that works on everything pygments knows how to highlight, and plugs into a bunch of pretty-printers / reformatters, e.g. GNU indent?

Is there an equivalent of pygments for pretty-printing all the things?

<comment><USER3> Yes, it's the "pygmentize" command, included in pygments. Also, pygments is a fantastic tool, I love it.

</comment></comment><comment><USER4> Here's a similar trick with the Python json module:

      echo '{"hello":"there"}' | python -mjson.tool

<comment><USER5> And Perl's JSON::XS

         echo '{"hello":"there"}' | json_xs

<comment><USER5> Or for pretty colors, try Data::Printer

        echo '{"hello":"there"}' | perl -MJSON -MDDP -E '$f = decode_json readline; p $f'

<comment><USER6> Is there a colored JSON dumper in Perl?

</comment></comment></comment></comment><comment><USER7> Wait wait ... what are the unicode characters for that cloud and lightning bolt? That looks awesome.

<comment><USER8> Author here, unfortunately no thunder on Mountain Lion :( [1]

It's from my zsh theme: [https://raw.github.com/igorgue/oh-my- zsh/master/themes/igorg...](https://raw.github.com/igorgue/oh-my- zsh/master/themes/igorgue.zsh-theme) I stole it from the cloud theme and another theme that I don't remember.

The thunder lights up when the program doesn't end property (return 0).

[1] <3 thunder <http://wiki.xkcd.com/irc/Heart_Thunder>

<comment><USER9> > The thunder lights up when the program doesn't end property (return 0).

Inspired! Did you come up with that part?

<comment><USER8> Haha yes.

This is the code add it at the end of your prompt:

        function thunder() {
            echo "%(?,%{$fg_bold[grey]%}⚡%{$reset_color%},%{$fg_bold[yellow]%}⚡%{$reset_color%})"
        }

</comment></comment></comment></comment><comment><USER10> Why all of that complicated setup? Why not just support pip install pjson? :)

<comment><USER11> agreed, needs to be submitted to pypi now!

</comment></comment><comment><USER12> We recently discussed underscore-cli here on Hacker News (<http://news.ycombinator.com/item?id=4491058>) and I find it to offer more than this, but still a nice tool.

<https://github.com/ddopson/underscore-cli>

</comment><comment><USER13> This looks really good, thanks.

Rather than pipe curl's output through stuff though, for the most part I use httpie [1]. It's a human-friendly curl wrapper.

[1] <https://github.com/jkbr/httpie>

</comment><comment> void-star I've been using json_reformat which comes from "yajl" to do this sort of thing for a while.

EDIT: I love seeing something that does an "awesome-print" with terminal colorization, though.

</comment><comment><USER14> Hey kids, why shouldn't every python tool have a Ruby counterpart? :) <https://github.com/marksands/pjson-rb>

<comment><USER15> Come on, you should use coderay instead of pygments. 100% ruby ;)

<comment><USER14> Sweet! I went with a quick conversion rather than doing any research. Thanks for the link, I'll definitely give it a whirl tomorrow evening.

</comment></comment></comment><comment><USER16> "Small retina display images are fucking huge."

Even when reshown on retina displays, since the HTML standard is to attend to the pixel size and not the physical resolution. Screenshots taken with the standard Cmd-Shift-4 or similar all include proper resolution metadata, should someone want to show it at the correct size.

</comment><comment><USER17> alias pjson='pygmentize -l json'

<comment><USER18> I'm curious how the author managed to learn the pygments library without learning it already provided a command. This script can be replaced by

alias pjson='pygmentize -l json'

If you're passing it the file name, pygmentize will figure out the lexer to use, e.g.

pygmentize foo.json

pygmentize bar.rb

It's only when you have it read from stdin that you need to specify, e.g.

pygmentize -l json < foo.json

</comment></comment><comment><USER19> Not sure what this offers over what I currently have in ~bin with a similar name,

python -m json.tool "$@" | pygmentize -l json | less -RSNFX

</comment><comment><USER20> For those that want to stay in Ruby land:

$ gem install jazor coderay

$ echo '{"foo": "bar"}' | jazor | coderay -json

</comment><comment><USER21> oh man.. I was looking for exactly this earlier today.. it looks REALLY pretty

</comment><comment><USER22> many more options here: [http://stackoverflow.com/questions/352098/how-to- pretty-prin...](http://stackoverflow.com/questions/352098/how-to-pretty-print- json-script)

<comment><USER23> This here is my favorite. <http://stackoverflow.com/a/6066102/3461>

</comment></comment><comment><USER24> #cool</comment>


Wallpaper group - <AUTHOR> https://en.wikipedia.org/wiki/Wallpaper_group <comment><USER2> Though the idea of wallpaper symmetry may seem a bit frivolous, in truth the mathematics of 2D and 3D symmetry groups plays a huge role in materials science and physics. Every crystalline material is made of atoms in some pattern, and the symmetry of that pattern has big consequences for what the material's electrons do. Understanding the symmetry of a crystal will often aid you in understanding its properties.

This knowledge can also be inverted to design materials rather than merely understand them. An example of this is the idea to use crystals without inversion symmetry to make new ferroelectric materials (because ferroelectricity requires inversion symmetry breaking). A simple way to make a crystal without inversion symmetry to stack layers of atoms in an ABCABCABC pattern. Here's a technical description if you are interested and have access: [http://www.nature.com/nature/journal/v452/n7188/full/nature0...](http://www.nature.com/nature/journal/v452/n7188/full/nature06817.html)

If you'd like to learn more about the study of symmetry in crystallography, there's a nice MIT OCW set of video lectures here: [http://ocw.mit.edu/courses/materials-science-and- engineering...](http://ocw.mit.edu/courses/materials-science-and- engineering/3-091sc-introduction-to-solid-state-chemistry- fall-2010/crystalline-materials/15-introduction-to-crystallography/)

I'll close with a good quotation from a famous condensed matter physicist:

"It is only slightly overstating the case to say that physics is the study of symmetry." \- Nobel Laureate Philip Anderson

</comment><comment><USER3> I wanted to say that this was probably discovered by a Hacker News devotee who was sifting through every instance of "pg" on the internet. Then I noticed who submitted this.

</comment><comment><USER4> I just heard a talk on this the other day at an undergraduate mathematics research conference (SUnMaRC). Apparently, at Al-Andalus there are examples of all 17 different groups. Islamic art has some of the coolest math.

</comment><comment><USER5> If anyone wants to delve a little deeper into these topics I highly suggest Patterns in the plane and beyond: symmetry in two and three dimensions. By B.G. Thomas and M.A. Hann.

The PDF is available for free.

[http://ulita.leeds.ac.uk/docs/Ars_Textrina/Monographs/Patter...](http://ulita.leeds.ac.uk/docs/Ars_Textrina/Monographs/Patterns_in_the_Plane.pdf)

</comment><comment><USER6> this graphic chart was made in 2003 but it's pretty nice illustration of all 17 wallpaper groups

[http://www.math.columbia.edu/~bayer/symmetry/wallpaper/Wallp...](http://www.math.columbia.edu/~bayer/symmetry/wallpaper/WallpaperChart.pdf)

there is also "geometry and the imagination" whose authors include John Conway (Princeton ) and fields medalist Bill Thurston

[http://www.math.dartmouth.edu/~doyle/docs/gi/gi.pdf](http://www.math.dartmouth.edu/~doyle/docs/gi/gi.pdf)

</comment><comment><USER7> To anyone interested, my favorite treatment of this appears in Artin's extraordinary book _Algebra_.

</comment><comment><USER8> Epicdollar startup of the future is:

wallpaper color displays, Philip K. Dick-style.

Top planetary database says this is the closest approximation: [http://www.eink.com/display_products_triton.html](http://www.eink.com/display_products_triton.html)

No more steaming wallboards and peeling (wo peeling the wallboard backing) when wifey says she likes this other pattern she just found.</comment>


Functional C Programming: Higher order functions, closures, lifted types - <AUTHOR> http://blog.charlescary.com/?p=95 <comment><USER2> Doing functional programming in C reminds me of Greenspun's tenth rule: Any sufficiently complicated C or Fortran program contains an ad hoc, informally- specified, bug-ridden, slow implementation of half of Common Lisp

<comment><USER3> Great point! :-) I lol'd

</comment></comment><comment><USER4> I'm not really sure if this counts a functional programming _in_ C but it does serve as a decent basis for teaching the implementation of functional languages _on top_ of C. As always, the distinction between a library and a whole new language is never quite clear...

</comment><comment><USER5> When reading this title my default reaction was "Oh God Why" I am happy to see the author agrees with me. As an intelectual excersize I think this is great showing that yes C is very very flexable ( You can do the same stuff with C++ and it will look nicer BTW[0]) but please don't do this, Its messy and hard to trace.

[0: [http://www.boost.org/doc/libs/1_49_0/libs/range/doc/html/ran...](http://www.boost.org/doc/libs/1_49_0/libs/range/doc/html/range/reference/adaptors/introduction.html)

<comment><USER6> Yes, and very type-unsafe. You could do all this using C++ templates in a type-safe way.

</comment></comment><comment><USER7> Here's my variation on bind() - generating executable code on the heap allows you to treat the bound function as a raw ordinary function pointer; <https://gist.github.com/3154939>

<comment><USER8> I've used a very similar trick for adding partial function application to Forth: [https://github.com/JohnEarnest/Mako/blob/master/lib/Algorith...](https://github.com/JohnEarnest/Mako/blob/master/lib/Algorithms/Curry.fs)

If I understand correctly, though, your implementation leaks memory. In my case I use a GC to free the thunks when they are no longer accessible.

<comment><USER7> Indeed, in typical C fashion all the created stubs must be freed manually.

Adding a GC is a separate task and several exist for C. Though if you were using C++, you could put together some RAII sugar or smart pointers around it all, but in that case you have std::bind1st and functors available anyway (although this is still the only way to meet the raw-pointer use case).

</comment></comment></comment><comment><USER9> I wasn't sure what a "lifted type" was so I looked it up,

      A type is lifted iff it has bottom as an element. Closures always
      have lifted types: i.e. any let-bound identifier in Core must have
      a lifted type. Operationally, a lifted object is one that can be
      entered. Only lifted types may be unified with a type variable.

[http://hackage.haskell.org/trac/ghc/wiki/Commentary/Compiler...](http://hackage.haskell.org/trac/ghc/wiki/Commentary/Compiler/TypeType)

<comment><USER10> ... Which is an arcane way of saying "pointer / reference"; i.e., not a primitive or C-style struct.

</comment></comment><comment><USER11> Actually, the "closure" pattern shows up in real code; for instance I saw it a lot in libpurple. It's one of those things that's hard to do any sort of large-scale engineering without. As long as you can get the memory management right on it, it's great. (And I wouldn't say that's any more particularly difficult than a number of other useful C patterns.)

<comment><USER12> if anyone is curious - [http://hg.pidgin.im/pidgin/main/file/eb0eb02fce71/libpurple/...](http://hg.pidgin.im/pidgin/main/file/eb0eb02fce71/libpurple/value.c)

tbh that's the first time i've seen something quite like that. i am not sure this is so common a pattern (usually, imho, you can be more explicit and have a struct that associates a known callback type with named, typed values).

<comment><USER11> No, I wouldn't expect it is "common", but it definitely shows up. libpurple doesn't use it because it does its own thing, but glib has library support for it: [http://developer.gnome.org/gobject/stable/chapter- signal.htm...](http://developer.gnome.org/gobject/stable/chapter- signal.html#closure)

Although a straight-up Google search for "g_closure_invoke" is amusing. I did add the "as long as you can get the memory management right on it" for a reason... page after page after page of "segmentation fault in g_closure_invoke" stack traces....

<comment><USER13> I'm not sure why "getting the memory management right" is the hard part, or why it's any more or less hard than general C programming practice. For example a closure object with a reference count that releases references on its contained objects when destroyed seems like a perfectly workable pattern. (I'd be surprised if that's not how the glib closures are supposed to work, knowing that glib like many general-purpose C libraries is pretty big on reference counting.) NSInvocation in objc comes to mind, where IIRC the closure-like object can hold a reference to its arguments, though it's been years since I've used that...

<comment><USER14> I think if you have objects and a reference-counting GC already this problem is pretty easy, but I assume the C programmers don't want that for performance or portability or some other reason.

NSInvocation has a signature of the variable types of the method it represents, so it can retain the object ones without trying to retain plain integers.

Modern Obj-C uses blocks to make closures, which the compiler changes into structs holding all the variables referenced. It knows the types of these as well, so it writes code to retain any object types and releases them as it is released. They haven't got a cycle collector in the runtime, so programmers still make mistakes by accidentally making strong cyclic references.

Assuming the reference-counting GC, it's not hard, but you can still make mistakes.

<comment><USER13> > I think if you have objects and a reference-counting GC already this problem > is pretty easy, but I assume the C programmers don't want that for > performance or portability or some other reason.

Uh. Every large C code base I've worked with has had this in some form, usually fairly pervasively. I've mentioned glib as a library that exercises this heavily. In the Windows world this would also include COM. Kernel mode stuff on various platforms tends to do a lot of refcounting as well.

Note that "reference counted object" is just a fancy word for "struct with an integer" - I feel like your phrases like "if you have objects" and "GC" strikes me as confusing this with other features in other languages, a sign that we're not entirely talking about the same thing.

Edit after more time spent away from it: I guess to restate the original comment, what I was trying to say is that to an experienced C programmer closures don't make anything "more hard" - it's just the same memory allocation strategies that you'll be dealing with anyway, and there are already well understood solutions (such as having one of your struct fields be a reference count).

<comment><USER14> I understand. I think you are right that it wouldn't make things more hard, I misunderstood that as implying that people wouldn't make memory mistakes under those conditions. So I was writing that one would require a GC to eliminate those kinds of mistakes.

I agree with you, reference counting is not something that would confuse an experienced programmer, but you do have to be aware of what's happening with your objects.

</comment></comment></comment></comment></comment></comment></comment><comment><USER15> This illustrates the fundamental problems of C very well, which are the requirements to be very specific about types and manually manage memory.

Of course those things aren't a problem in cases where you need to do those things, but that isn't the case for most applications.

</comment><comment><USER16> Why not to read the code of various advanced CL and Scheme implementations?) MIT Scheme and SCM and CMUCL are good candidates.)

</comment><comment><USER17> I saw a similar post a few months ago. You can program functionally (not really) in C. There are certain theoretical assumptions that go along with it. But at its heart, C is still an imperative language. I'm not sure what the point is in making C good at doing things "functionally".

</comment><comment><USER18> Of course, this skips negligible parts of C programming like memory management.

<comment><USER19> Oh, just throw the Boehm conservative collector on it and be done with it.

<comment><USER18> done with C, yep

</comment></comment></comment><comment><USER20> TFA says that was done answering an Haskell programmer.

Probably that an Haskell programmer values strong static typing just as much as functional programming.

I someone think that turning C from a weakly static type system to a strongly static one would prove quite more difficult... (but my C days are long gone so don't quote me on that).

</comment><comment><USER21> 1) imperative programming 2) functional programming 3) OOP 4) etc programming

They're jus programming paradigms. Take what you need and get the job done. Anything else is just a buzzword.

<comment><USER22> This little homily adds nothing. That's why it's getting downvoted.

(It's also wrong, or over-simplified, in that all programming doesn't really fit into those little boxes.)

<comment><USER21> Those little boxes are all boxes there are (except for prolog).

BTW, downvotes are as meaningless as i--.

<comment><USER23> _Those little boxes are all boxes there are (except for prolog)._

No, they aren't, and a simple web search would've revealed others, such as Dataflow[1].

[1]: <https://en.wikipedia.org/wiki/Dataflow_programming></comment></comment></comment></comment>


MIT Builds A Needle-Free Drug Injector - <AUTHOR> http://www.npr.org/blogs/health/2012/05/25/153697885/mit-builds-a-needle-free-drug-injector

<comment><USER2> When I was a kid, they used the _exact same_ injectors to vaccinate us in school. That was in mid-80s. This thing was indeed virtually painless and left a funny air bubble under the skin that disappeared in an hour. As far as I was concerned it was _awesome_. But apparently it had some problems (infections?) and the program ended as quickly as it started.

<comment><USER3> >left a funny air bubble

>apparently it had some problems

Air emboli?

<comment><USER4> An air embolism would only be a problem if it was in a blood vessel. Those injectors were intramuscular and the air just diffused back out through the tissue.

<comment><USER5> I can't think of a case where this can be a problem by accident. Back when I was in the medical school (Bulgaria, Eastern Europe) we sometimes used air embolism to kill off experimental animals. I remember that the quantity of air needed is substantial. Something like 20-50 cubic centimeters needed to kill a rabbit reliably by venous (right heart) embolism. I imagine the quantity needed to kill a human is quite a lot bigger. Of course, it's not the same if you insert air in the carotid artery. I guess that quite smaller quantity there will kill a human. I speculate something in the range below 1 cm3.

</comment></comment></comment></comment><comment><USER6> The most interesting part is described near the end: they are able to inject powder. The device vibrates the powder to the point it behaves as liquid and thus can be injected easily. Cool :D

Somebody correct me please; I imagine they care about powder because drugs (or vaccines?) in powdered form could sustain longer storage than liquid form.

<http://www.youtube.com/watch?v=M09LyLqb5qw#t=177s>

<comment><USER7> That is indeed a very likely explanation

Remember antibiotics that come as a powder and that have to be mixed at home, and have a very short life after being mixed? While the pill version has a standart shelf life?

I assume hence vaccines that have to be kept in fridges now would come as a powder.

</comment></comment><comment><USER8> It would be great if they could get this down to almost no cost so its accessible to and preferred by hard drug users. While drug abuse and addiction is an extremely sad human habit, it is magnified by the side effects of needle sharing and the diseases that are typically accidentally passed on by users.

On top of it if this was paired with cheap electronic regulation mechanisms it could at least attempt to discourage a user from overdosing. I know its somewhat of an odd proposal but I think there could be potential here to help a population thats already down and out from succumbing as frequently to death and disease as they do today.

<comment><USER9> Why discourage the Darwin effect?

<comment><USER10> Even if you don't care about the health of IV drug users at all, they spread disease to other people, and when they show up at the hospital it's everyone else who ends up paying the bill, since they usually have no money.

<comment><USER11> But note that this device is for IM (intra-muscular) not IV. While it certainly would be great for harm control, most hard drug users probably wouldn't bother.

</comment></comment></comment></comment><comment><USER12> I'd love for this to exist, being a hater of needles. But it seems a bit odd to say:

"""The new injector has yet to be tested on people, but has been used on animals, like sheep, without apparent discomfort. "The sheep did not seem to even be aware that they were being injected," Hunter says"""

Are sheep not herd animals that almost never show discomfort or pain? Something to do with not wanting to get picked off by predators? I've never seen a sheep act hurt. I've even seen one get its back broken by a horse and it just lay there like it was fine.

<comment><USER13> I sort of hope you're right because the idea of a technology that could inject things into people without them even knowing freaks me out a little bit.

<comment><USER14> One solution to this problem would be to regulate the injectors so that they had to put a mild, distinctive kind of pressure on your skin as they injected into it.

</comment></comment></comment><comment><USER15> Slightly off-topic, but isn't it interesting how often news like this is broken with MIT as the subject of the headline: "MIT builds…", "MIT discovers…", etc?

In general, reports originating from universities tend to be billed as "Scientists discover…, "A report from Harvard suggests…", and the like.

Its indicative of, and certainly amplifies, the MIT brand.

<comment><USER16> Exactly, I've noticed this time and time again.

> MIT discovers ... > MIT students make brilliant startup ... > MIT professors > build ...

Meanwhile, let's say something originated from RPI. It would say,

> Scientists discovered a new vaccine that ...

I think it helps the pull- MIT is a brand name, so people will click the link.

</comment></comment><comment><USER17> I experienced one of the older versions of this injector at a free vaccinations offered by my college. I'd say it hurt more than the needle, but it was faster. They were also vaccinating a huge line of thousands of students fairly quickly.

After the injection was done it looked like there was a tiny worm sticking out of my arm (where the vaccine was kinda leaking out). Weird!

</comment><comment><USER18> Long time back I saw someone demonstrate an needle free injection using osmosis (or reverse osmosis) on Discovery channel. It was pretty amazing and this article reminded me of that. Unfortunately I can't really find anything like that on Google right now. Can osmosis be used to inject drugs or is my memory completely incorrect?

<comment><USER19> You may be thinking of DMSO: <http://en.wikipedia.org/wiki/Dimethyl_sulfoxide>

It's a gel that easily penetrates the skin and can serve as a drug delivery system. The KGB was said to use it to administer poison to assassination victims. Its history has been plagued by controversy, which has slowed down research on its many potential medical uses.

</comment></comment><comment><USER20> Can this be tailored for intravenous use? The tricky thing is calculating the depth of the vein and it's thickness.

<comment><USER21> Drop one of these off at Insite and they'll figure it out in an hour.

<http://en.wikipedia.org/wiki/Insite>

</comment></comment><comment><USER22> It would be insanely cool if this becomes available one day for human use. I hate getting shots with a passion. Heck, something like this might actually prevent the spreading of diseases from needle sharing. I don't know how likely it is that junkies will be able to afford one of these units but I'd imagine that one day the cost would go down enough for regular people to buy one. (In the beginning they will probably cost 10x what they're actually worth.)

<comment><USER23> This sort of device has actually been in use for a number of decades. There are associated downsides like biological transfer and the infiltration of skin cells. I'm afraid you'll have to suck it up for a while yet.

edit: A citation: <http://en.wikipedia.org/wiki/Jet_injector>

</comment></comment><comment><USER24> Inject drugs into people without making them notice? This makes a dangerous weapon.

<comment><USER25> Since you can already easily achieve this through the use of food or drink as the delivery mechanism, I don't see how this changes things much.

<comment><USER26> With food or drink you have to at least have some access to it. With an injector, you could hit someone on the street just by walking by/near them. I make my own food, but I walk by hundreds of people every day.

<comment><USER27> Reminds me of the umbrella murder of Georgi Markov[1].

[1] <https://en.wikipedia.org/wiki/Georgi_Markov#Murder>

</comment></comment></comment></comment><comment><USER28> Wow, pretty amazing. It's a lot like a Star Trek "hypospray."

Anyway, I can imagine a lot less kids crying when getting their inoculation. Seeing a huge needle (to a child) is quite scary and this device does not look scary at all. In fact, it looks a lot like a toy.

I wonder how they can reuse the device between patients (probe ejection)?

In reality, I fear this tool will never see the marketplace due to the medical industry stranglehold.

</comment><comment><USER29> Nope - they improved existing technology - such things were in use more than 30 years ago.

<comment><USER30> "Nope"? The title says "builds" not "invents". The body of the article reads: "Jet injection technology has been around for quite a while. It's been used in mechanical devices for more than a century".

So yes, they are improving an existing technology, the article says so and they point which improvements they made.

EDIT: Grammar, wording.

</comment></comment><comment><USER31> Everything old is new again, at an industrial park near me a company back in the late 1970s early 1980s developed a similar device.

      It used air pressure or some way of forcing medicine through the skin without needles it's called the Preci-Jet.

<comment><USER32> e-ink was invented during the 70's too! Sometimes inventions are made before their time.

<comment><USER31> Sure, I remember reading about purple stuff found in a swamp being studied and a few years later OLED is in my hand as the screen on my phone.

</comment></comment></comment><comment><USER33> Star Trek here we come!

<comment><USER34> As long as it doesn't look like a "real" hypospray, you can avoid the CBS legal team: <http://code.google.com/p/moonblink/wiki/Tricorder></comment></comment>


Ask HN: Getting job outside of Europe (as EU citizen)? - <AUTHOR>

Hello fellow hackers,<p>I'm a EU citizen and was contemplating taking the plunge to work at a startup / small business outside of Europe. My only requirements are English as language of the country and a startup-y city.<p>- If you did the same, what was your experience? (blogged about it?)<p>- How does the application process likely look like? (e.g. remote work first?)<p>- Which countries have a reasonable work visa process? (US likely out?) <comment><AUTHOR> So I think it boils down to Australia and Canada, doesn't it?

</comment><comment><USER2> What do you mean by overseas? Europe or not Europe?

<comment><AUTHOR> I updated the question, thanks for the comment.</comment></comment>


Yahoo May Cut 5 Percent of Its Staff - <AUTHOR> http://bits.blogs.nytimes.com/2010/12/13/yahoo-may-cut-5-percent-of-its-staff/ CEO Carol Bartz demonstrating that women can be just as heartless as men when it comes to business. <comment><USER2> Why post this now? If it actually happens tomorrow, post it then.

Posting speculative links about things that might happen in a few days is noisy, even if newspapers are doing the speculation. Being first with the news isn't that important.

<comment><USER3> As someone who runs a developer recruitment startup and is busy buying up ads targeting staff Yahoo I appreciate it :-)

<comment><USER4> Your situation seems like a rather specialized case where gossip is worth something more than gossip.

<comment><USER5> Gossip about publicly traded companies is _always_ worth something more than gossip.

</comment></comment></comment></comment><comment><USER6> Direct link to NYT article: [http://bits.blogs.nytimes.com/2010/12/13/yahoo- may-cut-5-per...](http://bits.blogs.nytimes.com/2010/12/13/yahoo-may- cut-5-percent-of-its-staff/)</comment>


The Harm of Studying Abroad - <AUTHOR> https://www.readingthechinadream.com/zhang-yongle-the-harm-of-studying-abroad.html <comment><USER2> The whole article rings false to me. Although I get that it's Zhang's personal experience, but the reasoning makes zero sense, and it feels like he just wanted to vent.

Some of the points seemingly have nothing to do with studying abroad, but the nature of the university he attended, for example,

> First, you have no time. You read a lot but there's no time to think.

This is has nothing to do with being a foreigner, or being in any specific country. It's a university culture, and every university has its own pace of teaching, in China or US.

And then,

> Of course, it makes no difference if you don't go > to bookstores in the US, > but if you bring this habit > back with you, it means that you don't go to > bookstores > in China

Seriously? How hard it is to consciously decide to go to a book store when you are in need of a book? This also seems to imply that China has no good libraries, which is untrue. I'm from a small city in China, and I borrowed so many books from the city library. That was how I got into programming as well, borrowing a book about Turbo Pascal.

Personally, I think the biggest difficulty for a Chinese in studying abroad in the US, is the difficulty of being accepted into the circle. You could make friends and acquaintances with Americans, but you're never part of "them". I constantly feel like I'm on the wrong side of a aquarium glass pane, being observed and judged.

There are two real choices: 1) pretend to be a white person and be extremely amiable, or 2) fallback to the smaller circle of Chinese people in US.

<comment><USER3> The final claim is hyperbolic. There absolutely is another option which is to find people who aren't interested in performing amiability or socializing exclusively in the safety of their ethnicity.

I made friends because we loved talking about healthcare policy, from being on the debate team, from a shared love for Mad Men, from being interested in starting companies. I did all of this as someone who'd spent the decade preceding college growing up in Bangladesh, with a thick accent and somehow ended up with a group of friends from all around the world.

I'm not saying any of this was easy, but I do think there's a self-defeating element to believing what the parent does.

<comment><USER3> In the interest of intellectual honesty, it's possible that I'm an extreme outlier in this respect. I've spent the last year traveling around the world, I find it really easy to share emotional vulnerability with strangers, and I've made meaningful connections with people in every country I've lived in for more than a week.

This is likely not true for most people.

<comment><USER4> In the interest of intellectual honesty, I just wanted to say that I'm an awesome person and I am literally so cool.

This is likely not true for most people.

<comment><USER3> I respect the call out in this comment.

</comment></comment></comment></comment></comment><comment> blaser-waffle > The text translated here, written in 2008, has nothing to do with Zhang's > academic work, but instead reflects changing attitudes among younger Chinese > intellectuals concerning the value of Western ideas and the experience of > studying abroad.

> Zhang is surely right that doing an advanced degree in a foreign language is > a challenge involving at times a loss of autonomy and a loss of status. More > interesting is the overall tone of the text, which comes close to saying > that the experience is a waste of time. This is not only because study > abroad involves rote learning of someone else's knowledge, but because China > is the place to be. As Zhang puts it:

> "If you live abroad for a long time, you will miss many theoretically > interesting things happening in China. Society in the West has been settled > for hundreds of years, and not that much that is really new occurs. But > China is entering a new era, full of potential."

...

Valid points, for sure, but not everyone is reaping that new era full of potential. China is a great place to be if you've got the right connections, but no so great if you're gay, muslim, tibetan, or like to have opinions. Plus the great explosion of growth of China is now slowing down. Still many developments to come, for sure, but those may not play out in ways we expect.

Also think it's hilarious that he's bashing the U of C's "rote learning" when that's a huge part of China's entrance exams, or how foreign Uni's will limit your thought -- cuz the CCP tells Tsinghua "teach what you want", right?

<comment><USER5> > China is a great place to be if you've got the right connections

This might be true for the majority of China, but for big cities like Shanghai, Beijing and Shenzhen, no, connections mean far less even comparing to western world.

> but no so great if you're gay, muslim, tibetan, or like to have opinions.

Do you get this from reading western media or did you actually go there and talk to those actual human beings? I can't speak for everywhere, but being an ethnic minority comes with tons of perks in China. For ethnic minorities, one child policy never applied to them, the kids get extra points during high school/university entrance exams, my Mongolian roommate even got extra financial support due to his ethnicity. People would fabricate document to gain minority status because that gives their kids an edge in almost everywhere. Growing up, as a Han Chinese, I always feel this is unfair and absurd.

As for religions, again I can't speak for Xinjiang itself, but from my experience in east coast, no one cares what religion you believe in. It's only an issue when you try to challenge the government with it. You can find mosque and churches in most cities.

And gay? Believe or not, I know it sounds absurd, but being gay is sort of a hip thing among the youngsters. The will obviously face repulsions from older generations, but this rings true all around the world. Bottom line is, the general public does not actively persecute the LGBT group, nor do they care.

The only thing that would bring you trouble is having an opinion against the government. I am not saying this is not a big issue, but stop pretending that the country is constantly oppressing everyone.

<comment> stone-monkey I'm not saying you're wrong,but what was the deal with the lesbian author who was arrested for her books? There was this webcomic I read called 他们的故事 which is about a lesbian high school couple which has gone nowhere plot wise, and someone told me the reason why they stopped focusing on the romance part of the story is it was the author's reaction to the news about the erotic novel author getting arrested.

<comment><USER5> I am pretty sure she was arrested for selling/profiting exotic sex content. Agree with it or not, selling pornography is illegal in China. I think her sentence has more to do with explicit sex content itself rather than being lesbian/gay.

This is also a perfect example of media manipulation, is it not? Put on a sensational title to grab attention, but convenient ignore the fact that similar sentences were given out to people selling straight porn. While I don't agree this should be illegal but this is not a good example of prosecutions against the LGBT group.

</comment></comment></comment></comment><comment><USER6> Very interesting to hear a Chinese person complain about American higher education as too rote, as I've often read complains in the HN bubble that the Chinese system would be too rote. Perhaps things look too rote from either side if you're missing the culture-specific subtlety? Perhaps things _are_ too rote on both sides but it's only noticed by those from a different background?

Relevant excerpt: "The things you think about are decided by your professors, and you follow their lead as you develop your thoughts instead of asking yourself what questions you developed from your reading or what link it might produce with your own background. So you just do your best to chew the cud and digest the material. And if you actually learn something, it is transplanted out of nothing and remains attached to its origin rather than sinking roots or sprouting branches. When study is nothing but rote learning, who doesn't lose their appetite?"

<comment><USER7> > I've often read complains in the HN bubble that the Chinese system would be > too rote.

I've seen both sides. 99% of complaints you read on the internet are written by people who've never been to the country they're complaining about, and whose sum total knowledge consists of a cheap stereotype.

</comment></comment><comment><USER8> From my reading of this, this is just someone who was very isolated due in part to cultural/language barriers. I would be curious if someone who had the same experiences but was less isolated and had social nets would have a very different take.

> You sing the praises of whatever it is that your enemy opposes, and you > oppose whatever your enemy praises.

That screams like someone who feels pushed out and isolated from their immediate society (in this case, the foreign culture they were studying in).

<comment> dawg- >I would be curious if someone who had the same experiences but was less isolated and had social nets would have a very different take.

That's me, and I totally have a different take.

I studied abroad as a foreign language major - but only after three full years of studying the language and culture of the country I was visiting. It was an enriching experience and I felt pretty comfortable navigating the country socially and professionally. Study abroad was a requirement for me to graduate. I did the longer trip after a previous two week trip to the same place. I met via skype with my professor back in the US weekly for an independent study course, and that gave me the chance to reflect and make sense of my experiences with a trusted mentor (who was a native of the country herself). The professor even dropped by to visit me in person during her summer trip to the country.

I think all of these things factored into making it an amazing experience and time of growth, as opposed to an isolating and depressing experience. Even with all that support and background knowledge I still dealt with my fair share of culture shock, home sickness, and isolation - all of which are important parts of the learning experience, in appropriate doses. But without the support system and preparation I had, I would imagine that the experience could have been very negative.

Study abroad is an incredible and enriching experience - but it takes a lot more resources than just buying a college kid a plane ticket to another country and sending them on their way. Of course that can be useful for a certain adventurous types as well. But institutionally, study abroad takes deliberate planning and support to make it meaningful for everybody who participates. Otherwise it can surely be just as bad as this author makes it out to be.

<comment><USER9> How fluent were you in the language after three years? Three years of French or Spanish might put you much further ahead than three years of Mandarin or Russian, for example.

<comment> dawg- It was German. I was (am?) fluent enough to function in a professional office environment without falling back on English. Of course it was a luxury to be in a country where I know 90% of people can just switch to English if the conversation goes off the rails

</comment></comment></comment></comment><comment><USER10> I must be tone-deaf, because I picked up none of the sinister overtones that other commenters on this thread are detecting. The text I read was amusing and delightful, and I associate it with a genre of writing that takes a bit of common wisdom (studying abroad is good for you) and inverts it. It reminded me of Erasmus's In Praise of Folly. I am sadly ignorant of Chinese literature, but I think the theme is universal. Looking at the world when you are standing on your head is simultaneously amusing and insightful.

<comment><USER7> I agree, and I think the overwhelmingly negative response here perfectly illustrates the post's point. The author is thoughtful and has great, but not perfect English. Because he's foreign, everybody concludes that it's a sinister work of propaganda, and attributes all manner of horrible personality traits to the author on the basis of the tiniest of mistakes.

It's absolutely predictable. I sincerely hope I won't ever have to endure the displeasure of meeting any of these HN commenters in person.

</comment></comment><comment><USER11> > Fourth, life is dry and boring, you don't have friends or family, and you > can't sit around every day talking about the meaning of life. With time, you > wind up really lonely, which makes you appreciate the vitality of life in > China. When you come back, you're like a bird let out of a cage, and your > only urge is to fly. Who wants to study? Too bad.

Okay that has to be partially self inflicted. Too many people travel with no attempt to integrate with locals. I will grant that it's not easy, and many Americans fall into the same trap during their study abroad time, but that's perhaps the great allure and challenge is it not?

<comment><USER12> Or option B: american racism doesn't stop at blacks.

<comment><USER13> So when's the last time you had someone very foreign, who had difficulties with language and no social context over for beers?

Most people don't hate or even loathe foreigners and certainly not Asians, but social circles everywhere tend to be pretty narrow.

He may have had some nice students or profs invite him on the occasional thing out of social courtesy and genuine interest, but people really far from one another socially are not going to get tons of 'hang time'.

As Uni becomes a little bit more simply 'where you go after high school' and more a social experience, as opposed to being a truly academic experience, I suggest this issue may even be exacerbated.

I don't doubt the social isolation is real for people, but I don't think hostile language is where we need to go.

<comment><USER12> >So when's the last time you had someone very foreign, who had difficulties with language and no social context over for beers?

I work with a diverse group of individuals and go out for socialization at least once a month with my foreign peers who don't speak my language as their first language and were born and raised in another country.

>I don't think hostile language is where we need to go.

When the POTUS is demonizing Chinese people by saying things like "the china virus" it makes people not want to interact with Chinese people. Language is very important, and hostile language, especially against different nationalities, is an easy step.

</comment></comment></comment></comment><comment><USER14> This essay is in a totally different genre than an HN blog post, so all of the comments here are totally wide of the mark. It's like asking why Thoreau didn't just get a telegraph line back to Boston. We don't use this genre in the US, which reinforces the point he's making. The Analects quote at the beginning is also crucial. All educated Chinese know that quote and ~0% of Americans do: we have radically different cultures, not just superficially different pop cultures. The whole argument is a sly wink in favor of nationalism, but it's not supposed to be read on the square as simple propaganda either.

<comment><USER15> Is the second (not directly quoted) part of the Analects reference important to understanding the essay?

<comment><USER14> I think it's more just that a) having a classical allusion makes you seem erudite in this genre b) it's clearly part of the shared culture that you get living in China that you could miss by living abroad. The second half where Confucius says he no longer trusts people without observing them probably plays some role (he's giving his own observations) but I don't think it's that important to the whole.

</comment></comment></comment><comment><USER16> The source website [1] of the author is more interesting. It can be translated into "neo-legalism", a reference to the "fa jia (legalism)" in the early Chinese history. Fa jia is a school of thoughts that has a color of modern law & rule-based society system, but it is truly a top-down feudalism system that put its center around the legitimacy of the imperial court.

It does not end here though.

What they meant by the neo-legalism in the website, is actually centered a round a blended Taoism with a shell of a codified rules & laws in the legalism methodology. What historically is called "内圣外王", roughly "holds a saint-like attitude internally, but sternly executes the laws like a master".

The website claims that the capticalism is going to be replaced by such a reinvented system from the ancient tradition.

The whole thing has a strong flare of the historically-bestowed self- righteousness of the conventional Chinese scholar, as often recognized by western scholars on China study.

[1] [http://www.xinfajia.net/](http://www.xinfajia.net/) [2] [https://en.wikipedia.org/wiki/Legalism_(Chinese_philosophy)](https://en.wikipedia.org/wiki/Legalism_\(Chinese_philosophy\))

</comment><comment><USER17> Didn't sound like he really wanted to study in America. That's fine, but if you don't have to do something, then it's harder to get value from it.

I studied abroad because I REALLY wanted to. I was immensely looking forward to traveling, experiencing new customs, learning new ways of thinking and even learning more than the basics of the language.

It was an experience I will value forever.

I think a big difference is that when Americans or Europeans study abroad, they are looking for an experience, when Chinese students (if this guy is to be believed) are looking to pad their resumes.

Same goes for college. If you go to college so you can put it on your resume, then you will hate it. If you go to college looking to learn, make friends and acquire skills, then it will be fantastic.

</comment><comment><USER18> Disclaimer: I am not Chinese.

I'm a bit dubious about a lot of the other reasons in the article, but one strikes me as very true, perhaps just because I directly observed it.

I'm just wrapping up an MSc in the UK. One thing I have noticed in my program is that language is a huge barrier for the Chinese students. Their questions often reveal they are struggling to follow in lectures, they struggle to make others understand their arguments, and they get tasked with less responsibility in group assignments. Furthermore, the extra time needed to read texts, write papers, and generally learn more English comes at the cost of time spent on their actual topic of interest.

I can't imagine how demotivating this must be, and generally how much more difficult the program must be as a result. I wouldn't be surprised at all if some of their counterparts in China have more academic/career success as a result of not having language as another burden.

</comment><comment><USER19> What I was impressed with is the profundity to which he attaches to sitting around and bs'ing with his Chinese buddies. And when we westerners see this, out of the corner of our eye, we think...

<comment><USER20> I'd wish they try to do it with us too!

</comment></comment><comment><USER21> What would be interesting is a follow-up to see how he feels today after returning and living in China. I bet he find life to be a lot better, yet at the same time suddenly realizes in a conversation with his Chinese friends and family some of the wrong assumptions they also have about the West vs his own experiences.

</comment><comment><USER22> I feel like a lot of people commenting here don't understand that in order to get a high rank title in China, he _had_ to go and study in the West, against his will.

So naturally, he resisted and resented this fate, not unlike many of my friends resented having to finish University and pass classes they had no interest in.

The points he makes, I did not find to be insightful or interesting. They're down to earth, simple, human observations, not unlike the stories I hear from someone who goes on vacation. At least this guy didn't spend most of his time talking about food :)

</comment><comment><USER23> I disagree a lot here. I did study abroad and I'd argue that this might have been a one of the best things that has ever happened to me:

1\. This is completely false. You have just as much time as you would have had back at home. Yes, you might have more things to worry about being on your own but you can certainly make up for it and learn to make compromises quickly. Expecting to come out fully prepared out of university is plain stupid. In most scenarios you end up with an average amount of theoretical and practical knowledge but you are nowhere before you end up crashing into your first job when you realize that the studying is just beginning.

2\. That is highly personal. You either live with the mindset that you need a degree to get a job or take the most out of the situation. If the degree is your primary goal, then yes, you won't have the adequate will and determination to better yourself. I had professors that spent 5 or 6 hours after lectures talking to me and explaining some nitty-gritty details just because they saw I had genuine interest. I never asked them to dedicate any more than a few minutes but on multiple occasions we ended up staying in the hallways way past midnight discussing different topics.

3\. I honestly don't get that point.

4\. While the friends and family statement is correct and fitting in somewhere new is something that takes forever, regardless of the tons of effort and dedication, if you find peace in being alone, it's a huge advantage. Sooner rather than later I fell in love with digging deeper and deeper and following rabbit holes that most of my peers had no clue about. Eventually I became the second-best student by a fraction of a percent, given that I was studying in a foreign language.

5\. Depending on what you are studying, this might be a good thing. My native language has very little in common with the two other languages I've had to learn, other than the fact that they are all European. Their structure is vastly different, two different alphabets, completely different way of constructing sentences and thoughts in general. For software engineering, I feel like this is a brilliant mental exercise.

6\. In a vastly globalized world, this seems like a non-issue. If anything it teaches you to look at things from multiple perspectives and take the best out of both worlds. Certain solutions can be applied successfully in completely opposite social and political environments and solve multiple problems in the process.

7\. Same as 3, I really don't understand the point the author is trying to make.

</comment><comment><USER24> This was a fun read. I totally feel what the guy is saying about thinking in a different language, my brain turns to mush when I'm trying to communicate in English. And I have it easy; compared to Chinese, all European languages are basically the same.

</comment><comment><USER25> I agree with this criticism of US college:

> You read really quickly, discuss really quickly, turn in your papers really > quickly. The things you think about are decided by your professors, and you > follow their lead as you develop your thoughts instead of asking yourself > what questions you developed from your reading or what link it might produce > with your own background. So you just do your best to chew the cud and > digest the material. And if you actually learn something, it is transplanted > out of nothing and remains attached to its origin rather than sinking roots > or sprouting branches. When study is nothing but rote learning, who doesn't > lose their appetite?

</comment><comment><USER26> It seems a bit strange to view the physical 'traveling abroad' as harmful, when he's so obviously 'traveling abroad' in thought throughout the piece - Heidegger, after all, was not Chinese.

It also seems that a lot of what caused the century of humiliation for China was this inward-looking tendency in Chinese culture, a tendency that left them ignorant of western ideas and technology until it was essentially too late. It also seems that a lot of the reinvigoration of China is due to a spirit of openness towards the rest of the world, with western ideas (most obviously marxism) being the driver of a phenomenal amount of change.

Not being Chinese, it makes me a bit sad to see China drift the kind of insular, chauvinistic direction it has been going in the last few years. Chinese culture is amazing, but it's at its very best when it's vigorously confronting the outside world.

<comment><USER27> > it's at its very best when it's vigorously confronting the outside world

How so? The examples that spring to my mind—Imperial Japan, the Manchurians, that Genghis bloke—all end very badly for China and its culture.

<comment><USER28> [https://en.wikipedia.org/wiki/Silk_Road](https://en.wikipedia.org/wiki/Silk_Road)

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

</comment></comment></comment><comment><USER29> > Fourth, life is dry and boring, you don't have friends or family, and you > can't sit around every day talking about the meaning of life.

I feel OP is projecting himself too much here. It is completely up to how a person mingles with others, in my opinion. As long as the person is not too unapproachable or the groupism of natives is not strongly at play, I think one can make awesome friends and families abroad.

</comment><comment><USER30> Archived: [https://web.archive.org/web/20200624180614/https://www.readi...](https://web.archive.org/web/20200624180614/https://www.readingthechinadream.com/zhang- yongle-the-harm-of-studying-abroad.html)

</comment><comment><USER31> As an international student in the US, I pretty much disagree with all of what the author is saying.

</comment><comment><USER32> Studying abroad, like any other endeavors, is for the willing and prepared ... not for the ones who may want to do it for the sake of doing it. Living or traveling to any new places would enrich oneself ...

</comment><comment><USER33> His point on the nature of Western style debate and argument rings true.

</comment><comment><USER34> China needs to start pulling it's students home permanently.

Not saying the author wrote it for that purpose, but I'm sure it's being pushed atm for that reason.

</comment><comment><USER35> If what he says is true, it also means that the creative thinking at the graduate level of many American STEM degrees has been limited. My friends who are professors in American Universities tell me that in a lot of their courses, there isn't an American student in their whole class; their classes are mostly Chinese. So if their whole group has gone through a hazing- education-process, conducted in a foreign language, they will have suffered the kind of spiritual harm described by the author. If they stay in the US to do their graduate work, chances are they won't be thinking out of the box.

<comment><USER36> That's because there's very little incentive for doing a Phd so immigrants do it so it helps their immigration status. It would take someone to be insanely in love in CS to forfeit 300K or so compensation for a Phd.

</comment></comment><comment><USER37> I think a more appropriate title would be "The harm of studying abroad in the US for Chinese students"

</comment><comment><USER38> I honestly can't tell if this is sarcastic or not. Especially points 4 and 5 - this is when you learn to get out of comfort zone!

</comment><comment><USER39> This article is basically someone failed at achieving something and then blame it all to an easy target. America happens to be the easy target of his choice this time.

</comment><comment><USER40> lol

If our societies are so shitty, why not let young Chinese students see for themselves?

Then they know what they have in China.

</comment><comment><USER30> >When study is nothing but rote learning, who doesn't lose their appetite?

Interesting that this first criticism is commonly leveled at students from the People's Republic of China. Does the language barrier force students to rote- learn to keep up?

I know from personal experience studying overseas that rote-learning was my default mode to try and keep up.

Are all the critiques of PRC students for rote-learning when studying in the PRC false? It seems an extraordinary claim give personal and abundant reported experience.

>If you are wearing yourself out every day, you naturally embrace the spirit of "minimalism," in which you do as little as possible, and once you've finished something you go to sleep, loathe to take the initiative on your own to explore anything else.

Seems language struggles could be blamed for this.

>it makes no difference if you don't go to bookstores in the US, but if you bring this habit back with you, it means that you don't go to bookstores in China either.

The third criticism seems a spurious addition to the next two.

> you wind up really lonely, which makes you appreciate the vitality of life > in China. When you come back, you're like a bird let out of a cage, and your > only urge is to fly. Who wants to study?

There are many places in the PRC even today that has never seen a foreigner. Exposure to foreign ideas and ways is limited even in the cities. The result is a massive culture shock when going overseas. If there is a language barrier then it is going to be hard to connect. The result is the PRC students form small and impenetrable cliques. That has to be a lonely experience.

>trying to think in a foreign language is like trying to scratch an itch through your boots

This is why a lot of PRC students now study abroad before going to an overseas university to avoid these cultural and language difficulties. If they have difficulty after that then there are other problems.

>if you live abroad for a long time, you will miss many theoretically interesting things happening in China

There are big changes afoot in the PRC. If the student is unprepared to gain the most from an overseas education then they shouldn't go. Since the U of C was mentioned, the US has been underestimated many times in its past. Time will tell which was the better choice.

The seventh criticism makes no sense to me. It seems wrong or, worse, self- effacing in the worst way for a young vital student.

> because of various difficulties abroad, you wind up feeling rebellious, and > spend your days arguing with foreigners.

This engagement is precisely why you go abroad and is a big part of Western thought.

Can't say that everything is wrong but the solution is not to pull back but to study outside the PRC with the proper expectations and preparation.

</comment><comment><USER41> The domain name for the web page is kind of interesting in this regard. Just from the domain, I'd expect it to carry pro-China puff pieces at best, outright propaganda at worst.

<comment><USER42> The site is edited by three Canadian history professors.

"This web site is devoted to the subject of intellectual life in contemporary China, and more particularly to the writings of establishment intellectuals. What you will find here are essentially translations of Chinese texts that we consider important, together with discussions of related issues and a number of reference tools that can help those interested to navigate the project."

[https://www.readingthechinadream.com/about.html](https://www.readingthechinadream.com/about.html)

<comment><USER41> Interesting. I stand corrected.

</comment></comment></comment><comment><USER43> (These articles might be politically motivated.)

</comment><comment><USER44> Half of this thread should be flagged for racism.

</comment><comment><USER45> To me, this reads as so much Chinese nationalism. Feels super consistent with Communist propaganda of an indolent West. Also, seems very suspect to criticize a lack of intellectual freedom by comparing it to a system without freedom of information. I also thought that Western education was widely considered much less about rote memorization and more about intellectual creativity and freedom, even to the detriment of western folks' technical skills. Even just the concept of a "liberal education" or a "liberal arts school" is a western concept AFAIK; I do think there is a lot of rote memorization, but I would think this would only be exacerbated in a Chinese institution.

<comment><USER46> I hear you, but I think that there is a significant portion of the "modern" university system (particularly larger schools or systems) that is merely paying lip-service to these values, particularly at the undergrad level.

I had the good fortune of small class sizes and being able to debate professors. (Appeal to authority didn't count lol) I think that some school even prioritize what you mention: St Johns school of the great books (not sure if this is the name) in Santa Fe, for example, makes you learn ancient Greek and Latin. When you learn Geometry, you read Euclid in Latin and argue about his books for weeks on end... It's the opposite of the superficiality the author mentions. There are costs to this, however, and they spend less focal time on the 20th century, when, arguably, many important events and works occurred.

<comment><USER46> Sorry, I meant "read Euclid in Greek" not Latin. doh.

</comment></comment></comment><comment><USER47> Written by someone who travels to another country with a closed mind and then complains that life there is not like home.

</comment><comment><USER46> Talk about someone projecting their own experiences as universal truths for everyone, LOL

...and then trying to use Heidegger as an excuse for intellectual laziness is pretty silly too. The more languages you know, the more you really understand the true meaning of words in your "own" language. (Certainly with Latinic languages and English, for example.)

There's also a point to be crossed at which you can dream in another language and there's a bit of a desert to be crossed before that happens.

Overall, it was a challenging and somewhat thought-provoking read, but I feel that

1) the author approached the subject superficially and in a flippant manner

2) the author is young and has much to learn about LIFE on earth, whether it be China, or any of the other 180 something "countries" we have divided our planets human societies into.

That said: I've noted that large nationalistic nations (China, the USA, Brasil, Russia...) tend to know less about the outside world and navel-gaze more, whereas smaller nations with many different neighbors (most of the world) tend to be aware of the cultural framing on almost any issue, even if they defer to local customs or beliefs. This is obviously a gross generalization, but a flavor one nevertheless is imparted with due to:

1) A tendency towards being linguistically bound in thought. (I will propose that the author here is dead wrong, Martin Heidegger notwithstanding, and that languages bound thought possibilities by their grammars and biases)

2) A tendency to not have experienced any foreign nationals in rural areas, or certainly none that are deemed to be equal human beings by a significant part of the local society.

3) A tendency to believe the local media and governmental narratives at the cost of being completely un-aware of other narratives, regardless of belief or resistance to such narratives.

<comment><USER46> I wonder if the author would have enjoyed a different school or town/region instead. We might simply be addressing culture shock, jet-lag, and a lame school, lol</comment></comment>


Fed Starts to Wonder If Cornerstone Inflation Model Still Works - <AUTHOR> https://www.bloomberg.com/news/articles/2017-08-16/fed-starts-to-wonder-if-cornerstone-inflation-model-still-works <comment><AUTHOR> Seems to me inflation is much higher than the reported national CPI, but I live in the Bay Area. I always wondered what was in the "basket of goods" and finally found a great report with everything broken down[1].

[1][https://www.bls.gov/cpi/detailed-report- archive-2017.zip](https://www.bls.gov/cpi/detailed-report-archive-2017.zip)</comment>


Thue (esolang) - <AUTHOR> http://lvogel.free.fr/thue.htm <comment><USER2> More information about Thue on esolangs: [https://esolangs.org/wiki/Thue](https://esolangs.org/wiki/Thue)

There's a list of alternative implementations if you feel like playing with it.

PS: IMHO, this is a better link than the free.fr link from OP. Link to this page instead, either from esolangs wiki or on HN here?

</comment><comment><USER3> seems like an elaborated [https://en.wikipedia.org/wiki/Tag_system](https://en.wikipedia.org/wiki/Tag_system)

<comment><USER4> It's a Semi-Thue system[0], a particular form of term rewriting system that is almost 30 years older than tag systems; introduced over a hundred years ago to formalise word problems in finitely presented semigroups (that's where the semi-part of the name comes from).

[0] [https://en.wikipedia.org/wiki/Semi- Thue_system](https://en.wikipedia.org/wiki/Semi-Thue_system)

<comment><USER3> That's cool, so I'm drunk and on my phone, but it seems like tag systems are then a sort of subset of thue systems? specifically an only concatenative subset, which makes me feel like some one should definitely add a reference to the tag systems page.</comment></comment></comment>


New AI research makes it easier to create fake footage of someone speaking - <AUTHOR> https://www.theverge.com/2017/7/12/15957844/ai-fake-video-audio-speech-obama <comment><USER2> Can we combine this with [https://lyrebird.ai](https://lyrebird.ai)</comment>