The lost art of 3D rendering without shaders - <AUTHOR> http://machinethink.net/blog/3d-rendering-without-shaders/ <comment><USER3> The year I learned to write C code I was 19, second year of university and already willing to drop out, so I started spending time with C and 3D graphics. I was just fresh of the math exam so the 3D matrix transformations to do rotations was trivial to implement. I just wrote a function to draw triangles, used a simple z-sorting technique, and the basic shading calculating the cosine of the angle between the observer and the surface. With just these basic things I ended up with 3D "worlds" similar to the ones I saw in DOS games when I was a child. All the effort was maybe 500 or 1000 lines of code, but to build things from scratch, only starting from the ability to draw an RGB pixel, gave me a sense of accomplishment that later shaped everything else I did. I basically continued for the next 20 years to create things from scratch.

<comment><USER4> My first year university Linear Algebra textbook even had an appendix explaining how to rotate and skew 3D objects in computer graphics using the matrix multiplication I had learned that semester. I loved it.

Then I finished university and got a programming job creating forms to gather user data, put it into a database, and generate reports. Sigh.

<comment><USER3> I've the feeling that unfortunately most programming jobs, even in shiny startups, are more like data forms than 3D engines... That's why many programmers have OSS side projects where they do cool things.

</comment></comment></comment><comment><USER5> This is a good tutorial, but it's important to note that scanline rasterizers are _not_ how GPUs (or even high-performance SIMD software implementations) work. Instead, they use barycentric coordinate sign tests for better parallelism and "free" interpolation.

A good explanation on this is Fabian Giesen's: [https://fgiesen.wordpress.com/2013/02/06/the-barycentric- con...](https://fgiesen.wordpress.com/2013/02/06/the-barycentric-conspirac/)

<comment><USER6> You're absolutely right about scanline rasterizers and GPUs, but scanline rasterization is very interesting historically. Most of the 1990s pre-GPU software renderers did scanline rasterization, for example Quake and Thief had a pure software renderer.

Before GPUs, perspective correct texture mapping was the holy grail of 3d graphics because CPUs of the time were not fast enough to do all the divisions for each pixel, and lots of clever tricks were invented to work around this limitation. It's a bit of a shame that this article does not cover it, perhaps there's a part 2 in progress.

