The hammer-feather drop in the world's biggest vacuum chamber [video] - <AUTHOR> http://thekidshouldseethis.com/post/the-hammer-feather-drop-in-the-worlds-biggest-vacuum-chamber <comment><USER2> I wish the producers were less enamoured of their slow-mo and showed us the whole thing in real-time.

The "weird" thing is seeing feathers plummet to the ground and I wish we got to see more of that.

<comment><USER3> This is a Brian Cox show we're talking about, not a science show. I'm surprised there weren't more slow mo shots of Cox doing his "boyish wonder" face.

<comment><USER4> His 'boyish wonder', although personally I think it's genuine, does get annoying to those of us who have their own wonder to contend with. Though, perhaps, those completely devoid of it themselves appreciate the cues.

I really don't mind Cox... what I despise is the trend of putting comedians in to science and politics shows in an attempt to relieve the dowdiness (Sorry Dara). Then again, I'm one of those people who used to sneak downstairs in the early hours to watch the dusty math and science stuff the BBC used to broadcast for teachers to record on VHS.

<comment><USER5> I agree. Have you ever tried listening to The Infinite Monkey Cage on BBC Radio 4? [1]

It's motto seems to be "Look at us! We're scientists but we're so wacky!!!111"

[http://www.bbc.co.uk/programmes/b00snr0w](http://www.bbc.co.uk/programmes/b00snr0w)

<comment><USER6> Robin Ince certainly has a lot to answer for.

Ben Goldacre is the master of this style of science communication. Friendly and fun and enthusiastic, but in a way that appeals to both laymen and his peers. I suppose epidemiology is somewhat more human than astrophysics, so its easier.

<comment><USER5> Frontiers [1] also on Radio 4 is good.

[1] [http://www.bbc.co.uk/programmes/b006qy5p](http://www.bbc.co.uk/programmes/b006qy5p)

</comment></comment></comment></comment></comment></comment><comment><USER7> Seeing as the original site has now fallen over, the actual youtube link is

[https://www.youtube.com/watch?v=E43-CfukEgs](https://www.youtube.com/watch?v=E43-CfukEgs)

<comment><USER8> And for the violently impatient, the actual drop: [http://youtu.be/E43-CfukEgs?t=2m52s](http://youtu.be/E43-CfukEgs?t=2m52s)

<comment><USER9> Fortunately you beat me to it. I was going to post the later sequence at: [https://www.youtube.com/watch?v=E43-CfukEgs&feature=youtu.be...](https://www.youtube.com/watch?v=E43-CfukEgs&feature=youtu.be&t=4m15s)

But on closer viewing that is a disastrous montage: the first few seconds (before cut away) show the feathers fluttering and the bowling ball starting to accelerate away; the slow-motion segue is under vacuum conditions though. The film editor's intention is that the two shots appear contiguous. We can speculate why they might have done this (no close up shot taken under vacuum conditions?) but it really tramples the whole point of the article :(

<comment><USER10> What do you mean? The close-up shot at 2:52s is under vacuum. The "fluttering" you see is the elastic wave in the feather caused by the sudden drop in internal tension. The feather is an elastic object (to a first approximation). When the feather is hung, there's internal tension keeping it stationary and giving its shape. When the feather is unhooked, this internal tension doesn't just disappear instantaneously, rather an elastic wave travels through the feather at the speed of sound in the feather. Because the feather is not a perfect elastic medium, the effect you see is a damped harmonic oscillator, but it takes non-zero finite time to dampen sufficiently.

This is true for the big ball too, except that the speed of sound is orders of magnitude faster in it, and the spring constant of the material (steel?) is also many order of magnitude larger than the spring constant of the feather.

The center of mass of both objects falls at the same rate. At t=0, d^2x/dt^2=0 for the points closer to the ground and d^2x/dt^2=2g for the points that were just unhooked. Also see [https://www.youtube.com/watch?v=mAA613hqqZ0](https://www.youtube.com/watch?v=mAA613hqqZ0)

<comment><USER11> He's referring to the sequence starting at 4:15. Compare the close up real time shot that starts the later sequence to the slow motion at 2:52. The feather and ball leave the frame almost simultaneously in the earlier one but with ~25% of the feather still in frame in the latter.

After looking at it I agree with zwp, the editor really did make quite a mistake when assembling the last sequence.

[Edit: Screen grab of both [http://imgur.com/EAKB5FK](http://imgur.com/EAKB5FK) and I agree with the over all editing comment below. The slow motion shot as the first shot of falling in the vacuum was the thing that really stood out and I thought was bad on the first play through.]

<comment><USER10> Oh, I see what you mean now. Yes, definitely editing mistake :-). Apart from that, editing was bad altogether. There should have been many shots with the real-time fall. In fact, the first shot of the drop should have been in real- time.

</comment></comment></comment></comment></comment></comment><comment><USER12> Certainly a lot of us know what to expect in this experiment, but the thing I never really thought about was a that the feathers would bounce back up after impact. Seems obvious in retrospect, but it was pretty cool to see.

</comment><comment><USER13> Commander David Scott did this same experiment as part of Apollo 15 in August of 1971, in an even larger vacuum:

[https://www.youtube.com/watch?v=KDp1tiUsZw8](https://www.youtube.com/watch?v=KDp1tiUsZw8)

<comment><AUTHOR> That's one reason why I posted the link to this site, rather than directly to the YouTube video, as explained here:

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

The text of the site I submitted has kindly been posted by DanBC[0] here:

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

[0] [https://news.ycombinator.com/user?id=DanBC](https://news.ycombinator.com/user?id=DanBC)

<comment><USER13> No worries, mate.

</comment></comment></comment><comment><USER2> I love how professionals who work at that facility and have probably deeply understood those principles for decades still display so much wonder at seeing this experiment with their own eyes.

<comment><USER14> I might be cynical, but I think they were putting on a show a bit. They already had some sort of apparatus set up to do the simultaneous drops.

My guess is that it's a standard demonstration for visiting dignitaries and the like.

<comment><USER15> >They already had some sort of apparatus set up to do the simultaneous drops.

Why do you say that? They could have easily made the apparatus for this experiment.

<comment><USER16> The button he pressed when dropping had a label that said something like "launch jet sequence" (don't remember exactly). They probably have a modular set of actuator and rigs they can easily mess around with . :)

</comment></comment></comment></comment><comment><USER17> Worth reading [http://en.wikipedia.org/wiki/Equivalence_principle](http://en.wikipedia.org/wiki/Equivalence_principle) if you don't understand the last part.

</comment><comment><USER18> I guess this is a pretty superficial complaint, but this is a 2nd-generation clickbait-site link (posted on io9, reposted on thekidsshouldseethis.com). Why not post the Youtube link directly? This isn't really Hacker News material, anyway.

<comment><USER19> Experiment, curiosity, huge NASA buildings, near vacuum. I'd rather read about this than mark zuckerberg.

</comment></comment><comment><USER20> Can someone explain to me the last part about the items standing still and no force acting on them? Isn't gravity acting on them, pulling the earth and items together?

<comment><USER21> Imagine being inside of a closed box like an elevator. Without leaving the box there is no way to tell the difference from being in free fall towards Earth versus floating in interstellar space. Therefor, general relativity take the perspective that gravity is a fictitious force (like centrifugal force) that arises from the shape of spacetime.

<comment><USER22> >versus floating in interstellar space

Versus being inside that an elevator that is being accelerated in interstellar space

This seems like a pretty good explanation: [http://www.astronomynotes.com/relativity/s3.htm](http://www.astronomynotes.com/relativity/s3.htm)

<comment><USER23> gradi3nt had it right

Free fall feels like floating Standing still (in the presence of the Earth's gravity) feels like being accelerated.

</comment></comment></comment></comment><comment><USER24> All the best facilities have big buttons labelled "Mega speed trigger".

But in seriousness, does the Moon not count? Surely space is the largest vacuum chamber we have access to!

</comment><comment><USER25> I know how this will turn out but my intuition is screaming otherwise.

<comment><USER26> I find it interesting that Brian Cox, the presenter and avowed scientist, obviously finds it so 'surprising' as well. Maybe that's the true meaning of being a scientist, though - he doesn't _truly_ believe it until observing it with his own eyes.

<comment><USER27> >Brian Cox, the presenter and avowed scientist,

I think you mean "Brian Cox: Professor of High-energy Particle Physics, member of the High Energy Physics group at the University of Manchester, and the ATLAS experiment at the Large Hadron Collider at CERN (who also presents popular science programmes in the UK)"

I think his career as a scientist deserves a little more recognition than "avowed".

And, as for his career in popular science he has been awarded both a Faraday and a Kelvin prize.

<comment><USER26> Sorry; I have every respect for Brian Cox, unlike others on this thread. I think I'm merely using totally the wrong word.

<comment><USER27> Sorry; I read "avowed" as a deliberate slur. I suspect some of the negativity about him here must have got to me. For an unknown reason I picked on your comment – I now see there are plenty worse :)

</comment></comment></comment></comment></comment><comment><USER28> Yes, you already know the ending, but its worth watching just to see the massive structure.

</comment><comment><USER29> It interesting some people think a vacuum means a lot of pressure but really it's the same as 10 meters under water at sea level pressure.

<comment><USER30> ^, explosive decompression in space also isn't as explosive as coming up from a few meters underwater in one go (it's from 1 to 0 atmospheres, instead of 100 to 1).

Not that I advocate explosive decompression in any circumstance, mind you.

</comment></comment><comment><USER31> SPF is an awesome and unique facility, I wish more of the public would get to see it in person.

If you want to see more of it in video, it's also where the opening scene to "The Avengers" was filmed. Plum Brook Station has a whole collection of really cool (though mostly single-purpose) buildings.

<comment><USER32> _If you want to see more of it in video, it 's also where the opening scene to "The Avengers" was filmed._

It's appeared in a lot of movies, "Futureworld" (1973) being one of the first.

That's where the nuclear rocket upper stage for Apollo was supposed to be tested.

</comment></comment><comment><USER33> The space and aerospace programs of the sixties produced some really impressive technologies and facilities. Too bad government spending on technology research went down, just imagine what could be possible.

<comment><USER34> From another perspective, these technologies left us with little science of utility (Tang?) while developing intercontinental ballistic missiles that loom over humanity like the Sword of Damocles. When historians from far off planets visit our nuclear wasteland they will see our thinly veiled space program as the beginning of end. :-)

<comment><USER35> Quick list of more inventions that are not Tang [http://en.wikipedia.org/wiki/NASA_spin- off_technologies](http://en.wikipedia.org/wiki/NASA_spin-off_technologies)

<comment><USER36> Even something as mundane as error correction coding were developed at NASA, for communicating with spacecraft - technology that's now present in e.g. CD/DVDs, and every mobile communication system.

Now, if they hadn't developed it, someone else probably would, but perhaps not at that time - leaving us at years behind where we currently are with e.g. the speeds on our mobile devices.

<comment><USER37> Error Correction Coding is hardly mundane and in modern communication systems far from trivial. There is a lot more to ECC than Reed-Solomon. Basically nothing in our digital world today would work very long without it. You think of it as mundane only because it just works.

</comment></comment></comment></comment></comment><comment><USER38> Anybody else catch the NASA engineer wearing a SpaceX Dragon t-shirt? Nice.

<comment><USER39> I'm wearing mine to Interstellar tonight!

</comment></comment><comment><USER40> I love science. This is a very nice example of it.

</comment><comment><USER41> I think my favorite part of this is not that they were able to demonstrate it so well but instead the reactions of people expecting it to actually occur.

</comment><comment><USER42> I live in Ohio, Never knew that the biggest vacuum chamber is here until now.

<comment><USER43> Yup yup, it is NASA Plumbrook, the old reactor south of Sandusky. On the way to Cedar Point as a kid I was always in awe of the place as it was so big and you could only get within a few miles of it. My sixth grade teacher claimed a three eyed frog he had in a jar came from a nearby pond.

</comment></comment><comment><USER44> They could also have put a toy helicopter in there, just to add more fun.

</comment><comment><USER45> So if they aren't falling. What are they doing?

</comment><comment><USER46> Science is amazing.

<comment><USER47> Its brilliant

</comment></comment><comment><USER48> Serious question: why do we keep repeating this experiment? Not that I mind, I just am curious why do we keep building bigger and bigger vacuum chambers just to drop a feather and a hammer over and over.

<comment><USER49> Before they pump the air out in the video, the presenter explains what the facility was made for and is currently used for.

<comment><USER50> The presenter was wearing a wicked smile when the feather hit the box.</comment></comment></comment>


Marissa Mayor, Yahoo's new CEO, is Pregnant - <AUTHOR> http://timesofindia.indiatimes.com/tech/news/internet/Yahoos-new-CEO-Marissa-Mayer-is-pregnant/articleshow/15018836.cms?

<comment><USER2> Original discussion: <http://news.ycombinator.com/item?id=4253935>

</comment><comment><USER3> Now imagine seeing the same article if a new male CEO were expecting a child.

<comment><USER4> The double standard is disgusting</comment></comment>


Dolphin Progress Report: December 2019 and January 2020 - <AUTHOR> https://dolphin-emu.org/blog/2020/02/07/dolphin-progress-report-dec-2019-and-jan-2020/ <comment><USER2> > Microsoft says that VS2019 runtimes are forward and back compatible with > VS2015 and VS2017, however, it turns out that is not always the case, and we > definitely encountered one of the incompatible scenarios.

The binary compatibility has documented limitations. As [https://docs.microsoft.com/en-us/cpp/porting/binary- compat-2...](https://docs.microsoft.com/en-us/cpp/porting/binary- compat-2015-2017?view=vs-2019) explains, "The Redistributable your app uses has a similar binary-compatibility restriction. When you mix binaries built by different supported versions of the toolset, the Redistributable version must be at least as new as the latest toolset used by any app component." This allowed us to add VCRUNTIME140_1.dll as part of the "FrameHandler4" work that the compiler back-end team did. This decreases the size of exception handling info on x64 for compiled programs, sometimes significantly.

(I work on the Visual C++ team, on the STL. We regularly build Dolphin with our development toolset to prevent shipping compiler/library regressions, and to provide advance notice of source-breaking changes. I've had to report a couple of breaking changes to Dolphin and have been astounded at their prompt fixes - they are a wonderful team!)

<comment><USER3> The zig project was also plagued with issues around VCRUNTIME140_1.dll. See [https://github.com/ziglang/zig/issues/3391](https://github.com/ziglang/zig/issues/3391)

</comment></comment><comment><USER4> _> [...] We have ample proof that Avalanche Software was already upset about homebrew and emulation thanks to a crude message found hidden in the data of 2007's Meet the Robinsons, however it's very unlikely that this is anti- emulation behavior._

Can't find more about this by Googling around... anyone knows what the crude message was and where it was hidden?

<comment><USER5> > I'm a H4X0R b3c4us3 I l0ve c0ck

[https://tcrf.net/Meet_the_Robinsons_(GameCube)#Dev_Message](https://tcrf.net/Meet_the_Robinsons_\(GameCube\)#Dev_Message)

<comment><USER6> tcrf.net fails on the latest version of Firefox due to lack of TLS 1.2 support. Neat - first time I've seen this TLS error too.

[https://i.imgur.com/CnwV3bn.jpg](https://i.imgur.com/CnwV3bn.jpg)

[https://www.ssllabs.com/ssltest/analyze.html?d=tcrf.net](https://www.ssllabs.com/ssltest/analyze.html?d=tcrf.net)

<comment><USER7> It doesn't fail on 72.0.2 which is the latest stable.

Do you mean on nightly?

<comment><USER6> You're right; forgot I was running 73 beta.

</comment></comment></comment></comment></comment><comment><USER8> >However, unknown to any of us, it turns out that PEXT is extremely slow on AMD Zen and Zen 2 architectures.

Is it because of some patents? Anyone knows?

<comment><USER9> While on the topic, I always hope that HW manufacturers could start being explicit about what is _supported_ and what is "supported".

We have this problem with CPU manufacturers stating that something is supported, when it is instead emulated (hello checks on CPUID). Disk drives acknowledge writes before they actually write the data to the disk (hello layers of unreliable fsyncs). Network cards claim that packet have been shipped while they never left the circular buffer (hello bufferbloat).

Please HW manufacturers, stop lying to us.

</comment></comment><comment><USER10> Emulator development is not my cup of tea and I only once tried Dolphin, but the progress reports are always a fantastic read. The Dolphin code base [1] is also fun to read.

Thanks for all the enjoyable reads!

[1] [https://github.com/dolphin-emu/dolphin](https://github.com/dolphin- emu/dolphin)

</comment><comment><USER11> The progress report linked to Dragon Quest X ([https://wiki.dolphin- emu.org/index.php?title=Dragon_Quest_X:...](https://wiki.dolphin- emu.org/index.php?title=Dragon_Quest_X:_Mezameshi_Itsutsu_no_Shuzoku_Online)) and I'm impressed to find an aspect of the Wii library I didn't know existed: a game that expects to be installed to a USB drive to be played.

I honestly thought every game would just be playable directly from a disc, but I guess this one was too large for a single disc.

<comment><USER12> Dragon Quest X is a MMORPG, so the ability to patch things is also quite useful.</comment></comment>


Rough Day at Work? Call of Duty Can Help You Recover - <AUTHOR> http://www.livescience.com/46355-rough-day-at-work-call-of-duty-can-help-you-recover.html

<comment><AUTHOR> Seems interesting to try. I'm used to watch TV shows in order to disconnect. Working out sounds like a good idea but I'm a little bit lazy. So I might try this advice. What games can you suggest for someone who used to play Doom and Need For Speed about 10 years ago? I need something not complex.

<comment><USER2> Play them all until you find something you like.

<comment><AUTHOR> I played COD a little bit, modern games are just too hard. I need something fun and relaxing.

</comment></comment></comment><comment><USER3> For a while my way to unwind after a rough day at work was to fire up GTA4, turn off the cell phone (to pause the story mode) and just drive around like a lunatic and blow stuff up. It's actually surprising just quite how effective this technique works to unwind.</comment>


Patreon purchases competitor Subbable - <AUTHOR> https://subbable.com/

<comment><AUTHOR> According to the email sent out to subscribers, the talks began when Amazon discontinued their payment service. Subbable asked Patreon what they were using, Patreon said "let's talk deal."</comment>


Ask HN: Am I crazy?  Odd symmetry between Haskell and Java - <AUTHOR> Let's say that I have a function x that returns a Foo, a function y that takes a Foo and returns a Bar, and a function z that takes a Bar and returns a Baz.  This is perfect:  we just call z(y(x)).
Then we discover a corner case, or the requirements change, and now there's a situation where x can't return a valid Foo.  In Haskell, then, we have x return a Maybe Foo, and y take a Maybe Foo.  Then y either handles the Nothing case using a pattern, or else returns a Maybe Bar.  If y returns a Maybe Bar, then z handles the Nothing, or else returns a Maybe Baz.
In Java, x throws an exception.  y and z either handle the exception or also throw it.
In both cases, I have to change the function definition (to take and/or return a Maybe in the case of Haskell, to declare the exception in the case of Java).  It seems like they're doing almost exactly the same thing (except that Java is considerably more verbose).
So, where's the advantage to Haskell (other than wordiness)?  I'm sure someone will say "composability", but how does the Maybe compose in a way that the exception does not? <comment><USER2> > Let's say that I have a function x that returns a Foo, a function y that > takes a Foo and returns a Bar, and a function z that takes a Bar and returns > a Baz. This is perfect: we just call z(y(x)).

update: I created an interactive tutorial[0]

Alright, here is my code (I can verify it is runnable/working on ghc 7.8):

        data Foo = Foo deriving Show
        data Bar = Bar deriving Show
        data Baz = Baz deriving Show

        x :: Foo
        x = Foo

        y :: Foo -> Bar
        y _ = Bar

        z :: Bar -> Baz
        z _ = Baz

> Then we discover a corner case, or the requirements change, and now there's > a situation where x can't return a valid Foo. In Haskell, then, we have x > return a Maybe Foo, and y take a Maybe Foo.

I'm only going to make one change to x:

        - x :: Foo
        - x = Foo

        + x :: Maybe Foo
        + x = Just Foo

You don't have to change caller y to take a maybe Foo for one, you can leave it as is and use:

        λ> fmap y x

Let me remind you of the type of fmap:

        fmap :: Functor f => (a -> b) -> f a -> f b

specialized to the case of Maybe's functor instance and our types:

        fmap :: (Foo -> Bar) -> Maybe Foo -> Maybe Bar

> Then y either handles the Nothing case using a pattern, or else returns a > Maybe Bar.

In this case you can see by the definition of fmap a Maybe Bar is returned.

> If y returns a Maybe Bar, then z handles the Nothing, or else returns a > Maybe Baz.

Just as we don't have to change our definition of z.

Our final composed function is just:

        z . y <$> x

So the final code looks like this:

        import Control.Applicative (<$>) -- must import explicitly before GHC 7.10

        data Foo = Foo deriving Show
        data Bar = Bar deriving Show
        data Baz = Baz deriving Show

        x :: Maybe Foo
        x = Just Foo

        y :: Foo -> Bar
        y _ = Bar

        z :: Bar -> Baz
        z _ = Baz

        main = print (z . y <$> x)

It sounds like you previously thought all the functions had to be updated and it had to look something like this:

        data Foo = Foo deriving Show
        data Bar = Bar deriving Show
        data Baz = Baz deriving Show

        x :: Maybe Foo
        x = Just Foo

        y :: Maybe Foo -> Maybe Bar
        y _ = Just Bar

        z :: Maybe Bar -> Maybe Baz
        z _ = Just Baz

        main = print (z . y $ x)

Does this make the composabiltity clear? Is it clear how fmap (aka <$>) eliminated the problem having to update all of those functions whereas in a less composable language it would be necessary?

If you are interested in more information about functor, applicative, and monad check out Adits awesome "Functors, applicatives, and monads in pictures" tutorial[1]. The pictures/diagrams in it helped me really make sense of applicatives, functors, and monads.

0: [https://www.fpcomplete.com/user/codygman/real-world-fmap- exa...](https://www.fpcomplete.com/user/codygman/real-world-fmap-example)

1: [http://adit.io/posts/2013-04-17-functors,_applicatives,_and_...](http://adit.io/posts/2013-04-17-functors,_applicatives,_and_monads_in_pictures.html)</comment>


How Yammer Stays Fast (and why it looks a bit like Facebook) - <AUTHOR> http://eng.yammer.com/blog/2012/3/8/social-similarities-yammer-facebook-and-why-they-look-alike.html

<comment><USER2> LOL. A bit alike?</comment>


Facebook "Likes" Accurately Predict Hospital Mortality Rates - <AUTHOR> http://www.fastcodesign.com/1672101/facebook-likes-accurately-predict-hospital-mortality-rates

<comment><USER2> I can't believe the paper has no scatterplot. Maybe the Internet can help. Anyone want to make one?

<comment><USER3> <http://imgur.com/33mYSic>

This is from the paper's table 1, not having done any of the statistical analysis to get rid of the confounding factors (age of facebook page, size of hospital, etc).

<comment><USER2> Thanks! The trend is not exactly conspicuous.

<comment><USER3> to say the least..

When plotted on a linear "likes" scale, the point with the most likes stands out more, and would probably cause the linear fit to have a negative trend, because its mortality rate is well below average.

However, I don't really think it's justified to draw conclusions from this either way without taking into account even hospital size and fb page age.</comment></comment></comment></comment>


Can anyone here recommend VC and angel investors in Australia? - <AUTHOR>

<comment><USER2> you might try the Churchill club http://www.churchillclub.org.au ~ there is one in melbourne and sydney</comment>


[ANN] RateMyApp!  Click to watch Episode 01 (Pilot) - Justin.TV (new YouTube show) - <AUTHOR> http://www.youtube.com/watch?v=7-mXm7lzWfA <comment><USER2> Googling for RateMyApp turned up this: _Did you mean: ratemyass_

That's made my 2am much more enjoyable.

</comment><comment><USER3> Borat without the humor :-)

</comment><comment><AUTHOR> Thanks for your feedback everybody!</comment>


Who Will Own The Living Room? Apple, Google, Sony or Microsoft? - <AUTHOR> http://www.techi.com/2010/09/who-will-own-the-living-room-apple-google-sony-or-microsoft/ Though recently it has been the smartphone market that has garnered the most attention in the tech world, the arrival of a revamped – if slightly disappointing – Apple TV is a reminder that the living room is the next big play for digital transformation. <comment><USER2> Is there any evidence to suggest that "the hub" is anything but a unicorn that consumer products journalists write about and manufacturer product managers get tricked in to believing?

</comment><comment><USER3> I think Apple should sell Apple TV bundle in a real TV under a reasonable price. It's function doesn't seem mainstream enough to be sold separately.

A real TV with some new unconventional features might make it though</comment>


Apple Airplay on Raspberry Pi in 7 Easy Steps - <AUTHOR> https://appcodelabs.com/7-easy-steps-to-apple-airplay-on-raspberry-pi <comment><USER2> At the risk of being a bit off topic … A lot of people interested in Airplay will be looking at this post wondering how to use AirPlay with UPnP or ChromeCast devices. shairport-sync [1] (used in the article) only works directly with audio hardware, so won't work with Chromecast or UPnP compatible systems. I've tried many many different open-source bridges and finally found AirConnect [2] which is by far the most reliable, active and well-maintained bridge. philippe44 responds to every issue filed (as far as I can tell). Works great with my Sonos PLAY:1 & XBox.

[1] [https://github.com/mikebrady/shairport- sync](https://github.com/mikebrady/shairport-sync) [2] [https://github.com/philippe44/AirConnect](https://github.com/philippe44/AirConnect)

<comment><USER3> Thats exactly what I used. Highly recommend AirConnect.

</comment></comment><comment><USER4> My beef with airplay and pretty much every other Zeroconf based service is that they require weird stuff to work across subnets. Here I isolate every "IOT" device specially the ones that potentially has a phone home capability into a separate network. The wireless network is also segregated and routed. To make everything Zeroconf/Bonjour work I have to create lots of SRV, PTR and TXT records in my internal DNS which is a Samba4 AD. This document [http://www.grouplogic.com/Knowledge/PDFUpload/Info/WanBonjou...](http://www.grouplogic.com/Knowledge/PDFUpload/Info/WanBonjour_1.pdf) is great to setup the basics but you will have to find out the specific RR for each type of service.

<comment> X-Istence You could also set up Avahi or some other mDNS daemon to relay mDNS packets across the two different networks, so long as you can route the UDP/IP from one network to another you shouldn't need to create a whole bunch of TXT records.

<comment><USER4> Going DNS has its advantages like being a less broadcasty solution that can work across VPNs. I've first implemented it some years ago when a client wanted to share authenticated wireless AirPrint to wireless guests on his huge school wireless network. The system is still working.

I guess another advantages of going DNS besides not having to broadcast information is that you chose what you want to publish.

</comment></comment></comment><comment><USER5> This guy must have been doing this at exactly the same time as me. I used shairport-sync and whilst I eventually got it working last week it wasn't plain sailing. Getting the service setup to start upon powerup was a real pain in the ass. I've also had to move it onto a separate wifi network as an RPi camera was hogging the bandwidth which caused audio dropouts on the shairplay- sync server.

Also as many of you will probably comment, the Rpi audio out stage is awful. I'm waiting for my Dad to return my USB soundcard so I can use that instead of the headphone socket on the Pi.

<comment><USER6> How has it managed to escape me, immersed in tech every day for many years, that there is such a thing as a USB soundcard? Crazy how things can slip through the cracks, be so close yet missed.

<comment><USER7> They're definitely useful. Also, even at the low end, often better than onboard simply because they get so much less interference. There are also some really nice higher end options if you ever want to do multi-channel mixing/capture.

Aside: for anyone considering a hackintosh, USB audio is about your best bet in this space.

</comment></comment></comment><comment><USER8> I've been doing this for a couple years with a Zero (pre-W) and a pHAT DAC[0] with great success.

It just runs and reliably shows me a Airplay device for my garage speakers. I recommend it for people who have audio hardware lying around and don't want to replace it with more expensive and worse sounding smart speakers.

0: [https://shop.pimoroni.com/products/phat- dac](https://shop.pimoroni.com/products/phat-dac)

</comment><comment><USER9> It's a bit funny how the best way to stream audio between two Linux boxes is Airplay with shairport on the server and the raop2 PulseAudio Plugin on the Client. It integrates well into the Desktop too and is automatically discovered!

It's funny because PulseAudio could do network streaming itself, but as it still streams the uncompressed PCM stream afaik, it's pretty useless in practice.

<comment><USER10> We're using the PA PCM method in our student association. Works good enough.

<comment><USER9> I reckon you have everything connected over Ethernet then?

<comment><USER10> No, WiFi.

</comment></comment></comment></comment><comment><USER11> You can also just buy an old Airport Express base station and repurpose it for AirPlay. The old 802.11g ones can be found for about $10 or so and even have an optical audio out.

<comment><USER12> I went this route. Nightmare. The installer software has been removed for Mac and isn't available anywhere. Had to find a laptop running Windows 7 to get it up and running. It also won't be compatible with modern routers. 1/10 can not recommend.

<comment><USER13> What do you mean by "won't be compatible with modern routers"? Are you referring to the 802.11g? These devices had an ethernet port, IIRC. I'm sure I remember plugging mine into my network and not using its built-in wifi.

<comment><USER12> Yes, they have an ethernet port, but the goal of such a device (for me, where I don't have ethernet running to my speakers) is to stream music over wifi.

</comment></comment></comment></comment><comment><USER14> All the Airplay tutorials I've seen are about being a receiver for Airplay signals from something like an iPhone. These boxes then plug into speakers for output.

Does anyone know if there are tutorials on making an Airplay client that instead sends audio & video to a receiver of some type (e.g. Apple TV)?

<comment><USER15> This project can stream audio to an Apple TV and includes details about the (now required) pairing protocol: [https://github.com/philippe44/RAOP- Player](https://github.com/philippe44/RAOP-Player)

<comment><USER14> Thank you!

</comment></comment></comment><comment><USER16> My understanding is that this is possible because at some point, the private keys for the airplay encryption were found. Alas airplay 2 cannot be supported unless the same thing happens, which is a shame.

<comment><USER17> What's the difference between airplay 1 and 2?

Is it quality?

<comment><USER18> I couldn't quickly find a detailed breakdown, but here's a basic one:

\- Airplay doesn't offer multi-room audio; AirPlay 2 does

\- AirPlay lets you stream from any Apple device to your speakers or TV

\- AirPlay 2 lets you play from speakers over Wi-Fi, and it'll stay in sync

\- AirPlay 2 lets play different songs in different rooms with multiple HomePods

If memory serves, the original AirPlay had much simpler goals. Stream music from a single computer to a speaker over a local network. So it has concessions like a constant 2 second lag, which happens if you press pause/play. I vaguely remember other weird restrictions when playing with it in the past (like one device at a time had to control a speaker).

AirPlay2 is a lot more complex adding the features mentioned above and better handling the use-cases original AirPlay grew into.

[https://www.pocket- lint.com/speakers/news/apple/144646-apple...](https://www.pocket- lint.com/speakers/news/apple/144646-apple-airplay-2-vs-airplay-what-s-the- difference)

<comment><USER19> The big difference for me, is that I can select any combination or all of my AirPlay2 devices from my phone, but I can only select a single airplay (1) device and nothing else at the same time. (For me, that means my old AppleTV can be selected, but nothing else at the same time, but any combination of my three Airport Expresses can be selected.)

</comment></comment></comment></comment><comment><USER20> If you want to do the same for Chromecast it's not possible yet. Google seems to have locked down their API. There is some open-source projects that are trying to reverse engineer it but the problem seems to be linked to crypto keys used to authenticate real Chromecast devices: [https://github.com/thibauts/node- castv2/issues/2](https://github.com/thibauts/node-castv2/issues/2)

<comment><USER21> And Google do security pretty well, so it's unlikely the certs will be leaked or broken :( When the Chromecast first came out, the was an open source receiver called leapcast which reverse engineered the DIAL protocol that the YouTube app on many smart TVs of the day used, and the Chromecast protocol was based on. But alas it doesn't work anymore.

</comment></comment><comment><USER22> The Raspberry Pi has awful noisy audio out. There are some nice Amps you can get like the HiFi Berry. I set up a nice arrangement in my old lab with with these.

<comment><USER23> Another vote for the HiFiBerry. I've used their Digi+ board (which includes optical-out) with a Pi3B running Volumio for a couple years and it's been fantastic.

<comment><USER24> I'm using a generic HiFiBerry clone that I got for $18 with a pi3b running Volumio as well. I'm using a 240GB SSD in a USB enclosure as the drive, and a cron job that keeps it synced with my fileserver. Only snag was finding a power supply that could reliably provide enough power, I've settled on an Apple ipad charger I had laying around. It's been great for a few months now. Sound quality is very good.

<comment><USER7> Good power adapter options for the Pi is definitely one of my bigger complaints. Even determining a good one to get from Amazon is painful, considering how many cheap/knockoff options are out there.

If a company could get the kit price under $40-50, I would definitely use them for more one-off projects. Aside, I really wish that Docker for (Windows|Mac) ran as a service without requiring login so I could run background linux software with a little less friction. The linux on windows stuff is coming along, but similarly lacking initd/systemd startup. And while I know that a desktop os isn't a server, I've got a plenty powerful desktop that I have always on, and would just assume not have another computer running.

</comment></comment></comment></comment><comment><USER25> Been running Shairport Sync on a Pi3 for the last couple of years. It works great.

I've been adding more stuff to the Pi over time, so it's now a Plex server, Home Assistant hub, Torrent box, Pi-hole and more.

</comment><comment><USER26> I did the same thing a couple of weeks ago using a Raspberry Pi 3 B+. I have it connected to a Cambridge Audio stereo amplifier through USB, since the amplifier has an integrated DAC. I'm very pleased with it, and it was surprisingly easy to get working.

<comment><AUTHOR> Nice idea. My amp is Cambridge Audio but it sadly does not have a DAC. If it had, the setup would have been even simpler than it is.

</comment></comment><comment><USER27> Mike Brady has done a great job with this. The project also has a very detailed readme, far beyond what most provide. Thanks Mike for all your efforts.

I'm not sure this how-to article adds that much but I guess it's nice and simple looking.

</comment><comment><USER28> Did the opposite a few months ago, and used a Raspberry Pi Zero to AirPlay audio from my turntable to a HomePod. It was about as amazingly useless as one would imagine, but fun none the less.

<comment><AUTHOR> Wow, I'd love to see a write-up of that.

</comment></comment><comment><USER29> Pi MusicBox?

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

</comment><comment><USER30> If anyone is looking for multi room audio (like airplay 2), using raspberry pies, this is the best solution I've seen - it is really impressive:

[https://www.reddit.com/r/homebridge/comments/8v3qb0/shairpor...](https://www.reddit.com/r/homebridge/comments/8v3qb0/shairport_sync_and_airplay_2_any_hope/e686gk1/)

If people have other suggestions for multi room audio I'd love to see them.

<comment><USER31> Never discount the simplicity and reliability of a (legal) low power FM transmitter.

<comment><USER30> I attempted using an FM transmitter but I had 2 issues

1) I think my transmitter was a little noisy so that wasn't desirable.

2) I didn't have a nice FM receiver to test with, but didn't want to purchase one because I thought my transmitter was noisy. So a bit of a catch 22.

But FM would be great.

</comment></comment></comment><comment><USER32> It's overkill to use a Raspberry Pi for this.

I made a dozen Airport adapters with the TP-Link WR710N which was $25 at the time and connects to Wifi or ethernet. Add a USB soundcard ($10?) for powered speakers or a Topping USB amp ($75?) for unpowered speakers. Install OpenWRT, connect it to your network in client or bridge mode, install the built-in shairport-sync package, and go.

Not sure what has replaced the WR710N but I'm sure you can still do this just as cheaply.

<comment><AUTHOR> To be fair, a Pi Zero W costs less than £10, or the equivalent in dollars.

<comment><USER33> It does, sort of, but, if you want to do this seriously, as in, you want more than one unit (I wan't ~5 to add to the open-source home security camera software I'm writing), you can't buy more than one at a time unless you buy it with headers attached (which I don't want), leaving you the alternative of buying them individually and paying for delivery for each individual unit.

<comment><USER34> Micro Center has them for $5 for the first unit, $15 for units 2-5, and $20 each after that. Still less than ideal but not too bad.

<comment><USER33> Seems like a better deal than we get here in the UK.

These £9 Pi's rarely go for less than £12-14 and if you can get more than one, they won't be any cheaper.

</comment></comment></comment></comment></comment><comment><USER35> I love a good excuse to buy more RPis and have thought about doing something like this.

However, I already have a cheap bluetooth dongle that I plugged my stereo to via P2. Is there some advantage to this setup (beyond range)?

What I'm really considering is a web interface, with search, playlist etc and a huge SDcard with all my music connected to a RPi. Currently all my music is on my Mac and Apple Music Home Share is a bit flaky/slow at times.

<comment><USER36> Check out mopidy.

</comment></comment><comment><USER37> My take on this was :

1- Buy hardware (Raspberry + DAC + Amplifier)

2- Download and install Volumio (volumio.org) on SD card

3- Profit

<comment><USER38> What do you advise for a baseline DAC+Amplifier?

<comment><USER37> My setups are pretty cheap as I did not want to put much money in it.

As for DACs, I have a €24 Hifiberry DAC+ and an inexpensive raspberry compatible DAC out of Aliexpress (around €12) on my two different setups (kitchen and living room). Both work well and deliver good enough signal (I am not by anyway an "audiophile") I prefer the no-brand one from AE though as it has an IR receiver I am using to control media playing.

As for amplifiers, any stereo amplifier would work, so I choose a Lepai lp-2020a (€30 on amazon) in the kitchen. I have an old Marantz branded amplifier for the living room.

</comment></comment></comment><comment><USER39> Nice! I'm trying to do it the other way around, record player into Raspberry Pi, broadcast to my HomePod. Unfortunately the only way it works is to add a laptop in between. If anyone has managed to get an AirPlay broadcast from Linux I'd love to know how you did it!

<comment><USER40> Have a look on GitHub, there's quite a few projects. Pulseaudio can also stream over Airplay 1 and 2.

</comment></comment><comment><USER41> I bought a Google Chromecast Audio. Spotify, Soundcloud and Pocket Casts support it on iOS. I'm not actually sure what the officially Apple sanctioned way of getting audio to my speakers is, but I haven't felt the need to find out either.

<comment><USER30> I had one of those devices and it worked great but now I just don't want google knowing my listening habits so have gotten rid of it.

</comment></comment><comment><USER42> I use shairport-sync on my iMac to stream Overcast from the iPhone. There is a huge latency and the connection drops out every once in a while. This should have been a built in feature.

</comment><comment><USER7> While not an iOS user, it is definitely cool how many one off projects you can create using Raspberry Pi. I do wish some of the full kits (case, power adapter, micro sd) would come down in pricing slightly as it tends to bump up towards more powerful, but less supported (and more difficult) options when you consider the full system price.

<comment><USER43> Depending on the project, Raspberry Pi Zero W is often powerful enough. $5 on sale at Microcenter, $4 for the case.

</comment></comment><comment><USER44> This is a cool project, and I think it can be a good addition to an existing home media server.

For the use-case they describe however (wiring up an existing home stereo) it would probably be a lot easier and better supported to just buy an Airport Express.

You can still buy them online for ~100, and they support Airplay2 as well, which is much nicer for multi-room audio.

</comment><comment><USER45> It appears this is Airplay 1 only (please correct me if I'm wrong) so this will not be as nice as say, using an Airport Express but if you had this stuff laying around it might be worth it.

</comment><comment><USER46> For those using Spotify premium for listening to music there are some open source projects (like spotifyd) that replace the now deprecated spotify- connect.

</comment><comment><USER47> Does anyone have suggestions for the reverse? basically an analog input (turn table/cassette) that can be streamed over wifi as digital output

<comment><USER48> Not wifi, but you could get an aux to bluetooth adapter:

[https://www.amazon.com/GOgroove-BlueSENSE-Bluetooth- Transmit...](https://www.amazon.com/GOgroove-BlueSENSE-Bluetooth-Transmitter- Wireless/dp/B008GVETNE)

</comment></comment><comment><USER49> Should also mention this does not support video.

</comment><comment><USER50> These work too for $30 [https://www.amazon.com/dp/B01HFYZDNC/](https://www.amazon.com/dp/B01HFYZDNC/) but it might be a security threat to have them on your LAN, I have no idea what software they run.</comment>


The Opposite of a Bloom Filter - <AUTHOR> http://somethingsimilar.com/2012/05/21/the-opposite-of-a-bloom-filter/ <comment><USER2> Took me a few reads, but it's actually quite simple.

You want a structure that can tell you something has been seen, but sometimes forgets, but will never incorrectly tell you something has been seen.

Solution: an array. Hash the item to find its index, swap out what's there, and see if it is your item. If so, you know for sure it was previously placed. If not, then it might not have (it may have been forgotten).

      let arr = Array of key
      let contains_key key =
        let index = hash key % arr.length
        let prev_key = arr.swap[index, key]
        return prev_key = key

The hash algorithm is crucial. Reducing forgetfulness is as simple as making the array longer. And he points out that if you can compress the keys, you can reduce storage size.

<comment><USER3> So it's just a cache?

<comment><USER4> A lot of things turn out to be "just" caches.

Relatedly, the majority(?) of audio processing is just creative use of buffers.

<comment><USER5> Sure, but this is a rather simple cache. Hash into bucket, LRU per bucket, stores the entire object. Nothing like the magic of a bloom filter that represents an object with 3-5 bits.

</comment></comment></comment></comment><comment><USER6> Seems like a cache using _open addressing_ but no probing, just instant eviction on any initial collision.

So, could also consider adding probing to lessen destructive collisions (up to some chosen probing depth) while there are other unused slots, in still- constant average time. Or, any other choice-of-slots approach such as 'cuckoo hashing':

<http://en.wikipedia.org/wiki/Hash_table#Cuckoo_hashing>

Whether you'd want to pay that cost could depend on how soon you reach saturation within each reset period, after which 'every' insert results in an eviction. But if you were usually in one-for-one eviction mode, you might add a bit or more that hints 'age' or 'recent access' to probed items. Then each eviction could be biased towards an older/less-accessed value... taking more advantage of the clustering-in-time that was reported.

And once you add that aging bit you might not need discrete full-restart periods ("hourly") at all: just make a useful proportion of older entries eligible for eviction each interval, maintaining a steady-state of full-array, evictions-biased-towards-older-entries.

</comment><comment><USER7> This is useful. However, it is larger than a bloom filter, because a bloom filter needs one bit where this stores a value. I suspect that this asymmetry is unavoidable, but I can't prove it. Anyone?

<comment><USER8> These sorts of filters have limits to accuracy and usefulness (and a definite tradeoff between memory requirements and accuracy). You can take both to the extreme, while still maintaining the definition:

A structure that may report false positives, but no false negatives: A single bit set to 1

A structure that may report false negatives, but no false positives: A single bit set to 0

Obviously that's entirely useless, but I think it shows that you can't make any definitive proof of size requirements

<comment><USER7> I don't think that shows that you can't make any definitive proof of size requirements. All it shows is that you have to make a statement about the accuracy. For example, it might be possible to prove that for all accuracies, an optimal bloom filter with a particular accuracy will always be smaller than an optimal inverse bloom filter of the same accuracy.

<comment><USER8> Intuitively, I think that might be the case.

You have to define more specifically what you mean about accuracy here. Accuracy for the bloom filter would be probability of false positives. For the inverse it would be probability of false negatives.

For a bloom filter, if you're targeting a false probability f with n items, you want k = lg(1)/f hash functions, and m = 1.44 k*n bits.

That's the thing though. The bloom filter version scales up easily from the degenerate version (adding more bits increases accuracy). Unless I'm missing something, the inverse bloom filter doesn't scale up from the degenerate version in any natural way.

This will nag at me now. I'm going to need to give this some thought. If I come up with any proof on mem reqs. I'll let you know.

<comment><USER7> That would be interesting, thanks.

</comment></comment></comment></comment></comment><comment><USER9> I'm skeptical that "hashing is much faster on an array the size of a power of two".

Also, if memory is actually an issue, he should store hashes instead of full objects (assuming the byte arrays are more than 16 bytes).

<comment><USER10> It's fairly common to keep array sizes bounded at a power of two, because when you take a hash you can use bitwise shifting instead of a modulus to determine the hash bucket to use. Depending on the performance of your hash function it can have a noticeable impact, although you're right that it's probably not a matter of 'much' faster.

<comment><USER9> I bet that there's no measurable difference in this code. It just bugs me to see so much unnecessary complication based on blindly imitating an optimization that maybe made sense 20 years ago.

<comment><USER11> It was 10% faster to switch from modulo to & on a recent real world problem for me.

<comment><USER12> I believe you. There are two reasons I think paul's right in the context of hash tables.

1\. If you're using a non-trivial hash function, one more modulo calculation at the end to get the actual memory address is not a big difference.

2\. If you're using a trivial hash function, I bet for a lot of data sets you'll get fewer collisions with a hash table whose size is a prime number, canceling out any benefit from calculating the address slightly faster.

</comment></comment></comment></comment></comment><comment><USER13> This may be naive of me, but wouldn't it be better to leverage your language's existing tools? For instance, in Python you would use a dict...

      >>> my_dict = {}
      >>> my_dict[item] = True #Insert an item
      >>> try:
      ...    tmp = my_dict[item]
      ...    print "Found"
      ... except KeyError:
      ...    print "Not found"

I can't imagine a custom implementation would be more efficient, though there may be other reasons to roll your own.

<comment><USER14> The problem is your solution (as shown) will grow in memory forever.

You can add code to get around that (e.g. expiration times), but it also might be easier (and have less memory usage) to write your own dict class that overwrites values when a collision occurs.

Also, since the OP seems to be using java: if you can get away with storing a primitive data type in an array (e.g. array of int or long) you can save a lot of memory vs using a Set or Map.

</comment></comment><comment><USER15> Couldn't you build a composite data structure that internally makes use of both a bloom filter and one of these "opposite of a bloom filter" structures, and get the best of both worlds - no false positives and no false negatives?

<comment><USER16> There's no free lunch; anything that can track a set perfectly is going to end up taking as much space as just maintaining it in a more straightforward way.

In the case of your specific suggestion, though, the problem is this: what if the bloom filter says "I've seen it (but could be lying)", and the "opposite" filter says "I've never seen it (but could be lying)"? Then you still have no idea whether the object is in the set.

<comment><USER17> > There's no free lunch; anything that can track a set perfectly is going to > end up taking as much space as just maintaining it in a more straightforward > way.

Unless there are regularities in the data that you can exploit.

<comment><USER18> but this invalidates the idea of a general purpose algorithm

<comment><USER17> Yes; there is no compression function that will work for all data.

</comment></comment></comment></comment></comment><comment><USER19> Um, wouldn't just a cache of the last N (based on memory available) items (or their hashes, whatever) just do the job, and do it better than his solution (which removes elements randomly based on collisions, rather than just removing the oldest element in the cache when it gets full, a much better approach given the time locality he describes)?

The description in this article seems to add too much complexity ("the opposite of a bloom filter") for what really is just a simple cache (albeit, IMO, a relatively inefficient one for the problem he describes).

</comment><comment><USER20> I had pretty much exact problem. We keep index of row keys in Cassandra on time partitioned data (by hour), but do not want to re-insert the index each time there is a piece of data.

A ConcurrentLinkedHashMap (<http://code.google.com/p/concurrentlinkedhashmap/>) solved it easily. It does use more RAM though... but an insignificant amount on our heap.

<comment><USER21> This is almost exactly what our use case is. I slightly altered the implementation to be more GC friendly though: [http://squishtech.posterous.com/addendum-to-the-opposite- of-...](http://squishtech.posterous.com/addendum-to-the-opposite-of-a-bloom- filter)

</comment></comment><comment><USER22> I'd implement it exactly like bloom filter but instead bits I'd use 0,1,2 0 means never touched. 1 means I've seen it, 2 means I've seen it more than once.

True positive is when all places for given entry contain 1.

Adding is incrementing all places (if they have value less than 2).

Before putting new value in check if it's not already here. If it is don't add.

<comment><USER23> That's not going to work at all. If I have an object A that hashes to bits 1, 5, 17, 24; an object B that hashes to bits 1, 5, 13, 15; and an object C that hashes to bits 2, 9, 17, 24; and I add objects B and C, then the filter will incorrectly think A has already been seen.

<comment><USER22> You are right. I haven't properly thought that through.

</comment></comment></comment><comment><USER24> Another option, in case you know the bounds of the parameter space (eg all natural numbers under 1000) you can implement this with a counting bloom filter that has every possible element pre-inserted.

</comment><comment><USER25> How to give fancy names to a simple algorithm using a hash map. I use perl a lot and as a result, this kind of algorithm occurs always.

<comment><USER25> In fact, it is simpler than a hash. The provided code is not complete (the limit to 1 hour is missing). Here is a full functional solution to its problem:

      perl -MDigest::MD5 -nle '($id,@data)=split;$t=time;$j=unpack("L", Digest::MD5::md5($id))%100;print join(" ",$id,@data) if $t-$h{$j}>3600 or $hi{$j} ne $id;$h{$j}=$t;$hi{$j}=$id' input

</comment></comment><comment><USER26> False positives are possible but rare due to hash collisions. With a bloom filter, false negatives are impossible.

<comment><USER27> False positives are not possible in the structure discussed in the OP.

<comment><USER26> I re-read the article and I stand corrected. I had misread it as being just a store of the hash, but this stores the entire original object at the location identified by the hash of the object. And it needs to, because if even one byte is different out of a gigabyte of input data it must return false. That's horribly inefficient.

With a bloom filter, you can take gigabyte-sized video files and determine if they have never been seen by the bloom filter. And the size of the bloom filter is fixed; choose the size based on expected inputs, desired accuracy, and so on and it doesn't grow based on the size of the objects being processed. With this implementation, it stores not only the hash of the video but the entire byte array of the video at the hash location in order to not have a false positive.

So it's possible to have an opposite-of-a-bloom-filter with only 8 buckets, but it consumes terabytes of storage space because you're processing really massive files.

<comment><USER23> I'm pretty sure the structure was designed around relatively small objects. If you need to store large objects, then you can modify this structure to store the full un-masked hash instead of the object. Assuming no hash collisions (even with MD5 this should be a safe assumption if you're working with non- malicious data) the structure should behave identically.

<comment><USER28> I can imagine the head scratching over this design decision 500 years in the future when everyone is an AI that has bajillions of files. Or one really unlucky guy tomorrow.</comment></comment></comment></comment></comment>


St – simple terminal - <AUTHOR> http://st.suckless.org/ <comment><USER2> I like the idea of cleaning up legacy cruft. I'm not crazy about the way this project is going about it. My main issues:

* ignoring C best practices:

        /* prefix macros, please */
        #define MIN(a, b)  ((a) < (b) ? (a) : (b))

* barely any comments

        /* ME: ...so it parses a string? Doesn't pretty
         * much every parser? Also, no prefix again. */
        void
        strparse(void) {

* Lack of overall project structure. Maybe some comments here would clear things up, but even some groupings like this would be nice:

        /*************************
         * X11 CALLBACKS GO HERE
         *************************/

* No tests. I think reasonable people can disagree about how testing should happen, but I'm a hard sell if you tell me your code needs absolutely no automated testing. If a new dev wants to commit a patch, how does she know her code works?

* Here's a scenario broached by the README:

        One  goal  of  st is to only support what is really
        needed. When you encounter a sequence which you
        really need, implement it.

...my problem is that there are no instructions here nor comments in the code about how start doing that ('see commit X in the repo' would even work). Again, I would hope that a dev-oriented tool like this (editing config.mk is in the installation instructions) would be a bit more friendly to developers who are stepping into the project for the first time.

My concern is that the code might suck less than xterm (I'm not familiar with that code-base), but I'm not sure "less cruft" is a good enough reason for me to want to get involved with (or even use) a project. Of course, I'm willing for the people of suckless.org to prove me wrong in my assessment.

<comment><USER3> strparse makes sense if you read the code linearly, since they also have csiparse, and deal with STREscape and CSIEscape, respectively. If you did need to add an escape sequence, it would take less than a minute to find where to add it.

While I wouldn't call it a paragon of clarity, it basically follows the same style and organization as older Unix tools. In such cases, I find starting from main() and jumping around with ctags a useful strategy (after reading the globals and type definitions).

Oh, and I strongly agree about tests. Especially escape sequence parsing could benefit from fuzzing or other property-based testing approaches.

<comment><USER2>
      ...it basically follows the same style and organization
      as older Unix tools. In such cases, I find starting from
      main() and jumping around with ctags a useful strategy
     (after reading the globals and type definitions).

Oh, I know it's the same style and organization as older Unix tools. And it's the same style and organization as large one-off perl scripts. It would be a shame to replace old cruft with new stuff that doesn't the leverage lessons learned in software engineering over the last 40 years or so.

</comment></comment></comment><comment><USER4> > xterm is bloated and unmaintainable (...) It has over 65K lines of code and > emulates obscure and obsolete terminals you will never need.

The way these things are usually implemented is that there is an interface of a "terminal" and implementations. As long as implementations do not break the abstraction and do not require modifications in the interface and other parts of code these implementations do not decrease internal software quality. They only cause bloatedness in terms of size of source code files which doesn't matter much.

I read something similar on Neovim's site, that they removed support of obsoleted architectures. And as an opposing example it seems that Linux kernel ships with drivers for very old devices and doesn't have plans for removing them.

Note that I don't know if in xterm's or vim's case implementations for obsolete subsystems cause real damage or only increase code size.

And when I was choosing a terminal implementation, I mostly benchmarked scrolling performance and looked at font rendering quality and xterm won. It is also actively maintained outside of Xorg [0].

[0] [http://invisible-island.net/xterm/xterm.log.html](http://invisible- island.net/xterm/xterm.log.html)

<comment><USER5> > Linux kernel ships with drivers for very old devices and doesn't have plans > for removing them.

I think as long as there is someone to maintain that driver, it doesn't get removed.

<comment><USER4> But if removing them would simplify other parts of code, I think they would do it, like they did for i386 recently.

<comment><USER6> Indeed, they do remove truly unused architectures and drivers from the kernel -- support for IBM MicroChannel is gone, as well as support for "it was uncommon back then" hardware. I have a bunch of Allied Telesis ISA 10baseFL Ethernet cards that were recently removed.

</comment></comment></comment></comment><comment><USER7> I like suckless. I use some of their tools within my Awesome(WM) sessions.

However, I don't see the point of St. There are dozens of other graphical terminal emulators that were created with the exact same goal: "Xterm's codebase sucks, we can do better".

FWIW, I've (currently[1]) settled on ROXTerm, which (on Debian and Ubuntu) comes in GTK2 and GTK3 variants. I use Tmux within it. It does FreeType and FontConfig fonts well, which I care strongly about. Its colour scheme is configurable and it's not tied to a desktop environment. It does use libvte from Gnome to implement the terminal emulator widget, and I'm OK with that. Less NIH please!

[1] After using Gnome-Terminal, Konsole, and RXVT-Unicode for a while. I doubt my quest has yet ended.

<comment><USER8> I've been using a few - in the end I landed on sakura: [http://www.pleyades.net/david/projects/sakura](http://www.pleyades.net/david/projects/sakura)

I don't quite remember why I ended up moving from urxvt to sakura (and not eg: roxterm) -- but I think it was a combination of it being light (enough), easy to set up without any kind of window decorations, as well as a sane way to pick and choose fonts. With the current gtk ~/.conf-scheme it has a nice ini- like config file, and I can easily have different font preferences on my laptop, my netbook and my desktop (all different screen sizes _and_ different PPI).

FFW I use a spartan xmonad setup, and typically run one, or a handful of terminal windows, each with their own gnu screen instance (typically one local, and a few remote screen instances over ssh. Sometimes I'll have more than one view/windows to one screen session -- and sometimes I might have a screen for a chroot or local vm/container of some sort).

<comment><USER9> Thanks for letting me know about sakura, I think it's the first one to actually match the rendering speed of xterm.

I do have one question though, why are the colors more pale in sakura than in xterm?

And is there any way to change it?

<comment><USER10> I have no idea about sakura, but being a libvte-based terminal, I highly doubt it's comparable (or even _approaches_ ) xterm in term of rendering speed.

I'm wondering how people can compare these terminals mentioning _speed_ , considering the actual performance is bound by libvte, and thus will be equally the same between roxterm, sakura, tilda, etc. _What_ are they measuring?

xterm is quite fast (in the order of 3-5x faster) than any libvte-based terminal. Try doing something like "time [term] -c 'cat <bigfile>'", and try varying the scrollback size to have a real measure.

[u]rxvt in turn is even faster, especially with large scrollback buffers, which is the main (I could say only, really) reason I use it. As in, 10x faster than any libvte based terminal.

I also use suckless tools (with spectrwm), though I never had a reason to investigate st. urxvt supports fallback fonts, which for UTF-8 text is essential.

<comment><USER9> > I'm wondering how people can compare these terminals mentioning speed, > considering the actual performance is bound by libvte, and thus will be > equally the same between roxterm, sakura, tilda, etc. What are they > measuring?

Not sure about others, but the first thing I test: dmesg; ps auxww; ls /dev

I only really care about apparent speed and, like I said, sakura was the only one that was comparable to xterm.

None of the other terminals I have tried (and only now I realize that they have libvte in common, thanks for that) have managed to perform acceptably (for me, at least).

</comment></comment></comment></comment></comment><comment><USER11> > xterm is bloated and unmaintainable. [...] It has over 65K lines of code and > emulates obscure and obsolete terminals you will never need. The popular > alternative, rxvt has only 32K lines of code. This is just too much for > something as simple as a terminal emulator; it's yet another example of code > complexity.

Ok, I am interested.

> How do I scroll back up?

> \- Using a terminal multiplexer [shows tmux example]

Emm... tmux is a 32K lines of code. That kind of defeats the purpose of the opening paragraph.

<comment><USER12> I heard dtach + dvtm were smaller, but I'm not sure.

<comment><USER13> Nice, not seen dvtm before. Since I've not seen it mentioned in other multiplexer comparisons I was assuming it's not in major repos yet, but an optimistic "nix-env -i dvtm" has installed it!

<comment><USER12> nix really does make people optimistic

</comment></comment></comment></comment><comment><USER14> I personally love Terminology: [https://www.enlightenment.org/p.php?p=about/terminology](https://www.enlightenment.org/p.php?p=about/terminology)

It's modern, incredibly fast (could even be GPU-accelerated), fancy (if you want it to) and stable.

See previous discussion: [https://news.ycombinator.com/item?id=5438089](https://news.ycombinator.com/item?id=5438089)

</comment><comment><USER15> My friend tried committing code and getting involved, but they seem to be a tight-knit group of friends. It's hard for outsiders to do anything.

<comment><USER16> This may be true but it's also one of their goals not to really add new features. st and dwm both have some "3rd party" patches for some features that some people might want.

I'm not sure whether that's the right thing to do but it's the way they work.

<comment><USER17> I've used St and have written some patches myself to add minor features I wanted. I get the impression that they intend it to be a small core for people to add features themselves if they want. They implemented the core features that people can all agree on, then leave it as an exercise to the reader to add other stuff. Dwb follows a similar approach, I think.

That said, I moved on to ROXterm because I was having encoding issues with a couple of programs I use. St is worth consideration as an uber-minimalist terminal though... it's very fast. Even on ancient hardware it launches essentially instantly because it's not loading any large libraries like GTK. St is pretty fun to hack on, too.

</comment></comment></comment><comment><USER18> Every software is a product, even if it is OSS and no money exchange is involved at all. There is a designer, and a final user. The idea of this product is that terminals don't need to scroll up into the past history, actually doing this well is one of the most critical aspects of a terminal as a good product for end users: retain history, do it reasonably when programs controlling the cursors are executed, don't get super slow if there is a lot of history already in memory, and so forth.

<comment><USER13> > actually [scrolling up] well is one of the most critical aspects of a > terminal as a good product for end users

You've clearly misunderstood the point st is trying to make. Not only is it not critical, it's a _bad idea_ for a terminal to store and scroll history! Yes it's nice to have a history to scroll through, but _other programs_ (screen, tmux, Emacs, etc.) are much better at doing that than terminal emulators are!

For many people, like sysadmins, it's _crucial_ that shells can be accessed over a network. Does that mean terminal emulators should build networking into their code? No, since SSH already does an excellent job.

For many disabled people, it's _crucial_ that shells can be speech-driven. Does that mean terminal emulators should build speech recognition into their code? No, since external systems (Sphinx, etc.) are already tackling this problem.

Of course, from an "end user" perspective it would be nice to have "one application" which does all this. The beauty of the UNIX philosphy is that we can write such an application easily (untested, but you get the idea):

        #!/bin/sh
        if zenity --entry \
        --title="New Terminal" \
        --text="Enter the shell URL (blank for local shell)" \
          then st -e "tmux -c ssh '$?'"
          else st -e "tmux"
        fi

<comment><USER18> That's why I addressed it in the POV of a product. It's basically subjective. IMHO the "terminal product" should have history handling included.

<comment><USER13> If you're thinking about a "terminal product" then why single out st's lack of history at all? That would be like claiming Excel lacks presentation capabilities. Whilst it's a true statement, presentation facilities are irrelevant to a spreadsheet; they're available in the PowerPoint component of the Microsoft Office suite, and they're designed to work together, so it's a complete non-issue.

</comment></comment></comment></comment><comment><USER19> The best terminal emulator I've used is termite[1]. It has vim-like keybindings and normal/insert mode, plus a bunch of other features worth looking at. If you are using xterm, urxvt, or something similar, I would highly suggest giving it a try.

[1] [https://github.com/thestinger/termite](https://github.com/thestinger/termite)

<comment><USER17> Termite is lovely. If you like it, you might also want to look at ROXTerm.

<comment><USER19> I'm a tmux user, so the menus and tabs are not really useful for me :). And the command mode in termite is vim oriented, so it's quite nice. I'm not sure how ROXTerm does it. To be honest, as long as a terminal supports vte (for fontconfig), it's already a huge improvement over xterm and urxvt.

<comment><USER17> I'm a tmux user as well. I actually turn off all of the menus and make it pretty slimmed down. I stopped using Termite originally because colors were acting funky.

<comment><USER19> Interesting. Have you tried it lately? I've never had any problems in the past few months. If you are happy with whatever you are using now, then there is no need to change :).

</comment></comment></comment></comment></comment><comment><USER20> I feel stupid. I opened up the comments and then thought to myself "Hey, I remember reading a confession from the xterm developers themselves about how terribly bloated xterm is, I should go and find it again". After 5 minutes of searching I finally found it... Only it was on the suckless page for st.

</comment><comment><USER21> suckless sounds quite like a good name. I'm currently also working on some terminal style I/O and I can totally understand why there are programs with >30k lines of code just for being a terminal emulator. terminal communication is not really standardized. It has grown since a time where "computer" meant a person who calculates things. So I'm not sure it St could arrive at a stable state without also having a few thousands lines more than it would like to have.

But what is wrong with Gnome-Terminal? For me it works well enough out of the box. I literally didn't do anything beside increasing the scroll buffer and haven't run into enough troubles yet to switch.

<comment><USER13> > But what is wrong with Gnome-Terminal?

The dependencies: [https://github.com/NixOS/nixpkgs/blob/master/pkgs/desktops/g...](https://github.com/NixOS/nixpkgs/blob/master/pkgs/desktops/gnome-3/3.12/core/gnome- terminal/default.nix)

If you're using Gnome, you probably have those already so it's no big deal. The same goes for Konsole in KDE: [https://github.com/NixOS/nixpkgs/blob/master/pkgs/desktops/k...](https://github.com/NixOS/nixpkgs/blob/master/pkgs/desktops/kde-4.14/applications/konsole.nix)

If not, pulling in a few hundred MB of dependencies for a terminal emulator seems distasteful. st is much more self-contained: [https://github.com/NixOS/nixpkgs/blob/master/pkgs/applicatio...](https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/misc/st/default.nix)

That's why st is usually compared to xterm; they're small, basic and desktop- agnostic.

<comment><USER21> That's good to know. Without Gnome(3) Gnome-Terminal might not be the right choice.

</comment></comment></comment><comment><USER22> I actually use xterm's tek4014 emulation for plots, I can keep them going off to the side at 15Hz just drawing over the top of each other until I change something in the main text window, then I erase and repeat. I tried to do similar with gnuplot but I could never figure-out how to keep updating continuously like that, so that's why.

</comment><comment><USER23> I use Konsole and yaquake always. Tabs, colors, profiles (I just have one for neovim), nice font rendering, split windows, copy&paste from clipboard...

Apart, Windows needs a good terminal. Console2 and ConEmu, not end to work fine... I get strange issues with colors every time that I connect to ssh against a GNU/Linux machine and open vim.

<comment><USER24> ConEmu works fine with colors. Your ssh client does not...

<comment><USER23> Yeah, I just learned that I should use ConEmu + Putty. At least now, I don't get weird colors and a grey background filling all when I open vim. But I keep missing having something like Yakuake or Konsole.

<comment><USER25> I use Mintty, the terminal which comes with Cygwin, and it works great both on Windows and while ssh'ed into Unix boxes.

Windows + Vim: [https://i.imgur.com/soTIhNy.png](https://i.imgur.com/soTIhNy.png)

SSH + Vim: [https://i.imgur.com/aLs9ACy.png](https://i.imgur.com/aLs9ACy.png)

</comment></comment></comment></comment><comment><USER26> > Some random program complains that st is unknown/not > recognised/unsupported/whatever!

I really wish there was a better way to deal with this (I have the same problem with rxvt-unicode-256color). I'm obviously not going to make install a graphical terminal emulator on some random server I'm logging into.

<comment><USER27>
        tic -s st.info

or setting your TERM variable should help.

<comment><USER26> I meant the distribution problem of getting the file to the server. I grant that it's a petty annoyance, but it is still an annoying thing. And logging into a new server always carries with it the question of whether it's worth fixing it permanently when you barely use it.

For the machines I regularly use I have terminfo files in my dotfiles git repo.

</comment></comment></comment><comment><USER28> How does copy and paste work with tmux in st? I guess it can't be marking with the mouse, for I can't imagine that tmux scrolls when I move the mouse downwards out of the window.

</comment><comment><USER29> My benchmark test for a terminal:

If it takes more time for the graphical terminal to give me a usable prompt than alt+Fx then that particular terminal failed.

</comment><comment><USER30> To save others some time, they use X descriptors for font specifiers, like the following.

      st -f DejaVuSansMono-12

</comment><comment><USER31> Seems nice, however I do like the idea of a GTK2 based and tabbed terminal. Sadly, a lot of them feel very bloated.

<comment><USER16> st uses the Xembed protocol so you can use tabs with it using the "tabbed" utility from the same site (ie. you can embed many st instances into tabbed).

Or just use tmux for "tabs", you'll need something like that anyway for scrollback, etc.</comment></comment>


In Changing China, Being 'Suicided' or 'Harmonized' - <AUTHOR> http://www.npr.org/templates/story/story.php?storyId=124913011

<comment><USER2> I had a hard time understanding this article, but it was really due to translation issues, and my own lack of understanding about grammar.

I had to read up on the English concept of active- versus passive-voice. For example:

      The cat ate the mouse.

is active, because the cat is the subject of the sentence, and is doing the eating.

      The mouse was eaten by the cat

is passive, because the mouse is the subject, but is "having something done to it", i.e., passive.

So in the case of "He was disappeared", the point is that you are implying that he did not make himself disappear, but that it was done to them.

However, in Chinese, the language is so flexible that there are many far more common ways to express the same concept. So when someone specifically uses the passive voice in this way, while it is grammatically correct (or at least, is a grammatical invention that follows existing rules), it is obvious to other Chinese-speakers that it's an unusual way to say something.

The examples given start making more sense when you forget about the fact that "suicided" isn't a real word. It's not supposed to be a real word, instead it is meany to be a translation into English that preserves the 'strangeness' of the phrase.

In the case of the Chinese, use of the passive voice in this way is kind of like a shibboleth in that someone who agrees with your politics will know what you really mean, but you still have plausible deniability for those that don't.

<comment><USER3> I see the comments in this thread (several of them) are going off on the issue of the author's description of the 被 construction as "passive voice." It really isn't. The author was writing for an English-speaking audience and tried to make an analogy to something familiar to English speakers. But the Chinese language actually doesn't have the category of voice in its verbal system at all, and the 被 construction is better described as an "adversative" construction. I learned this from the authoritative Chinese grammar textbook by the late Chinese linguist Y. R. Chao while an undergraduate student of Chinese.

In Chinese in the most recent century, mistranslation of Western writings with passive voice constructions by the 被 construction (whether or not the Western passive constructions have an adversative meaning) tempts a lot of casual observers to suppose that today's Chinese uses 被 simply as a marker of passive voice. But I have many times tried out, as part of personal linguistic fieldwork, newly composed sentences that use 被 as a straight-up translation of normally grammatical sentences in English, and the Chinese sentences are regarded as ungrammatical unless the 被 construction can plausibly be construed as adversative.

(I just Googled for a good Web reference about this, but didn't find one quite to my satisfaction.)

<comment><USER4> Yeah, it's pretty messy. 被 is usually but not always adverse. And while 被 is the most common, there are at least half a dozen possible passive markers such as 讓,弄,給,叫,據說, etc... The topic comment construction of Chinese further complicates things, since it's very common for passive constructions to lack any passive marker at all.

For example:

The article has been finished. 文章寫好了.

The meeting has been postponed until Monday. 會議延到星期一舉行.

</comment></comment></comment><comment><USER5> Catch 22's protagonist, Yossarian exclaims incredulously at one point:

 _It doesn't make sense. It isn't even good grammar. What the hell does it mean to disappear somebody?_

</comment><comment><USER6> My favorite line in the history of totalitarian repression was from one of the Eastern European states. I can't remember the specifics, but it goes something like this: $DISSIDENT committed suicide by shooting himself in the back of the head eight times, pausing to reload, and then finishing the job.

</comment><comment><USER7> \--"is constantly coining and importing new terms to describe new ideas and things"

This point is almost missed, Latin and latter English are the previous languages where this happened. Most of the time other languages adopted and sometime slightly localized the Latin or English word or expression. Being the language that ideas are expressed in is a powerful statement in the ownership of thought. With China's ascension, I am sure that new technology conceive of in China will bare their trademark on thought.

</comment><comment><USER8> The use of the passive voice in this respect is not unique to China. For example, "dehoused" was a WWII Allied term to describe Germans whose homes were destroyed by Allied bombs.

</comment><comment><USER9> or 'River Crabbed'

<http://meiguozi.blogspot.com/2009/03/harmonious-crab.html>

<comment><USER10> My favorite Chinese word of the day. :D

<http://www.youtube.com/watch?v=rZRYd78vMT0>

</comment></comment><comment><USER11> It's hard to be original in a planet with 6 billion people; this is done quite often in Brazilian Portuguese. Since when, I know not.

</comment><comment><USER12> How about being "Baptized into Totalitarianism?"

</comment><comment><USER13> Conspicuous passivization: even better than a SarcMark, with no licensing fees required!</comment>


Installing Apple CarPlay and Taking It for a Spin - <AUTHOR> http://www.consumerreports.org/cro/news/2014/10/installing-apple-carplay-on-pioneer-stereo-and-taking-it-for-spin/index.htm <comment><USER2> With all the core functions being driven from the iphone, how can pioneer justify such high price (~$1000) for essentially a screen and bunch of adapters to the car's systems. ?

<comment><USER3> CarPlay is one feature of the Pioneer receivers. The units are still fully functional navigation / stereo systems even without an iPhone.

<comment><USER2> Agree. But its seems those features will not be used as much. This highlights a market opportunity for a simple CarPlay-only client that is significantly cheaper.

<comment><USER4> Probably, but since it is the one of the first to market, if not the first, it's not unusual for it to cost more than what is really reasonable for most people.

</comment></comment></comment></comment><comment><USER5> Whoah, I had no idea that CarPlay was software. Does that mean it can be loaded onto any after market system with the right specs? How would they deal with the different hardware targets if that's the case?

Edit: On second thought, it looks like they're partnering with manufacturers so is Apple also providing their own version of the HW as well?

<comment><USER6> Right now there's 2 options.

Either the manufacturers load it onto the car when its built or you can buy the standalone system itself. Apple has partnered with car manufacturers like Honda, Ford and Kia and select models will likely come with it.

Pioneer recently came out with their own standalone system with CarPlay which you could install yourself.

It would be interesting to see if they give you the options of choosing what system you want when you initially purchase your car. CarPlay vs AndroidAuto vs Other ones.

<comment><USER7> For Ford that would be a very smart move, as the current Ford dash UI's are usually trashed for bad design in every review. I don't see Ford mentioned but its logo is among those shown at the bottom of the carplay page ([https://www.apple.com/ios/carplay/](https://www.apple.com/ios/carplay/)).

</comment></comment></comment><comment><USER8> The slow speed of the display would be very distracting, I think. If you watch the video closely, you can see that he pauses for 500ms whenever he touches an on-screen button. This seems like it would be annoying in the long run.

<comment><USER9> This is hopefully a manufacturer specific problem.

<comment><USER10> Might not be. If there's a whole round-trip from touchscreen to comm link to iphone back to comm back to screen (including anything that needs to be drawn), that's not out of the question.

</comment></comment></comment><comment><USER11> I'm very excited very this. Car makers are terrible at doing software and it seems to be getting worse as touch screens become the norm.</comment>


Finding Your First Customer - <AUTHOR> https://medium.com/the-fifty-blog/finding-your-first-customer-cda5bcd1ee2 <comment><USER2> In the EU, you can't just randomly email potentional customers because of GDPR :/</comment>


Jesus and Kitch: The Rise of the American Megachurch - <AUTHOR> https://www.messynessychic.com/2019/11/26/jesus-and-kitsch-the-rise-of-the-american-megachurc <comment><USER2> Crystal Cathedral _was_ a megachurch; by the article's own definition it is no longer a megachurch since it was acquired some time ago (10 years?) by the Roman Catholic Church. Also, it is in Orange County, California, not Texas.</comment>


Clocks Make Workers Less Creative and Less Happy - <AUTHOR> http://www.theatlantic.com/business/archive/2014/10/clocks-make-workers-less-creative/381064/

<comment><AUTHOR> It's the same concept as maker time vs. manager time, just expressed differently.

This is especially interesting:

>Task timers are happier and more creative, but less productive. They tend to savor the moment when something good is happening, and seize opportunities that come up.</comment>


Death - <AUTHOR> http://kuppandharma.blogspot.com/2007/11/death.html

<comment><USER2> Why post this here?

<comment><USER3> To make more clear the need for a submission-downvote button.</comment></comment>


Facebook Has Quietly Implemented A De-Facto Follow Feature - <AUTHOR> http://techcrunch.com/2010/09/20/facebook-not-now-follow/ <comment><USER2> The privacy angle looks like a non-issue to me. Your public items get added to their news feed. They could view that information even if they didn't issue a friend request.

<comment><USER3> Agreed. I suspect people have their newsfeeds set to "friends only", in which case the "de-facto follow feature" shouldn't work unless the friend request is accepted.

<comment><USER4> You can also have private accounts on Twitter, so make what you want of the analogy.

</comment></comment></comment><comment><USER5> My distaste for Facebook grows deeper every time they do this crap.

<comment><USER6> I don't see any actual problem with those exact changes — well, actually, I don't get all that "oh noes, information I've specifically made _public_ , is being read by others! my privacy is being violated!1" thing.

I believe when one publishes something as visible for everyone he must assume that _everyone and his mom_ will read that. Being "public but private" is logical nonsense, possible just because most of time nobody cares about your data.

The _real crap_ they do is when some part of data I've made private becomes publicily visible. I remember about Perl's excellent "taint mode" each time they do this. Or when there's a new hard-to-notice opt-out feature which may expose something I didn't explicitly wanted to show.

What they really added this time is a somehow useful ability to completely "not notice" someone's request. Or I'm wrong?

<comment><USER7> I think what your argument centers on is when you say " _must assume_ " it will be viewable by everyone. The way I see it, Facebook started as a _private_ communication channel: only my friends can see what I write. Over time this has evolved into a very public channel but users are not aware about the changes.

To me, this is a bait and switch move much like Scribd's switch to a paywall. See this discussion from yesterday <http://news.ycombinator.com/item?id=1709308> , particularly this thread about why such a switch is perceived as a betrayal of trust by users <http://news.ycombinator.com/item?id=1709593> .

<comment><USER8> > The way I see it, Facebook started as a private communication channel ... > [and] has evolved into a very public channel...

Sorry to snip up your comment like that, but I did it to make a point that agrees with you - I think you gotta assume everything on Facebook these days is potentially accessible to anyone looking closely into you, and treat it as such. The problem isn't so much that Facebook is now a public medium, it's that some people aren't treating it that way.

<comment><USER7> Absolutely agree. What irks me, and I think others, is that people are still using it privately and that's because Facebook is switching defaults, hiding them behind confusing settings, and not talking about them. That's very wrong in my book.

</comment></comment></comment></comment></comment><comment><USER9> He makes a great point at the end about beefing up the network effect and he is right. This is just another way to pump more noise into peoples' feeds.

</comment><comment><USER7> Today Facebook is really asking for bad press about its default user settings. This just made it to the BBC: <http://news.ycombinator.com/item?id=1711973>

<comment><USER10> why not link directly to the BBC?

[http://www.bbc.co.uk/news/uk-england-beds-bucks- herts-113763...](http://www.bbc.co.uk/news/uk-england-beds-bucks- herts-11376350)

<comment><USER7> Because I thought it was a relevant (if still nascent) discussion here on HN.

</comment></comment></comment><comment><USER4> And the stalkers rejoiced.</comment>


A cultural history of the ponytail - <AUTHOR> https://www.bbc.co.uk/bbcthree/article/361f113b-7edd-4589-8d2f-f1292537e1ba <comment><USER2> There is such a thing as PonyTail Equation. Even won an Ignoble Prize.

[..]The Rapunzel number is a ratio used in this equation to calculate the effects of gravity on hair relative to its length. This number determines whether a ponytail looks like a fan or whether it arcs over and becomes nearly vertical at the bottom. A short ponytail of springy hair with a low Rapunzel number, fans outward. A long ponytail with a high Rapunzel number, hangs down, as the pull of gravity overwhelms the springiness.[..]</comment>


Oculus's services are always on and you should be concerned - <AUTHOR> https://www.reddit.com/r/oculus/comments/4crsmo/oculuss_services_are_always_on_and_you_should_be/ <comment><USER2> I'm as much of a Facebook hater as the next disillusioned cyberpunk but I do want to pause for a second here. Buried somewhere in that thread are some tech details, which seem less troubling:

[https://www.reddit.com/r/oculus/comments/4crsmo/oculuss_serv...](https://www.reddit.com/r/oculus/comments/4crsmo/oculuss_services_are_always_on_and_you_should_be/)

Seems like it's trying to connect to Facebook's regular presence servers at their edge POPs.

Not pleasant, but so far we aren't sure they are transmitting any information of note.

In other words, this is no worse than, say, Facebook Messenger's permissions or behaviors, at least from what we know at this point. Worth further study.

</comment><comment><USER3> Wow, so they're saying Facebook can sell non-anonymized data about your computer usage to third parties. If this is actually true, that'd be a lot scarier than any Google or Microsoft policy.</comment>


Tinder robot reveals men are not as terrible as you might think - <AUTHOR> https://medium.com/@karenxcheng/tinder-robot-reveals-men-are-not-as-terrible-as-you-might-think-8b32cac88bd9

<comment> jack-r-abbit Interesting. I'm curious if any of them would become hostile after being actively rejected (rather than just passively ignored).</comment>


Ask HN: How would you improve this (C) code? - <AUTHOR> I've been working on some C code to do video encoding for a while, and I'm curious as to how I might improve it.
I'd be interested to hear what you all think of my Huffman coding implementation, and what I could do to make it better: https://github.com/julian-goldsmith/uChat/blob/master/huffman.c
I'd also welcome any comments on the rest of the code, particularly lzw.c.  (The rest is available at https://github.com/julian-goldsmith/uChat .) <comment><USER2> There seem to be edge case bugs when the data is empty or consists of only one character repeated ("aaaaaaa..."). I haven't run the code though. A good way to avoid making such bugs is to write more unit tests, because then your mind goes into a state where it actively looks for corner cases. The end result is more robust code all around.

Other small things you might want to consider is being more consistent with the types. E.g you are using int and unsigned int in places where size_t probably would be better. Using unsigned short for the frequencies array will cause bugs on specially crafted input data.

I think you also should consider what your goal is. If it is speed, then you would develop your code on way, if it is memory efficiency another and, if it is readability of the source code a third.

</comment><comment><USER3> Encoding can be greatly speed up by constructing an array of the codes for each symbol (left justified) plus the code length. During encode you look up the code for the current symbol, shift it to align with the current output bit position, bitwise or it into the output stream and adjust your output position according to the code length. Similarly an array of the codes can be used to decode quickly as well using a binary search. Avoid using tree traversal when encoding and decoding to greatly increase performance.

Also, Huffman is fast becoming obsolete with the introduction of ANS.

<comment><AUTHOR> Thank you, this is exactly the sort of feedback I was looking for.

And that's a nice find on the ANS. I hadn't heard of that before, but will have to look into it.

<comment><USER3> I'll push a high permormance Huffman to github for reference later on today and post a link here.

For ANS info start with this link that leads to a thread by its creator:

[https://encode.ru/threads/2078-List-of-Asymmetric-Numeral- Sy...](https://encode.ru/threads/2078-List-of-Asymmetric-Numeral-Systems- implementations)

</comment></comment></comment><comment><USER4> Run it through PVS-Studio or some other static analysis tool</comment>


Scientists tell us their favourite jokes - <AUTHOR> http://www.theguardian.com/science/2013/dec/29/scientists-favourite-jokes

<comment><USER2> So its true; scientists have underdeveloped senses of humor.</comment>