New research: cashiers who have their own lines move customers more quickly - <AUTHOR> http://www.scientificamerican.com/article/the-science-of-getting-through-a-checkout-line-faster/ <comment><USER2> Reading the paper ([http://whitman.syr.edu/faculty-and- research/research/pdfs/BQ...](http://whitman.syr.edu/faculty-and- research/research/pdfs/BQ_Rev2_MS_May5.pdf)), it looks like each customer took the same amount of work to "check out" (moving five sliders to the correct position). The whole reason to divide a single line across multiple cashiers is to keep one slow customer from slowing down an entire line, so it's weird they didn't model this in the experiment itself.

<comment><USER3> Yeah, and also one of the keys gains is a lower deviation, which is a benefit separate from faster average times.

</comment></comment><comment><USER4> This article fails to recognize the difference between throughput and latency. A single queue optimizes for latency, since slow customers don't stall the ones behind them. If cashiers work faster in a multiple queue setup, then this configuration will optimize for throughput while still losing at latency.

As a customer, all you care about is latency: How long you spend waiting in line. As a store owner, you also care about throughput: How many cashiers you need to process some number of customers per unit time. A store owner that cares about customer satisfaction will still care about latency, of course.

<comment><USER5> Higher throughput necessarily means lower average latency. Little's Law. What the single queue helps with is reducing the variance of latency. That, and it makes handling more involved interactions easier to do without inconveniencing people waiting behind them.

<comment><USER6> Higher throughput does not imply lower average latency. Think pipelining with lots of parallelism. Think of a system that makes everyone wait for ten minutes then sends them to one of a million cashiers. Such a system would have enormous throughput with very high latency.

Little's law doesn't imply what you said, either. It tells us the number of people in the system based on arrival and wait, but nothing about throughput.

<comment><USER5> If the number of people in the system remains constant over time, then you can measure throughput by counting the rate at which people either arrive or get processed.

And you're right about throughput, I was implicitly holding the number of people in the queue constant, and you can obviously add arbitrary delays and increase the number of people in queue without touching throughput.

</comment></comment></comment></comment><comment><USER7> My thoughts on this:

Mathematically a single queue is far more efficient.

The psychology suggests that someone seeing a line makes them work faster.

First off, this is fleeting -- in a just a few years, we won't need people at the registers anymore as RFID technology gets cheap and more people become comfortable with the ever improving self checkout.

Secondly, even if you assume we will have checkers for a long time, this is again an easy problem to solve. You have a single queue, and then you make part of their pay based on average time per client or their evaluation. They'll work faster because of it (maybe).

A counterpoint to my own point is that Target does rate their checkers on efficiency, and I've watched them game it before. The checker meticulously lined up all my items with the barcodes in a row, then hit the "new customer" button, quickly scanned all the codes and hit the "total" button, giving him a very fast time. He figured out that they only measure from when he says "new customer" to total, so even though he was slower than everyone else, he had the fastest time.

But my overall point is that humans will soon be out of this loop anyway.

<comment><USER8> > Mathematically a single queue is far more efficient.

No. In the absence of behavioral effects such as the ones suggested here, the reason to have a single queue is not to reduce the _mean_ time for a customer to check out, but to reduce the _variance_. With one queue per cashier, if you happen to get behind the person paying entirely with pennies, you're screwed. With a single queue, the additional latency introduced by such a customer will be distributed among all the customers who aren't being served yet, rather than just the few people behind them in the same queue.

<comment><USER7> But it's the variance that you want to reduce if you want to be more efficient about resource usage (ie. cashiers and cash machines). As variance goes up, your overhead for burst capacity goes up.

Also, variance is what people perceive as bad service, not the mean time. If everyone takes a little longer they feel happier because of the perception of fairness.

</comment></comment></comment><comment><USER9> Without reading the article, I've never seen anything remotely as efficient at scale as Apple Store employees that all have handheld swipers. It scales out linearly and is best because someone who is a tech can still double as a checkout person. It also makes for a much more pleasant user experience IMO.

<comment><USER10> I often can't stand the Apple Store model. I walk in to buy headphones and stand around like an idiot waiting for one of the employees to be free to ring me up. Just give me a line to wait in, please.

This problem has improved significantly in the past couple of years, I imagine due to Angela Ahrendts takeover of the stores, but I still find it annoying.

<comment><USER11> Why wait? Just use the self checkout and get on your way...

</comment></comment></comment><comment><USER12> How about studying the most 'human' checkout setup?

Used to be that you could make small talk and feel the hole in your pocket growing bigger while you handed over that old crinkly dollar bill. Now I can hardly get out a perfunctory "Hello, how are you doing?", because I'm too busy trying to figure out whether I need to explicitly choose credit or whether I'm going to need to sign or not given the dollar amount... I'm not suggesting that we go back to the "good old days". I would, however, suggest that we progress in the direction of pathos and our shared humanity rather than toward whatever it is that tickles the fancy of Homo Economicus.

<comment><USER13> Local produce market: open shout on prices - the most fun time to go is between 3pm and 4pm when they are cutting prices (crossing off the old price and writing the new one on the little cardboard placard stuck in the stock display) or putting more produce in the '£1 per bowl' displays to clear stock.

Economics in action. Lots of people. You don't have to engage with the small talk if you don't want to.

<comment><USER14> Sounds fun :)

I'm in Austin, TX. Looks like you in the UK. I'm going to look into whether there is something like this locally. Thx!

Also, just curious. What are your thoughts on the EU vote coming up?

<comment><USER13> _" Also, just curious. What are your thoughts on the EU vote coming up?"_

My thoughts?

1) Look at a map centred on 52N02W with a radius of 2000 miles and think about what the future is for an island off the mainland with a population about two and a half times that of Texas.

2) Daniel Kahneman would have a field day over here at the moment! A fair spread of his hypotheses can be seen in action daily.

PS: I was describing Birmingham's central food markets in Digbeth by the way, but other cities have good markets as well - open three or four days a week and selling the same kind of stuff you can get in supermarkets without the packaging. We also have more expensive/artisanal 'farmer's markets' with higher priced produce in middle class areas, typically one Saturday a month.

</comment></comment></comment></comment><comment><USER15> I agree with the other posters here, this is a really bad article. Even if the effect is true, it doesn't matter because nobody cares if you take 20 seconds or 30 seconds to check out. I care about the fact that when cashiers had their own lines, I had to stand for 5 minutes behind someone who tried to use a points-based rewards card, didn't have quite enough on it, then the cashier went through something complicated so she could deduce what he did have, document and sign it, and have him pay the tiny cash difference between his sum and what he had on his card. It literally took 5 minutes, while I was trying to buy like milk and bananas or something. Of course, I thought about the well-known research on single queue. When I saw other lines moving, I wished I had been in one.

plus, this appears to be the result of an experimental setup rather than real- world facts. It's trivial to get real-world data from some place that implemented the difference, since _all_ receipts are time-stamped. You just have to count the number of receipts in single-line, vs everyone-with-their- own-line, and see which is bigger. (You can also see how average total or number of items differs between setups, or normalize for any changes, such as only considering the time taken to ring up literally the exact same order.)

this isn't data rocket science. any store which went single-line should have this data.

</comment><comment><USER16> I am a bit suprised they studied this with lab experiment as opposed to observations at a real store with professional cashiers.

<comment><USER17> It's a tricky one. You can't infer any sort of causality by just looking at real stores, because the policy varies by store or chain. So there are a zillionty (to be precise) other variables changing along with whether they use a common queue or not. Any difference you see could be due to any of them. And just taking an existing store and trying to randomize the policy is still tricky, since the form of queue you use influences the physical layout of the store and you might get weird effects from a mismatch.

