It's time to replace GIFs with AV1 video - <AUTHOR> https://www.singhkays.com/blog/its-time-replace-gifs-with-av1-video/ <comment><USER2> At this point, killing GIF is a UX problem, not a format problem.

I've talked about this before [0], but the big problem for me is that video is just difficult as hell. Compared to a GIF, it is just that much harder to save a video on a phone, and then upload it the same way as an image. Try to save a "GIF" from Twitter or from GIPHY - it's a /huge/ pain.

Whatever the GIF killer is will need to pass the right click test - I need to be able to just right click and save it.

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

<comment><USER3> Yes. Just one problem I discovered recently is that _no_ other format does looping properly.

With a GIF, you can right-click and save it, and all the looping info is inside the file. The quality is crappy, but it just works.

With all "proper" video formats, looping info is metadata, stored separately.

You can't even go for something slightly more modern, animated PNGs, because there are warring formats and very few tools that support them.

<comment><USER4> Looping is up to the video player, not the format or container. What "video formats" have looping as metadata? Gifs only have a loop flag so static images can be displayed instead of looped indefinitely as video.

<comment><USER5> GIF lets you control the loop count and playback speed. It's baked in when authored and is useful. You can simply save the file and expect it to work everywhere - dead simple.

The Internet has voted in favor of looping, "GIF-like" moving images. Platforms try to emulate this with proprietary video players. Some have sound (wanted or not), some of the video players prohibit copying, and none of the files work as simply as GIF for sharing.

We need something more modern than GIF, but that has playability baked in. Something that browsers treat as a moving image and not a video.

<comment><USER4> > You can simply save the file and expect it to work everywhere

I don't quite follow. This is because the gif is decoded and played. No different than a video. You don't need a proprietary player to loop a video, you just go back to the start of the video. For streaming, this is only problematic for large videos that can't be cached, but the same applies to large gifs. Browsers can loop video, it's just a right-click setting. HTML5 can loop video, allowing sites to serve video in e.g. a banner, replacing gifs. You can save any video file just like a gif.

> Something that browsers treat as a moving image and not a video.

The entire point of deprecating gifs is because video is superior. Gif as an image format being able to specify frame duration and looping is hardly a noteworthy feature.

<comment><USER5> Video isn't superior for sharable, loopable images.

Try downloading a video from a popular social network. Can you easily do it without inspecting the source? If it's a two second clip, does it loop on your system? Or does the video player exit / end the stream?

This is absolutely a problem that GIF doesn't have.

> You don't need a proprietary player to loop a video

> You can save any video file just like a gif.

Except social networks force you to use a locked down or DRM'd player. You can get chunks of the video sometimes. Your non-tech friends are out of luck.

> you just go back to the start of the video

"just". Yeah, how many players support that out of the box? Yours might, but there are many more that do not.

<comment><USER6> > _Can you easily do it without inspecting the source?_

Yes, I use Page Info (Tools menu -> Page Info) in Firefox. It lists all the media assets on the page and you can download the one you want.

The inability to right-click and save a video is less a problem with the video file itself and more a problem with how the page is structured. You can have the same right-click problem with GIFs depending on where they appear in the page structure.

<comment><USER7> ... That's far from what I would call an acceptable ux.

<comment><USER6> So make an add-on which does the same thing with whatever UX you want. It's a good project for you. I look forward to using it when you're finished.

Alternatively, use one of the media downloading add-ons which already exist.

<comment><USER7> Mass adoption doesn't want to use addons or go in to the developer tools. That's my point. I know how to do it but even for me it is not intuitive.

<comment><USER6> Your point doesn't address the fact that you can have the same right-click problems with GIFs as with video files. The file type doesn't matter, the page structure does.

The great mass of people don't care about saving media assets from a page. There will never be mass adoption of this, no matter how easy it is.

<comment><USER7> They do though. For example love to share memes to each other and with phone it's as simple as pressing the image for a long time. Video formats do need the same kind of actions to compete with the ease of use of gifs.

<comment><USER6> They don't though. You're in a bubble of a minority use case.

Video formats don't need to compete with GIFs. That competition is already over. GIF files are too big to be practical at scale. Video won the file size war a long time ago, which is precisely why Twitter "GIFs" are videos.

</comment></comment></comment></comment></comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER8> The most important part of GIFs for me is that they behave like images in browsers. They are always auto-playing with no concept of play and pause. You can drag and drop them from a browser to your desktop to save them. You can save an entire page and have all the image files save with it. I've never had this work for webm or other video formats.

You could even argue that GIFs not being a video with no video decoding required is a feature. It may take longer to load, but I can have 100+ GIFs playing at once with no impact to my CPU.

I don't care about video compression or hardware decoding or whatever until they function the same way as GIFs do.

<comment><USER9> > It may take longer to load, but I can have 100+ GIFs playing at once with no > impact to my CPU.

I don't know what you're talking about really... I was just using Google Slides today and both Firefox and Chrome went to 250% CPU usage, only because there was one slide with a 5 seconds full screen recording GIF. I begged to the person who added it to turn that to a video.

<comment><USER10> Yep, browsing pages laden with too many GIFs is my favorite way to have a hot laptop that sounds like it's getting ready to lift off and get my low battery warning to pop up.

</comment></comment></comment><comment><USER11> 1995: Compuserve/Unisys is becoming obnoxious!

