Introducing Incremental - <AUTHOR> https://blogs.janestreet.com/introducing-incremental/?utm_source=rss&utm_medium=rss&utm_campaign=introducing-incremental <comment><USER2> Looks like really cool tech - at a first glance reminds me of the UI.Next reactive rendering model in WebSharper/F# ([http://www.websharper.com/docs/ui.next](http://www.websharper.com/docs/ui.next)) which also has an OCaml/ML heritage.

Have been thinking about using OCaml again for a new project - does anyone know the state of libraries for common web tasks, like AWS, these days?

<comment><USER3> I've been using OCaml to build a language and runtime system for cloud orchestration[0]. As part of that, I've developed an AWS library whose code is generated from the service descriptions published by boto. It will be open- sourced at some point in the future, along with a few other things that should make developing web stacks using OCaml much easier.

If you're looking to try out OCaml, I'd say the time to do so is quickly approaching.

[0]: [http://www.inhabitedtype.com/](http://www.inhabitedtype.com/)

<comment><USER4> I've been learning OCaml lately and I can't help but wonder (aside from the fact that it's an ML lang) why OCaml didn't capture the infrastructure tooling space and Go did. OCaml is so much fun to write, easy to reason about and has pretty good TLS/SSH libraries. Here's to hoping OCaml grows more!

<comment><USER5> Nobody ever accused OCaml of having good marketing and sexy websites (at least before ocaml.org). And for a long time, tooling was second fiddle (for instance, the existence of a package manager is a somewhat recent addition, and the least said about the standard library, the better).

<comment><USER6> Jane Street Core has to all intents and purposes solved the standard library problem. I admit I had my doubts in the past which one of Batteries or Core would be the "winner" so avoided them both and stuck with the default standard lib, but I think anyone starting a project today should start it on Core.

<comment><USER5> This may get better with the latest OCaml, but Core-powered binaries are ginormous. And AFAIK, Core doesn't work with js_of_ocaml (and I'm not sure if it works on Windows at all).

</comment></comment></comment></comment></comment></comment><comment><USER7> We've made something very similar for Java/Clojure as part of Quasar: [http://docs.paralleluniverse.co/quasar/#dataflow-reactive- pr...](http://docs.paralleluniverse.co/quasar/#dataflow-reactive-programming)

Every Var keeps track of the inputs that affect its computed value, and has an associated continuation responsible for carrying out the computation whenever an input changes (which, in turns, triggers recomputations further down in the graph).

</comment><comment><USER8> Could we have a more informative title? "Incremental" means little without context.

Maybe just "Introducing Incremental: self-adjusting computations".

</comment><comment><USER9> This sounds very similar to Kenny Tilton's Cells package for Common Lisp: [https://github.com/kennytilton/cells](https://github.com/kennytilton/cells)

I haven't had occasion to use Cells, but I'm glad to be reminded of it, as I may have a use for it soon.

</comment><comment><USER10> Does this have any similarity to Goldman Sach's internal language called Slang/SecDB?

<comment><USER11> Yes, and to several other similar systems, it's another reactive graph.

<comment><USER12> One distinction is that Goldman's SecDb graph is really optimized around offline derivative pricing and risk calculations, which has always been one of the core strengths of Goldman's quant platform. There is a slight distinction between reactive graphs used for those approaches v. those that are more targeted toward real-time online applications.

<comment><USER11> In the implementation yes, minimizing single-event latency and maximizing batch throughput are largely mutually incompatible. But from a user/API standpoint, there's little difference.

</comment></comment></comment></comment><comment><USER13> What is the difference between a "self adjusting computation" and a "genetic algorithm," or is it merely a choice of terminology? Here is a scholarly article that uses both in the same title: [http://link.springer.com/chapter/10.1007%2F978-3-540-87734-9...](http://link.springer.com/chapter/10.1007%2F978-3-540-87734-9_10#page-1)

<comment><USER14> It looks like a self-adjusting computation, in the sense that Jane Street and the paper they refer to uses, is similar to functional reactive programming. It looks like you can create observable values, and create observable computations on those values. The dependency graph is dynamic, which it appears is the improvement here over other FRP designs?

Genetic algorithms are a different sort of thing, and I can see how "self adjusting computation" could be used to describe either.

<comment><USER15> Functional reactive programming is not usually incremental, while self adjusting computations are not usually reactive, which is why there isn't much overlap between the concepts. Of course, you are free to mix concepts from both as you need to.

</comment></comment></comment><comment><USER16> I'm not familiar with OCaml, but this looks very similar to the reactivity model used inside web front-end libraries like Knockout, Vue.js - in which each "binding" in the template is essentially a self-adjusting computation that updates the DOM. In addition, the Tracker library in Meteor enables similar dependency-tracking computations across the entire stack. It's interesting to see this type of reactivity model used in different contexts.

<comment><USER6> You've got it backwards. This concept long predates the existence of the web, let alone JS.

<comment><USER16> I never implied which predates which. Read again.

</comment></comment></comment><comment><USER17> This reminds me a bit of Elasticsearch Percolate ([https://www.elastic.co/guide/en/elasticsearch/reference/1.6/...](https://www.elastic.co/guide/en/elasticsearch/reference/1.6/search- percolate.html)) a little bit.

</comment><comment><USER18> I would love to see an OCaml alternative to Prophet/MoSes using stuff like this...

</comment><comment><USER19> How is this different than lazy evaluation?

<comment><USER20> Quite different. To achieve the effects of "Incremental" you would need lazy evaluation coupled with a caching layer, so that successive calls to pure functions with same arguments are not re-computed. This optimization technique is in a sense similar to Common Subexpression Elimination.

<comment><USER19> Doesn't Haskell already do this? What is the advantage of OCaml + Incremental over Haskell?

<comment><USER21> Haskell does not do this. Haskell is lazy (computed results are shared), but Haskell does not memoize by default. To illustrate:

        func y = let z = y + y
                 in (add 1 z) * (add 1 z)

in `func` the result of computing `y + y` is shared because it has been given a name: `z`. However, the result of `add 1 z` is _not_ given a name and therefore has to be computed twice. Because Haskell is pure, they will result return the same result, however the result is not saved.

This avoids needing to save the results of _all_ function calls.

<comment> art-w That's a bad example, since GHC will perform common expressions elimination, which effectively give the same name to the two `add 1 z` (unless you specifically ask it not to, with `-O0`.)

Furthermore, Incremental isn't memoizing every function calls. It just keeps the intermediate results of the latest computation in memory, so that when the inputs change, it can determine exactly which subresults need a recomputation, and which can be reused. It's like Excel, but with dynamic dependencies.

(But yes, Haskell definitively does not do this. You could say that Haskell is about doing the least amount of work to compute something fresh, while Incremental is about working the least to _re_ compute something we (almost) already computed just before.)

<comment><USER22> A better example might have been

        func (f (add 1 z), f (add z 1))

Since f is not memoized it will be evaluated once for each component of the tuple.

</comment></comment></comment></comment></comment></comment><comment><USER23> Am I the only who could can't find the RSS feed for that blog? Pretty strange for a tech blog to only allow subscriptions via email.

<comment><USER24> I had no idea RSS was still expected... (Not trolling just surprised)

<comment><USER25> How else would you follow blogs? Do you visit 20+ blogs to see if they've been updated recently?

<comment><USER26> Not parent, but I visit about 6, yeah. What should I be using instead? Setting up RSS feeds seems like a pain.

<comment><USER27> feedly.com is fantastic. Not sure what's painful about setting up an RSS feed. Just paste the URL in once.

<comment><USER28> Agreed. A worthy successor to google reader.

Not having RSS is a pain. I follow blogs that update every couple of months. Do I want to keep checking? Hell no.

<comment><USER29> I use websec for a few such blogs, it emails me the content and even highlights the changed parts in the page.

It's a program I inherited after it was abandoned and did some maintenance on so I'm biased, I haven't updated it for a long while now and for a time even wrote a python alternative since I actually dislike Perl.

It can be found at [http://baruch.ev-en.org/proj/websec/](http://baruch.ev- en.org/proj/websec/)</comment></comment></comment></comment></comment></comment></comment>


Ask HN: Do I must have a preferred programing language? - <AUTHOR>

Currently I'm developing in Java,C# and Python, and I like all languages. I keep hearing useless debates about which language is better. Is it ok to enjoy all language and apperciate them? or it's like cheering up several sports teams? <comment><USER2> Yes, you have to pick one and make fun of all the others. Apparently you didn't get the card in the mail.

Seriously language wars are silly. I've used lots of languages in my career. Every language has its joys and quirks. Arguing about languages is a silly waste of time. I compare it to amateur vs. professional photographers: amateurs talk about cameras and equipment. Professionals study light and composition and take photographs. Amateur programmers talk about tools and languages. Professionals write good code in whatever language is required or best for the job. You won't be able to pick the language most of the time if you plan to work for money, so get used to learning new languages and appreciating them for what they are.

</comment><comment><USER3> Are you're saying it's wrong to cheer for several sports teams? ;)

Of course you can love all languages, just as you can love all foods, love all cities, love all... well, you get the picture.

Admittedly, some languages are harder to love than others, but all the ones with more than fifty users are doing _something_ right, even if it's just "running the critical software we wrote fifty years ago and don't have time to port"

And, as with sports teams, sometimes circumstances dictate that you declare your fanaticism for the local team and discreetly remain silent about any other teams.

</comment><comment><USER4> For a long time, I've held the opinion that once one learns to write programs, the choice of language dims away, it's just a codification of the program. One should use whichever is most appropriate for the task, and whichever he's most comfortable with.

Thus, knowing more languages, and actually enjoying most of them, with little to no bias, is a good trait to have, in my opinion.</comment>


Beautiful fixed-width fonts for OSX - <AUTHOR> http://monkey.org/~marius/beautiful-fixed-width-fonts-for-osx.html

<comment><USER2> Wow, this is the ugliest font I have ever seen. I do like the color-less syntax highlighting, though.

Also, Haskell looks nicer when you translate things like -> to →, \ to λ, and so on.

But really, both of these things would look nicer on high-resolution displays. When can I get a 1200dpi 24" monitor? (In the mean time, you can pry hinting and subpixel anti-aliasing from my cold, dead eyes. It's a necessity on the limited hardware that's currently available.)

<comment><USER3> +1

I agree; it's grossly wide and so thin as to be almost illegibly sparkly when it's black-on-white. I don't even want to imagine what this face would look like knocked-out on black.

There's also a good comment on the source page about distinguishing zeros and ohs, especially when coding.

</comment></comment><comment><USER4> I'd recommend Consolas.

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

OS X Install → <http://www.wezm.net/2009/03/install-consolas-mac-osx/>

With slightly more effort it can be installed on linux.

<comment><USER5> Or DejaVu Sans Mono: <http://en.wikipedia.org/wiki/DejaVu_fonts>

</comment></comment><comment><USER6> This makes me happy.

I tried to make 6x13 for OS X a while back: [http://fontstruct.fontshop.com/fontstructions/show/6x13_redu...](http://fontstruct.fontshop.com/fontstructions/show/6x13_redux)

Then I discovered the full set of characters (er, codepoints?) supported and pulled the emergency brake on that idea!

<http://rasher.dk/rockbox/fonts/misc/6x13-full.png>

<comment><USER7> Dominoes!

I know what my next pet-project will be.

</comment></comment><comment><USER8> My current favorite monospace font is Incosolata <http://www.levien.com/type/myfonts/inconsolata.html> It's an amazingly legible font and looks great and small and large font sizes.

</comment><comment><USER9> I use misc fixed in a smaller size on osx in mrxvt (in X11 of course). Anti- aliasing turned off. 256 color goodness in terminal emacs, yummy. This terminal is incredibly fast (especially with anti-aliasing off), it'll scroll through a big file in the blink of an eye. I dislike having to wait when massive input is scrolling through a terminal. I totally love this setup, only caveat is that I need to attach a mouse to be able to paste into x11.

Here's a link to my .mrxvtrc file <http://gist.github.com/277956>

</comment><comment><USER10> I like the monospaced font (I think it's called "Monospace") that comes with Gnome. And I have a version of Luxi Mono that has a dot in the middle of the 0 so that it's easier to spot it, but I haven't been using it much.

They are both Mac-friendly, AFAIK. Never tried to move them over to a Mac, but they do look good on Gnome/X.

Currently I am using "Envy Code R" as my monospaced font of choice.

And I would love to get screenshots of IBM's 3270 series terminals so I could draw that font as scalable fonts. I love its 6's and 9's.

<comment><USER11> Monospace under Gnome is, I believe, Vera Sans Mono. Apple ships a slightly tweaked version of this font in 10.6 as "Menlo."

<comment><USER12> I'll second the old IBM fetish. I spent so many hours on old IBM PC/RT terminals that I can't stand any other font now. It just _feels_ like a programming font. I even drew a mimic font for MS-DOS.

Vera Sans and Menlo are pretty close.

<comment><USER10> I never saw an RT face-to-face, but I spent a couple months daily in front of 3278s. Now I own a 3151 connected to a RS/6000, but it's not the same.

</comment></comment></comment></comment><comment><USER13> I switched over to the Bistream Vera family ( <http://en.wikipedia.org/wiki/Bitstream_Vera> ) since it looked decent and had bold/oblique for the monospace font. I also switched some of my other applications over to use the variable width fonts in the family for consistency.

</comment><comment><USER14> I've been a big fan of Droid Sans Mono for a while now. My preferred coding font: [http://damieng.com/blog/2007/11/14/droid-font-family- courtes...](http://damieng.com/blog/2007/11/14/droid-font-family-courtesy-of- google-ascender)

</comment><comment><USER15> A font only a mother could love.

</comment><comment><USER16> Terminus is what works for me. Still very clear and nice on the laptop screen. <http://fractal.csie.org/~eric/wiki/Terminus_font></comment>


Whose time is worth more: Jason Calacanis' or Dharmesh Shah's? - <AUTHOR> http://blog.priceintelligently.com/blog/bid/171808/Study-Whose-time-is-worth-more-Jason-s-or-Dharmesh-s

<comment><USER2> Interesting study -- wonder if certain entrepreneurs would argue Dharmesh's because he's more focused, so they'd 'spend more money' to get his time, because he'll give them more attention?

Jason is involved in so many important projects, but not sure that makes his time "more valuable".

I'd conclude Jason has much, much more influence, power, and ability to move the needle. That said, pure substance -- I'm going with Dharmesh probably all the way.

<comment><USER3> Interesting take. Personally, I would go them for different reasons.

</comment></comment><comment><USER4> This is quite a neat comparison. Certainly some geographic bias. Speaking of which - does your pricing software take into account such a bias? i.e. can you parse out what people from different geographic regions are willing to pay and, perhaps even more important, why?

</comment><comment><USER5> Interesting study - Dharmesh obviously has the edge on the east Coast. Curious about how the results would look with folks out on the west coast.

</comment><comment><USER3> Obviously a Boston bias, but cool to see the sensitivity amongst the group.

</comment><comment><USER6> awesome study, I always knew it was Dharmesh!

<comment><USER3> yea, he's the man lol...of course Jason would probably win out West.

<comment><USER7> No "probably" about it. Jason would win everywhere except Boston.</comment></comment></comment>


Baker-Miller pink – a colour that calms people down - <AUTHOR> https://en.wikipedia.org/wiki/Baker-Miller_pink <comment><AUTHOR> Assume this is to do with stereotype threat + gender stereotypes that pink -> girl -> less violent

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

i.e. being "primed" for that stereotype by seeing pink everywhere, makes you conform to your subconscious associations with the colour pink

Edit: please let me know why I am being downvoted as I would like to understand this issue further :)</comment>


PicoLisp SBCL Benchmarks - <AUTHOR> http://picolisp.com/5000/-2-F.html

<comment><USER2> I don't really understand the author's point. He asks what the point of supporting a compiler is when the result is not any faster when his own benchmarks show that the SBCL compiler is significantly faster.

Also, any combination of lisp and CamelCase should be avoided on principle.

<comment><USER3> The key to the authors point is this sentence - "One of the greatest mysteries in the history of computer language comparisons is to me the question why most people are more interested in the relative speed of a language implementation, rather than in features like expressiveness, flexibility and orthogonality.". The author appears to believe having a lisp which ~5x-10x slower is a worthwhile tradeoff to make if the underlying lisp is simpler, more flexible and more expressive. PS: I am not suggesting that picolisp is simpler, more flexible or more expressibe.

</comment></comment><comment><USER4> Having skimmed the PicoLisp interpreter a long time ago, I remember it being like Emacs Lisp in that common performance-critical functions like mapcar were implemented in C. It seems like a very pragmatic way to get the performance you need without getting into byte codes or machine language. And since you are still interpreting the s-exprs directly, debugging and introspection remain easy.</comment>


Kubernetes might help us to finally optimize the pricing of our infrastructure - <AUTHOR> https://medium.com/runacapital/can-multi-cloud-kubernetes-platforms-make-infrastructure-prices-comparable-4b76f6933ec7 <comment><USER2> Isn't the multi-cloud problem mainly based on the CNI? if the CNI is encrypting the traffic between nodes then you can easily join the cluster from any vendor, correct?</comment>


Show HN: Email PaaS Pricing (for former Mandrill users) - <AUTHOR> http://rofish.net/mailpricing.html <comment><USER2> What has happened to Mandrill?

<comment><USER3> Restructured pricing, now require a paid Mailchimp account as well. See here for HN discussion [https://news.ycombinator.com/item?id=11170713](https://news.ycombinator.com/item?id=11170713)</comment></comment>


Could diabetes spread like mad cow disease (via a prion-like protein)? - <AUTHOR> http://www.sciencemag.org/news/2017/08/could-diabetes-spread-mad-cow-disease <comment><AUTHOR> Paper here, abstract is free:

[http://jem.rupress.org/content/early/2017/07/31/jem.20161134](http://jem.rupress.org/content/early/2017/07/31/jem.20161134)</comment>


A Pwn2Own Exploit Chain - <AUTHOR> https://github.com/saelo/pwn2own2018 <comment><USER2> > for macOS 10.13.3

macOS 10.13, High Sierra, June 5, 2017

macOS 10.14, Mojave, June 4, 2018

10.13.3 released January 23, 2018, with another little update February 19, 2018

10.13.4 released March 29, 2018

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

Not sure how much of this applies to other released macOS versions.

Quite impressive as it goes all the way to load a kernel extension.

(Title should be "Pwn2Own 2018: Safari + macOS")

Also ~50% macOS users are on High Sierra. Not sure about point releases.

</comment><comment><USER3> As a macOS/Safari user I find this terrifying, but as a computer security aficionado (and onetime pen-tester) I also find this to be a sublime work of art.

</comment><comment><USER4> Is sharing this the right thing to do ethically?

I am honestly not sure.

<comment><USER5> At Pwn2Own? It's probably ones of the best ways, to be honest.</comment></comment>


Ask HN: Any experience running R within Postgres? - <AUTHOR> Would anyone like to share their experiences running R in Postgres? I'm evaluating accessing R packages from a remote Postgres db rather than using something like OpenCPU <comment><USER2> Could you describe what you are trying to do in more detail?

It's been a few years, but I used Pl/R for this.

[http://www.joeconway.com/plr/doc/doc.html](http://www.joeconway.com/plr/doc/doc.html) [http://www.joeconway.com/plr/](http://www.joeconway.com/plr/)

The use case was a fairly straightforward one. We needed to run a snippet of R-code on some data in Postgres and wanted to limit the data transfer distance between the database and the R session. We could also have just installed R on the same server and had it call Postgres locally, but having being able to call the R function via SQL was very convenient.

Debugging and package management was a pain, but once it was running things were fairly smooth after that. At some companies the IT function will rightfully scream in horror at Pl/R.

I'm don't knows how Pl/R moves the data between Postgres and R. I've seen a lot of cases with other software where the data is written to disk and then read into R. This is then done in reverse for the return trip. For larger datasets or for small datasets that arrive at high frequency (e.g. streaming or mini-batch applications) this may be problematic and it may make sense to use R's JRI ([https://www.rforge.net/JRI/](https://www.rforge.net/JRI/)) instead.

<comment><AUTHOR> So you still ned an external R engine? I was under the impression that the R engine would be embedded in the Postgres database

<comment><USER2> Yes, the R engine is external. It can be installed on the same machine to improve performance. You'll have to manage R and Postgres separately, but the communication between them can be streamlined (e.g. what is done in PL/R).

This is typically how R-integration is done. The benefit of this is that the R process is isolated from the DB engine process and any issues with the R engine will not cause a major failure with the DB engine. If somebody integrated the R runtime in the same process as Postgres, the R session crashing could lead to entire DB going down as well.

MSSQL's and Oracle's R integration work the same way. They spawn separate R processes and communicate with them.

Note that there's a nuance to "spawn a separate R process." Some pieces of software spawn R using the command line and communicate using temporary directories. Others use JRI, which loads the R library into Java and calls R using API calls.</comment></comment></comment>


10M Concurrent Websockets - <AUTHOR> http://goroutines.com/10m <comment><USER2> The headline can be misleading, these are not active real-world socket connections. According to the article they are mostly idle, with pings every five minutes.

For comparison, Chris McCord (the creator of the Phoenix framework) did some work on getting 2M concurrent connections with real-world(ish) data being broadcast across all nodes: [http://www.phoenixframework.org/blog/the-road- to-2-million-w...](http://www.phoenixframework.org/blog/the-road-to-2-million- websocket-connections)

<comment><USER3> And if I recall correctly, the 2 million figure was just an artificial limit that they hit due to the configuration settings during the test, since it just "seemed like a really big number" at the time. In theory, it could probably go even higher.

</comment></comment><comment><USER4> For a counterpoint, here's a benchmark of a single server running Elixir/Phoenix and supporting 2M concurrent websockets, sending pings once per second (rather than every five minutes like this Go benchmark). The socket handling code is simpler, too.

[http://www.phoenixframework.org/blog/the-road- to-2-million-w...](http://www.phoenixframework.org/blog/the-road-to-2-million- websocket-connections)

<comment><USER5> Where is the ping once per second part? All I could find was this commit removing pings: [https://github.com/Gazler/phoenix_chat_example/commit/f809b2...](https://github.com/Gazler/phoenix_chat_example/commit/f809b2314a636624be12012469f07a280ace00ba)

<comment><USER4> Toward the bottom of the post: "This let us to reach 2M subscribers without timeouts and maintain 1s broadcasts."

<comment><USER5> That sounds like 1s latency. Is it producing a sustained rate of 2Mpps?

</comment></comment></comment></comment><comment><USER6> This is kind of lousy actually to use that much memory and other resources for 10M nearly completely idle connections.

If the kernel is bypassed, I have reason to believe Go can handle the line rate of 16.7M packets/sec(on 10gbps nic.) I would love to integrate Intel's DPDK with Go. I've done some ground work on this before - it's very feasible to just replace the Go network stack in a transparent way. If any company is interested in sponsoring that as an open-source project, my contact info is in my profile.

<comment><USER7> As I'm sure you are well aware, there is quite a large gap between the DPDK and a working TCP stack.

Do you plan to write the TCP stack from scratch? If not, are you planning to leverage one of the golang unikernel back-end ports?

10Gb/s (even per-core) doesn't seem like much of a selling point for a network stack on it's own, given where the rest of the industry is.

<comment><USER6> I wouldn't dare write my own. I'm not expert enough in TCP/IP stacks to know what I don't know that will hurt me. I was thinking of lifting the relatively simple TCP/IP stack from the Apache licensed Seastar framework. Since that also is built for DPDK and sees production use I know that it should be easy to adapt and probably doesn't have serious flaws.

I'm actually strongly tempted to just to glue Seastar and Go together. That's the lowest risk approach.

<comment><USER8> I haven't gotten around to trying it myself yet, but OpenFastpath+OpenDataplane supposedly has a userspace port of the FreeBSD stack that runs on DPDK through ODP-DPDK.

[http://www.openfastpath.org/](http://www.openfastpath.org/)

[http://www.opendataplane.org/](http://www.opendataplane.org/)

</comment></comment></comment></comment><comment><USER9> Key quote:

Sending a ping every 5 minutes at 10M connections was roughly the limit of what the server could handle. This ends up being only about 30k pings per second, which is not a terribly high number.

<comment><USER10> Their figures are quite a bit worse than MigratoryData's commercial WebSocket Server software written in Java -

12 mil sockets, 200k pings / sec, 12 core server 54GB mem use, 57% cpu

[https://mrotaru.wordpress.com/2013/06/20/12-million- concurre...](https://mrotaru.wordpress.com/2013/06/20/12-million-concurrent- connections-with-migratorydata-websocket-server/)

<comment><USER11> Thanks for the mention, Tim.

In that benchmark, pings are actually 512-byte messages. So, MigratoryData published 200,000 messages/sec to 12 million clients at a total bandwidth of over 1 Gbps.

BTW that benchmark result has been improved recently in terms of latency. The JVM Garbage Collection pauses were almost eliminated using Zing JVM from Azul Systems and the MigratoryData server was able to publish almost 1 Gbps to 10 million concurrent clients with an average end-to-end latency of 15 milliseconds, the 99th percentile of 24 milliseconds, and the maximum latency of 126 milliseconds (computed on almost 2 billion messages):

[https://t.co/MVjLDLWS3U](https://t.co/MVjLDLWS3U)

Mihai

<comment><USER5> Does MigratoryData use the kernel networking stack or bypass it? Also is the Zing JVM included or do you have to license that separately?

<comment><USER11> MigratoryData uses the kernel networking stack and it can be configured to run as a non-root user.

Zing JVM is not a requirement for the MigratoryData server. MigratoryData includes by default Oracle JVM, which is currently used in production. With Oracle JVM we currently obtain quite decent Garbage Collection (GC) pauses for Internet applications, so the latency is not too much impacted by the GC pauses which occur from time to time.

Zing JVM could be used in certain projects to reduce near to zero those GC pauses, so the latency is not impacted even in the worst case, when a GC occurs. So, if Zing JVM is necessary for such a ultra low latency application, Zing JVM should be licensed separately.

</comment></comment></comment></comment></comment><comment><USER12> Elixir & Phoenix Framework: 2M concurrent connections on a 40core/128GB box, with a real-time chat example: [http://www.phoenixframework.org/blog/the-road- to-2-million-w...](http://www.phoenixframework.org/blog/the-road-to-2-million- websocket-connections)

<comment><USER13> It might even be 20 core processor, because htop actually shows threads and most processors nowadays are 2 threads per core.

For example my R710 shows 16 threads while it's only 2x4 real cores.

<comment><USER14> It's not as simple as 2 threads per core, the amount of performance gains of hyper-threading are dependent on the application you're running afaik.

<comment><USER15> I think the point was more that 40 cores was a ceiling for computational hardware, and it's very possible the actual hardware was 20 cores with hyper threading, which would result in much lower perf than a true 40 core system.

</comment></comment></comment></comment><comment><USER16> > This is a 32-core machine with 208GB of memory. Sending a ping every 5 > minutes at 10M connections was roughly the limit of what the server could > handle

While the 10M figure is impressive, this doesn't sound practical or useful.

<comment><USER17> Why isn't it practical? Maybe not in the cloud, but there are some hosting companies that offer quite powerful machines in the same ballpark.

Hetzner, a German hosting company, have some really good root servers, for about 120€/month you get a beast of a machine with 16 cores and 128gb of RAM. If you add some basic load balancing, you can achieve 10M for a really low price. Add something like Docker and you can get a PaaS-like setup, that handles millions of connections without breaking a sweat.

<comment><USER13> If you're going for C10M you can already forget about docker. For performance you really must be as close to the hardware as possible, which possibly means tweaking kernel.

Best example I know of squeezing as much as possible out of the bare metal servers would be StackOverflow, which runs of something in the ballpark of 20 servers(excluding replicas) IIRC.

<comment><USER18> You do know that processes in a Docker container are regular processes right? They just have a different namespace. They are as "close to the hardware" as all of your other processes. I'm not sure how you'd go about using your own TCP stack, but if you can do it with a normal process you can do it inside a Docker container.

<comment><USER19> When working with Docker, it is possible to get down to the metal as you mentioned.

Usually by bypassing the docker networking and using Host only network, but then you lose a lot of the benefits of containers in the first place.

For example, weave or calico networking layer on top— which add a fair bit of latency if your aiming for 10M connections— makes scaling containers quite easy

I would imagine that if you plan on using Docker in your infrastructure seriously, you are aiming for a multi host setup with many containers spread throughout— and can settle for 100k connections per container easily.

</comment></comment></comment></comment></comment><comment><USER20> > This is a 32-core machine with 208GB of memory.

If we're talking about these kind of specs, something tells me Erlang would do even better.

<comment><USER21> Besides, I wouldn't trust stuff with shared memory when it comes to that many concurrent connections.

I'd want it to be something with a more safety guarantees -- could be compile time (strong type system, Haskell, Rust) or strong runtime fault tollerance -- Erlang/Elixir and other languages on the BEAM VM.

</comment></comment><comment><USER22> Can anyone expand on what is actual limiting the linux kernel or network card driver? If the server is only at 10% load and half the memory is free it seems there might be either A) non-obvious tweaking needed or B) actual changes to the system library design.

<comment><USER23> Probably a combination of context switching, memory bandwidth, and interrupt handling.

If you're going to use a machine with 208 GB of RAM you may as well buy a better network card. All major vendors of low latency adapters (which in this case means handling lots of small messages) have transparent drivers for Linux kernel bypass now. For example see OpenOnload. Then you avoid the kernel with no code changes.

Once you remove the kernel from the critical path, you should be concerned with I/O resources, which is already illustrated by the article's note about how they get 5x better performance by using four machines with the same total core count. What that does is buy you four times the I/O resources, like memory channels and PCIe lanes.

</comment></comment><comment><USER24> "It is similar to a push notification server like the iOS Apple Push Notification Service, but without the ability to store messages if the client is offline."

Not even close. Layer in X509 authentication and flaky mobile networks and now you're into tuning backoff while dealing with the CPU overhead of the TLS negotiation.

Also of note, AWS' network use to flake out at around 400K TCP connections from the public network. May no longer be the case but it certainly was ~2012.

<comment><USER25> FYI, there's an unpublished limit on established TCP connections, bigger instances have bigger limits. It's hard to hit them with normal applications (you'll run out of memory from the TCP buffers and application state), but you can definitely hit them if you're doing weird things.

</comment></comment><comment><USER22> This is more about maintaining 10,000,000 open connections than about actually sending useful data to this many people or even allowing input from this many connections.

</comment><comment><USER26> This is pretty useless other than to make you realize you are doing something terribly wrong. Another good hint are the various number of system constants you are having to tweak.

If you have these requirements (no read, only write, zero connection state) you would be best served by doing userspace raw IO with something like DPDK instead of the huge machinery that the kernel spins up for every TCP connection.

</comment><comment><USER27> It's useful if you want push notifications using the W3C Push API. That lets you get notifications without becoming a slave to Google Cloud Messaging [1] or Apple Push Notification Service [2]. This should now work in Firefox and Google Chrome browsers[3]. Microsoft and Apple aren't on board yet.

[1] [https://developers.google.com/web/updates/2015/03/push- notif...](https://developers.google.com/web/updates/2015/03/push- notifications-on-the-open-web?hl=en) [2] [https://www.raywenderlich.com/32960/apple-push- notification-...](https://www.raywenderlich.com/32960/apple-push-notification- services-in-ios-6-tutorial-part-1) [3] [http://caniuse.com/#feat=push- api](http://caniuse.com/#feat=push-api)

<comment><USER28> So if apple isn't on board and it's just for some web browsers.... It isn't really an option at all :/

</comment></comment><comment><USER29> The extra processing required for websockets is so simple and well understood then we should just talk about raw TCP socket optimizations instead. With websocket processing you can do only a few tricks to further optimize a good implementation, however on the TCP/IP layer the optimization tricks can be endless and much more complicated.

</comment><comment><USER30> I see the quite high TCP memory net.ipv4.tcp_mem setting of 100M max pages (assuming standard 4K pages that's 381GiB, even more than actual physical memory the machine has, so it feels a bit unsafe, as I think sometimes kernels may lock up badly when they're overpressured - better start spewing errors reasonably early), but don't see any tweaks about how much each individual connection uses. I wonder if tcp_rmem/wmem tweaks can improve performance (well, I'm not sure, but I think it's not completely unreasonable to assume that if connections are idle they don't need the default - IIRC - 85KiB read and 16KiB write buffers)

</comment><comment><USER31> This benchmark feels a little lazy. While I am in no doubt that Go could match the 2M concurrent websockets of Elixir's Phoenix framework, a benchmark should aim to implement the same functionality to be considered useful.

The only interesting thing here is that with that 10M connections figure, each connection handler goroutine contained at least 2 channels (sub and t), and they seemed to scale (no mention of latency though).

<comment><USER32> Seems like a latency of 5 minutes since he mentioned the server was about at its limits.

</comment></comment><comment><USER33> Seems inefficient to create a new timer per connection, no?

t := time.NewTicker(pingPeriod)

Maybe if you hold all of the connections in one array and create one timer for the ping, things would be faster.

Curious how this compares to netty...

</comment><comment><USER34> > After the websocket connection has been setup, the server never reads any > data from the connection, it only writes messages to the client.

yeah not exactly difficult

</comment><comment><USER35> Back in my day we were still trying to solve the C10K problem. You darn kids don't know how good you got it.

Now git off of my lawn, I need to take a nap.

</comment><comment><USER36> The sysctl config is helpful for any high concurrency app e.g. node.

</comment><comment><USER37> You can tell this is web scale because of how complex the example is.

<comment><USER38> Yes this is a mostly a showcase of modern hardware and the Linux kernel.

However, Go's ability to do coroutines + multicore certainly makes it easier to take advantage of the system's full potential, and this ability is not terribly common in other languages (at least not in such an automatic way). Of course the same result could be achieved with any event-driven language in a less automatic way.

<comment><USER39> > _this ability is not terribly common in other languages_

Arguably any functional language does this even more automatically than Go does.

<comment><USER38> Any functional language? Certainly Erlang works this way, but I'm less sure about others.

<comment><USER39> One of the most important benefits of functional programming is that the compiler can figure out which operations can run in parallel and which can't. In other scenarios, the programmer has to explicitly decide these things herself, so you end up with extra bugs (race conditions, for example).

The language doesn't matter, as long as its compiler can expect purely functional code _and_ the compiler is written to take advantage of that code.

Rust kind of succeeds in having it both ways -- the programmer decides what runs in parallel, but the compiler won't allow race conditions.

I can't imagine any better scenario than just writing code that can be automatically parallelized, though.

<comment><USER40> So far as I know, all attempts at automatic parallelization have been extremely disappointing. Even when dealing with Haskell code or other similarly functional code, you don't get much out of it. See for instance: [http://stackoverflow.com/questions/15005670/why-is-there- no-...](http://stackoverflow.com/questions/15005670/why-is-there-no-implicit- parallelism-in-haskell) I've seen a lot of other research I can't seem to dig up right now that suggests that analyzing programs "in the wild" tend to produce optimal speedups of less than even 2x across whole programs in general.

I'm not holding out much hope for automatic parallelization to save us, or even help all that much. The only remaining hope is that a language written from the beginning to afford more automatically-parallel programs will help, but those efforts (Fortress most notably) also have not gone well. [https://en.wikipedia.org/wiki/Fortress_%28programming_langua...](https://en.wikipedia.org/wiki/Fortress_%28programming_language%29) , [http://web.cs.ucla.edu/~palsberg/course/cs239/F07/slides/for...](http://web.cs.ucla.edu/~palsberg/course/cs239/F07/slides/fortress.pdf) starting page 33

It's a pity, really. But unfortunately, I wouldn't be promising anybody anything about automatic parallelization, because even in _lab_ conditions nobody's gotten it to work very well, so far as I know. It's a weird case, because my intuition, like most other people's, agrees that there ought to be a lot of opportunity for it, but the evidence is contradicting that.

Anyone who's got a solid link to contradictory evidence, I'd _love_ to hear about it, but my impression is that research has mostly stopped on this topic, because that's how poorly it has gone.

</comment></comment></comment></comment></comment></comment><comment><USER41> The interesting thing is...how long before you have 10M users?

I'm very much a fan of this sort of work--it's obviously useful for things like data collection from sensors--but I can't help but wonder if it has any practical business value for early-to-mid stage startups.

<comment><USER15> Others have cited the Phoenix example of 2M.

We sort of take it for granted that you will have to rebuild your architecture once you hit that point. What you gain for that is a platform where you can be productive and iterate quickly.

What the Phoenix example shows is that without a huge loss of productivity up front, you can put off the rewrite much longer.

Presumably, Go would provide similar benefits.

<comment><USER42> The important thing about Phoenix is that it uses regular old pg2 groups for pubsub that can be distributed across nodes. Phoenix already does sharding for you, you just need to add another node and the stuff just works.

When I was first playing with multi node Phoenix stuff I was amazed. It was too easy to scale horizontally.

I'm not sure what the distribution story is for Go...

<comment><USER15> The distribution story in this article is "publish via Redis". I much prefer Phoenix's approach.

</comment></comment></comment></comment><comment><USER43> Most web devs think they need websockets but they really don't.

<comment><USER44> Care to explain?

<comment><USER43> I feel like frameworks like Meteor promote systematic use of websockets, and more and more developers don't even try to implement scalable stateless server code.

<comment><USER45> adoption of websockets in my experience is driven more by increasing mobile usage.

</comment></comment></comment></comment><comment><USER46> How much time before companies wake up and think that hiring people that can do the same job with only C1000 is a better investment?

</comment><comment><USER47>
        apt-get install -y redis-server
        echo "bind *" >> /etc/redis/redis.conf

/shiver....

And your new redis server joins all of the other unprotected ones directly connected to the net with no protection or real security.

</comment><comment><USER48> Sorry, but this is pointless. And I have a feeling that you could do better even with a scripting language like Perl, Python, Ruby and a single-threaded event loop.

<comment><USER49> Yes, exactly. Which is why we switched from Go to Python (using twisted), and dropped our memory use substantially for holding open hundreds of thousands (and soon millions) of websocket connections.

M:N schedulers and the primitives they use for their 'lightweight' threading are always going to use more memory than a single-threaded event loop.

<comment><USER50> Why doesn't Elixir/Erlang have this problem too?

It's using green threads as well, with 1 "process" per connection, right? Is it not the same kind of scheduling?

<comment><USER51> I'm guessing some kind of multiplexing of the sockets is being used in the Erlang case. There's no green thread per every connection.

I don't understand what the grandparent is saying though. Yeah, if you create a thread for every request, then you're going to be killed by the memory overhead. This isn't unique to Go, and I remember it being a problem when many noob Java programmers would spawn a thread per request before the introduction of java.nio.

The downside with Twisted, Tornado, or whatever in Python is your code isn't parallelized. It's concurrent, yes, but you aren't taking advantage of your multiple cores without forking another Python process due to GIL.

Go, Scala, Java etc. are truly multi-threaded and compile to native code from commandline or via JIT. Saying your performance advantage is due to switching from Go to Python is a spurious claim. You weren't doing it right.

<comment><USER52> For most scaled up examples in Erlang and Elixir, there is a BEAM process (green thread) per connection as well as others (usually arranged as a supervised pool so one can avoid an acceptor bottleneck). There are a few reasons it does better but the biggest is a carefully tuned SMP scheduling mechanism and aggressive preemption policies. Some of these choices actually hurt throughput in favor of fairness and latency. All in the name of reliability over speed.

<comment><USER51> That's helpful. Thanks.</comment></comment></comment></comment></comment></comment>


The Phantom Builder in Rust - <AUTHOR> https://wiredforge.com/blog/phantom-builder/index.html <comment><USER2> For those who want to use the builder pattern in Rust but don't want to write the boilerplate, I've found the typed-builder crate ([https://github.com/idanarye/rust-typed- builder](https://github.com/idanarye/rust-typed-builder)) to be an excellent solution. It ensures (at compile time!) that you have initialized all the fields of your struct that are not explicitly marked as having default values.

Disclaimer: I don't have any affiliation with this crate; I'm just a big fan

</comment><comment><USER3> As very early rustacean, why using that java-esque pattern when there's that awesome Defaults derivable trait?

<comment><USER4> For anyone else who's confused how this presents an alternative to the builder pattern in the post: Rust's std::default::Default trait can be implemented for any struct (also automatically derived if you just want the members' standard default values), and then an instance of the struct can be created with the following syntax: [1]

        let instance = YourStruct { foo: 42, ..Default::default() };

where 'foo', and possibly more fields, are the ones you want to override from the default. The rest gets taken from the Default trait specialisation.

Tangential: in Haskell, record types allow a similar sort of trick. If you have a data type like the following:

        data D = MakeD { a :: Int, b :: Float }

and have a instance of that data type with your default values:

        defaultD = MakeD { a = 42, b = 3.14 }

then you can create another instance of D by selectively overriding stuff from the already existing instance using similar syntax:

        someInstance = defaultD { a = 100 }

which is equal to MakeD { a = 100, b = 3.14 }.

[1]: adapted from [https://doc.rust- lang.org/std/default/trait.Default.html](https://doc.rust- lang.org/std/default/trait.Default.html)

</comment></comment><comment><USER5> There comes a point when one recognizes that colors and fancy fonts _impede_ legibility and readability of the code. Skyblue/cyan colors for code against white background is frankly annoying to read to the point where I closed the window right away.</comment>


The New Gay Orthodoxy - <AUTHOR> http://www.nytimes.com/2014/04/06/opinion/sunday/bruni-the-new-gay-orthodoxy.html

<comment><USER2> Oh, no. There's now one less thing that it's socially acceptable to be a bigot about. That's clearly a huge loss to society. /s

</comment><comment><USER3> Did this article have some kind of point other than to make its author's reactionary views sound polite?</comment>


10 Commandments of Web Design by Luke W. - <AUTHOR> http://www.lukew.com/ff/entry.asp?1727

<comment><USER2> I think I found the proper link:

<http://www.lukew.com/ff/entry.asp?1697>

</comment><comment><USER3> Cached:

[http://webcache.googleusercontent.com/search?q=cache:OeGNZe4...](http://webcache.googleusercontent.com/search?q=cache:OeGNZe4wMJUJ:www.lukew.com/ff/entry.asp%3F1697+&cd=1&hl=en&ct=clnk&gl=us)

</comment><comment><USER4> This is linking to the "Mobile Devices Per Day article".

<comment><USER5> The page under the "Writings" tab also points to the same article. Furthermore, the link numbers go 1727, 1728, 1727, 1725, so I can't guess the number based on the ordering, either.

<comment><USER6> I was doing the exact same thing!</comment></comment></comment>


Show HN: Modular LOB Apps in C#/LINQ/WPF/TypeScript/Bootstrap - <AUTHOR> http://www.signumsoftware.com/en/Framework

<comment><AUTHOR> We're re-launching Signum Framework.

Is an Open Source (LGPL) framework for writing applications using a modular design, and taking advantage of the latest technologies from Microsoft (.Net 4.0/4.5.1, C# 5.0, LINQ, SQL Server, WPF, ASP.Net MVC 4.0/5.0 and TypeScript) and other popular web frameworks (jQuery, Bootstrap and D3.js), to provide a complete solution to Line-of-Business application.

In [http://signumsoftware.com/en/Extensions](http://signumsoftware.com/en/Extensions) there are examples of reusable modules that can be plugged in any Signum Framework application, including the necessary tables entities, business logic and windows/web user interfaces.

You can create an example application in [http://signumsoftware.com/en/DuplicateApplication](http://signumsoftware.com/en/DuplicateApplication).</comment>


Ask HN: Is it worth open-sourcing my early stage startup? - <AUTHOR>

It's something I was interested in trying to do at my last job before I quit, but the battle was hand auditing an entire, mature codebase. The site I want to open source (http://www.cameralends.com) is less than 2 months old and could easily be audited. I'm interested in open source because:<p>- holds me to a higher standard of quality<p>- reduces the barrier for collaboration (anyone can submit a pull request)<p>- builds trust with the users<p>I think I understand the application level risks I'd be taking doing this, but I'm not sure about the business/legal implications. Would doing this make my startup stronger or weaker? <comment><USER2> Your site is a marketplace. What users need is trust in other users, not trust in your source code. What happens if someone loses your pricey lens? Or sells it on ebay and disappears? Those are the main issues.

Furthermore, you aren't in the open source business. What happens if someone offers you a patch, and it is not in the direction you want to go? What happens if someone is not satisfied with your service and forks the code base? Now you have even more problems.

</comment><comment><USER3> It doesn't really matter as long as your startup is good, people really could care less. Besides with an open source startup people can help you debug. Which is exactly what the people I am working with did. <https://github.com/lefnire/habitrpg> <https://github.com/lefnire/habitrpg/wiki/Business-Model> We even got a kickstarter for our open source startup <http://www.kickstarter.com/projects/lefnire/habitrpg-mobile> So no it is not a bad idea to open source your startup just be careful.

</comment><comment><USER4> Doesn't sound like open sourcing is relavent to your product. Focus on the minimal viable product, getting users and growing that revenue stream first. You can always open source later.

</comment><comment><USER5> Honestly, it doesn't matter. You're better off worrying about how to get a ton of users by ranking high in search engines, and developing good word of mouth.

</comment><comment><USER6> I absolutely agree with other comments here. This is not a software startup, is a service and nobody cares about the software that supports it. You should concentrate you efforts on provide the best support you can and not the technical details.

</comment><comment><USER7> >\- builds trust with the users

Most of your market honestly won't care if you have open sourced your code (and it won't build up any further trust).

<comment><USER8> Maybe not main stream users. However, the market right now seems to be early- adopter-type camera geeks in San Francisco. I would think open sourcing the application would garner some serious respect from that crowd, if not trust.

<comment><USER9> Unless these camera geeks are also software developers that actively follow open-source projects, I doubt they actually care. The intersection between those two groups, multiplied by the very slight amount of trust that is gained (teyc was right in that users don't care about your code, they care about other users), while non-zero, is not substantial enough to warrant open- sourcing and all the hurdles that come with it.</comment></comment></comment>


Exploiting .NET Managed DCOM - <AUTHOR> https://googleprojectzero.blogspot.com/2017/04/exploiting-net-managed-dcom.html <comment><USER2> Sounds like Forshaw can make another post since DCOM + .NET is broken.</comment>


Real-Time Lightning Map - <AUTHOR> http://www.lightningmaps.org/realtime <comment><USER2> This is awesome! I live down the road from "The Lightning Field" art installation ... Will be cool to see how accurate this is for our remote area

[http://www.diaart.org/sites/main/lightningfield](http://www.diaart.org/sites/main/lightningfield)

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

</comment><comment><USER3> I looked at blitzortung.org once because I was interested in detecting lighting while being on a boat. Especially to know the distance (the direction can be seen).

But a device can only measure the moment of discharge. Only in combination with other devices a position of the lightning can be established.

Maybe somebody wants to have a go at this. Because there are a lot of very expensive boats out there. Especially the ones with carbon masts...

<comment><USER4> The data is small enough you could receive the stream over Inmarsat or Iridium. And before you rebutt cost, I know exactly how much those carbon mast boats cost.

<comment><USER3> The other devices (preferably more then one) should be on other boats to be effective out on the oceans. So there is bit of a chicken en egg problem: not very useful if you are the only user.

It would be a project to discuss with a big freight company. One that has already many boats out there anyway. Maybe to get it started and financed.

<comment><USER4> Have you looked at XM weather? I believe it'll show lightening strikes. It has a subscription, but is of course broadcast only via the XM satellite.

[http://www.xmwxweather.com/marine/](http://www.xmwxweather.com/marine/)

<comment><USER3> Never knew of XM weather. But the reception is only in US & Canada so I guess only interesting for coastal areas ? Nevertheless, I wonder where they get their lightning data. Which is US-only according to the website.

</comment></comment></comment></comment></comment><comment><USER5> Is there a way to show where detectors are located? Otherwise how to know if there is no lightning in an area or no detectors?

<comment><USER6> If you click the "Stations: off" button it shows participating stations. Stations that measured the lightning strike are indicated in purple for a short moment.

<comment><USER5> Ah. Thanks. It was hard to see those little dots.

</comment></comment></comment><comment><USER7> Where does this pull real-time lightning data from?

<comment><USER3> 'Lightning data by Blitzortung.org and contributors • Blitzortung.org is a free community project'

The data is collected by volunteers who have a certain device at home which is connected to the internet. Its doing this for several years now I think.

</comment></comment><comment><USER8> It took me an unpleasantly long time to figure out that this is a map of lighTning, as in the weather phenomena. Not lighting maps for rendering.</comment>


Why most of the successful startups are in Silicon Valley? - <AUTHOR>

We can see majority of successful startups are in  silicon valley. Is there any advantage in term of marketing point of view? What are the pros and cons  for a startup being  located outsides Silicon Valley? <comment><USER2> I'm sure there is something to be said about startups moving to where the most money is or correlation between the risk profile of a successful entrepreneur and moving to be where the action is. However, there is probably also a higher correlation between successful young startups that get covered by tech blog and the fact that tech blog reporters are mostly based out of the valley.

That being said, when they get more successful, startups usually go for an SV office for engineers. But that's something different.</comment>


Ask HN: What do you use for tracking misc data? - <AUTHOR>

So, we all know exercise is important for us hackers who sit around all day.  In fact, I've been told by two doctors now that I need to get in better shape or I'll have serious back problems in 10 years.
In addition to buying a bike and taking taekwondo, I've started doing pushups and situps every evening.  In order to provide a sort of incentive, I'm tracking how many I do every day in a calendar in iCal.
This got my data nerdity all fired up.  Now that I have a month or so of data, I want graphs and stats and stuff.  Before I spend an afternoon indulging in attacking the ics feed with some regular expressions, I was wondering if anyone else has had a similar problem.
Let's say you have 2 or 3 variables to track on a daily/weekly basis.  What's the best tool for the job?  Should I stop using iCal for this?  (The nice thing about the ics format is that it's easy to also record the time the event occurred, so I can in theory get hour and day-of-week data.) <comment><USER2> How about using a spreadsheet? You could use Numbers...

<comment><AUTHOR> Well, sure, but then I'd have to manually enter the date on every entry.</comment></comment>


How to GET a Cup of Coffee - <AUTHOR> http://www.infoq.com/articles/webber-rest-workflow

<comment><USER2> The title conjures images of the google-bot GETting you way more coffee than you want during a crawl, but the article is actually sane. POST a drink order, PUT in changes and GET status.

I have the strange desire to go put wifi in my coffee maker.</comment>


Ask HN: Personal password storage and usage - <AUTHOR>

With the recent issues with leaked passwords, poor encryption, gmail hacking etc - I was curious; how do you store and protect your passwords?<p>I currently have a 'throwaway' password I use on low end sites, and some specific ones for email, banking etc - but I'm thinking of making really big tough unique passwords for all my sites now, and use something like FireFox to store them - and that way I only need to remember one generic (yet tough) password. Thoughts? <comment><USER2> If you're going to use a password manager, I would recommend 1Password or LastPass.

Other tricks you can apply:

\- Use a different password on every website. To help you remember it, you can choose one main password and make variations on it for every website (the variation is based on that website, but don't make it too obvious!)

\- I can't tell my password for a specific website if someone points a gun at my head, since I don't know it. I need a QWERTY keyboard to enter my password, because I only remember the flow of the characters I type. I don't remember all the characters.

<comment><USER3> I add my vote for 1Password. Just started using it a few days ago but I think it's very well done.

<comment><AUTHOR> Thanks - I've given 1PAssword a go - looks promising

</comment></comment></comment><comment><USER4> Don't use the built in password storage of any browser. Doing so leaves you vulernable to bugs such as this one: <http://forum.avast.com/index.php?topic=25044.0;wap2>. I.e., if a hole that leaks passwords exists, your browser could be leaking all your "high quality" passwords without your knowledge.

Instead, do as michiel3 suggests. Use a separate, independent, password manager. There are plenty out there. I recommend (and use) Password Gorilla myself (<https://github.com/zdia/gorilla/wiki>).

This way, your passwords are protected from browser bugs (should they appear). Further you can easily make completely independent, strong, passwords for every site, because you are not remembering each, you only need remember the unlock password(phrase) (hopefully also strong) for your password manager app.

</comment><comment><USER5> I'm a fan of PasswordMaker. Based on the domain name of the site, a master password (you could still use a tier system where sites of different value have a different master password), and other settings a password gets generated. Each site gets its own password and your passwords are only stored on the target site (i.e., there's no central password manager that stores all your passwords). There are browser extensions that make it easier to use and if you're not on your own browser there's an online JS version available for generating your passwords.

</comment><comment><USER6> PasswordCard; brilliant, simple, and works when the power goes out (or you loose your phone). <http://www.passwordcard.org/en>

</comment><comment><USER7> A good way to store them is a physical copy in an old address book. Use the alphabetical directory for the site name and then you won't have to worry about forgetting them.

</comment><comment><USER8> A little pad of paper you keep in some drawer somewhere that no one is likely to stumble upon. Satisfies all 3 corners of the CAP theorem and is infinitely scalable!

</comment><comment><USER9> I created and use YPassword[^1]

[^1]: <http://ypassword.espozito.com/Scratch/en/getit/>

</comment><comment><USER10> I keep about 3 passwords at one time. 1 password for email, one for bank accuonts, one for everything else like HN, reddit,linkedin etc. I treat email as most critical since emails contains pretty much everything about you including critical documents that you email (passport copy etc). Then comes financial accounts such as bank,credit cards etc. The last one is everything else.</comment>


New Features in Java 14 - <AUTHOR> https://blogs.oracle.com/javamagazine/java-14-arrives-with-a-host-of-new-features <comment><USER2> "Helpful NullPointerExceptions": One of the biggest pain points of Java, probably the biggest. Good that it's being finally solved;

<comment><USER3> Java is quite far away from finally solving NullPointerException issues. Kotlin, C# or TypeScript with their compile time null checks solved it mostly. Common to these three languages is that they need null to be interoperable with older language versions (C#) or with related languages (Java, JavaScript). Languages like Rust that don't even know null (or nil as in Go), have finally solved the problem.

<comment><USER4> > Languages like Rust that don't even know null (or nil as in Go), have > finally solved the problem.

I'm in no way a Rust expert, but I see a lot of code with Optionals, something like

        match sth {
          Some(v) => do_something
          None => nothing_to_do
        }

This looks awfully a lot like

        if (something == null) {
           nothing_to_do
        } else {
           do_something
        }

It might look more pleasant, but it doesn't "solve" anything, only shifts it in a different place.

Go is in the middle, because structs have no null value, only a zero value; the only thing that can be nil are pointers which I personally feel should used as little as possible.

<comment><USER5> In Java you're passed a reference to an object. Might it be null? _Can_ it be null? Who knows! Mostly you're just going to ignore the possibility and hope for the best.

In Rust you're passed a reference to an object. Can it be null? No, it simply can't! There does not exist a magic "null" value for references. To represent the possible absence of a value, you _explicitly_ encode it into the type system by using `Option<T>`.

<comment><USER6> Just changed from having a bottom null type for all types to everything being a boxed Option type. It's equivalent.

The actual difference is the reliance on pattern matching and the compiler enforcing coverage on those languages.

<comment><USER7> Option types don't have to be boxed and are specifically optimized in Rust and, if I remember correctly, in Haskell. The Nothing is represented much like a null pointer, i.e. with a special value that can't be dereferenced.

<comment><USER8> Not in Haskell, FYI. Maybes are boxed.

</comment></comment></comment></comment></comment></comment></comment><comment><USER9> I wonder about records - they would be great for simplified implementation of immutability, but they seem to not provide a way to copy with a subset of modified fields - like in Scala:

      case class Person (
        firstName: String,
        lastName: String,
        age: Int
      )

you could create an instance like this:

      val emily1 = Person("Emily", "Maness", 25)

and then create a new instance by updating several parameters at once, like this:

      // emily is married, and a year older
      val emily2 = emily1.copy(lastName = "Wells", age = 26)

<comment><USER10> You'd probably have to manually write a Builder in the Person record class. Then the callsite might look something like this:

        val emily2 = emily1.newBuilder()
                        .lastName("Wells")
                        .age(26)
                        .build()

I think the inner Builder pattern is common enough in immutable java object implementations that they might want to include that fully in the Record class generation at some point. Most immutable object libraries that I've seen include a lot more functionality than Records, like builders.

<comment><USER11> Why not do what JS does?

      val emily2 = { ...emily1, age: 30 };

This has many advantages, one being that it provably and declaratively creates a copy, which is not the case with the builder. In fact the obsession with methods (and hence the implied state) is what makes Java a terrible misfit for functional paradigms such as immutability.

<comment><USER12> I don't understand what you mean by provably. The Java example does the exact same thing as the JS version: create a shallow clone with a different age. Do you mean the builder might do something different?

        // Java
        val emily2 = emily1.toBuilder().age(30).build()

As far as adding the spread operator to Java, I think you'd have to require a Spreadable interface to use it or limit usage of the spread operators to records. It's not clear to me that the expressive power is worth it over a builder.

<comment><USER11> If a tool analyzed the JS AST, it could conclude (with fairly trivial analysis) that emily2 is a shallow clone of emily1. No such guarantee is possible with the Java version.

</comment></comment></comment></comment></comment><comment><USER13> "switch expressions", "text blocks". I haven't used Java for 15 years but it's one of the most mature languages out there. I'm surprised it's only just getting these pretty standard features now.

<comment><USER14> it's always moved slow on purpose... one of the language's greatest features is backwards compatibility and stability

it's purposefully dead simple. this is why many of us switched to alternative JVM langs ... Java can't keep up with the innovation other Langs have without breaking its philosophy of slowmoving/backwards compat

<comment><USER15> To be fair, it moved much faster after the Oracle acquisition.

The Java 6 era of no changes whatsoever was slow as molasses. The joke back then was that even C++ got lambdas before Java.

<comment><USER16> Anonymous inner classes sucked royally. Java 7 rocked my world when it dropped!

</comment></comment></comment></comment><comment><USER17> negative instanceof is a _disaster_

I posted a bit about it here [http://www.benf.org/other/cfr/java14instanceof_pattern.html](http://www.benf.org/other/cfr/java14instanceof_pattern.html)

it was first noted [https://twitter.com/tagir_valeev/status/1210431331332689920](https://twitter.com/tagir_valeev/status/1210431331332689920) here

but the main thing is that if the 'taken' conditional is guaranteed to exit, then scope hiding happens, if not, not.

But in java

if (true) { throw new Exception(); }

is not guaranteed to exit.

So: [https://github.com/leibnitz27/cfr_tests/blob/master/src_14/o...](https://github.com/leibnitz27/cfr_tests/blob/master/src_14/org/benf/cfr/tests/InstanceOfPatternTest10.java)

In case you don't want to run, as of java (build 14-ea+34-1452) this prints:

Fred

WIBBLE

      public class InstanceOfPatternTest10 {
        static String s = "WIBBLE";

        public static void test(Object obj) {
            if (!(obj instanceof String s)) {
                throw new IllegalStateException();
            }
            System.out.println(s);
        }

        public static void test2(Object obj) {
            if (!(obj instanceof String s)) {
                if(true) {
                    throw new IllegalStateException();
                }
            }
            System.out.println(s);
        }

        public static void main(String ... args) {
            test("Fred");
            test2("Fred");
        }
    }

<comment><USER18> Looks like a bug. But anyway should be easily detectable by a static analysis and reported as a warning, so not a big deal in practice, even if working as intended.

<comment><USER17> Nope - the if condition is not considered in flow analysis. Read the end:

[https://docs.oracle.com/javase/specs/jls/se8/html/jls-14.htm...](https://docs.oracle.com/javase/specs/jls/se8/html/jls-14.html#jls-14.21)

"14.21. Unreachable Statements It is a compile-time error if a statement cannot be executed because it is unreachable.

This section is devoted to a precise explanation of the word "reachable." The idea is that there must be some possible execution path from the beginning of the constructor, method, instance initializer, or static initializer that contains the statement to the statement itself. The analysis takes into account the structure of statements. Except for the special treatment of while, do, and for statements whose condition expression has the constant value true, the values of expressions are not taken into account in the flow analysis."

<comment><USER18> I still don't understand why reachable or unreachable changes the binding from names to local variable/field. The process of identifier resolution should happen before reachability analysis.

Is there some bug or mail list thread with reaction from Java developers?

<comment><USER17> I haven't raised mine, as I consider it to be a refinement of the bug noted in [https://twitter.com/tagir_valeev/status/1210431331332689920](https://twitter.com/tagir_valeev/status/1210431331332689920) (Don't know if java devs have responsed to that.)

(again, reachability analysis of unrelated code changes semantics.)

The problem is that this IS defined behaviour - the scope of the instanceof- assigned variable is dependent on whether or not the taken if-statement is provably exiting.

This is intended to allow

      {
        if (!(obj instanceof String s)) return;

        // s exists now.
      }

But it's not been thought through.

<comment><USER18> IMO they should treat it exactly like they treat uninitialized variables.

        void test1(boolean b) {
            String s;
            if (b) {
                return;
            } else {
                s = "test";
            }
            System.out.println(s);
        }

This code compiles.

        void test2(boolean b) {
            String s;
            if (b) {
                if ("a".equals("a")) {
                    return;
                }
            } else {
                s = "test";
            }
            System.out.println(s);
        }

This code does not compile. But it does not mean that println will try to resolve s to something else. I think that they should have gone to a similar route, where declared variable will be available for entire lexical block where `if` was used, but initialized only inside matched branch. Usage in other code would error with "variable might not have initialized" consistently how it works now.

Of course that would require to shadow previous declaration for consecutive `if`-s. But it would be much more obvious and understandable. Actually the whole construction would be just a syntax sugar almost expressible with current Java constructions:

            /*
            if (o instanceof String s) {
                System.out.println(s.length());
            }
            //System.out.println(s.length()); // variable might not have initialized
            if (o instanceof Number s) {
                System.out.println(s.intValue());
            }
             */
            String s;
            if (o instanceof String) {
                s = (String) o;
                System.out.println(s.length());
            }
            //System.out.println(s.length()); // variable might not have initialized
            Number s$; // no variable shadowing in Java now, but it could work
            if (o instanceof Number) {
                s$ = (Number) o;
                System.out.println(s$.intValue());
            }
            //System.out.println(s$.intValue()); // variable might not have initialized

and would be directly expressible if Java would allow variable name shadowing which is a good thing as proven by Go and Rust (although that would be incompatible change for old code, but allowing variable shadowing for patterns would not be incompatible change, because old code does not have pattern variables).

Of course I did not think about this problem for too long and probably missed something important, so that's just my 2 cents. I guess, developers took that path for a reason.

Basically they want to following code to work:

        String s;
        void test(Object o) {
            if (o instanceof String s) {
                System.out.println(s); // local variable o
            } else {
                System.out.println(s); // this.s
            }
        }

and I'd argue that this code should not compile! It's bad code. If developer wants to use `this.s` he should explicitly write that.

</comment></comment></comment></comment></comment></comment><comment><USER19> With switch, records, and (soon?) sealed interfaces, Java will be more pleasant than ever.

Would I ever choose it if I were in charge of a project? Probably not. But it is nice that the language is incorporating these proven features that make a huge difference. It'll make working in Java when I'm not in charge much nicer.

<comment><USER19> One question about sealed:

Does anyone know how it will play with type parameters in the interface? I know in Scala, you can simulate GADTs with that.

        sealed interface Expr<A> {}
        record IntExpr(Integer i) implements Expr<Integer> { }
        record StringExpr(String i) implements Expr<String> { }

Will that be legal? And will switch be able to do its magic and carry that type variable through?

</comment></comment><comment><USER20> I've been doing mostly Java work in my career and I'm using more JS these days on the side. I'm envious of the rest, spread, and deconstruction functionality in ES6. Really, really, envious.

<comment><USER21> What would stop you from switching to Kotlin, which has those features and many more?

<comment><USER22> I was in a Java shop at one point where leadership said Kotlin would be too hard for the engineers to learn (they were all mostly fairly junior).

<comment><USER21> Syntax is not that different from Java. Someone who knows Java could be productive in 1-2 days. But it sounds like you agree that your leadership in that scenario was not rational.

<comment><USER22> I'm not sure, I never tried Kotlin.

I like the look of it but I know Java pretty well so it's been hard to not just use that for my personal stuff :p

</comment></comment></comment></comment></comment><comment><USER23> I feel like Java has a particular problem in common with Android - they both keep getting better, but most people are stuck on some old version.

The difference is that smartphones phones last at most 5 years, but a program that a business depends on lasts forever.

<comment><USER18> People deliberately chosen to stay with some old version. Java backwards compatibility is awesome. The only questionable move was with Java 9, when they removed a lot of classes from standard library and introduced modules, but even that move was not so hard to migrate.

Some people just don't want to invest ANY money to improve their code. They just want to release new features. They would use Java 1 on Windows NT 4 if they could.

<comment><AUTHOR> To be fair, many users would do just fine with an Amiga 1000, given what they do with their computers.

</comment></comment></comment><comment><USER24> It's good to see Java is becoming better and iterates faster.

However, I found it's weird that hosted languages like Kotlin, Clojure or Scala are more approachable for me as they are working fine with JDK 8 like 'libraries'. They're much easier to upgrade than upgrade JDK itself.

</comment><comment><USER25> > Pattern Matching for instanceof

Why is the cast even necessary? Isn't the cast only part of the type checker and thus unnecessary with a smarter type checker? For example TypeScript can do it, if you have code following an if condition that checks the type of the variable, you can use that said variable as if it were of that type without any further assertions necessary, eg.

        let x: unknown;

        if (typeof x === "string") {
          console.log(x.charCodeAt(0));
        }

<comment> frant-hartm Two reasons - current convention and backwards compatibility. Java developers are simply used to the cast, it is commonly occurring pattern (even if it is from necessity).

The backwards compatibility part:

      class Foo {
        void foo(Object o) { }
      }
      class Bar extends Foo {
        void foo(Integer i) { }
      }
      ...
      Foo x = ...;
      Integer i = 42;
      if (x instanceof Bar) {
        x.foo(i);
      }

Currently this calls Foo.foo, if there was a smart cast it would call Bar.foo, possibly breaking existing code.

EDIT: Added method parameter.

<comment><USER26> That's not correct. Java method dispatch is always dynamic, so x.foo() will always call the foo() method on whatever concrete type x actually is. The declared type of the variable that holds the reference to that object doesn't matter, nor does casting (with a couple exceptions, none of which apply here).

But don't trust me, try it!

        |  Welcome to JShell -- Version 11.0.5
        |  For an introduction type: /help intro

        jshell> class Foo { void foo() { System.out.println("Super"); } }
        |  created class Foo

        jshell> class Bar extends Foo { void foo() { System.out.println("Sub"); } }
        |  created class Bar

        jshell> Foo f = new Bar();
        f ==> Bar@58651fd0

        jshell> Bar b = new Bar();
        b ==> Bar@5419f379

        jshell> f.foo();
        Sub

        jshell> b.foo();
        Sub

        jshell> ((Foo)b).foo();
        Sub

<comment> frant-hartm That's right, I forgot a method parameter:

      jshell> class Foo { void foo(Object o) { System.out.println("Super"); } }
      |  created class Foo

      jshell> class Bar extends Foo { void foo(Integer i) { System.out.println("Sub"); } }
      |  created class Bar

      jshell> Foo f = new Bar();
      f ==> Bar@7f9a81e8

      jshell> Integer i = 1;
      i ==> 1

      jshell> f.foo(i)
      Super

      jshell> ((Bar)f).foo(i);
      Sub

</comment></comment></comment></comment><comment><USER27> This blog post doesnt cover all interesting changes, at least for me.[0]

For me most interesting upcoming changes are

JEP: 352: Non_Volatile Mapped Byte Buffers, JEP 345: NUMA-Aware Memory Allocation for G1 and JEP 370: Foreign-Memory Access API (Incubator). Especially FMA api [1] examples seems most promising but shipped with panama and I am not sure about the maturity yet: [https://github.com/zakgof/java- native-benchmark](https://github.com/zakgof/java-native-benchmark)

I wonder how GraalVM stands in this picture that beside of being polyglot, it has AOT and auto vectorization futures and I dont know if those are already/will be shipped also with openJDK

[0] [https://jaxenter.com/java-14-update- news-163585.html](https://jaxenter.com/java-14-update-news-163585.html) [1] [https://openjdk.java.net/jeps/370](https://openjdk.java.net/jeps/370)

</comment><comment><USER28> Wow - raw text but I still have to escape \s, \w and friends in a regex. Call me underwhelmed.

</comment><comment><USER29> BankTransaction amount is a double? transactionDate is a LocalDate?

Please nobody copy paste that class.

<comment><USER30> What's the problem with using LocalDate to store a date (without time)?

<comment><USER31> There's no timezone.

LocalDate is appropriate for things like user interfaces, where you're modelling an intuitive/vague concept of date-ness only meaningful in some wider human context, or where the actual time at which that day starts just doesn't matter or is unknown. For instance it may be a good type to use for annotated historical events, where the day the event happened is the most accurate you can get.

For a bank transaction where they're international by nature and usually need to be ordered temporally against each other, it's an inappropriate type. The time zone in which the date should be interpreted is important. But really for transactions you'd be better off using Instant, at least internally. Time matters too.

</comment></comment></comment><comment><USER32> "Java 14 is scheduled for release on March 17"

So it didn't quite arrive yet.

<comment><USER33> You know, candidate/preview releases have been available for some time, if you can't wait to test these new features:

[https://jdk.java.net/14/](https://jdk.java.net/14/)

</comment></comment><comment><USER34> So, (if I could write LaTek in here I would)

The limit as JavaVersion —> Inf = Kotlin?

I won't complain.

</comment><comment><USER35> Related from a few weeks ago: [https://news.ycombinator.com/item?id=22237145](https://news.ycombinator.com/item?id=22237145)

</comment><comment><USER36> Would be great if Records were actually bonafide value types lol as in not allocated on the heap. Otherwise it's just nice syntactic sugar like data classes in Kotlin

<comment><USER37> All in good time, value types is in progress. Available to try here: [https://wiki.openjdk.java.net/display/valhalla/Minimal+Value...](https://wiki.openjdk.java.net/display/valhalla/Minimal+Value+Types)

<comment><USER36> It's been 6 years since Valhalla was announced why it's still in prototype befuddles me. If anything, getting value types out the door will have significant performance improvements and least barrier of entry for current java / jvm based programmers.

</comment></comment></comment><comment><USER38> How do I propose a language change? One thing I'd really like to see is optional type declarations in Lambdas to bulletproof them. Take this simple Lambda

       List<String> names = new ArrayList<>();
       names.stream().filter(String name -> "Bob Vance".equals(name)).findFirst().get();

By adding the String type declaration, a whole host of bugs in really complicated Lambdas can be eliminated and found easier when the original types and lists are being shuffled around

<comment><USER39> Can't you do .filter((String name) -> "Bob Vance".equals(name)) already?

<comment><USER38> Oddly enough I'm having trouble finding references around this, even though it most definitely compiles.

</comment></comment></comment><comment><USER40> Seems like Java is trying to catch up with Kotlin

</comment><comment><USER41> Pattern Matching for instanceof. Non-Volatile Mapped Byte Buffers. Helpful NullPointerExceptions. Switch Expressions (Standard) Packaging Tool (Incubator) NUMA-Aware Memory Allocation for G1. JFR Event Streaming. Records (Preview)

Everything looks promising for me.

</comment><comment><USER42> Can't understand the need for records when C# solves the problem of boilerplate with regular classes and some syntactic sugar.

<comment><USER43> It's an easy and zero-boilerplate way to have immutable data-only structures with some useful tidbits like structural comparison, meaningful hashcodes etc.

I say this as a C# developer that would _desperately_ want them supported in C# and was super pissed off when they were discarded from C# 8.0 (I actually need them right now, they would save me a whole day of typing today)

<comment><USER44> Records are coming [https://github.com/dotnet/csharplang/projects/4#card-1849391...](https://github.com/dotnet/csharplang/projects/4#card-18493910). Will be in C# 9

<comment><USER43> hopefully yes, I'm following the Records v2 issue on github :D

</comment></comment></comment></comment><comment><USER45> Who cares about the new features? The new license makes it almost impossible to use Java without some form of payment to Oracle.

<comment><USER46> > The new license makes it almost impossible to use Java without some form of > payment to Oracle.

Do you have a source for this claim? It sounds a bit extreme, to say the least, and I had the impression OpenJDK was licensed using fairly standard terms.

<comment><USER47> It's mostly FUD: it's only relevant for the Oracle JDK; it doesn't apply to OpenJDK (or the other open distributions by other orgs).

<comment><USER48> It doesn't help that multiple Oracle/Sun folks—including people like McNealy—said under oath that they don't believe that the licensing permits you to make commercial use, even if you opt for the GPL version.

<comment><AUTHOR> At the time Google screwed Sun, the GPL version did not cover the deployment into embedded platforms, only desktop and servers.

OpenJDK license is another matter.

<comment><USER48> I don't know what you're referring to, but FSF does not allow the GPL be used in such a way that the four freedoms are compromised by the licensor imposing additional restrictions.

<comment><AUTHOR> Except that there are plenty of dual licenses with GPL-exception clauses and Java was one of them back then.

It is up to the courts and copyright holder to decided what to do with their IP.

<comment><USER48> First, you didn't describe an exception; you described additional restrictions. But now you're pivoting to talk about exceptions.

These are fundamentally different things. One enlarges the set of actions a recipient is free to do relative to what vanilla GPL allows. This is permitted (and in the case of the classpath exception, endorsed) by FSF. The other attempts to shrink the size of that set by denying the user things that the GPL would otherwise allow. The FSF simply does not permit the GPL to be used in that combination (and there would be extreme contrast in your last sentence and the failure to recognize the FSF's say in this).

And secondly, you've yet to substantiate your claim that Java was ever distributed with such GPL-modifying restrictions.

<comment><AUTHOR> Well, I let Gosling speak about Google's then

[https://www.youtube.com/watch?v=ZYw3X4RZv6Y&feature=youtu.be...](https://www.youtube.com/watch?v=ZYw3X4RZv6Y&feature=youtu.be&t=57m42s)

<comment><USER48> How about a straightforward response, rather than trying to change the subject again?

What's more, I've seen this interview multiple times. Listening to Gosling stutter and be coy is not illuminating in the least. He has no idea how to answer the question he was asked, much less what's being discussed here now.

Can you substantiate your claim or not?

<comment><AUTHOR> Sun as copyright holder had the right to constraint Java's usage as they wanted and embedded deployment wasn't covered.

Naturally it is hard for anyone to link to anything Sun, given what happened with their assets and Internet presence.

Is a substantiate argument? Maybe not, it doesn't change the fact that Google screwed Sun, didn't bothered to rescued it went it went down, and now we have Java and Android Java.

I guess FSF is happy with the outcome then, since it is allowed to tank companies.

<comment><USER48> > Sun as copyright holder had the right to constraint Java's usage

Sure. But what they don't have is domain over the GPL.

I won't respond to the rest of your comment, which has nothing to do with the claim you made to kick off this branch of discussion and is just another attempt to change the subject (with what is an opinion, not a "fact").

This will be my last comment here.</comment></comment></comment></comment></comment></comment></comment></comment></comment></comment></comment></comment>