Here's a quick write up about Thief's engine [https://nothings.org/gamedev/thief_rendering.html](https://nothings.org/gamedev/thief_rendering.html)

I've seen a similar piece on Quake but I can't find it now.

</comment></comment><comment><USER7> Takes me back. A long time ago I wrote a simple rendering library for the 3DFx "Glide" library. It didn't do shaders but it would do mipmapped texture rendering which allowed you to have an image (texture) on your triangle. For a while I was stuck on the projection matrix and understanding screen clipping until my Dad gave me his copy of the Kodak Reference Handbook[1] third edition, copyright 1945. And they describe focal length, field of view, fstops, and lens effects very clearly.

[1] [https://books.google.com/books?id=6DgYAQAAMAAJ&dq=Kodak%20Re...](https://books.google.com/books?id=6DgYAQAAMAAJ&dq=Kodak%20Reference%20Handbook)

<comment><USER8> Looks like archive.org has a copy: [https://archive.org/details/KodakReferenceHandbook](https://archive.org/details/KodakReferenceHandbook)

<comment><USER7> Awesome, that is the one I have.

</comment></comment></comment><comment><USER9> Nitpick: this is software rendering. This is how we did before any kind of 3D api existed. Both GL/D3D/etc were without _shaders_ to begin with. I _still_ maintain a fixed pipeline (no explicit vertex or fragment shaders) 3D app with DirectX.

One can argue that the fixed pipeline of D3D is using a kind of implicit shader, but it's not the kind of shader we usually mean when we talk about vertex and fragment shaders today.

</comment><comment><USER10> > Back in the day — way before we had hardware accelerated 3D graphics cards, > let alone programmable GPUs — if you wanted to draw a 3D scene you had to do > all that work yourself. In assembly. On a computer with a 7 MHz processor.

7 MHz? That's so fast and modern. Back in the day we were writing 3d fill routines on the 6502 going 1 MHz. With no floating point and no diagonal line support. And in bare machine language, going uphill both directions in the snow! ;)

<comment><USER11> One of the first pieces of 6502 assembly I read, and spent ages deciphering, was an implementation of Bresenham's line algorithm published in some magazine. Who needs floating point...

</comment></comment><comment><USER12> > _The framework then takes these shaders and your 3D data, performs some > magic, ..._

If we juxtapose that statement with the following in an unrelated introduction[0]:

 _' WebGL is often thought of as a 3D API. People think "I'll use WebGL and magic I'll get cool 3d". In reality WebGL is just a rasterization engine.'_

I suppose when you're writing a software renderer from scratch without the luxury of any API or hardware acceleration, such things are indeed magic.

[0] [http://webglfundamentals.org/webgl/lessons/webgl- fundamental...](http://webglfundamentals.org/webgl/lessons/webgl- fundamentals.html)

<comment><USER13> When people talk about 'Magic' in software they mostly just mean the implementation details don't impact them. You can have two very different GPU's both implement the same WebGL calls correctly.

</comment></comment><comment><USER14> Kinda of a shame they omitted matrices. They're one of the foundational bit of any 3D api and one of the few things that translates well from fixed function/sw raster to modern pipelines.

Still great to know the fundamentals, texture formats, tiling and other things are also really useful pieces to understand when working with 3D pipelines.

<comment><USER15> Matrices are just a convenient notational trick for a set of linear algebra expressions. They seem confusing until you realize that an identity matrix represents:

        x' = 1*x + 0*y + 0*z
        y' = 0*x + 1*y + 0*z
        z' = 0*x + 0*y + 1*z

I prefer to teach 3D graphics without matrices because it's really not anything more complicated than a compact notation. Tricks like "invert and transpose to receive the normal matrix" or "take the first column to get your up vector" make no sense unless you work out the algebra of what those things mean.

And don't get me started on homogeneous coordinates which are a way to put translation in a matrix by shoving a convenient "1" constant in the input vector, and the perspective matrix which does near/far, perspective transform, and a depth remap in the same matrix, and isn't easily separable because it steals the "w=1" constant for depth remap and also adjusts the "w" afterwards. Equivalent of reusing a local variable because you're short on registers :)

<comment><USER10> True, matrices are convenient for notation, and they tend to be confusing at first. A tutorial like this is better off without the detour through linear algebra.

But without them you lose the ability to smoosh multiple transforms together, making it harder to do anything hierarchical or animated. Personally, I'd place their utility higher than "just" notational convenience.

I feel like we haven't figured out how to teach matrices, that they're inherently easy after you understand them, but we don't know how to introduce or explain them easily. Do you introduce them later & do you have any good resources for them once you do broach the subject with your students?

I like your identity example. I think I really started to "get" matrices after realizing they are literally vectors put in a stack, and that the vectors represent the state of transforming from the identity to those vectors. With that in mind, a matrix can feel much easier than a rotation involving trig functions and hand-coded dot products. You can do all kinds of rotating and other transforming without any trig once you see matrices as transforms rather than an opaque and mysterious brick of numbers. But I admit it took me years to feel that way after my first encounters with matrices.

<comment><USER15> There's nothing magical about matrix multiplication. Smooshing multiple transforms together just comes down to taking those systems of equations and combining them. If I have one transform that scales space by 2, and another that scales translates space +5 (OK, yeah, this is an affine transform, not a linear one, but I wanted to focus on one coordinate for now), then I have:

        f(x) = 2*x

and

        g(x) = x+5

Using basic high school algebra we can find out that:

        f(g(x)) = 2*x+10

and

        g(f(x)) = 2*x+5

This applies all the way down. The magic isn't in numbers in a square shape, it's in basic algebra. Matrix multiplication comes down to composition of multiple systems of equations like this, and if you start from that, and nothing more than the distributive property of multiplication, you can easily derive "matrix multiplication".

Don't get me wrong. I use matrices in everything "production" for 3D graphics -- the compact notation is extremely convenient. I just wish we'd stop ascribing magical properties to matrices like "without them you lose the ability to smoosh multiple transforms together" because that's clearly false.

<comment><USER16> I would quickly start drifting if I attended a class on 3D graphics and the teacher started writing everything open without matrices like that. You must admit the usefulness of a short notation when communicating ideas.

While understanding and talking 3D graphics is certainly possible without matrix notation, I really see no reason to purposefully omit it in teaching or other communication. Teaching situation is also a good place to practice standard notation.

</comment></comment></comment></comment></comment><comment><USER17> Minor nitpick

"The green and blue colors, z-position, and normal vector are all interpolated in the same manner. (Texture coordinates behave slightly differently because there you'd also need to take the perspective into account.)"

Colors (c), z, and texture coordinates (t) should all be interpolated differently because of perspective. You need to interpolate 1/z, c/z, t/z and for every pixel then do division eg. c/z / 1/z = c

</comment><comment><USER18> It may be a lost art for game developers. Far from it for CG grad students and researchers. Quite the contrary, it's actually part of the rite of passage, heck an undergrad level prerequisite to know these things like the back of your hand, plus a whole lot more, to do graduate level CG work.

Even if you're not a researcher, but wish to write your own path tracing code for example, you would end up learning this.

So no, not a lost art at all in my opinion.

</comment><comment><USER19> This is a great article!

I strongly believe that an understanding of how old school 3D rendering worked is an excellent thing for modern graphics programmers to have, to appreciate and understand where all of our fancy modern graphics APIs and whatnot come from. Back when I helped teach a GPU programming course, one of the assignments I gave was a full-blown software rasterizer implemented entirely in CUDA. Not so much "program in OpenGL" as "program an OpenGL". :)

<comment><USER20> In a video I saw recently, the guy in it suggested [1] reading old books about earlier versions of DirectX from the late 90's and early 2000's, around DirectX version 9, even though one does not want to ever use DirectX for the reason that most graphics engines are built on the concepts of these versions of DirectX he said.

[1]: [https://youtube.com/watch?v=06zp5GMe2rI&t=4m11s](https://youtube.com/watch?v=06zp5GMe2rI&t=4m11s)

</comment></comment><comment><USER21> Ahh. The days. I remember before I had learned about linear algebra, I saw somebody rendering molecules as 3D wire frames. I had an Amiga back then with it's "Blitter" (could draw lines in hardware, a long as you tell it which if eight octants the line's angle falls into).

Then, being the geek I was, I sat down every day until I had figured out perspective transformation and rotation (later I found I had just done matrix multiplication). Of course I never thought of homogeneous coordinates, so translation was an extra step to be done for each point.

Even worked out "real" red-green 3D. Oh the days when I had time for this stuff. Fond memories.

</comment><comment><USER22> I used to write my own triangle fill algorithms with their own shaders back in the 1990s. Fun times: [https://github.com/bhouston/3DMaskDemo1997](https://github.com/bhouston/3DMaskDemo1997)

Here is the optimized triangle fill code with embedded asm pixel shaders: [https://github.com/bhouston/3DMaskDemo1997/blob/master/src/N...](https://github.com/bhouston/3DMaskDemo1997/blob/master/src/NCCTRI.CPP)

<comment><USER23> Ah, the 80s & early 90s, when you had to implement everything yourself and every byte and instruction counted :)

The demo scene these days feels somehow less satisfying. The demos definitely _look_ better, but they can plug into such a vast ecosystem of system libraries that 64KB feels like cheating.

ASM mode 13h nostalgia.

<comment><USER24> The minimalist scene is still out there, it's just a niche within a niche.

For instance, here's a demo from 2015, done in immediate mode and 256 bytes - I've got a feeling you'll enjoy it as much as the live audience clearly do:

[https://m.youtube.com/watch?v=07KHwjebf7k](https://m.youtube.com/watch?v=07KHwjebf7k)

For another recent example, also in 2015 some wizards managed to coax 1024 colours (among other impressive visual effects) out of an original IBM PC - <USER2> in, hardware from 1981:

[https://trixter.oldskool.org/2015/04/07/8088-mph-we-break- al...](https://trixter.oldskool.org/2015/04/07/8088-mph-we-break-all-your- emulators/)

<comment><USER25> > For instance, here's a demo from 2015, done in immediate mode and 256 bytes > - I've got a feeling you'll enjoy it as much as the live audience clearly > do:

> > [https://m.youtube.com/watch?v=07KHwjebf7k](https://m.youtube.com/watch?v=07KHwjebf7k)

Even more cool (but from 2006) and also from digimind:

> > [http://www.pouet.net/prod.php?which=26655](http://www.pouet.net/prod.php?which=26655)

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

<comment><USER26> Wow to both. Yet to me, Immediate Railways (2015) blew my quite a bit more than Demoplex (2006) ;)

Maybe I missed a detail, a film cinema room, including chairs, middle aisle, rotating camera, friggin ambient occlusion AND an animated plasma on the projector screen. Absolutely jaw-dropping, not a single doubt. I used to write 4096b demos but this is a class of its own, even crazier skills I don't have, I could have a stab but I'd get stuck at 512b _at least_ , - cough - :-P

But Immediate Railways is the first 256b demo I remember seeing that actually has multiple parts! Three parts and they actually make sense! You could even argue that the three parts connect in a (very basic, minimal, three-clause sentence) story line. Now I haven't been keeping up with everything in the scene, but that's a first for any 256b demo I have ever seen. Many cases a 256b is showcasing a single "thing", scene or effect that is a few times more complex than Kolmogorov's worst acid dream. Also I think the design and colours are nicer than in Demoplex (and yes, that counts).

Fun thing to imagine though, if you'd concatenate 16 of these babies to make a single 4096b demo, you wouldn't stand a chance in a modern 4k compo :) Not even allowing 20 of them, sharing init code. The expectation of "way more than the sum of its parts" has already exploded in the step from 256b to 4096b. I'm not even sure one could fit a softsynth worthy of the music expected in a modern 4k into 256b? (ok probably one could, probably someone did, prove me wrong already :p mine was about 1100b, back in 2000)

</comment></comment></comment></comment></comment><comment><USER27> Related: "JavaScript library for simple 3D graphics and visualisation on a HTML5 canvas 2D renderer. It does not use WebGL. Works on all HTML5 browsers, including desktop, iOS and Android."

[http://www.kevs3d.co.uk/dev/phoria/](http://www.kevs3d.co.uk/dev/phoria/)

[https://github.com/kevinroast/phoria.js](https://github.com/kevinroast/phoria.js)

</comment><comment><USER28> How OpenGL works: software renderer in 500 lines of code [https://github.com/ssloy/tinyrenderer/wiki](https://github.com/ssloy/tinyrenderer/wiki) [https://news.ycombinator.com/item?id=11264469](https://news.ycombinator.com/item?id=11264469)

</comment><comment><USER29> A while back I created a small project for drawing 3D wireframe graphics using the Common Lisp LTK interface to Tk.

It's slow (uses inefficient matrix algorithms, uses Tk, etc.) but it's "fast enough" for some simple 3D scenes. Not very practical for real-life use, but it was fun.

[https://github.com/jl2/ltk3d](https://github.com/jl2/ltk3d)

FWIW, it's not doing hidden line removal, IIRC I was careful to pick a viewing location that made it look good.

</comment><comment><USER30> Great, great stuff. Terrific article.

\---

It does seem to perpetuate -- or at least not make clear -- a misconception.

> 3D rendering without shaders

> We won't use any 3D APIs at all

Those are two independent statements.

Metal, OpenGL, WebGL, and Vulcan are not a 3D APIs. They are (2D) rasterization APIs using shaders. Any 3D-ness of the math is external to them. In contrast, OGRE, Java 3D, and three.js _are_ 3D rendering APIs.

Two independent choices yield four types of ways to do 3D rendering. E.g., in browser they could be

                         |         3D API         |       no 3D API        |
          </comment><comment></comment><comment>---|</comment><comment></comment><comment></comment><comment></comment><comment>|</comment><comment></comment><comment></comment><comment></comment><comment>|
            GPU shaders  | three.js, using WebGL  |         WebGL          |
          </comment><comment></comment><comment>---|</comment><comment></comment><comment></comment><comment></comment><comment>|</comment><comment></comment><comment></comment><comment></comment><comment>|
          no GPU shaders | three.js, using canvas |         canvas         |

This article fits in bottom-right corner.

I take notice when I hear the oft-repeated fact that OpenGL/WebGL are 3D rendering APIs. At www.lucidchart.com, in 2015 we chose to use WebGL when available to improve rendering performance for (2D) diagramming. Were WebGL made for 3D stuff, it'd be a weird choice, but WebGL is for high-performance rasterization of all kinds.

[http://webglfundamentals.org/webgl/lessons/webgl-2d-vs-3d-li...](http://webglfundamentals.org/webgl/lessons/webgl-2d-vs-3d-library.html)

</comment><comment><USER31> Great article! Reading the title, I thought it was about the "tricks" that games used when the best thing available was the fixed pipeline.

I still remember how amazed I was when learned the good balance between performance cost and the resulting image when using textures for static lighting (lightmaps).

</comment><comment><USER32> This is the kind of article that I enjoy reading a lot. Most tools available today mask away fundamental concepts, and many aspiring young engineers learn to use "tools". While the ability to use various tools is of paramount importance, the most valuable skills an engineer can possible possess, in my opinion, is the ability to create new tools/concepts/whatever from 1st-ish principle

</comment><comment><USER33> I have a question about the rasterization step. When creating the scanlines, would this be a possible entry point for anti-aliasing, by giving the lines a subtle gradient that goes to near 0 alpha at the right and left edges? (and maybe also the top and bottom edges for the lines at the top and bottom of the stack). There are many ways to do anti-aliasing and this seems like one possibility to me.

</comment><comment><USER34> Any suggestions on a good primer for what shaders are and how they work? For years I've always thought "shaders" are just effects you can layer onto a rendered scene. Say, to get an 80s effect, or bloom, or a cel shading effect, etc. I never really thought of it as a way to actually do the base scene rendering.

</comment><comment><USER35> scratchpixel.com has excellent tutorials on computer graphics and how to do rasterization [1].

[1] [https://www.scratchapixel.com/lessons/3d-basic- rendering/ras...](https://www.scratchapixel.com/lessons/3d-basic- rendering/rasterization-practical-implementation)

</comment><comment><USER36> I've thought before that it would be cool to implement a rasterizer in something like OpenCl.

</comment><comment><USER37> Thank god it is almost lost, interesting, but highly specialized, and ORDERS of magnitudes slower.

<comment><USER38> Other than some very specific things like the rasterization algorithm for filling in a triangle, you still can't really skip learning the concepts in the article. The concepts are still quite relevant in the post-fixed-function- pipeline world, except you do even more math and even more clever tricks.

The GPU and associated API's just nicely abstract specific computations for you like matrix transforms, texture sampling, depth testing, etc., but the moment you want to do anything sort of fancy you're right back into the depths of it.

</comment></comment><comment><USER39> All these 'for' loops and sequential trigonometric calls...

See, I wouldn't say that art was lost. It was obsoleted to dust by a more modern and scalable approach.

<comment><USER40> Nobody really wrote software rendering like that beyond CG classes. I'd think author is simplifying for the sake of accessibility but it's actually more complicated than what production renderers did. One could also think it's to show a GPU's internal work, but, again, GPUs don't do this either.

<comment><USER41> Wrong, wrong, wrong, wrong. Wrong.

People in the video game industry wrote tons of this stuff. We would spend weeks figuring out how to get one or two instructions out of the rasterizer or scanline converter, etc. I know this because I was there. I wrote several software rasterizers, and I learned how to do it by reading papers and magazine articles written by other people who wrote software rasterizers.

I have no doubt that other industries did so as well.

Even more recently, companies like RAD Game Tools built as products software rasterizers that are very fast (e.g. Pixomatic).

Also, what's in this article is a simplified introductory take. It is actually much much more complicated than this. (It doesn't look to me like he is doing perspective-correct shading, for example.) Also this guy's code is crazy slow compared to what you'd write in the real world, but hey, it is a tutorial.

<comment><USER40> Are you sure? You have shipped games with software rasterizers and they did this exact algo (no matrices in transform, computing gradient for each scanline)?

<comment><USER42> I also wrote software renderers in the 90s. I would say it was mixed. Some people used matrices, and some didn't. You really can't say that everybody used the matrix formalism across the board. For that matter, I worked on an engine at a well-known game company as recently as 2013, where there were definitely hand-optimized paths for several different cases of transforms where the constraints were known. Generally speaking, game programmers will do whatever it takes, and painstakingly optimizing algos down to minimum arithmetic operations has always been pretty common in the field.

<comment><USER40> I too wrote software rasterizers in 90s and even shipped a game with one. If you used a single sine for each vertix, least computing full rotation, you were fucked. There was no hardware, which could handle this at real time in 90s.

If you did division for each scanline, you were running at 1/4th of the speed at most - division was that expensive on 386-Pentium, not to mention other platforms, where CPU's could not even have hardware div.

> Generally speaking, game programmers will do whatever it takes, and > painstakingly optimizing algos down to minimum processor operations has > always been pretty common in the field.

I am not even talking about crazy optimizations (like using intel's x86 half register to do ghetto fixed point), I am talking about common sense stuff.

<comment><USER42> Ah. I think you're talking about something completely different from what jblow and I were talking about. If you mean that the code in the article is not optimized, and is doing crippling amounts of redundant computation, then of course I agree with you.

<comment><USER40> The guy asked what kind of magic is calling trig functions in inner loops? I replied that nobody really did it and I am confused as to what the author was trying to show.

I, frankly, do not understand what you and jblow read into this other than what I said.

<comment><USER41> Hahaha, I guess it's a big misunderstanding. You wrote:

"Nobody really wrote software rendering like that beyond CG classes".

I read this as a claim that nobody in general wrote software renderers. When by "like that" you just meant using the specific techniques he used.

That said, I still have to disagree, in the sense that, to get to a fast software renderer, you start with a slow software renderer. Nobody does all the crazy optimizations a priori ... so stuff like a divide per pixel was common, say. Calling trig functions in inner loops is of course goofy, but my presumption is that in the next step of refinement those would be lifted out of the loops, because that is the way things are always done.

<comment><USER26> > Nobody does all the crazy optimizations a priori ... so stuff like a divide > per pixel was common, say. Calling trig functions in inner loops is of > course goofy, but my presumption is that in the next step of refinement > those would be lifted out of the loops, because that is the way things are > always done.

Yeah, .. but no. Depends on what era you're talking about I guess.

When I wrote my first low-level rasterizer + basic 3D poly engine-ish-thing in 1998, I honestly wouldn't have considered for a second to do a division per scanline. An integer add was one tick, a mul was 3-10 (iirc), but a division was 10-40 ticks. Depending on what point you start considering the optimizatons "crazy", yes, had I known (and cared) about perspective correct shading back then, I would have started designing the algorithm, a priori (which for me usually meant on grid-paper) hunting for some way of faking a sufficiently accurate reciprocal using adds, shifts and at most 2 muls (per scanline, cause per pixel even a single mul was madness, obviously). With what I knew back then, probably go for a 2nd degree polynomial that might be sufficient to at least give the impression it was doing better than naive bilinear? :) Had I been aware of Carmack's (objectively crazy) inverse sqrt hack, I would probably have started looking in that direction (abusing the IEEE float spec on the bit level woohooooo).

Sure you could write a perspective correct triangle rasteriser with a div per scanline, and it would be too slow, it would be a nice theoretical proof of concept, but it would also be kinda useless if it turned out you couldn't make the above crazy hacks run fast enough. They were a real hurdle that had to be crossed or you might as well not bother. Also, why save the fun stuff for last? ;-)</comment></comment></comment></comment></comment></comment></comment></comment></comment></comment>


Javascript syntax checking in Vim - <AUTHOR> http://mikecantelon.com/story/javascript-syntax-checking-vim

<comment><USER2> Steve Yegge's js2-mode is pretty freaking awesome for emacs users.

Yay emacs. It also has built in linting for things like inconsistent returns and so forth. Its kind of amazingly good.</comment>


12 obsolete technologies Americans still use - <AUTHOR> http://www.foxnews.com/tech/slideshow/2013/05/29/12-obsolete-technologies-americans-still-use/#slide=1

<comment><USER2> Wow, what a complete content-free "aww, look how cute and backwards the flyover state people are" entitled whine of an article.

I really hope this article is a joke, but I fear it's not.

"Why haven't companies upgraded their dotmatrix printers so they can use expensive ink and print 4 part forms by printing 4 pages one after another, rather than use a printer technology that lets them print all 4 copies at one time, faster, and cheaper?" Why, indeed.

And that's probably the /least/ insulting of the examples.</comment>


North Korea Launched Missile Over Japan Toward Pacific Ocean - <AUTHOR> https://www.bloomberg.com/news/articles/2017-09-14/north-korea-launched-missile-over-japan-toward-pacific-ocean <comment><USER2> An interesting old news article I came across from 1998 (almost 20 yrs ago) when Kim's father did the same thing:

> North Korea Fires Missile Over Japanese Territory (SEPT. 1, 1998)

[http://www.nytimes.com/1998/09/01/world/north-korea-fires- mi...](http://www.nytimes.com/1998/09/01/world/north-korea-fires-missile-over- japanese-territory.html)

Which also contained this blurb:

> North Korea previously conducted missile test firings in May 1993, when it > fired four missiles into the Sea of Japan. Those launchings sent Japan into > a panic and prompted the Government to consider cooperation on a regional > missile defense system. Such a system is still years away.

It's interesting how long a missile defense system has taken to arrive in South Korea...

Edit: The US also predicted today's missile event when the UN passed sanctions a few days ago:

> Bill Richardson, a former U.S. ambassador to the UN said the sanctions were > "better than nothing, but not enough to really pressure North Korea," adding > that Pyongyang is likely to respond with a missile launch in the next few > days. (Sept 11, 2017)

<comment><USER3> Having worked in aerospace I find it very interesting that a nation like North Korea can manage to launch such rockets with regularity. There is no way they are able to do this on their own. That much might be obvious. The real question is: Who's helping them and what's their objective?

<comment><USER4> >Who's helping them and what's their objective?

Who's helping them is obvious - China.

What's their objective? Destabilizing and undermining American military hegemony in their sphere of influence and establishing themselves as Asia's sole superpower. I don't know how North Korea works into that, though. Maybe China just wants a proxy to harass the US with while having politically plausible deniability. Maybe they're hoping to step in when NK takes it too far and look like heroes, while making the US look feckless and weak.

<comment><USER5> Seems if you say anything negative about China even if completely accurate on HN you get downvoted. Yes China has assisted NK:

[http://freebeacon.com/national-security/china-sold-trucks- us...](http://freebeacon.com/national-security/china-sold-trucks-used-north- korean-missiles/)

<comment><USER6> It's relatively common on most social media sites including HN, reddit, etc. It was particularly noticeable during the coverage of China's DDoS attack on github a few years back.

</comment></comment></comment></comment></comment><comment><USER7> We really need to start punishing China for keeping North Korea alive. That country would collapse in a week without any food/fuel from China.

Good thing Donald Trump has started on that

"Donald Trump 'willing to cut off trade' with China to reign in despotic North Korea"

[http://www.express.co.uk/news/world/853919/World- War-3-North...](http://www.express.co.uk/news/world/853919/World-War-3-North- Korea-USA-China-Russia-Kim-Jong-un-Trump-Munchin)

<comment><USER8> I wonder if anyone in Beijing has thought through the idea that someday maybe a nuclear armed NK deciding it doesn't want to play nice with them anymore.

Like, if Saddam had nukes he'd probably still be alive.

</comment></comment><comment><USER9> Not fun to wake up to a missile flying over my house here in Hokkaido XD

I don't know how this going to end, but it feels weird to be in the crosshairs as collateral damage in a proxy war.

<comment><USER10> Japan is not really collateral. North Korea hates Japan apart from the US. In fact it's really the US that's collateral.

<comment><USER11> Neither is true. The DPRK isn't trying to pursue a war against its enemies in a military sense. They're trying to extort money from the world community as a price for peace.

<comment><USER12> True. It's all about extortion.

</comment></comment></comment></comment><comment><USER13> >The missile is likely to have reached an altitude of about 770km (478 miles)

For reference, the International space station is about 220 miles above earth. This missile went twice as high.

Why does a missile need to go so damn high? Do all of them do that or only this because it was a test?

<comment><USER14> Wild guess from the highly relevant experience of having played Kerbal Space Program: if you don't actually intend to achieve orbit (which is mostly about going _sideways_ really fast, not up) it may be more fuel-efficient to reach your target by going relatively high, to lengthen the amount of time you spend in little/no atmosphere before coming back down. _Or_ maybe you want to be going really fast on the way down for some reason. _Or_ (relatedly) it's harder to shoot down a missile on that kind of trajectory than a flatter one.

<comment><USER15> Going down really fast has an excellent reason: the faster you go down, the less time a counter-missile has to intercept you, and the harder it is (speed and acceleration requirements become insane).

</comment></comment></comment><comment><USER16> I'm currently on a ship sailing through the Bering Sea and down through the north Pacific towards Hokkaido over the next week or so. I am not sure if we should be more worried about typhoon Talim or North Korea :)

<comment><USER17> Red sky at noon means nukes you're DOOMED!

<comment><USER18> Red sky in morning, deterrence is thorny.

</comment></comment></comment><comment><USER8> So immediately the US dollar falls against the yen and gold goes up. Why?

[https://www.cnbc.com/2017/09/14/asia-markets-focus-on- north-...](https://www.cnbc.com/2017/09/14/asia-markets-focus-on-north-korea- yen-gold-fed-boe.html)

I mean, I know why, except this is the just the bazillionth time that NK has "cried wolf". I just can't muster the level of panic all the headlines demand.

Quick! Somebody suggest Moar Sanctions that the Chinese will go on ignoring.

</comment><comment><USER19> North Korea is a joke to our civilization world, can't imaging why it's still there playing fire.

<comment><USER20> Because they haven't gotten burnt yet.

</comment></comment><comment><USER21> I heard an interesting psychological profile of Hitler once, and the person said he didn't actually want to win. He had horrible means, so why assume he didn't have a horrible goal(losing, consciously or subconsciously)? I think North Korea's leader has horrible means, and may have a horrible goal, some sort of suicide where he destroys his whole country via the USA. Him thinking he can capture Guam is perhaps only possible to believe if he has really bad thinking. He has really bad ways of dealing with his people, so it's possible he is subconsciously trying to destroy himself.

<comment><USER22> I actually agree. People are applying rational thought to an irrational person and we know how well that usually works out.

<comment><USER23> What is it that makes you believe he is irrational? Just curious because I can come up with some pretty rational arguments for most of his actions.</comment></comment></comment>


Fans Uncover Super Mario Anniversary Twitter Account - <AUTHOR> https://www.videogameschronicle.com/news/fans-uncover-super-mario-35-twitter-account-potentially-linked-to-nintendo/ <comment><AUTHOR> I'm posting this because fans used the Twitter's password recovery process which reveals only part of the account owner's email to determine that several Twitter accounts are owned by a single entity. Can this be considered security or privacy flaw? Lot of my apps doe not expose any part of the email during the recovery process and I've thought about doing so, but now I'm reconsidering it due to this use case.

(Can someone come up with a better title?)</comment>


Forget Just Copyright, Now People Are Trademarking Music As Well - <AUTHOR> http://www.techdirt.com/articles/20100929/19582511229/forget-just-copyright-now-people-are-trademarking-music-as-well.shtml <comment><USER2> It occurs to me that I've never seen a link to a techdirt article that worth reading. That streak was not broken by this link.

First, music has long been subject to trademark, so the very title of the article is misleading. Second, the article shows a lack of understanding of the different purposes of and protections provided by trademark and copyright, and raises scary hypotheticals that are not actually possible.

<comment><USER3> What, exactly, is it that the author doesn't understand?

It seems pretty clear to me that he's pointing out the ridiculous abuse of trademark law for something that should only be covered by Copyright.

<comment><USER2> The author doesn't seem to understand that the purpose of a trademark is to protect the use of a mark as an identifier of a product or service. He offers no argument that a piece of music cannot function this way, and offers no argument as to why it would be good to allow other people to use the same work to misrepresent their produce or service as being that of the original.</comment></comment></comment>


Google Hangouts - <AUTHOR> https://hangouts.google.com/

<comment><USER2> Wow.... I got excited for finally a single place to go for hangouts (I was always confused at the best "launch point") and a better interface (chat on gmail hasn't changed in what feels like a decade) and lo and behold... It's a pretty launch interface but the SAME CRAPPY CHAT WINDOWS... I've always felt like hangouts was a horribly mismanaged product (starting and joining a hangout has always been a longer and more difficult process than it should) and this just confirms it.

There is SO MUCH potential and they've thrown it all away and not even for some gain. It'd be one thing if the interface sucked because of ads or something like that but no, it just sucks to suck. I continually have high hopes for hangouts and google does their best to dash them every time (Oh look they finally 'got it'... Nevermind, they fell flat on their faces again).

<comment><USER3> Here's how to do a hangout quickly:

1) Put [https://plus.google.com/hangouts/_/](https://plus.google.com/hangouts/_/) on your web browser bookmark bar

2) Upon need, click on that, wait for URL to change, and then send resulting URL over $IM_SYSTEM_OF_CHOICE

Best UI I've found so far to what I think is a pretty stellar video/voice communication product. Now if they would only fix hardware acceleration on Mac...

<comment><USER4> Sadly, that doesn't let you create a Hangout on Air. Hangouts on Air would be an absolutely _killer_ feature if only it worked reliably :(

<comment><USER3> What would you want to use it for? It seems like HOA sessions for most of the use cases that spring to mind would be scheduled ahead of time, and therefore not suffer as much from the bad-contact-list issue.

<comment><USER5> There are all kinds of gaps even then. For example, you can't invite a google organization (company) to the event directly in any smooth fashion. The solution is to copy the link and e-mail it to your list. After that, there's no way to restrict viewing of the recording to an organization.

This is just one example of a poor integration between two Google products, but those few little gaps in permissions and utility made it a product that didn't work for my needs at least.

</comment></comment></comment></comment></comment><comment><USER6> Google's UX/design now reminds of MSN/Hotmail/Yahoo of 10 years ago. All the pointless image-heavy neutral visual noise. Why on earth are you showing me that waterfall background? I don't want your watered down elevator music.

Google needs to remember why Gmail, Reader, etc ended up destroying the aforementioned products in terms of UX, and change the direction it's headed at.

<comment><USER7> Gmail has by far the work UX out of any of the popular applications I use. It's an eye sore.

<comment><USER3> I don't think GMail is pretty, but it's _very_ functional. Good UX != visual beauty.

As a result of a fairly recent job change, I have been forced into desktop IMAP clients again. I have to admit I have discovered a whole new level of appreciation for GMail.

Just the fact that it actually runs filters server-side and it has a (conceptually speaking) equivalent application for mobile devices trumps everything else. You can actually get it do to what you want.

The company I work for has a very heterogeneous systems landscape and I can say without much hesitation that GMail + Gcal's only serious alternative is Outlook. Everything else seems to me like a digital version of pen and paper.

<comment><USER8> I think that IMAP-serverside filtering is possible: [https://github.com/lefcha/imapfilter](https://github.com/lefcha/imapfilter) I haven't really looked into exactly what it's doing though (and I'm no expert on the IMAP spec).

<comment><USER3> Seems like that is just a command-line version of an e-mail client filter: it connects to the server, runs a query, and moves stuff to folders. Based on my experience with the average IMAP server search performance, I wouldn't let my users use this if I was in control of the server.

</comment></comment></comment></comment></comment><comment><USER9> I've always wondered why there is no dedicated Hangouts website. I always had to choose between Gmail and Google Plus to send a message. This may have been a way to encourage the uses of their other services? Anyways, finally they made a reasonable choice.

The chat window looks still elementary, though. I expected it to expand to fit the browser window. But it is still the tiny one that can be seen in Gmail and Google Plus, which is a bit annoying to use.

</comment><comment><USER10> I'm not sure if I'm missing something, but that is a considerable amount of wasted space (Hi, rp1229! Get started by calling or messaging a friend below). I thought my messages would show up there, but nope, they just show up on the bottom similar to other Google sites.

</comment><comment><USER11> Is it just me or do the three dots on the lower left do the same thing as the hamburger menu at the top?

<comment><USER12> It looks exactly the same for me, too.

<comment><USER3> It's just the UX guys at Google acknowledging this article from a week ago: [https://news.ycombinator.com/item?id=10036061](https://news.ycombinator.com/item?id=10036061)

Namely, Joe-the-user can't see the hamburger menu at the top and looks for more tools where they are supposed to be: after the first few tools. So the UX guys at Google put an affordance there for him [0].

I've seen this quite a few times, especially for interactions where the search box is within the hamburger-driven overlay. Some sites/systems add a dummy, redundant search box on the main UI that just opens the hamburger menu and focuses on the newly-displayed search box.

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

<comment><USER5> Sure it's important that people grok that there's more stuff, but for pete's sake, pick one affordance.

That just looks as clunky and indecisive as a drawer with both a knob and a handle.

</comment></comment></comment></comment><comment><USER13> Am I the only one that longs for what used to be the awesomeness that is gchat?

Gchat with what hangouts has for calls/voice/video would've basically been the win. Instead it constantly feels like this buggy/gimped browser app that maybe/maybe doesn't work.

</comment><comment><USER14> I'm confused. Shouldn't the large space on right _be_ where the IM window was supposed to pop in? Is it just a launch interface for already-available hangout app?

</comment><comment><USER15> Two things:

1\. Bundle this into an NW.js app and we've finally got a Hangouts desktop app at long last!

2\. Those tiny chat windows are a usability disaster. Come on. Take a cue from messenger.com!

</comment><comment><USER16> This might actually be _slower_ than my current solution for hangouts, which is to open an empty circle in Google+. (If I open the Google+ home page, I see lots of social feed activity that a) I don't care about and b) takes a while to load.)

I'm often behind a slow public-wifi network and restricted on battery, so the amount of bandwidth and CPU used just to get me to text chat is actively a problem. I miss the XMPP days.

<comment><USER17> > I mean the XMPP days.

oh XMPP, you mean the protocol that required a TCP connection, and thus battery-draining maintaining a persistent connection ?

I was an XMPP enthusiast. Sadly, it never made the jump to mobile properly. I wish they had amended the standard to to add a session manager that would work well with mobile. Instead, last I check, everyone implemented their own hack. Google first, with Android GTalk. They used ProtoBufs [1]

Hey, did you know WhatsApp was based on XMPP? Yeah, good luck using that with an open client: their terms of service allows them to kick you off for using an unofficial client.

[1] I've come to think ProtoBufs would make a perfectly good transport for a hypothetical XMPP2. It's better packed, can be better framed, and as far as I've glanced allows the same extensibility as XML gave XMPP.

<comment><USER16> > oh XMPP, you mean the protocol that required a TCP connection, and thus > battery-draining maintaining a persistent connection ?

I ran my XMPP client on a UNIX server, to which I connect using mosh. As it happens, I tend to have this mosh connection open all the time to do actual work, so there's no additional overhead from running an XMPP client remotely.

(Still, there's no particular reason that a persistent though quiet TCP connection needs to drain battery any more than any approach; a TCP connection can stay open indefinitely without traffic if nothing in between the applications decides to time it out.

There might be complications on actual mobile platforms like phones, if your platform's push notification system does abstraction-crossing magic with the cell networks, such that you can shut down your data connection entirely until it needs to be woken up. But my use case is a laptop, so a constant IP connection is assumed.)

<comment><USER17> I'm a geek too, but I think a time comes when we have to recognize that these kind of roundabout solutions, while fun and a testament to the flexibility of our systems, won't cut it if you want your protocol to take over the world (which the XMPP community was tongue-in-cheekily aiming for in the mid-00's).

And besides, I was trying to focus the discussion specifically on mobile, which is the major platform today.

I'm really disappointed with the new babel that has emerged in the mobile chat world.

<comment><USER16> Yes, that's absolutely fair. As a more general solution, you _could_ build a very lightweight mobile app or website that used a server as a relay, and whose interface involved only minimal JS (enough to long-poll or similar) -- but only if you could implement the client part of the relay. XMPP would have been an obvious way to do that, but even a documented web protocol would work fine.

</comment></comment></comment></comment></comment><comment><USER18> The UI design is terrible. There are two sets of buttons to perform exactly same action.

<comment><USER3> That's not necessarily bad. It just means someone thought that it was more important for the interface to be easy to discover than it was to keep it clean.

In my opinion a good IM system needs to be both easy (as it targets a mainstream audience that needs to voluntarily adopt it, a trouble that MS's offerings never had) and powerful (as it quickly becomes a big part of your day to day). Not the easiest tradeoff to design to.

The clear upper hand granted to the former in this product release is pretty telling of Google's conundrum: they need to gain adoption over everything else.

</comment></comment><comment><USER19> On a side note, I don't get why Hangouts Dialer has to be a separate app from Hangouts in Android

<comment><USER20> So that carriers can blacklist it.

</comment></comment><comment><USER21> Ha. We just added the Hangouts interop gateway to Sameroom ([https://sameroom.io/blog/announcing-support-for-google- hango...](https://sameroom.io/blog/announcing-support-for-google-hangouts/))

</comment><comment><USER22> It is perfect.

The most annoying problem with Hangouts is that I have to load the whole Gmail tab for answering a single message on my laptop. This tool is a lot faster. I zoomed to 125%, adblocked the bing background image & the now cropped giant greeting.

</comment><comment><USER23> Anyone else getting a 500 error?

All I see when I visit is

500\. That's an error.

There was an error. Please try again later. That's all we know.

<comment><USER24> That is also all that I am getting.

</comment></comment><comment><USER25> Sweet, now I don't have to keep Chrome around for Hangouts on OS X.

<comment><USER26> Are you being sarcastic?

This is the same, rudimentary "interface" that has always worked in all the browsers. :/

<comment><USER25> I used to use the Hangouts Chrome app but I will be using this now instead.

<comment><USER26> You know that this interface was available in GMail and G+ since Hangouts first launched, minus the "pretty background", right?

</comment></comment></comment></comment><comment><USER27> Nicer interface, but have they done anything about power consumption? Would like to be able to run a 30 minute hangout without completely draining the battery on my Macbook Pro.

<comment><USER3> I gave you an issue-tracker-spirited upvote for this. Pretty much the only reason I still put up with Skype.

</comment></comment><comment> TD-Linux It still requires a proprietary NPAPI plugin on Firefox, sadly.

</comment><comment><USER28> Just wanted to chime in that I strongly dislike the new facelift to hangouts for Android. Loading images in the chat cause it to stutter pretty hard on my Nexus 5.

</comment><comment><USER29> still no way to sort online, away and offline contacts like the old tried and proved chat interface. Pass

</comment><comment><USER30> On Windows 10, still fails to respect both Hangout's own sound settings for speaker/mic as well as the Windows configured default communication device. So while I like this interface better, any number of other services I use (e.g. Zoom, Skype) just work better with my devices. Those other services can switch to using my bluetooth headset on calls and similar.

Google really is a technology company, not a products company. They have some really very clever ideas and implement them with great mediocrity more often than they should. And even when they get something solid, you can never really tell for how long the product will last or if they'll start screwing with it.

For me, the only things that really come to mind as solid are maps and search. Google Now, great... if you don't have a Google Apps account. Inbox, great... if you don't need a bit slightly sophisticated formatting or image support. etc.

<comment><USER31> Are you using chrome? I ran into the same issue (wouldn't respect audio settings) plus it burned 100% cup on all four cores and the audio kept breaking up. It turns out that IE 10 is good for something! Not only do the hangout plugin audio settings work but the sound itself works (no more disrupted streams) and cpu hangs out around 50% across 4 cores. Much better!

<comment><USER30> Yep. Using Chrome. I don't see the high CPU or the audio issues aside from respecting the settings though. Maybe I should give the other browsers a try! Thx!

</comment></comment></comment><comment><USER32> With gchat I can see who is on an android device, and who is idle (even both). Can't with hangouts, why is that? Why give end users even less information?

</comment><comment><USER33> It does not compete well with messenger.com

</comment><comment><USER34> Does anyone else have video hangouts cause Mac OS X to completely go jet turbine 100% cpu usage?

</comment><comment><USER35> I have the browser extension Disconnect enabled, and it stops that page from functioning.

</comment><comment><USER36> Sure, it looks fine. Would love SMS integration though

<comment><USER37> and picture messaging too

</comment></comment><comment><USER38> Is that the Gmail UI re-themed?

</comment><comment><USER12> Ok, I'm game! Join me:

[https://talkgadget.google.com/hangouts/_/g7qn5tqae6r63h7curf...](https://talkgadget.google.com/hangouts/_/g7qn5tqae6r63h7curf5wujyiua)

I've always wondered why it was so friggin' hard to start a hangout.</comment>


Functional Imperative Programming with Elixir (2018) - <AUTHOR> https://bitwalker.org/posts/2018-03-18-functional-imperative-programming-with-elixir/ <comment><USER2> Fun to see someone make a complete while-loop macro. Occasionally I get tempted to make one, but almost always find it's better to rethink a while loop into a Stream or just a for loop if possible to keep my logic in-place.

Take:

        while(fn -> Node.ping(some_node) != :ping end, 30_000)

Could be written:

        Stream.unfold(:pang, fn
           :pang -> {:some_node, Node.ping(:"some_node")}
           :ping -> nil
        end)
        |> Stream.zip(Stream.interval(1_000))
        |> Stream.take_while(fn {_, ts_cnt} -> ts_cnt < 30 end)
        |> Stream.run()

Which in Python would probably be something like (not using the Walrus, and made up system lib names):

        node_response = Node.ping("some_node")
        start_time = Time.millis()
        while node_response == "pang":
           node_response = Node.ping("some_node")
           if Time.time() - start_time > 30000:
              break
           Time.sleep(1000)

The Python version is pretty simple, but really isn't any shorter. It also intertwines the timing logic and node ping actions. Although it takes a bit of practice to become fluent with the stream approach, it's much more compose- able. Take the example in the article where you end up wanting to run a bunch of functions with a timeout on some interval, you can cut the middle 2 lines into a new function in a utility library. Then you could rewrite the code like (notice it's just cutting and pasting complete lines):

        Stream.unfold(:pang, fn
           :pang -> {:"some_node", Node.ping(:"some_node")}
           :ping -> nil
        end)
        |> MyUtils.with_time(max: 30_000, every: 1_000)
        |> MyUtils.log_max_ping_count()
        |> Stream.run()

Usually re-writing something into this form makes me think of many programming tasks as a set of discrete steps. Do the first stream, then add the second step, and so forth. This tends to make it easier to dive back into code after a while as each step has to be incremental. Also a side note, if you _really_ want to cheat and need to use a mutable variable, you can use (abuse?) `Process.get/1` and `Process.put/2` with a for-loop. CouchDB uses a similar idea to create stateful iterators if I recall the code correctly.

<comment><USER3> Good points! The time where the `while` loop is actually better is very situational, but when it is a better fit, it is definitely handy to have in your back pocket. But more generally I just think it is useful to know how you can implement language constructs like this in Elixir with nothing more than the primitives it provides, some macro glue, and a bit of creativity :)

A couple things though; one issue with your first example is that you incur a 1s wait for either success or failure conditions, where what you typically want is for only the failure condition to impose that cost. Luckily, you can keep this approach and fix it by removing `Stream.zip(Stream.interval(1_000))` and replacing it with `Stream.intersperse(Stream.interval(1_000))`.

The other problem though is that you end up incurring quite a few additional function calls vs the `while`, since the `while` inlines the predicate and associated machinery. You end up with precisely one function call per iteration, with the ability to exit early on failure or timeout, whereas the function-based form is going to incur potentially several function calls, depending on how the `Stream` is being constructed - if I recall implementation details correctly, your first example would be a minimum of 3 calls per iteration; one for the unfold, one for the interval, and one for the take_while.

Of course, that's all really just optimization, and your `Stream` based solution is perfectly fine in general. The only additional benefit (IMO) to the `while` form, is that it reads very succinctly, and due to most being familiar with imperative constructs like that, they can read it with virtually no effort, where reading the `Stream` form takes some care to understand what you get at each step, and what it produces in the end.

RE: Mutability, I think I mentioned it in the post, but I really didn't want _actual_ mutability, just the appearance of it. So while one could use the process dictionary, or ETS, or even another process, to get something like "real" mutability, that kind of defeats the point ;)

<comment><USER2> It was a good read! Especially since you went through all the details. Handling different inputs and alternates like `after` are a bit tricky. And you're right on the downsides of the "stream" style. There's a bit of overhead compared to the macro form which can inline things a bit. It also takes a couple of more "cognitive" cycles to write, but usually I can read the results more quickly later.

In general I do wish Elixir provided a `reduce` macro similar to the for-loop one with the ability to halt. While-loop logic is easier to refashion as a reduce but it's harder to recall the argument orders for various Enum.reduce forms.

Do you use this while-macro in production code or just test code? Yah the "real" mutability tricks are more for those wondering if you _can_ do it. Sometimes it's not obvious, but one of the nice things in BEAM is that you can cheat.

P.S. thanks for all of your Elixir tools!

<comment><USER3> > Do you use this while-macro in production code or just test code?

I use the `while` macro in the Distillery tests, since it made expressing certain tests much less verbose - namely those dealing with building up a release, spinning it up in a new node, and then verifying conditions on the running node meet expectations. In general though, I don't. I haven't needed it elsewhere (well, I have one other library I have considered using it in, but haven't yet). I would be hesitant to introduce it without a clear need, just because it would likely catch other developers off guard unless clearly documented.

To be clear though, I would support something like it in the language, but also understand why it isn't there; there just isn't a clear enough need, and as you've demonstrated, `Stream` can more or less be used to cover the general cases.

> P.S. thanks for all of your Elixir tools!

Thanks for the kind words!

</comment></comment></comment></comment><comment><USER4> Imperative Programming in Haskell with Python and JS comparisons: [https://beuke.org/pure-imperative-haskell/](https://beuke.org/pure- imperative-haskell/)

</comment><comment><USER5> I think this was a fantastic blog post that really showed off the power of macros. It's the one area of Elixir I haven't tried to delve into. Being able to see the author's thought process really helped me understand what was happening too. Kudos!

<comment><USER3> Thanks! I don't write very often, since I don't really know if people get anything out of it, but feedback like this is definitely encouraging :)

<comment><USER5> I need to start writing too. I just subscribed to your RSS feed.

</comment></comment></comment><comment><USER6> Haskell has monadic loops ([https://hackage.haskell.org/package/monad- loops-0.4.3/docs/C...](https://hackage.haskell.org/package/monad- loops-0.4.3/docs/Control-Monad-Loops.html)):

        let limit = secondsToDiffTime 60
        start <- getCurrentTime

        iterateUntil id $ andM
          [ someApplicationLogicReturningBoolean
          , do
            now <- getCurrentTime
            return $ (diffUtcTime start now) >= limit
          ]

This is a really rough sketch from someone who just looked all this up, of course :-)

Recursion is probably still much more natural here.

</comment><comment><USER7> Seems quite complicated. Why not just use while-loop? :-)

(in other words a language which provides it)

<comment><USER8> Or just use recursion?

But hey, this article is an interesting way to get around that!

<comment><USER3> Well, I pointed out at the beginning that one can use recursion, and the implementation of the `while` construct itself uses recursion as well (in fact, you can't implement `while` without it in Elixir).

In any case, expressing the equivalent of a `while` loop with predicates and timeouts is quite syntactically noisy in Elixir - it is certainly doable, but much less clear than the imperative equivalent.</comment></comment></comment>


I'm An Article About The Internet That You Repost On The Internet - <AUTHOR> http://www.newyorker.com/humor/2012/05/14/120514sh_shouts_wayne <comment><USER2> It used to be that the vast majority of media was controlled and shaped by very few people.

The internet is gradually changing that.

It's a pretty big deal. The internet is simultaneously an incredibly powerful publishing/distribution platform, and an incredibly powerful consumption channel.

So, take the title:

> I'm an Article About the Internet That You Repost on the Internet

It could be said, "I'm an Article About [Internet Consumption] That's [Published and Distributed on the Internet]"

Which suddenly comes across a lot less witty and clever.

Yeah, the internet is a big deal. People are going to keep talking about it. And the trivial noise? That was around before the internet; it's just no longer in the hands of a select few publishers/distributors.

<comment><USER3> It's not critical about publishing on the Internet. The article is about Internet publishers' obsessive infatuation about the meta aspects of Internet publishing. I think your reply is a good exhibit on that subject.

<comment><USER4> Old media discovers internet feedback, becomes introspective, publishes introspection.

Perhaps the self-referential pieces begin to reach past introspection? Here are some others:

[http://www.guardian.co.uk/science/the-lay- scientist/2010/sep...](http://www.guardian.co.uk/science/the-lay- scientist/2010/sep/24/1) This is a news website article about a scientific finding

<http://faultline.org/index.php/site/item/incendiary/> This is the title of a typical incendiary blog post

<https://www.youtube.com/watch?v=YtGSXMuWMR4> How To Report The News

</comment></comment></comment><comment><USER5> Here's the _real_ meta/synecdoche subtext:

>oh, Jesus, I once had dreams of being a Pulitzer-winning series about Congo. How did I end up on the bullshit-tech-story beat?

</comment><comment><USER6> I wonder if Teddy Wayne could have requested that this article be posted without all of the Tweet/Like/etc at the top. The inclusion of these buttons both hurts the point that he's making while ironically explaining why online media has become such a vacuous echo chamber.

<comment><USER7> How many people will have read it and decided _not_ to use those buttons for some fear of proving the article's point?

> _Just post me and pretend like you personally did something good. When's the > last time you volunteered or even gave money to a homeless person_

Ideally, this would be a really cynical comment. Sadly, it is not.

</comment></comment><comment><USER8> I really like that the low brow look-at-my-cute-cat culture is taking over. You see, culture should travel up too.

All this "hi-brow" stuff is just manipulation or rehashed manipulation and narrative control coming down from the even "higher brow" newspapers, research institutes and political organizations. Most people wouldn't give a crap about most of it if it wasn't for their petite bourgeouis, keeping up with the "smart" people desire for acceptance or "what should I worry about today that has absolutely no effect on my life?" news junkie syndrome.

</comment><comment><USER9> This is the title of this story, which is also found several times in the story itself.

<http://consc.net/misc/moser.html>

(It's been said before.)

<comment><USER10> This is a sentence. That fragments. Useful device.

</comment></comment><comment><USER11> I am reminded of a comment tree I participated in back on Reddit several years ago [1]. I guess at a certain size all organizations have to have a meta discussion about themselves.

[1] [http://www.reddit.com/r/WTF/comments/9j8vh/i_was_at_work_the...](http://www.reddit.com/r/WTF/comments/9j8vh/i_was_at_work_the_other_night_when_i_ran_across/c0czm9m)

</comment><comment><USER12> I can't help but feel that the author could've saved himself the time and effort and just posted a link to the Wikipedia page for the "Tragedy of the Commons" instead.

Here, I'll help: <http://en.wikipedia.org/wiki/Tragedy_of_the_commons>

</comment><comment><USER13> If HN understood this article they would have buried it by now.

</comment><comment><USER14> hee. I do wonder just how much innovation is being stifled in terms of time- wasting and demoralization by the hype-machine. I don't mind articles about apps or new techs, but I'm about getting my fill of the incessant stream of news about funding, VCs, i.e. the "business" of startups...and that's not to mention the umpteenth post about how your startup isn't lean enough if you don't validate your idea or do A/B testing.

</comment><comment><USER15> I don't think we need to get all defensive about this. Yes we overtweet, share, retweet, 'like', etc, and we love how self-aware we all are. Good point, Teddy Wayne. Now, what suggestion do you have as an alternative to offer?

Ah, I thought so.

</comment><comment><USER16> I was hoping this was written by machine.

<comment><USER10> Wait ... is that in reference to the article ... or your own post ;-)

</comment></comment><comment><USER17> May 14, 2012? Am I in the future now?

<comment><USER18> I think it's the date of the printed edition of the magazine.

</comment></comment><comment><USER19> I can't upvote this enough.

</comment><comment><USER20> And so here's a comment on the internet about the article on the internet that is about the articles on the internet that are reposted on the internet that was reposted on the internet.

 _this post has been brought to you by the court of King Caracticus and the letter 'j'_

</comment><comment><USER21> I'm a Journalist Trying To Come To Grips With Technology That Is Making My Profession Irrelevant

<comment><USER22> Technology is making good journalism irrelevant only to those who have no attention span or don't read.

The internet crushed distribution, but nowhere has it eliminated the demand for great writing. If anything, that need is greater now than ever.

<comment><USER23> I can't agree with you more than I do. Good writing and journalism is more important than ever but it is completely missing. Blogs are mostly crap, successful online news generally consists of fluff pieces and most actual news is repeated and retold to the point of being a muffled meme.

Page view driven journalism is taking us down a dark path. I would not be surprised if George Takei and Ashton Kutcher are the premier sources of online information for most people in 5 years. Good writing is not required for a large number of page views.

<comment><USER22> > _"Blogs are mostly crap"_

Most of my friends and family can't distinguish between a real website/blog and an SEO, ad-driven site with computer generated text.</comment></comment></comment></comment>


Vladimir Voevodsky, Revolutionary Mathematician, Dies at 51 - <AUTHOR> https://www.nytimes.com/2017/10/06/obituaries/vladimir-voevodsky-revolutionary-mathematician-dies-at-51.html <comment><USER2> I was somewhat sad when this wasn't covered by main stream media. So I'm glad they are fixing that.

</comment><comment><USER3> Also check out John Baez 'In Memoriam' post [https://johncarlosbaez.wordpress.com/2017/10/06/vladimir- voe...](https://johncarlosbaez.wordpress.com/2017/10/06/vladimir- voevodsky-1966-2017/)

</comment><comment><USER4> > he changed the meaning of the equals sign.

Into what?

<comment><USER2> It's closer to the idea of a constructor of an object.</comment></comment>


Pushback against Saudi funding endangers Silicon Valley valuations - <AUTHOR> https://www.epsilontheory.com/funding-secured/ <comment><USER2> Whether this murder-scandal blows over or not, it makes the case for a random "one-damned-thing-after-another" version of history.

One day, the real-politic thing works. All money is green. A feudal monarchy makes a fine ally. The next it isn't, it doesn't. The next day, one little murder in the journalist persecution capital of the world threatens to blow up the entire alliance, military, political & economic.

Saudi Arabia's had an erm.. "eventful" power transition (MBS') but it isn't _fundamentally_ different. It's a monarchy in the real, undiluted sense. Laws and courts are mostly religious. There are no rights, on paper or in practice. No freedom of speech, affiliation, religion or concious. No pretense of these either. Religion & Monarchy share power with eachother. Neither are bound by rule of law or by the people in any way.

Are these barriers to alliance, trade or investment? Whatever your answer, I don't see what Khashoggi's murder changes. Yet, this murder (or some other catalyst event, if this blows over) _can_ change everything.

It really does seem like random chance.

<comment><USER3> > A feudal monarchy makes a fine ally. The next it isn't, it doesn't. The next > day, one little murder in the journalist persecution capital of the world > threatens to blow up the entire alliance, military, political & economic.

Just like selective law enforcement is a tool used to oppress and exert power so is selective outrage used to drive public opinion.

There is something odd about this case. It is a terrible crime of course and should be condemned. But it seems we went from the head of Interpol disappearing in China and everyone not caring much, to let's start a war with SA over a journalist most people haven't heard of before. Something is unusual and I feel there is more to the story and more to the motivation to push the story at this point in time.

<comment><USER4> Is Russian bot-net spreading and inciting outrage through millions of fake accounts in order to destabilize SA in the Middle East roaming too far into tin-foil-hat theory?

<comment><USER5> Not tinfoil hat stuff, but not a particularly good strategic move for Russia.

SA-Russian relations have been strained by Syria, but they've actually improved substantially since mid/late 2016. MBS was in Moscow talking military issues in May 2016. And in September SA signed an agreement with Russia to limit oil production, widely seen as a major win for SA and OPEC more broadly. At the time, MBS explicitly told the _Washington Post_ (of all papers) that he intended to coordinate with Russia to encourage them to move their regional focus from Tehran to Riyadh.

In 2017, they followed that up with a massive three-part contract selling Russian weapons to SA, committing Saudi money to energy investments in Russia, and bringing Russian petrochemical plants into SA. Later in 2017, the Saudis started pressuring the US to drop sanctions on Russia over Ukraine.

Saudi/Russian relations aren't perfect, but they've improved substantially. And more importantly, the improvement is heavily tied to MBS personally and his new direction for the country.

Meanwhile, Turkey is heavily pushing this story via the Istanbul consulate angle, in what's generally described as an attempt to destabilize a regional competitor and personally undermine MBS and his new direction. (Turkey likewise has strained-but-improving relations with Russia thanks to the work of its new strongman leader.) Depending on who you listen to, some of the extended Saud family is _also_ advocating for this to become a crisis in order to oust MBS and return SA to its older positions.

So I can't really see what Russia gains from striking out at SA now, especially via a line that does less to weaken the country and more to weaken a specific leader who's been more friendly to Russia than his predecessors. This looks like a regional spat between two states Russia has been courting, plus an internal fight on which Russia sides heavily with MBS.

</comment></comment></comment></comment><comment><USER6> I had a few lectures with Professor Ilya Strebulaev from Stanford GSB back in 2016.

[https://www.gsb.stanford.edu/faculty- research/faculty/ilya-s...](https://www.gsb.stanford.edu/faculty- research/faculty/ilya-strebulaev)

He wrote a few articles.

1)How much VC drives the US economy(October,2015): [https://www.gsb.stanford.edu/insights/how-much-does- venture-...](https://www.gsb.stanford.edu/insights/how-much-does-venture- capital-drive-us-economy)

2)Unicorns are overvalued(May,2017): [https://www.gsb.stanford.edu/insights/silicon-valleys- unicor...](https://www.gsb.stanford.edu/insights/silicon-valleys-unicorns-are- overvalued)

In class in 2016 Ilya Strebulaev(who has arguably the best VC dataset in the world) stated that 92% of VCs surveyed believed unicorns were overalued and a correction was likely.

He also told our class a very memorable and self effacing story of how he placed a bet with a colleague for a bottle of nice wine on the future date of bankruptcy of GM.

In order to win the bet, the GM bankruptcy had to occur prior to X date.

GM's bankruptcy was date X+1, thus losing the bet.

A lesson on timing. Even when you're "right", you can be wrong.

Perhaps a Saudi assassination "string" pulled too hard for too long could see a cascading effect.

It's inevitable we will see a correction in valuations.

But I also think it's pointless to fear it.

That time is better spent building a sustainable business on a fair valuation with more challenging access to capital.

YC's suggestion for YC Batch(as well as all other) startups to be careful with not accepting money and scaling a startup at excessive valuation sounds like a solid one in this climate and the likely future.

<comment><USER7> > GM's bankruptcy was date X+1, thus losing the bet. A lesson on timing. Even > when you're "right", you can be wrong.

Anyone who has tried their luck at day-trading has learned their lesson, i.e. "The Market Can Remain Irrational Longer Than You Can Remain Solvent".

<comment><USER8> Plus once politics becomes involved, economic rationality goes right out the window. There's no way to reliably forecast that.

</comment></comment></comment><comment><USER9> "endangers"

So you mean just founded startups with no revenue won't be valued at millions of dollars out of thin air then?

<comment><USER10> It will mean ALL companies will be valued at less because there will be less money being thrown at these companies. Saudi money is all over silicon valley and early stage tech companies.

<comment><USER11> So in the name of higher valuations we should accept criminal money? Interesting thought.

<comment><USER12> >criminal money

First of all, it's Silicon Valley. Check your ethics at the door.

Secondly, it's not illegal if it's not against the laws of a country (and in this case, if the crown prince of a monarchy orders something, that's as close to legal as it gets). You could say that it's immoral, but that's a different statement, and you shouldn't conflate "illegal" with "immoral".

<comment><USER13> >First of all, it's Silicon Valley. Check your ethics at the door.

Flip or not, this is gross.

Calling a murder not a crime because a king decreed it is mind boggling. You shouldnt conflate "illegal" with "criminal".

<comment><USER12> If a king decrees it inside an absolute monarchy, it's not a crime. That's literally how absolute monarchies work--the monarch has absolute and unaccountable power.

Edit: if you disagree, please tell me why.

<comment><USER14> I disagree because positivism is not the smartest legal theory in my view. We all know Godwin's law, but nazi crimes is probably the best example of how something done by people with absolute power was considered and persecuted as a crime.

</comment></comment></comment></comment></comment></comment></comment><comment><USER15> That headline makes it sound like a bad thing... yet many are concerned that valuations are inflated. So perhaps this is a blessing in disguise?

<comment><AUTHOR> To the extent that rich valuations are propped up by Saudi money, I think it's a great thing for them to come back down to earth.

<comment><AUTHOR> And speaking more broadly, I don't subscribe to the "higher valuations and asset prices == better" ideology, so the headline didn't read in a negative way to me. :-)

<comment><USER16> Raising at a high valuation means more money for less dilution. Sounds good for the founders and maybe "good for America" too to me.

<comment><AUTHOR> That depends on who's ultimately left holding the bag on the inflated valuation, and how much it attracts additional capital to potentially be wasted in a marginal business.

</comment></comment></comment></comment></comment><comment><USER17> Everybody's known this regime is dirty for decades now.

Worst case is they replace MBS because he's so tainted and draw a line under this incident.

They can go back to dropping American and European munitions on school kids in Yemen and the world will go back to turning a blind eye.

<comment><USER18> Difference is the world, and particularly the USA, doesn't need Saudi oil to quite the same extent as previously.

Perhaps now they don't need to be the West's principle ally in the region, or given a free pass on every human rights abuse.

<comment><USER19> It's not about the oil itself (US has plenty and can import from Canada) but the control of the price and that oil is traded in USD.

The US has started multiple wars to prevent the oil price from being traded in another currency.

<comment><USER20> I'm not sure this makes any sense - there's no benefit to using USD for the pricing if the contract is settled outside the US, and there are RMB- denominated oil futures available. Ironically as a result of sanctions on Iran, which _isn 't allowed_ to trade oil through any institution connected to the US. [https://www.cnbc.com/2018/05/16/iran-oil-trumps-sanctions- cr...](https://www.cnbc.com/2018/05/16/iran-oil-trumps-sanctions-create-crude- trading-boom-in-china.html)

<comment><USER21> There is a seignorage advantage, in that people need access to USD. It's definitely a big advantage, and it provides a nice base of support for USD.

But the US is definitely not starting wars over it.

</comment></comment></comment></comment></comment><comment><USER19> Other than what we read in the news, is the information of who invested in what startup public information that can be found somewhere or can these investors be kept private?

I think it would be neat to have a list and map of for example the top 50 SV startups and where their money is coming from.

<comment><USER22> It would be great to use Wikidata for that. It's already possible to add a list of investors ([https://www.wikidata.org/wiki/Property:P1951](https://www.wikidata.org/wiki/Property:P1951)) to companies (like Uber: [https://www.wikidata.org/wiki/Q780442](https://www.wikidata.org/wiki/Q780442)). And then map all these startups using [https://query.wikidata.org](https://query.wikidata.org) (it would be pretty easy to highlight the % of shares by countries / regimes, etc and point out the financial vehicles / intermediaries used for that).

</comment></comment><comment><USER23> There are "bad people" throughout the startup investment ecosystem, including but not limited to:

* just plain jerks

* serial harassers, misogynists and the like

* supporters of various evil/hateful politics

* white-collar criminal/fraudster types

* straight-up mob, american, russian, or other

* nation-state actors with very dirty hands like KSA

Making ethical decisions about who you are willing to work for is a routine part of working in startup world... and you're never done, because surprise! You may have an even harder decision to make after that Series B closes with new investors!

</comment><comment><USER24> LOL, this is so naive point of view. When that much money is involved nothing will change. There might be some ephemeral change, some PR campaign, sad nods, sad words, some companies might be rebranded etc. But unfortunately at the core nothing will change, this is sad, harsh and grim reality but when that much is at stake life of one man is not enough to tip the scales.

</comment><comment><USER25> What makes this journalists blood worth more than all those murdered in Yemen or the victims of SA's overt or covert terrorism?

<comment><USER26> Location and audacity. It was done in another sovereign country, one with string US and European ties, and which isn't currently in civil unrest.

Also, they practically took him into their embassy, killed him and then lied about it in the most haphazard way.

That represents a massive break from international status quo. Unfortunately getting involved in third-world civil wars and financing terrorist attacks is quite within the status quo.

<comment><USER27> Lest we forget.

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

This is not a massive break from the international status quo by a any means. The USA and all other nations have operated in a similar manner for a long time with equally gruesome outcomes.

If I recall the head of Interpol "disappeared" not long ago, and that little kerfuffle died away right quick.

Perhaps the reasons are more mundane.

1\. The Saudis got caught out by the Turks with the evidence. Which has been used effectively. The Turks have a lot to gain by seeing the alliance between SA and the US weakened. 2\. The senior leadership of SA can be more directly tied to this incident, as opposed to more common case where plausible deniability exists. Rookie mistake. 3\. There exists internal opposition to the leadership in the US and SA that find it convenient to escalate the profile of this issue for their own purposes.

This will blow over and business as usual will resume shortly.

<comment><USER28> The whole point of extraordinary rendition is to remove the target to another country to give some legal cover and plausible (hah) deniability to the subsequent interrogation / torture / what have you.

Murdering someone in your embassy (although technically your own sovereign territory) is a new low.

</comment></comment></comment></comment><comment><USER29> This article is admission from there VC community that valuations are basically price gouged as a function of available capital - with little, if any, scientific basis the them.

This was always evident from how badly unicorns have fared in the open market post IPO - but this is a direct admission of price gouging

</comment><comment><USER30> This can only be good, right? Less money means earlier IPOs and less dilution of founders and early employees?

I don't read many "More money needed to fund startups in Silicon Valley" headlines recently...

</comment><comment><USER10> First big victim appears to be virgin hyperloop one. SA pulled out of a planned $1 billion investment in the company.

There was also a planned $200 billion solar project that has also been scrapped.

<comment><USER31> Richard Branson said no to Saudi money after murder incident.

<comment><USER32> He should have been saying this since 9/11, but better late than never, I guess.

<comment><USER33> Give the guy a break, the US government itself cleared Saudi Arabia of culpability in 9/11 and reafirmed they were a regional ally.

</comment></comment></comment></comment><comment><USER34> With Softbank playing such a big role I wonder if there is some component of incumbents playing this up to try to curb the influence of Softbank ? (Iremember Sequoia raising 8 bil. fund specifically because they needed a more equal footing with Softbank).

<comment><USER35> > _With Softbank playing such a big role I wonder if there is some component > of incumbents playing this up to try to curb the influence of Softbank ?_

Playing what up? The fact that Silicon Valley and their new "hey, just stay private!" mentality was heavily funded by blood/oil money?

Is this actually news to people that Saudi Arabia has done terrible things? Or does it only matter now that there's been a scandal?

Well, thank God for the scandal, then.

<comment><USER34> The cynical part of me says it matters now because there are special interests that for one reason or another have an interest in reducing SA influence or want some concession from SA and in reality it has 0 to do with SA being a brutal absolute monarchy which it has being for a long time.

<comment><USER36> Be that as it may, it's good if being a brutal absolute monarchy is a liability you can be attacked for, even if those attacks only happen when there's someone on the other side.

</comment></comment></comment></comment><comment><USER37> It's going to be interesting to see where this goes. Techies have been up in arms about Google and China, Microsoft and the military. What about the Saudis and murder?

</comment><comment><USER14> I'm glad dear industry has noticed that Saudi Arabia is an authoritarian country with no respect to rule of law and human rights. I just fear that this awareness might not last for long: big money tend to cause dementia in tech.

By the way, once we're all here: China is an authoritarian country with no respect to human right as well, keep that in mind next time you read (or God forbid write) another fascinated article about Greater Bay etc.

<comment><USER38> Don't be quick on generalization.

China is not a democracy but they don't kidnap and murder people in foreign soil, and they don't bomb other countries. They don't also fund and promote extreme religion exportation, like Saudi Arabia does. Saudi is a net exporter of terrorism. If China really did all this, you would hear about thousands of Falun Gong followers kidnapped or murdered in USA or Canada. Or you would already have Taiwan and other countries like Vietnam invaded. Taiwan is a bigger pain point to China than Yemen is to Saudi Arabia.

<comment><USER39> > China is not a democracy but they don't kidnap

They do kidnap people. They've kidnapped people from Hong Kong, Vietnam, Myanmar, Australia and Canada. Some of these people confess to a series of crimes and in exchange pay fines or are sentenced to long prison sentences, or they are simply never heard from again.

They kidnapped a Swedish citizen from Thailand for having the audacity to publish a book critical of Xi Jinping.

Source - [https://foreignpolicy.com/2018/03/29/the-disappeared- china-r...](https://foreignpolicy.com/2018/03/29/the-disappeared-china- renditions-kidnapping/)

</comment></comment></comment><comment><USER40> Where's the pushback against Russian funding?

<comment><USER41> Russia is no longer the large funding source they were during the days in which a young Facebook was hoovering up their money. There's an actor ~50 times larger than Russia - and even worse on human rights - when it comes to venture capital.

Where's the push-back against Chinese funding? That money is sloshing all over the valley right now, nobody cares in the least. There are no protests, no outrage, no fake performances by politicians and business persons. They've routinely disappeared journalists, human rights workers, etc. over the last decade.

Most of the world is absolutely terrified to push back against China on anything at any time. There isn't a single major player in Silicon Valley with the nerve to stand up to China these days.

Saudi Arabia is a convenient target (and not in any manner undeserving of the negative response they're getting), that's all that is going on. The aggressively selective outrage, magically showing up now, is how you know it's shooting at something larger.

<comment><USER42> Morals are flexible when they're offering you $100 million or more. Mine would be. And it's not directly doing something immoral, just turning a blind eye to an investor's government's actions - like one would when working with a US based investor.

<comment><USER43> I don't think it's quite equivalent to compare a US investor to a Chinese investor. The Chinese government has proven to be quite involved in the actions of its citizens and has been making moves to nationalize their tech sector (They also have a long history of nationalizing other sectors).

While the US has meddled from time to time in private business, the rights of citizens to avoid such action are pretty well laid out. Can you imagine a Chinese company taking their government to court to refuse revealing customer data to the government like apple and other us companies have?

So I think you can easily ignore the actions of the US government while taking investor money. But taking Chinese money is essentially like taking money directly from the Chinese government.

</comment></comment></comment></comment><comment><USER44> Allow me a nitpick:

SA generally refers to South Africa. It's either KSA, or Saudi Arabia.

<comment><USER45> ZA is the ISO Code for South Africa. SA is the ISO code for Saudi Arabia.

<comment><USER44> Thanks.

My mistake. I leave it there, thoguh, to not break the flow.

</comment></comment></comment><comment><USER46> this does not change in any way my willingness to take money from softbank. they are an investor in my current company and i will be delighted to take them in the next.

i am really not sure why anyone would consider the interests of their company's fundraising strategy to be less important than that a certain investor has a large LP that is a country that had someone killed.

this will blow over.

<comment><USER47> Some companies can choose their investors.

<comment><USER46> and they will still choose them. on material things like terms and governance, as smart companies do. not on irrelevant things like this Khashoggi story.

</comment></comment></comment><comment><USER7> I'd feel bad if this were any other crew about to be gutted.

But with the Silicon Valley crowd - well now I know the true definition of scha·den·freu·de!

<comment><USER35> > _But with the Silicon Valley crowd_

Yep, the SV crowd thinks they're the enlightened ones, saving the planet. Between billion dollar valuations based on blood-money, the massive financial inequality and the state surveillance apparatus they built to put us in, I doubt the proletariat think too fondly of the place.

</comment></comment><comment><USER48> So in other words, tens of thousands of Silicon Valley tech employees at companies that took investment or could be bought out by a company that took investment from a fund that took investment from anything related to Saudi money stand to lose a trenemdous amount because the Saudis murdered someone? Yeah, sounds like those employees should definitely pay the price for something they had nothing to do with.

<comment><AUTHOR> Can it really be called "paying the price" or "taking a loss" if tech employees are losing ephemeral wealth which was dependent for its existence on the continued good behavior of a feudal autocrat halfway around the world? Just because a company reaches a certain valuation thanks to an infusion of dumb Saudi money doesn't entitle it or its employees to that valuation in perpetuity. Perhaps _that_ valuation is the mistake, now in the process of being corrected.

<comment><USER49> I work in tech, and threads like these make me eager for a crash.

<comment><USER48> So you're self destructive?

<comment><USER49> You're a benefit-at-all-costs kind of guy?

<comment><USER50> I think this is just an early stage of the "fuck you, got mine" mindset, where OP can't quite plug his ears yet...</comment></comment></comment></comment></comment></comment>


Show HN: Hrddt – Client-side Reddit thread/post to audio podcast conversion - <AUTHOR> https://hrddt.com <comment><USER2> Beautiful! an option to make use of wavenet api would make this 100w better.

</comment><comment><USER3> this is cool, but needs an audio speed option.</comment>


Ask HN: Why do big companies like Google think that... - <AUTHOR>

Why do big companies like Google think that programmers should work in openspace? <comment><USER2> cargo cultism</comment>


Wolfram Alpha Explains How Siri "Recommended" The Lumia By Mistake - <AUTHOR> http://searchengineland.com/with-fix-in-place-wolfram-alpha-explains-how-siri-recommended-the-lumia-by-mistake-121671 <comment><USER2> It's shit like this, Apple.

Sure, the cutesy "tee hee, aren't I clever" routine was cute when Siri first came along, but now that we're past that and moving into the real world of real use, Apple's self-serving editorialism undermines the whole thing.

We're talking about a platform that is widely held to represent the future of HCI. While there's no doubt that Siri is a technical marvel, we're still a long, long way off from a better world in terms of actual content. If I ask Siri what the best phone is on the market, I expect Siri to tell me the 'truth', not some banal "You're kidding right?" straight out of marketing. The specifics of how Alpha messed up their original algorithm aside, Apple's glossing over of these inconvenient truths doesn't bode well for the impartiality of Siri as a knowledge conduit.

Imagine if Safari automatically re-wrote web content that was critical of Apple, or if it simply put a giant black 'Redacted' overlay on top. There would be riots in the street (or on Twitter). I don't see Siri's editorial stance as any different; you're either a conduit for information or you're a spin doctor. You can't be both.

</comment><comment><USER3> This is one of the reasons why I think the prognostication about Siri taking over the world is silly. Voice UIs have to chop down the amount of information by necessity. In cases where there are close finishes for the ranked results, or the heuristic for selecting the top result is faulty (as in this case), or if divining the truth from the raw data requires a human's interpretation, it comes up short.</comment>


Elon Musk discusses an electric jet - <AUTHOR> https://futuristech.info/posts/video-elon-musk-could-electrify-the-world-again-with-an-electric-jet <comment><USER2> Elon's not superman. His insight and visionary ability to execute comes from something very simple: he reasons from first principles instead of by analogy, and he avoids cargo cult thinking.

If there is X amount of energy in a battery and it takes Y amount of energy to do Z, then Z ought to be able to be electrified... and so on.

It ain't rocket science. :) Unfortunately this is not how most people think or are taught to think. Most people look at what other people already do and reason by assuming superficial similarity as indicative of underlying similarity.</comment>


Facebook's Pixel Code broken? - <AUTHOR> A gent in marketing sent me this code to embed in one of our websites (I've redacted the FB ID):

        <!-- Facebook Pixel Code --> 	<script> 	!function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod? 	n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n; 	n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0; 	t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window, 	document,'script','https://connect.facebook.net/en_US/fbevents.js';);

        fbq('init', '<!--FB CODE REDACTED-->'); 	fbq('track', "PageView");</script> 	<noscript><img height="1" width="1" style="display:none" 	src="https://www.facebook.com/tr?id=<!--FB CODE REDACTED-->&ev=PageView&noscript=1"; 	/></noscript> 	<!-- End Facebook Pixel Code -->

 It's causing Chrome to report a syntax error for the rogue semi-colon towards the end of the packed function. Surely this is going to cost someone a lot of money today? I got him to recreate it a couple of times with the same result. Am I missing some cunning trick? <comment><USER2> Seems to me, this might be a good question for StackOverflow because the gamification incentives and intersted expertise are better aligned with the nature of the problem.

Good luck.</comment>


Ask HN: How to launch, all-in or steady stream? - <AUTHOR>

We'll be launching our SaaS product soon, and I was thinking of getting some opinions on the best way to launch. Do you think it's best to have an all-in launch, where you advertise on all relevant channels at the same time, or more of a steady stream made of smaller launches (eg. Launch one week on HN, one week somewhere else, and so on)? <comment><USER2> Probably you should read last Paul article on his blog, that will give you some insights.</comment>