But doing it in a lab means you have no ecological validity. People know they're being watched closely, much more closely than they would be in a real life scenario, and that will affect their behavior. So you really can't be sure your results will generalize to the real world.

Possibly the best you can do is take a few stabs at both approaches and hope that all the studies point in roughly the same direction.

<comment><USER18> > there are a zillionty (to be precise) other variables.

I hit all of them every time I go. It's awful. The old person returning a head of broccoli, the kid pulling down a display stand into my shopping on conveyer, the milk bottle leaks onto cashier. Every time I go it's a new kind of pain.

</comment></comment></comment><comment><USER19> But it's a useless result.

As a customer I only, only care about my perception of speed, not actual speed.

Multiple lines 'seem' fair, there's also little variance and hence I leave feeling positive most of the time.

A store might save a small percent on cashers using this research but pissing the customers off the huge amount it would seems like poor economics.

<comment><USER20> _As a customer I only, only care about my perception of speed, not actual speed._

Which in turn can be gamed. See the infamous story from Houston, where there were large numbers of airport complaints saying it took too long for arriving baggage to reach the bag claim. The solution was:

[http://www.nytimes.com/2012/08/19/opinion/sunday/why- waiting...](http://www.nytimes.com/2012/08/19/opinion/sunday/why-waiting-in- line-is-torture.html)

(they rearranged things to increase the distance between arrival gates and bag claim; it still took the same amount of time to deliver bags to bag claim, but now passengers spent more time getting to the bag claim and less time waiting _at_ bag claim, so they perceived it as faster and complained less)

<comment><USER21> I've also heard a similar story about complaining about elevators taking a long time, but after installing floor to ceiling mirrors in the lobby, people were distracted enough where it didn't feel like it took as long and stopped complaining.

</comment></comment></comment><comment><USER22> I am wondering if anyone put real-world details into mathematical models. In case of a single line and multiple cashiers, people tend to stand farther from the cashiers than they would be standing if they had chosen specific line and it requires tiny bit of attention and delay to scan cashiers constantly. Depending on the shop/service, if you choose the line you may start putting out your purchases onto the conveyor belt while the person in front of you is still being served, not so much when you do not know your cashier in advance.

From my airport experience, hybrid models tend to be pretty good: one single line to security scan or passport check and then it is ushered into many short ones. Probably should mathematically model that and see what happens.

<comment><USER23> One of the supermarkets around here has an automated alerting system that tells the next person in line which cashier they should move to (they use a large screen and a recorded voice).

The notification comes when the cashier moves to the payment step, so you still have time to unload the purchases onto the belt before the previous customer is finished.

</comment></comment><comment><USER24> As a former McDonald's cashier/drive-thru operator, this makes intuitive sense to me.

There is a very real stress you feel when a line starts building up. I naturally worked harder when it felt like I was falling behind.

<comment><USER25> You are saying that when your individual line starts building up you feel pressure but when the single global line starts building up you would not feel pressure?

<comment><USER26> Yes, a single global line build-up doesn't feel solely like your responsibility. It's like a tragedy of the commons scenario.

</comment></comment></comment><comment> iam-TJ Ode to the cashier.

      First they came for the waiting room, and I did not speak out -
      Because I did not mind to queue.

      Then they came for the stock pickers, and I did not speak out -
      Because I did not mind to pick.

      Then they came for the cashiers, and I did not speak out -
      Because I did not mind to be anti-social.

      Then they came for me - and there were only robots left to speak for me.

</comment><comment><USER27> Mathematical model matches, since a mathimatical arbiter eliminating Head Of Line blocking also incurrs the additional latency penalty due to the extended path and additional switching elements. However the latency penalty is incomparable to the improvement in latency variance.

I can't believe they've ommited a situation where this one lonely customer answers "Yes, I DO want to hear more about the offer" and starts signing up for the store membership, a bonus program, a store credit card, a cat insurance, and a dunce hat.

</comment><comment><USER21> I think there's also some real world components of one queue vs many queues that are missing here.

For example, at a hotel checkin, flight baggage checking, or Fry's electronics, there is one line which feeds into multiple agents. As the number of agents grows, there's a nontrivial amount of time where an agent is done with the current customer, but the next person in line has to walk maybe 50 or so feet to them, wasting some time, especially if they are slow (kids, luggage, elderly).

</comment><comment><USER28> Maybe separate queues work better, but that creates competitiveness, and in a long term will stress workers more, who might eventually slow down and feel judged by others.

</comment><comment><USER28> Does it mean that a team of developers where each developer is responsible for a feature (vs the team being responsible for all features) will deliver quicker?

</comment><comment><USER29> Simpsons s05e13

APU: "Look, Mrs. Simpson, the express line is the fastest line not always. That old man up front, he is staved for attention, he will talk the cashier's head off."

I think The Simpsons got it twenty years ago: when it comes to checkout lines, the human factor means far more than the mathematics.

</comment><comment><USER30> That's great, but having one line per cashier is not spatially efficient.</comment>


Microsoft drops Dryad - <AUTHOR> http://zdnet.com/blog/microsoft/microsoft-drops-dryad-puts-its-big-data-bets-on-hadoop/11226

<comment><USER2> Nuts that would have been a cool project if it was not restricted to an HPC cluster. Hadoop for windows server would have gone places and using LINQ to query the data would have been great.</comment>


Show HN: Free, fast, dev-friendly open source status page (with Netlify) - <AUTHOR> https://github.com/mistermantas/cstate <comment><AUTHOR> Context: About a year ago when I started on this project, it was literally almost nothing. Now it's a pretty complex little thing; but it's still what I would want in a status page — a hackable, free alternative to the expensive solutions other companies are providing. There's different markets, sure, but for the little guy? This is the kind of thing I'd want to use.

Design feedback, docs feedback, please, I'd love to hear it.

The current master branch is inbetween v2-rc1 and v2-dev2, so feel free to give it a shot while it's still "brewing." I'd love any feedback I could get.</comment>


Control over L3 Cache for containers and vms - <AUTHOR> http://blog.appformix.com/meet-your-noisy-neighbor-container <comment><USER2> Requires Intel Xeon E5 v4 Servers with Intel RDT.</comment>


The Mouse is Dead: Long Live the Keyboard - <AUTHOR> http://blog.sharpthinking.com.au/post/2010/06/16/The-Mouse-is-Dead-Long-Live-the-Keyboard.aspx

<comment><USER2> Good post about the options available.

Personally I run Debian with nothing but a full-size xterm and no wm -- I use screen instead.

However, mice do still come in handy occasionally... like to crush my opponents in a good game of Alpha Centauri.</comment>


Rainbird: The Way Twitter Counts Tweets In Realtime (Soon To Be Open Sourced) - <AUTHOR> http://techcrunch.com/2011/02/04/twitter-rainbird/ <comment><USER2> I was at the presentation - it's a very smart system. They basically maintain a whole bunch of counters for any particular thing that's being tracked. For example, say someone clicks on a t.co link to blog.example.com/foo at 11:41am on 1st Feb. Rainbird would increment counters for:

t.co click: com (all time)

t.co click: com.example (all time)

t.co click: com.example.blog (all time)

t.co click: com.example.blog /foo (all time)

t.co click: com (1st Feb 2011)

t.co click: com.example (1st Feb 2011)

t.co click: com.example.blog (1st Feb 2011)

t.co click: com.example.blog /foo (1st Feb 2011)

t.co click: com (11am-12 on 1st Feb)

t.co click: com.example (11am-12 on 1st Feb)

t.co click: com.example.blog (11am-12 on 1st Feb)

t.co click: com.example.blog /foo (11am-12 on 1st Feb)

t.co click: com (11:41-42 on 1st Feb)

t.co click: com.example (11:41-42 on 1st Feb)

t.co click: com.example.blog (11:41-42 on 1st Feb)

t.co click: com.example.blog /foo (11:41-42 on 1st Feb)

So that's 16 counters to track one link, but it means they can do fast, denormalised queries in realtime to track how that link is performing.

It's not just for t.co links - they can use it for internal server monitoring tools, tweet counts, advertising metrics... pretty much anything that involves counting at scale.

It's possible to build a similar system for much smaller scale applications using atomic counters in Redis - I've been experimenting with something like that for some of my own projects.

<comment><USER3> We use Redis for this kind of stat tracking at <http://www.formspring.me/>

At 10,000,000 responses per day, we're not that small.

Here's the source from our collector: <https://gist.github.com/794474>

</comment></comment><comment><USER4> Shameless self-promotion, but important point nonetheless:

VoltDB is truly fantastic at this kind of workload. It's one of the first use cases we had traction with. Also, VoltDB is open source today.

<comment><USER5> VoltDB looks pretty awesome, but I'm pretty concerned by its lack of ability to join a table to itself, to have over six tables in a join, to aggregate or select distinct arbitrary values. <http://community.voltdb.com/docs/ReleaseNotes/index>

<comment><USER4> At VoltDB, we're working on improving our SQL support. Initially, we focused on core SQL useful for OLTP. We've added functionality with every release and we plan to continue in 2011.

For example, the March release of VoltDB will support more than 6 table joins and has some improvements to aggregation and distinct code. It also has a much more usable explain plan feature.

We feel that VoltDB offers one of the richer query interfaces of systems that scale to its level, but we don't plan to sit still.

</comment></comment></comment><comment><USER6> I'm missing the point, so I hope the HN community can enlighten me, but: why do you need Cassandra and all that jazz, if you're just incrementing counters?

A decent memcached instance on modern hardware can easily push several 100K updates/sec . Couldn't you do the same with a pool of sharded memcached servers? Compute the MD5 hash of the string you want to count (which can be 16 strings, from the top-rated comment above), and just use that as the key.

We've seen people push 750K QPS on an InnoDB via HandlerSockets <http://news.ycombinator.com/item?id=1886137> , so imagine what you could do with a sharded pool of 20 InnoDB servers.

Again: if I'm missing something, I'd love to learn.

<comment><USER7> The day half your memcached data center loses power will be a sad sad day indeed, and the story of 750k QPS on InnoDB was about read traffic, not writes.

</comment></comment><comment><USER8> Watch this talk[0] from Qcon SF November 2010. Ryan King goes into a lot of detail about many nosql implementations at twitter. This is the first time I had heard about distributed counting by way of Cassandra to implement tweet counts specifically and obviously count other things in general. In particular Cassandra is pointed out as having tremendous write availability to enable this sort of thing. He also mentions various specifics in how the feature is coded/designed and different approaches they had to take until they got a final version.

[0][http://www.infoq.com/presentations/NoSQL-at-Twitter-by- Ryan-...](http://www.infoq.com/presentations/NoSQL-at-Twitter-by-Ryan-King)

</comment><comment><USER9> On another note, last year Twitter open sourced Gizzard. [http://engineering.twitter.com/2010/04/introducing- gizzard-f...](http://engineering.twitter.com/2010/04/introducing-gizzard- framework-for.html) (ironically, nobody seems to have tweeted this article!!) Natural curiosity-I downloaded the repo,and tried to understand what it was. Later,it also seemed the buzz surrounding ( on HN atleast) didnt last much, and I forgot about Gizzard completely. Are there startups/bigCos using Gizzard,other Twitter's open source stuff?

<comment><USER10> i played with gizzard for one of our services with redis as backend. twitter engineers on #twinfra IRC channel helped me a lot on understanding gizzard and flockdb src code. Not yet using in production though.

You have any questions ?

</comment></comment><comment><USER11> First announced in Strata conference. Here is the link to the presentation- Realtime Analytics at Twitter:

[http://assets.en.oreilly.com/1/event/55/Realtime%20Analytics...](http://assets.en.oreilly.com/1/event/55/Realtime%20Analytics%20at%20Twitter%20Presentation.pdf)

</comment><comment><USER12> Heh, this is pretty much exactly what I've been toying with in my spare time lately at <http://illustrend.com> \- only with Erlang instead of Scala.

</comment><comment><USER13> I particularly liked the first line on slide 48

 _"We require operational reporting on all services"_

feels like everyone learns that the hard way, twitter just did it much more visibly

</comment><comment><USER14> Twitter is clearly brilliant and creating a viral and useful product. I admire everything they've achieved in terms of user adoption and usefulness.

They're proven without a doubt that technology is only one ingredient and it doesn't have to work well for a web or mobile business to grow.

They're the last company I'll look to for technology to use in my business or as an example on how to run operations. I have no interest in any of their open sourced products or in any advice from them on how to run my data center.

<comment><USER15> On what basis? Because they've been through some rough patches where they couldn't keep up with the traffic, you'll dismiss everything they've built?

<comment><USER16> I agree with his general sentiment, I'd only phrase it differently.

The point is not that they've been "through some rough patches". The point is that they failed for years to come up with a reliable implementation of a solved problem; pub/sub messaging.

Twitter is not "large" by any means. Your telco, stock exchange and many other companies have dealt with the the same problem-space for decades. Those reliably dispatch orders of magnitude higher throughput under much more complex routing conditions. Many of them operate under SLAs that mandate five or even six nines of availability.

Sure, twitter is (gladly) not dispatching emergency-calls, as such their requirements are lower. However, given their track-record they're in no position to give technology advice either.

50 million tweets/day[1] is not a serious workload for a messaging system.

<http://mashable.com/2010/02/22/twitter-50-million-tweets/>

</comment></comment></comment><comment><USER17> "twitter <3 open source"

try-hard or what...

<comment><USER18> The very existence of that "insult" amuses me. I miss the days when cooler than cool meant ice cold.

<meta>I posted this partially to experimentally examine the downvote clumping effect I've noticed on hn, where some reasonable responses to highly downvoted posts get downvoted by association.</meta>

<comment><USER19> It's probably the "Don't feed the trolls" effect.. ;-)

</comment></comment></comment><comment><USER20> meh? ultimately the back end for it is cassandra, correct? so they're what, going to open source their implementation of doing stats in cassandra? It's great for people to open source code, but I think it's more of a championing for cassandra, than it is a 'code dump'

also in that vein, the formspring comment / gist link is very commendable and awesome!

</comment><comment><USER21> That's nice but when are we going to get the deep search that will go back more than a week, which they promised over a year ago.</comment>


FreeBSD – a lesson in poor defaults - <AUTHOR> https://vez.mrsk.me/freebsd-defaults.txt?hn <comment><USER2> Previous discussion: [https://news.ycombinator.com/item?id=11318508](https://news.ycombinator.com/item?id=11318508)

</comment><comment><USER3> This person means well, but suffers from the same myopia a lot of security- first people do: making these changes to default settings is a huge violation of expectations, and the changes need to be widely publicized once they are decided upon. Suddenly dropping support mid-cycle for tons of things will result in pitchforks and torches from people who, despite the constant insinuations of this document, do in fact know what they are doing.

This document, in short, makes a great to-do list but completely ignores the roadbuilding that needs to happen to get people ready and on board.

<comment><USER4> I have to agree.

I'm reminded of OpenBSD's move in 6.0 to enforce W^X on binaries. This breaks the use of my cooperative threading library: in order to avoid requiring specific compilers/assemblers (for the portion that's impossible to write in pure C), I use ~50 bytes of pre-compiled code so that it'll compile anywhere. To do that, I have to mark the block R|X. But I can't know with 100% _certainty_ that the codepage doesn't overlap with something that was writable (since there is no mgetprotect), so I have no choice but to set R|W|X.

So probably what I'll have to end up doing is allocate at least three codepages at run-time, set to R|W, copy the code there, then set R|X, and take a performance penalty for needing a pointer to the code block.

What I would like to see FreeBSD do to help with migrating to stronger security is something like "freebsd-harden" that you run once after a new installation or version upgrade, and it will walk you through a series of yes/no prompts, and advise, "if you aren't sure, say no."

<comment><USER5> (Note: I agree with your main point that changing defaults can cause problems, and security needs to balance with usability or people won't use it.)

For that 50-byte block of code, on most platforms, you could tell the compiler or linker to put it in the text section directly along with the rest of the code, rather than in the data section. A linker script or a section attribute can do that. Then you can just call it using the appropriate symbol.

I just tested this, with a manually assembled array of bytes, using both of those methods, and both of them work.

Here's the linker script approach:

        /tmp$ cat main.c
        unsigned long long add(unsigned long long, unsigned long long);

        int main(void)
        {
            return add(23, 45);
        }
        /tmp$ cat add.c
        unsigned char add[] = {
            0x48, 0x89, 0xf8, /* mov %rdi,%rax */
            0x48, 0x01, 0xf0, /* add %rsi,%rax */
            0xc3,             /* retq */
        };
        /tmp$ cat demo.ld
        SECTIONS {
            .text : {
                main.o(.text);
                add.o(.data);
            }
        }
        /tmp$ gcc -c main.c -o main.o
        /tmp$ gcc -c add.c -o add.o
        /tmp$ gcc demo.ld -o demo
        /tmp$ ./demo ; echo $?
        68

While this won't work on every possible platform, in practice it'll work for almost any platform you might care about.

<comment><USER4> Wow, that's very neat! Thank you! Does Clang support this as well?

It looks like I don't need the main.o(.text) line either, which is good because that would be a large burden on users of the library.

Also, just noting for others, I had to use .text : { libco.o(.rdata); } since my char array was const.

<comment><USER5> > Wow, that's very neat! Thank you!

Glad I could help. Thank _you_ for building awesome software.

> Does Clang support this as well?

Clang supports __attribute__((section)).

For linker script support, it'd depend on what linker you use. GNU ld and gold have complete support for linker scripts. LLVM's lld has some support for linker scripts, plenty enough to do things like this, though it may lack some features that GNU ld and gold support.

> It looks like I don't need the main.o(.text) line either, which is good > because that would be a large burden on users of the library.

When I attempted to link without that, the linker complained that it couldn't find main. Interesting that it worked for you without that. You can also use wildcards to match all object files, if that helps, and then use "ld -T thescript.ld *.o" to link.

> Also, just noting for others, I had to use .text : { libco.o(.rdata); } > since my char array was const.

Sadly, read-only sections vary a bit more; some compilers use .rdata, some use .rodata.

You could use __attribute__((section)) to explicitly put the array in a specific section, then name that section in the linker script; that avoids the warning and any platform-specific inconsistency.

<comment><USER4> > When I attempted to link without that, the linker complained that it > couldn't find main. Interesting that it worked for you without that.

My guess would be because I also had main.o on the command line? It looks like yours didn't have that.

> LLVM's lld has some support for linker scripts, plenty enough to do things > like this

Hmmm, well just throwing out alternative ideas ... I could try something like this:

        __attribute__((aligned(4096)))
        static const unsigned char co_swap_function[4096] = { ... };
        VirtualProtect((void*)co_swap_function, sizeof co_swap_function, PAGE_EXECUTE_READ, &old_privileges);
        //or
        mprotect((void*)base, size, PROT_READ | PROT_EXEC);

The theory being that the const will put it into either .rdata or .rodata (since nobody can decide on one or the other it seems); and then by forcing the alignment to a page boundary and also filling a page boundary, we make sure the VirtualProtect or mprotect call won't affect anything other than our co_swap function. But even if it does, it'll most likely be more read-only data, and it's not the end of the world if that gets marked executable.

The downside is of course that the page size isn't really known at compile- time. On ?nix, it's a run-time call to sysconf(_SC_PAGESIZE); but on Windows I'm not sure how to get that value. However, I'm pretty sure it's going to be 4K on any x86/amd64 systems.

So, these seem to be all of our possible options:

1\. we use inline assembly; and now you require a specific assembler (MSVC and GCC inline ASM syntax are totally different) or additional tools like nasm/yasm. I really don't understand why at least three people have favored this solution now; but since they haven't elaborated any reasons, I'll just have to politely agree to disagree here :/

2\. we use __attribute__((section)), and get unsuppressible warning messages, and the command also won't work with MSVC.

3\. we use __attribute__((section)) with our own name, and use a linker script to suppress the warning message, losing compatibility with MSVC.

4\. we use __attribute__((aligned(4096))), risk the page size being wrong, and the attribute won't work with MSVC.

5\. we use #include <stdalign.h> [when _MSC_VER isn't defined] + alignas(4096), risk the page size being wrong, and require C11 instead of C89 to compile. [_Alignas probably isn't going to be in MSVC due to their hatred of C99 and above.]

For the latter two, we can have #ifndef/#define LIBCO_PAGE_SIZE 4096, for convenient command-line overrides.

Probably the most pragmatic route will be to support multiple options and let the user override if one of them doesn't work out on their platform for some reason.

EDIT: here we go:

        SYSTEM_INFO si;
        GetSystemInfo(&si);
        int page_size = si.dwPageSize;

Then for good measure, we throw in:

        assert(LIBCO_PAGE_SIZE == si.dwPageSize);  //or for ?nix, == sysconf(_SC_PAGESIZE)

<comment><USER5> MSVC also has mechanisms to manipulate where data ends up in the final binary; you'd just need to use those mechanisms on Windows.

But yes, approach 5 seems the most portable.

</comment></comment></comment></comment></comment></comment></comment><comment><USER6> It sounds like he needs an OS built on "default deny" principles. The best one for that is OpenBSD, and he recommends porting over three or four packages from OpenBSD. Really, he'd be happier running that, I think. I know I was when I first started exploring the BSDs. I tried FreeBSD, PC-BSD, and DragonflyBSD before settling on OpenBSD.

Default deny makes the most sense if you are interested in security. Sure, it can be a PITA to set up .conf files at first and get the packages you need, but once past the learning curve, it's the simplest thing to maintain.

FreeBSD reminds me a lot of various flavors of Linux I've tried in the (distant) past. All kinds of stuff running by default, old packages for compatibility, etc.

Security may not be important for many people till it's too late, but it's one of those things that pays dividends in what _doesn 't_ happen. Hard to sell if you've never been pwned.

<comment><USER7> You never tried NetBSD?

If you are suggesting NetBSD has more things enabled by default than OpenBSD I would bet that is incorrect. I have tried a lot of different projects and NetBSD is the best I have seen for not enabling anything. It forces you to figure things out.

Whenever I read OpenBSD mailing lists or blogs, they often seem more aggressive in trying to make their users adhere to the default system provided. That's fine, but NetBSD generally does not do this. Users are not assumed to be idiots and are not discouraged from experimentation.

The BSD projects share more similarities than differences. None of them require anyone to use the entire base system or the defaults. Users can compile their own kernels, write their own configs e.g., based on examples provided, and cherry pick utilities.[1] In my opinion this is made just a tad easier than with Linux.

1\. But if you do this with OpenBSD and advertise it, I think you may draw some criticism. Frankensystem, etc. They are not encouraging experimentation, they are encouraging conformity.

</comment></comment><comment><USER8> A lot of these points have been addressed in one way or another - 11.0-RELEASE has a new installer dialog[0] with multiple hardening options available. These are OFF by default in 11.0-RELEASE due to POLA principle, but they are to be enabled to ON by default in future releases (hopefully in 11.1).

[0] [https://secure.freshbsd.org/commit/freebsd/r302897](https://secure.freshbsd.org/commit/freebsd/r302897)

</comment><comment><USER9> So, uh, why doesn't he just use OpenBSD? They take security seriously. (not being snarky, really!)

<comment><USER10> I'm pretty sure he does. I think he's an OpenBSD developer.

<comment><USER11> TJ isn't a dev, but he's a fan of OpenBSD.

</comment></comment></comment><comment><USER12> Minor nit: HPN has been dropped from openssh since this was written.

<comment><USER13> Why would high performance networking be dropped from the default? I learned of its existence a few weeks ago and was wondering when it would make it in.

<comment><USER12> No one was available to benchmark HPN vs no-HPN to illustrate it still made a difference.

</comment></comment></comment><comment><USER14> Dupe: [https://hn.algolia.com/?query=FreeBSD:%20a%20lesson%20in%20p...](https://hn.algolia.com/?query=FreeBSD:%20a%20lesson%20in%20poor%20defaults&sort=byDate&dateRange=all&type=story&storyText=false&prefix&page=0)

</comment><comment><USER15> Not to mention he doesn't understand what flipping these defaults actually will do.

They sound great but without understanding exactly what happens when some of these switches are flipped you're going to wind up breaking other things because you simply do not have the knowledge to understand these features in depth.

His heart may be in the right place but he needs more experience and wisdom on how things work on a more fundamental level.

</comment><comment><USER16> My least favorite FreeBSD default: permissions for CD/DVD burning.

I get the high-minded position FreeBSD takes here, but it is also a total PITA and it seems pretty clear that if you are putting a CD/DVD in a host's tray, you have console access.

<comment><USER4> Yeah, it's pretty nuts having to study the output of camcontrol and /dev, creating a devfs ruleset, adding that to /etc/rc.conf, adding your CD drive into /etc/fstab, and then tweaking a sysctl, just to burn a CD.

I am hard-pressed to think of the security risks involved in a user being able to burn a CD. Short of some kind of highly-confidential server with no internet access, where you'd probably want the whole machine inside a locked cage anyway.

<comment><USER17> There's a cd in the tray, but we don't know who put it there. Maybe if you're logged in on a specific terminal?

I could contrive some scenarios where it would be undesirable though: Maybe if there's a rewritable (or not finalized write once) disc also in the system for something important? Let's say, a diskless system without pxe support, so it boots from a cd drive, but doesn't mount it. An unauthorized user with access to the burner could disrupt the next boot.</comment></comment></comment>


From Gene Editing to A.I., How Will Technology Transform Humanity? - <AUTHOR> https://www.nytimes.com/interactive/2018/11/16/magazine/tech-design-medicine-phenome.html <comment><USER2> I love AvE, but really the easy approach here is not to write gcode by hand and to use something like Fusion360/HSMworks to do cam and generate the code for you.

It's like you don't teach programming by starting with assembly, you start high level and work your way down as you need to.</comment>


Kickstarter launched for book detailing implementation of Sharia law in the US - <AUTHOR> http://www.kickstarter.com/projects/662931330/shariah-law-for-america

<comment><AUTHOR> Apparently "it took 23 years for the Quran to be downloaded".</comment>


When inmates design prisons for rehabilitation (2016) - <AUTHOR> https://99percentinvisible.org/article/of-our-own-making-inmates-redesign-prisons-for-rehabilitation/ <comment><USER2> Every crime is unique, but I think a lot of criminal behavior boils down to the inability to constructively interact with a world that often feels like it's fighting back. I wonder if prisoners participating in the design of their spaces would in itself have a rehabilitative effect.

By that I mean, instead of pre-installing shelves (which soon becomes an entitlement) so they don't have to build shelves out of cigarette cartons (which is a small way of working against/around the system), keep prisoners in the loop while improving their spaces over time.

</comment><comment><USER3> This looks great for low security prisons (which would still cover 99% of drug crimes), but in a prison for violent crimes literally everything in that whole cell could be turned into improvised weaponry.</comment>


Is it true that "not everyone can be a programmer"? - <AUTHOR> http://arstechnica.com/information-technology/2012/09/is-it-true-that-not-everyone-can-be-a-programmer/

<comment><USER2> If the people like Atwood who argue that some people just can't learn programming are to be taken seriously, then by the same argument and same types of evidence, there are some people who can't learn science, or math, or reading, or how to speak or write. Because what the evidence is showing is that some people have difficulties learning some topics or take longer to learn them, and in many cases have misconceptions that make it more difficult to teach the topic to them effectively. And the evidence shows that traditionally taught courses (lecture/memorization based - taught by people not trained in more effective teaching methods like active learning) often do not significantly impact conceptual change of such students.

The Bornat & Dehnadi Goats & Sheep paper is interesting in showing that we can diagnose students who have significant misconceptions or lack of knowledge needed to learn programming (see similar research on concept inventories showing the same thing in a wealth of other subject areas). Beyond that the strongest interpretation would be that students with misconceptions are less likely to succeed in traditionally taught CS courses. Not that such students can NEVER learn the topic and NEVER be a programmer. I wasn't surprised to see their research wasn't published (although it is so easy to get such research published - especially when the peer reviewers aren't trained in educational research and learning theory, either). But a line like this would never stand up to peer review by people who are even remotely familiar with research in computer science education: "change the language, change the application area, use an IDE and work on motivation. None of it works, and the double hump persists." There are decades of studies showing various strategies that DO help more students learn and better understand programming and computer science concepts. Just because Atwood and others are unfamiliar and ignorant of such research doesn't make their opinions more right.

<comment><USER3> How would you explain the double-hump distribution of grades then?

<comment><USER4> I don't know if I agree about "never being able to learn programming," maybe with the right intense tutoring those people could.

But double-humping is easy to explain: some people embrace the mindset and problem solving approach of programming naturally, or with minor counsel; while some people simply approach their programming assignments as a bunch of solutions they have to memorize so they can replicate them on the exam. It's quite similar to the approach I've seen most engineering students take to Calculus and Physics when I was doing Engineering.

Obviously, wanting and liking to learn programming also plays a major role here, and I'd say that even within computer-related degrees many people end up avoiding programming courses, on the grounds they can still work in the field by going the IT route.

</comment></comment></comment><comment><USER5> This seems to be a recurring topic on HN. The "goats vs sheep" study cited in the link's "highest-voted answer" has appeared on the front page at least once before, recently.

I am more interested in the meta-question: what are the implications of this question? I.E. if we knew for certain that the answer is "yes," how would this change our behavior (and likewise if the answer is "no").

I would think: if we knew for certain that some people can program and some people just can't, we would focus more energy on sorting people early on, to avoid wasting everyone's time trying to teach the unteachable. By contrast, if we knew for certain that everyone could program given the right circumstances, we would focus more energy on devising better teaching methods, etc.

Because of this, I am inclined to maintain a deliberate bias toward "no" (I.e. I am inclined to behave as if anyone could learn to program). Even if the answer really is yes, there are sure to be some cases where a "programming- capable" individual struggles at first for some reason, and an "anyone can program" general attitude is more likely to save them from mis-categorization as a non-programming "goat."

</comment><comment><USER6> At least three essays by Paul Graham ("pg," the founder of this site)

<http://www.paulgraham.com/hs.html>

<http://www.paulgraham.com/love.html>

<http://paulgraham.com/determination.html>

have referred to people making excuses for being lazy. I really like his expression of this idea in his essay "What You'll Wish You'd Known," the essay that drew me into reading his essays regularly, which eventually led me here to Hacker News:

"If they were just like us, then they had to work very hard to do what they did. And that's one reason we like to believe in genius. It gives us an excuse for being lazy. If these guys were able to do what they did only because of some magic Shakespeareness or Einsteinness, then it's not our fault if we can't do something as good.

"I'm not saying there's no such thing as genius. But if you're trying to choose between two theories and one gives you an excuse for being lazy, the other one is probably right."

It seems undeniably true that any teacher of any subject will encounter some students who, as the teacher finds them, seem to "get" the subject right away, and other students who struggle to understand even the most basic principles of the subject. But if the teacher gives up on the struggling students, the teacher is just being lazy. Israel M. Gelfand, a mathematician who was a great mathematics teacher, once wrote, "Students have no shortcomings, they have only peculiarities. The job of a teacher is to turn these peculiarities into advantages."

The submitted article on arstechnica includes near the end a promoted reader comment that is very good:

"They were supposed to be learning Java, but there were always at least three students who didn't 'get it.'

"My solution was simple; get them as far away from the computer as possible (since programing is not dependent of computers), and have them "program" a group of people by giving one instruction at a time to do things like pace a room, or throw a ball. I'd teach them loops and the like by doing this for about fifteen minutes. It was fun and simple.

"After that, they'd be ready to Pseudocode, which meant they were ready to use Python. I'd have them write a working version of their homework in Python, THEN I would have them translate it to Java. Java was just too much as a first step (I will never understand the reasoning of teachers who introduce students to programming on anything other than Python). The problem was always that the class needed to be broken into smaller pieces that could be conquered, which in turn encouraged the once failing students. Victory is addictive."

That's what an effective teacher does--change the context of instruction, and draw in students with connections to what they already know. Some students entering a programming class would be ready to move beyond the approach suggested in the comment, and those students should be allowed to plunge right in to actual programming in a high-level language, but so far no one has developed a rigorous demonstration based on careful experiment that students smart enough to be admitted to an undergraduate degree program have some kind of invariant lack of ability to learn programming if at first they don't "get" the basic beginning steps in a typical programming class. Try a new approach and see what happens. Don't accept an excuse for being lazy as a teacher.

</comment><comment><USER7> This statement from one of the cited studies caught my eye:

"All teachers of programming find that their results display a 'double hump'. It is as if there are two populations: those who can [program], and those who cannot [program], each with its own independent bell curve."

It's making an unwarranted generalization to say that this is evidence of people being unable to learn to program. It's more likely that each teacher has a methodology that can succeed with students having some set of characteristics, and the teacher assumes that because he or she can't teach a particular student to program, then nobody can.

In a college environment, the teacher probably has an inflexible, non- individualized methodology that is expected to work with everyone in a 100-person introductory class -- it's impossible for one teacher to give individual instruction to that many students. Our teaching system also implicitly assumes that everybody in the same class has the same background knowledge and can learn at the same pace.

Also, at the college level, many intro-level CS courses are taught by grad students. When I was a grad student teaching intro CS at an Ivy League school many years ago, we had absolutely no training in how to teach, so we pretty much had to teach our students the same way we ourselves were taught as undergrads. The same old methods get passed down and reused with little thought as to whether they work well or not. Better methods might have succeeded with more students, but the university didn't seem to give a shit about how undergrads were taught as long as some fraction of them did OK.

I think it's likely that a lot of people who can't learn programming from a college class could learn it if they were taught one-on-one. And I think this is true for many other topics taught in school: math, physics, writing, etc.

</comment><comment><USER8> Sure, it is true. It is like not everyone could become a poet or even a fiction writer.

There are keyboard with all characters, notepad.exe and a reference of English language - go on, write a novel and become a new Selinger or Pamuk.

Almost everyone could become a coder - a translator from a language of specification to a programming language.

<http://karma-engineering.com/lab/wiki/Programming>

</comment><comment><USER9> There exist enough definitions of "everyone" and enough definitions of "programmer" to make the answer to this question almost worthless without context.

I'll leave this here: <http://en.wikipedia.org/wiki/No_true_Scotsman>

</comment><comment><USER10> I think it's a bit like learning written language. Written language is quite abstract too.

There are of course people with severe learning difficulties who are unable to learn written language (at least within any realistic timeframe). There are also people with more minor learning difficulties such as dyslexia who can learn but do so at a much slower rate compared with their ability to learn in other areas.

The difference is that written language is almost universally required in society. It's going to be very difficult to get almost any job at all if you can't read. Therefor the incentive to push through the pain barrier is very high.

So it depends on what your incentive to learning programming is. People who approach it because they simply see it as a way to make some $ will quickly realise that there must be an easier way to make $ that doesn't involve learning this stuff and they are probably right.

When I was younger me and a few friends were obsessed with video games. We thought that the coolest thing that we could possibly do was to make video games, people who made video games to us were like rockstars or pro athletes were to other people.

So we learnt to do some simple BASIC programming to the point where we could make text adventures with bleepy soundtracks and draw static sprites to the screen. First on BBC computers (which were popular with UK schools at the time) and later on DOS via QBasic.

In fact we even released a game as shareware, which gave us a hard lesson in conversion rates. Something like 10 shareware versions were ordered from the shareware library that distributed. Unfortunately nobody registered the full version (probably because it sucked).

I'm fairly confident that none of us had any real aptitude for programming. We had simply decided it was something that we wanted to be able to do at all costs.

</comment><comment><USER11> My grandfather used to be an art teacher in his younger years and he found people would sometime claim they couldn't draw. He always responded that this was nonsense .. drawing involves making a mark on paper, and absolutely anyone can do that.

I think its the same with most things, anyone can program if they're given half a chance .. but only those with an aptitude are likely to excel.

<comment><USER12> Sure anyone can program. But that doesn't make them a programmer.

Just like me slicing you with a knife doesn't make me a doctor.

</comment></comment><comment><USER13> My experience was of spending about ten years writing terrible code, and slowly building up ability. I think I am quite good at it now, but am probably just kidding myself. A lot of people just give up at the first hurdle. I doubt they lack the ability, just the drive. And if someone starts a CS course and has never tried to code they probably don't have the desire to learn.

</comment><comment><USER14> Relevant to this thread, since the goats-vs-sheep study is brought up so often to add authority to the claim, Caspersen et al. were not able to repeat Bornat & Dehnadi's results. They discuss their findings here: <http://dl.acm.org/citation.cfm?id=1268845>

</comment><comment><USER15> I firmly believe that the human brain is incapable of basic mathematics.

When I add two numbers, say 145 and 394, I have memorized a few rules and tricks that let me break that down to something like 1+4 (hundreds), 4+9 (tens), add one to the hundreds, etc.

Or, I might figure out that this can be decomposed to 150+400 - (5+6) or something similar.

At any rate, I decompose the problem to sub-problems I have memorized the answer to: adding single-digit numbers.

This is basically the same process as programming. Are we asking whether people are "incapable" of mathematics? No. But we know that some people are way better at language than math. And that is all there is to it.

<comment><USER16> Everyone can count, it is necessity, but you need a certain kind of attraction to mathematical operations to be a mathematician, even an average one. The same holds for programming. Someone who lacks the quasi OCD interest in solving problems with computer language cannot and shouldn't be a programmer. And there is nothing wrong with it.

</comment></comment><comment><USER17> No but it is true that not everyone can do it well.

</comment><comment><USER18> I'm not sure about the answer.

I am sure that not everyone _should_ be a programmer.

</comment><comment><USER19> No, it's not true

programming computers is like writing stories, except the compiler for programming is a dumb CPU not a living human brain

every human who has been appropriately taught has learnt to read and write. They can also learn to code. And pretty much the same proportion will make a living coding as do make a living writing stories.

But the future of humanity will be immeasurbly enriched by all it's people able to express them selves in code, just as it has been enriched by it's people able to read and write.

It will be a good future.

Now stop wondering if we are special, and start worrying how we can make a world that is so rich, so peaceful that the worst horror it's children face is curly brackets.

<comment><USER20> I don't think you can compare it to stories. The only things programming has in common with stories is words and typing. What's different?

A story can't be 'wrong' as long as the grammar is used correctly. There (usually) are no hard requirements on the outcome or even the resource use of a story.

I'd rather compare programming to writing (classic) poems. Poems have a fixed structure, so the author needs to be economical and plan ahead with the syllables he uses and the story elements he introduces. While the outcome is still more or less open, we have to count in the artistic element (which is somewhat missing in programming), so this might introduce enough cognitive workload on the author to compare.

<comment><USER21> As a matter of fact, doing both, i think you can.

But in my opinion, the question is more : does every single people on earth like programming enough to get into it, instead of getting into something they enjoy more ?

Reading is easy, using an Iphone is easy. Bladesmithing, or repairing engines all day long is difficult, as is programming, as is writing for a living, or any other activity you don't enjoy doing on a daily basis for about 40 years.

It all boils down to (minimum) enjoyment of one's job.

<comment><USER20> Probably not. However I think there might be more of us if more children got to play with something like lego mindstorms or MIT's scratch or some other sort of fun programming games. I'm actually looking forward to Notch's new game a lot (programmable spaceships with a simulated CPU, ram and stuff). Sounds fun (maybe not for children though).

<comment><USER21> And i do agree with that. (and Notch's new game too by the way!)

</comment></comment></comment></comment></comment><comment><USER22> I have the impression that some programmers would like this discipline to be exclusive to a few people, like if it was only for the elite. I don't really like this kind of spirit, I simply think some people don't see enough interest in programming.

</comment><comment><USER23> Not everyone has the _will_ to become a programmer, but I refuse to believe that anyone with an average IQ _can not_. It's not like being a concert pianist where there's some sort of cut :)

</comment><comment><USER24> There are many different levels of intellectual intelligence.

As a result of this not everyone can be a programmer, just as everyone can't be a rocket scientist or a microbiologist either.

<comment><USER25> But can't they really? You just replaced the problem with an unsupported (supposedly self-evident?) assertion.

<comment><USER24> Unsupported and self evident assertion?

What about people with mild mental difficulties?

What about people who suffers from extreme mental difficulties?

What about someone who no longer has a concentration span due to past substance abuse?

What about someone who is still using drugs heavily?

Hows about a 5 year old kid who's brain has not yet fully developed?

Or perhaps a 15 year old kid who is in the middle of puberty and has little concentration as a result?

Or a 90 year old suffering from dementia?

Or someone suffering any level of depression?

Do all these different groups of people in society (and the many others I have not mentioned) have the same capability to learn programming (or anything else for that matter) as any other group in society?

Didn't think so.

<comment><USER25> Then there would be no activity at all that everyone could do, and the question would be senseless. I think you're reading it too literally and missing the point.

<comment><USER24> Name one _skill_ that everyone can do regardless of the number of neurons in their brain and the capacity to use them, and ignoring any other underlying conditions that may impact ones ability to learn or retain knowledge?

This can't even be said for the basics like language, maths and science, why would computer programming be any different?

The 7 billion plus human brains on this planet are not created equally to each other (nor do they remain equal over time)! So how come everyone apparently has the ability to learn programming?

This is all scientific fact, so I really can't agree with your viewpoint on things that we all somehow have equal capacity to learn, it sounds a little out of touch with reality to me.

</comment></comment></comment></comment></comment><comment><USER26> Any can be taught to use windev or microsoft lightswitch and build "serious" business applications in weeks ... and be called a programmer

you need to raise the bar a little

</comment><comment><USER27> It's only true if you work/learn/pair program with people that think this is true.

</comment><comment><USER28> It is not about `can`, it is about `wish`.</comment>


InvizBox Go – Portable Internet security, tantalisingly close to being funded - <AUTHOR> https://www.kickstarter.com/projects/683682172/invizbox-go <comment><AUTHOR> Disclaimer: I know the team behind this Kickstarter and have pledged some money for it myself too

They're less than 5,000 euros from meeting their campaign goal, and I thought it might be something that people here would find interesting enough to support</comment>


Building Python Data Science Container Using Docker - <AUTHOR> https://faizanbashir.me/building-python-data-science-container-using-docker-c8e346295669 <comment><USER2> If you're looking to setup a DS container to play around with I'd advise also check out Jupyter's prebuilt images they're pretty full featured: [https://jupyter-docker- stacks.readthedocs.io/en/latest/index...](https://jupyter-docker- stacks.readthedocs.io/en/latest/index.html)</comment>


Open source typesetter for sheet music - <AUTHOR> http://lilypond.org/ <comment><USER2> I think this was one of the better writeups about Lilypond's commitment to good music typography I've read: <http://lilypond.org/about/automated- engraving/big-page>

That essay is a very nice rundown on the types of problems lilypond has dealt with in terms of working out how to create beautiful sheet music.

<comment><USER3> Yes, it's a very instructive essay.

However, notice that they only claim that Lilypond's default output tends to be better than other software's. It's not always as good as a good manual engraving. You have to tweak it to get it right.

Just today I printed this Tchaikovsky piece. Compare the manual engraving with a Lilypond output here (1st and 3rd links):

[http://imslp.org/wiki/Dumka,_Op.59_(Tchaikovsky,_Pyotr_Ilyic...](http://imslp.org/wiki/Dumka,_Op.59_\(Tchaikovsky,_Pyotr_Ilyich\))

In particular, look at the the _Poco meno mosso_ section at pages 6 and 5, respectively. While the original has 2 bars in one line, the Lilypond version has 3. Not only the notes look too small, but the 8va in the second bar is almost unreadable.

But, alas, I cannot play it anyway.

</comment></comment><comment><USER4> Lilypond is neat. I'm using its output (and a buncha tools I built around it) in my iPhone app launching Tuesday: <http://wonderwarp.com/etude>

<comment><USER5> Wow, that's really neat. Do you have to hand typeset everything in its library, or are you mining some online set of lilypond files, or what?

<comment><USER4> I've mined Mutopia for the majority of music, but there are maybe 30 songs I've done by hand just because they were obvious holes in the selection. I'm a little unsure about offering CC-licensed stuff in the app, but my Etude- converted songs are also offered under CC and I'm going to be linking to the licenses, so I think it should be fine.

I'm going to try to write a post to show HN about the tech behind it. I wrote my own .ly parser/preprocessor in Python as part of the song conversion. To help the forked version of Lilypond correlate the screen position and time offset of notes in the piece, I ended up having it do things like unroll macros and loops and do all the layout changes I needed to make em work in the app.

</comment></comment></comment><comment><USER6> As a nice bonus, Lilypond is also usable via a graphical interface, Denemo [1]. I've never used Sibelius or Finale so I can't comment on how they compare.

What I really wish were available, however, is the IMSLP catalog [2] in digital form (not PDF scans). Is there an app out there to OCR sheet music?

[1] <http://www.denemo.org/index.php/Main_Page>

[2] <http://imslp.org/wiki/Main_Page>

<comment><USER3> Mutopia's got what you want:

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

Of course the catalog is only a fraction of IMSLP's (typesetting is much harder than scanning).

</comment></comment><comment><USER7> Lilypond is the music equivalent of TeX. The thought put into how the final result looks is amazing.

<comment><USER8> Out of interest, have you seen MusiXTeX?

<comment><USER7> It's been a long time, but yeah. I just checked it out again. To my eye, the output does not look nearly as good -- it's basically on par with the music authoring software I was trying to use in the late 90s...which is not really that great. Sure it gets notes on a page, but is it readable?

To be fair, TeX is not really intended for musical notation, so it's cool they managed to get that kind of output. But Lilypond is really designed to produce beautiful, readable scores.

I remember, in a previous life as a violinist, that certain scores were just really hard to read, or not beautiful, it really killed my motivation to play them. Even familiar favorites, if engraved poorly were just no fun to read off of inferior pages.

</comment></comment></comment><comment><USER9> Lilypond is nice, but its input language is (very powerful but) a bit clumsy and verbose. Others who feel the same way might want to take a look at PMW (<http://www.quercite.com/pmw.html>) which also produces high-quality PostScript output and has a more friendly syntax. Its author, Philip Hazel, is better known for the Exim mail transfer agent and the PCRE regexp library.

</comment><comment><USER10> A program with such visual output could really benefit from a gallery page on its website. I found some examples of which it is capable of on <http://lilypond.org/switch/tour>

</comment><comment><USER11> Yeah, lilypond is awesome. I actually used it to typeset a piece of music that got published as an arrangement for handbells! <http://www.beckenhorstpress.com/title.asp?id=HB317>

[edit] link to recording: <http://www.beckenhorstpress.com/audio/HB317.mp3>

Bonus points if you can name the actual piece (the publisher didn't want me to use the actual title for the published arrangement).

<comment><USER12> The music is Enigma Variations: Nimrod by Edward Elgar. The Oscillation on the bells and mp3 compression made it a bit hard at first : )

<comment><USER11> Yep, you got it!

</comment></comment></comment><comment><USER13> And tweakable via Scheme to boot!

[http://lilypond.org/doc/v2.12/Documentation/user/lilypond/In...](http://lilypond.org/doc/v2.12/Documentation/user/lilypond/Interfaces- for-programmers#Interfaces-for-programmers)

</comment><comment><USER14> boo, gpl. lgpl would be fine

<comment><USER2> Apparently the developers felt that the LGPL _wouldn't_ be fine, given that they GPL'd it.

<comment><USER15> Actually, most likely they thought it would have been fine. Just not _as_ fine.</comment></comment></comment>


Ask HN: How to divide time code/support/marketing as a generalist? - <AUTHOR> I am struggling to find focus time between code, marketing, product & customer support.
What is better - 2 hours of each task every day or one dedicated entire day for each? e.g. Mondays is marketing, Tuesday is code!
Any other generalists who have gone through this? What worked for you? 🧐 <comment><USER2> I prefer a dedicated half-day to something. Do it until lunch, then decide what to do next.

The best part about being a generalist is that you can do what the most important thing is, instead of being frustrated that the person responsible isn't doing it. What I used to do was map out bottlenecks for my business. For example, I'd be able to see that if we had $X more cash, we could push profit margins up, and by doing Y, we could get that much cash. Or that the back end supports up to 100k users, so I can ignore that for a while and maybe even hire someone to do it later.

Customer support often takes highest priority, because it's an effective form of marketing too. But the rest is either getting more customers or building a better solution. Just do whatever gets you 5% more sales next week. Sometimes that might even mean laying off the code for months and just doing sales. Sometimes that means no marketing until you have something worth selling.

<comment><AUTHOR> Nice yes that looks like my story until now for past 3 months so I am glad we are on the right path.. Support definitely has to be real time

Will think about the half day bit and try it out

</comment></comment><comment><USER3> Looks like I'm in the exact same position as you.

We already have stable products and happy paying customets, so I try to limit coding to the minimum necessary - it really helps that I'm not the only one working on the products.

For customer support, you can't really put a limit on that since when it needs to be done, it needs to be done. I do try to write documentation on faqs and common tasks, and that helps a lot for new customers.

What time is left I focus on marketing and sales, but only after making sure that getting a new customer is a smooth and easy experience for all involved.

I'll love to hear about other people's experience on the matter, since it's not easy and there are many different ways to make it work.

<comment><AUTHOR> Nice! I would love to be in that position one day with a stable core product. We launched a month ago, currently at $160 MRR .. so still early days for us</comment></comment>


Don't Focus on Hiring a Superstar. Just Avoid Toxic Workers - <AUTHOR> http://fortune.com/2015/12/04/toxic-workers-hiring/ <comment><USER2> I've sometimes wondered if people who self-identify, or have been identifed, as a "10X employee," or ninja-rockstar, are somewhat more likely to give themselves license for bad behavior, "because I'm worth it."

</comment><comment><USER3> George Bush,and for Canada, Harper, come to mind.</comment>


XMonad and Unity in Ubuntu Oneiric 11.10 - <AUTHOR> http://markhansen.co.nz/xmonad-ubuntu-oneiric/

<comment><USER2> This post improved my overall quality of life by about 1%.</comment>


Government to Require In-School Repayment of Federal Student Loans - <AUTHOR> http://www.zencollegelife.com/2010/04/01/government-to-require-in-school-repayment-of-federal-student-loans/

<comment><USER2> Contrary to its title, this article does not say that the government will require in-school repayment of student loans. It only says the gov't will offer a tax credit if the student opts to do so.

<comment><USER3> The article says that students will have to start paying the interest on their loans while in school, and will then get a tax credit for it.

</comment></comment><comment><USER4> Aside from the inaccuracy of the title, it's also worth noting that the law referred to in the article was enacted in 2007 under Pres. Bush.

</comment><comment><USER5> Don't like it - shop around.

Oh Wait. Sorry - .GOV now runs the whole show.

<comment><USER6> There's nothing preventing other loans -- they just won't have the federal subsidy.

(If someone's reasons were good for deferring repayment while getting further education -- and thus they're still a good credit risk at prevailing private interest rates -- a private bridge/refinancing option will emerge.)

<comment><USER7> Non subsidized loans are almost impossible to obtain at anything remotely close to the rate the subsidized loans offer. The best I was offered was 15%. At that point it makes more sense to just not go to school.

Unsecured debt like student loans has incredible risks and the laws in the US aren't very strong in favor of forcing people to repay so a lot choose to just ignore the loans causing them to be even riskier and screwing it for the people who plays fair. Eliminating the subsidy without looking at everything else in play here is dangerous.

<comment><USER6> Except the subsidy isn't going away -- it's just being limited to the feds' own Department of Education loan program, which will then mea less diversity in process/administration.

I doubt that will mean loan policies become more stingy; being stingy (even when required by a clear-eyed cost-benefit analysis) is not what the feds are good at.</comment></comment></comment></comment>


Seth Godin Meddle - <AUTHOR> https://meddle.it/content/8a7416fd41b831e80142483d6c2d6463/public?pid=home&sid=fc

<comment><AUTHOR> Meddle is a micro-blogging platform that allows individuals to add commentary on selected excerpts of articles.

Bloggers can embed Meddle in their Wordpress accounts to essentially turn comments into shareable pieces of content that can translate to page views.

Thoughts?</comment>


Show HN: Disciple – Launching our new community platform - <AUTHOR> https://www.disciplemedia.com/ <comment><AUTHOR> Up to now we've been helping communities with their own native apps but today we are excited to launch the self-serve PWA version of our platform.

Gather, engage and monetise your network with your own community platform. Create unlimited groups to segment your audience, sell online courses and subscriptions, promote events and structure content with a content library.

Check us out on PH today too : [https://www.producthunt.com/posts/disciple](https://www.producthunt.com/posts/disciple)

</comment><comment><USER2> Looks great!</comment>