Sentinels Can Be Faster - <AUTHOR> https://lemire.me/blog/2020/09/03/sentinels-can-be-faster/ <comment><USER2> This is a rather weird article. Of course sentinels can be faster in some very particular algorithms. That's not the core contention. The core contention is that sentinels in general cause more speed losses than speed gains over the entirety of the application. Importantly, many useful algorithms such as string copying, string comparison, and string concatenation can be much more efficient using a size field.

<comment><USER3> I think this is something C++ (and other later ones) got right; A size field _and_ a sentinel'd (null-terminated) char[]. So getting the length only requires reading 4 or 8 bytes, but if you want to pass that string to a function that expects a null terminated string, just pass x.c_str().

<comment><USER4> This seems useful if you're expecting to pass your strings to a lot of C libraries, which is probably sensible for C++ (especially whatever vintage of C++ happened to introduce this string design); however, surely this is a negligible concern for most mainstream languages?

<comment><USER5> > This seems useful if you're expecting to pass your strings to a lot of C > libraries, which is probably sensible for C++ (especially whatever vintage > of C++ happened to introduce this string design); however, surely this is a > negligible concern for most mainstream languages?

No, the system call interface of the operating system expects NUL-terminated strings as parameters all over the place, especially the filesystem APIs.

<comment><USER6> Who came first, the chicken or the egg?

EDIT: Okay, this is at -1, maybe I shouldn't be slightly obtuse. These questions are, in my mind, two sides of the same coin. The OS expects null terminated strings, not for some inherent reason, but because C and UNIX grew up together. There's no _inherent_ reason you can't have an OS that does not use sentinels to demarcate strings.

<comment><USER4> Probably my fault for phrasing the question ambiguously, but the parent interpreted my question as I intended it to be interpreted. Interfacing with the system libraries is a common enough case for using null-terminated strings.

I'm actually a little curious how what these low-level APIs look like and how "modern" languages handle efficiently converting to null-terminated strings. Do they just copy everything while C/C++/etc would pass a straight reference? Also, what do the underlying syscall APIs look like?

<comment><USER6> It's all good. You are 100% right that it's still a good use-case.

And yeah, in Rust we have a separate CString type that's null terminated, so you may need a copy to move between the two worlds. It just depends, if you're only reading, for example, then you can create a pointer + len where the length doesn't include the 0, and that's effectively zero cost.

You got me curious about my days as a kid putting "pascal" in front of Mac System 7 stuff; I believe that it only accepted Pascal strings. I also vaguely remember people doing funny stuff like null terminating pascal strings anyway and then putting the length before the actual pointer so that you get both in one...

<comment><USER3> Weren't "Pascal strings" limited in that they were only a byte though? So, your string could only be 255 bytes long (conveniently going to a nice round 256 when you add the length byte).

<comment><USER6> Yep!

</comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER7> I put the benchmark into quick-bench but could not replicate the 40% result. The sentinel version was faster but only slightly.

