Show HN: Mastodon, a federated microblogging network - <AUTHOR> https://mastodon.social <comment><USER2> Is this a re-implementation of GNU social/OStatus in Rails? Nice work, I might have to kick the tires on this a bit.

Folks at organizations you should start looking at running your own social infrastructure in the same way you run your own email infra. An org such as a state agency would prefer to own its own namespace, a huge improvement over the status quo.

<comment><USER3> For everyone's information: GNU Social/OStatus is also known as the Google Buzz protocol stack. Weird twist of history how GNU ended up covertly becoming this federated protocol stack.

<comment><USER4> Can you elaborate or provide sources?

AFAIK GNU social's current codebase is a merge [1] between StatusNet and Free Social, with StatusNet previously known as Laconica [2] and developed by the same people behind Identi.ca [3], which itself was later re-made into pump.io [4]. The OStatus protocol, which is one of the several protocols used in GNU social, originated from the OpenMicroBlogging spec [5] promoted by the Identi.ca developers.

What's the Buzz connection?

[1] [https://www.gnu.org/software/social/merge.html](https://www.gnu.org/software/social/merge.html) [2] [https://git.gnu.io/gnu/gnu- social/commit/e3a53251c08ce5245f0...](https://git.gnu.io/gnu/gnu- social/commit/e3a53251c08ce5245f098bb37ca955016d9d57a0) [3] [https://jason.wordpress.com/2009/07/02/control- yourself/](https://jason.wordpress.com/2009/07/02/control-yourself/) [4] [https://lwn.net/Articles/544347/](https://lwn.net/Articles/544347/) [5] [https://github.com/OStatus/omb-spec](https://github.com/OStatus/omb-spec)

<comment><USER3>
      OStatus is an open standard for distributed status updates that references a suite of open protocols including Atom, Activity Streams, PubSubHubbub, Salmon, Webfinger,

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

Activity Streams is new, but the rest of these were all Google Buzz protocols. [https://sites.google.com/a/going- buzz.com/tech/developers/un...](https://sites.google.com/a/going- buzz.com/tech/developers/underlying-protocols)

As weird a twist of history as it was that GNU so readily adopted the Google Buzz protocol stack, it's far more bizarre how completely undocumented and unmentionable this legacy is.

It's a pity that Salmon is an awful practically SOAP-like opaque envelope, because I rather like everything else here. But stuffing really good content inside a base64 envelope is really not ok with me and my expectation that casually working with a format shouldn't make me want to claw my eyes out.

</comment></comment></comment></comment><comment><USER5> But that name...

"Can you mastodon me?" Ugh.

I don't see this going mainstream with a name like this. I don't think anyone at NBC is ever going to say, "let's see what's trending on mastodon."

<comment><USER6> Actually, "let's see what's trending on mastodon." doesn't sound wrong to my ears at all, but maybe that's because I've been around people who say that for a couple of months.

For reference, the community-decided verb/noun for posting on Mastodon is "toot" (as in, the elephant sound), so that would be "can you toot me". I mean. It's ridiculous, but I like it. It's endearing.

<comment><USER7> "trumpet" would have been more fun, and sound less off-color in casual conversation.

<comment><USER8> Oddly, "trump" is a euphemism for fart in UK.

<comment><USER9> What does this have to do with the topic at hand other than a common sequence of five letters?

<comment><USER10> Because it was raised as a concern a couple of posts up in relation to Tooting a mastodon message?

</comment></comment></comment></comment></comment></comment><comment><USER11> The GitHub page offers a better introduction IMO:

[https://github.com/Gargron/mastodon](https://github.com/Gargron/mastodon)

Also made me look up the original meaning of Mastodon (can see now that it's not named after the metal band):

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

</comment><comment><USER12> Looks pretty good from what I've seen. Set up an account for my site, posted a few messages to test how it works and found that everything seems pretty much as I'd expect from a Twitter type site.

Gonna download the source and try out an instance at one point too.

However, I do have one question here:

How are you planning to differentiate this from other microblogging platforms with very similar feature sets and styles? I mean, GNU Social seems to be catching on a fair bit nowadays, and that feels a lot like this software too.

Is there a plan to make this the most popular 'federated microblogging network' rather than one of the other twenty or so out there already?

Just wondering.

<comment><USER13> Mastodon is packed with LGBTQ+ people and furries. This appeals to me in a way other platforms do not.

<comment><USER14> r/Mastodon/This instance of Mastodon/

;)

<comment><USER13> I see a lot of instances popping up within this instance's community, and they all seem to fit that profile. Might be a biased perspective. :P

</comment></comment></comment></comment><comment><USER15> "GNU social" \- good, I like that protocol suite... But how do I discover fellow users to fill my subscription list across different sites ? Can I search across the whole networks ? These are inherently easier with a centralized service - and they are critical to adoption... How are decentralized services going to provide functionality to satisfy those needs ?

<comment><USER6> Discovery:

If someone from your instance follows someone remotely, that account is in the instance's database, and can be searched (we have account search). Furthermore you'll see their posts in a real-time public timeline if you wish to view that.

If you're just kickstarting a fresh instance and are alone, yeah, you kinda have to browse other sites to find people to follow. But then you follow them (there's also a "remote follow" button across mastodon and GNU social sites that facilitates this) and you get that benefit again. And you find people who the people you're following retweet/reblog/boost (whatever you wanna call it).

I mean honestly, it's not like you can immediately find every good account on Twitter either. It's not much harder or at all imo.

</comment></comment><comment><USER16> Is there some easy way for me to automatically cross-post my twitter posts to Mastodon?

<comment><USER17> Should note that this doesn't work well for anything but the simplest posts since mentions and image embeds work differently across the two platforms.

<comment><USER6> Images actually work fine! But yes, mentions don't quite "work", i.e. when you mention someone on twitter and it gets cross-posted to Mastodon, it appears as a string "@email@example.com" which is informative enough but not really "correct" if you get what I mean.

</comment></comment></comment><comment><USER18> I might be bit dense, but can you browse this thing somehow without first registering?

<comment><USER6> Sorry, you can't. I kinda forgot that would be a nice addition.

<comment><USER19> forgot? people have been asking you for this feature for ages.

</comment></comment></comment><comment><USER20> This doesn't play nice federating with the GNU Social codebase. Things that should travel across simply disappears. It needs more work.

<comment><USER6> What disappears? Let me know @email@example.com or per e-mail email@example.com

Edit: Also as a side note, mastodon.social has been federating with GNU social just fine for more than 6 months, so I'm inclined to believe this is some sort of confusion

<comment><USER20> I would ping you except that your server doesn't talk to Quitter.se while the rest of the GNU Social federation does so just fine. I'm remote-subscribed to people there yet they don't show up in my timeline. I just tried to remote follow someone and Quitter.se failed that out.

<comment><USER6> I have multiple quitter.se followers and am following multiple quitter.se people. Are you sure it's not some sort of temporary issue with quitter.se? You could ask @firstname.lastname@example.com (admin of quitter.se)

</comment></comment></comment></comment><comment><USER13> I have tooted many a toot on this service and intend to continue doing so.

</comment><comment><USER21> I like this... especially the private feature!!!!

</comment><comment><USER22> I signed up and tried it out. The "Public" thing on the right side apparently can't be shut off. About every third toot has four-letter words. Racism, sexually inappropriate comments, politics, you get to see it all. I don't see that working.

<comment><USER6> I added a "back" button to the headers of the public and hashtag timelines that takes you back to the getting started page, just for you.

<comment><USER22> Okay. Thanks. You might want to think about this going forward, given all the things Twitter has to deal with.

</comment></comment></comment><comment><USER23> Pretty cool! I also have a prototype microblogging project I'm hoping to release sometime this year, but it's very early. Information on OStatus seems scant right now. Can you discuss what's involved with it and why you chose to use it?

<comment><USER6> Here are all the OStatus specs and RFCs used: [https://github.com/Gargron/mastodon/wiki/Specs-and-RFCs- used](https://github.com/Gargron/mastodon/wiki/Specs-and-RFCs-used)

</comment></comment><comment><USER24> Are there any docs on how they plan to avoid spam from other federated instances?

<comment><USER6> There are mod tools like sandboxing spam accounts or outright suspending any account (preventing it from posting and removing all of its data from the db).

<comment><USER24> I guess that won't really scale if a popular federated server (easy to create fresh accounts) starts attracting spammers?

</comment></comment></comment><comment><USER25> This looks really interesting - going to give it a look.

I could almost see it being an internal Slack-style competitor of sorts for an intranet (if users are looking to "shout" more into the ether of the community)

</comment><comment><USER26> How many active users ? Like, accessing the platform once a week or more ?

<comment><USER6> I don't do any real tracking except for login times, so here is the best data i can offer (for mastodon.social exclusively, other Mastodon and GNU social instances are obviously excluded but should count towards your question because of federation):

1687 users active in the last 14 days. 16,744 registered accounts on mastodon.social. 18,347 accounts in total known to this instance. 460,563 statuses in the database, 306,905 created by locally registered users. 173 different Mastodon/GNU social instances known to this instance (i.e. at least one account from such an instance in the database).

Hopefully that answers your question!

</comment></comment><comment><USER27> Didn't Twitter use Rails at first and it failed under load?

<comment><USER6> I'm almost certain that Twitter is still using Rails in parts of the stack (they replaced the messaging bus with Scala, or something of that sort). Most importantly, a single Mastodon instance is not supposed to grow as big as Twitter. Lots of smaller instances don't have to deal with the same load as Twitter alone.

</comment></comment><comment><USER28> I'm quite excited about this, as a concept a decentralised twitter meets diaspora is something that I'd love to see popularised.

</comment><comment> angry-hacker I'm not sure if I understand, but other (future) sites using the protocol will have the access to the same data? Meaning my toots will travel to all of the implementations?

<comment><USER6> Your toots will travel to all your followers, regardless of which site they're on.</comment></comment>


How Yahoo Fought Against PRISM in Secret and Lost - <AUTHOR> http://mashable.com/2013/06/14/yahoo-fought-prism-lost/

<comment><USER2> Blogspam at its worst:

> _The details of Yahoo 's challenge are not completely clear, since the > procedure is in part still classified. All the information available on the > case comes from the Times story_

The Times story is here: [http://www.nytimes.com/2013/06/14/technology/secret- court-ru...](http://www.nytimes.com/2013/06/14/technology/secret-court-ruling- put-tech-companies-in-data-bind.html?pagewanted=all&_r=3&)

</comment><comment><USER3> So, what exactly do you think would happen if a major company simply refuses/d to comply? Would they arrest the whole company? The CEO? Would it happen secretly? Would they just disappear? How can these "laws" possibly be enforced?

<comment><USER4> Joe Nacchio, the former CEO of Qwest, is in prison for insider trading, which he was charged with after refusing to hand over customer data without a warrant.

[https://www.eff.org/deeplinks/2007/10/qwest-ceo-nsa- punished...](https://www.eff.org/deeplinks/2007/10/qwest-ceo-nsa-punished- qwest-refusing-participate-illegal-surveillance-pre-9-11)

<comment><USER5> Did he participate in insider trading? Do you believe he was framed?

<comment><USER6> I'd surmise that everyone's a little dirty, but if you play nice, the powers that be will turn their head.

Put another way: racial profiling is real. That doesn't mean that those racially profiled are innocent when caught with illicit substances, but that doesn't make the profiling any less wrong.

</comment></comment></comment></comment><comment><USER7> Back in 2009 (when the decision first came to light, although we didn't know what company it applied to), Russ Feingold had some scathing things to say about it:

 _The decision placed the burden of proof on the company to identify problems related to the implementation of the law, information to which the company did not have access.... Senator Feingold, who has repeatedly raised concerns about the implementation of the PAA and its successor, the FISA Amendments Act ("FAA"), in classified communications with the Director of National Intelligence and the Attorney General, has stated that the court's analysis would have been fundamentally altered had the company had access to this information and been able to bring it before the court._

 _In the absence of specific complaints from the company, the court relied on the good faith of the government. As the court concluded, "[w]ithout something more than a purely speculative set of imaginings, we cannot infer that the purpose of the directives (and, thus, of the surveillance) is other than their stated purpose...." One example of the court's deference to the government concerns minimization procedures, which require the government to limit the dissemination of information about Americans that it collects in the course of its surveillance. Because the company did not raise concerns about minimization, the court "s[aw] no reason to question the adequacy of the minimization protocol." And yet, the existence of adequate minimization procedures, as applied in this case, was central to the court's constitutional analysis._

More at [http://www.emptywheel.net/2013/06/14/feingold-yahoo- blind/](http://www.emptywheel.net/2013/06/14/feingold-yahoo-blind/)</comment>


Virtualenv-mgr is a tool to manage multiple virtualenvs at once - <AUTHOR> https://github.com/arteria/virtualenv-mgr

<comment><AUTHOR> The key features are:

\- Simply install, uninstall or upgrade specific packages in all virtualenvs at once.

\- Print statistic, about the usage of packages over all environments.

\- Find/list virtualenvs for further processing, eg. as input for virtualenv- mgr.

\- Find all envs having a package installed.</comment>


Show HN: Collaborative Realtime Task Lists - <AUTHOR> https://todo-zeta.now.sh/ <comment><AUTHOR> I'll definitely regret this but here is a public one just for fun: [https://todo- zeta.now.sh/?uuid=db9135e9-6749-4a04-b2e3-d0587...](https://todo- zeta.now.sh/?uuid=db9135e9-6749-4a04-b2e3-d05872d54ddd)</comment>


Nemo: computer algebra package for Julia - <AUTHOR> http://nemocas.org/ <comment><USER2> Holy shit! Those benchmarks look absolutely incredible, outperforming Magma by a factor of 5 on average. Incredible work. This is the kind of work that makes Julia really look like the next step for scientific computing.

[http://nemocas.org/benchmarks.html](http://nemocas.org/benchmarks.html)

<comment><USER3> I'd like to know the CPU to compare. For example, the first one is 5 seconds on a Core i5 4570 3.2 GHz in Maple.

The second problem is also not clear. Is there a Kronecker substitution on the input? If so, what are the degrees? I'd like to see the code used.

<comment><USER4> It was on a single core of an Opteron K10 6174 at 2.2GHz. I'm not sure what you mean by KS on the input. Nemo doesn't use KS on that benchmark (except possibly in Flint for the lowest level). This is comparable to what the other systems are doing, except Pari which uses a recursive sparse representation.

The code is in the Benchmarks test in test/Benchmark-test.jl.

It's not surprising the first benchmark is faster in Maple, since Maple can make use of a true sparse representation, possibly quite a bit of vectorisation on the processor you have and possibly multiple cores. The benchmark here uses only a dense representation, a single core and there is no explicit vectorisation (possibly none at all).

Pihanha for example will do both of those first examples in a fraction of the time that Nemo will. But again, it uses sparse representation and again can use multiple cores.

We'll do a sparse representation in Nemo later on, perhaps even wrap Pirhana.

The main purpose of the benchmark is actually to show off what the really fast Julia generics do for us, not to actually do this particular benchmark as fast as is humanly possible. In order to do that as fairly as possible, we deliberately use univariate polynomials over other univariate polynomials in all systems (except Pari, as noted), rather than dedicated multivariate polynomial rings.

<comment><USER3> For that CPU the times are good. My understanding is that Pari uses recursive dense, and Nemo is also using that, and you are instructing Magma to do that. I'll have to download Nemo and try it out :)

<comment><USER4> I used to think Pari used recursive dense too, but I've recently been informed it is more of a recursive sparse format. This is essentially the same thing except that they have special zero objects in every polynomial ring, so that their recursive tree is essentially a pruned tree.

</comment></comment></comment></comment></comment><comment><USER5> The Axiom [1] developers created a special purpose dependently typed language to capture mathematical abstractions: SPAD/Aldor [2]. Maxima uses Lisp. [3] These packages contain many man-years of work.

Julia is JIT-compiled, a Lisp (under the hood) and (somewhat) dependently typed.

Is that enough to port (or even transpile) modules from the big open source CAS without an entire rewrite? Is there enough similarity between CAS to make "foreign" modules even a remote possibility?

Otherwise, Nemo will likely not achieve a _great unification_ of math packages, since the required effort goes way beyond the resources of a small dedicated group.

[1] [http://www.axiom-developer.org/](http://www.axiom-developer.org/)

[2] [http://www.aldor.org/](http://www.aldor.org/)

[3] [http://maxima.sourceforge.net/](http://maxima.sourceforge.net/)

<comment><USER6> I mostly just follow articles on Julia for now. Aside from it having LISP-like macros, where's a page that says it's a LISP underneath? And I didn't see dependent types mentioned in the page below despite some things sounding similar. You got a link that straight up shows dependent types in Julia or how to emulate them?

[http://docs.julialang.org/en/release-0.3/manual/types/](http://docs.julialang.org/en/release-0.3/manual/types/)

<comment><USER5> > Where's a page that says it's a LISP underneath?

Every expression is transformed internally to an AST representation that can be seen as a lisp-style s-expression. And this gets transformed, JIT-compiled, and so on. [1]

Furthermore, the Julia internals contain an entire lisp implementation (femtolisp [2]). That has influenced the metaprogramming capabilities.

> And I didn't see dependent types mentioned in the page below despite some > things sounding similar.

Integer matrices can be represented as Array{Int64,2}. So the type of the matrix depends on the Int64 datatype and the dimensionality 2. But that's not necessarily what type theorists understand to be a dependent type. There was an epic discussion that led to the phrasing "dependent" being removed from the Julia docs. [2]

[1] [http://julia.readthedocs.org/en/latest/manual/metaprogrammin...](http://julia.readthedocs.org/en/latest/manual/metaprogramming/)

[2] [https://github.com/JuliaLang/julia/tree/master/src/flisp](https://github.com/JuliaLang/julia/tree/master/src/flisp)

[2] [https://github.com/JuliaLang/julia/issues/6113](https://github.com/JuliaLang/julia/issues/6113)

<comment><USER4> I think the Julia people were right to remove "dependent" from the docs. Nowadays I say that Julia has a limited form of static dependent typing, which is to say it doesn't have dependent typing.

When we first wrote Nemo in Julia, we used a form of emulated dependent typing. But the way we did this led to performance problems that we just hadn't thought about.

For example, if we did lots of operations over Z/pZ for many primes p, e.g. in multimodular algorithms, it meant that the Jit compiler had to recompile everything for every prime p, which was awfully slow.

Julia is absolutely not meant to be used that way, and it took us a long time to see that. After redesigning Nemo to use Julia much more like the way it was designed to be used, we actually ended up speeding everything up.

<comment><USER6> So, to be clear, you had to avoid using dependent type style in Julia and use something very different? And that different thing wasn't another style of dependent types? Am I interpreting it correctly?

Reason being that the only emulation of dependent types in Julia being way to slow would be an extra argument against any claims for Julia having dependent types vs real, dependently-typed languages that don't punish you for using them. I'd rather be clear before going that far, though.

<comment><USER4> Avoiding dependent types wasn't due to a problem in Julia. Proper dependent types are essentially not something you want to mix with Jit compilation due to undecidability, at least not if you want to use bignums in your dependent values.

Of course you could emulate them some other way in Julia, but they are deliberately not baked into the language.

In the end we used the model that some computer algebra systems, like Sage and Magma use, of having parent objects for the rings in which the element objects live. I'll leave it up to the experts to figure out if this is dependent typing or not. It obviously works very well either way.

<comment><USER6> Makes sense. Appreciate the clarification.

</comment></comment></comment></comment></comment></comment></comment><comment><USER7> Since Julia is about speed, how does this compare to Sympy speed?

<comment><USER8> > Since Julia is about speed

Is it ? At least that's not the part that excites me most, although its a nice by product to have. Its a nice flexible language with good syntax and a good set of features. I still dislike 1 based indexing though.

<comment><USER7> I honestly see little reason for its existence besides speed. R and Python are very well established.

</comment></comment></comment><comment><USER9> This is a fantastic collection of software into what seems to be a well organized and well documented package.

</comment><comment><USER4> There's a little bit more information in Fredrik J's blog post: [http://fredrikj.net/blog/2015/09/finding- nemo/](http://fredrikj.net/blog/2015/09/finding-nemo/)

</comment><comment><USER10> If it is built on PARI how does it improve upon it?

Personally I want to know how to define algebraic number classes. I attempted and failed write my own algebraic number types in Python.

<comment><USER4> Pari is not used for elements of algebraic number fields. We use Antic for that.

I should point out we actually spent some time speeding up that particular benchmark. The others are much more raw.

Having said that, we have an even faster way of doing it which will be in Nemo 0.4.

It's worth noting though that Pari doesn't have Jit compilation, so it would still be possible to beat something written in Pari/GP for example.

One of the big things with complex functionality like that in Pari is that years of mathematical knowledge have gone into it. One can't come along with some tricks like Jit compilation and expect to beat it with some simple scripts. It actually took months of work on the Antic library to get faster algebraic number field element arithmetic than what was already in Pari, and that's trivial functionality compared to the rest of Pari.

The winning strategy isn't actually to reimplement the whole of Pari (or Singular, or Gap, etc.) but to use them for complex functionality that they are actually good at, and then either improve Pari itself, or implement something even better over time, say by extending Antic.</comment></comment>


How to make a web app work offline - <AUTHOR> https://adlrocha.substack.com/p/adlrocha-how-to-make-your-web-app <comment><USER2> Felt a little lacking some research on options, and manifest configuration is quite a topic on its on, but otherwise an informative post about all the steps required to build an offline app in todays technology.

There are a few options for the frontend such as Angular/React or even webpack with other libraries to help with the offline caching, dealing with or programming service workers is pointless as they don't really provide any other benefit besides caching.

I ended up implementing a syncronization layer myself, which was challenging in a fun way, but I wouldn't use IndexedDB API, it feels much like WebGL interface: overly verbose, stateful, and the specification does not mind web developers at all. For those and other reasons I recommend [Dexie.js]([https://dexie.org/](https://dexie.org/)) to handle the local DB.

<comment><USER3> Dexie is great, but it's a good idea to understand the lower level before you start leveraging the wrapper for it. I jumped into Tone.js before understanding the Web Audio API, and I eventually regretted it.

</comment></comment><comment><USER4> Nice writeup!

I did a bunch of work to make one of my hobby projects ([https://pitchy.ninja](https://pitchy.ninja)) work off-line. The trickiest part was data synchronization between IndexedDB and the database on the server, managing and resolving conflicts if the app was used on multiple devices offline at the same time (then went online again.)

Although IndexedDB worked pretty well in the end, it is a very finicky database, with a really convoluted API. There's a whole bunch of corner cases that you need to handle, and some of these are non-obvious.

<comment><USER5> I wish there was some easy to use library to solve this problem as this seems to be a problem many people come across when building a PWA.

<comment><USER6> Checkout workbox.

[https://developers.google.com/web/tools/workbox](https://developers.google.com/web/tools/workbox)

<comment><USER5> Workbox is about service workers. So for very simple stuff like caching assets, it is quite helpful, but I was referring to the more transactional actions like multiple clients writing to the same backend, requiring to resolve conflicts.

To my knowledge workbox doesn't help with that.

</comment></comment></comment></comment><comment><USER7> I appreciate the fact that this article about JavaScript is still perfectly readable without JavaScript activated.

</comment><comment><USER8> An interesting approach: [https://github.com/automerge/automerge](https://github.com/automerge/automerge)

Academic project, but from an experienced implementer. Though there are things missing, I suspect for some applications this might be usable already. The "Caveats" section seems like it may be needlessly scary:

> No integrity checking: if a buggy (or malicious) device makes corrupted > edits, it can cause the application state on other devices to become > corrupted or go out of sync.

I wonder if this can be addressed for now at the application level, on top of automerge?

> No security: there is currently no encryption, authentication, or access > control.

This puzzles me: why would a data structure _have_ encryption, authentication, or access control? Perhaps this refers specifically to Automerge.Connection? But I assume any gossip protocol could be substituted fairly straightforwardly?

Otherwise I can only presume that by this he's just saying that the TRVE research program is incomplete -- but as far as I know, almost no software meets that sort of high standard!

Also, it doesn't mention in that section that currently automerge never truncates data. That's a constraint I believe Kleppmann would like to relax in the future.

<comment><USER8> > I wonder if this can be addressed for now at the application level, on top > of automerge?

On reflection, I think the answer to this is very likely "no". I had in mind storing the deltas in a log-structured database -- which I believe is what hypermerge does -- and detecting invalidity at application level and then rolling back to old log records in case of trouble -- but of course that doesn't help with losing sync, or effective loss of data from rolling back or corruption that leaves the data valid, and it's just not very practical.

So, even though I suspect the problems in practice are rare (Martin's clearly a very able programmer), I guess that until he gets around to the integrity work he has in mind, it's limited to apps where the data is very transient for now. Those do exist: say, off the top of my head, a tool for collaborating on sketching simple diagrams -- in fact their pixelpusher demo is quite similar to that idea! I think he's currently focusing on performance improvements.

Hope to see it grow into that!

</comment></comment><comment><USER7> "it will be easier for you to generate a native mobile-app from your PWA source code using technologies such as Ionic, React Native or Apache Cordova."

I believe react native doesn't belong here, it's not browser powered like ionic and Cordova.

<comment><USER9> Genuine question, can you explain this a little more?

<comment><USER10> Ionic and Cordova generally are "webview" apps. Essentially a headless mobile web site with access to device APIs.

In modern Android and iOS, you could also just install a PWA directly without wrapping it in Ionic/Cordova with the caveat of losing access to some device level APIs.

React Native utilizes actual native components that are declared via a JS bridge. It's not a webview.

However in the author's defense, with the current work on react-native-web, you could share a lot of your react-native code that would swap device components with their equivalent web based components.

</comment></comment></comment><comment><USER11> The fact that the younger devs expect this to be a baseline functionality, intuitively, should once and for all solve the age-old discussion about if event sourcing is a good idea or not.

</comment><comment><USER12> For folks interested in this topic here's another group working on it, Offline Camp:

[https://medium.com/offline-camp/](https://medium.com/offline-camp/)

</comment><comment><USER13> This is a good overview that I wish I had access to when I started working on web apps.

Unless you have a good conceptual model of the tech, it seems more difficult than it actually is.

</comment><comment><USER14> I went a different route. - I installed a LAMP service on my tablet and setup the database to be distributed so I can sync and take the tablet offline.</comment>


Drool: automated memory leak detection in JavaScript - <AUTHOR> https://github.com/samccone/drool <comment><USER2> I found the author's reason for making this quite interesting

 _After running perf /memory tests across multiple todomvc implementations, I found that almost all implementations have significant memory leaks on the most basic of tasks. Worse yet, most of these leaks were introduced at a framework level, or were introduced by "expert/(framework authors)". The question arose in my mind, if people who authored a framework are introducing leaks in the most trivial of applications, how can users be expected to create non-leaking implementations of much more complex applications._

</comment><comment><USER3> Very cool! I was going to be sitting down soon to reason about the $compile step in Angular 1 to see if there were any leaks. It'll be interesting to run this against my test case and see what pops out.

Thanks!

</comment><comment><USER4> Am I correct, this tool simply compares before and after number of nodes? Or it is more capable and I am just missing something? I guess it is still valuable for CI..

<comment><USER5> Hey Hippich, it currently gives you node count, heapsize, and eventListeners after the action is taken and a "super" GC has been run [https://github.com/samccone/drool/commit/4c3ac304448509afc08...](https://github.com/samccone/drool/commit/4c3ac304448509afc0827e34229999ecba707b04).

It is up to the consumer of the tool to decide what is really a failure and what actions are "clean"

</comment></comment><comment><USER6> Am I the only one sick to death of fucking JavaScript? It's an abomination of a "language" but loved my web devs because hurr durr anything other than web is too hard for them.</comment>


Texts Editor - True WYSIWYG Markdown - <AUTHOR> http://www.textseditor.com/ <comment><USER2> Can someone explain why this is useful? I thought the point of Markdown is that is easy enough on the eyes that you can comfortably edit the.source (and I certainly think it succeeds in that). Why would anyone abandone the comfort of their favorite editor to edit Markdown?

<comment><USER3> I don't even understand how wysiwyg can possibly apply to markup. Markup depends on a renderer for wyg. It could be PDF, plain text, HTML, RTF, XML, anything.

<comment><AUTHOR> You are right, WYSIWYM is more correct term. Formatting in the editor shows document structure and not exact rendering.

</comment></comment></comment><comment><USER4> Looks good. Which gui toolkit are you using and do you embed pandoc? Which parts of markdown do you not support and are you planning support for other markup formats like AsciiDoc?

<comment><AUTHOR> Thanks! UI is based on WebKit. Pandoc's license is GPL so I don't think I'll be embedding it.

As for Markdown parts – Texts 0.3 supports only blocks of plain text, headers (setext), unordered lists, code and math blocks (pandoc extension) and intervals of bold, italic, code, math and links. Only simple links (<URL>) are supported for now.

The idea is to expand syntax gradually, focusing on simplicity of user interaction. There are too many flavours of Markdown out there and several ways of writing the same structure in Gruber's Markdown is not a good thing, IMHO. There is no real need to decide between _italic_ and _italic_.

The object model of the text that is implemented is as simple as possible: blocks and spans (without nested spans). It shouldn't be a problem to implement essential parts of AsciiDoc and other plain text markups. When these formats get into the product depends on the interest from users. I'm planning to expose an API to allow implementation of formats as plugins.

<comment><USER5> You could "package" it by creating a separate component that's simply a pandoc process and have the two parts talk via one of the various serialization protocols on hackage (after all, web browsers need not be gpl just because the web server is). Itd be a shame to have to redo stuff that pandoc already does very nicely.

<comment><USER6> I am almost sure that this is covered by the gpl. Servers source code is protected because it is not distributed to the end user, not because there is some kind of a bridge between gpl code & your code.

</comment></comment></comment></comment><comment><AUTHOR> It's an early prototype. Please let me know what you think about the approach. Thanks!

<comment><USER7> Two feature suggestions: view and edit source and pandoc integration with a "View as..." menu option.

<comment><AUTHOR> Thanks! Do you mean that menu options like "View as HTML", "View as PDF" etc. should process the current file with pandoc and display the resulting file?

</comment></comment></comment><comment><USER8> I'd like to point out a similar app: Mou <http://mouapp.com/>

Good to have alternatives, especially for the Windows platform.

</comment><comment><USER9> Any plans for a Linux version?

<comment><AUTHOR> Yes, most likely after releasing Windows and Mac versions. May be after a version for iPad. It depends on the feedback.

<comment><USER10> _"... May be after a version for iPad. ..."_

this would yield a better result financially.

</comment></comment></comment><comment><USER11> A cool project.

Note: it doesn't recognize .md or .markdown file extensions on OSX

<comment><USER12> I can confirm this.

Would be nice if it did, for authoring blog posts to be used with Jekyll

</comment></comment><comment><USER13> Doesn't emacs org-mode perform a similar function?

<comment><USER14> Org-mode performs a similar function to markdown. Not similar to a WYSIWYM editor for markdown.

</comment></comment><comment><USER15> The renderer seems to be easily confused, I'm using hyde ( <http://ringce.com/hyde> ) and Texts doesn't recognize my files as markdown.

They have Django template syntax mixed in, so for example:

{% extends "_foo.html" %} {% block article %}

MarkdownPad seems to manage to convert the markdown bits just fine.

</comment><comment><USER16> I get lots of errors running this on Windows 7, shall I send them to email@example.com?

<comment><AUTHOR> Yes, please!

</comment></comment><comment><USER17> I've used MarkdownPad for this on Windows in the past.

<http://markdownpad.com/>

If I need a Markdown editor, it's awfully handy to be able to type as Markdown and see it rendered on the fly.

</comment><comment><USER18> Google Chrome 17 has classified it as malware during download.

<comment><AUTHOR> Not sure but it's probably because the .msi is not signed and the web site is relatively new.

</comment></comment><comment><USER19> I really hope it could support inline markdown syntax editing

When line is active, edit markdown source, else display rendered line.

Support for inline LaTeX editing is a bonus.

<comment><AUTHOR> The idea was to make Markdown accessible for those who don't want to learn the syntax.

But switching code block style (Cmd+3 on Mac or Ctrl+3 on Windows) on and off maintains inline syntax. So you can type raw Markdown into a code block and then switch it into plain text paragraph with formatting.

<comment><USER19> > for those who don't want to learn the syntax.

This can be also done in source code mode. For example, select few words, select Bold from the menu, then these words are wrapped in ____

</comment></comment></comment><comment><USER20> Looks good - I've been looking for something exactly like this, to the point where I'd been considering writing it myself. Nice work!

</comment><comment><USER21> We need more minimalistic apps like this.

</comment><comment><USER22> You mention using it to author books. Is there a plan to make support exporting to epub/mobi formats then?

<comment><AUTHOR> It is possible to create EPUB via pandoc (<http://johnmacfarlane.net/pandoc/epub.html>).

</comment></comment><comment><USER23> I'm pretty sure, opensourcing it will help the application improve.

</comment><comment><USER24> > A subset of de-facto standard Markdown is used for markup

How much is missing?

</comment><comment><USER25> why not open source?

<comment><AUTHOR> I'm planning to open source most of the parsing/formatting/API code. Making everything open source would not make it sustainable. Sorry.

<comment><USER26> Well, I would say with all the competition out there is this area ... open sourcing it can actually help you sustain it

1\. If it becomes really popular, you can make video tutorials and sell ads on your site 2\. You can consider making it donation ware

There really isn't much options to build revenue streams around a FOSS text editor Its a tuff area

</comment></comment></comment><comment><USER27> Looks useful! Two things:

1) How do I make several levels of headers (#, ##, ###, ####)? This is what I use markdown for the most - nesting texts in clearly visible subsections. In the menu I can only see only one header, and in the screenshot I see two (==== and ---).

2) Rendering the PDF side-by-side would be useful. If I understood correctly one currently has to compile to PDF manually, which sort of defeats the purpose of a GUI app.

<comment><AUTHOR> Thanks!

1) Tab/Shift+Tab change the level of header.

2) Yeah, it's "not implemented yet" :) Actually, there are many ways to publish from Markdown, including services like scriptogr.am. So I'm not sure that compiling PDF is the most important feature.

</comment></comment><comment><USER28> Won't run on OS X 10.5.8.

Pity. Just what I was looking for.

<comment><AUTHOR> I think it's fixable. Thanks for reporting!

<comment><USER28> It would be great if it were possible ... I have reasons for not wanting OS X 10.6 or upwards.

<comment><USER29> Care to share? I'm a mac developer and I just recently dropped support for < 10.6 in all of my apps.</comment></comment></comment></comment>


I want to learn Web Development. - <AUTHOR>

Hello Hackers.
I hope all of you are having a good day. I have a few questions and want to discuss with you people for expert opinion. Currently I am working in Ernst & Young, Pakistan as a Business Advisory Consultant but over the last few months I have developed huge interest in learning Web Development and bring some of my online business ideas into reality. I know my business ideas may not prove to be very successful in the end but either way I want to learn Web Development because I can't resist it anymore. Over the last few months I have searched on internet about how should I start learning web development. I have come to know that I should start with HTML and CSS and then move on to Ruby on Rails or PHP etc. I have already started learning HTML from some online sources. The problem I face currently is that I need a proper path to learn things and do not get caught into useless or non value adding things. I want suggestions from experts on a step by step approach to eventually becoming a good programmer. Your responses will be HIGHLY appreciated. Thanks
Regards Ahmed J <comment><USER2> IF you have your heart set on Ruby on Rails, your right. HTML/CSS/ and a little Javascript wouldn't hurt.

If you have the resources to travel to America...Code Academy in Chicago would be exactly what you are looking for. (11 week training geared towards complete beginners).

If you don't, you could slowly work through Treehouse/think vitamin. I have used their tutorials and would recommend them to beginners.

Realistically, Ruby on rails will take much longer than most people think initially. Most people guess 4-8 weeks (on a 40 hr week), it's more like 6 months.

Don't give up. Good luck.

<comment><AUTHOR> Thanks for good advice. I am learning everything by myself and I think RoR will have me occupied for almost a year. What do you think about PHP? Plus I would really love to travel to America, but due to some limitations I think I would not be able to visit. Thanks

</comment></comment><comment><USER3> If you're interested in learning Javascript, try Codecademy. They have tons of free modules and have a very structured learning path. They keep it fun by giving you projects to do along the way.

<comment><AUTHOR> I'm not sure whether I should learn JavaScript or first have experience developing on RoR.

</comment></comment><comment><USER4> Udacity is offering Web engineering courses.

<comment><USER5> +1 for Udacity. I'm using it now. It's really well thought out and reinforces learning through exercises after each short 3-4 min section of instruction. They use Python for the building a search engine course (CS101), which is a fine (some say best) language to start with.</comment></comment>


GNUnet - <AUTHOR> https://gnunet.org/ <comment><USER2> I wish one of these networks would take off, be it GNUnet, OneSwarm, I2P, freenet or any other, I don't care.

The thing is, performance must be at least decent if the authors of these protocols want people to start using them.

<comment><USER3> Agreed. These systems have been around for a while, but as we see, haven't been widely adopted. So why? What's a good theory as to why these ones haven't taken off? If we can identify why these haven't taken off we can build the next one better.

<comment><USER4>
      What's a good theory as to why these ones haven't taken off?

Bittorrent got there first.

<comment><USER5> Could someone explain to me how these protocols are superior to Bittorrent?

<comment><USER6> Your definition of "superior" may imply vastly different trade-offs. If you want files fast, then they are quite inferior to Bittorrent. The aforementioned protocols can vary a bit in what they do well, but in general the goal is to protect the identity of participants from hostile peers on the network. With Bittorrent, the goal is to transfer files efficiently with no regard for privacy, and it's very good at it.

</comment></comment></comment></comment></comment><comment><USER7> Now would be a good time to give variuous good organisations cash.

<comment><USER8> EFF is a good place to start. The Internet Archive also has helped document some of the lies made by government officials .

<comment><USER9> The EFF's view on exploit sales and forced disclosure is questionable at best.

[https://lists.immunityinc.com/pipermail/dailydave/2012-Augus...](https://lists.immunityinc.com/pipermail/dailydave/2012-August/000161.html)

<comment><USER10> Their stance is limited to opposing 'green hats' who are selling to customers that don't intend on fixing the flaws (buying a hacker's silence) and selling to governments whom intend on using the exploits for clandestine operations.

</comment></comment></comment></comment><comment><USER11> The list of publications is really impressive:

[https://gnunet.org/bibliography?f%5Bkeyword%5D=2](https://gnunet.org/bibliography?f%5Bkeyword%5D=2)</comment>


Data structures and Algorithms in C/C++11 - <AUTHOR> https://github.com/iyedb/datalgo

<comment><USER2>
        class Tree {
        public:
        ...
          ~Tree() { ...
        ...

If you have create a non-final class with a public non-virtual destructor, you are basically guaranteed that code using your library will have memory leaks.

:(

<comment><USER3> Sorry if this is an ignorant question, but can you elaborate on this? It's not clear to me why this would lead to memory leaks.

<comment><USER4> If the destructor isn't implemented in derived classes, they will use the parent's destructor. Not a guaranteed memory leak..... but something you need to be aware of.

<comment><USER5> It's worse than that - if you ever have a a variable with the static type of the base class but the dynamic type of a derived class, memory will leak, _even if you 've implemented the destructor in derived classes_. For example, this code:

      class Base {
        public:
          Base() {}
          ~Base() {}
      };

      class Derived : public Base {
        private:
          Foo* _foo;
        public:
          Derived() : _foo(new Foo) {}
          ~Derived() { delete _foo; }
      };

      int main() {
        std::unique_ptr<Base>(new Derived);
      }

The problem here is that if the destructor is not marked virtual, then when unique_ptr<Base> goes to invoke the destructor, it calls ~Base instead of ~Derived. That has no knowledge of Derived's member variables, so any memory that Derived allocated leaks. (Technically, it's undefined behavior and can do whatever it wants, but most implementations in practice will call ~Base.)

</comment></comment></comment></comment><comment><USER6> Is it considered idiomatic to mix in test and production code in the same file, and therefore the same binary?

Also, is it considered idiomatic to not leave any commentary breadcrumbs on what files and classes and structures are for? I get that lists.h probably contains lists, and I'm guessing linked lists from the code. The rest of it is guesswork.

<comment><USER7> No. This code is fine--clean, journeyman code--but it's quite a bit below what you'd expect from the STL, Boost, or other premier libraries. Sometimes the implementations of such projects seem obfuscated, but that's often a legacy of trying to work with older, broken compilers and/or to protect against obscure corner cases.

</comment></comment><comment><USER8> There is no language called C/C++11 . Why do people insist on suggesting that these two languages are the same?

<comment><USER9> I didn't feel like the author was conflating them, merely that this repo is a mixed bag of sample code in both C _and_ in C++. The Makefile appears to compile the .c files with a C compiler, and the C++ files with a C++ compiler.

Also, the two languages, while certainly not the same language, do have parts in common, and do interoperate decently well together.

<comment><USER8> You are right. They do "interoperate" fairly well together. It is kind of like a 64 bit Linux machine can run 32 bit binaries, but a 32 bit machine can't run 64 bit code. A C developer could probably be extremely productive in C++, but reverse this and it probably wouldn't be true.

As a consequence of using all the abstraction that C++ provides, one cannot simply dive right into C and expect the same level of productivity.

<comment><USER9> > As a consequence of using all the abstraction that C++ provides, one cannot > simply dive right into C and expect the same level of productivity.

Absolutely true. What I meant by "interoperate" is that it's decently easy to call C functions from C++; the other way is also possibly, but you more or less have to pass C types around, which limits productivity somewhat.

</comment></comment></comment></comment><comment><USER10> This doesn't look like a very well organized or generalized code. It reminds me of my own repo I had in school for TopCoder competitions: [https://github.com/Slava/competitiveProgramming/tree/master/...](https://github.com/Slava/competitiveProgramming/tree/master/prewritten- code)</comment>


Ask HN: Medium.com alternative for developers? - <AUTHOR> Medium keeps making steps that push me away as a developer.
What alternate sites are there for developers? I'm particularly interested in the network effect where you can post something and people interested in that topic would see your article.
There used to be https://tech.pro but they closed up shop years ago.
It seems there really is only Medium in this space? <comment><USER2> Quora has a decent community of developers and computer scientists while offering great writing experience and content exposure for a blog platform, though its primary purpose is being a Q&A site. [0]

The code rendering and presentation on the site is also on par with what you'd expect from sites like Stack Exchange and ilk.

One downside however is the extremely low quality content on some topics (most, rather) that gives rise to hive mind and polarization, especially around sensitive subject matter.

[0] [https://blog.quora.com/Introducing-Blogs-on- Quora](https://blog.quora.com/Introducing-Blogs-on-Quora)

</comment><comment><USER3> You might like dev.to which is a blog platform/community for developers. Users can choose which topics they are interested to and see content relevant to those.

</comment><comment><USER4> Reddit is a social networking site... But is populated with good content...

</comment><comment><USER5> Have you tried dev.to</comment>


Mux (YC W16) Is Google Analytics for Video - <AUTHOR> http://themacro.com/articles/2016/08/mux/ <comment><USER2> The signup email contains link to localhost:

[http://localhost:3000/signup?invite_id=7afbb7a4-6a34-4b56-b1...](http://localhost:3000/signup?invite_id=7afbb7a4-6a34-4b56-b14d-xxxxxxxxx)

<comment><USER3> Our bad. Fixed now.</comment></comment>


Deploying with Git. Simple and Effective - <AUTHOR> https://forwardmx.io/blog/4-deploying-with-git-simple--effective <comment><USER2> Looks like a smart hack to deploy to production on every commit, but while it gives the illusion of continuous delivery, it is actually a terrible idea since there is nothing to catch a regression before it goes to production.

In the Java world is common to use tools like Jenkins for your continuous delivery pipeline. You can have a Jenkins job triggered by a Pull Request, so you can validate the build passes and perform code reviews. Then you can have another hook for merging the PR which can perform additional integration tests, stress tests etc and deploy to artifactory (or other), and if everything passes you can finally deploy to production.

<comment><AUTHOR> Doing it like this does not mean you dont have that. In fact we use Gitlab as our `origin` that connects to a CI and allows code reviews. Some other projects of mine use Github for the same. This is really just about deploying itself.

I dont see the conflict honestly :)</comment></comment>


EC2 Instances with 6, 9, and 12 TB of Memory - <AUTHOR> https://aws.amazon.com/blogs/aws/now-available-amazon-ec2-high-memory-instances-with-6-9-and-12-tb-of-memory-perfect-for-sap-hana/ <comment><USER2> Also gives you 224 physical CPU cores (448 logical cores).

Requires a 3-year reservation, and "the effective hourly rate for the All Upfront 3-Year Reservation for a u-12tb1.metal Dedicated Host in the US East (N. Virginia) Region is $30.539 per hour."

Works out to $267,512.88 per year, or $802,538.64 for the 3-year term. I wonder how that compares to building your own on-premise host with that much RAM (obviously, there's operational costs to consider as well).

Also, don't miss the last line: "We're not stopping at 12 TiB, and are planning to launch instances with 18 TiB and 24 TiB of memory in 2019."

<comment><USER3> Crazy. Is the use case for these types of instances pretty much designated for ML? Why else would anyone need these?

<comment><USER4> My redis is bigger than your redis?

<comment><USER5> This sentence seems especially peculiar when you take into account that the word "redis" means "radish" in Estonian.

<comment><USER6> Funny that Redis has en edit distance of 2 with certain word... and also rhymes with it.

</comment></comment></comment></comment></comment><comment><USER7> One of the neat things of instances w/ this scale of memory is that we can once again start avoiding the perils of distributed computation. Because you have immense data locality, a lot of computations can be parallelized much more efficiently if they involve large sequences of trivially parallelizable tasks that are short-lived.

</comment><comment><USER8> Is SAP HANA any good?

I don't have any experience with it but it's the one single example that's always used in every vendor post about high-memory machines.

</comment><comment><USER9> Interesting that you can't simply spin one up on your own; you have to contact AWS to get the process started. Maybe it's simply because of the amount of money you're committing to spend, but I find the possibility that they're now offering an instance type that requires them to physically provision it for you intriguing.

<comment><USER10> If you're at the level of spend where paying almost a million dollars for an instance, contacting them isn't too hard. You usually have the email address and phone number of a bunch of people who can get it done in a minute or two. And they don't usually provision it -- they just flip a bit to allow you to use the API to provision it yourself.

I think they want the phone call in case you want 10 of them.

</comment></comment><comment><USER11> I wish "your data fits in memory"[0] was still up.

[0]: [https://news.ycombinator.com/item?id=9581862](https://news.ycombinator.com/item?id=9581862)

<comment><USER12> The source is still up at [https://github.com/lukegb/yourdatafitsinram](https://github.com/lukegb/yourdatafitsinram)

Sadly, it just used 6TB as a fixed cutoff, so keeping it up-to-date would be a manual task.

Today, only a few years later, that number is 24TB. (Even more sadly, that's for the _last_ generation of Intel CPU, whereas the current 8S generation tops out at 12TB and isn't even scheduled to have models that would get to 24TB until next year).

</comment></comment><comment><USER13> I would like to see if you can build such a monster yourself, and how much would it cost? Did Amazon designed their own motherboards or used some off the shelf boards?

<comment><USER14> The processors they're using appear to be well in excess of $10,000 each. To get 224 _physical_ cores, you'd need to run them in a 8-CPU configuration, so you've got ~$100,000 invested just in the processors alone.

Memory is absurdly expensive right now, and I'd be shocked if 12TB of it cost any less than another $100,000.

You have to sign a multi-year reservation, and with a cost of $267,512.88 per year (as calculated from another comment in the thread), I assume their profit margins for the first year are nearly non-existent. However, over the course of the remaining two years of your reservation, they're making a great deal of money on each reservation.

So yea, I imagine someone could build something like this, but such an individual would need to have very deep pockets.

<comment><USER15> 12TB is only about $7000 in chips. I buy them for my own products. There's a lot of ancillary things you need but raw dimms aren't anywhere near that experience.

<comment><USER16> The 128GB DIMMs are nearly $3000 each ([https://memory.net/product/m386aak40b40-cwd- samsung-1x-128gb...](https://memory.net/product/m386aak40b40-cwd- samsung-1x-128gb-ddr4-2666-lrdimm-pc4-21300v-l-octa-rank-x4-module/)) and you need 96 of them.

Where can you get 12tb for $7000?

<comment><USER15> You'll pay more for the highest density chips, but there are back-planes that support more of the lower density parts. I buy the raw chips in reels not DIMMs. The $7k was based on my costs.

</comment></comment></comment></comment></comment><comment><USER17> I think in this case we should praise Amazon: this should really help for certain use cases (running Minecraft at a decent frame-rate comes to mind).

</comment><comment><USER18> 640GB ought to be enough for anybody.

</comment><comment> swingline-747 _Retail_ price of the server components (no racks, PDUs, busbars, fibre drop, network switch, KVM, circuit-breaker, rack&stack, rack anti-tip bracing, artistic cabling, tech support):

CPU 8176M: $11,805.00 USD x 8 = $94,440.00

RAM 64GB: $866.23 x 192 = $166,316.16

Chassis + 2x 10 GbE NICs + SSD boot device: ~$8000

Total: ~$269k USD

AWS price: $803k

Under 150% gross profit margin (without electricity, fibre or real-state) over 3 years. I'd say the closer figure is ~ $300-400k per box for single company- scale servers, leading to a closer-to-net profit Amazon profit of around 100%

Although, it's possible to keep a server beyond its lifecycle and run it into the ground once it's already paid-for, as opposed to getting nothing at the end of the Amazon lease.

There's trade-offs for both cases; some people would rather pay more to not have to deal with quotes, vendors or shipping issues.

<comment><USER12> > (no racks, PDUs, busbars, fibre drop, network switch, KVM, circuit-breaker, > rack&stack, rack anti-tip bracing, artistic cabling, tech support)

Anyone paying more than a negligible amount (per server) for any of these is needlessly over-paying. For a server this expensive, it had better be way below 1%. (Tech support is arguable, but it costs a pretty penny from AWS, too).

> RAM 64GB: $866.23 x 192 = $166,316.16

These CPUs can't support 192 DIMMs, only 96, so they're limited to the much more expensive 128GB modules. That means you're looking at closer to $250k for the RAM alone.

<comment> swingline-747 Read the spec sheet...

6 channels per socket (2 controllers with 3 lanes each), 8 sockets, and 64 GB _LR_ DIMMs.

128 DIMMs are $2-3k a pop.

192 sockets, 8 way, up to 24TB of ram w 128GB or 12TB with 64GB sticks:

[https://www.supermicro.com/products/system/7U/7088/SYS-7088B...](https://www.supermicro.com/products/system/7U/7088/SYS-7088B-TR4FT.cfm)

If someone wants to throw more money on RAM to be slightly faster, that's a solution design-decision; it's doubtful Amazon would do that. If they are, great.

<comment><USER12> > > [https://www.supermicro.com/products/system/7U/7088/SYS-7088B](https://www.supermicro.com/products/system/7U/7088/SYS-7088B)

That's previous generation:

>Intel® Xeon® processor E7-8800 v4/v3 family

The articles states:

> All three sizes are powered by the latest generation Intel® Xeon® Platinum > 8176M (Skylake) processors

You mention the 8176Ms in your original comment, too. The current SuperMicro product that supports those is [https://www.supermicro.com/products/system/7U/7089/SYS-7089P...](https://www.supermicro.com/products/system/7U/7089/SYS-7089P-TR4T.cfm) and that only has 96 DIMM slots.

> Intel® Xeon® Scalable Processors, 8S-3 UPI up to 10.4GT/s

> 96x 288-pin DDR4 DIMM slots

> Supports up to 12TB DDR4 ECC 3DS LRDIMM in 96 DIMM slots

I think you'll find that this is due to the limitations of the CPU itself:

> Max Memory Size (dependent on memory type) 1.5 TB

according to [https://ark.intel.com/products/120505/Intel-Xeon- Platinum-81...](https://ark.intel.com/products/120505/Intel-Xeon- Platinum-8176M-Processor-38_5M-Cache-2_10-GHz)

</comment></comment></comment></comment><comment><USER19> This is bad for $MU.

</comment><comment><USER20> but will it run GTA5?

<comment><USER21> It could run GTA5 inside JS inside an Electron app :-)

<comment><USER14> The jury is still out regarding its ability to run Slack.</comment></comment></comment>


'Climate change contrarians' receive 49% more media coverage than scientists - happy-go-lucky https://www.tvnz.co.nz/one-news/new-zealand/climate-change-contrarians-receive-49-per-cent-more-media-coverage-than-scientists-us-study-finds <comment><AUTHOR> It seems like the 49% is when taking into account a wide variety of sources, including random online magazines and blogs. When using "mainstream media", the coverage drops to 1%. The fact that they get even 1% more (or equal for that matter) coverage is still dumb but at least it's not as bad as 49%.

From the paper:

>Here we show via direct comparison that contrarians are featured in 49% more media articles than scientists. Yet when comparing visibility in mainstream media sources only, we observe just a 1% excess visibility, which objectively demonstrates the crowding out of professional mainstream sources by the proliferation of new media sources, many of which contribute to the production and consumption of climate change disinformation at scale.

>Together, these results show that CCCs derive a comparative visibility advantage from non-scientists gaining attention in peripheral non-mainstream media sources. Conversely, the observed parity between CCCs and CCSs in mainstream media sources may reflect media writers seeking journalistic balance when reporting on CC. Indeed, we find that every select-30 media source has provided CCC significant visibility, thereby increasing CCC authority and credibility (see Supplementary Fig. 4). The disproportionate visibility of CCCs, even in mainstream media sources, is reminiscent of early contrarian efforts that leveraged the U.S. Federal Communications Commission Fairness Doctrine to obtain equal press time.</comment>


Tesla wants to power your home with a battery - <AUTHOR> http://money.cnn.com/2015/04/22/technology/tesla-home-battery/

<comment><AUTHOR> "Those batteries start at about $13,000, though California's Pacific Gas and Electric Co. (PCG) offers customers a 50% rebate. "

For the summer, California E-6 Residential rates are $.32/kWh during peak times, $0.13/kWh during off peak. If your house is using, say, 4 kW, for 5 hours during peak - then that 20 kWh will cost save you 20 * ($0.32-$0.13) = $3.80/day in power costs, approx $115/month. Do that for 4 months/year ,that's $460/year. With a 5 year life, that battery would need to be less than $2300 to come out even. [http://cleantechnica.com/2014/09/05/teslas-gigafactory- may-h...](http://cleantechnica.com/2014/09/05/teslas-gigafactory-may-h..). suggests that $100/kWh is in the ballpark.

@$6500 net, after rebates, that would mean the Tesla battery would have to be on the order of 65 kWh to be a no brainer, which is unlikely given that they were, according to the article, previously demoing a 10 kWh battery.

I'm sure they've thought it through though, so will be nice to see where my math around $100 kWh is wrong.</comment>


Ask HN: Example of good Node.js project? - <AUTHOR> Node isn't the most familiar language to me. Is there an example of a project that could be considered to embody good practice with modern syntax? Good practices mean things like (but not limited to):<p>- Proper error handling<p>- Proper logging<p>- Good modularization<p>- Good documentation practice<p>- etc<p>I've been programming for the better part of two decades so I sort of know what I'm looking for. The node landscape is full of advice, I'm just looking for something that could be considered a 'model' project to use as a guide/example for starting a new project. One of the things I am most interested in is error handling and logging for long running processes. <comment><USER2> These codebases will meet your requirements -

Zeit: [https://github.com/zeit](https://github.com/zeit)

Facebook: [https://github.com/graphql/graphql- js](https://github.com/graphql/graphql-js), [https://github.com/graphql/dataloader](https://github.com/graphql/dataloader)

Misc: [https://github.com/apollographql/apollo- server](https://github.com/apollographql/apollo-server), [https://github.com/tngan/samlify](https://github.com/tngan/samlify), [https://github.com/sindresorhus](https://github.com/sindresorhus)

</comment><comment><USER3> You could always use the real world example demo as an example: [https://github.com/gothinkster/realworld/blob/master/README....](https://github.com/gothinkster/realworld/blob/master/README.md)

<comment><USER3> Also FrontendMasters[0][3] has some great courses here's a few repos from an Instructor Scott Moss[1][2]. Though Frontend Masters is quite a bit expensive I find the training super great.

[0]: [https://frontendmasters.com/](https://frontendmasters.com/)

[1]: Fullstack GraphQL course: [https://github.com/FrontendMasters/fullstack- graphql](https://github.com/FrontendMasters/fullstack-graphql)

[2]: API Design Node.js and Mongo: [https://github.com/FrontendMasters/api- design-node-v3](https://github.com/FrontendMasters/api-design-node-v3)

[3]: [https://github.com/FrontendMasters](https://github.com/FrontendMasters)</comment></comment>


Launching Your First App (from someone who has) - <AUTHOR> http://sixrevisions.com/tips/launching-your-first-app/

<comment><USER2> Getting the word out seems to be the hardest part. Articles typically scroll through HN so fast that it doesn't really help, plus it's probably not the audience for many apps. Reddit has small communities but they won't make you.

My apps, for example, are in a crowded market where I've calculated that there's at least $140m in VC money.

[https://h4labs.wordpress.com/2015/07/15/top-5-start-ups- crea...](https://h4labs.wordpress.com/2015/07/15/top-5-start-ups-creating-ios- language-learning-apps/)

And some of that money buys television ads:

[http://www.ispot.tv/ad/7Nku/babbel-learn-on-the- go](http://www.ispot.tv/ad/7Nku/babbel-learn-on-the-go)

The app market grew up fast.

<comment><AUTHOR> Definitely. I think longevity is the best asset: releasing multiple Apps over a period of time that do moderately well. Now you have a platform _and_ personal experience about what works and what doesn't.

</comment></comment><comment><USER3> Going thru these growing pains ourselves... Well written, couldn't agree more... One of the biggest problems with apps (when we considered the Lean Startup application) is that you can't

<comment><USER3> A/B as quickly as you can on Web (Android much better). Def requires much more initial research before mvp</comment></comment>


A Chip in My Hand Unlocks My House. Why Does That Scare People? - <AUTHOR> https://www.nytimes.com/2019/05/21/opinion/chip-technology-implant.html <comment><USER2> Probably less about a chip, assuming the plugging material no longer causes cancer and more about having a home that is remotely monitored and controlled by others.

The water dispenser at my work place requires internet to serve water. Internet down? No water for you! Now apply that insanity to a house.

Let me take a moment to predict the future. You get home from work. You are tired. You sit down and your TV starts calling you because advertisers know you just came home at your regular schedule. Some people love the idea of that future. I do not like those people.</comment>


Affordable water may soon dry up for 1/3 of Americans - <AUTHOR> http://www.pbs.org/newshour/updates/affordable-water-may-soon-dry-especially-live/ <comment><USER2> This hits home several ways. My wife runs an environmental company specializing in water concerns in Atlanta.

"In Atlanta, which spends more on water than any other state, there was a regulatory initiative to prevent stormwater from discharging into wastewater. The move prevented raw sewage from mixing into the streams used for drinking water."

These initiatives are based on Section 404 of the Clean Water Act which has reported to be up for massive cuts from the new administration. Water run off and sewage waste have a direct impact on clean drinking water in Atlanta and the potential weakening of Section 404 will result in dirtier and more expensive water:

[http://www.newsweek.com/trump-freezes-grants-approves- pipeli...](http://www.newsweek.com/trump-freezes-grants-approves-pipelines- and-considers-sharp-budget-cuts-epa-547738)

</comment><comment><USER3> Flint, Michigan still does not have access to clean, running water.

</comment><comment><USER4> This has been an under-analyzed / under-reported aspect of current political and economic changes in the U.S.: The relentless drive to privatize and profit off of erstwhile public resources.

The current leadership doesn't want to "fix" this. They want to maximize it.

</comment><comment><USER5> It might be time for Houston to consider catching, treating and reusing water that today runs to the Gulf of Mexico via our bayou system.</comment>


Ask HN: I'm about to switch from windows to mac – what do I need to know? - <AUTHOR> Hi,
Ive been using windows for years to a really low level (debugging user dumps etc.) but i'm thinking of getting a mac book pro and i've never really used a mac before.
My thinking is that I need a reliable laptop and want to get better with *nix like command line tools generally (I do use wsl but as windows is there always fall back to findstr/attrib etc).
I will mainly be running:
- chrome (azure, aws etc.) - vs code - pycharm - intellij
Am I crazy or does this make sense? I will use things like office but don't care about macros etc.
Just looking for encouragement really :)
Ted <comment><USER2> The tools you specify are already readily available on a Mac.

Office 2016+ I believe runs macros, earlier versions did not.

MS even has Visual Studio available for Mac now, mainly to support C# / .net development (GTK Gui).

You'll find iterm2 to be the best terminal available for Mac, it's a tool I use every day all day long.

Xcode is a phenomenal OSX native IDE, focused mostly on Swift / Objective C, C, and C++ though.

I run multiple Linux VMs using virtual box, just because I have to build things to run on embedded systems and some of the tools are difficult to setup on OSX. I think they can be, but at times it's easier to just push the easy button and build on Linux. I do nearly all my development with Xcode though, but I'm focused almost exclusively on C/C++ and sometimes Swift if I want a Gui layer for something I'm writing.

You'll want to install Homebrew, that will give you tons of tools that you're used to using on Linux.

Hexfiend is my goto hex editor.

Anaconda of course will give you all the python functionality you want.

Smartgit is a good Gui git tool.

I still use TextWrangler, it's deprecated (not 64 bit), and replaced with Bbedit which requires a subscription. This makes me sad and I'm working on switching to TextMate at the moment, but I have used TextWrangler for many years. Probably TextMate will be a reasonable replacement I suppose.

Karabiner is nice for remapping keys.

Caffeine is a handy utility to keep your screen awake.

I'm sure others will have additional suggestions. Play with it, don't be afraid to spend a few dollars on tools that will make your life easier -- everything I mentioned above is free but there are other things out there.

I love doing development on a Mac, there's no reason to be afraid of it.

<comment><AUTHOR> Thanks it is just it is quite a big investment so have been putting it off.

:)

</comment></comment><comment><USER3> While it isn't 100% clear what sort of development you do (I assume nothing/little windows specific as you didn't mention Visual Studio "proper"), but I would suggest it's an entirely reasonable thing to do.

My only real advice would be hardware-wise, get as much memory as you can practically afford. The internal SSD can be augmented with a TB3 or USB-C external with equivalent speeds and/or lower speeds for greater GB/$ ratio, but the memory you buy it with is the memory it will die with.

I used a 2011 MBP as my main/sole machine almost every day for close to 7 years, in no small part due to an aftermarket upgrade to max out the memory at 16GB.

<comment><AUTHOR> I used to do a lot of c/c++ mfc/atl but haven't used a visual studio c compiler for years.

Mainly python, c# etc.

Got it on the ram

</comment></comment><comment><USER4> On a new installation have a look at [https://github.com/Homebrew/homebrew- cask](https://github.com/Homebrew/homebrew-cask) There's packages for all the popular GUI apps. I made myself a script and it will install 20 desktop apps in one go without a single click (confirming terms of service or otherwise).</comment>


Death of the Mac Pro - <AUTHOR> http://www.cringely.com/2012/06/12/death-of-the-mac-pro/

<comment><USER2> But this is wrong. Cringely needs to read MacRumors!

[http://www.macrumors.com/2012/06/12/apple-spokesperson- confi...](http://www.macrumors.com/2012/06/12/apple-spokesperson-confirms-new- mac-pro-and-imac-designs-likely-coming-in-2013/)

Here is the relevant part of an (already confirmed) email Tim Cook sent to a pro customer:

 _Our Pro customers like you are really important to us. Although we didn't have a chance to talk about a new Mac Pro at today's event, don't worry as we're working on something really great for later next year._

</comment><comment><USER3> Apple is probably right here for most of their customers.

It is increasingly obvious that ubiquitous broadband network connections permit the offloading of computation and storage to the cloud.

Why sell the customer a server-style box, when Apple can rent the same compute capability from their cloud?

Furthermore, Mac Pro profits are rapidly decreasing as a share of total Apple profits, and Apple is ruthlessly focused on a few consumer-oriented product themes.</comment>


Distributed transactions are not microservices - <AUTHOR> https://www.talentica.com/blogs/distributed-transactions-are-not-micro-services/ <comment><USER2> Saga Pattern.

[https://blog.couchbase.com/saga-pattern-implement- business-t...](https://blog.couchbase.com/saga-pattern-implement-business- transactions-using-microservices-part/)

[https://microservices.io/patterns/data/saga.html](https://microservices.io/patterns/data/saga.html)

[https://developers.redhat.com/blog/2018/10/01/patterns- for-d...](https://developers.redhat.com/blog/2018/10/01/patterns-for- distributed-transactions-within-a-microservices-architecture/)

[https://www.enterpriseintegrationpatterns.com/patterns/conve...](https://www.enterpriseintegrationpatterns.com/patterns/conversation/CompensatingAction.html)

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

<comment><USER3> I think these kind of patterns add huge amount of complexity to the system. Also properly testing them will be quite challenging.

<comment><AUTHOR> I agreed, I like these patterns but I never encourage anyone to start with these patterns, First build a simple monolith to handle the situation, if there is a hard problem then and only then these should be applied, But these days I am seeing quite opposite though, I don't see enough evidence to start with these patterns and always use them as rule of thumb .

</comment></comment></comment><comment><USER4> This speaks volumes about how fraught with peril building microservices is. For me the prevailing message of this post is "don't do it at all unless you are willing to absorb this much complexity for the promised benefits".

<comment><AUTHOR> yes, thanks for reading

</comment></comment><comment><USER5> Services can talk to other services. i.e. In your example, the order service can speak to the inventory service to change the stock level. The 'API controller' (this is also a service!) can speak to the inventory service to get the current inventory - but it shouldn't be responsible for handling the transactions of other services.

I think the premise of using a monolithic service (your API "Controller") to handle transactions that it simply shouldn't be concerned with is the main problem here. i.e the problem is that the transaction should not be distributed, not that it is handled through multiple services.

I'm further confused at the reconciliation that seems to occur later in your example. Why is it bypassing the services and writing directly to the service DB itself?

<comment><USER6> Yep. The article seems to muddle up and conflate a bunch of poor practices with "microservices." All the "problems" given are really just poor decomposition of the system into non-discrete components. The "audit" solution is a bit kludgy too.

<comment><USER7> > poor decomposition of the system into non-discrete components.

You can tar an awful lot of microservices with that brush.

</comment></comment></comment><comment><USER8> Management doesn't care. Management doesn't read this or really even understand what a microservice is. They only know their VP told them to use them and they are the current hot stuff.

<comment><USER9> I'll be honest I get pretty sick of these types of "management doesn't care" comments. Not because they're wrong but because they ignore the obvious solution.

If someone at VP-level is making low-level tech decisions, GTFO. If your non- technical executive management even _wants_ to know what the low-level tech driving their business is, GTFO. If your manager, Director, VP, execs, etc will not listen to honest, calm "we really don't need ________ because {5 rational, evidence-backed reasons}," GTFO.

<comment><USER10> This, but also - these arguments tend to be very one-sided. The implication is that engineers would always do the right thing if pesky management just got out of the way. Is that true sometimes? Of course, there are plenty of shit management teams in the world. There are also plenty of engineers that, left undirected, would add unnecessary scope, introduce unnecessary technology, and create different types of problems.

If there really was one answer, and the answer was just as simple as "get rid of the whole management team, and you'll have a much better product at the end" then I have to imagine companies would have started doing this already. My experience being on both sides of this coin in my career is that: it's just not that easy.

<comment><USER11> Management shouldn't care about the stack because that isn't management's job. That's the IT Department's job. The scope of the project is management's job, as is the budget; the friction comes when they want to eat elephant on a dormouse budget, which is a good time for an IT staffer to leave if management is intransigent about refusing to understand trade-offs, but it's also the IT Department's job to explain costs and benefits in a way the non-technical can understand.

If the CEO is the lead developer and the head of IT and the CFO what signs all them checks, that's obviously different, and in that case everyone should probably understand everything. Otherwise, ask yourself how deep management gets into the minutiae of washing the toilets.

</comment></comment></comment></comment><comment><USER12> I feel like the e-commerce inventory example isn't a great one because the problem is generally solved by avoiding it.

Either:

Set the inventory amount in your e-commerce system to be less than the actual inventory (which is rarely accurate anyway). This is your safety stock and depends on how fast moving the item is and if it's a close-out that you are really trying to sell to zero. Then just handle exceptions at allocation-time when you're able to commit stock.

Or:

Avoid a two-phase commit problem by allocating stock at add-to-cart time with a ticketing system that allows a hold to be placed with a timeout. This is a more customer friendly approach that handles stampedes better, such as caused by marketing emails.

Either way, inventory management is like banking, aiming to be eventually consistent is a lot more realistic than being always consistent.

<comment><USER13> "Either way, inventory management is like banking, aiming to be eventually consistent is a lot more realistic than being always consistent."

Yeah I love those basic DB examples of transactions and why it's important using bank accounts when in real life banks are all eventually consistent because they had to solve the problem before distributed transactions were available.

</comment></comment><comment><USER14> This is a really tough problem to solve. I know Alibaba and WePay both have made solutions to try and handle it at scale

[https://github.com/seata/seata](https://github.com/seata/seata)

[https://wecode.wepay.com/posts/waltz-a-distributed-write- ahe...](https://wecode.wepay.com/posts/waltz-a-distributed-write-ahead-log)

At the end of the day I don't think anyone should be coding distributed transactions into their app's. If you need use a solution that abstracts them for you. Eventually we will get one into Vitess ( [https://vitess.io](https://vitess.io) ) when we have figured out something general purpose enough to work for lots of workloads

<comment><USER2> JBoss Narayana provides a useful implementation of the Saga Pattern that makes it fairly easy to plug that pattern into microservices interactions.

</comment></comment><comment><USER7> A classic:

Starbucks does not use two-phase commit

[https://www.enterpriseintegrationpatterns.com/ramblings/18_s...](https://www.enterpriseintegrationpatterns.com/ramblings/18_starbucks.html)

<comment><USER15> Hmm there are some reasons this isn't directly applicable. This mode of behavior is possible due to relying on payment processors ability to reliably transfer money, and the business's ability to verify that potential. I don't think Starbucks would with if they accepted hand written IOUs.

If you can't rely on an actors intent to such a degree, your actions need to also be less costly to be efficient.

Correlated Ids and idempotent end points with retry is pretty much a two phase commit. Something eventually checks and deals with exceptions.

Accounting for loss and developing ways to operate with it make a process viable.

</comment></comment><comment><USER16> A long time ago in a galaxy far away, I remember wishing that our "SOA" stack had support for WS-Transaction. Having come from an Oracle DB experience, I couldn't understand why anyone would willingly go "backwards" and give up the ability to elegantly manage distributed transactions.

<comment><AUTHOR> It seems the term scaling changes everything, SOA is good but in many cases scaling the SOA might not solve the problems and you need to pick the path of optimization, and microservices are the possible way to optimize the service, Now if you need transaction (not in all cases) as well then It becomes tricky.

</comment></comment><comment><USER17> Speaking of micro transactions - this was a recent serendipitous discovery that I'm still digesting but thoroughly enjoying: [https://platformdesigntoolkit.com/](https://platformdesigntoolkit.com/)

</comment><comment><USER18> > Don't try to build two-phase commit, instead go for an arbitrator pattern > which essentially supports resiliency, retry, error handling, timeout > handling, and rollback.

What's the arbitrator pattern? Google failed me.

<comment><AUTHOR> [https://link.springer.com/chapter/10.1007/978-3-642-30885-7_...](https://link.springer.com/chapter/10.1007/978-3-642-30885-7_23)</comment></comment>