1996: The GIF KILLER is going to be PNG! (We wait for animation. The PNG committee fails to deliver, they had a LZ method not covered by patent, they had the world cheering them on -- and having myself seen some of the listserv emails back then, some of the committee had asshole reasons thinly disguised like someone didn't like blinking banner ads.)

2001: The GIF killer is going to be MNG! (Oh now simple animation is too hardz! We're going to dump a kitchen sink of video features into it! Later! The rest of us have given up on the PNG committee) The GIF KILLER is going to be APNG! (Says Mozilla, not too convincingly but they did deliver something)

[embarrassing span of time passes]

2007: (The world gave up on all that. GIF is still alive)

[Interestingly, within this time the only other embed besides GIF that loops smoothly is Flash, and --- surprise -- it is universally hated by the Beautiful People]

[embarrassing span of time passes]

2016: With stupid player and JS tricks Geniuses loop video files that stutter and jump at the loop point and pretend they're GIFs. We have millions of colors but crappy loop stitches.

2019: GIF is still alive! Who'da thunk it. We have crappy 256 dither barf BUT perfect loop stitches! Because extending the simple concept to 16 million colors waaaay back in 1996 was just too advanced for the human race.

Let's have a round of applause for the PNG committee.

/SARC fuelled by some frustrating web development compromises

</comment><comment><USER12> It's telling that the author doesn't list all of the file sizes. The GIFs are gigantic but the AV1 files are LARGER than either the H.264 or VP9 versions in every example. If we wanted to replace GIFs you'd want to go with something closer to a comparable level of support and at this scale there's no reason to use a format with no hardware support and limited client support in general:

[https://caniuse.com/#feat=mpeg4](https://caniuse.com/#feat=mpeg4) 97.16%

[https://caniuse.com/#feat=webm](https://caniuse.com/#feat=webm) 86.39%

[https://caniuse.com/#feat=hevc](https://caniuse.com/#feat=hevc) 16.57%

[https://caniuse.com/#feat=av1](https://caniuse.com/#feat=av1) 35%

Note also that this is _any_ support at all, including the slow software implementations which boost the VP9 and AV1 numbers but have significant drawbacks if you care about quality, battery life, or the impact on other things running on the same device.

<comment><USER13> Do you remember that time [1] when GIFs had a patented algorithm, and _suddenly_ the the patent holder decided to enforce it more strictly? This is how GIFs were massively replaced with PNGs, except for the animated. PNG support sucked at the time, too (see e.g. IE6). By now it's far superior to GIF in every way.

I think there is a bit of a parallel here. H.264 and WebM may be brilliant codecs from the engineering POV, but they are somehow encumbered [2]. This _may_ end up in obvious legal problems; if possible, these should be avoided early on, by not investing the content in them where we can.

[1]: [https://en.wikipedia.org/wiki/GIF#Unisys_and_LZW_patent_enfo...](https://en.wikipedia.org/wiki/GIF#Unisys_and_LZW_patent_enforcement)

[2]: [https://en.wikipedia.org/wiki/WebM#Licensing](https://en.wikipedia.org/wiki/WebM#Licensing)

<comment><USER14> > PNG support sucked at the time, too (see e.g. IE6). By now it's far superior > to GIF in every way.

IIRC the stuff which broke in IE6 were features GIFs didn't support at all (translucence and gamma correction).

For GIF replacement you'd use palettes and binary transparency, and it was supported just fine since IE4.

</comment></comment></comment><comment><USER15> AV1 is an open and free format, but if people really wanted to replace GIFs they could've done it with H.264 or VP9 or VP8.

Notwithstanding any issues about video codec support in browsers, GIFs will continue to have value until browser-vendors, spec-writers, and webmasters accidentally or deliberately coalesce around a sane ruleset for embedded motion picture _completely devoid of audio_.

Today, browser-makers have concerns about which videos to autoplay, webmasters' tools for specifying "muted" videos have been unreliable. GIFs completely sidestep that conversation, because GIFs cannot contain audio, and will always autoplay.

<comment><USER16> Perhaps audio-free videos should be allowed in <img> tags

<comment><USER17> I'd support that (as if anyone's asking me...) on three conditions:

1) Maximum duration of, say, 10 s (with mandatory looping)

2) Maximum display size of, say, 25% viewport area

3) Browsers must enforce "Click to stop" on these "video-img" elements even if there are other DOM elements on top.

<comment><USER18> If none of these conditions apply to gifs, why should they apply to videos in img tags?

<comment><USER19> Because we can't change the past, but we can improve the future.

</comment></comment></comment></comment></comment><comment><USER20> > It is 2019 and we need to make a decision about GIFs

I thought "everyone" already agreed on this. Video files are smaller and if you choose the right set of codecs for which clients have hardware acceleration then playback consumes less energy, meaning your visitors don't drain the batteries of their devices as fast.

> replacing GIFs with video has now been common for a few years

Indeed. Which kind of leaves me wondering why author seems to be introducing their article as though it wasn't.

Of course, the article _does_ go on to argue for a specific codec. Still, to me it seems to talk in a way as if not using GIF is "controversial".

</comment><comment><USER21> You can pry my GIFs from my cold dead hands.

Aesthetically speaking GIFs have a character that you gotta jump through a lot of hoops to approximate with another format.

In addition to that they function everywhere, always autoplay, can't have annoying audio, and support transparency, these are all important features that nothing else on the 'market' can match.

I'm aware that there is lossless animated WebP with transparency, and I can encode a low-color animation into one of those for something functionally identical to a GIF, excepting the fact that it won't be supported anywhere except a recent Chrome.

<comment><USER22> If you want a "degraded" aesthetic, nothing is stopping you from encoding a gif, then encoding the gif to a video format. The last stage should be roughly lossless, and the video will still use way less space than the corresponding gif.

</comment></comment><comment><USER23> What ever happened to the APNG format? I remember dabbling with it years ago but seems to have never caught on.

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

<comment><USER24> It's fine, but it's lossless so it's not good for most video use cases.

<comment><USER25> So is animated gif, though.

<comment><USER24> What I'm saying is, in uses akin to this article, apng is not a meaningful upgrade over gif.

It's a huge upgrade for certain kinds of content, especially animated icons with aliased edges. But that narrowness means there's only a moderately small push toward adoption.

<comment><USER3> In principle it has the same advantages PNG has over GIF for static images -- 24-bit color and 8-bit alpha, both of which are a big deal.

APNG or something similar _should_ have replaced GIF completely, but the delivery was badly fumbled. Browsers now mostly support it, but authoring tools mostly don't.

<comment><USER24> More color depth is sort of useful for heavily compressed video. Transparency very rarely matters in that use case.

<comment><USER3> "Sort of useful"?? 8-bit versus 24-bit color is like night and day!

Transparency for video is kind of a niche thing, sure, but when you need it you really need it. A good example would be compositing green-screen footage. (Keying transparency on a specific color is exactly the kind of hack GIF uses, whereas PNG does it properly, with a separate alpha channel.)

Omitting obvious stuff like an alpha channel because you don't think anyone needs it is exactly the kind of oversight that makes all these "modern" video formats unable to completely replace GIFs. Looping is another example.

<comment><USER24> For a super compressed video there's really not that much difference. And that's almost all videos as gifs. You don't want it to be 100MB.

And I didn't say transparency isn't needed by "anyone". I said it's very rare for video-ish content.

Apng is better than gif. But its advantages really shine in realms _other than_ video content. They're both pretty bad at video content, even despite looping properly.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER26> Hell no, it's not. None of my devices can play HEVC videos filmed with a recent iPhone without severe performance glitches. I fear to imagine how hard it is going to be to play AV1.

MP4 AVC feels like a great replacement for animated GIFs and almost every device in use today plays it nicely yet, sadly, most of the websites that would allow inserting a GIF in a post won't allow an MP4 file instead. For some sites you even have to convert an MP4 to GIF before uploading it just to see it converted back to MP4 on their side for serving.

Perhaps it could be handy if img tags would just be extended to accept video files (of all the video formats the browser supports) below certain size. Or we should better (perhaps) just forget such a category as an "animated picture" and switch to treating them like regular videos, introducing a separate button to insert such alongside to the "insert picture" button.

<comment><USER27> AV1 has enough support from enough vendors that it has a very high chance of replacing H.264 as _the_ ubiquitous video codec. The headline is a bit click- baity, but proposing new web standard "now" means it would be available everywhere in ~5 years.

</comment></comment><comment><USER28> AV1 is not enabled by default in Firefox 66 on Linux. You have to flip a switch in about:config to get it to work.

        media.av1.enabled

For what it's worth, AV1 videos play really slowly on my machine. There's probably a reason AV1 is not enabled by default yet.

<comment><USER22> As far as I know, dav1d can be enabled even on 66:

        media.av1.use-dav1d = true

</comment></comment><comment><USER29> This is fine for real world videos crammed into gifs. But please think of animated pixel art, which is antithetical to many the assumptions that DCT- block based codecs make. Doubly so when you consider that most encoders default to 4:2:0 and ignore transparency.

APNG or similar image formats are better for this purpose

<comment><USER22> >Doubly so when you consider that most encoders default to 4:2:0

I agree, but I want to add that this has another side effect you don't mention: it makes high quality images impossible. In 2019, it would nice to have something better than cjpeg -q 98 for near lossless (or completely lossless images). I've spent many hours tinkering with the new inter frame based image codecs, and I haven't been able to achieve this because despite their advertised support for better standards, the decoders seem to have only implemented 8 bit 4:2:0 subsampled sRGB images.

I guess I'll go on storing my photography in 150 MB TIFF files...

</comment></comment><comment><USER30> The code shows the first three video formats being available and prioritized before gif, but the sample videos do not include gifs. It'd be nice to see the quality difference between the format that is being discouraged and the format being encouraged.

Personally, I love gifs. They work with no fuss.

<comment><USER31> Aside from the size issue, GIF only support 256 colors per frame, so photos and real-life videos almost always have visible dithering artifacts.

It's a terribly shitty format, but remains popular because it has universal support and so works with no fuss. We need to get the same amount of support for a better format.

<comment><USER30> Unless you're willing to backport that support to 10+ year old browsers, it will never happen. You need UNIVERSAL support. Edge cases, corner cases, and plain old "bad ideas" included. This is what the incumbent has going for it.

<comment><USER32> The polyfill principle addresses this. As long as transparent fallbacks exist, there's no reason new technology can't be rolled out for the benefit of the significant userbase that can take advantage of it.

Anyone who cares about their data bill should be asking very serious questions about why we're still stuck with the massively inefficient 32-year-old GIF format as the only widely supported way to display an inline animation, especially as many superior alternatives like FLIF, BPG, etc. have been released over the last several years.

GIFs waste _absolutely ungodly_ quantities of bandwidth. Any semi-modern video codec is at least an order of magnitude more efficient. Any way you slice it, the continued dominance of GIF is, at best, an egregious oversight, and it has a direct dollar impact on anyone with a metered connection (this is your phone, but increasingly likely to be your home connection too).

As a community, we need to make an alternative to GIF a real priority.

</comment></comment></comment></comment><comment><USER33> Calling AV1 something that looks almost exactly like AVI seems like a mistake...

<comment><USER34> The naming is a bit annoying, but they are completely different kinds of thing: AVI is a container format (which can contain a variety of different codecs, e.g. mpeg-4), and AV1 is a codec (which can be put in a variety of different container formats, e.g. mp4). We don't seem to get confused between mpeg-4 and mp4, which have the same kind of similarity.

</comment></comment><comment><USER35> The article claims that AV1 works since FF 65 but the examples do not work on FF 66.

<comment><USER36> Confirm, doesn't work for me on FF on Windows.

And this is a challenge for a "new" format: if AV1 works on 90% of systems, and GIF works on 100%, then in many cases GIF is the clearly correct solution. Why would I throw away 10% of my money? Why would I ignore 10% of my customers? In many businesses, just a few customer calls because of this could seriously hurt profitability.

<comment><USER37> The article shows how to make a fallback that serves GIF in cases where AV1 is not supported. That saves you 90% of your bandwidth for 90% of your image loads.

</comment></comment></comment><comment><USER38> You can blame both Google and Mozilla for ruining the chance to replace GIFs with APNG and WebP respectively. People were waiting the support of those for years in Chrome/Firefox, but their stubbornness already forced some image hosting sites to use video formats like WebM. At this point I am not sure WebP or APNG would become popular. But using proper image format for animation is a better solution , I think.

</comment><comment><USER39> The test results in this blog do not function correctly on iOS latest, so while I endorse this as a general future goal, make sure you have a proper fallback solution in place if iPhone users are relevant to you.

<comment><AUTHOR> Normally, you can specify GIF as a fallback as seen in this article [https://www.singhkays.com/blog/detect-rolling-credits- video-...](https://www.singhkays.com/blog/detect-rolling-credits-video- indexer/)

Even though the first preference is AV1, the 2nd, 3rd & 4th preferences are VP9, H264 and GIF which should play

</comment></comment><comment><USER40> Just a parenthetical note:

The article, in its ffmpeg encoding guide says,

      -f - Only used in the first pass. Specifies the format of the output file in the second pass i.e. MP4 in this case

This is not required to be the same as the intended output format. Using `-f null -` will work just as well, as long as the encoder is epxressly set, which it is, in the commands shown.

<comment><AUTHOR> Thank you for the explanation. I'll update the article.

</comment></comment><comment><USER41> For whatever reason my browser is crashing when trying to read this article, so I guess I'll keep my GIFs.

<comment><AUTHOR> I've noticed Firefox crashes more often than Chromium based browsers. Most likely a point in time thing as Firefox updates to the latest version of dav1d decoder

</comment></comment><comment><USER42> The VP9 and AV1 aren't loading in my browser, (latest Safari on Mojave 10.14.4).

I understand pushing for progress, but with this table, I'm not sure "it's time" just yet.

[https://caniuse.com/#feat=av1](https://caniuse.com/#feat=av1)

<comment><USER43> Maybe this would incentive Apple into supporting these formats. For vp9, it seems to me there isn't any good excuse for not supporting it.

<comment><USER12> > For vp9, it seems to me there isn't any good excuse for not supporting it.

Exporting video formats is expensive: there's a lot of optimization work to have a high-quality battery-friendly implementation, decode hardware has to be licensed & updated, and they have to do security hardening and support every time they add a new format. If they're already working on AV1, why double the cost to add support for an older format which is almost never used as the only option?

<comment><USER43> It's not like Apple can't bear this cost. VP9 has existed since 2012, Android has supported the format since version 4.4 released in 2013. AV1 was then unheard of. Surely they weren't working on it then.

VP9 is still interesting today since there are many devices out there that decode it and will never decode AV1 with hardware.

I think the reason is not technical. Apple has patents for MPEG formats, I think they wanted to push these formats instead. By not supporting VP8/VP9, they force(d) everyone to support their formats.

Now, if I want to make a video call with someone with an Apple device, I'll probably need, if I live in a place where software patents apply, to pay a license to decode/encode an MPEG format where the royalty-free VP9 would have done the job. Worse, I probably indirectly pay these fees (anyway) when I buy devices with support for MPEG formats, even if I live at some place were software patents don't apply.

<comment><USER12> > It's not like Apple can't bear this cost. VP9 has existed since 2012, > Android has supported the format since version 4.4 released in 2013. AV1 was > then unheard of. Surely they weren't working on it then.

4.4 shipped with software support, which meant that it was slow and chewed battery like it was going out of style. You had to wait until around 2015-2016 for hardware decoding support and around 2017 for encoding support before it became competitive.

Even then, however, there's a bigger problem: what really matters is the amount of unique video recorded in VP9, which even Google doesn't seem to do. Apple's users almost never run into the situation where they miss out on something because their device doesn't support VP9. Since the entire industry is moving to the newer AV1 format, the question is whether it's worth taking on the long-term security & support commitment of supporting an old-new format or simply putting those resources into something which will actually replace H.264 as a universally-supported format.

> By not supporting VP8/VP9, they force(d) everyone to support their formats.

This is trying too hard to construct a conspiracy theory: VP8 had no advantages over H.264 and arrived years later. VP9 had no significant advantages over H.265 and arrived years later. The only significant source of original content in either one is WebRTC chat, which is a pretty limited hook to justify a major {development,support,security,patent risk} commitment.

</comment></comment></comment></comment></comment><comment><USER44> Well let's get one thing straight, VP9 does not achieve 50% more compression compared to H.264... Second the demo videos were cherry picked to support their argument - using full motion panning...

<comment><USER6> Netflix disagrees with you:

[https://medium.com/netflix-techblog/optimized-shot-based- enc...](https://medium.com/netflix-techblog/optimized-shot-based-encodes-now- streaming-4b9464204830)

</comment></comment><comment><USER45> One great thing about GIFs is that they are always silent!

<comment><USER46> What if I told you that is now (publicly) no longer true: [https://news.ycombinator.com/item?id=19935900](https://news.ycombinator.com/item?id=19935900)? :)

</comment></comment><comment><USER47> As an app developer, whenever I need something animated, I use the baseline MP4 format. My main motivation was that animated GIFs were not supported by Android without third party libraries.

I've had 10-15 seconds of videos (640x480) at 10 fps well under 200 KB. I also compared JPEG with MP4 and decided to use MP4 video (1 frame) instead of JPEG to keep myself from re-implementing a UI again for an image.

</comment><comment><USER48> Wake me up when the AVI encoder's performance can be measured by Frames Per Second. Currently, it should better be counted by Frames Per Day. Decoder is also slow. We need a high end desktop computer for real-time decoding of AV1 video.

There is no phone/tablet that can afford such performance.

<comment><USER6> > _Wake me up when the AVI encoder 's performance can be measured by Frames > Per Second._

Okay, I will. Hrm. Intel's AV1 encoder is getting 24 frames per second:

[https://www.phoronix.com/scan.php?page=news_item&px=SVT- AV1-...](https://www.phoronix.com/scan.php?page=news_item&px=SVT-AV1-Ending- April-High)

WAKE UP!

> _There is no phone /tablet that can afford such performance._

Isn't there? I wonder how well the top end iPhones are decoding AV1:

[https://code.videolan.org/videolan/dav1d/issues/15](https://code.videolan.org/videolan/dav1d/issues/15)

Decoding at over 100 frames per second multithreaded two weeks ago. Not bad.

</comment></comment><comment><USER49> My browser (FF66 Win10) lags and hangs when browsing this site. Also, the AV1 videos have frozen and I can't get them to play again without refreshing. I can recreate both of these bugs by simply changing tabs. Despite that, I'm ready to switch to video too.

</comment><comment><USER50> I think it really comes down to use case.

If your intent is to display content that is originally video, then you should use the best and most supported video format.

If your intent is to display some effect through animation, a gif isnt a bad thing.

For example, the ajax loader that we are all familiar with? The size difference is minor. The gif is 16k, an mp4 is 11k. HOWEVER, with the video I have worry about the browser playing it, looping it, and does it handle transparency? (i dunno)

If I wanted one of those full page & full motion backgrounds, it would definitely be a video. The first time I saw a page like that load, load really fast, and be high quality video, I was amazed (leave aside aesthetics)

</comment><comment><USER51> It seems VP9 and AV1 do not play on macOS Safari.

<comment><USER52> Safari recently added VP8 support for WebRTC, so hopefully they also support VP9 in the future.

[https://webkit.org/blog/8672/on-the-road-to- webrtc-1-0-inclu...](https://webkit.org/blog/8672/on-the-road-to- webrtc-1-0-including-vp8/)

<comment><USER53> That's for WebRTC only, though.

<comment><USER52> Yes, that's what I said, and why I hope they will expand VP* support in the future.

</comment></comment></comment></comment><comment><USER54> This is the one time I am very happy that standards have failed to materialise. Leave me to read in peace with distraction free web pages thank you very much. If I want to see an animation I'm fine with touch or a click for activation.

</comment><comment><USER55> None of his AV1 samples display on my ipad. It kinds of kill the idea in my opinion.

</comment><comment><USER56> Okay, I'm on board. But what container am I meant to be using for my AV1 content? I see the value of a limited subset of mkv, e.g. webm, but webm is _too_ limited in my opinion. It has no facilities for soft subtitles for instance. How is that an acceptable state of affairs? That's an accessibility issue.

And yes, I know websites can send subtitles separately then render the subtitles over the <video> element, but that's no excuse for an ostensibly modern media container to not support subtitle tracks.

<comment><AUTHOR> In the article, I embed AV1 in MP4 container. Does that not work for your scenario?

<comment><USER56> That works, but at the same time I'd like to see webm amended to include optional subtitle tracks.

</comment></comment></comment><comment><USER57> The limitations of GIFs are part of what makes them great. The constraints sort of lend themselves to forcing a little extra creativity. Finding that perfect loop, finding that great moment that so perfectly works out of context, spoofing text that fits the scene/mood to repurpose those frames for a niche community - it's just fun to make and share GIFs. The problem with video is its a video.

</comment><comment><USER58> Can I easily record a screencast as a video and paste it into a GitHub issue? If not, it's useless for my use case and I need to stick with gifs

</comment><comment><USER59> I predict that users will go on calling AV1 video (or any other formats we use in the future) "gif"s anyway.

The word "gif" will come to mean "animated image".

<comment><USER3> I thought that had happened already!

</comment></comment><comment><USER60> I'd love to AV1 to become the standard, but as far as I've seen, it's just not implemented anywhere, and the spec wasn't 100% final. I was messing with ffmpeg a couple months ago, and it didn't look like a straightforward option to convert either. I'd say it's not quite time we replace GIFs with it.

<comment><USER61> It's implemented nearly everywhere (firefox, ffmpeg, edge, chrome, opera, vlc,...) and the spec is 100% final. Problem is that (and now the everywhere gets weak) android didn't implement it yet (afaik) and some packaged versions of the software haven't got it enabled or are just out of date.

What we can get from the article thought is: why isn't gif replaced by webm/vp9 yet? Can be encoded in no time and is actually supported everywhere.

<comment><USER62> > why isn't gif replaced by webm/vp9 yet?

Apple has significant market penetration, and you can't get VP9 to easily work in safari/iOS/tvOS

<comment><USER4> But why is this tolerated, for lack of a better word? There's no barrier to adding support, a decoder ships with ffmpeg. Youtube has been serving webm/vp9 video for years, so does that mean VP9 Youtube is unavailable on Apple platforms?

<comment><USER63> > Youtube has been serving webm/vp9 video for years, so does that mean VP9 > Youtube is unavailable on Apple platforms?

Youtube serves h.264 to Apple platforms.

<comment><USER4> Well not if users force VP9 using something like youtube-dl and pipe to a compatible player. But I looked it up and the reason Apple refuses to adopt VP9 is not so arbitrary but rather because they're part of MPEG LA, with HEVC being the competitor to VP9. It's unfortunate that there's so much fragmentation with standards simply because of corporate interests.

<comment><USER3> It is unfortunate but it's been happening forever.

And yet, things continue to work and continue to progress for the most part, so format wars aren't necessarily as big a problem as we like to think.

</comment></comment></comment></comment></comment></comment></comment><comment><USER64> While investigating if I could actually use this—animated PNG, I found this website and it convinced me it is the new direction I should take: [http://littlesvr.ca/apng/gif_apng_webp.html](http://littlesvr.ca/apng/gif_apng_webp.html)

</comment><comment><USER65> Animated PNG seems to be the least-bad option that covers every key GIF feature, and most importantly will be supported by every major browser once Edge-Chromium ships: [https://www.caniuse.com/#feat=apng](https://www.caniuse.com/#feat=apng)

</comment><comment><USER66> Nobody mentioned so I'll add: the one thing holding me back is the current ability to insert autoplaying gifs into GitHub's markdown.

No <video> type formats are supported and being able to add an animated gif showing what you're creating a pull request for is immensely useful.

</comment><comment><USER67> Sounds good but my browser (Safari on iOS) shows just white space for the VP9 and AV1 example videos.

</comment><comment><USER68> In order to truly have a shot at replacing gifs, it has to be as frictionless to use as gifs are. That means being able to refer to it with a single, simply tag.

<video src="example.av1">

and, in addition, for as many people as possible to support opening of av1s as they do with gifs.

</comment><comment><USER69> I don't think it can be killed unless (unordered)

\- looping is solved and convenient to configure

\- it can be cross media barriers (copied into a text, copied into an e-mail, etc.)

\- it pleases the bandwidth gods (are gifs usually smaller? i know that they have a limited color palette)

<comment><AUTHOR> Your problems 1 & 3 are solved in the article. I compare the size of the GIF to the videos. In one of the scenes it's ~11 MB for GIF and < 500 KB for AV1 video

<comment><USER69> My bad. I should have read more of the article before "contributing".

That being said, #2 is critical. I often open Safari to get gifs to copy to iMessage because Chrome and Firefox don't properly copy gifs.

AV1 may be a way to make that more "standard" (big hand wave) but adoption is conditional upon this type of common man friendly portability.

</comment></comment></comment><comment><USER70> _GIFs take up a massive amount of space (often multiple megabytes!) and if you're a web developer, then that's completely against your ethos!_

Judging by most websites I comes across, this must be referring to some other universe.

<comment><USER30> They usually just blame marketing and wash their hands of the finished product.

</comment></comment><comment><USER71> Fine, but do it transparently so the file is named .gif and it behaves the same as a gif only better optimized.

I hate opening "gifs" that are actually videos and, for example, interrupt my currently playing music to playback silence.

</comment><comment><USER72> "The AV1 recipe..."

 _fifteen ffmpeg commands_

Yeah I don't think AV1 is the answer.

<comment><AUTHOR> That's why it's a recipe and not a command ;) Also it can be easily scripted out, where the only input needs to be a source video

</comment></comment><comment><USER73> But can I put those videos in PowerPoint presentations?

</comment><comment><USER74> Waiting for end 2020 Macbooks which can decode (and encode?) AV1 on CPU hardware hopefully (and hopefully also solved the keyboard mac problems).

</comment><comment><USER75> In my unpopular opinion, the first steps that we need to bring AV1 to the web is to stop using HLS and start using DASH

</comment><comment><USER76> I kind of thought it was pointless until i saw the file size difference. From 11.7 Meg to 330k is pretty good.

</comment><comment><USER77> These "It's year 20XX, throw out this outdated tech!" arguments get so very old after a while

</comment><comment><USER78> Well, the videos on this page are empty areas on my browser. But I can see GIFs just fine.

</comment><comment><USER79> Er, it has only ~35% global support today. I'd hold off.

</comment><comment><USER80> Anyone know what the movies are in the sample GIFS?

<comment><AUTHOR> Tears of Steel [https://mango.blender.org/](https://mango.blender.org/)

</comment></comment><comment><USER81> TLDR; article suggests to replace a gif img tag with

      <video style="display:block; margin: 0 auto;" autoplay loop muted playsinline poster="RollingCredits.jpg">
        <source src="media/RollingCredits.av1.mp4" type="video/mp4">
        <source src="media/RollingCredits.vp9.webm" type="video/webm">
        <source src="media/RollingCredits.x264.mp4" type="video/mp4">
        <img src="media/RollingCredits.gif">
      </video>

</comment><comment><USER82> As long as AV1 works without js, sure.

<comment><AUTHOR> It sure does

</comment></comment><comment><USER83> Why no h265? I suspect it's similar to VP9 in quality, but h264 is pretty old at this point (nowhere near as old as GIFs of course).

<comment><USER84> I believe the big issue with h265 was the huge licensing cost to bundle the decoder in the browser.

<comment><AUTHOR> Correct and also lackluster browser support [https://caniuse.com/#feat=hevc](https://caniuse.com/#feat=hevc)

I've added a note to the article

</comment></comment></comment><comment><USER85> Worse is better.

</comment><comment> compiler-guy The "We need a gif replacement" discussion isn't quite in xkcd 927 territory yet, but its very close.

And that is what is working against something completely replacing it.

[https://xkcd.com/927/](https://xkcd.com/927/)

</comment><comment><USER86> GIFs are still here because people make art with it, in some form. This is how we got still GIFs around, not because we needed to transfer videos. The idea of replacing everything based on technical superiority is extremely shortsighted. We need more humanists in computing.

<comment><USER87> You can make the same art with other formats. I'm not sure exactly what your point is here.

<comment><USER86> 1\. One of the reasons a kinda secondary feature of GIFs (animations) became so popular is because it's so easy to generate them. 2. A big feature is that they are not lossy compressed so you can do animations of all the kinds. 3. They allow to set very slow FPS settings in a trivial way.

Animated GIFs are not really a video format, they are just a set of non-lossy compressed images shown at a timer interval. Such small details are hugely important when some media is used in a creative way.

<comment><USER88> If you have an application where you need lossless and optionally low FPS, then GIF is fine (and APNG and webp for smaller filesizes but less compatibility). But the average GIF in the wild these days is a reencoding from a video that doesn't match this description, which is what should be changed to h264, vp8, vp9, or AV1.

<comment><USER30> Maybe the movement could and should clarify their goals for world domination do not include dancing baby gifs?</comment></comment></comment></comment></comment>


On Being a Fish - <AUTHOR> http://inference-review.com/article/on-being-a-fish <comment><USER2> _> The tree of life is almost entirely composed of binary branchings. The occasional, strange exceptions are fascinating, but rare enough that they need not concern us here._

What are they?

<comment><USER3> I'm guessing they're probably referring to [https://en.wikipedia.org/wiki/Horizontal_gene_transfer](https://en.wikipedia.org/wiki/Horizontal_gene_transfer)

</comment></comment><comment><USER4> You also can't come to a good definition of the word "species".

We like to categorize things. Sometimes arbitrarily. What's wrong with that?

I don't see the point of this article.

<comment><AUTHOR> Well, the choice is between an arbitrary category with a complex definition that doesn't provide any insight to its evolution history, to one that is strictly defined by nature itself and provides lots of evolutionary insight. Generally speaking you should prefer things that assume less and explain more.

<comment><USER4> No, there are many choices, each with subtle distinctions. What's your definition?

Nature does not strictly define species, and how does it provide evolutionary insight exactly?

<comment><AUTHOR> There's a misunderstanding. I agree that there is no good definition of species. However, there is a good definition of clade, taxon, or monophyletic group. The author is suggesting that paraphyletic and polyphyletic taxonomical groups that are based on biases, intuition, or morphological similarities. We should distinguish between groups based on traits and groups based evolutionary history, and not conflate the two.</comment></comment></comment></comment>


Ofthemuse – a brand new social music service like Soundrop and turntable.fm - <AUTHOR> http://ofthemu.se/

<comment><USER2> And it's awesome! +1

</comment><comment><USER3> +1 it's awesome!</comment>


How to ensure high-quality talks for your conference - <AUTHOR> https://opensource.com/article/18/5/ensuring-high-quality-talks-your-conference <comment><USER2> Needs the companion piece _" how to avoid programme-committee burnout_ because after 10+ years, you forget about how to feel like a newbie attendee and pack your conference with stuff which interests you, and alienates any new entrant.

You need a mix. Maybe a PC review board approach is best, cycle bodies through.</comment>


Instapaper 3.0 is here - <AUTHOR> http://blog.instapaper.com/post/3772087268 <comment><USER2> Big fan talking here, it's how I primarily read long form content (iphone and kindle)

This sentence worried me though:

>With these great new additions, many customers won't even >need the bookmarklet anymore.

Without the bookmarklet Instapaper stops being useful to me - I have no interest in another source of information, however 'social' or curated that may be.

I feel that instapaper is trying to move into the 'sharing cool stuff' space, which is already over saturated, instead of concentrating on it's original stronghold of providing a great consumption experience.

<comment><USER3> I don't think the bookmarklet is going away, but even if Marco did get rid of it, the free API would allow anyone to come along and make a new one.

</comment></comment><comment><USER4> I love Instapaper, partially because its a fantastic product and partially because of the guy that's developing it. What Marco has done represents my goals as a 'hacker', I cant wait to have my own Instapaper some day.

</comment><comment><USER5> Out of curiosity: Instapaper has had a decent amount of success by making stellar apps for iOS (Marco's only source of revenue outside of the "subscriptions", from what I understand). Is this a good strategy? Like, pick a single platform and make the integration as polished as possible? Or is it better to get cross-platform apps that aren't as polished (in a situation like Instapaper)?

<comment><USER6> What's interesting about Instapaper is that Marco is in a way moving towards embracing both models. With his "3rd-party access only for subscribers" model (see <http://blog.instapaper.com/post/3208433429>), he can focus on keeping the iOS app polished while letting third-party developers handle writing apps for other platforms. Assuming this actually happens (a big assumption, to be fair), non-iOS platforms will serve as a revenue source by driving subscriptions.

<comment><USER7> Have any apps other than Stacks for WP7 been built to this subscription only API?

</comment></comment></comment><comment><USER8> Instapaper and Reeder are, for me, the 'killer' iPhone apps.

When people ask me why I like/choose the iPhone , I point at those 2 apps.

<comment><USER9> Same here - I just wish that Instapaper would share on Google Reader.

One wonders why the "drink from the firehose" style reader (Reeder) hasn't been merged with the "save for later" style reader (Instapaper). Everyone I know who finds one of those indispensable becomes enamored with the other pretty easily.

<comment><USER10> I'm glad for the new Pinboard integration.

My regular flow is to have everything (RSS for blogs with long posts and RSS for simple alert/notification blogs) in Google Reader and filter through it there, only viewing everything once. Anything longer than a paragraph in there goes to Instapaper, to really read later.

I sent random links and website I want to save to Instapaper as well and was moving them to Pinboard manually on the website, but this will definitely save me time.

</comment></comment></comment><comment><USER11> >The iPad no longer uses the top and bottom gradient to fade the text out, instead opting for a clean shadow line borrowed from Reeder's style.

Glad to see this. It was irritating to almost-but-not-quite see the first line of text as you scrolled, which sometimes meant you had to scroll back, which sometimes meant you lost your place, which sometimes resulted in hair being pulled out.

</comment><comment><USER12> Does anyone else find themselves wishing that Instapaper could intelligently pull multiple-page articles, like Readability does? You can of course solve the issue by finding the printer-ready version of an article (if there is one), but that extra step feels so unnecessary..

(aside from that quibble, love Instapaper and congrats on the great new release!)

<comment><USER13> Printful merges multipage articles into a single article. I don't have any promo codes right now, but email me and I'll send you one as soon as the next release is approved.

</comment></comment><comment><USER14> I love the idea behind Instapaper and bought the $5 version, but I have found it has a surprising number of bugs for a paid app. The application has crashed several times on me. Sometimes articles don't download properly. Also, often large swatches of text are repeated in the articles I add to my Instapaper. Finally, when I archive items out of the Editor's Picks, they often re- download again later (maybe I am not understanding how archiving works).

Has anyone else run into sorts of issues using Instapaper on the iPhone 4? I hope that 3.0 fixes these issues! Off to download it now. :-)

<comment><USER15> I've seen Instapaper crash maybe twice, ever, and I've been using it since it came out. I'm a fairly heavy user. Maybe I'm just lucky?

If you still have issues with 3.0, you should get in touch with Marco. Maybe something's out of whack server-side?

</comment></comment><comment><USER16> Marco Arment, the founder of Instapaper, was also the former lead developer of Tumblr. It's clear that he has great a sense for UI design.

<http://www.marco.org/>

</comment><comment><USER17> I dunno, my "Editor's Picks" subfolder seem to have been replaced by a huge button that starts a web browser. If I wanted to browse the web I would have started Safari, wouldn't I?

</comment><comment><USER18> I really like Instapaper, they seem to be executing the problem of taking photos on your mobile device really well. I dont like long upload time, huge photos nor a cluttered UI. Instapaper _gets it_.

I definitely see them releasing an android-version of instapaper soon. It would be a wasted opportunity if they didn't

</comment><comment><USER19> I was hoping for pdf support, but I guess I'll have to make do with converting pdf to html for a while...

</comment><comment><USER20> Looks Great! Marco Arment, developer of Instapaper, has a weekly podcast about iOS App Development called "Build and Analyze". Great resource for any level iOS hacker. <http://5by5.tv/buildanalyze>

</comment><comment><USER21> Instapaper is definitely the number 1 reason I use Twitter as my primary news source - and the integration to the Twitter iPhone app is perfect. Seems like a perfect potential acquisition.

</comment><comment><USER22> Anyone else annoyed by how the scroll bar in the Instapaper iPad app never seems to behave like you would expect a scrollbar to behave?

<comment><USER23> How do you mean?

</comment></comment><comment><USER24> I use Instapaper all the time to save things to read...but have an Android phone. When is the Android version coming?

<comment><USER25> While you're waiting, try EverPaper.

<comment><USER26> I found IPaper to be much faster and a better UX overall.

</comment></comment></comment><comment><USER27> Instapaper rocks! Thanks for the good news. I'm updating mine to the latest version now :-)

</comment><comment><USER8> I don't see it in my Updates section.

Do I have to download a new copy even if I bought the original?

<comment><USER4> "As usual, Instapaper 3.0 is a free upgrade to anyone who has ever bought the paid app. For new customers, it's only $4.99 for the universal iPhone and iPad app."

</comment></comment><comment><USER28> Absolutely love Instapaper. Glad to see these native sharing features.

</comment><comment><USER29> I absolutely LOOVE instapaper, one of my absolute favorite iPad apps (the rest are here <http://bit.ly/hb8l5H>)!

..agree with everyone that its a true "killer" app for the device. Imagine once Marco and the team starts adding true collaborative filtering based on your past history (and your friends and the broader community of IP users) and suggesting you stuff to read!</comment>


100ms in additional latency costs you 1% revenue? - <AUTHOR> https://www.niels-ole.com/amazon/performance/2018/10/27/100ms-latency-1percent-revenue.html <comment><USER2> I work in mobile ads, and for fun, i injected 50ms, 100ms, 250ms, 500ms latency in an experiment. The results were not as dramatic. 500ms had less than 1% impact. 50ms looked almost positive (didn't wait enough to have it statistically significant). This is 2018. Results are rather nonlinear, and different formats with different latency requirements had different results (like formats lending themselves to advance preloading would not be impacted at all even at 500ms, but ohers which had tighter UX requirements would).

I realize results are context-dependent, this is why everyone should make their own conclusions from their own analysis. You might have bigger bangs to make than shaving off some latency.

<comment><USER3> Ads aren't the first thing people look at though. If the rest of the page loads and content is visible then i won't leave because that ad I just had to see didn't become visible.

<comment><USER2> Exactly, but the point was all of this is context dependent.

For example, if you are involved in a 3rd party bidding where you bid on some other network's impression, you'll have a deadline to respond with a bid. Let's say that deadline is 500ms (it's not). 100ms increase in median would lose _significant_ amount of impressions in that case.

</comment></comment></comment><comment><USER4> 500ms in delays actually led to 1.2% lost revenue for Bing per affected user, in this case a decade ago.

[http://radar.oreilly.com/2009/06/bing-and-google-agree- slow-...](http://radar.oreilly.com/2009/06/bing-and-google-agree-slow- pag.html)

[https://conferences.oreilly.com/velocity/velocity2009/public...](https://conferences.oreilly.com/velocity/velocity2009/public/schedule/detail/8523)

<comment><USER5> 500ms is a lot of time for both customer and vendor. In questioning whether these 'millisecond timings' make a difference to revenue it helps to think of how it feels at the other end of the transaction, as a customer.

500ms sadly is a lot of time if you are trying to buy tickets for Glastonbury. Click a fraction of a second too late and your name is not down. Same with eBay, click a fraction of a second too late and someone else gets that vital bit of junk you thought you needed.

Last year when crypto-ponzi-schemes were all the rage the pump and dump schemes gave people that were in on the scam different levels of access.

In one scheme if you brought a few 'friends' in to share the wealth then you would get the notification of when to buy a little bit earlier. If you brought 150 of your 'friends' along then you would get the message a whole three seconds earlier. If you brought 500 to the party then you would get the supreme advantage of getting the message an incredible 3.5 seconds earlier.

500ms really determined if you ended up 'lambo to the moon' or a 'bag holder'. Funny. Most of the people in on this were just kids in their mum's basement on whatever internet connection was available. Nonetheless there was a considerable premium on 500ms which you would not think would be that big a deal given the other latencies in the system.

[https://theoutline.com/post/3074/inside-the-group-chats- wher...](https://theoutline.com/post/3074/inside-the-group-chats-where-people- pump-and-dump-cryptocurrency?zd=1&zi=vg4ksoyz)

</comment></comment><comment><USER6> This statistic is trotted out constantly, and I just don't understand why. 100ms delay could be a 100% or a 1% regression in performance depending on which site you're looking at. Are we meant to believe that we'd see the same impact on both?

My other bugbear is the classic case study that some company rebuilt their stack and product, saw a perf improvement, and a corresponding revenue lift. No consideration of confounding effects (like the massive redesign that accompanied the changes) or the fact that no one shares the disasterous effects of their rebuild at a tech conference (selection bias, anyone?)

Ironically it's usually professionals in the performance community who do this. Big tech company developer advocates seem to get a little to far to the "sales" side of the picture and drop and rigour around what they're selling.

</comment><comment><USER7> Even if you did lose 1% of customers because of 100ms delay; that could be a good thing.

The kind of customer who would change their mind about purchasing something because of 100ms delay may not be the kind of customer that you'd want to do business with anyway.

If 100ms is all it takes to put this customer off; maybe it means that they didn't really want to buy that thing to begin with... That kind of customer is probably more likely to get buyer's remorse, to file a complaint, require follow-up and demand a refund.

My point here is that it's silly to just look at statistics as black-and-white good or bad and pretend that they tell a complete story.

<comment><USER8> 100ms _additional_ delay, not 100ms delay. Someone could be patiently waiting for 2 seconds and hit back, just as it was about to load 100ms later.

<comment><USER7> I was assuming that. 100ms is barely enough time for the request to reach the server depending on the location.

</comment></comment></comment><comment><USER9> For a moment I thought the title was talking about my line of work in trading. 100ms would cost more than 100% of revenue.

<comment><USER10> I find that hard to believe. If your prediction is wrong any of the time then surely microfluctuations could have chance to revert or move back the other way.

I guess if all you're doing is responding to a value before others have chance to that in theory it's possible you lose 100%; but that seems to require all traders to be lock-stepped on a trading tick.

Can you explain further what I'm missing.

Why aren't trades locked. Is more than, say, 1s resolution really increasing fluidity or making more capital available or is it just a means to extract money from wealth generating activities of others?

<comment><USER11> You obviously have no idea about how HFT works. 100ms later than your peers and you're out of business. It's a real time auction, if you react too late, the price would most likely have moved against you. If you were trying to buy, the prices would have climbed up higher than your models projected to be profitable, if you were trying to sell, the prices would have dropped.

</comment></comment></comment><comment><USER12> I couldn't imagine citing that statistic and thinking it was meaningful for every business.

</comment><comment><USER13> 100ms additional latency will cost me losing my mind if its some interactive piece of UX like typing, scrolling, pwning noobs in battlegrounds...

<comment><USER10> I play too much CSGO, I found that a ping above 120 makes play too hard. Thankfully a change in ISP/technology dropped my ping by about 80.

<comment><USER14> Were you switching from dialup to high-speed internet? The latency numbers sound about right for dialup to a local server - if memory serves from the early 2000s.

<comment><USER10> No, ADSL to FTTC. Same POTS twisted copper pair over telegraph poles from cabinet to internal master socket.</comment></comment></comment></comment>


Adventures in JIT Compilation (2017) - <AUTHOR> https://eli.thegreenplace.net/2017/adventures-in-jit-compilation-part-1-an-interpreter/ <comment><USER2> > since registers are specified in sub-byte nibbles, one needs very good > memory and tons of experience to predict what goes where

Nope, you just need to use octal instead of hex - [https://web.archive.org/web/20041117160755if_/http://www.dab...](https://web.archive.org/web/20041117160755if_/http://www.dabo.de:80/ccc99/www.camp.ccc.de/radio/help.txt)

<comment><USER3> Since x86 has 8-registers and x86_64 doubles that with a prefix (REX) byte, yeah, looking at that machine code in octal makes a lot more sense. It looks, dare I say it, kinda RISCy.

<comment><USER2> Not to mention 16 _more_ 256-bit simd registers.

</comment></comment></comment><comment><USER4> Discussed a bit at the time: [https://news.ycombinator.com/item?id=13938935](https://news.ycombinator.com/item?id=13938935)

</comment><comment><USER5> I thoroughly enjoyed that. As someone who programs almost exclusively in high level languages, I learned a lot. It made brainfuck a bit more intelligible, too. It was actually a great choice of language for this exercise.

</comment><comment><USER6> I would recommend building a tutorial around a source language that wasn't deliberately obtuse.

I do see it makes the parser simple, but it reduces the audience to the small fraction that think a deliberately confusing language is useful.

My opinion anyway.</comment>


Growthhacking help - <AUTHOR> We're moving from our beta to launch. I think we have a pretty good strategy for email and website visits, which I'll share below. I'm searching for new ways to get people to our site and grow. I would love to hear your ideas!
We are using a combination integrated drip email (Drip) and chat (Drift) to engage and drive a prospect to a web demo. I'm also using good ol' fashioned calls, which honestly is the most effective. I used to run the business we're addressing at Scantron, so I know the targets and sales channel very well.
So, calls and email drive traffic with a single objective of getting to a demo. In B-2-B, don't think you'll be moving to a sale right away. So stay focused.
We integrate our email contacts with chat, so when an identified prospect arrives on our site, we get pinged and help the prospect with questions. That way, we turn a visit into engagement. Drift helps us with appointments, etc. We're just upgrading our plan.
Feel free to reach out if you want to learn more about what we're doing at GradeHub (gradehub.com).  Some of the things I'm looking at on the content side are: - BetaList - Hackernews (I'm here) - Blogs (but I run out of steam) - Social communities (but don't know how) <comment><USER2> Keep up the blogging (it has a cumulative effect) You can get good leads from LinkedIn but you also can meet many tire kickers.</comment>


Apparently Bing Is Something Of A Hit - <AUTHOR> http://www.techcrunch.com/2009/06/01/apparently-bing-is-something-of-a-hit/ <comment><USER2> I've been using Bing as my default search in FF all day today, just as an experiment. I can't tell if what frustration I am experiencing is just due to not being used to it, but I will say that any other time I've tried doing this (Yahoo, Live, Ask), I've quickly switched back to Google simply because I couldn't get my work done. The fact that it's been more than an hour and I haven't given up on it says a lot.

<comment><USER3> _I've been using Bing as my default search in FF all day today_

I must admit I've just started to do the same and am getting the same result. I quickly added bing and its not sucking...

.. as someone who wrote off Microsoft only a few months ago and still on my "Fuck yeah, open source! Fuck Microsoft!" high, I'm feeling a little conflicted.

Well done Microsoft.

<comment><USER4> Not to deliberately derail the thread or anything, but if you in any way associate using google search with promoting open-source, you are doing something wrong. Google search is (too) as proprietary as it gets.

As for bing, I gave it a shot. After switching to the US version it was a whole new product. My biggest complaint so far is the lack of intelligent porn-searches :P

<comment><USER2> The search is proprietary, but the company itself is one of (if not the) largest supporters of open source software out there. <http://code.google.com/opensource/>

Using Google for search makes Google money. Google reinvests a not-too-shabby amount of that money back into open source software. Ergo, using Google search promotes open source.

<comment><USER5> Google also releases stuff by subsidizing them like crazy. Guess what happens to people who make better products? No one hears about them because all the techies are circle jerking themselves over the new Google product.

Sad, really.

<comment><USER2> I'm pretty sure you're just talking out of your ass. Google has a long and storied history of releasing things to the sound of chirping crickets (Orkut, Froogle, Knol, Custom Search, etc.), and a lot of their services that aren't necessarily duds certainly aren't being circle-jerked over, either (Checkout, News, Finance, etc.)

</comment></comment></comment></comment></comment></comment><comment><USER6> Definitely not a bad option, but as Mr. Arrington says, "I'm used to Google and I know how to find the things I'm looking for."

I honestly cannot think of a time in the past year where Google has failed to locate sufficiently relevant information for a given query. If Google ever disappoints, I'll definitely fail over to Bing, but those days will be few and far between.

(And I do have a few presentation nits with Bing. I've seen a sponsored links block inserted ~250ms after the results rendered, immediately shifting the result positions and interrupting my skimming of the page. I can't open image results in tabs using Chrome, and their content wrapping for image results, Wikipedia pages, etc. feels a bit heavy-handed).

<comment><USER7> To be honest, I've felt Google has been 'babying' me too much in the last year. I've had part of my queries dropped, different intent inferred and weird verb stemming applied to my searches. In the last 6 months there have been at least a dozen occasions where I've felt the results are total crap for no good reason.

(mind you, that's out of 15,000 searches according to my Google search history)

There's also the general problem of too many commercial pages when you're trying to get information, not a product. However Bing, et al, seems to suffer from the same thing.

(eg, try finding out information about the Shoreline Amphitheatre VIP lounge experience. There are sites out there which discuss it, but it took a ridiculous number of permutations of search terms to finally find them)

<comment><USER8> Yes, one of the few major problems I have with Google is that it just changes your query sometimes when you _really_ want what you typed, and the slight change (adding an "s", most often, for me) swamps the results you're looking for in a sea of unrelated stuff. Even using quotes doesn't help here, though it should. I'll try to remember to use Bing for those kinds of queries when I run into one again.

<comment><USER9> Did you try putting a + before the word? I think it tells Google "don't fuck with this word, I want an exact match"

<comment><USER7> Thanks! I always forget to use that, because its original use was only to force Google to keep common words in the search query.

</comment></comment></comment></comment></comment><comment><USER10> There will be inevitable negatives comparisons to Google, and perhaps some of them are right. I'm just pleased it's working well enough for me and that there is finally now a viable competitor to Google.

<comment><USER11> Just wondering, why is it important to have a viable competitor to Google?

Are you worried about corporate shenanigans, or a single point of failure or something entirely else?

<comment><USER10> The danger of all monopolies. I'm not trying to troll or promote irrational fear, but I feel that the competition has been too weak.

The hegemony of a single organization which has a clearly stated philosophical viewpoint with a desire to index all information quite simply poses risks which others have described better than I can claim to. By diversifying those risks I hope we can reduce the potential problems.

I'm not saying that Microsoft is the antidote, just that I am glad to see competition. I hope there is more forthcoming.

</comment></comment></comment><comment><USER12> i have to admit, it is surprisingly good. not better than google, but it presents itself as a quality alternative. several steps up from live.

given some more time to chisel away at it, MS might have something which could seriously compete with google in the future.

<comment><USER13> The results seem similar to Google. I wonder if PageRank litigation is a possibility.

<comment><USER12> possible, but that would be one hell of an epic court case. probably wouldn't even be worthwhile to try and jump into that. both sides would probably lose a lot, on multiple levels.

<comment><USER13> Yes, I was thinking PR. Odd fact: Yahoo appears to have a license for PageRank (Yahoo bought overture/goto, whose patent Google infringed with AdWords auction). GOOG-MS might cross-license too.

</comment></comment></comment></comment><comment><USER14> If you want to test Bing in Safari, try:

      $ curl collison.ie/code/bing-safari-patch.rb | ruby

It'll replace Google with Bing in Safari's search box in the top right.

(Of course, you should read the code before running it.)

<comment><USER15> Or go get the glims safari extension so that you can add whatever search provider you want for the search box and also pick up a bunch of other neat safari tweaks (how I survived without the ability to undo a close tab I will never know... :)

</comment></comment><comment><USER16> I was a little excited after reading the article, alas I was disappointed when I tried it out. Seems to do everything in its power to avoid displaying blogspot, google mail lists, and google code projects. It didnt display as much about me as when I searched my name on google - did not even have my blog which has my name in the DNS :( . When I searched for dojango I was very disapointed... "Results are included for django" could have been changed to "Results were replaced with this search that we think you meant" To top things off, it seems to temporarily freeze my Ubuntu's installation of FF every time I move my mouse around the page.

</comment><comment><USER17> The problem with new search engines is not only how good they are, but that google is _the_ standard. Every website who wants to be visible is google- optimised, so it will be hard for a contender to be both original and successful.

</comment><comment><USER18> Bing seems to really like a few sites (Wikipedia, Amazon), but it's not quite up to Google search results.

PS: Some of the differences are just funny. Retric in Google = Hacker News profile, Retric in Bing = Slashdot Profile.

<comment><USER19> _PS: Some of the differences are just funny. Retric in Google = Hacker News profile, Retric in Bing = Slashdot Profile._

Slashdot has been around for over a decade. It has a PageRank of 9 versus 6 for HN. I would imagine Bing has a similar metric for measuring the popularity of a site. It seems to make sense that the Slashdot profile would rank higher.

What I think is really interesting is why Google ranked the HN profile higher. I'm thinking freshness is weighted much higher on Google than it is on Bing. I've done similar searches on both and while both yield relevant results I'm more likely to see older content on Bing.

</comment></comment><comment><USER13> Nice point that there is a little google lock-in, when people have learnt how to find things with google. It's not just the query syntax, but also that we've learnt what kinds of answers it gets back.

<comment><USER13> Thinking further: lock-in doesn't give you much competitive advantage in comp tech - but it does grant you a buffer against competitors. It buys you time, to match their improvement, or even improve on them. Therefore, in tech, I think competitive advantage should be measured in _time_ * : our good image gives us 1 week; user inertia is 1 year; adapting to another interface is 3 weeks; our server farm speed is 6 months; PageRank is 2 months.

These times only come into play when a competitor offers something better in some way (if there's nothing better, then these timers aren't engaged). It's like a better product is a pressure or voltage differential, and the competitive advantage is the resistance.

Of course, when you're ahead is the time to grow your competitive advantage, even though it's not needed, so that you have it when it is needed. It's an investment. The parts of the model are: the users you have; the relative attractiveness of a competing product; and what stops your users from switching.

Actually, I think this is just one kind of competitive advantage, and it only covers existing users (not new ones). For a start up, it's not enough to just retain users, you need to get them in the first place. You're better off focusing on getting them (by increasing the relative attractiveness of your product) rather than stopping them from switching... but Warren Buffett is always going on about competitive advantage - what exactly does he mean?

[ * ] for half their users to switch

</comment></comment><comment><USER20> I like Bing. It does a much better job for image search and presentation than Google.

The thing that will make Bing competitive with Google, however, will be the front page. Google has adhered to a simple front page with religious zealotry. Bing, on the other hand, seems to embrace making the front search page more useful. It remains to be seen if MS will clutter it up, but if Google starts adding widgets and tools to the front page, you will know they are paying attention.

</comment><comment><USER21> I didn't like the search results. It tries to guess on what you want, and as a techie i guess i'm more used to specifying myself what i want to search.

<comment><USER22> Would you like them better if the Google logo were floating at the top of the page?

<comment><USER21> I was refering to actual search results, for the same search, with comparison from both search engines. I might be totally wrong, and the issue is in a good part subjective. That's why i did put the words "I didn't like", and not "The results are plain bad".

Implying i was just influenced by the brand, while it may have seemed clever to you, is rude , gross ,and totally unrelated to what i said.

</comment></comment></comment><comment><USER23> I like the preview of the content when you hover over the result. It's interesting that Wikipedia pages can be viewed as pages on Bing.com. I think that's a feature that came from Powerset.

It's a reasonable competitor to Google, but I was hoping for a feature or two that would really impress me. Everything I see so far is an incremental improvement at best.

</comment><comment><USER24> Personally I'm still enamored with WolframAlpha, though Bing has a distinct edge in ease of typing=).

I realize that (for now) these sites are apples to oranges, but I would welcome any move by Microsoft/Google to take on Wolfram. Perhaps Bing will go this way? They have a lot of smart filtering, and the endless image search is just fun.

</comment><comment><USER25> I'm happy with it - my site comes in at #8 on it, instead of #10 on Google for my target keywords "etf screener". Besides that though it does exceed my expectations.

</comment><comment><USER26> uuuh...guys? I think Bing might be better than Google....what do I do?

</comment><comment><USER27> Meanwhile Windows continues to rot away; Remind me why they need to be so into search again?</comment>


Kickstarter is Debt - <AUTHOR> https://blog.bolt.io/kickstarter-is-debt-e3b6a70ce180#.l0p98vc73 <comment><USER2> Ahh yes, my favourite new trend in online publishing: Opening a link to an article only to find I have to scroll past a full-screen image to get to the content. Preferably an image that has precisely zero to do with the content or even the outlet where the content is being published...

Pity, the article, itself, is interesting... bootstrapping a hardware business was going on before Kickstarter, so it's interesting to see these more traditional options laid out.</comment>


Population panic lets rich people off the hook for the climate crisis - <AUTHOR> https://www.theguardian.com/commentisfree/2020/aug/26/panic-overpopulation-climate-crisis-consumption-environment <comment><USER2> But although population growth in low-impact poorer nations has a small impact today, those peoples will one day (hopefully) be wealthy and high-impact, and at that point we'll surely wish there weren't so many.

High-impact wealthy people definitely need to ratchet down their consumption, but why can we not also address overpopulation at the same time?

<comment><USER3> The point is that there's no future where everyone consumes as much as today's average American. You either:

a) reduce the consumption of the globally wealthy (this includes most Americans)

b) keep the globally impoverished poor to keep their consumption low

c) add in some eugenics and stop the poor people from having more kids with the promise that one day you'll let them consume the same way you already do

You're basically proposing 3, which is asking poor people to voluntarily not have kids so one day they can have what you already have by accident of birth

<comment><USER4> Option d) technology and good government policies enables a low/no carbon future.

<comment><USER5> It'd be nice if a no carbon future would be within reach but as far as I know, we do not have the technology to make this happen. Acting as if it's just a matter of time until we do... well, that is nothing short of a high-stakes gamble. Furthermore, we already have too much CO2 in the atmosphere -- even if we'd go no carbon _today_. We will need to actively remove it before we have passed too many ecological tipping points from which there may not be a return to the status quo.

<comment><USER6> We do have the technology. It's called nuclear energy.

<comment><USER5> > We do have the technology. It's called nuclear energy.

No, we do not. Nuclear energy is by no means emission-free.

> There is no such thing as a zero- or close-to-zero emission nuclear power > plant. Even existing plants emit due to the continuous mining and refining > of uranium needed for the plant. Emissions from new nuclear are 78 to 178 > g-CO2/kWh, not close to 0.

\-- Mark Z. Jacobson, Professor of Civil and Environmental Engineering at Stanford University

[https://www.leonardodicaprio.org/the-7-reasons-why- nuclear-e...](https://www.leonardodicaprio.org/the-7-reasons-why-nuclear- energy-is-not-the-answer-to-solve-climate-change/)

</comment></comment></comment></comment></comment></comment><comment><USER7> A quote:

> 69 days to save the earth: ... hovering over all of these is whether the US > will play its role in helping take collective responsibility for the future > of the planet.

Looks like a scenario for a movie with Bruce Willis.</comment>


Ask HN: My Chrome Extension got taken down - <AUTHOR> My Tilepad chrome extension (http://tilepad.co) recently got taken down. I couldn't get any official response from the google support team.<p>--8<-- Your Google Chrome item, "TilePad", with ID: jglhlhdkfaejllkkbcolnkcehcnpcjpf did not comply with our policies and was removed from the Google Chrome Web Store. Your item did not comply with the following section of our policy: An extension should have a single purpose that is clear to users.
... Please reply to this email for issues regarding this item removal. ... --8<-- I don't understand what is wrong with my extension. I've tried to reply but no answers.
Any idea how I can get it back? Should I try to submit my extension as a new one? <comment><USER2> I love how the Chrome Web Store defaults to blaming you: "Item not found. This item may have been removed by its author."

I can't see any reason why your app, from it's description, wouldn't met the policy. This is probably going to end up being one more case of a vague Google ban with no appeal and no detail. :/

</comment><comment><USER3> Strange, your site identifies the purpose of the plugin quite clearly.

Was this information also present on the Chrome web store?

<comment><AUTHOR> Sure! The extension was online and available almost 1 year.</comment></comment>


Why aren't government employees held accountable for their abuses of power? - <AUTHOR> https://www.libertarianism.org/columns/liability-accountability-government-employees <comment><USER2> Why aren't corporate employees held accountable for their abuses of power? I think there's more accountability in government because government records are generally open to the public vs corporate records which are private.

<comment><USER3> Also, lumping in the lack of accountability for police and prison guards with, say, accountability for teachers is laughable. Police and correctional officers have specific, strong protections from legal consequences for their actions.</comment></comment>


Handling Null Values in Postgres - <AUTHOR> https://www.percona.com/blog/2020/03/05/handling-null-values-in-postgresql/ <comment> ainar-g They forgot "IS NOT DISTINCT FROM", which is, IMHO, the best god damn operator ever invented. It works like "=", but adequately responds to NULL:

      postgres=# SELECT 1 IS NOT DISTINCT FROM 1;
       ?column?
      </comment><comment>----
       t
      (1 row)

      postgres=# SELECT NULL IS NOT DISTINCT FROM NULL;
       ?column?
      </comment><comment>----
       t
      (1 row)

<comment><USER2> "SELECT NULL IS NOT DISTINCT FROM NULL" ?column? \</comment></comment><comment>---- t

That bothers me. It is like saying that "infinity" (+inf) equals other infinity. Which is just wrong.

Some other SQL dialects will return "UNKNOWN" rather than "t" (true), which imho makes way more sense.

<comment><USER3> ...I think you are misunderstanding the whole reason for the IS NOT DISTINCT FROM operator, which is exactly that.

"SELECT NULL = NULL" will return NULL, use that if you want the standard way. There are many cases where you want it to return true though, and the boilerplate for that sucks, so IS NOT DISTINCT FROM has a very useful place in the dialect.

</comment></comment><comment><USER4> As I wrote before:

[http://thoughts.davisjeff.com/2009/08/02/what-is-the-deal- wi...](http://thoughts.davisjeff.com/2009/08/02/what-is-the-deal-with-nulls/)

"NULL semantics are designed to make you think you understand them, and think that the semantics are intuitive, and think that it's part of some ingenious consistent system for managing missing information. But none of those things are true."

Any explanation you come up with does not generalize to other cases. NULL is just a bunch of special cases piled on top of each other, and really only kind of works because SQL is not designed to be very extensible (and to the extent it is, the standard doesn't give much guidance on how NULL should behave in these extensions).

<comment><USER5> SQL needs to have NULL, because otherwise how does an outer join work? And once NULL is there, you need rules for how it interacts with other values. What is the alternative?

<comment><USER6> Why would you need outer joins any more than nulls?

<comment><USER7> Show me all schools in the system, and their associated teachers, including schools which have no teachers.

<comment><USER6> Easy:

       select school, (select array_agg(teacher) from teachers where teachers.school = schools.school) from schools;

If you don't like nulls any more than outer joins, you'd probably want:

       select school, (select coalesce(array_agg(teacher), '{}'::text[]) from teachers where teachers.school = schools.school) from schools;

<comment><USER8> You realize that joins are a part of the formal definition of relational algebra, while subqueries aren't, right? SQL has had outer joins since the beginning, but subqueries came only gradually, and more limited SQL engines tend still to not support them.

<comment><USER6> Why would SQL (fundementaly) need outer joins? "Because it has them", is not really a compelling answer in this context.

A "pure" relational model (like the one C.J. Date has been going on about for decades) has no outer join.

</comment></comment></comment></comment></comment></comment></comment><comment><USER9> An easy way to think about database nulls is how you would answer a question in real life about unknowns.

I have a friend James, and another friend Jane. I don't know their ages. Are they of the same age?

Or Jane has a car. James has a blue car. Do car colours differ?

SQL provides human answers: explicitly answers "I don't know".

Other languages treat null as if it was just another value, providing very confusing answers. I wish all programming languages would use SQL style of null.

<comment><USER10> Eh... it's exceedingly common to want to determine whether or not two expressions both evaluate to "unknown" (e.g. null = null). I literally wrote a query that needed to respect null equality yesterday. Extending your examples it would be the equivalent of asking:

"Is the answer to 'Are they of the same age?' the same as the answer to 'Do car colors differ?'"

Both answers are "I don't know". So... are they the same answer? The human in me says "Yes".

Of course you will recognize the similarity between the above and your first example. The interesting part is in the subtle difference between:

"Are they of the same age?" \--> "I don't know"

and

2\. "Is the answer to 'What is James' age?' the same as the answer to 'What is Jane's age?'" \--> "Yes"

The answer to number 2 relies on the fact that I _know_ I don't know _either_ of their ages. This extra piece of knowledge allows me to "lift" null into a value rather than the absence of. It's the difference between:

`Maybe<T>.value == Maybe<T>.value`

and

`Maybe<T> == Maybe<T>`

<comment><USER11> The answer to "Are they the same age?" is not really "I don't know". Try answering "I don't know" to a question during a quiz or an exam, it's very unlikely that your answer will be considered correct (even if it's actually true that you don't know it).

You don't know the answer to the question "Are they the same age" (but it's either true of false), and you don't know the answer to the question "Do car colors differ" (it's either true or false). If you don't know the answer to either question then you don't know whether the answers differ either.

</comment></comment></comment><comment><USER4> Quiz:

        -- Find all customers with total orders
        -- less than $100 in 2019
        SELECT c.name
          FROM customers c LEFT JOIN orders o
          ON (c.id = o.customer_id)
          WHERE DATE_TRUNC('year', o.ts) = '2019-01-01'::timestamptz
          GROUP BY c.name
          HAVING SUM(o.price) < 100;

Can you find the problem?

[ SPOILER ]

The problem is if there is a customer with no orders. The left join will produce NULLs for the attributes of "orders", and SUM() will sum them up to NULL because it thinks NULL means "nothing". The predicate "NULL < 100" will then think the NULL means "unknown" and produce the result "unknown". Then, the HAVING clause treats NULL like FALSE, and does not produce the row.

<comment><USER12> This is not really a problem with NULLs though, but primarily with how SQL forces you to put any kind of result in a rectangular table-shaped resultset. Because of this, a LEFT JOIN returns a single "order" row both if there is exactly 1 order for that customer, but also when there are no orders. That's just nuts.

If a JOIN could somehow return hierarchically structured data then there would've been no gotchas here.

<comment><USER4> Well, it's many problems, that's the fun of the example.

But yes, I think left join is fundamentally about grouping, and grouping would be better solved with set-valued attributes or relation-valued attributes.

I wouldn't call that "hierarchically-structured data" because that has the connotation that the data is actually stored in a hierarchy, which I think is generally a bad idea (though not always).

</comment></comment></comment><comment><USER13> Null dates and null numbers are sometimes useful. Null strings? No. It basically never makes sense to distinguish between text/varchar '' and NULL. If you really need to distinguish between "no middle name" and "middle name not provided" (why would you need that?), just add a boolean middle_name_known. NULL creeps into data in all sorts of ways, so you can't trust that the people doing your entry are actually using the semantics you want for null text. Add a boolean field and make them explicitly commit to the semantics.

<comment><USER14> Came here for this. I've had so many struggles with big enterprise data where engineers who design the schema think empty strings and nulls should have meaningful distinctions, but the humans involved in creating that data (who are not engineers) somehow break those assumptions, so when the data migrated elsewhere, inevitably it gets collapsed back down to null and empty string being identical.

</comment></comment><comment><USER15> > _it is quite evident that NULL is defined as "0" in C language._

It is actually the other way around. The bare numeral 0, in C, is defined to be the null pointer when the numeral 0 is encountered in a pointer context. This does not mean that the null pointer actually has anything to do with the value 0. The succeeding if clause in the C program in the article, the one which prints "NULL is 0", is not even using any pointers! Since the C preprocessor is text-based, the token sequence "if(0 == NULL)" is replaced by the preprocessor with "if(0 == 0)", which the compiler will interpret as an _integer_ comparison, not a pointer comparison.

For further reading, see [http://c-faq.com/null](http://c-faq.com/null)

</comment><comment><USER16> They way null strings are dealt with under default functions and operators has been a huge industrial mistake. It creates code bloat and mistakes that otherwise would be rare. Oracle mostly got it right.

And in general, "x <> 5" should be "true" if x is null, and not return null.

The justifications are mostly theoretical, not practical. I'd rather have 10 bugs from misuse of theory than 100 from real world. Theorists seem to magnify the "sin" value of theory-related bugs compared to actual bugs. I count them the SAME, and under that scoring formula, we are doing it wrong.

</comment><comment><USER17> Unless you're using an ORM that is replacing "= NULL" to "IS NULL" for you, you should know that there's a configuration within Postgres to change to do so instead: [https://postgresqlco.nf/en/doc/param/transform_null_equals/](https://postgresqlco.nf/en/doc/param/transform_null_equals/)

<comment><USER4> I don't recommend that setting, personally. If you do use it, I recommend it only for migration purposes with the idea that you go back to the default setting soon.

Configuration settings that change SQL semantics are just too dangerous.

From the official docs:

"Note that this option only affects the exact form = NULL, not other comparison operators or other expressions that are computationally equivalent to some expression involving the equals operator (such as IN). Thus, this option is not a general fix for bad programming."

[https://www.postgresql.org/docs/12/runtime-config- compatible...](https://www.postgresql.org/docs/12/runtime-config- compatible.html#GUC-TRANSFORM-NULL-EQUALS)

I know it seems tempting to use this setting as a convenience, but I strongly recommend against it.

<comment><USER17> Thanks. "= NULL" is not benign, either. It causes its own set of issues.

</comment></comment></comment><comment><USER18> Can someone explain the meaning to use 'x == NULL' expression? Why does not PostgreSQL prohibit usage of this expression?

<comment><USER19> It is valid syntax, you are comparing an "x" with "no value" and result will be "no value"

<comment><USER18> I know that it's a valid expression, but are there any use cases for it?

</comment></comment></comment><comment><USER20> >The output of the above program will be "NULL is 0", so it is quite evident that NULL is defined as "0" in C language.

To be pedantic, all that's evident from the observed behaviour is that in C, NULL compares equal to the integer literal 0. The expressions may be, and usually are not mutually interchangeable both ways, as they (may) have different types.

</comment><comment><USER21> One thing that threw me off is upserts with NULL in Postgres. NULL != NULL so it will continually create new rows.

</comment><comment><USER22> 30 yrs in the business and I never run into NULL semantics issues... because I virtually never use NULL (!)

my experience: it's far better to explicitly reserve a value for NULL. In fact, I go the other way and ask when NULL is worth adding?

example: in your datatype NULL-values exist but there's no easy way to represent them otherwise, i.e. you can't reserve a value because they're truly all used by real data.

example: you have a slew of BOOLEAN columns and NULL is a legitimate third value in the dataset. The alternative (char(1)) can be a lot of overhead vs the bitmask optimizations that most SQL engines offer (but test this!!!)

hope this helps!

p.s. having studied the history and known some of the people responsible... if we gave them a time machine, they'd first kill Hitler... and then undo this decision.

</comment><comment><USER4> I wish SQL had used a Maybe/Option type, or other algebraic data types, instead of NULL. So much safer and cleaner.

<comment><USER13> What would the behavior of the option type be? I don't see how it would behave differently than what SQL does today.

<comment><USER4> Option types can require exhaustive matching. So where there can be a NULL, you would have to address it. The syntax can make it pretty easy to handle typical cases.

</comment></comment></comment><comment><USER23> Related: Did you know that MySQL has a null safe operator? Absolutely life changing: [https://www.knowledgewalls.com/johnpeter/books/mysql/nullsaf...](https://www.knowledgewalls.com/johnpeter/books/mysql/nullsafe- equal-and-not-equal-operators-in-mysql)

</comment><comment><USER24> Null may have technical meanings in languages like C++ (0) but essentially the conceptual meaning of a null is "No Value" in every language.

It's a huge mistake in every language including SQL.

If you have an entity of a type. Say Int. What does NULL mean in context of that type?

      X = NULL
      Y = NULL + 1

It doesn't matter what language you operate in there is no NULL + 1, because NULL is not an INT. It just doesn't exist. So your programming language, if it's good, it should throw an error. If it's a shit it will continue to propogate the y deep into your program and you won't even know X was a null.

If you think a default to zero works imagine this:

      X = IntFunctionThatErrorsOutAndReturnsUnknownValueAkaNull()
      Y = X + 3

Does it make any sense to you that Y will be 3? X was unknown! You don't even know that the function errored out! Either IntFunctionThatErrorsOutAndReturnsUnknownValueAkaNull should have thrown an error or it should have returned a special type called an Optional Type. Throwing an error isn't ideal because you won't know something is wrong until runtime so the Optional Type is the better deal here. Either way neither approach is taken and instead you have a null and Y propagates through your program as if NOTHING happened.

Unfortunately SQL doesn't offer The Optional type or sum types therefore we are stuck with Null.

So if you do this in a language that defaults nulls to zeros:

       x = getFirstSqlColumnAsList("SELECT * FROM integerTableWithOnlyNullValues;")
       y = x[0] + 1

boom you get y a garbage value propagating through your entire program thanks to SQL nulls. SQL isn't innocent here.

Now imagine Optional types with exhaustive pattern matching:

      x: Maybe(int) = getFirstSqlColumnAsList("SELECT * FROM integerTableWithOnlyNullValues;")
      y = x match {
             Just x: Just(x[0] + 1),
             Nothing: Nothing
           }

If you can't understand why the above code is so much better than the previous code than you need to look up the Maybe Monad with algebraic data types. Basically the code above makes sure that there is Zero chance that an error is unhandled.

<comment><USER19> Yes, that's the problem this blog try to explain. NULL means "no value", but this is not true for all the languages. So you better know what is the value of NULL in the language you are trying to use.</comment></comment>


NASA ISS 2015 Calendar [pdf] - <AUTHOR> http://www.nasa.gov/sites/default/files/np-2014-11-021-jsc-iss-calendar-2015-web.pdf

<comment><USER2> Cool, but opening it to January and seeing Reagan's name misspelled on the opening line was disappointing.

</comment><comment><USER3> The link appeared on the ISS Facebook page, [https://www.facebook.com/ISS](https://www.facebook.com/ISS)

</comment><comment><USER4> Where can I buy or print this? I live in Canada.

<comment><USER5> Considering it is from a government organization, why couldn't you just print it from your own printer or have a print shop do it for you?

<comment><USER6> It'd be nice if a) I could get a nice bound/flippable and glossy version, and b) I could support NASA by doing so!

</comment></comment></comment><comment><USER7> Thanks for posting this! I had one at my desk last year, but it was given to me at a lecture by an astronaut.

</comment><comment><USER8> Anyone know of a version that starts with Monday instead of Sunday (on the weeks) ?

</comment><comment><USER9> AMS Nasa? thought it was a International project (including CERN).

<comment><USER10> I believe it's marked as "NASA" because NASA is responsible for it on orbit.</comment></comment>


Remacro: Markdown with Steroids - <AUTHOR> https://github.com/denisidoro/remacro <comment><AUTHOR> [https://github.com/denisidoro/remacro](https://github.com/denisidoro/remacro) is a plain-text macro expander inspired by React.

With this tool it's possible to generate a superset of markdown so that you don't need to repeat yourself.

It also works for any plain-text content, so it's able to expand programming source codes as well.</comment>


Ask HN: Would you take this Swift bootcamp in NYC? - <AUTHOR>

Hi all-
I am currently taking some iOS courses online but feel I could use some hands-on instruction and have been looking at various courses/programs in NYC.  I'm interested in learning Swift and feel like I have a firm enough grasp of Obj-C to handle it.
Last week I posted about a Swift bootcamp-like course in the area that is being taught by one of the iOS Development instructors at NYU: http://www.eventbrite.com/e/ios-swift-3-day-intensive-tickets-12113805719.  It was recommended to me by a friend who took her course at NYU, but I'm on the fence.
Any advice on selecting the right course, school, etc.?  Anyone studied under this instructor before?
Thanks in advance for your help, Matt <comment><USER2> That's a lot of money. Personally, I would try this first:

[http://www.raywenderlich.com](http://www.raywenderlich.com)

<comment><AUTHOR> I guess I just need an environment where I can ask questions.. I've always done better in a classroom environment and found the online learning a bit tricky at times. I thought this bootcamp course might be a nice alternative to the $3,000 - $4,000 courses I've seen everywhere else (but, trying to learn it in 3 days might be a little too intense for me).

Thanks for the resource though - I'm an avid user of Ray's site! If there are any other suggestions, I'm all ears!</comment></comment>


A Catalan breakaway would make Brexit look like a cake walk - <AUTHOR> https://www.ft.com/content/e5866c72-aaa3-11e7-ab55-27219df83c97?mhq5j=e5 <comment><USER2> Paywalled and the web link doesn't work. Isn't this violating google's policy?</comment>