[https://quick-bench.com/q/314Z81FskTlcDqMCUHFVhWmDz8Q](https://quick- bench.com/q/314Z81FskTlcDqMCUHFVhWmDz8Q)

Update 1: After moving some constants around, I get the 40% result:

[https://quick-bench.com/q/lPrpQTAyDQuOoKS9MBWCTBXk1TE](https://quick- bench.com/q/lPrpQTAyDQuOoKS9MBWCTBXk1TE)

No idea why it made such a big difference to the benchmark.

Update 2: If the test order is reversed, the result goes back to being only slightly faster for the sentinel version:

[https://quick-bench.com/q/Ds7aqe5-6md_tTPndOK54ltYZmE](https://quick- bench.com/q/Ds7aqe5-6md_tTPndOK54ltYZmE)

<comment><USER8> In the first two links you sent, the 40% result looks like the baseline case getting slower, not the unit under test getting faster. The core assembly looks look identical in both cases.

<comment><USER9> Well spotted; great for sild! Looks like the 40% claim was due to a bug in benchmarking (which makes sense, and can happen).

</comment></comment></comment><comment><USER10> I think most modern languages shifted towards slices due to security issues with sentinels. C++ span, rust, zig, go. It's very sad we need to use libc interfaces and deal with null terminated byte sequences.

<comment><USER6> Not just security issues, it also makes substrings zero copy.

<comment><USER11> That can be problematic, too.

If your language has a garbage collector, it may mean tiny substrings keep huge strings alive. Java moved away from using slices ([https://dzone.com/articles/changes-stringsubstring- java-7](https://dzone.com/articles/changes-stringsubstring-java-7)), I think for that reason.

If your language isn't garbage collected, it can cause problems if the substring must outlive the string it was extracted from. That means that, for some functions, you'll have to decide whether to return the slice or make the copy.

(In Rust, that means the slice has a different 'type' (not sure what they call it), that of a string whose lifetime is bound to the original string, and the compiler will check that you won't make the mistake of having the slice outlive it's source)

<comment><USER12> How huge typical strings are that this is a problem? It could be a problem for arrays but seems unlikely for strings.

<comment><USER11> Some strings start live as part of multi-megabyte text files that get slurped in. Happened quite a bit with HTML/XML parsers. Workaround was to do _new String(s.substring(…))_ about everywhere. Real world case (with few details) at [https://stackoverflow.com/questions/10951812/java-not- garbag...](https://stackoverflow.com/questions/10951812/java-not-garbage- collecting-memory).

Also, using slices doesn't come for free; it makes all String objects larger because, apart from the reference to the underlying character array, an offset and length must be kept around.

</comment></comment></comment></comment></comment><comment><USER13> I never thought of null-termination as a "sentinel". I thought sentinel means strategically putting somewhere a value to avoid having to check for termination condition. Null-termination is not a sentinel, IMO. It is the opposite - terminator, which has to be explicitly checked for. Am I wrong here?

BTW. If you really want speed, SIMD will obliterate any non-SIMD solution, and my bet would be that most of the time SIMD will be easier to implement with length prefix because it will not have to handle a special case of null- termination. Someone correct me if I'm wrong.

Trailing zero is a a typical case of a short-signed hack. More naive, simpler, natural solution (length prefix) actually works better, especially long term, where other things change (hardware architecture, performance and resource constraint, use cases).

</comment><comment><USER14> This is really less "sentinels can be faster" and more "assuming invariants can be faster because you're reducing comparisons".

<comment><USER15> This. The whole argument only holds because you can choose `isspace` to return false for '\0'. You should be able to choose whichever sentinel fits to the required invariant, and C's global string "sentinel" is less useful in that regard. If you need a sentinel you should be able to push one beforehand anyway.

</comment></comment><comment><USER16> I really like Rust's approach of keeping string length in the pointer.

It allows making substrings without copying (and there's no costly substring gotcha you get in GC languages, because the borrow checker will loudly remind you when you try to keep the substring longer than the original string).

In string-processing algorithms the length usually stays in a register, so (unlike Pascal string approach) it doesn't contribute to on-heap cost of the string. Knowing length ahead of time allows having SIMD-optimized loops.

</comment><comment><USER17> This is not weird or theoretical.

Sometimes you find that in some complicated system, there's a big chunk of overhead which you spend just parsing things. So, carefully, thinking about the consequences, you can decide to use a sentinel for end of input rather than length.

A larger, practical example: a C++ compiler spends a shocking amount of time just doing lexical analysis on its inputs. One thing that Clang does to speed it up is to get rid of the length check, just like suggested in the article.

[https://github.com/llvm- mirror/clang/blob/master/lib/Lex/Lex...](https://github.com/llvm- mirror/clang/blob/master/lib/Lex/Lexer.cpp#L3171)

        /// LexTokenInternal - This implements a simple C family lexer.  It is an
        /// extremely performance critical piece of code.  This assumes that the buffer
        /// has a null character at the end of the file. [...]
        bool Lexer::LexTokenInternal(Token &Result, bool TokAtPhysicalStartOfLine) {
          [...]
          if ((*CurPtr == ' ') || (*CurPtr == '\t')) {
            ++CurPtr;
            while ((*CurPtr == ' ') || (*CurPtr == '\t'))
              ++CurPtr;
            [...]
          }
          [...]
        }

There are a number of places in the world where you might find that text parsing is performance-critical. Note that in the rest of the code base, Clang uses really quite standard and boring std::string to represent strings. You don't have to use sentinels everywhere, but it's a trick to keep up your sleeve for the cases where it makes a difference.

And of course, you keep the parts of your code with sentinels self-contained because it can be hard to figure out whether the code is correct without a close reading.

</comment><comment><USER18> Another classical example of sentinels is improving a linear search by inserting the key as the last element.

<comment><USER11> Classical, but often not the best idea, nowadays.

You often cannot know whether that element is writable, and if it is, that will cause problems when running concurrent searches (even for the same key)

</comment></comment><comment><USER19> Any string representation is faster for some hand-picked task. But still, I think it's reasonable to assert that certain ones are better than others for general use.

</comment><comment><USER20> EDIT: Never mind, I mis-read the code in the blog...

<comment><USER17> I think you may have misinterpreted the code.

> Zero spaces is a number of leading spaces. If you feed his efficient > solution a string without a leading space, it'll read past the end of the > string and into undefined memory until the program either crashes or reads > some arbitrary space character (0x20) from some other string. If it contains > spaces but doesn't start with one, you'll think it has more leading spaces > than it actually does.

I don't know what code you are referring to, but I'm looking at this code:

        const char * skip_leading_spaces(const char * start) {
          while(is_space(*start)) {
            start++;
          }
          return start;
        }

And this correctly handles the case with zero leading spaces. It correctly handles empty strings.

Recall that is_space('\0') is false (or at least isspace('\0') is false). Also recall that it is valid to read the \0 byte at the end of a string.

I find it a bit unusual that you are capitalizing NULL. My interpretation is that you are talking about the byte '\0', which is also called the null byte, and not the NULL pointer.</comment></comment>


A Field Guide to Power Transmission Lines - <AUTHOR> https://hackaday.com/2019/06/11/a-field-guide-to-transmission-lines/ <comment><USER2> > Thicker wires will heat up less for a given amount of current, increasing > the carrying capacity of the circuit. One solution to increasing the > effective thickness of a conductor is to "bundle" several conductors a few > inches apart from one another, allowing for a larger increase in current for > less cost than a conductor that is simply double the size.

In power engineering at university we were taught that the separation of the wires within a conductor, to increase the effective diameter, is primarily about reducing the self-inductance rather than dissipating heat. From memory, it's along the lines that the separation effectively increases the diameter of the conductor, which in turn reduces the intensity of the magnetic field, reduces the self-inductance and allows more power transfer for a given voltage and current.

The article got it right in saying spacing the wires gives an increase in current for a given cross-section of conductor, but the main reason is reduced inductance rather than the reduction in resistance due to it running cooler. There will be some reduction in resistive losses due to cooler conductors, but the main gain is the reduction in reactive power, which otherwise causes current flow with no power transfer.

<comment><USER3> (I'd edit my post, but its long since too late for that... mea culpa)

There's a couple of things being mixed up here. Stranded wire versus bar is a mechanical issue. But what you were talking about is the separators you sometimes see to run several separate cables alongside each other in the same phase. In this case, there are a couple of things being overcome. For starters, the skin depth of Al and Cu is only about 10mm at 50-60 Hz. However, the form of the limit is not the reactive power loss, its the resistive power loss of the conductor. Eventually, making it thicker just stops decreasing its resistance at that frequency.

The article hinted at this in the discussion on cable construction, when the author was describing wraps of aluminum conductor around a steel core. Now, imagine an A/B comparison, where the A side is a very large diameter cylinder of Al strands around a large steel core. The B side is three smaller such cylinders separated by air, with the same total circumference of Al. The B side is much lighter overall for the same current-carrying capacity. You might like to hollow out the A side, except that you need to endure the compressive stress of the outer sheath of Al conductors bearing down on the structural core somehow. Enter the periodically spaced triangular separators that actually are present on the B side.

</comment></comment><comment><USER4> I saw this linked from the comments, and agree with the commenter that if you liked that, you'll love this:

"Why three prongs?"

[http://amasci.com/amateur/whygnd.html](http://amasci.com/amateur/whygnd.html)

<comment><USER5> Thank you!

I read this wonderful article a few years ago and have been looking for it ever since.

I recommend it highly to every engineer who builds software, hardware, or whatever. A great story of what can go wrong ( _very_ wrong) and how even the best attempts to fix it may not work and may in some cases make things worse.

It's superbly written and very educational. The "Age of Electrical Outlets Having a Little Face and Different Sized Eyes," indeed. :-)

</comment></comment><comment><USER6> Here in California, the State government has maps of all of the transmission infrastructure, from the generating stations to the utility substations, and the transmission lines in between.

[https://www.energy.ca.gov/maps/](https://www.energy.ca.gov/maps/)

<comment><USER7> See also [https://openinframap.org/](https://openinframap.org/) which pulls from OpenStreetMap. (I'm one of the contributors to the mapping of the Bay Area's electrical infrastructure.)

<comment><USER8> Unrelated but DAAAAMN OpenStreetMap is blowing away Google Maps in terms of performance here.

<comment><USER9> What you're seeing on that site isn't actually OpenStreetMap. It's data points from OpenStreetMap that are overlayed on top of Mapbox [1], with the vector tiles served up by Tegola.

1: [https://docs.mapbox.com/mapbox-gl-js/api/](https://docs.mapbox.com/mapbox- gl-js/api/)

2: [https://tegola.io/](https://tegola.io/)

</comment></comment></comment></comment><comment><USER10> From the end of the piece:

>Moving into the future, it's hard to say how much more modern the power grid can get since the underlying principles are so simple: three phases per circuit and structures large enough to keep them from sagging into something that could cause a fault. There is a lot of talk of the smart grid, but the solution to most of the issues with the power system is often simply to build more circuits as the demand for electricity rises. It's a difficult problem to engineer ourselves out of, especially with the increasing age of the power grid itself, and at some point is simply becomes a numbers game of how many watts can be moved from place to place.

Technological progress could change the landscape quite a bit: [https://en.wikipedia.org/wiki/Space- based_solar_power](https://en.wikipedia.org/wiki/Space-based_solar_power)

<comment><USER11> I wonder if this will be a tough sell to the generation that grew up playing Sim City 2000, which had this kind of system going haywire as a disaster scenario.

</comment></comment><comment><USER12> There is a book from the mid 1960s (I think the last revision, a few older ones) that is still basically current (hehe) by Westinghouse called "Electrical Transmission and Distribution Reference Book"

If you liked this you will like it: [https://www.amazon.com/Electrical- Transmission-Distribution-...](https://www.amazon.com/Electrical-Transmission- Distribution-Reference-Book/dp/B000AOMQV2)

<comment><USER13> Thanks for the recommendation. For a more modern take, the chapter on "The Power Grid" in Brian Hayes' "Infrastructure" is tremendous as well: [http://industrial-landscape.com](http://industrial-landscape.com)

</comment></comment><comment><USER14> Related: [https://hackaday.com/2016/02/22/a-field-guide-to-the- north-a...](https://hackaday.com/2016/02/22/a-field-guide-to-the-north- american-utility-pole/)

<comment><USER15> And in the underground world things get a little more complicated with submersible transformers, vaults, etc. but the general concepts are the same.

</comment></comment><comment><USER16> What's the meaning of "phase" as used in this article, as in a "three phases per circuit"?

<comment><USER17> AC power has a voltage that (in North America) oscillates high and low at a rate of 60 cycles per second.

Three phase AC power sends power along three wires. The timing of the oscillations on each wire is shifted by one-third of a cycle relative to the other wires, so they all reach peak voltage at slightly different times. We call this a "phase shift" between the voltages, or that the voltages are "out of phase".

If these wires were connected to a 3-phase AC motor, the motor would spin because the current is drawn in succession along one coil and then the next, leading the rotor to follow. The motor coils are also called "phases".

Each wire is sometimes called a "phase" as shorthand.

<comment><USER18> That is a best explanation of three phase I have ever read, and I have read a lot of different explanations.

<comment><USER19> Yeah, it had never quite clicked for me, but now it makes so much sense that I kind of feel silly. Great explanation.

<comment><USER17> Thank you both, I am really happy to hear that =)

</comment></comment></comment></comment></comment><comment><USER20> Well this was an educational read, thanks for sharing. I particularly enjoyed finding out about surface transmission characteristics of alternating current and ACSR bundles. More on HVDC would be good.

It was uncomfortable too: I feel about power lines the way some people feel about snakes or heights. I find being near or under them extremely disconcerting. I even have an infrequently recurring nightmare where I find myself having to crawl near one of the thick cables. They make my skin crawl.

<comment><USER21> > More on HVDC would be good.

Agreed. There's two things about HVDC worth mentioning:

It is High-Voltage because high voltage is efficient for transmission. On a first-order approximation, resistive losses are proportional to _current,_ not power. Since P=VA, the resistive losses decrease for a given power as more of the power shifts from the A to the V.

Second, a neat property of DC transmission is it allows phase-decoupling between grids. For you to get a clean 120V, 60Hz power line at your outlet, all the transmission and distribution infrastructure needs to be tightly balanced. When that 60Hz starts to deviate by like 0.01%, alarm bells start going off at the utility. Now imagine keeping that AC stuff sync'd on a state- wide transmission line. If you make the line DC instead, you can transmit power willy-nilly across the length of the line and just make sure it syncs up at the ends when you change it back to AC.

We haven't traditionally used DC because it has higher transmission losses than AC until you get up to the ultra-high voltages (that's famously why Edison's AC system won out to Tesla's DC in NYC back in the day). My understanding is it's just been really hard to get up to the ultra-high voltages needed to make it work. 12V DC transmission barely works at even house-scale because of the resistive losses, but when you get up to 1MV like they're building in China, it starts to get attractive, especially when linking different sub-grids half a continent apart.

<comment><USER22> I believe Edison was the DC backer while Tesla was behind AC.

<comment><USER21> You're right, I had it backwards. Thanks!

</comment></comment></comment></comment><comment><USER23> In France i saw some pylons which reminded me of sleeping owls:

[https://www.flickr.com/photos/128452384@N02/43626380385/](https://www.flickr.com/photos/128452384@N02/43626380385/)

</comment><comment><USER24> The transmission towers might be easy to design for flat lands and plateaus but not so much for hilly areas. I am a always fascinated by transmission towers in the mountains, wether I'm driving on the highway and see them far away or I'm hiking and run into one. I'm amazed by how they get such big structures up and running in those areas.

Edit: I just think the author kind of rubbed them off is all.

</comment><comment><USER25> In 2015 the Center for Land Use Interpretation did a bus tour of high-voltage infrastructure in Southern California. The write-up has some interesting photos:

[http://www.clui.org/newsletter/winter-2015/high-voltage- bus-...](http://www.clui.org/newsletter/winter-2015/high-voltage-bus-tour)

</comment><comment><USER26> Reading this I wonder how the circuit is actually closed? Are there always pairs of conductors on each line?

<comment><USER27> When the power is generated, it is usually done so by a 3 phase generator that is separated by 120 degrees of rotation. All 3 phases inside the generator are bonded together on one end. The other end are the 3 current carrying conductors leaving the generator. The bonding of the phases on each side of the conductors is what creates the closed circuit.

[https://en.wikipedia.org/wiki/Three- phase_electric_power](https://en.wikipedia.org/wiki/Three- phase_electric_power)

</comment></comment><comment><USER28> "the voltages can be as high as 500 kV" actually the highest voltage lines are slightly north of 1MV

</comment><comment><USER29> I always assumed those triangle lines carried all three phases, one in each wire.

</comment><comment><USER30> If only Mr Tesla got the investment and we wouldn't have to see these things.

[https://teslaresearch.jimdo.com/wardenclyffe- lab-1901-1906/c...](https://teslaresearch.jimdo.com/wardenclyffe- lab-1901-1906/connection-to-earth/)

</comment><comment><USER31> Title should say "Power Transmission Lines", because transmission lines are a broader concept.

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

<comment><USER32> >transmission lines are a broader concept.

Indeed...

[https://www.f150online.com/galleries/images/7538-10939-17442...](https://www.f150online.com/galleries/images/7538-10939-174420.gif)</comment></comment>


Show HN: Startup Weekend Project: under development NOW - <AUTHOR> http://www.amyiris.com

<comment><AUTHOR> Hey guys, we're coding feverish right now, so please bear with us. The site is pretty raw, but you get the idea of the concept if you read the docs.

Can't talk now... gotta code!!!

But if you can vote for us, between 6:30 an 6:45 Eastern time (New York time), it will help us tremendously! SMS text 56782 to 22333.

Thanks!</comment>


Robots to start killing crown-of-thorns starfish on Great Barrier Reef - <AUTHOR> http://www.abc.net.au/news/2018-08-31/crown-of-thorns-starfish-killing-robot-great-barrier-reef-qld/10183072 <comment><USER2> The barrier reef is thousands of kilometres long. That's a lot of robots.

</comment><comment><USER3> Fire, the wheel, duct tape, and now another human milestone: killer robots...

<comment><USER4> Destroy, move, fix, destroy. Full circle.

</comment></comment><comment><USER5> Old, 2015

<comment><AUTHOR> RangerBot is an advanced version of the 2015 robot, with a newer submersible design, handheld remote-control and computer vision to identify invasive species.

"In 2015, an early prototype of the robot "COTSbot" made international news. Now its successor the RangerBot is significantly more advanced.

The RangerBot is equipped with a vision system that allows it to "see" underwater while being operated using a tablet.

QUT Professor Matt Dunbabin said the robot used real-time vision to navigate and identify starfish."

</comment></comment><comment><USER6> Any headline beginning with "Robots ready to start killing..." really is unnerving.

</comment><comment><USER7> > The starfish is recognised as one of three major threats to the World > Heritage-listed Great Barrier Reef, along with coral bleaching and cyclone > damage.

Of course, it's easier to kill something than to tackle global warming...

<comment><USER8> Skynet will eventually recognize humans as a threat to the Great Barrier Reef.

<comment><USER9> If we build robots that can destroy, those robots will ultimately not be under the control of governments, but instead corporations. Eventually those corporations will wrestle control out of the hands of governments through hard power. There won't be much that can stop them.

<comment><USER10> Nice try starfish

<comment><USER9> First they came for the starfish, but I didn't say anything because I was not a starfish.

</comment></comment></comment></comment></comment><comment><USER11> Isn't the great barrier reef about to get wiped out by global warming anyway?

Might as well let the starfish have at it.

<comment><USER12> Please don't post unsubstantive comments here.

<comment><USER13> [https://www.nature.com/articles/s41586-018-0041-2](https://www.nature.com/articles/s41586-018-0041-2)

I'm assuming OP's referring to the bleaching caused by global warming. 2016 event killed off 29% of the coral there.

<comment><USER12> A comment can be about that and still be unsubstantive. Flippant comments on large-topics tend to be trollish, and that one was over the line.

</comment></comment></comment></comment><comment><USER14> Reminds me of another short-sighted killing spree that resulted in upsetting the ecological balance. [https://en.wikipedia.org/wiki/Four_Pests_Campaign](https://en.wikipedia.org/wiki/Four_Pests_Campaign)

I wonder who approved this one and what research they read that led them to believe that this can be good in the long term.

<comment><USER15> Crown of Thorns is an invasive species. It's not indigenous to the area.

<comment><USER16> And robots are not yet self-replicators. If this is a bad idea, it's at least bad in a new way, right?

</comment></comment></comment><comment><USER17> Just seems foolish to kill them just for living. If starfish are successful, why don't we just find a way to eat their delicious starmeat? I for one would love to goto a seafood star bar. Get my bib on and chow down.

<comment><USER18> We tried this with lionfish in the Caribbean; it is just really challenging to catch them in a non-destructive way so they are economically viable. And IMO they don't taste very good unless fried, at which point everything tastes the same.

<comment><USER19> There's always animal feed, or to be used for fat or protein isolates

<comment><USER18> Yes, but sending a human scuba diver down 3h/day to catch max 20kg of lionfish for $50-100 on loaded cost per dive, or $150-300/day is...not an efficient solution for that. If the fish could be sold at enough of a premium it might defray some of those costs, but for animal feed you'd be about $0.50/kg.

<comment><USER20> killing robots -> harvesting robots

<comment><USER18> Yeah, robots might dramatically reduce the cost, making it viable.</comment></comment></comment></comment></comment></comment>


How Your Textbook Dollars Are Divvied Up - <AUTHOR> http://www.usnews.com/news/articles/2012/08/28/how-your-textbook-dollars-are-divvied-up? <comment><USER2> This should be an infographic, not a 3 page article</comment>


What the Heck Is a "Progressive Web App"? Seriously - <AUTHOR> https://dev.to/ben/what-the-heck-is-a-progressive-web-app-seriously-923 <comment><USER3> "Progressive Web App" is branding. I think, as a developer, you can feel free to ignore the term entirely and instead focus on the Service Worker API, Notifications API, Push, etc. etc.

However, when you're talking to a product manager or some other higher-up that doesn't have the same level of technical insight, this bundle of technologies becomes very time-consuming to explain. That's when you break out "Progressive Web App" \- a web site that progressively becomes more like an app the more people use it.

<comment><USER4> > a web site, that progressively becomes more like an app the more people use > it.

I like how you've given the best definition in this thread, and IMHO shown that it's a concept that goes beyond this or that API, right after giving us the its-marketing-for-nontechnical-idiots spiel.

<comment><USER3> Heh, I just think "PWAs" are like the famous definition of obscenity - <USER2> know it when you see it. But that doesn't translate very well (or, at all) to actual technical requirements, so we talk about specific APIs at appropriate points.

And I wouldn't say the non-technical folks are idiots! They know a lot of stuff I don't, you just need to nail the overlap in what we both know. And given how difficult it is to explain the Service Worker API to even a skilled developer, best to take a pass.

<comment><USER5> What are some examples of progressive web apps?

<comment><USER3> mobile.twitter.com is one that comes to mind - it uses push notifications, lets you add to your home screen and caches at least some stuff offline, though I don't know how much.

<comment><USER5> If it's hard to think of examples, I'm skeptical that PWA means anything.

<comment><USER3> ...I just gave an example?

<comment><USER5> All I meant was, if someone asks "What's a desktop app?" or "What's an iOS app?" or "What's a website?" you can rattle off 100 examples without breaking a sweat.

"What's happiness?" on the other hand is subjective. You could describe things that make you happy, but it wouldn't make sense to point to a banana and say "That's happiness." And if you ask "Am I happy?" the answer probably isn't boolean.

"What's a PWA?" seems to fall into the latter category. If so, then we're treading into philosophy territory, which has claimed countless victims over millennia. You can spend a lifetime trying to define love, but at the end of it, you probably won't produce work that can be built on and extended, the way scientific papers can.

It's notoriously difficult to pin down philosophical concepts into discrete buckets of meaning. We have to operate at the resolution of words. They break if you push them too far.

I think it's important to distinguish these two domains. If we can't effortlessly point to dozens of examples of PWAs, it might be better to reject the notion that PWAs can be defined at all.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER6> I thought use of the Service Worker API was the primary feature defining a PWA. If it's a SPA and is able to be used offline, then it's a PWA. Also, lots of people then use Web App Install banners for PWAs.

<comment><AUTHOR> Google says "If you're building a Progressive Web App, consider using a service worker so that your app can work offline."

What does "consider" mean here?

And I'm pretty sure SPA is also not a criteria for PWAs, it's just a suggestion.

And also, the install banner is not really yours, it's the browser's functionality.

Per Google:

> Chrome uses a set of criteria and visit frequency heuristics to determine > when to show the banner.

<comment><USER7> My favorite part of the whole PWA marketing push is that they encourage use of the Service Worker API for offline caching, but leave cache invalidation / cleanup as an exercise to the reader. "Do it the way it makes sense for your application" is a technically correct answer, but I assume translates to "never" for 99% of us with tight deadlines.

<comment><USER8> This[0] might help you.

[0]: [https://workboxjs.org](https://workboxjs.org)

</comment></comment></comment></comment><comment><USER9> Can anyone explain to me what a "downasaur" is? I've not used Android, so I don't know this term.

Also, I'm not sure progressive anything on the web is a better experience for users. I have a reasonably fast connection everywhere I use the web and I find it a much worse experience when I load a website and see a really low-res version of images that suddenly changes to high res. Likewise, seeing all the text laid out in one font only to have it suddenly jump seconds later when it's done "progressively" downloading the font that's barely different from the standard one.

It seems like what would be more helpful is a way to understand the speed of the connection and choose what to send based on that, rather than assuming everyone has a bad connection. Or make it so your web site doesn't need a bunch of cruft like fonts that the user doesn't care about and just loads quickly regardless of connection speed.

<comment><USER10> I'm guessing it refers to the fact that on Android Chrome, when there is a error connecting to a site, the error screen has a little pixel art dinosaur on it, (which also has a little game included as an easter egg).

[https://i.ytimg.com/vi/XhkHbI_l-0M/maxresdefault.jpg](https://i.ytimg.com/vi/XhkHbI_l-0M/maxresdefault.jpg)

</comment></comment><comment><USER11> WARNING: If you question the hype, they take away your Hip Card, and toss you into the Fogie Bin.

</comment><comment><USER12> I understand wikipedia isn't an absolute source, it's a summary of opinions and research. And what follows is my own opinion, though I'm linking to wikipedia for background and context.

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

I would draw attention to this particular line:

"Progressive - Work for every user, regardless of browser choice because they're built with progressive enhancement as a core tenet."

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

Here's why I like this - "progressive" isn't just a nice, modern sounding word, the way "rad" or "radical" doesn't actually mean "nifty" or "cool", even if it came to be used that way in slang. Progressive has a very specific meaning, which is that it was built through progressive enhancement.

Progressive enhancement, to me[1], is a very different principle from the app that is built as a javascript heavy front end, even if that technology gracefully degrades to plain html ("graceful degradation"). Progressive enhancement is just one strategy for achieving graceful degradation (which might not be the primary motivation, it can be a by-product). You work from content, start with the most basic presentation, and add technologies progressively, CSS, JavaScript, and so forth.

I think "progressive" is one of those great sounding words that has come to mean "an excellent and forward looking web experience". This is what happens when you use a great sounding word to describe a more narrow principle or technique (re, RIP, "Agile"). In this case, it was a reasonable use of the word - progressive can mean "in stages" rather than "forward thinking", but there is an ambiguity here, and I think this recent post is a result of that ambiguity.

[1] I say "to me" here not because this is necessarily my own personal opinion, but because I'm not 100% this is the intended meaning. I may follow those reference links in the wikipedia article and see what was meant. I _think_ this is the case (built in stages, progressively), but I have to qualify it here because I'm not sure.

</comment><comment><USER13> "Google plays a central role in this confusion because they are the organization most strongly attempting to blur the lines between the open web and their platform. Google blurs the line between this is a tool to interact with Google products and this is a direction or philosophy for web development. It can be hard to follow."

Well, between PWA and AMP, and Google's recent hard pushes to both developers and corporate America to adopt them, I can see where that confusion would come in.

In the last 6-8 months, I've been watching and fielding inquiries from clients whom Google's approached on AMP, seen Google holding and inviting corporate dev teams (and marketers) to PWA/AMP hackathons, etc. It's really a full-court press these days, and line where the web ends and Google's ecosystem begins is starting to become lost on plenty of people.

</comment><comment><USER14> Essentially a rebranding of mobile friendly SPA to fit Google's vision is all I've ever been able to determine.

</comment><comment><USER15> If your site goes directly to a download the app page, it's not a PWA

[https://developers.google.com/web/fundamentals/codelabs/offl...](https://developers.google.com/web/fundamentals/codelabs/offline/)

</comment><comment><USER16> I always thought it was a web app that functions reasonably even on older browsers with JS turned off (for example). Then the experience gets "progressively better" if you have a newer browser, and allow JS to execute.

Or am I confusing terminology?

<comment><USER6> You're confusing terminology: that's progressive enhancement. Applies to both CSS and JS.

PWA is pretty much all though JS APIs, primarily the Service Worker API.

Two different concepts.

</comment></comment><comment><USER17> well, one thing is for sure, it "never shows the downasour", and has 'silky smooth' animations and 'no janky scrolling'

probably drinks obnoxiously obscure 'craft' beers and enjoys farm-to-table heirloom tomatoes too.

</comment><comment><USER18> Used to work at a PWA shop (yeah they exist) selling PWA at enterprise level and this is how I explain it to people:

        SPA + Push Notificaton + Add to Home Screen Launches SPA in Full Screen = PWA

There's nothing proprietary or unique about PWA, it's just another _way_ that Google is telling developers to "organize" their effort around to easily allow people to _install_ SPA.

To the average user, at least on high end phones, it really is jank free (YMMV)....but if you don't have LTE and on 3g, it will be slow regardless where your user will be staring at the loading screen for many seconds.

The progressive philosophy is to display a base level SPA written in some Javascript framework and enhance the experience depending if Service Worker is supported or not (you will need SW for Add-To-Home & Push Notifications).

I agree with the article that Google's desire to push their platform with things like AMP are increasingly confusing. The big strategic hurdle from a competitive landscape is as Amazon is gobbling up e-commerce (I think 1/3 US purchase online is Amazon don't quote me) and they want to promote struggling retailers and e-commerce businesses that buys their ads by making it faster and more like an app that runs in the browser so it's more discoverable.

The whole PWA language seems to be designed around architects and higher decision makers in e-commerce companies who ultimately decide what their farm of developers will get to play with and honestly I don't blame the confusion from folks on the receiving end of PWA marketing message, it's not at all aimed at answering concerns from engineering or finance (CAPEX _AND_ OPEX for what?)

Currently, Google's stance is that the whole web should be either AMP or PWA or PWAMP ([https://twitter.com/hashtag/pwamp?lang=en](https://twitter.com/hashtag/pwamp?lang=en)) and it's not clear why the investment should be made and today.

Apparently, the vague messaging from Chrome team is also felt around Google and the general feedback is that it's not seen as a "painkiller" but PWA is more of a "vitamin" from the perspective of retailer executives--sure you made it more engaging and faster to checkout but it doesn't solve our deeper demand issues that is further plagued by highly leveraged brick & mortar expansion decisions 10 years ago which we are now writing off, as we've learned the other thing the internet is for isn't just porn but mindless purchases made on Amazon who convinced the world its okay to pay extra for peace of mind and consistent delivery times.

</comment><comment><USER19> I thought it was a web app that supports equality, a woman's right to choose, and reasonable gun control regulations.

</comment><comment><USER20> It's similar in concept to progressive rock, house or trance.

<comment><USER21> This has the potential to be an interesting analogy, but I think you need to do a little work in defining "progressive" in the context of music, or else you're just pushing the ambiguity back a step.

<comment><USER17> he's saying it's like the original thing, only not as good but more shiny sounding.</comment></comment></comment>


Stripe coming to Canada - <AUTHOR> https://stripe.com/global Just got my beta invite. Its a good day. <comment><USER2> Can't wait till they come to Europe. We need this so much it's unbelievable. Payment over here absolutely sucks.

</comment><comment><USER3> Where does it say that?

<comment><AUTHOR> Does not actually say it there. I just thought others who may have signed up from Canada may like a heads up. Here is the [slightly redacted] email from stripe:

Hi,

We're getting in touch because you asked to be notified when Stripe was ready for users in Canada. Good news: that time is near, and we're incredibly excited to invite you to our limited beta.

Get started here: <https://stripe.com/welcome/XXXXXXXXXX>

As of today, you can accept Visa and MasterCard transactions, and you can choose to accept payments denominated either in Canadian dollars or U.S. dollars. (If you need to accept both currencies, you'll need to create two accounts.) We'll be adding support for American Express soon. Other than that, all our docs and features apply, so jump in at <https://stripe.com/docs>.

We'd be very grateful for your feedback, either on your experience with Stripe as a whole or on Canada-specific details, however minor (like wording that seems off or anything else). We'd obviously especially like to hear about any glitches so we can fix them as soon as possible.

Thanks again for your patience. Let us know if we can help with anything at all as you're getting started with Stripe.

[STRIPE Employee Name Here]

<comment><USER4> Would love it if you can send me the email you got it from, we desperately need a payment processor...

-From TO

</comment></comment></comment><comment><USER5> This is the best news I've heard all week! Thanks Stripe!</comment>


Resignation Letter in My Inbox Today - <AUTHOR> http://aaroneikenberry.tumblr.com/post/45347777566/resignation-letter-in-my-inbox-today

<comment><USER2> Mine aren't usually as detailed, even for the most micromanaged hostile enviroments. Typically along the lines of:

Boss Person,

Per our conversation yesterday on the evening of Month Day this will serve as my two week notification of my departure from Company with a last day of Friday, Month Day. Any day earlier than Friday is acceptable as well.

I have gained a great deal from my time here and hope that our paths cross again. Thank you for the opportunity, however, for my own personal career growth I must pursue a role that is more closely aligned with my goals.

Thanks, wcfields

</comment><comment><USER3> You're opting out of capitalism?

<comment><USER3> Did I misunderstand something? What's the downvote for?</comment></comment>


Fake rhino horn invented to ruin poachers' market - <AUTHOR> https://www.bbc.co.uk/news/education-50184280 <comment><AUTHOR> I think that China gets a lot of criticism for the way a small minority of people there are treating endangered species.

Initiatives like this joint venture will go a long way towards reversing that perception if they succeed.</comment>


Modafinil for cognitive neuroenhancement: a systematic review - <AUTHOR> http://www.europeanneuropsychopharmacology.com/article/S0924-977X(15)00249-7/abstract <comment><USER2> I have recently, within the past 2 years, started to realize that I may be unintentionally self-medicating larger underlying issues and am attempting to put more trust into medical professionals.

Skipping the story book, I work rapidly changing shift-work and couldn't sleep, stay awake, or function when i was supposed to. I saw a specialist that diagnosed me with "shift-work disorder." The solution cocktail includes Ambien to go to sleep, and Modafinil/Provigil to stay awake. I only use them during the times when I'm on the odd-ball shifts (not days), and they work great. I've had no issues.

I have also recently gotten prescribed Adderall after voicing my (and former teachers) life-long concerns of possible ADHD. Low dosages did nothing, and I can "kind-of, maybe?" tell some improvements with a higher IR dose. I don't want to ask for more at risk of looking like a drug seeker, and I don't want the jitters to increase, but I'm also not really sure what I'm supposed to "feel."

Until I've recently went back onto one of those odd-ball shifts and took modafinil again. I can absolutely without a doubt tell that I'm on it. I am focused and am constantly completing something. This is what I imagined Adderall was supposed to be. The con is that it has this effect that I don't notice I'm hyper-focused until many hours later when it wears down a bit, and it's noticed in retrospect. It's weird enough that I take it as rarely as possible (I'd rather feel this then constantly falling asleep while at work, which is extremely dangerous at my job)

<comment><USER3> It's well established that shift work destroys you. Don't do it.

<comment><USER4> Really? Scientific studies are now establishing that this or that "destroys you"?

I find it rather presumptive that you simply tell this person not to do something, period. They have more information about their own life and the trade-offs involved. As a straw man, maybe they earn enough from occasional shifts to pay for treatment of an otherwise deadly medical condition, or don't have other economic opportunities.

In addition, many jobs simply need to be done in shifts, and someone's gotta do it. Servers need monitoring, hospitals need staffing, power plants need running.

<comment><USER5> > Really? Scientific studies are now establishing that this or that "destroys > you"?

I'm not going to go grab links for you, but yes, shift work is terribly detrimental to your health. Google "shift work health risks".

> In addition, many jobs simply need to be done in shifts, and someone's gotta > do it. Servers need monitoring, hospitals need staffing, power plants need > running.

Indeed. They can pay extra for the requirement, while we ensure we have regulations to keep people who have to do it as healthy as possible.

<comment><USER6> If you shift "backwards" doing shift work, you're significantly more likely to have a heart attack, accident, etc.

Take a few minutes and google it, this has been studied for 100 years or more.

</comment></comment></comment></comment></comment><comment><USER7> While "cognitive enhancers" and nootropics can increase performance (caffeine is my stimulant of choice) I don't think any can really act as a substitute for proper sleep. Sleep is incredibly important to learning & memory - stimulants can only really temporarily mask the effects of sleep deprivation but they rapidly lose effectiveness if one isn't maintaining proper sleep hygiene.

<comment><USER8> I can't agree more. The drug that had the biggest impact on my productivity is [http://www.gwern.net/Melatonin](http://www.gwern.net/Melatonin), more than modafinil or anything else.

And yes besides melatonin I follow the recommendations for improved sleep.

<comment><USER9> Totally agree. And not just from a performance perspective, the positive affect on mood in general is very important. Melatonin has helped me greatly in the last year.

</comment></comment></comment><comment> bmir-alum-007 Interesting. It so happens I took provigil (modafinil) more for this reason than for sleep deprivation or to cram in more all-nighters in college. The experience was like caffeine, but without jitters or noticeably increased BP/heart rate. It was more like "hyperawareness" without hyper-vigilance or anything unpleasant. ("Limitless lite.")

I tried adderall for concentration at a standard therapeutic dose, but the jitters and palpitations.

These days, I just use mirtazapine (depression) and flonase (sleep apnea) and occasional caffeine, and all is sweetness and light.

EDIT: If anyone can add peer-reviewed, reasonably-safe, well-studied neuroenhancement lifestyle choices (food, supplements, pharma, etc.) that aren't just spam/gimmicks, that would be interesting.

<comment><USER10> I'm a little bit confused as to how you're gaining access to some of that medication. Are they not controlled? I.e. you need a prescription from a doctor to get them.

<comment><USER11> I don't know how he got adderall, but modafinal and the other drugs he mentioned are either schedule IV to Rx Only, so if you ask a pharmacist nicely they can give it to you. (That's how I got modafinil when I was in college)

<comment><USER12> > if you ask a pharmacist nicely they can give it to you.

In the US?

<comment><USER11> Yes. There is some minor paperwork involved for them, which is why you should ask nicely, and YMMV.

<comment><USER13> Can you elaborate? I worked as a pharmacy tech when I was younger and never saw drugs dispensed without a prescription from a doctor. I also can't find anything on the web about this being possible in the U.S.

<comment><USER14> the term you are looking for is "over the counter" or OTC

<comment><USER13> Modafinil is classed as a Schedule 4 narcotic. It's definitely not an OTC medication. Examples of other Schedule 4 medications: Xanax and Valium.

<comment><USER11> Actually modafinil is a schedule 4 stimulant (which matters in some states). And Pharm.D.s can get into an agreement with Physicians to dispense medication on their behalf as they see fit, it's called Collaborative drug therapy management.

</comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER15> modafinil at a very low dose might help you stay on task. But be sure not to get stuck on some random useless task. I've found that I get super focused on the details of something. But I don't think that is really the right mindset for writing good code.

<comment><USER16> Spot on. I found that Vyvance (sp? basically long release Adderall) was great for helping me stay on task far longer than I normally could, but in no way helped me pick the right task to stay on. :-)

It's no magic bullet; I still need to self discipline to pick the right things to work on. FWIW, I pretty heavily rely on todo lists for this.

<comment><USER17> I've had a similar experience using ritalin. If I have a clear task, I will feel a pressing need to execute that task.

If I don't have a clear task, I will procrastinate even harder.

</comment></comment></comment><comment><USER18> I have completely unscientific evidence from watching two friends on this for a year. One took it in bursts when code was due, usually no more than 2 weeks at a time. The other took it every damn day and basically didn't sleep all year. Friend 1 is fine and now has a majorly well paying job. Dood 2 is gone, vanished in a fog of paranoia, never to be seen again by his friends.

</comment><comment><USER19> I started taking Modafinil 3 months ago because I had to start a job which would be new & kind of difficult for me, and my prior "normal" routine involved getting really sleepy in the afternoon (yes, I was getting proper 7-8 hrs at night) and taking a nap, which wouldn't be possible at the new job.

In short, it works. I have been taking 200mg doses. I don't notice any focusing effect. I just don't get sleepy, at all, during the day. Only other effect, for me, is caffeine sensitivity -- as other posters have noted, modafinil will not make you feel wired, but add half a cup of coffee and there you go, if that's your thing.

</comment><comment><USER20> I had tried it and it had increased the amount of focussed hours I could have in a day. Sleep deprivation wasn't an issue as I used to sleep well. I gave up as it affected my eating patterns. Good that research is being done.

</comment><comment><USER21> Well, personally I'm not aware of anything else that can make me as productive after a bad night's sleep. I'm one of those people that are very susceptible to sleep deprivation. Cognitive enhancement issue aside - it does what it's supposed to and that's providing consistent alertness throughout the day. You can't do much if you're in a yawn-semi-coma state.

</comment><comment><USER22> I've spent a lot of time investigating nootropics over a couple of years, and I really don't think Modafinil does much.

It is great for feeling a little more awake when you're really sleep-deprived, but the tunnel-vision effect on high doses isn't always useful.

Exercise , healthy eating, and mindfulness will yield more benefits than any smart drug.

<comment><USER21> I have spent a lot of time researching nootropics too. Modafinil provides alertness/wakefulness and that is already a lot to some people. You can then add a racetam, anxiolytic or whatever else is needed. Even l-theanine is known to smooth out some negative effects of modafinil. You can use all the cognitive enhancers under the sun, but they're not gonna do squat if you're yawning your head off.

And just for the record - I work out every day, take cold showers, medidate, my diet is impeccable (macro nutrient balanced) and all that combined still doesn't give me the same level as nootropics do.

<comment><USER23> Could you point me to a good resource on nootropics?

<comment><USER24> 1\. LongeCity: [http://www.longecity.org/forum/forum/169-brain- health/](http://www.longecity.org/forum/forum/169-brain-health/)

2\. /r/nootropics

From there you should be able to find other resources; but they're the best.

</comment></comment></comment></comment><comment><USER25> For me Modafinil does not help me to concentrate at all, instead making me feel non-jittery-jitteriness is the only way I can describe it.

If you are looking for cognitive enhancement and focus improvements nothing will help more than yoga and meditation.

<comment><USER26> Modafinil has always made my mind feel like a jet engine out of control! And I have never managed to avoid having headaches the next morning.

<comment><USER27> Supposedly you can fix that by eating more choline beforehand.

</comment></comment></comment><comment><USER28> I know this is about Modafinil, but since many of you are commenting on Adderall and the various amphetamine salt mixes out there, I wanted to comment:

20mg of instant release Adderall daily (or worse, twice daily) is not a trivial amount to be taking. The long-term effects of the increased heart-rate and sudden spikes you will get from Adderall are not yet well studied or well understood in the medical community.

Stress, arterial stress, vasoconstriction[1], increased heart rate, and high blood pressure are all just a few of the things that happen when you take amphetamine salts. It's not just the jitters.

While these side-effects are okay from time to time, the body is not used to being treated this way on a daily basis, for years and years.

If you are in a place in your life where you don't think you need to be taking it, consider not taking it. Take a break on weekends, or a week at a time.

1: This is part of why many of you get "short" or "agitated" on these drugs... drink more water to at least help.

<comment><USER9> Curious to know how the effects of "stress, arterial stress, vasoconstriction, increased heart rate, and high blood pressure" from Adderall (which I don't take) compare to caffeine and/or nicotine (current and former). Are the problems similar or the same for a daily coffee drinker/smoker or reduced?

</comment></comment><comment><USER29> I have thought about trying Modafinil and Adderall for those times when I just can't seem to stay on task. The results and speculation are interesting, particularly the idea that "modafinil stimulates improved performance in the range of tasks reported herein mainly as a downstream effect of enhancement of 'top-down' cognitive control processes." The brain is a complex beast. I think the real test, ignoring the safety concerns with altering brain chemistry, is whether you can personally observe a benefit when you take it.

<comment><USER30> Yes I'm interested in Modafinil, Amphetamines can help but they have can also be detrimental as they have all kinds of side like emotional problems. The positive effects stop working if you take too much, or too frequently and they're very addictive. Modafinil sounds milder and less harmful.

</comment></comment><comment><USER31> Main problem I see with Modafinil is that it's instant release.

Whenever I hear that someone takes Adderall IR, I ask them if they've tried XR or Vyvanse since the latter are superior in most ways. Mainly, IRs produce tolerance too fast and the curve is too steep.

I don't think Modafinil has an XR solution. Though, Modafinil feels like a sugar pill compared to a low dose of amphetamine.

</comment><comment><USER3> Reminder: Sleep cleans your brain.

www.npr.org/sections/health-shots/2013/10/18/236211811/brains-sweep- themselves-clean-of-toxins-during-sleep

</comment><comment><USER32> Off-topic but that domain name is ridiculously long!

</comment><comment><USER33> Here is report of one life ruined by modafinil [https://www.erowid.org/experiences/exp.php?ID=92932](https://www.erowid.org/experiences/exp.php?ID=92932)

<comment><USER16> If you have an agenda, you can find a report of one life ruined by most anything. This is a particularly egregious example of "I did basically everything wrong, but the outcome isn't my fault, it's the terrible, dangerous drug".

<comment><USER33> Well, citing my friend professional toxicologist, who spent some time working for big pharma in Swiss, and delivered relevant course at Bristol Uni, "Modafinil is not even nootropic, you can only compare it to ladasten". This guy considers piracetam useful and buys it in Russia, where it is dirty cheap.

<comment><USER16> Your appeal to authority does nothing to refute my point.

</comment></comment></comment></comment><comment><USER34> Good for mindset, but bad for soulset. A lot of people live in their heads with Modafinil, and don't take guidance from the subtle cues in nature, which they're going to have to at some point. Michael Tsarion brings this up in his talks: The War on Conciousness [https://www.youtube.com/watch?v=knwyZawRse8](https://www.youtube.com/watch?v=knwyZawRse8) We have a deep fear of Nature because it's the 'final boss' we have to deal with at some point. Be this death, grief, or getting old. Any number of things are competing for your attention in Nature. Rushkoff talks about how our minds increasingly live inside a computer program and are out of sync with Nature. The internal clock is ignored and we live in a constant state of panic when checking our email and trying to game the stock market: [https://www.youtube.com/watch?v=ZQHubIMP- as](https://www.youtube.com/watch?v=ZQHubIMP-as) Alongside time being out of whack, we experience different hormones and endorphins at different times of the year. So summer might be dopamine, winter might be adrenalin filled, and autumn is some sort of smart drug like Modafinil which allows for high performance.

<comment><USER35> >Good for mindset, but bad for soulset.

Exactly. From the linked article: Modafinil "indirectly upregulates cerebral serotonin" ...a concern for those focusing on quality of life rather than quantity of output.

"To give you some perspective: the type of behavior displayed by upper classes of society; the elegance, the subtlety, the higher levels of intelligence and conscience, most likely reflect low serotonin levels (or rather, a lower ratio of serotonin to other neurotransmitters). Now take the opposite, high serotonin, say in combination with a poor immune system, low metabolic rate, chronic inflammation, and what will you have? Well, a serf/thrall."

Further discussion here:

[http://www.longecity.org/forum/topic/73104-natural- serotonin...](http://www.longecity.org/forum/topic/73104-natural-serotonin- antagonists/) [http://www.longecity.org/forum/topic/78451-symptoms-signs- of...](http://www.longecity.org/forum/topic/78451-symptoms-signs-of-too-much- serotonin-excess-serotonin-specifics-easy-to-read-cited/)

</comment></comment><comment><USER36> Anybody interested in an ebook about how to dose yourself (or your entire company) for optimal startup performance?

I've thought about putting one together by interviewing people about their non-amphetamine-based get-shit-done regimen (timings, dosages, ± side effects, results). It'll be like an Internet bad-broscience guide, but with a slant towards combining wider anecdotal evidence with results and performance benefits/drawbacks across everybody.

email me if you're interested. If there's enough seed interest, I'll make it happen.

<comment><USER37> I'm interested in you not creating such a book. While I support the idea of seeking your own improvement and taking advantage of what works for you as an individual, the view such a book espouses is not one of improving quality of life, it's one of More. Just More. Which in my mind is a really dangerous way to go about lifestyle choices. You might as well title it "How to Burn Out in 22 Hours a Day"

<comment><USER36> _is not one of improving quality of life, it 's one of More. Just More._

Have you seen which website you're on? More-More-More for Me-Me-Me is pretty much the MO around here.

<comment><USER37> Yup, and while in the context of business value itself I more or less agree with you, I do observe generally a more balanced view on quality of life and avoiding burnout around here than a raw selfish drive. Which is exactly why I hold a disapproving opinion of your idea, it sends that balance out the window.</comment></comment></comment></comment>


Parkinson's Patients Who Can't Walk Can Cycle - <AUTHOR> http://www.nytimes.com/2010/04/01/health/01parkinsons.html?hpw

<comment><USER2> Reminds me of this dystonia case where the woman can hardly walk forwards or speak properly, but seems fine when running <http://www.youtube.com/watch?v=uR5p_bD3uLc></comment>


Matrix and Riot Confirmed as the Basis for France's Secure Instant Messenger App - <AUTHOR> https://matrix.org/blog/2018/04/26/matrix-and-riot-confirmed-as-the-basis-for-frances-secure-instant-messenger-app/ <comment><USER3> What protocol? If you look at spec on their website[0] you'll see 4/5 of the protocols are still marked unstable. Take room state resolution as an example. It has pretty important security implications and it's nontrivial in a distributed setting. The algorithm is not stabilized, and it comes with a warning in the specification:

        Warning:
        This section documents the state resolution algorithm as implemented by Synapse as of December 2017
        (and therefore the de-facto Matrix protocol). However, this algorithm is known to have some problems.

I really like the idea of Matrix, but it seems a little immature for a government to use as a standardized messaging protocol.

[0] [https://matrix.org/docs/spec/](https://matrix.org/docs/spec/)

[1] [https://matrix.org/docs/spec/server_server/unstable.html#roo...](https://matrix.org/docs/spec/server_server/unstable.html#room- state-resolution)

<comment><USER4> We're working towards a 1.0 atm, which the French govt and many others are counting on. In terms of state res not being well specified: [https://matrix.org/_matrix/media/v1/download/jki.re/hSmkLkFG...](https://matrix.org/_matrix/media/v1/download/jki.re/hSmkLkFGVUnrXjtYcjsCUsyS) is pretty comprehensive and should be merged into the spec relatively soon. I say kudos to the French govt for backing a FOSS project which is still evolving :)

<comment><USER5> I don't mean to be disrespectful. The first time I heard of Matrix/Riot was at OSCOn 2015. What has happened since then,and why has it taken so long to stabilize?

<comment><USER4> We spent massive effort working on:

* implementing E2E encryption and getting it audited, which turns out to be very hard in a decentralised environment

* refining Riot as a flagship client and trying to get it to a Slack/Discord level of UX (still a work in progress)

* scaling, as the 1st gen implementation (synapse) failed to keep up with the growth of the network

* adding features like Jitsi video conferencing, Widgets, Communities, Home pages, Rich Text Editing, Read Receipts, Synchronised Read Markers and much much more.

* dealing with a major funding crisis last year.

In retrospect we probably should have spent more time finalising the current features rather than adding on new ones, and since the end of last year we've been feature-frozen in order to finish the stuff in hand and get to a 1.0.

Fixing the issues which remain in federated state resolution is probably the hardest problem to solve before a 1.0, and I'm happy to say that over the last few months we've made major progress in doing so.

Agreed that in an ideal world this would have all happened sooner, but turns out that decentralised open protocols are harder than centralised startups like Slack and friends. Who knew?

<comment><USER4> (oh, and we rewrote (almost) the whole thing in Go, too)

<comment><USER6> Go is a great choice for implementing a network protocol but most of the time, rewriting is not a great choice (source needed).

Do you have any public discussions or blog posts about this decision?

<comment><USER4> So totally agreed that rewrites are almost always not a good idea, as per the famous "Things you should never do!" Joel Spolsky post ([https://www.joelonsoftware.com/2000/04/06/things-you- should-...](https://www.joelonsoftware.com/2000/04/06/things-you-should-never- do-part-i)).

The difference for a project like Matrix however is that our product is not really any single software codebase but the protocol spec itself. In fact, it's a bad smell about the spec if it's too hard to implement it - <USER2> that's clients or servers. So part of the point of the Dendrite (golang server) project is to dogfood the spec and fix its various shortcomings (as per the OP's complaints) and make sure it's fit for purpose. For context, the core Matrix team has already written 4 entirely disjoint Matrix client codebases (Matrix Console on Web, Riot/Web, Riot/iOS and Riot/Android) as part of developing the spec and ensuring it's fit for purpose, so it's not that unreasonable for us to also write 2 server implementations (3, if you include the failed Dendron project).

In terms of blog posts: [https://matrix.org/blog/2017/03/15/dendrite-receives- its-fir...](https://matrix.org/blog/2017/03/15/dendrite-receives-its-first- messages/) is probably the most revealing one.

It's worth noting however that Dendrite progress has not been entirely smooth, though. Particular problems have been:

* When we lost funding last year ([https://matrix.org/blog/2017/07/07/a-call-to-arms-supporting...](https://matrix.org/blog/2017/07/07/a-call-to-arms-supporting-matrix/)) it inevitably had an impact on the team - and ironically the only two people who left the project ended up being the two folks who were working on (and created) Dendrite. This genuinely wasn't a reflection on Dendrite itself (which is ironically one of the most fun projects to work on in Matrix, given it's all blue skies and green fields in terms of implementing a server that learns from Synapse's many mistakes), but more a sad coincidence. Either way, it ended up with the project being under-resourced (although we're finally fixing that during May having re-hired :)

* Matrix traffic accelerated massively during 2017, and Dendrite wasn't yet ready to use in production - but meanwhile Synapse wasn't performant enough to keep the matrix.org server running smoothly, so we had to pull folks off Dendrite in order to keep Synapse scaling (ironically, ending up taking inspiration to some extent from Dendrite in improving the Synapse codebase)

* In general, it's hard to make progress on an R&D project which isn't yet in production when there's an existing project in production which is on fire.

* We deliberately scoped Dendrite to implement a server against the current Matrix spec that Synapse implements - rather than trying to improve the Matrix spec at the same time. This is good in terms of feature creep, but possibly a bit demoralising as you find yourself failing to innovate and improve the spec and instead re-implementing it, warts and all. I'm not sure what the right balance is here, and in practice we've ended up with the Matrix spec evolving significantly under Synapse, and meanwhile Dendrite then becomes a moving target as a result.

* We've almost certainly fallen foul of the Osborne Effect ([https://en.wikipedia.org/wiki/Osborne_effect](https://en.wikipedia.org/wiki/Osborne_effect)) too, where folks have held off on using Matrix or running Synapse because they're waiting for Dendrite to land, RSN.

But on the plus side, there's a small but active FOSS community contributing to Dendrite - much more than we've _ever_ had on the relatively impenetrable Synapse codebase. And Dendrite itself works (about 80% of an MVP complete) and is demonstrably ~2 orders of magnitude faster than Synapse (even whilst Synapse's performance is also speeding up). And as we find algorithmic breakthroughs in performance as part of improving Synapse, these breakthroughs equally apply to Dendrite and will make it even crazier fast.

So, I think it's too early to say whether this is a textbook example of "second system syndrome", or whether instead it's a mature and sensible approach to ensuring a heterogenous ecosystem of implementations for an open standard and dogfooding one's own protocol. My hunch is that if we hadn't hit funding nightmares last year it would be a no-brainer win; but even now, it's likely to eventually work out for the best in the end. The best analogy is not the excruciating migration from Netscape to Mozilla that Joel wrote about in 2000, but the more spectacular and successful migration from Gecko to Servo happening in Mozilla right now. It's a massive massive architectural improvement and rewrite in a new language which requires a lot of work, but pays off in the end.

(This is my personal take on it, at least, as project lead for Matrix; those actually working on Synapse & Dendrite probably have different viewpoints! :)

<comment><USER7> Are those Dendrite core developers that had to leave coming back now that you have secured funding?

<comment><USER4> Unlikely, sadly, having got jobs elsewhere before we secured long-term funding. However, it's not like Dendrite is ownerless - we've made good progress on it since they left up until the point we had to temporarily double down on Synapse. Meanwhile, folks from the community who have been hacking on Dendrite are coming on board in the next few weeks. And the old devs are also still around in a FOSS contributor capacity; answering pings via Github and Matrix where needed.

[https://github.com/matrix- org/dendrite/graphs/contributors](https://github.com/matrix- org/dendrite/graphs/contributors) paints a fairly clear picture of where things have got to (with Synapse temporarily taking priority since Jan).

</comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER8> It's sort of ironic considering France's history with Minitel[0] and encryption[1].

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

[1]: [https://www.forbes.com/forbes/1997/1201/6012058a.html#75b6a6...](https://www.forbes.com/forbes/1997/1201/6012058a.html#75b6a624262f)

Specifically from [1] is the line: "Its illegal in France to encrypt any communication in any way unless you have permission from the government. How is electronic commerce going to get off the ground in such a society? Good question, which appears not to have occurred to the authorities."

<comment><USER9> It has nothing to do with Minitel as it is a private government only slack- like tool. And the encryption restriction is long gone like in the US. Why there is alway francophobes in threads like that ?

<comment><USER10> It's not about francophobes, it's that people remember what they heard earlier, they don't seek out unimportant (to them) facts on random.

</comment></comment></comment><comment><USER11> Congrats Matrix team! That is huge.

Competitor here, few questions:

\- You guys are currently implementing federated protocols, right? We do P2P protocols, I'm curious why you guys chose federated - why do you think it is better?

\- How are you guys different than Signal? Obviously way different than Telegram, as it isn't even Open Source (thanks for Open Sourcing your work!).

\- When I was working on our E2EE private messaging app (ugly demo here: [https://twitter.com/marknadal/status/989602258638684160](https://twitter.com/marknadal/status/989602258638684160) ), I ran into problems about metadata. Stuff like, do you guys reveal which public keys are talking to which other public keys? And the frequency of those conversations? Or do you encrypt that information as well (and if you do, how do you handle discovery then, and is it vulnerable to network frequency analysis attacks?)

Awesome work, congrats again, keep it up! Curious to hear more about your architecture.

<comment><USER12> > why federated, not decentralized?

afaict, Matrix is both, kind of. Rooms are decentralized, while users are federated.

> What about signal?

Signal is great, but it solves a very different problem. It's a good replacement for talking to your best friends on your phone.

But it fails quickly once you go past that. No true multi-device, no talking without releasing your phone number, no public groups. No mentions, no permalinks. In that regard, I'd say matrix is closer to telegram and irc than WhatsApp or Signal

> what about metadata?

The state of metadata in E2E is... not good. Really, only the content of the message is secret. There are a number of ideas how to deal with this.

<comment><USER13> > Signal is great, but it solves a very different problem. It's a good > replacement for talking to your best friends on your phone.

Riot does this pretty well, and when it's not alpha/beta, it'll probably do it _really_ well.

</comment></comment></comment><comment><USER14> I had to roll my own chat system recently because the open source solutions out there were surprisingly insufficient - nothing seems to support websockets. Looking forward to the French contributions to the ecosystem!

For instance: at the moment Matrix server implementations expect clients like Riot to long-poll for JSON about each room/chat they're connected to. Alternatives like Prosody's XMPP server implementation dropped websocket support in favor of BOSH years ago.

I wonder why this is - maybe there's just less developer interest since chat has gone mobile, and mobile devices break ws connections so frequently? But it's obvious that chat clients like FB messenger, whatsapp, slack, etc are establishing ws connections.

Strange.

<comment><USER15> Network overhead aside, long polling can be a pretty wonderful interface. "Give me what I don't have yet, else let me know when there is something" makes for reliable transmission that is hard to screw up. Long polling requests can work idempotently and recover from network failures automatically. I think it's an especially wise starting point.

<comment><USER16> There shouldn't be any overhead to long polling in comparison to websockets.

<comment><USER17> What about the HTTP headers?

</comment></comment></comment></comment><comment><USER18> I tried matrix/riot out, looks perfect for me and app is slick.

Sending messages though from a server to a room was more difficult than I expected. Java SDK didn't build and many of the other languages were alpha too. Go seemed favored but I dont really want to install. Is there a recommended simple command line app or script to send messages?

<comment><USER4> curl? O:-) Matrix is intended to be simple enough that you don't even need an SDK unless you really want one.

which java sdk did you try?

<comment><USER19> > Matrix is intended to be simple enough that you don't even need an SDK > unless you really want one.

Huh. So Haskell + Servant might be really nice for writing a client, then, yeah?

<comment><USER20> Anything you can make HTTP requests in really. I have messed around with sending messages from Ruby and Bash and it's quite easy. And a lot more easy if there is an SDK for your language which will handle a few things for you.

<comment><USER21> So what's irssi for Matrix?

<comment><USER22> weechat-matrix. You should be using weechat over irssi anyway!

<comment><USER23> Why? Longtime irssi user here.

<comment><USER22> I usually view it as a cost–benefit sort of thing. When a choice has nearly zero cost, only very little benefit is needed to make it the rational choice as far as I'm concerned.

What does WeeChat offer over irssi? Very active development, scripting in many languages, dynamic filtering, raw buffer views, sane defaults, helpful configuration interface, good documentation, live/hotswapping upgrades, architectural soundness, many options for interaction (FIFO pipes, client- server protocol) and so on and so forth. I'm always surprised at how little WeeChat gets in my way when I want to do something out of the ordinary.

And unless you are heavily invested in the irssi ecosystem, the switch is basically effortless.

That's the cost–benefit of it. Another way to view it is this: People who switch from Irssi to WeeChat keep using WeeChat; while people who switch from WeeChat to Irssi go back to WeeChat.

<comment><USER24> What I don't like about WeeChat is the UI. It's subtly different from irssi's, which makes it difficult for me to switch.

<comment><USER22> On a scale from ed to Office 365, WeeChat and irssi have practically the same default UI -- and it's butt-ugly. But I do see your point, and it's likely configurable. Anything specific you need help with?

</comment></comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER25> Does this make freedom of information requests less useful to the public?

<comment><USER26> Freedom of information....which amendment is that :P ?

<comment><USER27> This is France we're talking about, so it's not amendments, but rather Article XV of the "Déclaration des droits de l'homme et du citoyen de 1789": [https://en.wikipedia.org/wiki/Declaration_of_the_Rights_of_t...](https://en.wikipedia.org/wiki/Declaration_of_the_Rights_of_the_Man_and_of_the_Citizen_of_1789) ("The society has the right of requesting an account from any public agent of its administration."), which is used as the basis for actual legislation today: [http://www.ucl.ac.uk/constitution- unit/research/foi/countrie...](http://www.ucl.ac.uk/constitution- unit/research/foi/countries/france)

<comment><USER26> I am sorry, I am not french. I thought this is some stupid American law which every Americans expect the rest of the world to know.

</comment></comment></comment></comment><comment><USER28> Does anyone know more about this Netherlands thing it refers to? I can't find anything in relation to the Dutch government and usage of this FOSS communication tool.

<comment><USER29> It's just early discussions between governments

</comment></comment><comment> mike-cardwell This should make the Librem 5 a more attractive phone in France: [https://matrix.org/blog/2017/08/24/the-librem-5-from- purism-...](https://matrix.org/blog/2017/08/24/the-librem-5-from-purism-a- matrix-native-smartphone/)

</comment><comment><USER30> I don't know much about licenses: is Matrix and/or the protocol safe from Facebook, Google and co to pull the same thing again? Feels like EEE is inevitable when these companies allocate resources to provide a better UI/UX and benefits in their own services.

<comment><USER31> I have no clue what you are trying to ask, sorry. Could you clarify?

Do you mean IP lawsuit's against Matrix itself?

<comment><USER32> I guess grandparent means how Google (and later Slack) initially supported XMPP in their chat products, then disabled the XMPP gateway once their userbase was significantly large that most conversations were inside their own bubble.

There's not much that Matrix can do to defend against that, except for strategic marketing with the purpose of achieving a large distributed userbase. If Gmail had existed in 1990, we would not have a decentralized e-mail network today. If Gmail had got into a position where they served 99% of all e-mail users, they would've pulled the plug on mail delivery to third- party mail servers and e-mail as we know it would've been dead.

<comment><USER33> Isn't that what is slowly happening? My understanding is that it's becoming harder and harder to send email to a Gmail address of you are not yourself using Gmail (without being tagged as spam/junk I mean)

<comment><USER34> I host my mails and to my surprise, gmail has been one provider which hasn't caused me any trouble so far in 2 years, with Yahoo. I have proper configuration for dkim, SPF and dmarc. Even when my mails were somewhat misconfigured it worked with gmail. When a recipient has a gmail or a Yahoo address, I am quite confident that my mails will make it into their inbox correctly.

Not that I'm glad that most people I email with use gmail, since I'm precisely hosting my mails to escape Google (well, this is one of the reasons).

I cannot say that for Microsoft. After a long discussion with them, I think I'm not systematically landing in my recipients' spam folder anymore, but I'm still not very confident. Microsoft, please fix your filters! If I already exchanged with somebody in a two-way direction several times, my mails should not land in their spam folder anymore, especially if they explicitly marked me as not spam (even more if they added me to their contact list), and if you observed only legitimate mails for months or even years from my IP/domain, my mails should not be treated as spam by default even for new recipients, right? Good and reasonable filters are important for internet neutrality, where small providers can exist.

</comment></comment></comment></comment></comment><comment><USER35> Will this make end-to-end encryption finally get the polish it needs?

<comment><USER36> Do you feel like WhatsApp is not polished?

<comment><USER28> If polish is broadly defined as "something that was hitherto still missing in (claimed-to-be) end to end encrypted chat applications", then open source and a decent profit model are definitely features lacking from WhatsApp. Telegram is open source, but one has to consciously turn on encryption and it doesn't work on the web or desktop clients (and the profit model is non-existent). Signal doesn't work without Google services and requires a phone number and turned-on phone iirc (and their profit model seems to be extorting companies like Wire and helping closed source software like Whatsapp advertise with Signal-level encryption). Wire is the best of all, but the Android app drains battery and everything is web (slow, bulky; Electron). None of the above work in a decentralized manner, either.

I don't know much about Matrix or Riot.im (from what I remembered, it was a implemented IRC alternative), but if it delivers on all of the above (and the article sure sounds like it), then it's definitely polishing up some final features that were still missing!

<comment><USER37> Very surprised to never see Keybase mentioned in these discussions. Everything, even the team chats, are end-to-end encrypted with a pretty slick interface.

You can even send E2E-encrypted messages/files to people who haven't even joined yet!

[https://keybase.io/blog/keybase-chat](https://keybase.io/blog/keybase-chat)

<comment><USER38> I'm using this, they recently increased their free storage to 250gb.

</comment></comment></comment></comment></comment><comment><USER39> Great to read this kind of news!

I can't wait to see the end product (this summer 2018) :)

</comment><comment><USER40> well, this is what scares me. because, the conversation may be encrypted (protocol, packets), but still messages can be accessible by the powers that be through variety of means.

especially considering they "forked" it, who knows what they will do with it (log keystrokes, take screenshots, in the disguise of diagnostic reasons?).

anytime you are reading a message from your app, or sending a message, the app have all the powers to capture the data in its raw form before transmission, encrypt it with some key that only they have control of, etc. so unless the gov't releases their source code to be truly open (which even then i don't see how you will ever know), you won't get the transparency you need.

encryption is such a buzzword, people think anything encrypted means you are fully secure. this is simply false.

<comment><USER31> From the 2nd paragraph:

        We understand the whole project is going to be released entirely open source (other than the operational bits)
        – development is well under way and an early proof of concept is already circulating within various government
        entities.

But if it has interop with the matrix, you should just be able to use Riot.

</comment></comment><comment><USER41> _It will guarantee secure, end-to-end encrypted conversations without degradation of the user experience. It will be compatible with any mobile device or desktop, state or personal._

Is the application they're creating also going to be open source and available for auditing?

<comment><USER29> that is the plan, except the operational bits specific to their deployments

</comment></comment><comment><USER42> hello i am new here and a noob. But this application messenger is only maked for France government use or also for everbody people around the world?

thereby, Riot is developed by the france government. Big change it has a back- door or something. you cant trust it as a citizen. correct me if i wrong but this sound like a honey pot to me.

</comment><comment><USER43> So what's wronng with signal?

<comment><USER44> You can't run your own signal server. If that isn't _huge_ then nothing is.

<comment><USER45> To be more precise you _can_ run your own server but it would not connect to the rest of the network (so it's useless).

Source code here: [https://github.com/signalapp/Signal- Server](https://github.com/signalapp/Signal-Server)

<comment><USER13> Why's it useless if it's only for internal govt communication?

If anything, that'd be a feature, no?

</comment></comment></comment></comment><comment><USER46> Why was Telegram and WhatsApp installation not possible before?

<comment><USER47> Because of closed source.

</comment></comment><comment><USER48> Don't suppose anyone knows why the Signal protocol wasn't chosen?

<comment><USER29> Because Signal is centralized. With Matrix they can deploy different servers across the gouvernement which interoperate. And potentially open it to the wider Matrix ecosystem

<comment><USER49> Signal, the service is centralized, but there's no reason that Signal, the protocol can't be. In fact before Moxie went on his silly "only I can do security right" rampage, Signal was federated with a server hosted by CyanogenMod.

<comment><USER50> >In fact before Moxie went on his silly "only I can do security right" rampage

Do you have link or source for that? (I'm always interested in listening or watching stuff from Moxie)

<comment><USER51> Probably [https://signal.org/blog/the-ecosystem-is- moving/](https://signal.org/blog/the-ecosystem-is-moving/)

>Nothing about any of the protocols we've developed requires centralization; it's entirely possible to build a federated Signal Protocol-based messenger, but I no longer believe that it is possible to build a competitive federated messenger at all.

<comment><USER45> Moxie is probably annoyed by the slow pace in which federated protocols move. Having it centralized he can move it a lot faster.

Fortunately there are solutions that incentivize modern features in federated protocols too, like SSLLabs HTTPS checker or [https://conversations.im/compliance/](https://conversations.im/compliance/) for XMPP.

</comment></comment></comment></comment></comment></comment><comment><USER52> will it erode trust ? or the opposite ?

</comment><comment><USER53> I won't be using a 'secure' messaging app built by the govt any time soon...

<comment><USER54> AFAIK, this is mostly intended as a secure messenger _for_ the government. Which makes sense - what are they supposed to use? WhatsApp? Twitter DM? Skype for Governments?

But even if you're not in the target demographic, you might benefit: The government will run a large installation and hopefully some code will find its way back to the OS version.

<comment><USER22> > Skype for Governments?

I want to type this into a search bar to see if it's a thing... but simultaneuosly I'm terrified of the prospect of discovering that it is.

<comment><USER54> I don't think it exists as a product, but I'd totally not be surprised if Skype for Business is used in government branches.

<comment><USER55> > I'd totally not be surprised if Skype for Business is used in government > branches.

It is, or at least Centrelink, Medicare, NDIS and Veteran's Affairs use it in Australia. Wouldn't be surprised if it was also used outside of DHHS.

</comment></comment></comment></comment></comment><comment><USER56> Never heard of Matrix... looked it up; gross... python2.7

<comment><USER57> Also take a look at the network "protocol": JSON over HTTP longpolling, requiring usually a separate socket for each batch of messages sent or received (unless HTTP/2 is available, then it's a bit less expensive, still has a massive overhead).

Matrix has so much potential – someday, when it's built on technologically more ideal foundations.

Python2.7 you'll barely notice, but the network overhead of the Matrix protocol becomes heavily noticeable by the end user (especially if your cell phone's data plan runs out, and you're stuck on 64kbps until the end of the month, then Matrix in larger rooms just becomes impossible)

<comment><USER29> The spec only states the use of JSON over HTTP as a baseline so anyone is welcome to implement more efficient transports like CBOR/COAP or MQTT or whatever :) But yes the goal of the reference implementations was to showcase the simplest transport: one PUT to send and one GET to retrieve it. Meanwhile we're working on improving the performance of the servers with some rather nice breakthroughs on the horizon.

<comment><USER57> As I said, the potential is there, the current implementations just aren't there yet. In a few years it might be entirely different.

And I'm not sure PUT and GET are the simplest solution, I'd think a simple socket over which messages are transmitted in both directions would be simpler than implementing an entire HTTP stack.

<comment><USER58> Being able to implement a client that runs in a browser (and can thus only deal in terms of HTTP) is very valuable, and one reason to claim that the simplest solution is HTTP PUT and GET.

</comment></comment></comment></comment></comment><comment><USER59> Why is the world so desperate to pretend that irc doesn't exist? Why can't we just get a new irc spec with e2e in mind?

Matrix is an extremely immature project and the French gov is making an irresponsible move here to prop it up as a solution in any capacity.

It's beta software! Where are the audits? Where are the formal verifications? Not that irc has those, I don't mean to juxtapose one not-good-enough product with another, but this is reaching a point of insanity.

If you want security, use signal. If you don't trust signal, learn to trust scores of world renowned cryptographers, and use it anyways. And if you're still bored, renovate irc.

Gosh this is just crazy. It's like saying the tesla 3 will be the authorized taxi vehicle on Mars. There's so much work yet to be done, it's a million years too early to start regulating and organizing something that's not even half built.

<comment><USER22> I think I can relate to your point because I used to write comments like these. You're right. The world is desperate to pretend IRC doesn't exist. We should get a new IRC spec with e2e in mind.

What surprised me is that Matrix is practically a modern IRC spec with e2e in mind. What's better is that the Matrix devs acknowledge this heritage. They don't pretend IRC doesn't exist. They're very up-front about loving IRC, and they have successfully brought over nearly every good feature of IRC into Matrix.

At first I thought it was too good to be true, but it keeps on being good. I have waited for years for a decent IRC alternative which I can convince even my less technical friends and family to use, and Matrix is it. I truly feel like I'm on IRC with my family. It's insanely good. I even use the same client for both.

Matrix can replace your Signal. It can replace your Telegram. It can replace your WhatsApp. It can replace your Facebook messenger. It can even replace IRC. It _is_ that complete.

<comment><USER59> It uses HTTP requests for transit! I know you don't actually know what youre talking about, so I'll explain:

There is much more overhead to opening a connection and maintaining a connect and sending and receiving, to the degree that people with bad connections are excluded entirely from being able to reliably use it. This is not true with irc. People in third world countries can use irc. If you can ping, you can chat.

We don't WANT a chat for less technical people. We want e2e safety. We should never prioritize """normal users""" over security in a security oriented proposal! That's insane!

But hey, I'm sure youre just a teen with a laptop, so I won't hold it against you that you'd make such an irresponsible decision.

<comment><USER22> Insert counter-patronizing preamble here.

\</comment></comment></comment></comment><comment>8<\</comment><comment></comment><comment>---

While the overhead of setting up a fresh TCP connection for every exchange is non-trivial, I'm not sure "reliable on a bad connection" is a characteristic I would attribute to IRC. The protocol is notoriously _unreliable_ to the point where established practise is to run a client on a server somewhere and then connect to that from your bad connection computers. People who don't lose IRC messages sent while their connection crapped out, while Matrix ensures their client is updated to reflect the current state of the servers as soon as they go online again.

I believe also that modern HTTP options let you reuse the same connection for multiple requests, obviating much of the overhead. Not to mention that you are free to extend the Matrix server with alternative connection methods.

We _do_ want a chat for less technical people. In order for humanity to not screw over itself royally, we need to target the 99%, not the 1%. Things can be good and still target non-technical people, as long as they are open and federated.

Of course, convenience does not trump security, but I don't see how that is the case here either.

</comment><comment><USER60> Do the French make their own hardware? An encryption app is useless if you don't 100% trust the hardware. Tainted hardware could figure out, log and send your keystrokes from screen taps/swipes all from silicon.

<comment><USER31> Its a fallacy of composition to say that better security useless unless its perfect security.

This is better that it was before. More security is better. Perfect security does not and cannot realistically exist for a complex system.

I do think have a reproducible binary would be a huge win. Even if you can't verify the integrity of a single build you could verify that build by consensus.

<comment><USER44> Reproducible builds are what nix is good at. Synapse is already well packaged, but Riot has the problem of using electron, which was never fully packaged on `nixpkgs`. Maybe someone with the right skills will be willing to do that. Bonus: vscode and others get better support on nix.

[https://nixos.org/nix/](https://nixos.org/nix/)</comment></comment></comment>