AVIF for Next-Generation Image Coding - <AUTHOR> https://netflixtechblog.com/avif-for-next-generation-image-coding-b1d75675fe4 <comment><USER2> It's been a slow process, and hence perhaps underappreciated, but it's very gratifying that over the last 15 years patent-unencumbered media codecs have won. The companies that contributed to this --- Google, Mozilla, Cisco, and others --- and especially Xiph that got the ball rolling --- deserve a lot of credit.

<comment><USER3> They have? Are we talking images only because in video mp4 and .h264 and .h265 are pretty much it. Apple/Safari still doesn't support vp8/vp9/webm/av1 for video or ogg for audio

<comment><USER4> > Are we talking images only because in video mp4 and .h264 and .h265 are > pretty much it. Apple/Safari still doesn't support vp8/vp9/webm/av1 for > video or ogg for audio

h265 is doomed because of the multiple patent pools that have formed and the extreme price hikes compared to h264. It's a risky technology to build on. That's the best ad that AV1 can have, and many members joined the alliance for open media for that reason after it became clear that the patent pool situation wouldn't resolve.

As for your browser support question, yes, Safari has traditionally been anti- ogg, but a few years ago Apple joined the alliance for open media and added opus support to their browsers (although only in the caf container, for some weird unexplainable reason).

Open codecs have won in the lossless audio domain (flac). There is no reason they can't win in the lossy video and lossy audio domains too (not sure about lossless videos but FFV1 seems to have lots of support by archivists who want open technology).

<comment><USER5> > h265 is doomed

I strongly recommend to see this video:

"The state of advanced codecs; separating hype from reality" [https://www.youtube.com/watch?v=vgE8-4rcXl0](https://www.youtube.com/watch?v=vgE8-4rcXl0)

<comment><USER6> Care to summarize the relevance of that video to the topic at hand?

<comment><USER7> If your world of Video = Youtube. Then HEVC failed.

If your world of Video = Every Video usage on the planet Earth. Then HEVC isn't doing so bad, every shipping TV has had HEVC decode, most ( if not all ) Smartphone, PC, Tablet has hardware Decoder shipped.

<comment><USER8> >Then HEVC isn't doing so bad

Sure, but it was massively pushed as the successor of h264 as the new de facto video codec standard, after almost a decade in use it has clearly failed in that respect.

IMO this codec generation saw no winner, instead h264 remains the undisputed king, the next battle for the crown will likely be between AV2 (or whatever it ends up being called) and VVC (Versatile Video Coding).

<comment><USER9> > instead h264 remains the undisputed king

Sure, because it is "good enough" for what it does. But recently, with the advent and demand of 2k and 4k videos, people realised the need of, and have started appreciating the capabilities of HEVC.

When it comes to the popularity of video encoders, my unscientific way of judging it is to look at what the pirates are using. If you look at the torrent scene, most of the popular tv series and movies are now also available HEVC encoded and they are popular too (especially the high quality 2k and 4k Blu Ray rips). It's rare to come across any VP9 videos, and HEVC is undoubtedly number 2.

Personally, even I've started re-encoding my video library with HEVC, once I discovered that the "medium" setting takes about the same time as H.264 encoding and gives an acceptable quality for (sometimes) half the file size.

I do keep an eye on encoders, and while it is good to know the work going on this field, practically speaking nearly everyone is moving on to HEVC. Nearly all the other competitors are in development and unusable because of their really slow encoding time.

<comment><USER5> > practically speaking nearly everyone is moving on to HEVC. Nearly all the > other competitors are in development and unusable because of their really > slow encoding time.

Be careful when saying the truth!

<comment><USER9> Forget commercial softwares, even the popular open-source video encoders like Handbrake or AviDemux or FFMpeg do not have AV1 or any other competing encoders in their release. They do support HEVC though. That itself is telling on the state of the competitors.

Note that I am in no way an advocate for HEVC (even if I sound like one :). I am just speaking from a practical point of view, as a user. If tomorrow there comes another encoder that takes less time to encode, and offers better compression, I'll immediately dump H.264 and H.265 for it.

</comment></comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER10> This is a major improvement. It's better than WebP by a bigger margin than WebP was better than JPEG.

Lossy WebP couldn't even match JPEG in some aspects, like full-resolution color (4:2:0 only, not even full 8-bit depth). In terms of quality or features AVIF doesn't have such "buts". It can support HDR and high depth we're likely to want in the near future. AV1 has palette _blocks_ , so it's no longer all- or-nothing choice of lossy vs lossless formats.

I am worried that the AVIF spec is complex (like HEIF, it's a bag of image- related features, more like a PowerPoint file than an image), but probably only commonly-used features will survive out of it. Early JPEG also used to have many more modes than are usable today.

If you like questionable hacks, you can use AV1 codec today in Firefox and Chrome by embedding <video> element with a 1-frame AV1 "video".

<comment><USER11> The JPEG images in the article are much worse than what you can achieve with JPEG export in Preview.app. While they don't look like AVIF, they aren't nearly as trash as the article makes JPEG's out to be.

</comment></comment><comment><USER12> I worked on a team responsible for image assets. I recall the web team asking for webp support from our image server. I suppose nowadays using `srcset` you can get some optimization in the ratio between file size and quality while still providing fallback for unsupported browsers. Given our image service was dynamic (e.g. it generated then cached images at different sizes, qualities, etc from a single high-res source) adding a new format wasn't that difficult. It meant that the image heavy pages would display more quickly which was a concern especially for mobile. So I am a big supporter for more and better formats.

That being said, this AV1 vs. HEVC / AVIF vs. HEIF stuff feels eerily similar to HLS vs. DASH. It's not like these formats have drastically different properties (e.g. GIF vs. JPG vs. PNG) - they are all quite similar. I just want to fast-forward time until whichever one is going to win is standard. It's like VHS vs. Betamax or Blueray vs. HD-dvd. Please just get it over with.

<comment><USER13> The difference is that HEVC/HEIF has at least three different patent licensing organizations that all want to be paid. While AV1/AVIF is supposed to be "patent free"

<comment><USER12> I heard the same about h.264 vs VP9 and it turned out that patent licensing wasn't a long-term issue. For a while you got that license from Flash (if y'all remember when Flash was the way Youtube worked, and I recall mention that it was one of the primary reasons Flash Player was never opened sourced). Then the license for h.264 it was included in every copy of Windows 8 (IIRC). Nowadays no one even mentions the h.264 license.

I'm no expert on the new license but it seems the restrictions on HEVC are relatively light. I'm pretty sure it is free to compress and distribute media but the license affects hardware and software encoders/decoders. So maybe your HEVC enabled video card with built-in decoder will be a dollar more expensive. I know that every Apple device shipped comes with HEVC hardware standard for the last few years. I would wager most Android devices too.

<comment><USER14> No, HEVC licensing is an insane mash of several patent pools and a few companies trying to extract a buck out of anyone that uses it. It's significantly less clear and more complex than what H.264 was and the license fees are higher as well... If you even have a legal team that can figure out who needs to be paid.

I'm on the phone so I can't really look up all the resources, but they shouldn't be hard to find. But this licensing mess is also why most oss development stalled and we still don't have an encoder that would be anything close to the quality of libx264. Instead, most important OSS experts have moved on to AV1.

<comment><USER12> > HEVC licensing is an insane mash of several patent pools

Yes, but they aren't coming after users. Look at the pools, it is mostly device manufacturers like TV, audio systems and mobile phones. They are holding each other in a mexican stand-off. Two of the three largest pools have already agreed to the same $0 royalty for non physical distribution that h.264 has. They want to extract that money from their competitors in the physical device space.

Fair enough, the uncertainty around final pricing is slowing adoption. But that can ossify quickly, although no guarantee it will.

I hate I'm being drawn into a patent argument when my point is: it won't matter either way. Even if HEVC wins 99% of people will never be affected by a license fee. Let them scrap over $0.25 royalty fees on TVs all they want. In the end I don't care if it is HEVC of AV1 that wins. I just want the fight to be over so I don't have the cognitive overload of having to support both.

</comment></comment></comment></comment></comment><comment><USER15> That 420 vs. 440 comparison animation is rather problematic. GIF can only represent 256 colors. Most of the artifacts in those images are due to GIF- specific dithering.

also, previously: [https://news.ycombinator.com/item?id=22327480](https://news.ycombinator.com/item?id=22327480)

<comment><USER16> Should have used apng, sure, but the _difference_ is still very visible on those hard color lines.

</comment></comment><comment><USER17> encode.su forum posts compare image quality of JPEG XL, AVIF, WebP, MozJPEG and HEVC:

[https://encode.su/threads/3108-Google-s-compression- proje%D1...](https://encode.su/threads/3108-Google-s-compression- proje%D1%81ts/page3)

The most comprehensive comparison:

[https://medium.com/@scopeburst/mozjpeg- comparison-44035c42ab...](https://medium.com/@scopeburst/mozjpeg- comparison-44035c42abe8)

"... according to my personal visual tests, starting from 0.4–0.5 bpp it [JPEG XL] usually wins most other formats."

</comment><comment><USER18> Shouldn't this be benchmarked against WebP instead of (obviously much worse) JPEG?

<comment><USER19> Or indeed HEIC.

A lot of so-called "next generation" codecs are really "current-generation" now.

<comment><USER2> Benchmarks against HEVC and WebP are included in the metrics section of the article.

</comment></comment></comment><comment><USER20> Interesting. Personally, I've been using VMAF extensively in my imager.io project. With regards to only testing the luma channel, someone submitted a PR for such some time ago yet it's never been merged; I was under the impression that the UV channel isn't significant (in practice). Personally, I think VMAF is great for images. For me, the biggest downside of VMAF (implementation wise) is that it's not currently thread-safe.

</comment><comment><USER21> As far as I can see, there is no support in any web browsers yet, despite the format being finalized a year ago... Whats the holdup?

<comment><USER22> AVIF support Firefox issue [1]; Chromium issue [2].

[1] [https://bugzilla.mozilla.org/show_bug.cgi?id=1443863](https://bugzilla.mozilla.org/show_bug.cgi?id=1443863) [2] [https://bugs.chromium.org/p/chromium/issues/detail?id=960620](https://bugs.chromium.org/p/chromium/issues/detail?id=960620)

<comment><USER23> For some weird reason browser manufacturers strongly oppose adding support for any new media formats. They will only accept a new format once _they_ decide that's a good political move. If I were Google/Mozilla I'd add support for everything ffmpeg and imagemagick support.

<comment><USER21> As soon as they support something, they can never drop support for it because some sites will have started using it, and some sites will never stop using it. Look at how hard it has been to deprecate Flash.

By enabling support, they are commiting to maintain same-or-better compatibility pretty much forever. Thats a big commitment if your code is based of someones 'for lolz' patch to ffmpeg...

<comment><USER24> Heck, it took until firefox 3.6 to remove xbm support, and that is an utterly terrible image format for a web browser.

<comment><USER23> > it took until firefox 3.6 to remove xbm support

Why would it be a problem to remove if only a small number of little-known sites used it?

<comment><USER25> If memory serves it used to be somewhat common in Unixy land before .png was added to browsers. There may have been long-lived documentation or academic pages with xbm that they were reluctant to break.

<comment><USER23> Then why remove it anyway? It doesn't seem hard to implement and maintain.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER26> I spent some time searching for a JS shim that enables AVIF files to be used in the browser, is anyone aware of one?

<comment><USER22> The official avif github [1] references Kagami/avif.js [2]. It's intended as a server-side component to be installed, and uses service workers to on-the-fly repack AVIF images as AV1 videos. The code is licensed CC0, and is easy to read, so you can tweak it to your needs.

If the browser can't natively decode AV1 videos, it calls dav1d.js [3] to decode, which is a webassembly port of dav1d [4].

[1] [https://github.com/AOMediaCodec/av1-avif/wiki](https://github.com/AOMediaCodec/av1-avif/wiki) [2] [https://github.com/Kagami/avif.js](https://github.com/Kagami/avif.js) [3] [https://github.com/Kagami/dav1d.js](https://github.com/Kagami/dav1d.js) [4] [https://code.videolan.org/videolan/dav1d](https://code.videolan.org/videolan/dav1d)

</comment></comment><comment><USER27> I don't see compression speed / performance / time mentioned anywhere in the article.

<comment><USER28> I'm guessing that Netflix compares not at all about compression time for this; the most used assets are probably downloaded millions of times and change rarely.

<comment><USER16> And honestly if you're not designing a camera then there's extremely little chance you care about still image compression time.

</comment></comment></comment><comment><USER29> I'm no fan of 4:2:2 (2:1 chroma subsampling), but the comparison looks a lot better for JPEG when you use 4:2:2 (which is the usual JPEG default). Using 4:4:4 instead drives the blocking artifacts way up, and isn't fair to JPEG.

</comment><comment><USER30> I'm going to put my cynical hat on for a bit and notice that the company behind this format, Netflix, has a walled garden. They have a streaming service that is consumed _only_ through a handful of apps that they are in full control of. They're not doing this for the community, for web standards, or the greater good. They're making this format simply to save some bandwidth for themselves, in a way that won't translate to the general community. The second picture in the linked blog article is literally a diagram of this garden. (Titled: _" Compressed image assets destined for various client devices..."_)

I had a similar comment about the JPEG XL format (mostly developed by Google) and the CSS "Display P3" colour space extension (Apple), both recently featured on YCombinator. These mega-corporations are building an ecosystem where in 2020, _the future_ , it's impossible to send a wide-gamut, 10-bit, or HDR still image to anyone via any of the following: web standards, chat, email, or document exchange formats. The best you can do is send an 8-bit SDR sRGB image and hope for the best. PC monitors, tablets, and most phones have no _consistent_ support for colour management, 10-bit, or HDR. Televisions are leaving the entire PC _and_ Mobile ecosystem in the dust. The closest approximation we PC peasants have is to upload a HDR YouTube video, send a link to it, and hope the viewer uses an newish iPhone. That's just sad, isn't it?

The stewardship of web standards by Microsoft (#2 biggest company), Apple (#3), and Alphabet Group (#4) have led to this. Now Netflix (#50) wants to throw their unnecessary format into the fray, almost completely ignoring the presence of JPEG XL and HEIC. They mention these alternatives in passing, and then notably don't compare image quality, features, or the compression ratio of those to their own format. You see, JXL is a _Google 's thing_, HEIC is an _Apple thing_ , and AVIF is a _Netflix thing_. So we're going to end up with as many image formats as there are walled gardens. I bet you too can't wait for whatever image format Facebook comes up with specifically to reduce their CDN bandwidth utilisation of Instagram pictures... only.

Notice also that their "idea" of making an image format readily available is a _docker container_ , which is the most insane thing I've ever seen. Where's the Photoshop plugin? The Lightroom plugin? The Windows 10 image codec? Oh wait.. those are _Adobe and Microsoft things_ , so... nowhere to be seen. Netflix Pty Ltd is not in this game to help someone _else 's_ walled garden.

No still image interchange for you peasant! Sit down, stay in the garden, and stream that content...

<comment><USER7> First,

Jpeg XL is not a Google thing, and neither is HEIC an Apple thing. Nor the AVIF part.

AVIF is from Open Media which is indeed a Google Thing. Netflix just happen to take side with OM. JPEG XL is done by a Google Employees as well as other contributors put forward to the JPEG committee. i.e It is not a Google _only_ format.

HEIC is really just HEVC Codec in an image format developed by _Nokia_ and submitted to MPEG ( Not to be confused with MPEG-LA ).

So really JPEG XL isn't a walled garden. And support everything you described including HDR. The problem is Jpeg XL doesn't do so well in small image size as compared to HEIF or AVIF.

<comment><USER30> > Jpeg XL is not a Google thing, and neither is HEIC an Apple > thing...<snip>...Employees as well as other contributors put forward to the > JPEG committee.

"Technically open" doesn't help much if each of those formats is primarily pushed by one mega-corp, optimised for their specific use-case, and no industry-wide effort materialises to establish widespread interoperability.

Just last week I tried to convert raw photos to HEIF images on Windows so I could share my images in maximum quality with a bunch of iPhone users. It's basically impossible. The _only_ tool I found was Gimp, but it doesn't properly understand colour spaces and the output looked totally wrong. I'd need OSX or IOS to author files in this format, making HEIC an "Apple thing" for all practical purposes.

It's a safe bet that Google will embed JPEG XL support in Chromium, right? Will I be able to email a .JXL file to an IOS user? Will a Windows PC user with Outlook on their desktop be able to see the image embedded in their email without having to save it and open it again in Chrome? Can I paste a .JXL image into a Word document and have its various features be correctly preserved, or will this be restricted to Google Docs viewed exclusively via Chrome?

Look, here's the thing: All of these post-JPEG formats are nice and all, but are worthless to me and a billion other people unless there's _proper_ effort put into mass adoption. Real industry-wide cooperation, not just token openness.

As I said, it is 2020, and nobody has a viable option for distributing still images in anything other than a handful of 20-30 year old formats.

> The problem is Jpeg XL doesn't do so well in small image size as compared to > HEIF or AVIF.

So then why isn't NetFlix working with the JPEG XL group to add the AV1 codec as one of the encoding options? Why are they instead creating yet another standard with no adoption likely outside of their walled garden?

Conversely, why are all the post-JPEG formats such utter failures? Take a look at the list: [https://jpeg.org/jpeg/index.html](https://jpeg.org/jpeg/index.html)

        JPEG         - The "popular one"
        JPEG XT      - Never heard of it
        JPEG-LS      - Never heard of it
        JPEG 2000    - Heard of it, never used it
        JPEG XR      - Never heard of it
        AIC          - Heard of it, never used it
        JPEG Systems - Never heard of it
        JPEG XS      - Never heard of it
        JPEG Pleno   - Never heard of it
        JPEG XL      - Not yet useful, will likely never use it

Clearly, whatever they JPEG group is doing, _it 's not working_. They got lucky once, and in the 27 years since have failed to reproduce that success.

This is the core point of what I'm saying: The reason that GIF, PNG, and JPG got widespread support has more to do with _luck_ rather than the standardisation _approach_. The laundry list of failures and the sad current state are evidence that _luck is not a strategy_ and something different must be tried.

I put this in the same category of failure as IPv6. The IETF got _lucky_ with IPv4 and figured that "more of the same" will work. They didn't get lucky the second time.

I wish I had the "political clout" to bang some heads together at these megacorps, make them sit down together and fix this.

Realistically, I foresee another decade of 8-bit, SDR, sRGB images stretched incorrectly to whatever random gamut the $150 monitor of the recipient is capable of displaying.

<comment><USER7> >"Technically open" doesn't help much if each of those formats is primarily pushed by one mega-corp,

Then no Format is Open by your standard. Apple or Google refuse to support anything would instantly make that format not Open by your standard. And if Apple drop Jpeg, would Jpeg not be an open standard ?

What you are describing is politics, nothing to do with the standards itself.

>The only tool I found was Gimp

That is the problem with the tools. If Gimp Dev decide to take side in the format battle and not support it properly, then is that the fault of a standard?

>So then why isn't NetFlix working with the JPEG XL group to add the AV1 codec as one of the encoding options?

Because it doesn't work like that.

>Clearly, whatever they JPEG group is doing, it's not working.

They are used in space other than the Web.

<comment><USER30> > What you are describing is politics, nothing to do with the standards > itself.

Standards are about convincing a large group of people to do something for the common good, sometimes going against their most direct best interests. Nearly a textbook definition of the word "politics".

> They are used in space other than the Web.

Yeah, the tiny, borderline non-existent space that is outside of: desktops, phones, tablets, web, email, collaboration, digital cameras, desktop publishing, or just about any mass-market use of computing you care to name that involves imaging.

The _only_ usage of a JPEG standard other than the original JPEG I'm aware of is JPEG 2000. It has some niche uses for digital movie distribution to cinemas. Not streaming, not cable. Cinemas. Only.

According to Wikipedia, I missed a few uses: [https://en.wikipedia.org/wiki/JPEG_2000#Applications](https://en.wikipedia.org/wiki/JPEG_2000#Applications)

I suspect a few of those uses are actually out-of-date now and have been superseded by more modern codecs.

Flip through that _very short list_ and explain to me how the current "politics" of imaging standards bodies has succeeded, because I just don't see it.

</comment></comment></comment></comment></comment><comment><USER31> Why use HEIF container for AVIF, instead of something derived from Matroska for example, like WebP does? Is HEIF free to use?

<comment><USER32> The HEIF and HEVC container are the same. So if they use the HEIF container they already have libraries on devices that can handle the format, metadata, etc. I don't believe Netflix is delivering any Matroska content so they have no media pipeline or tooling for the format. It's the same reason they didn't base the container format on RIFF or ASN.1.

<comment><USER31> Since they are proposing it as a common standard, I don't think it should matter what they already use, in comparison with something that's actually free to use.

If HEIF is free, then fine. But MPEG stuff is not created free by design, so it has to be stated somewhere.

<comment><USER32> The HEIF container is the MPEG-4 Part 12 ISO container, the same used for MP4 video and JPEG2000. This lets it fit inside existing workflows and media stacks. AVIF just ends up and additional codec in a familiar container.

Anyone needing to pay license fees for MPEG-4 Part 12 format patents (if they exist) is already covered by usage for video or HEIF. Anyone not needing to pay licenses will continue to not need to pay licenses in they use AVIF.

<comment><USER31> Not sure what that means. Sounds like some still might need to pay for it. That's an unacceptable approach for a standard proposed by AOM which stresses the royalty free focus (in contrast with MPEG), which was exactly my point above.

<comment><USER32> I don't know of any patents on the MPEG-4 Part 12 format. They might exist but I don't know of them. If you implement AVIF you'd have to pay whatever licenses might exist over the format. If there's no licenses over the format, you pay nothing. If there are licenses but you're already distributing MPEG-4 video content, JPEG2000, or HEIF your licenses you'd pay for those would cover your use of AVIF in the MP4 container.

So to my knowledge the ISO MP4 container doesn't require license fees so there's no real downside for using it as the container for AVIF.</comment></comment></comment></comment></comment></comment>


Why display Sunday to the left of the week? - <AUTHOR>

The standard western weekend [edited] is Saturday-Sunday. Why do many web apps default to displaying Sunday to the left (start) of the week's calendar, rather than to the right of Saturday? Meetup does this. Google Calendar does this on iOS. And so do many others.<p>What possible utility does this layout provide? <comment><USER2> God created the universe in six days. On the seventh day, he rested. This was shabbat, ie. Saturday. Therefore, the first day of the week is Sunday.

But then two millenia ago, the Son of God came to see us, and we killed Him on Friday (to be done just before the shabbat, since days started at sunset then- and-there), and He rescucitated on the third day, ie. on Sunday, so Chistians celebrate on Sunday, which became a rest day, and was therefore moved to the end of the week, making Monday the first day.

Notice that Muslims have their rest day on Friday, so their weeks begin on Saturday.

<comment><AUTHOR> > making Monday the first day.

Right. If Monday begins the week, shouldn't it be on the left? Which is the "beginning" in a left->right language such as English.

Bangladesh is a Muslim country with a Friday-Saturday weekend, so I understand that they might want to lay out their weekly calendar differently. But I just want to see my American (Saturday-Sunday) weekend in one contiguous block. Is that too much to ask?!

</comment></comment><comment><USER3> _The standard western week is Saturday-Sunday._

Who says so? The several Western languages that refer to Saturday with words that mean "Sabbath" or "seventh day" suggest that at least part of the world thinks that Sunday is the first day of the week, and Saturday the last. (I am aware that Chinese treats Saturday as the sixth day of the week, and didn't have a concept of seven-day weeks before trade with the West.) There isn't universal agreement on this, is the short answer to your question.

</comment><comment><USER4> > The standard western week is Saturday-Sunday

Saturday-Sunday would be two days. I suspect you mean Monday-Sunday is the standard week, or Saturday-Sunday is the last two days of the standard week, in the West.

Note that this is also, while more sensible, still incorrect. The conventional week in many parts of the western world is Monday-Sunday. The conventional week in the US (which, last I checked, is a somewhat-significant part of the West) is Sunday-Saturday.

> Why do many web apps default to displaying Sunday to the left (start) of the > week's calendar, rather than to the right of Saturday?

Because its the US convention, and many web apps are designed by people to whom US conventions are deeply ingrained.

> What possible utility does this layout provide?

Instant familiarity to anyone who is familiar with calendars (whether electronic or print) commonly used in the US.

</comment><comment><USER5> It's an American thing. Like many things where the US chooses to do things differently from most of the rest of the planet (month-day-year format, not using the metric system), I doubt it provides any kind of utility.

At least not one that is still relevant in the 21st century.

</comment><comment><USER6> Clearly it isn't the western standard because in the US the standard is Sunday-Saturday (Sunday = 1st day of week). I'm not saying that the US standard is the western standard, just that there is no such thing as a universal western standard.

</comment><comment><USER7> Another thought is most weekends are empty of schedules/notes/plans, so shove them to either margin and keep the most business-active days (mon-fri) in the middle of the calendar.</comment>


The Treeographer - <AUTHOR> https://thetreeographer.com/ <comment><USER2> I love trees.

I joke that I'd become an arborist if this engineering gig doesn't pan out (a joke because I've been doing this engineering thing with good success for around thirty years). When you start to really look at trees and get to know the different kinds (when you can see the trees from the forest, so to speak), that is when start to see their beauty. When National MegaDeKay Day is declared, I'm going to tell everyone to shut off their phones and take a long slow walk through the forest. Look up at the trees. Listen to the crunch of the leaves, the mosses, and the small branches under your feet. Hear the whisper of the winds through the pines, leaves, and branches, and the songs of the birds. Breathe deeply and experience the fresh smell of the leaves contrasting with the earthiness of the soil, the menthol of the pines, and the sweet smell of any flowers you might be lucky enough to come across.

Just don't enjoy this too much or you'll do what I did: say to hell with the city and move out into the country where my own chunk of forest starts 25 yards outside my back door.

<comment><USER3> Have you read _The Wild Trees_ , by Richard Preston? It's a fascinating story of redwood tree researchers, and reads almost like a novel. (At least if you like trees as much as I do.)

<comment><USER2> I have not, but thanks for the recommendation!

</comment></comment></comment><comment><USER4> Wow!

[https://thetreeographer.com/2018/02/07/the-mystery-of-the- cr...](https://thetreeographer.com/2018/02/07/the-mystery-of-the-crooked- forest-poland-krzywy-las/)

[https://thetreeographer.com/2018/02/21/the-philippines- most-...](https://thetreeographer.com/2018/02/21/the-philippines-most-bizarre- tree-rainbow-eucalyptus/)

</comment><comment><USER5> The tree I'd most like to know about is the one at the top of the page. I think I saw one once and I've been wondering what it is ever since. Anyone know?</comment>


Essays about bootstrapped startups - <AUTHOR> http://bechimp.com/

<comment><USER2> Re you any relation to Binky Melnik? zshe's from Massachusetts, once worked at Apple and now lives in New York City.

<comment><AUTHOR> I don't think so :)

<comment><USER2> If you can find any melniks that are related to her, she wants to hear from her family.

<comment><AUTHOR> Ah, okay! But she wasn't born in Kazakhstan, or?

<comment><USER2> No but maybe her parents or grandparents were. I will ask.

I am convinced that I am of Kazakhstani heritage, as I am not afraid of anything. Neither is Binky.

<comment><AUTHOR> Yeah, you should ask her! Haha, me too! :D</comment></comment></comment></comment></comment></comment>


Trains in Switzerland are not allowed to have 256 axles - <AUTHOR> https://twitter.com/standupmaths/status/1185544321933758467 <comment><USER2> To save you the click through:

> This may be a great obscure fact, but it is not an example of European > regulations gone mad. To keep track of where all the trains are on the Swiss > rail network, there are detectors positioned around the rails. They are > simple detectors that are activated when a wheel goes over a rail, and they > count how many wheels there are to provide some basic information about the > train which has just passed. Unfortunately, they keep track of the number of > wheels using an 8-digit binary number, and when that number reaches 11111111 > it rolls over to 00000000. Any trains which bring the count back to exactly > zero move around undetected, as phantom trains.

From: "Humble Pi: A comedy of maths errors" by Matt Parker ([https://mathsgear.co.uk/collections/books/products/humble- pi...](https://mathsgear.co.uk/collections/books/products/humble-pi-a-comedy- of-maths-errors)), page 191.

edit: Added quote attribution.

<comment><USER3> So if you want to move around Switzerland undetected, commission a train with 256 axles and bam! You're invisible :P

<comment><USER4> Haha one can imagine this will be rapidly bred out of the species since it's such a significant maladaptation. Like dressing in Vantablack and running on a rural expressway.

<comment><USER5> To catch intruders dressed in Vantablack, you'll need one of those devices they use to find exoplanets.

<comment><USER6> Or, you know, infrared cameras :)

<comment><USER7> Or just _more light_ , and focus on shooting the dark spots.

<comment><USER8> Or just _more_ light, and you don't need to shoot because everything vantablack will be aflame...

<comment><USER7> _What if we tried more power?_

[https://what-if.xkcd.com/13/](https://what-if.xkcd.com/13/)

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER9> In similar news, popular athletic app Strava has announced that they will be dropping Bluetooth support because of an issue with their code. [https://support.strava.com/hc/en- us/articles/360032979131-Re...](https://support.strava.com/hc/en- us/articles/360032979131-Removing-Direct-Sensor-Pairing-from-the-Strava- Mobile-App)

Strava aren't fixing the bugs, just dropping the feature altogether. They even admit that other athletic apps implement Bluetooth without bugs, so it's not a platform limitation.

So sometimes people decide that an easy fix is a better choice than a "correct" fix, which would be either adding bits to the train axle counter, or implementing a way that didn't care how many axles there were- such as having a head and tail indicator for a train, and not counting the axles in between.

<comment><USER10> They obviously have a head and tail indicator already, so they don't merge all the trains together. The issue is that they overload the axle mod 256 counter with the train indicator, instead of using a separate byte.

</comment></comment><comment><USER11> This section is not present in the 2015 or 2016 edition of the rulebook: [https://www.bav.admin.ch/bav/de/home/rechtliches/rechtsgrund...](https://www.bav.admin.ch/bav/de/home/rechtliches/rechtsgrundlagen- vorschriften/fdv-2016.html) Seems like overflow detection (or more bits) were added to the counters at some point.

<comment><USER12> Yep. They routinely run fairly long trains over the Lotschberg and Gotthard lines through the base tunnels that I'm pretty certain are approaching 256 axles, but I have yet to see any with more.

Most likely the main transalpine lines now allows >256 axles while other secondary lines have not been upgraded.

<comment><USER13> Trains longer than 256 aren't the issue as the numbers roll over. The problem is trains with exactly 256 axles (or a multiple of 256), they're seen as zero.

<comment><USER14> Not an expert, but I imagine it could still cause some routing problems if a 258-axle train were mis-registered as a 2-axle train; the latter takes up dramatically more space on the network.

<comment><USER15> Considering that a train can require 2 km to break, I'm sure they keep enough space between trains that there's plenty of space for both 258 or 2 axles trains. Knowing a train is there seems much more important than its lengths (up until they decide that 2 axles trains can be much closer to another trains).

</comment></comment></comment></comment></comment><comment><USER16> You can carry a maximum of 255 rupees in the original Legend of Zelda, and back in the day magazines commented on the "oddly specific" number.

<comment><USER17> That reminds me back when WoW was still 32 bits and people discovered the gold cap was 2 147 483 647 copper coins.

<comment><USER18> So your gold value was signed? Does WoW allow for debt by tracking negative values, or was it just an oversight?

<comment><USER19> Signed numbers are preferred. Imaging you try to buy something checking if the remaining balance would be greater than zero is pretty much guaranteed, resulting in 4+ billion instead.

Signed number (just 64bit) is the correct number type for such operations.

<comment><USER18> Pushing it off to the negatives does not solve the issue of overflow.

<comment><USER19> > Pushing it off to the negatives does not solve the issue of overflow.

it allows for comparison with errors. Working with unsigned numbers is error prone... and I started with 6502 that didn't have signed numbers.

The idea is preventing the overflow by being able to check for negatives easily. Having negative gold is likely better than leaving someone with 4billons of. For instance stuff like "max(0, balance)" just doesn't work with unsigned ones.

</comment></comment></comment></comment></comment></comment><comment><USER20> TIL: Per the article, this 256 limitation also applies to number of users in WhatsApp conversations and the maximum block height of a Minecraft world.

<comment><USER21> Also reminds me of the maximum amount of coins you can have in runescape: 2.147B. They even created silver coins worth 1000 normal coins as a workaround for people who get to a "max cash stack".

(Max value in java, even though the game is non longer written in Java)

<comment><USER22> The language is irrelevant; this is the maximum value of a 32-bit signed integer. Specifically, 2,147,483,647.

Java (and other languages) have other ways of representing numbers which allow larger values, but once you've encoded values into wire protocols and persistent data structures, they tend to be hard to change.

</comment></comment></comment><comment><USER23> I'm waiting for the freak accident when a 200-axle train enters a given segment, and then later a 56-axle train accidentally ignores a red light, and _plop_ the segment is now marked as all-clear again.

<comment><USER24> You cannot "accidentally" ignore a red light. Driving over one will trigger an emergency stop unless you specifically disable this mechanism.

</comment></comment><comment><USER25> The thing is Switzerland is also the only country where I could imagine someone might know such a rule. Say you are working on connecting some trains, and you happen to be one car away from 256 axles. Well, if the org you're working for is SBB/CFF/FFS I could totally imagine the foreman saying "oh wait, there's a rule about this". Any other country, no way.

From personal experience people there seem to follow the rules very meticulously.

<comment><USER26> I would wager that they might be as meticulous in Japan too.

<comment><USER27> I'm glad I read an article on HN about pointing and calling[0] in the Japanese rail system as a way of preventing accidents. I take a blood pressure medication and had once or twice taken it a second time in the day, which wiped me out and made it VERY difficult to work (for the record, I don't take it for blood pressure and it's a very low dose, so I wasn't at risk of my heart stopping, just very sleepy). Now I do a specific gesture, point and call out that I'm taking my pill. I haven't accidentally taken a second one since because it makes taking my pills so much more memorable.

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

<comment><USER26> Ah yes, there was a popular discussion about it on HN:

Why Japan's Rail Workers Point at Things - 959 points: [https://news.ycombinator.com/item?id=14011793](https://news.ycombinator.com/item?id=14011793)

<comment><USER27> Thats the one. Thanks!

</comment></comment></comment></comment></comment><comment><USER28> If the law prohibits 256 axles, it should really prohibit any multiple of 256. A 512-axle train would similarly be erroneously detected as having zero axles.

<comment><USER29> That would be a freight train consisting of 128 units. Not likely in Europe, where the average freight train has 25 to 30 wagons, and the longest freight train seems to measure 835m, which will put you in the neighbourhood of 40 units. I'm not even sure that one would fit on the Swiss network; it runs or ran between Hamburg and Denmark, a route which features not quite as many elevation differences and tunnels.

Considering this, the chances of even hitting the lower 256 axle mark are probably negligibly remote as well.

<comment><USER28> [https://en.wikipedia.org/wiki/Longest_trains](https://en.wikipedia.org/wiki/Longest_trains) gives 180 cars for the US, and longer for Australia, Brazil, and others. Cars can also have more than four axles; at the extreme you have [https://en.wikipedia.org/wiki/Schnabel_car](https://en.wikipedia.org/wiki/Schnabel_car)

But yes, this is probably not an issue in Europe.

</comment></comment></comment><comment><USER30> This seems like a perfectly reasonably limitation in the context of european railroading (shorter trains, more frequency), when you consider that many European freight cars are 2 axle

<comment><USER31> Yes, generally freight trains are not allowed to be longer than 740m, because there would be few sidings or loops long enough to put them in. So in practice the axle limit is unlikely to be the actual limiting factor.

</comment></comment><comment><USER32> Previously: [https://news.ycombinator.com/item?id=12071240](https://news.ycombinator.com/item?id=12071240)

</comment><comment><USER33> Shouldn't they also not have anywhere around 256, because if a 258 axle train has a couple of missed detections it'll still look like 0?

<comment><USER34> From the previous thread, some countries specific a little below 256 for a margin of safety:

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

</comment></comment><comment><USER35> Looks like this leaves the issue of 256 multiples unresolved.

In theory we could still have a 512 axle ghost train.

</comment><comment><USER36> But did you know an Oyster card in London can't have more than 16 fare zones? This is the reason why some stations on Overground don't accept Oyster cards.

</comment><comment><USER37> There was something posted on HN years ago about a mainframe that ran the French railway pension system. There was something funny about different pay rates for rates going uphill or downhill, whether the engineer was a military veteran, etc. Does anyone have a link? I can't find it now. Thanks.

</comment><comment><USER38> I'm not sure why they're even counting past 2 (the minimum number of axles to indicate a railcar is present, at least until someone delivers self-balancing single-axle railcars) for train detection. Unless it's to estimate track wear, or for revenue collection?

<comment><USER39> Trains are typically made up of multiple carriages. The axle counters ensure that all the carriages which enter a section of track leave that section of track, and that none have detached and been left behind for the next train to run into.

<comment><USER40> To elaborate on this, I think what is going on is a section has a "counter- upper" on one side, and a "counter-downer" on the other side.

So while the train is within that segment, the value of the counter is non- zero. Once they exit, all the axles should get counted again in the opposite direction and reset the count to zero.

The problem with 256 is that the count would be at zero _while_ you were in the track segment.

</comment></comment></comment><comment><USER41> The "fixed with bureaucracy" thing is entertaining, but it's probably a delusion that the fix is effective.

For one thing, this rule is not intuitive and people aren't likely to remember it. People have an easier time remembering and following rules whose reasoning clicks with them. It's not a recipe for success to say, "Oh, there's this one weird thing that you can't do, and it isn't going to make sense to you why, but remember not to do it."

I also wonder whether, even if someone in the industry _does_ know the rule and really wants to follow it, there's an easy method to know whether their train has 256 axles. Is there a procedure in which axles are counted or an automated system that does it? If it's a manual procedure, is it time- consuming and is there pressure to skip that step when you're in a rush?

And, if a fallible human being should make a mistake and run a train with 256 axles, is there any protection against the phantom, undetected train scenario, or is it a silent failure?

<comment><USER42> What if Swiss trains consist of 30-40 cars at most? Then the rule is purely technical and doesn't even have to be remembered.

<comment><USER12> Actually, the longest regular Swiss trains seem to top out at 44 cars. This is because of passing siding lengths being much smaller than other countries such as the US. There are longer trains that are scheduled on routes with longer sidings however such as a the main north/south routes.

Most European trains rarely exceed 22 cars for the same reasons as they have to be able to be passed by express trains in stations.

<comment><USER29> Yeah, a bit of light browsing yields a 25 to 30 unit average for European freight trains¹.

[https://www.allianz-pro- schiene.de/themen/aktuell/740-meter-...](https://www.allianz-pro- schiene.de/themen/aktuell/740-meter-gueterzug/)

<comment><USER12> Ah, it's up from last I checked. Thanks!

</comment></comment></comment></comment></comment><comment><USER43> Is 256 the upper limit, or is it just a magic number to be avoided? Is a train with 258 axles OK?

<comment><USER44> A train with 258 axles counts as a handcar:

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

:D

<comment><USER45> Even worse, 260 axles and you are still considered "light" engine (light engine is a term of art which means locomotive moving on its own power without hauling anything else).

</comment></comment></comment><comment><USER46> Which also presumes axle-counters are perfect...

I'm surprised they didn't also ban 255 and 257!

</comment><comment><USER47> They should do what the Norwegian Navy does, and put barcodes on the cars.

Why does Norway do it? When their ships pull into home port, they Scandinavian. ;)

</comment><comment><USER48> Wah -- wah -- waaahhh.

</comment><comment><USER49> That's nothing. Signed overflow in C/C++ is _undefined behavior_. Which means there's no guarantee that you'll get anything recognizable out of it. :-)

<comment><USER50> But _unsigned_ overflow is defined. Are we expecting a negative number of axles?

<comment><USER49> The train counter isn't even software based. I just wanted to point out the example of a much more common issue that most programmers aren't aware of. Very few languages catch unsigned integer overflow as well. The only popular one I can name is Swift.</comment></comment></comment>


Santa Barbara startup Social Intelligence brings 'Pre-crime' to the HR dept. - <AUTHOR> http://itmanagement.earthweb.com/features/article.php/3905931/Pre-crime-Comes-to-the-HR-Dept.htm

<comment><USER2> This scares me given how poorly HR departments make hiring decisions.</comment>


Android Mazar malware that can 'wipe phones' spread via SMS - <AUTHOR> http://www.bbc.com/news/technology-35586446 <comment><USER2> That link has almost no technical content. The discussion about "text messages" led me to believe this was another MMS vulnerability, but no. What I believe to be the original source:

[https://heimdalsecurity.com/blog/security-alert-mazar-bot- ac...](https://heimdalsecurity.com/blog/security-alert-mazar-bot-active- attacks-android-malware/)

Points out that it's just a worm that points you to an URL with a direct download of an APK, which the user would then have to configure to install manually.

I guess the "not in Russia" bit is mildly amusing.

</comment><comment><USER3> [http://www.welivesecurity.com/2009/01/15/malware-trying- to-a...](http://www.welivesecurity.com/2009/01/15/malware-trying-to-avoid- some-countries/)

</comment><comment><USER4> Suggested title verbiage fix: "Android malware only attacks smartphones ON which language is not set to Russian"

or (more clear): "Android malware only attacks smartphones WHEN language is not set to Russian"

</comment><comment><USER5> The submitted title ('Android malware only attacks smartphones, which language is not set to Russian') broke HN's rules about editorializing. Cherry-picking a single detail to frame the story for everyone is not allowed, and since the original title was neither misleading nor linkbait, it should have been used here.

If you want to say what you think is important about an article, please do so in a comment. Then your view will be on a level playing field with everyone else's.

[https://news.ycombinator.com/newsguidelines.html](https://news.ycombinator.com/newsguidelines.html)

</comment><comment><USER6> Let's see:

1\. Receive MMS from unknown person

2\. Make sure Install Apps from Unknown Sources is turned on

3\. Install suspicious app

Android malware is really a non issue that is perpetuated by companies that make Android "security" apps or sites that use FUD to drive traffic.

<comment><USER7> Nailed it.

</comment></comment><comment><USER8> This is a de-facto standard among all kinds of malware. In fact, it's more surprising when you see bots where this isn't the case.

<comment><USER9> Any sources or references on that? That would imply the vast majority of malware does not target devices set to Russian. Why wouldn't malware targeting non-English, non-Simplified Chinese, or even non-Farsi or non-Arabic be common as well?

<comment><USER10> Russian authorities generally leave you alone as a hacker unless you start hacking Russians.</comment></comment></comment>


Zero-downtime Deployment (and Rollback) in Tomcat; a walkthrough and a checklist - <AUTHOR> http://www.javacodegeeks.com/2011/06/zero-downtime-deployment-and-rollback.html

<comment><USER2> This seems like it'd be useful for almost all situations except for DB schema changes.

Those of you using Tomcat JEE apps, and deal with downtime, how do you handle putting up some sort of "we're down" page? What strategies do you use?

<comment><USER3> _all situations except for DB schema changes_

For that there is Edition-based Redefinition: [http://www.oracle.com/technetwork/database/features/availabi...](http://www.oracle.com/technetwork/database/features/availability/edition- based-redefinition-1-133045.pdf) (2009)

</comment></comment><comment><USER4> I can't find any documentation about this at all - is there a link anywhere that describes it in more detail? Nothing on the apache site that I can find...

Great feature, but it's not a feature until it's documented!

</comment><comment><USER5> Sounds kind of like what Erlang has had for years.

Truth be told though, I think a tiny bit of downtime to restart is perhaps not as important as many other considerations for _many_ web apps.

</comment><comment><USER6> There is another rather well-established solution to the problem of redeploying any Java applications (either web profile only or full blown enterprise edition) and it is JRebel from ZeroTurnaround - have a look, quite interesting: <http://www.zeroturnaround.com/jrebel/features/>

<comment><USER7> They're different problems. This is about running two versions of a web application concurrently and migrating clients from old to new gracefully, without bringing down the site. JRebel is about hot-swapping the bytecode that's loaded into the JVM.

</comment></comment><comment><USER8> This feature has been one of the persistent justifications in my organization for spending money on Weblogic 10 for a time period unknown to me. Seeing this in Tomcat makes me hopeful for a world free of application servers...someday.</comment>


$100 Gold Apple Watch Upgrade - <AUTHOR> https://www.kickstarter.com/projects/638741610/plate-your-steel-apple-watch-with-24k-gold

<comment><USER2> I love this idea! Awesome looking kit and the DIY aspect is cool.</comment>


The Automatic CSS Inliner Tool - <AUTHOR> http://beaker.mailchimp.com/inline-css

<comment><USER2> FWIW, inline CSS functionality has long been part of the MailChimp API: <http://apidocs.mailchimp.com/api/1.3/inlinecss.func.php>

</comment><comment><USER3> Useful tool.

Another one to check out is Premailer (<http://premailer.dialect.ca/>) which now has an API in beta and a few more options for conversion.

<comment><USER4> +1 for Premailer, I was going to dig this link up.

Coding HTML email is a nightmare.

</comment></comment><comment><USER5> <https://github.com/learnboost/juice>

</comment><comment><USER6> !confused. Using Chrome, I right-click > "View Page Source", copy, paste in the first textbox, click "Convert it" and the result seems to be identical to the input... err... what did I do wrong?

</comment><comment><USER7> For Python people: <https://github.com/peterbe/premailer>

</comment><comment><USER8> Different but related: <http://htmlemailboilerplate.com/>

</comment><comment><USER9> For ruby apps there's: <https://github.com/Mange/roadie>

</comment><comment><USER10> This was incredibly useful when I was designing an email template for my service. Great tool!

</comment><comment><USER11> Now all you need is the inverse of this to fix the mass overuse of inline styles.

</comment><comment><USER12> cool, but is there any programmatically solution for inlining CSS (for a node, coffeescript, cakefile) setup (without using any nifty templates)?

<comment><USER3> Premailer has an API (in beta) <http://premailer.dialect.ca/api>

</comment></comment><comment><USER13> This is nifty :-)</comment>


Canned Craft Beer Picture Database - <AUTHOR> http://www.craftcans.com/db.php?cat=cans <comment><AUTHOR> 8 bit pale ale

[http://www.craftcans.com/db.php?beer=595](http://www.craftcans.com/db.php?beer=595)</comment>


Ask HN: React.js and PATENTS clause. Can I please just stop worrying about this? - <AUTHOR> React sounds awesome, I have seen the docs & and I like some of the ideas around the entire ecosystem. I don't want to base my work off of other libraries that emulate React (Vue?) for fear of non maintenance and community support.
I've been stuck on the PATENTS clauses in React for a while now. I have actively told people about it. This is the latest text of the clause as of this writing: https://github.com/facebook/react/blob/b8ba8c83f318b84e42933f6928f231dc0918f864/PATENTS#L14..L26
But I fear maybe I was exaggerating the trouble in my mind.
In non-legalese, am I correct in assuming the following:
1. If Facebook or it's sub-entities sue me/my product for Patent Infringement, I DON'T lose the right to continue using React in my product (which would trigger a catastrophic & urgent rewrite).
2. If I/my company or sub-entities sue Facebook for Patent Infringement, I immediately lose the right to use React in my Product.
3. If in regards to (1), I "counter sue" Facebook, which AFAIK is the way to defend against the litigation, I DON'T lose the right to use React.
If the above are correct, I have a further question about (2):
Say AlphaCorp owns Beta Co. & Gamma Ltd., all producing different products. If Gamma Ltd. chooses to sue Facebook for patent infringement, All products arising from Beta Co. & AlphaCorp itself would lose the right to use React. Is that correct?
Finally, how does this compare to the terms of using Angular/TypeScript? Are they equally onerous and just don't have an explicit mention?
If all my assumptions above are true, then I guess I can live with building a few things off of React and make some money without fear of the legal letter. <comment><USER2> [IANAL]

With any software project there is some risk of patent litigation. It's just a specific instance of the general risk of litigation, e.g. padleft and Kik mobile.

For a business, it's a matter of risk management. That means assessing how likely your business is to be involved in a patent dispute regarding React relative to all the other risks, such as not having users, or focusing on the wrong thing [?], or the "bus factor" out in the real world.

Good luck.

<comment><AUTHOR> I agree on this, especially for my own projects. But as investors get involved, or I add the library into a consulting project, I end up thinking about the questions I posed. Not always practical to ask for legal on those projects though :)

<comment><USER2> Disclosing the use of React and every other piece of outside software perhaps falls under the discipline of the professional. Investors and clients are obligated to do their own legal due diligence and risk assessment.

An errors and omissions policy from your insurance agent is a method of risk mitigation.

</comment></comment></comment><comment><USER3> You know what the best thing to do when you have serious questions about a legal document is?

Call a lawyer.

<comment><AUTHOR> Fair point, just wondered if someone from the community who had done something similar could shed some light :)</comment></comment>


Horror story about git – Forever Alone - <AUTHOR> http://thedailywtf.com/Articles/Forever-Alone.aspx

<comment><USER2> Dude who likes to work alone keeps a zip archive of all old versions of all changed files in git, and git becomes slow.

<comment><USER3> I thought that 'derpecated.zip' was an accidental misspelling until I saw 'derpecated' repeated again on the next line.

It looks like you can easily fix this with git filter-branch</comment></comment>


RabbitMQ 2.0 is out includes paging messages on disk and support for AMQP 0-9-1 - <AUTHOR> http://lists.rabbitmq.com/pipermail/rabbitmq-announce/2010-August/000028.html

<comment><USER2> More details here: [http://lists.rabbitmq.com/pipermail/rabbitmq- announce/2010-A...](http://lists.rabbitmq.com/pipermail/rabbitmq- announce/2010-August/000028.html)

The new persister is going to help a LOT of people. Check it out!

<comment><USER3> Thank you so much! I have been waiting on this for months now, and I can't believe it's finally here!

</comment></comment><comment><USER4> Full release notes: [http://lists.rabbitmq.com/pipermail/rabbitmq- announce/attach...](http://lists.rabbitmq.com/pipermail/rabbitmq- announce/attachments/20100825/2c672695/attachment.txt)

</comment><comment><USER5> Didn't a recent article on Varnish vs. Squid show that letting the kernel handle paging was a better method? Or is this not related?

</comment><comment><USER6> now only if it cooperated with STOMP better

<comment><USER7> Hmm, that might be fun to hack on...

One problem will be that AMQp is _much_ more complicated than Stomp, and exposes a set of primitives for which there is no good analogue in Stomp -- notably bindings and queues as first class, client manipulable, items.

It should be possible to choose some reasonable behavior though and go with it. Ah, where is my copious free time!?

</comment></comment><comment><USER8> RabbitMQ rocks, I've recently written a small tutorial on using their rabbitmq erlang client: [http://developingthedream.blogspot.com/2010/08/setting-up- qu...](http://developingthedream.blogspot.com/2010/08/setting-up-queue- consumer-with.html)</comment>


Before you buy: Mac value analysis - <AUTHOR> http://developingperspective.tumblr.com/post/8093168321/mac-value-analysis

<comment><USER2> "The Mac Mini is the clear winner in value for money. Even if you consider that you'd need your own monitor."

Well ... no. The 27" iMac comes with a screen that would cost you $900 - $1200 depending on where you buy it from. 2560 x 1440 resolution monitors are not common or cheap.

If you want the high resolution, large monitor, the 27" iMacs are easily the best value.</comment>


XKCD reaches 1000 comics - <AUTHOR> http://xkcd.com/1000/

<comment><USER2> At first I thought someone just linked to an old comic, as it seemed like there were thousands already (most of them really good too!)</comment>


Firefox 3.5 is out - <AUTHOR> http://www.mozilla.com/en-US/firefox/upgrade.html

<comment><USER2> Argh. I want to love Firefox 3.5. Really, I do. Modern web standards. Faster. Smaller memory footprint. Native Aqua widgets (effing _finally_).

The problem is, compared to Chrome and Safari, it's a dog.

I've been running the nightly (Shiretoko) for weeks now, and, like everyone else, I'm hopelessly addicted to various extensions during heavy browsing sessions (development, etc).. but when I want to pop up a browser, check something quickly, and move on with my life, Safari is the browser of choice. The initial launch speed and JS performance are orders of magnitude faster.

Gecko is a great layout engine, but my gut feeling is that XUL and friends are holding it back. Agree? Disagree?

<comment> old-gregg It's even worse on Linux. FF performance on Ubuntu/Gnome was pretty bad. Starting up, scrolling and even window resizing made me feel like I was using a Pentium II. I want back to OSX+Safari. I only fire up FF when I need Firebug.

On the other hand, FF on Windows is blazing fast. So I doubt it's just XUL.

Edit: wow, they did Safari-like pixel-precise touchpad scrolling (OSX). Very nice.

<comment><USER3> I run FF on Debian (iceweasel), and it is acceptably snappy, but there is a bit of a trick to this:

1\. Every extension you add seems to decrease performance by 30-50% (rough numbers) [1]. So live with a bare essential set of extensions. For me that is Firebug and FlashBlock.

2\. Keeping very many bookmarks or history items seems to destroy performance, particularly with the "awesome bar." I disable history completely and have it clear everything else on browser close.

Before I settled on this FF usage technique, FF would degrade in performance over the course of months as it built up data in the profile. Eventually it would become unusable [2] until I deleted the profile and started fresh. Now I just prevent it from building up any data.

[1] As much as I used to like this extension, my experience has been that ForecastFox in particular hammers browser performance.

[2] It would take _seconds_ , sometimes 10 or more, to open a new tab to about:blank. With this technique though, I currently have ~ 25 tabs open, and new tab creation is instantaneous.

<comment><USER4> Or you could just run Firefox completely in RAM in Linux, as I do:

[http://webupd8.blogspot.com/2009/05/speed-up-firefox-by- moun...](http://webupd8.blogspot.com/2009/05/speed-up-firefox-by-mounting- profile-in.html)

It's fairly easy. There's a guide just for Ubuntu, too:

<http://ubuntuforums.org/showthread.php?t=991205>

<comment><USER5> I wish the OS was smart enough to do this automatically. I have 16GB of RAM on my workstation, and rarely use more than 8GB.

</comment></comment></comment></comment></comment><comment><USER6> Some rough figures:

      IE7: 0% (base, 1x)
      IE8: 24% faster (1.24x)
      FF3: 73% faster (1.73x)
      FF3.5: 183% faster (2.83x)
      Opera 10: 196% faster (2.96x)
      Chrome 2: 354% faster (4.54x)
      Safari 4: 427% faster (5.27x)

Personally I use Safari because I prefer WebKit (it being fast is nice too), but I'm very impressed with Firefox 3.5. It makes a very good development environment with all the extensions available for it! :)

<comment><USER7> What are you using to arrive at those numbers? SunSpider, Dromaeo, some other benchmark?

<comment><USER6> Peacekeeper: <http://service.futuremark.com/peacekeeper>

As I said, it's very rough, but seems to be a good indication of where abouts browsers are in comparison to each other.

Though, once you get to a certain point (around 2x IE7, I'd say), it becomes irrelevant to 99% of what you'd want to do. Or should I say, irrelevant of what you _can_ do, while slow browsers still have high market-shares...

<comment><USER7> I agree with your perception - most of the modern browsers are just fine at this point.

I've been skeptical of Peacekeeper, though - the tests may be fine but it's hard to tell since they haven't released the source of them, at all. I'm not even really sure how to determine if/how improvements could be made. As far as I know, none of the major browser vendors use Peacekeeper as a benchmark for their engines (which is really what a good benchmark should strive for: to push for the improvement of the browsers that it measures).

</comment></comment></comment></comment><comment><USER8> Here's a short python script to optimize your firefox databases: <http://pastebin.com/m155f9e6e>

Close firefox, run it, be amazed. People have been claiming phenomenal speed boosts (mostly if your profile has aged a bit).

<comment><USER9> find ~/.mozilla/ -iname '*.sqlite' -exec sqlite3 {} 'vacuum;' \;

</comment></comment><comment><USER10> I thought their new stats page was really cool:

<http://downloadstats.mozilla.com/>

<comment><USER11> Anyone know what SQLStream (the software Mozilla is using for the stats page) costs? Their web site doesn't say and it looks very "enterprise-y" so I'm guessing lots.

</comment></comment><comment><USER12> Bah, the release notes link gives me a 404... here is the cached version of the RC release notes from last week...

[http://18.104.22.168/search?q=cache:P21aJ836YuQJ:www.mozilla...](http://22.214.171.124/search?q=cache:P21aJ836YuQJ:www.mozilla.com/firefox/3.5/releasenotes/+firefox+3.5+release+notes&cd=1&hl=en&ct=clnk&gl=us&client=firefox-a)

EDIT: A much better list... <https://developer.mozilla.org/en/Firefox_3.5_for_developers>

EDIT#2: The What's New page that loads after installing also 404's...

<comment><USER12> (Figured a third edit might be inappropriate.)

Aside from TraceMonkey and the new Gecko, my favorite new feature (in theory) is probably the DNS Prefetching:

<https://developer.mozilla.org/En/Controlling_DNS_prefetching>

I say in theory because I haven't run any objective tests, but, subjectively, things do seem to load a bit faster.

</comment></comment><comment><USER13> the new firefox is pretty fast and the new tab design looks good. I think I'll pause google chrome for a few days.

update: if you have issues with old addons in firefox 3.5, John Resig suggests you to do the following: Open about:config, right-click new boolean 'extensions.checkCompatibility', set false, restart. (via <http://twitter.com/jeresig/status/2404695608>)

<comment><USER14> I read that somewhere else. When I went to look for that setting, I couldn't find it. I'm on Mac OS X.

<comment><USER15> you have to add it. right click when in about:config to add a new entry.

<comment><USER14> Thank you.

</comment></comment></comment></comment><comment><USER16> I'm still running Ubuntu 8.10, anyone get the release running there yet and want to share how they did it? Ideally I'd like to avoid trashing my old 3.0.11 install or profile...

<comment><USER17> I have to run various versions of Firefox for testing purposes. What I've done is to download the binary from their homepage and then run them with the appropriate command line:

        /path/to/firefox2 -no-remote -P ff2

        /path/to/firefox3 -no-remote -P ff3

-no-remote allows me to run separate profiles at the same time, -P specifies a profile name. So they don't run updates on, or ruin the other profile.

<http://kb.mozillazine.org/Command_line_arguments>

<comment><USER16> Here's what I did (using andyn's method):

Download the linux version of firefox 3.5 from [http://www.mozilla.com/en- US/products/download.html?product=...](http://www.mozilla.com/en- US/products/download.html?product=firefox-3.5&os=linux&lang=en-US)

Untar and unzip firefox-3.5.tar.bz2:

      tar xjf firefox-3.5.tar.bz2

Move the new firefox 3.5 directory to /usr/lib:

      sudo mv ./firefox /usr/lib/firefox-3.5

Create a shell script to run firefox using andyn's params. Create a file (I called it firefox.sh) in /usr/lib/firefox-3.5/ with the following contents:

      #!/bin/bash
      /usr/lib/firefox-3.5/firefox -no-remote -P <profile_name>

Note: Substitude <profile_name> with whatever you want to call your Firefox 3.5 profile; just make sure when prompted at first-run you create a new profile with the same name.

Make the shell script executable:

      sudo chmod u+x /usr/lib/firefox-3.5/firefox.sh

Simlink the shell script into the /usr/bin dir, or somewhere on your path:

      sudo ln -s /usr/lib/firefox-3.5/firefox.sh /usr/bin/firefox3.5

Run the script from the command line using:

      firefox3.5

Enjoy!

<comment><USER18> For those of you who want 'firefox' to run 3.5 with your current 3.0 profile, you can do the following:

      tar xjvf firefox-3.5.tar.bz2
      sudo mv ./firefox /usr/lib/firefox-3.5
      cd /usr/bin
      sudo ln -s /usr/lib/firefox-3.5/firefox firefox-3.5
      sudo rm -f firefox
      sudo ln -s firefox-3.5 firefox

You can run 3.0 by using 'firefox-3.0', which should already exist.

</comment></comment></comment></comment><comment><USER19> Since installing 3.5RC and even upgrading to 3.5 my login state for sites hasn't been respected by FF. I have to log back into every site I visit every time I restart firefox - anyone have any suggestions as to what I can try to fix this? Cookies are on, passwords are stored and I'm not in privacy mode.

</comment><comment><USER20> Private Browsing !!!

yeah.. but when I hit Ctrl-Shift-P It just overrides the current window ! And I have to hit that again to the public firefox browser. !

That just seems weird ! Atleast thats what the default does

</comment><comment><USER21> what the freck happened to using cmd/ctrl + arrows to organize the tabs?? i usually have dozens of tabs opened and i used that feature to prioritize them! now they took it away and it's frecking annoying

</comment><comment><USER22> It feels a lot faster, at least on Mac OS X. The interface seems to be much more responsive as well. It's nice to see they have focused on performance :)

<comment><USER23> I didn't notice any difference. Seems to take as much to start and is still noticeably slower than Safari.

Seems to use much less memory though.

</comment></comment><comment><USER24> I tried out the <video> tag on the 3.5 About page, but it still uses Flash. I thought the whole point was to go native and avoid Flash?

<comment><USER25> Not sure what your issue is. I checked the Tour Firefox 3.5 video, and it worked like a charm, no flash req'd.

<comment><USER24> I right-clicked on the video and it says 'Flash 11'.

Is it possible that if Flash isn't present, it shows it natively using Firefox?

</comment></comment></comment><comment><USER26> The Acid3 test page is currently down. Coincidence?

</comment><comment><USER27> Great, 4 of the top spots taken up by Firefox, PHP, Wireshark, and Virtualbox release notes. I know we've had this debate before, but I don't see why anyone wants 15% of their news to be release notes. If I care about these projects (and I do), I'll subscribe to a related RSS feed or mailing list. The only possible benefit I see is some useful discussion about new features, but honestly that's hardley enough benefit to compensate.

I've only seen the volume of release notes go up in the past month. I don't think we should reward the people that post them with karma. That will just encourage newer users to post more release notes for more and more tangentially related products. I wouldn't be suprised to see some scripts pop up that automatically post release notes of significant projects (as we've seen in the past with pg's essays). Heck, even if we restricted outselves to release notes of software used by YC companies, we'd still be overwhelmed.

I know it's an unpopular opinion, but honestly we can do better.

EDIT: For those claiming that they are in it for the dicussion, point me to any useful discussion so far in any of the 4 mentioned stories. As of this writing I count 2 or 3 useful comments, and maybe 1 useful discussion. So I don't buy it. Rephrasing the release notes certainly doesn't count.

Firefox: <http://news.ycombinator.com/item?id=680853>

Virtualbox: <http://news.ycombinator.com/item?id=680692>

PHP: <http://news.ycombinator.com/item?id=680649>

Wireshark: <http://news.ycombinator.com/item?id=680286>

<comment><USER28> Well, these tools are essential to many hackers, so the posts are definitely relevant to HN. IMO, it makes much more sense to view all such news in a central location (i.e., HN), rather than subscribing to individual projects' RSS feeds, where one would also be notified of developmental releases.

<comment><USER29> Shouldn't your central location be your rss reader? Most of the projects you mention have low-traffic announce feeds that only post on release.

You are basically demanding that a scarce public resource (HN front page) be used up to satisfy a need you could take care of on your own.

It's kind of humbling to see the tragedy of the commons playing out so clearly here.

<comment><USER30> Perhaps I'm unusual, but I find the dicussion is often as interesting as the link (perhaps not for this item :-). And you don't get that on an announcements RSS feed.</comment></comment></comment></comment>


How Crocs Rakes in Revenues From Ugly Shoes - <AUTHOR> http://www.businesspundit.com/how-crocs-rakes-in-revenues-with-a-single-ugly-shoe/ <comment><USER2> They rake in revenues because it's a great product at a great price.

My day/night job is as an ER nurse, and pretty much the only shoes I've worn for the past 3 years are Crocs. I walk an average of 5 miles a shift at work, and I'm standing when I'm not walking. I've been used to spending $80-150 a pair of shoes for years. Now, with Crocs being $35 a pair, I buy them 3 pair at a time. And, the anti-bacterial bit is very nice for the nasty splashes at work.

<comment><USER3> I like the fact that Crocs are anti-bacterial, but it also worries me. The use of anti-bacterial soap and other cleaning products in hospitals has spawned super bugs resistant to known means of combating pathogens. Could Crocs share the same fate?

<comment><USER4> Is it antibacterial in the same sense as soap? I thought it was a material that just made it harder for bacteria to get a physical foot hold (no pun intended).

</comment></comment></comment><comment><USER5> "They nailed down their supply chain. Crocs purchased the supplier of the resin for the shoes and the factories that make Crocs. They also signed contracts with key retailers."

How does this ensure success? Sure, it ensures that they have complete control over their ability to deliver a product, but that has nothing to do with being able to SELL it.

Not criticizing, just curious.

<comment><USER6> It's a necessary but not sufficient condition. It meant that when Crocs became a market hit, their suppliers couldn't raise prices on them. It meant they could capture all the value that their popularity created.

<comment><USER7> Well it's not a _necessary_ condition either. Plenty of companies, and indeed plenty of shoe companies, are successful without purchasing their entire supply chain down to the plastic-factory level.

<comment><USER6> True. But it might be necessary for them to get enough capital and resources to survive after the fad wears off.

</comment></comment></comment></comment><comment><USER8> I hate the shoes. But my next hockey equipment purchase is going to be made of this croslite stuff for sure.

Non-smelly hockey gear: something people _really_ want!

<comment><USER9> Non smelly? Have you ever been in a croc store? I went in with a few girls and I had to leave. The overwhelming stench of plastic fumes was making me gag. I felt physically ill just being in their store. I've worked on drilling rigs that smelled less chemically.

Hopefully it's less horrid than your hockey stuff is right now and is a positive trade ;)

<comment><USER8> Few things smell worse and when you are in a small dressing room with a team of guys and their equipment. Yikes!

Actually some googling after that comment led me to this: <http://www.thestar.com/Business/article/429427>. These guys claim that the croc-style equipment only masks the problem while their stuff kills the odour- causing bacteria. If the next front in the war between equipment makers is on anti-stink technology I am all for it!

<comment><USER10> There is a reason that athlete's foot is called athlete's foot...

</comment></comment></comment></comment><comment><USER11> that's interesting, because their stock is currently at an all-time low:

[http://www.uglychart.com/2008/06/10/crocs-inc-crox-at-a- new-...](http://www.uglychart.com/2008/06/10/crocs-inc-crox-at-a-new-all-time- low/)

<comment><USER12> Thank you for pointing that out... if you hadn't, I would have.

Now compare that chart with Heely's HLYS. Or Jones Soda JSDA.

These are fad stocks based off trendy items...however:

The only difference with CROX is that they have a patent on a very good material. They can license it out, but it won't have near the revenue as their ugly plastic shoes.

For more analysis, read the beginning of this article:

www.thebestpageintheuniverse.net/c.cgi?u=fashion

</comment></comment><comment><USER13> The jibbitz piggyback was also quite clever: [http://money.cnn.com/2006/11/02/magazines/business2/crocs_si...](http://money.cnn.com/2006/11/02/magazines/business2/crocs_side.biz2/index.htm?postversion=2006110218)

<comment><USER14> I still can't find any aesthetic appeal at all in those shoes, and I simply attribute it to a generation gap. But this story is well worth thinking about.

<comment><USER15> For some people, function is more important than function. They're great shoes, and considering where they're typically worn, does aesthetic appeal matter?

The ugliness actually appeals to some people, too.

<comment><USER14> This is an interesting point. It brings out the question: just how far can you make something ugly (assuming I'm not dead wrong about lack of aesthetic appeal in those slippers), provided that they do their non-aesthetic job right?

Certain famous websites come to mind. On a tangential point, it seems like these things must be relatively cheap and easily accessible, and cannot become status symbols. Sushi is an example where aesthetic appeal is as important as its palatability. (I'm typing a bit aimlessly)

So, what about those NIKE Naked shoes (or whatever?)? They are less of a fashion statement because they stand out less, I presume?

</comment></comment></comment></comment><comment><USER16> A vulnerable business if there ever was one. Between their patent woes and cheap knock-offs from China, I wonder where they'll be in 2 years.

Thanks, but I think I'll stick with IT.

<comment><USER6> About 1/4 of the article was about how they've been madly diversifying because they _know_ that ugly shoes are a fad. They used the cash and scale that the shoes provided to become a diversified manufacturing company.

</comment></comment><comment><USER17> crocs rake in revenue because they are universally accessible and come in any colorway you can think of.</comment>


Apple's Online Store is Down... What Gives? - <AUTHOR> http://www.streetinsider.com/Insiders+Blog/Apples+(AAPL)+Online+Store+is+Down...+What+Gives%3F/6724847.html

<comment><USER2> Usually it means they are going to announce something and the store goes down until it announces and then comes up with the new thing.

I have seen it could just be broken though. If that is the case no doubt someone is yelling "We sell several BILLION dollars a quarter worth of stuff here, you're damn right I'm 'antsy'!"

</comment><comment><USER3> Could be Apple's testing of their new mobile-friendly version of the apple store.</comment>


High Altitude Photography Project - <AUTHOR> http://vimeo.com/12421661

<comment><USER2> love this. what amazing images. he mentions that he had some problems originally with condensation on the lens, I wish he would say how he solved this and generally said more about the process....</comment>


Brain Computation by Assemblies of Neurons - <AUTHOR> https://www.pnas.org/content/early/2020/06/08/2001893117 <comment><USER2> Quite interesting. Maass has done some pioneering work on Liquid State Machines and Echo state networks (LSTMs/RNNs).

In this paper they define a formal system intended to model the computations underlying cognitive functions that is done via an assembly, a set of excitatory neurons all belonging to the same brain area, and capable of near- simultaneous firing.

The main assumption in their model that I do not agree with is that of random synaptic wiring of the circuits. There is considerable research that argues that synaptic connectivity is not random but specific in several ways [0,1].

[0] Sporns O. (2011). The non-random brain: efficiency, economy, and complex dynamics. Front. Comput. Neurosci. 5:5 10.3389/fncom.2011.00005 [1] [https://science.sciencemag.org/content/366/6469/eaay3134/tab...](https://science.sciencemag.org/content/366/6469/eaay3134/tab- figures-data)</comment>


Show HN: Sensible Bash: An attempt at saner Bash defaults - <AUTHOR> https://github.com/mrzool/bash-sensible <comment><USER2> I feel like discussion of 'sensible bash defaults' is incomplete without mention of .inputrc. My most "can't live without it" setting for bash is actually an .inputrc setting:

        # From http://www.ukuug.org/events/linux2003/papers/bash_tips/
        # Incremental searching with Up and Down is configured in .inputrc
        "\e[A": history-search-backward
        "\e[B": history-search-forward

... so if I type `ssh <up arrow>` I get the last command that started with `ssh`, not the last command I ran. oh-my-zsh thankfully does this by default as well. But I still use my .inputrc on server boxen where I don't want/need to install a different default shell.

Also worth noting that all of those `bind` commands in OP's script are actually .inputrc lines if you remove the `bind` and surrounding quotes.

<comment><USER3> This is why these things are so personal. I'd hate this. The up/down bindings are __absolutely __tied to specific command orders in my head. I need to know that "three commands back" is wherever I was in the sequence of commands that I'm repeating.

If I'm trying to semantically query my history (for "ssh") in this case I'll use the ^R binding to incrementally search the history, or literally grep ~/.history for what I'm looking for.

That's not to say that you're "wrong", just that calling these things "sensible defaults" is sort of missing the point. Nothing about them is sensible for everyone.

<comment><USER4> If you just press "up" without typing anything first then it works as you expect. I find ^R annoying if I've already started typing the command and then realise I can search the history (although that's probably configurable).

Once you get used to it, the only downside of up/down history search is when you ever use a shell that doesn't do it and you feel lost.

<comment><USER5> On a standard Ubuntu install: If you press ^R after already typing part of what you're searching for, and then press a key (space, or more of the command you're searching for), then it'll switch to the history-search mode with that value pre-filled in.

</comment></comment></comment></comment><comment><USER6> > Prepend cd to directory names automatically, so you can cd into directories > just by typing their name;

I'm pretty sure this is a solution to a problem I don't have today.

> Treat hyphens and underscores as equivalent;

> Automatically correct spelling errors during tab-completion;

I'm terrified to put this in my shell. Then again, it's not all-or-nothing:

> cherry-pick the options you like most ... everything is open for discussion

<comment><USER7> > > Automatically correct spelling errors during tab-completion; > I'm > terrified to put this in my shell.

I had it in once (it's one the options in zsh setup)

Once I was cleaning my home directory:

        rm -rf tec<Tab>
        rm -rf IdeaProjects<Ret>

I'm a bit too quick to press enter after tab. So i deleted the wrong folder.

I do still have it auto correct case. So `doc<Tab> -> Documents`

<comment><USER8> This is why I delete to trash, even from a terminal. I use the trash-cli package on Debian/Ubuntu.

Also:

        alias rm 'rm -i'

<comment><USER9> -f overrides -i unfortunately.

(trash-cli sounds good, thanks for the tip)

</comment></comment></comment></comment><comment><USER10> May be an old-fart prejudice, but my eyes cross to think that 'dash and underline are equivalent' might be a desired thing. Making bash be clever seems like a pile of pitfalls.

To each their own.

<comment><USER11> Yeah, I don't get this one, either. This seems far away from sane.

What's the rationality behind it?

<comment><AUTHOR> I don't have any file or folder name starting with a dash, while underscores are pretty common. Treating dashes and underscores as equivalents saves you one keystroke (i.e. you can type `cd -folder<tab>` instead of `cd _folder<tab>`).

<comment><USER6> You mean it saves you one edit in the case where you've mistyped the directory name? Otherwise it seems like no keystrokes are saved among the two you show.

EDIT: groan, ok, you win. Net -1 keystroke for most keyboards.

<comment><AUTHOR> The shift press doesn't count as keystroke? :)

</comment></comment></comment></comment></comment><comment><USER12> It would be nice if bash had a more discoverable version of the 'help' command for new users.

Right now, someone (say, a bright 12-year-old) who opens up a terminal for the very first time and types "help" is greeted with this lovely mess:

         compgen [-abcdefgjksuv] [-o option]  >  return [n]
         complete [-abcdefgjksuv] [-pr] [-DE] >  select NAME [in WORDS ... ;] do COMM>
         compopt [-o|+o option] [-DE] [name ..>  set [-abefhkmnptuvxBCHP] [-o option->
         continue [n]                            shift [n]
         coproc [NAME] command [redirections]    shopt [-pqsu] [-o] [optname ...]
         declare [-aAfFgilnrtux] [-p] [name[=v>  source filename [arguments]
         dirs [-clpv] [+N] [-N]                  suspend [-f]
         disown [-h] [-ar] [jobspec ...]         test [expr]
         echo [-neE] [arg ...]                   time [-p] pipeline
         enable [-a] [-dnps] [-f filename] [na>  times
         eval [arg ...]                          trap [-lp] [[arg] signal_spec ...]
         exec [-cl] [-a name] [command [argume>  true
         exit [n]                                type [-afptP] name [name ...]
         export [-fn] [name[=value] ...] or ex>  typeset [-aAfFgilrtux] [-p] name[=va>
         false                                   ulimit [-SHabcdefilmnpqrstuvxT] [lim>
         fc [-e ename] [-lnr] [first] [last] o>  umask [-p] [-S] [mode]
         fg [job_spec]                           unalias [-a] name [name ...]
         for NAME [in WORDS ... ] ; do COMMAND>  unset [-f] [-v] [-n] [name ...]
         for (( exp1; exp2; exp3 )); do COMMAN>  until COMMANDS; do COMMANDS; done
         function name { COMMANDS ; } or name >  variables - Names and meanings of so>
         getopts optstring name [arg]            wait [-n] [id ...]
         hash [-lr] [-p pathname] [-dt] [name >  while COMMANDS; do COMMANDS; done
         help [-dms] [pattern ...]               { COMMANDS ; }
        user@host:~$

</comment><comment><USER13> Most of these are included in /usr/bin/fish :)

<comment><USER14> Came here to say this! Got tired of the little quirks, and never looked back.

<comment><USER8> Yep, for interactive use, Fish is fantastic. Bash is still a better choice for most shell scripting though.

Also recommend using something like Percol or fzf for filter-as-you-type command history.

</comment></comment></comment><comment><USER15> Hey guys! If you are interested in "different" shells and REPLs I suggest you check out Ammonite-REPL / Ammonite-Shell -[http://www.lihaoyi.com/Ammonite/](http://www.lihaoyi.com/Ammonite/) It's written in Scala and well. It looks ql. :)

</comment><comment><USER16> This looks pretty sane overall. If you try this, be aware that it changes directory navigation, i.e. "Prepend cd to directory names automatically, so you can cd into directories just by typing their name", "Automatically correct spelling errors in arguments supplied to cd". I've tried these things and they drove me insane, so they're not good defaults for everyone.

</comment><comment><USER17> I like it. It is not a complete revamp of bash to something else (the zsh- comment below is not fitting), it just enables some comfort features bash readily supports. One can argue about the case-insensitivity, but I see no other option that could be controversial. Just a small collection of sane defaults.

</comment><comment><USER18> In other words: making bash more like zsh

<comment><USER19> Came here to say the exact same thing.

Get zsh today. Give it a spin.

<comment><USER20> Or fish, which is basically zsh with sane defaults.

<comment><USER21> Or bash, since it will be installed everywhere, you don't have to get it, and most scripts you'll find online will work on it.

<comment><USER22> This is a non-issue. The `!#/bin/bash` at the top of scripts will tell the interpreter which shell to run. And any one liner I've found online for bash has also worked on zsh (for me), but even if it didn't: `bash -c ls`

<comment><USER20> Yes exactly.

Today I learned people actually write / use scripts without specifying the interpreter at the top of the script. This is like writing a Ruby script and expecting it to work when calling it with the Python interpreter.

</comment></comment></comment></comment></comment></comment><comment><USER23> These history settings should clearly be the real defaults. I wonder how difficult it would be to get them changed upstream?

Upstreaming would also allow improvements, for example PROMPT_COMMAND='history -a' doesn't update history until the next prompt is displayed. If you close your terminal while a program is running then the last command entered is not saved.

</comment><comment><USER24> Some great ideas here--a lot of them solve problems I've personally had with bash over the past 15 years--but plenty of these feel like solutions in search of problems.

I'm tempted to post my own commentary but I'd probably make the same mistakes. What would be really fantastic is a usability study of bash to see what the common pain points are.

</comment><comment><USER25> Does anyone know if bashscript could be updated to allow spaces between assignment? I can't see how it would break existing programs (but I'm sure there's a catch) and scripts would be much cleaner (and less of an headache).

<comment><USER26> A breaking example might be trying to find lines containing an "=" in a file:

        grep = my_file

Also a problem is the syntax for running a program with environment assignments that apply only to the program:

        env1=foo env2=bar env3= my_program

Note that under POSIX rules, "env3" here is assigned a zero-length string. Making these sorts of assignments work with spaces around the equal signs would open up a can of worms.

</comment></comment><comment><USER27> Minor nitpick: why is the session history larger than the maximum file size?

It always annoyed me that HISTTIMEFORMAT is not set by default. Without it, log entries are simply not timestamped at all.

The readline tweaks were news to me, thanks.

<comment><USER28> HISTFILESIZE is kind of a misnomer. It's the maximum number of _lines_ in HISTFILE, where HISTSIZE is the maximum number of _commands_. If you have HISTTIMEFORMAT set, then each command gets at least 2 lines, plus the possibility of multi-line commands.

</comment></comment><comment><USER29> a lot of this stuff is present in cygwin but by default commented out. Something what made me more productive is a cd_func:

out of .bashrc:

function cd_func

This function defines a 'cd' replacement function capable of keeping,

displaying and accessing history of visited directories, up to 10 entries.

To use it, uncomment it, source this file and try 'cd --'.

acd_func 1.0.5, 10-nov-2004

Petar Marinov, http:/geocities.com/h2428, this is public domain

<comment><USER28> I've got `alias cd=pushd` in my .bashrc. It keeps track of visited directories as a stack (arbitrarily deep).

</comment></comment><comment><USER30> Sensible Bash... like Fish or Z Shell?

<comment><USER31> fish is not even a sh, much less a bash.

<comment><USER30> That's true, but everytime I say the words z shell, someone always says "Fish!", so I figured I'd pre-empt them for once. Go figure it would backfire on me. LOL.

</comment></comment></comment><comment><USER32> Or just use fish. Why is this even a conversation in 2016?

</comment><comment><USER33> I thought 'sensible bash' was called zsh.

Just kidding, but not really, zsh is great and basically compatible with Bash, check it out.</comment>


Female codebreakers reunited at Bletchley Park - <AUTHOR> http://www.telegraph.co.uk/history/world-war-two/10810980/Female-codebreakers-reunited-at-Bletchley-Park.html

<comment><USER2> Women in tech.</comment>


Announcing Kubeflow 0.1 - <AUTHOR> https://kubernetes.io/blog/2018/05/04/announcing-kubeflow-0.1/ <comment><AUTHOR> Heya everyone, cofounder of the project here. Thank you so much for the Kubeflow community for helping us reach this milestone! Our goal was to get the base level packages all wired up and let anyone start a machine learning project anywhere Kubernetes runs in just a few set of commands.

Please let us know if you have any thoughts or what you'd like us to work on next!

Disclosure: I work at Google on Kubeflow.</comment>