Bootstrap yourself to write an OS from scratch - happy-go-lucky https://github.com/tuhdo/os01 <comment><AUTHOR> I love this :D Very much in the spirit of my own _Computer Graphics from scratch_ [0]

On an unrelated topic, I wonder whether this popping up in the front page is indirectly related to this comment [1] I posted here yesterday. Many, many times I read interesting comments on HN posts, forget about the topic, and a day or two later, another closely related post appears on the front page. I suppose these comments generate follow-up research that ends up in other interesting articles being discovered and shared. Is it just me? Have you observed this as well? Is HN actually becoming some sort of hacker collective consciousness?

[0] [http://www.gabrielgambetta.com/computer-graphics-from- scratc...](http://www.gabrielgambetta.com/computer-graphics-from-scratch)

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

<comment><USER2> So one use I have for HN is that I upvote submissions that are things that I want to come back to and read later. I know bookmarks are kind of made for this, but I've never really gotten into the bookmark thing. (For that matter, I also rarely use the speed dial on my phone..) That's probably because I change computers/browsers regularly, and having lost all my bookmarks years and years ago, I stopped using them.

It also bothers me to treat upvoting "comments" this way.. I want it to stay under the "upvoted submissions" link on my profile. So I googled "computer graphics from scratch site:news.ycombinator.com" and upvoted the first submission that linked to your page.

I guess what I'm getting at is that method somehow feels wrong to me. Anyone have suggestions for "read-it-later" type bookmarks?

<comment><USER3> >That's probably because I change computers/browsers regularly, and having lost all my bookmarks years and years ago, I stopped using them.

Something similar happened to me, so I started storing my bookmarks under revision control. I don't add to them too often, so committing & pushing is a process that reminds me to not bookmark things unless they're _really_ interesting.

[https://github.com/skx/bookmarks.public](https://github.com/skx/bookmarks.public)

<comment><USER4> cool. I was looking to build something like this for a while. But never give serious thoughts. I am inspired again now. Along with links/bookmarks, I really want a support for words also. Because many times, it is just easy to save words and later query using google e.g. Radix Sort

</comment></comment></comment></comment><comment><USER5> At a glance, this looks to be the most gloriously valuable thing I've seen in eons. Due to the software industry's resounding success at canceling out the resounding successes of the hardware industry, causing veritable supercomputers to groan under the weight of such complex tasks as displaying a character in a timely manner after I type it, I plan to spend my retirement years reinventing the whole stack from scratch, Terry A. Davis style. It's my way of seeking justice for all the times I had to go get a coffee while my OS renamed a folder or the browser struggled to return to usable state after I foolishly risked _scrolling the page_. I usually conclude that the only sane way to do this would be to build on top of a bare-bones linux kernel, but perhaps something in this book will persuade me to set even less realistic goals. At any rate, looks like a fantastic resource!

<comment><USER6> See here for other people with the same idea (and others): [https://groups.google.com/forum/#!forum/idealos- design](https://groups.google.com/forum/#!forum/idealos-design)

</comment></comment><comment><USER7> bit sad in the era of 64 bit computing still every resource is at most about protected mode. osdev wiki has some info about long mode, but it's all fragmented. Been working now for ages to try to decipher amd and intel manuals about that :'). Still ,nice this page, always good to inspire people to write their own system softwares because i think it's to much 'magic' still where as it's doable even for 1 person to write an OS that is dedicated to for example a single task runnign in user mode. writing a multi-user / multi-purpose OS is maybe more work, but in those OSs a lot of problems exist today which is causing a need for people (imho) to step back and look at if this is really the way we want to go with computing... i don't see why a webserver or something with a single purpose like that needs to be on a multi-purpose OS. It just increases complexity and overhead and people have a world of trouble configuring an OS to do just 1 task good, have to stip our 90% of what comes with a basic install to reduce attack surface and get resource usage under control. I hope we will see more dedicated purpose OSes come up which handle 64 bit, and perhaps someday some resources for programming specifically that. I'm thinking of sharing some of my knowledge on the area sometime, but i dont know how much interest there is and seeing as i'm a bad writer and still pretty shit coder it will probarbly take me too much time now compared to how much use it would be (if i do it, compared to some veteran in the field!).

<comment><USER8> > bit sad in the era of 64 bit computing still every resource is at most about > protected mode.

I've an interest in writing a hobbyist OS, and I completely agree. Also, (almost) everything focuses on BIOS, rather than UEFI. And again, (almost) everything focuses on calling things from C, with a minimal amount of assembly, rather than doing everything from assembly.

I'd like to see a resource which walks through an honest-to-goodness minimal UEFI application written in assembly. At the moment, I think that I'll need to write it myself …

<comment><USER9> On the doing everything from Assembly.

[https://www.cl.cam.ac.uk/projects/raspberrypi/tutorials/os/i...](https://www.cl.cam.ac.uk/projects/raspberrypi/tutorials/os/index.html)

</comment></comment></comment><comment><USER10> It's awesome in the most literal sense of the word that someone wrote a 300-page _book_ on this topic and just put it online for anyone to read for free. I hope I can contribute at this level at some point.

</comment><comment><USER11> Another good link for people looking for something like this: [https://wiki.osdev.org/Main_Page](https://wiki.osdev.org/Main_Page)

<comment><USER12> Also BrokenThorn entertainment has an EXCELLENT tutorial on writing an OS from scratch.

</comment></comment><comment><USER13> I started following a couple of OS-from-scratch guides a while back. There are a few that are very similar and will get you through the basics. I got things working up to the point of having a little OS that would boot up and take keyboard input and display it in a text terminal in various colors. This was all very straightforward and worked pretty well.

The next thing I wanted to work on was some type of process manager that would allow for multiple processes to run, each in a protected memory space. That's when it started to get pretty hairy and that little learning project bogged down. As I recall, my decision paralysis mostly stemmed from the fact that there were successive generations of ways to handle memory allocation and protection on the i386/x86_64 families, and the clear way that I should implement my little OS branched off into a lot of choices with ramifications that I was hesitating to commit to.

I'd love to go back and pick that project up where I left off. I'll muscle past that learning curve, but are there any good guides out there with more information on how modern 64-bit process management (including memory protection) is accomplished?

</comment><comment><USER14> Seems analogous to the XV6 project: [https://pdos.csail.mit.edu/6.828/2017/xv6.html](https://pdos.csail.mit.edu/6.828/2017/xv6.html)

<comment><USER15> _For many years, MIT had no operating systems course. In the fall of 2002, one was created to teach operating systems engineering._

That's surprising, since just about every CS program offers/requires an OS course. Does anyone know what took MIT so long?

</comment></comment><comment><USER16> Anyone know of any other resources about operating systems for beginners?

<comment><USER17> For an introduction to the theory, Nand2Tetris[0] starts you out with nothing more than an xor gate from which you construct every other logic gate, implement a CPU, then in part 2 you build an OS on top of that. Although that sounds intimidating, it's actually incredibly accessible. I went in knowing nothing about the topic, and was able to implement the CPU by the end of the course, which was a major confidence boost. Also I found the lessons learned from the course (basically, layer simple systems with clear interfaces together to get complex systems) extended well beyond just CPUs and OSes to software design in general.

That uses a very simple educational architecture designed for ease of learning, though. If you prefer a good introductory resource for real-world operating systems, I just finished Georgia Tech's Intro to OS graduate course[1] and found it very accessible as well, and now feel reasonably comfortable with the theory when reading about OS topics elsewhere.

[0] [http://www.nand2tetris.org/](http://www.nand2tetris.org/)

[1] [https://www.udacity.com/course/introduction-to-operating- sys...](https://www.udacity.com/course/introduction-to-operating-systems-- ud923)

<comment><USER18> I haven't done the course, but I'm fairly sure that XOR isn't a universal gate, so you probably don't start out with "nothing more than an xor gate." Based on the name, I would guess you start out with only NAND, which is a universal gate.

<comment><USER17> Sorry, obviously yes, it starts with NAND. No idea where I got XOR from.

</comment></comment></comment></comment><comment><USER19> I would've done paging before task switching because TSS is such a broken way of doing things. Processes should live in their own separate address spaces.

</comment><comment><USER20> Been following this project since it was in the rougher earlier days. Really glad to see it come together. Congrats!

</comment><comment><USER21> How many of these large grand "tutorials" actually get completed?

I am still waiting to write my compiler in haskell [0] and to learn linux inside out [1]

[0] [http://dev.stephendiehl.com/fun/](http://dev.stephendiehl.com/fun/)

[1] [https://github.com/0xAX/linux-insides](https://github.com/0xAX/linux- insides)

</comment><comment><USER22> Wow, there is a lot of really good info in here, keep up the good work! Looking forward to part 3!

</comment><comment><USER23> Is there a book like this but on building your own custom version of Android?

<comment><USER24> Yes. _Bootstrap yourself to write an OS from scratch_. As it says at the very top: "How to write an operating system from scratch by reading hardware datasheets. In the real world, it works like that. You won't be able to consult Google for a quick answer." To write an Android clone, you'll need to understand how cellphones work, which involves reading hardware datasheets (and possibly signing a few dozen or so NDAs to obtain the information).</comment></comment>


The observable universe at logarithmic scale (artist's impression) - <AUTHOR> http://upload.wikimedia.org/wikipedia/commons/e/e7/Observable_universe_logarithmic_illustration.png

<comment><USER2> Nice digital art I should say. But isn't the universe more beautiful that this one? I'm just saying</comment>


Bluetooth gloves - the worst or best idea ever - <AUTHOR> http://www.gearxs.com/Smart-Gloves-Bluetooth-Call-Recieving-Gloves-with-Conductive-Texting-Finger-Tips

<comment><USER2> Pretty cool, seems like more of an expensive novelty item. What happens if they get wet? It doesn't say anything about them being waterproof.

</comment><comment><AUTHOR> either way, they are on sale and I just bought one :P</comment>


Ask HN: Why do gravity waves travel at the speed of light? - <AUTHOR> ELI5 (OK, ELI20, but not a general relativist).
The speed of light is the speed of propagation of electromagnetic radiation.  It is fixed by two constants:  the vacuum (electrical) permittivity, and the vacuum (magnetic) permeability.
Why should the speed of propagation of gravity waves have anything to do with either of those?  They aren't electromagnetic at all.
Or does something more fundamental force both electromagnetic and gravity waves to travel at c, and that more fundamental something thereby imposes a relationship between the vacuum permittivity and the vacuum permeability?  If so, how? <comment><USER2> c is a constant of the universe, it's not related to light :)

There are some important constants of the universe, one of them is c. Let's call it "c" without a friendly name in English.

You can (theoretically) measure c in the laboratory without in pure mechanical experiments in experiments that are not about light. The easiest experiment that I can imagine now is the change of the half life of the muons [https://en.wikipedia.org/wiki/Time_dilation_of_moving_partic...](https://en.wikipedia.org/wiki/Time_dilation_of_moving_particles#Experiments) but I'm not sure to classify it as "pure mechanical experiment".

c is the only speed that doesn't change when you go from a inertial reference frame to another inertial reference frame (i.e. if you have a train moving at a constant velocity and you measure something inside the train or measure it though the window from the platform.)

For some technical reasons the speed of all massless particles must be c. (Because they must travel at the same velocity in every reference frame, because all the reference frames are equivalent.)

And all the waves that can travel in empty space for a long distance must be massless. So the photons and gravitons travel at c. (The theory of gravitons is far for complete, but just ignore this detail.)

For historical reasons, the first time that someone measure c was while trying to measure the speed of light. So they called it "the speed of light". Much later Physicist realized that c was an important constant of the universe and not only the speed of light, but the name stuck and is too late to change it.

So ...

* gravitational waves travel at c

* light waves travel at c. Actually it's better to define mu0=1/(c^2.epsilon0) or something like that. In special relativity electric and magnetic fields are very related, (it's similar to the relation between space and time, but not exactly the same relation). So it's "better" to think that they have only one constant and c, than thinking that they have two independent different constants. Physicist still use two constants, for historical reasons and because sometimes it makes the calculation easier.

</comment><comment><USER3> First a nitpick: gravity waves are those things you see on the surface of the ocean. You're asking about gravitational waves, which are a disturbance in the curvature of spacetime.

As for the speed, nobody knows! In fact for the last 100 years it was only conjectured that they travel at the same speed as light. It was only last year that a really solid measurement was taken by simultaneously observing a neutron star inspiral in both visible light and gravitational wave observatories.

Presumably when you make your Grand Unified Theory you'll have to explain this.</comment>


A look at Sidecar's on-demand logistics infrastructure - <AUTHOR> https://www.side.cr/under-the-hood-a-look-at-sidecars-on-demand-logistics-infrastructure/ <comment><AUTHOR> I've always wondered what Postmates and other delivery services do about the no-parking-near-crowded restaurant problem. This seems like an interesting solution, to have designated "walkers" pick stuff up and hand it to the drivers.</comment>


Elixir: Simple Object Orientation and charming syntax on top of Erlang - <AUTHOR> https://github.com/josevalim/elixir <comment><USER2> From the article:

 _"- 13 x 10 % = > 130 "_

Good grief, I hope not! :D Unless there is some subtle difference in Erlang between - 13 and -13 (one - might be the negation operator and the other might be the subtraction operator for instance). Hopefully this is just a typo.

With respect to the atoms, since they are basically a bunch of constants that never get dereferenced and so cannot be garbage collected, wouldn't a better way to handle this be to create some kind of out-of-memory look up table, preferably one with good caching of commonly used values?

My understanding of one of the core reasons that erlang is valuable is because of its robustness in a multi-threaded environment. It would be a shame to undermine that robustness by having it blow up because of too many global constants.

<comment><USER3> "With respect to the atoms..."

The only sane choice here is for Elixir atoms to be Erlang atoms, in the fullest sense of "to be", so that restriction is coming from Erlang, not Elixir. Erlang does exactly what you say; the memory leak in question is when you blow out that table. The Erlang language and runtime permit dynamic atom construction, which is useful because atoms are also the way functions and modules are referenced and it's nice to be able to dynamically compute such things, but if you continuously generate new atoms, you'll run out of memory.

</comment></comment><comment><USER3> Comments:

I'm not sure of the virtue of rewriting the Erlang atom rules. apos-quote-atom name-quote seems particular odd, since Erlang already accepts apos-atom name- apos. Though if your grammar requires it, I'd understand. (Though it would still be acceptable to just make it apos-delimited at all times, I think.)

You may actually want to consider deliberately _not_ including head and tail methods on list, as it's usually a sign you're doing something wrong where you should be pattern matching. I'm not saying this is a totally winning argument, but you may want to think about it. (It's better to encourage good code practices than make bad ones easy, and I think when designing languages or even just APIs that's the better perspective to come from, rather than "number of features".)

I'm not sure about the wisdom of making a super-special exception for empty lists to be false. I know the functional heritage behind that, but Erlang is not as list-centric as Lisp and that seems an invitation to more problems. I actually like how strict Erlang is with its "true and false are the only booleans" and if anything think you should be _strengthening_ that, not weakening it.

In fact, in general, while I approve of the general idea of laying objects over Erlang in a useful manner, I think you want to distinguish between extending Erlang, fixing obviously broken things about Erlang (yes, thank you, default UTF-8 strings-as-binaries!), and merely _tweaking_ Erlang. Tweaks are very much to taste, and may be very much more expensive than you realize, both in implementation quirks and the number of people you chase away from one of the core groups you need to attract to have success, which is current Erlang users.

In the case construct, IMHO the "match" clauses ought to be on their own indentation, not matched to the case. Obviously cosmetic. You don't mention whitespace sensitivity, so I assume you aren't using it.

On try and except: You may want to consider requiring that all exceptions be objects, required to be inherited from a base class. Consider Python's experience with exceptions and how they have had to slowly and painfully deprecate strings as exceptions. Erlang exceptions would have to be marshalled into a generic class; consider Perl's Error module for examples on how that works. Also consider giving the user some control over what that automatic marshalling is, be that setting the class or monkeypatching methods in or what have you. Exceptions-as-objects are very powerful but that power dissipates very quickly when you can't count on the exception being an object. (Also that automatic Erlang error class should be a subclass of the top-level Exception, it should not itself be that top-level exception. Subclassing is an "isa" operation, so if the base-level Exception class is also the Erlang-error- marshalling class, that's a claim that all exceptions is-a exception marshalled from an Erlang-level error.)

String interpolation: String interpolation is _freaking dangerous_ and few people treat it with the respect it deserves. String interpolation is basically an invitation to write an escaping failure of some kind every time you interpolate anything. (XSS, SQL injection, Javascript injection, all sorts of things.) Strongly consider some way to make it easy for users to add easy- to-use encoding functions as part of the interpolation specification, and consider giving them some way to actually _always_ default to some level of encoding and requiring an override to do raw interpolation. Or rigidly require a specification of encoding function with every interpolation spec; I think it is absolutely worth an extra character per interpolation point, giving the incredible number of massive security holes interpolation causes. Actually this has nothing to do with Elixir per se, this is almost universally a problem, I can count on half-a-hand the number of times I've seen this done even remotely safely.

inlist in the list comprehension is a grammar smell. You may want to consider backing off the magic there, I'm not sure it's actually winning you anything. Anywhere a language "hides" something from you is an abstraction that can leak.

Method visibility is extremely, _extremely_ , almost unspeakably overrated. It is not a core aspect of object orientation. If you've added that because you passionately believe in it, ok, go for it. But if you've added it merely because you think it's how OO is done, I _strongly_ recommend ripping it back out. It will be a recurring source of pain for very dubious benefit.

One thing that was missing: I'm looking for an OO-based Erlang layer that allows me to write one thing that matches the gen_server behavior, and then allows me to subclass from there to obtain yet more things that are also gen_servers. Perhaps you have that and chose not to show an example, but for me any OO layer missing that feature is a non-starter. As a general principle, work with OTP to the extent possible, don't create a parallel implementation, which I'm just saying so I've explicitly said it.

Also, let me just be clear, this is all my opinion based on relatively rapidly reading that document, but I thought it worth sharing.

<comment><AUTHOR> Thanks jerf for your feedback even though it was based on rapidly reading the document. I will address a few things:

1) In general I am trying my best to not change the syntax for Erlang data structures. Atoms were one of the few exceptions due to the grammar. I chose to go with the lisp syntax (and similar to Ruby :symbol). But indeed I could have chosen it to be apos-delimited at all times to be closer to Erlang, I have to think more about it.

2) head and tail: good point. The reason they are there though, is if you need to dynamically dispatch a method to retrieve the head or the tail. But in general, I don't think we should limit the language to avoid people writing bad code. We can better solve this problem with good docs (therefore I have removed such bad examples from the README).

3) Empty lists being considered false: I was not sure at the beginning if they should evaluate to false or not but after your feedback I have decided to change so just false evaluates to false. Although in some cases it if feels very weird that a proper nil is missing, for instance Object.__parent__ returning an empty list that evaluates to true feels weird. Maybe I should add nil down the road.

4) "Merely tweaking Erlang" can you give examples where we may be merely tweaking Erlang?

5) case/match: I borrowed the syntax for Ruby and yes, Elixir is not whitespace sensitive. In Ruby, people indent case/match in both ways, I am particularly fine with both.

6) try/catch: yes, I also would like exceptions to be objects (like Python and Ruby). However, the fact I cannot easily have custom guards in Erlang makes that considerably more complicated to implement. Maybe we can add it in the future if more and more people start to use Elixir enough to justify putting a lot of effort in complicated features.

7) String interpolation: I am not aware of such issues. If you could point to more references or discuss it better, I would really appreciate it!

8) The inlist is because we need to make a difference between list and binaries when there is an ambiguity. So what exactly do you propose? To always be explicit here (using inlist or inbin)? Notice that this is an Erlang limitation, the Erlang syntax uses <\- and <= to make a difference between them both.

9) Method visibility: hrm, you are actually right. I could have started without this feature and have added it if I eventually needed it. We need the private methods (because they map to local not-exported methods in Erlang) but protected methods could definitely be gone.

10) The GenServer example is not missing, it is in the examples/ folder (too long for the README):

[https://github.com/josevalim/elixir/blob/master/examples/gen...](https://github.com/josevalim/elixir/blob/master/examples/gen_server.ex)

Elixir has also Code::Server (that stores your load paths) and ExUnit::Server (that stores your test cases) that could be used as examples. GenServer in Elixir is very OO'ish and I am particularly happy with the current implementation after going through a few iterations.

Writing Elixir has been an extremely rewarding experience and reading your feedback makes it even better. Thanks again for sharing and I hope you can eventually use it and help us improve it more!

</comment></comment><comment><USER4> This is really quite nice. Mixing objects with pattern matching is something that I've always wanted and found lacking in many languages.</comment>


The New Chinese Diaspora - <AUTHOR> https://www.lowyinstitute.org/the-interpreter/new-chinese-diaspora <comment><USER2> I get the point of the 'new' vs 'old' as in the post-2010 and 80s-90s generation, but it seems a pretty shallow look at trends given the century-old Chinese diaspora since the collapse of the Ching Empire.

I don't really get the point of making the distinction between the globalization and increasing mobility of the current generation and previous generations because that mobility is true of many other regions and countries (i.e. India).</comment>


Lockfree algorithms - <AUTHOR> http://www.1024cores.net/home/lock-free-algorithms <comment><USER2> If you want to study the subject in more depth, I cannot recommand enough "The Art of Multiprocessor Programming" by Herlihy and Shavit. It has a nice theoretical part, followed by more practical applications.

I also enjoyed "The Art of Concurrency" for a antagonist approach to a close domain. It may be more accessible.

<comment><USER3> _I cannot recommand enough "The Art of Multiprocessor Programming" by Herlihy and Shavit._

Seconded. Its a great book, possibly my favorite book on the subject. I also like "Patterns for Parallel Programming" by Timothy Mattson, Beverly Sanders and Berna Massingill.

</comment></comment><comment><USER4> Rumor has it that Haswell-EP is going to bring 16 core, 32 threads CPUs (up from the current 10 core, 20 thread chips), allowing for 128 threads on a 4 socket systems.

Which is to say, we're actually not that far way from the title of this site becoming quaint, like Teradata does today - assuming Moore's law holds for a while.

Interestingly, and not coincidentally, Haswell is also the first chip that will support hardware transactional memory, which should speed efforts like PyPy's STM, which enables you to write code without manually locking anything.

<http://morepypy.blogspot.co.nz/2012/06/stm-with-threads.html>

Great submission though - bookmarked!

<comment><USER5> Considering the problems that Sun ran into with Rock, and the opinion that Cliff Click has for Azul's own HTM implementation, I wouldn't get excited yet.

<comment><USER6> >Considering ... Azul ...

I would like to consider: what did he say and when/where?

<comment><USER7> There's this: <http://news.ycombinator.com/item?id=526144>

</comment></comment></comment></comment><comment><USER8> This is awesome. I wish HN had more articles like this.

</comment><comment><USER9> I found a nice introduction to lock-free data-structures here: <http://www.cse.yorku.ca/~ruppert/papers/lfll.pdf>

It is restricted to linked-lists but has some nice take-aways and worth the read.

<comment><USER10> The MidiShare folks had something interesting to say about lock-free coding in the late 90's, early 2000's. Unfortunately their papers are not available in grame.fr's re-design but they are available through archive.org:

[http://web.archive.org/web/20060427171449/http://www.grame.f...](http://web.archive.org/web/20060427171449/http://www.grame.fr/Research/pub.html)

EDIT: I found the new home:

[http://www.grame.fr/Recherche/rsrc/pub/index.php?lang=fr&...](http://www.grame.fr/Recherche/rsrc/pub/index.php?lang=fr&type=ARCH)

Specifically, this report titled "Lock-Free Techniques for Concurrent Access to Shared Objects":

<http://www.grame.fr/Ressources/pub/fober-JIM2002.pdf>

It turns out that for MIDI (and Audio) processing, lock-free techniques are quite handy .. Of course it helps if your CPU has compare-and-swap instructions, which most do these days ..

</comment></comment><comment><USER11> Nice post on a topic I'm always interested in. Clicking through multiple pages with ads around is a pain though. I would suggest the author to publish it as an ebook in pdf. I would definitely buy a copy if it's in $5-15 range.

</comment><comment><USER12> So far a nice discussion... and it goes on and on and on... I'll be reading more later</comment>


Group of homeless moms and families are taking over a house – this time in L.A - <AUTHOR> https://www.latimes.com/homeless-housing/story/2020-03-14/homeless-moms-occupy-house-los-angeles-caltrans-coronavirus-pandemic <comment><USER2> This is basically theft. I bought a home in my home country and still working in foreign land to pay for it, so the home stands there empty, but i would kill if somebody would just "occupy" it while i am landlocked in a different country because corona.

<comment><USER3> This is wrong on so many levels.

First; no, it's not basically theft. Theft is when you take away something without permission. They are not taking away the house, they are using it. So, it's basically not theft.

Second; this is a vacant house, it's not currently used. By not renting out houses to an affordable prices, the landlords are creating artificial scarcity. Desperate people make desperate choices, if you don't offer them any other options.

So I'm all good with that.

<comment><USER4> Please tell us where your car is parked--I'm sure that you're frequently not using it.

I do think we as a society should ensure that all can be housed. But random squatting is not the answer.

(Also, for those who have never dealt with it, squatters tend to be intensely destructive of property.)

<comment><USER3> > I do think we as a society should ensure that all can be housed.

That's a good point. That we should indeed.

</comment></comment></comment></comment><comment><USER5> "<thing> is a human right" == "please spend time, money, and effort so as I can have it without paying, sucker"

Now replace it with housing, healthcare, and any other thing du jour.

<comment><USER3> As a society, the moment that you allow for private property, you take over responsibility for the livelihood of everyone.

Property is theft on the common good. If you steal from the common good, you have to deal with the consequences. If you deprive people from making their own living, you have to accept that these people will find ways and means.

You didn't build that.

<comment><USER5> You sound like someone who isn't aware of the wonderful events where tens of millions of people suffered and died of starvation and political prosecution where such schemes were plentiful.

Perhaps living in the USSR was indeed the golden years for you?

<comment><USER3> You sound like someone ... [insert boring and repetitive, possible derogatorive epithet that doesn't provide anything useful to the conversation and end with a snarky, rhetorical question].</comment></comment></comment></comment>


Logo Quiz Game - <AUTHOR> http://whathelogo.com/

<comment><USER2> "No need to fill a form, just a simple click on Connect with Facebook or Twitter and here you go, you are ready to play and earn points."

Why? I do not have a Facebook account or a Twitter account. Why do most web services insist of having one of these accounts? I do not want to keep my "high score" for the imaginary Internet points. I do not want to see how others are doing. I just want to take the quiz.

You just lost someone who would have definitely played this game and spent time on the site.

Great idea though. I have shared this with my friends.

<comment><AUTHOR> You're right. I will update the login form soon, thanks for your feedback.

<comment><USER2> np. Please take this as constructive feedback; I would love to play this game. If you want to have some sort of a registration system, do check out Reddit's method -- simple registration without the need for an email address even.</comment></comment></comment>


Construction Costs in the Nordic Countries - <AUTHOR> https://pedestrianobservations.com/2019/05/03/construction-costs-in-the-nordic-countries/ <comment><USER2> The two most provocative paragraphs for me were the last two:

> And yet, I don't see that much praise for Nordic infrastructure. There are > people in the English-speaking world making grandiose claims about how > democratic countries need to be more like China and about how > authoritarianism is just more efficient. I don't know of any making that > claim about how Nordic social democracy is more efficient, with its > depoliticized state apparatus, multiparty elections, high levels of > transparency, bureaucratic legalism, and near-universal collective > bargaining.

> Across all levels of public transportation investment, from high-speed rail > down to routine track upgrades, we see inexpensive, efficient projects in > the Nordic countries. They achieve high levels of rail usage without > megacities in which only masochists drive, and keep expanding their networks > in order to complete the green transition. Public transit managers in not > just the laggard that is the US but also Germany and other relatively solid > countries should make sure to study how things work in Scandinavia and how > they can import Nordic success.</comment>


London Met Police lab uses "electrical network frequency analysis" (ENF) - <AUTHOR> http://www.theregister.co.uk/2010/06/01/enf_met_police/

<comment><USER2> Here's a white-paper with more detail about the technology.

<http://www.diamondcut.com/Downloads/AppNote4DiamondCut.pdf>

The author describes a case-work example where he compares an analyzed audio file to ENF data from the power company (?) about the building and can prove it wasn't recorded on the claimed date and there were multiple deletions.

</comment><comment><USER3> Seems like a suitable countermeasure would be a localized source of randomized ENF (say a Zener diode in cascade overload in a low-freq oscillator), but the coupling would be sufficiently different as to highlight the deliberate attempt at ENF obfuscation.

As the U.S. has essentially 5 power grids, they would need a more detailed database too. Still, fascinating stuff.

<comment><USER4> Random ENF would not work, since you could filter it out and look only at the 60 hz +- a few ppm signal. You need a random source that is very very close to 60 hz, but just slightly different.

But that might not be enough - the original signal is still there, and it's much stronger than your noise. The frequency is still powering your power supply, and still causing a 60 hz variation in the voltage.

You would need to isolate the power supply completely, or run it entirely through your noise adder. It would work best if you could add the noise to the DC output of the power supply.

<comment><USER3> "You need a random source close to 60hz" Correct. I specified a Zener diode source coupled to an oscillator.

This would provide the signal noise filtering and phase-locked-loop (e.g. the necessary +- ppm signal power spectral distribution control).

Given propagation losses, my ENF signal doesn't have to be nearly as powerful --merely more closely coupled to the device(s) being "shielded".

Also, I think a so-called fast-switching DC-to-DC converter would provide the necessary isolation. Plenty are being manufactured now that isolate down to 40Hz, but outside of the audiophile realm, that quality of filtering isn't typically used for low-power applications.

</comment></comment></comment><comment><USER5> On a similar note, I've been meaning to run an FFT on some classic rock tracks and see if I can tell by the hum and harmonics whether they were recorded in the US (60 Hz) or the UK 50 Hz).

It's a clever idea, but I can think of a few ideas that might make it less effective.

</comment><comment><USER6> Keep in mind, the story is from The Register. Not all the details can be taken at face value.

</comment><comment><USER7> _Old magnetic cassette and VHS tapes didn't keep time accurately enough to extract reliable data, but now we can analyse even cheap voice recorders._

Hmm... It's been my experience that even miniDV cameras and digital audio recorders can have significant variations in their recording speed over time, which would have to be detected and corrected in order for this technique to work. I once tried to use a laptop with a USB audio interface to record audio and a DV camera for video, but could never sync up the audio and video because the video rate was fluctuating up and down. If I synced up the beginning and end of a clip, the middle would be off by up to half a second.

Though there are techniques to detect and compensate for these variations (some of which were used to restore the wire recordings of Woody Guthrie released as The Live Wire), I'm not convinced the minute variations in the mains supply would survive.

Possible countermeasure: narrow notch filters on every harmonic of the mains frequency plus a high-pass filter, or adaptive noise filtering (such as used by noise reduction audio plugins). Get those hums down into the single-bit levels and you'd need a huge sample size to extract any useful signal.

Any statisticians want to comment on how much data would be required to conclusively identify time, place, and edits?

Edit: another question: could it be possible to detect sample rate jitter caused by periodic variations in the voltage supplied to the sample rate clock generator, even after the noise is filtered out? Could it be counteracted by randomly resampling sections of the audio up or down by a few Hz?

</comment><comment><USER8> A lot of "forensic science" doesn't seem very scientific at at all. This though, is really easy to test. All we need is a few independent organizations to send in recordings and get a timestamp back.

</comment><comment><USER9> My initial response was "Damn, I'm running everying off a UPS from now on" until I read this:

 _Battery-powered devices are not immune to to ENF analysis, as grid frequency variations can be induced in their recordings from a distance._

I'm slightly skeptical of that, but if it's true, it's pretty impressive.

<comment><USER10> "Damn, I'm running everything off a UPS from now on, and in a faraday cage if it's not far away enough from a mains line."

<comment><USER4> Faraday cages don't block low frequency magnetic fields. You would also need some mu-metal.

As a side note [http://www.science- products.com/Products/CatalogA/Filters+Di...](http://www.science- products.com/Products/CatalogA/Filters+Discriminators/HumBug/HumBug.pdf) claims to be able to get rid of the signal.

</comment></comment></comment><comment><USER11> There wasn't a good explanation in the article. Anyone want to break it down for the layman? I get that the power company can record variances in load and time stamp them, but how does that signature have anything related to a recording made on a battery powered device?

<comment><USER4> Not load.

Frequency.

Basically the entire US hums at 60 hz. (There are about 7 independent grids each humming separately.)

The grid is kept very synchronized, so the 60 hz is the same at every house. But the 60 hz is not exact, it changes slightly up/down. But when it changes, it changes everywhere.

So what they do is record the slight variation in the 60 hz hum, and keep it long term. (Like it's 59.9992 then 60.0001, etc, etc.)

The effect of the 60 hz, is to have a slight wobble in the DC voltage made by a power supply. This wobble then translates into a background noise in recordings.

Then compare the exact frequency of the hum to your long term recording and look for a match.

Even on a battery operated device the hum could still be there, because the local power line makes a slight electric/magnetic field, which is picked up.

<comment><USER12> So, with a long enough record of the wobble at hand, could we tell the exact moment any recording ever made was made, much like Dendrochronology?

And also locate the recording, due to the independent grids?

<comment><USER4> Only if you have a record of the frequency changes.

The article says that in London they have a record going back 5 years.

Is there any such record in the US? I have no idea. I don't think there would be - till this idea came up there was no reason to make such a record.

</comment></comment></comment></comment><comment><USER13> I predict that in a few years there will be commercial softwares to determine the date of an audio file, or if the cheating husband was indeed in the country he pretends, shortly followed by softwares to remove that information. There's a market there.

</comment><comment><USER14> Some buildings have their own conditioned power; should be immune. After this, probably most federal buildings!

<comment> a-priori A better defense would be to have a device that introduces random frequency variations into the building's power so it doesn't correlate with the power grid anymore.

<comment><USER15> Interestingly, the original signal would still be there, and perhaps vulnerable to statistical analysis?</comment></comment></comment>


Ask HN: Career Advice for a Senior Dev - <AUTHOR> (using a throwaway account as I know people in my reporting chain read HN ;) )
I am working in a field that regularly trends on HN once a week at least(It is within the top 10 trending stories right now). I have been working on this for the past 3 years and have been rated in the highest band for my work consistently all these years.
Of late I am feeling a little bored of this and need advice as too how to get out of this. I am confused as to; if this is a temporary feeling, or is it because I am the smartest person in the room.
Have you ever felt the same and how did you tackle this? <comment><USER2> I've been there. I felt that I had plateaued in a previous role. I ended up changing companies/industries to try something new. So far, it's working out well. I'm learning and growing on a more continual basis.

It's important to understand why you feel bored. If you don't take the time to do this, you may make an incorrect assumption and end up in a worse position.

<comment><AUTHOR> Thanks for the reply.

My work is tech based. The boredom is more due to the fact that I feel the lack of people who can mentor me(technically) with new ideas.

<comment><USER2> Yep. You're the expert now. You can move on to a different technology/industry in which you are not the expert, seek out new greenfield/white space challenges in your current field, or embrace the opportunity to become a better mentor/teacher/tech lead/presenter.</comment></comment></comment>


How To Install Django On Debian Etch (Apache2/mod_python) - <AUTHOR> http://www.howtoforge.com/installing-django-on-debian-etch-apache2-mod_python <comment><USER2> From the #python.web FAQ:

Q: Can you help me with mod_python? A: Sure. Don't use mod_python.

For more information: <http://wiki.python.org/moin/PoundPythonWeb/mod_python>

mod_wsgi is where the python world is going. I haven't had too many problems with mod_python, but mod_wsgi is a bit cleaner.</comment>


Steve Jobs Email: 'No Interest' In Radiation iPhone App - <AUTHOR> http://www.pcmag.com/article2/0,2817,2382537,00.asp

<comment><USER2> More accurately, "No Interest" in _adding APIs_ to the SDK to support a niche (and somewhat misleading) iPhone app.

<comment><USER3> Yea no wonder it was rejected, they are trying to add crap ware to the SDK. No thanks.

</comment></comment><comment><USER4> So it's basically an inverted signal strength meter, or does it do something more?</comment>


It Is What It Is (And Nothing Else) – Why Recursion Still Matters - <AUTHOR> https://existentialtype.wordpress.com/2016/02/22/it-is-what-it-is-and-nothing-else/ <comment><USER2> This is a prime example of the conflict between the "machine model" of programming (a computer is a large and elaborate state machine that advances instruction by instruction) and the "maths model" (by reasoning from a set of axioms and rules of production we can transform information or prove facts).

The former maps onto imperative programming, and the latter onto functional programming. It seems that different people find these models harder or easier to understand - and then get confused when not everyone sees it that way.

<comment><USER3> I think that the confuse comes from the fact that one wants to mix both views; after all, I don't remember see anyone being confused bu the classic recursive definitions (Fibonacci, factorial) in my school days. IIRC the factorial function is introduced in high school. It can literally be understood by a _kid_.

I believe the reason why people want to expose both views at the same time is that the math view doesn't really explains "how it works" as far as CS is concerned.

As far as I'm concerned, I can't imagine programming without the knowledge of how things work at assembly level. I think I would feel so crippled in my understanding that I would want to learn about assembly... again. I would probably not stand working with a machine that works on magic.

<comment><USER4> _> I can't imagine programming without the knowledge of how things work at assembly level._

The author's point is that recursion is a pervasive _concept_ that is essential to understand even how modern computer hardware works:

 _> the very concept of a digital computer is grounded in recursive self- reference (the cross-connection of gates to form a latch), which, needless to say, does not involve a stack. Not only do real programmers use recursion, there could not even be programmers were it not for that._

The author is not suggesting that we forget about "what's really going on". He's rightly pointing out that you actually cannot understand what's really going on at all without first understanding recursive self-reference.

<comment><USER5> Personally, I think that analogy conceals more than it reveals. Recursion in computer software requires nested definitions that eventually reach a simple base case resulting in termination. An sram cell or J/K flip-flop, on the other hand, doesn't involve nesting or reach a simple base case.

In my mind recursion is a snake that has eaten a smaller snake, whereas an sram cell is a snake eating its own tail.

<comment><USER6> > Recursion in computer software requires nested definitions that eventually > reach a simple base case resulting in termination.

I think you've just illustrated the article's point.

You're describing well-founded recursion, which is very useful, but doesn't include e.g. continuation-passing ( [https://en.wikipedia.org/wiki/Continuation- passing_style](https://en.wikipedia.org/wiki/Continuation-passing_style) ) or co-recursion ( [https://en.wikipedia.org/wiki/Corecursion](https://en.wikipedia.org/wiki/Corecursion) ), hence perpetuating the myths the article is complaining about.

The really unfortunate thing is that sub-sets of these ideas keep getting re- invented (AKA "reinventing the square wheel"), for example exception handlers in place of continuations, iterable objects in place of co-recursive data, etc.

As for J/K flip-flops, they're recursive because their output is their own input. For example, given co-inductive stream of `j` and `k` values (the flip- flop inputs), we can generate a co-inductive stream of outputs `q`:

        function flipflop(init_js, init_ks) {
          function ff(js, ks, q_old) {
            var j     = car(js);
            var k     = car(ks);
            var q_new = j * not(q_old) + not(k) * q_old;
            return cons(q, ff(cdr(js), cdr(ks), q_new);
          }
          return ff(init_js, init_ks, 0);  // Initiate the co-recursion with 0, arbitrarily
        }

Whilst I've used co-recursive data for convenience, the fact that the result `q_new` becomes the argument `q_old` for the next call is unavoidably recursive.

</comment></comment></comment></comment></comment><comment><USER7> It's interesting to use languages that do not harshly penalize recursion by imposing stack size limits. The upcoming GNU Guile 2.2 release, a Scheme implementation, has a dynamically expandable stack so algorithms that are naturally recursive can be implemented that way rather than contorted into iterative form to please the stack limit god.

For example, in Guile 2.0, this natural definition of 'map' will cause the stack to overflow on large lists:

        (define (map proc lst)
          (if (null? lst)
              '()
              (cons (proc (car lst))
                    (map proc (cdr lst)))))

The iterative solution is to construct the list backwards and reverse it as a final step:

        (define (map proc lst)
          (let loop ((lst lst)
                     (result '()))
            (if (null? lst)
                (reverse result)
                (loop (cdr lst) (cons (proc (car lst)) result)))))

There's no real gain here in terms of performance or readability. You trade a large stack for a large reverse operation at the end. Guile 2.2 allows a whole class of recursive algorithms that were not practical before because of the fixed size stack (like most languages I know of), and they perform well, too!

Needless to say I agree with this article. Recursion is an integral part of computing, and more programming languages should provide better support for it. Embrace it, don't avoid it!

<comment><USER8> But can you do that with something like fibonacci? You can't just tail-call optimize that away, can you, since there are two recursive calls?

<comment><USER6> I was under the impression that Schemes generally compile down to continuation-passing-style, and hence in the case of something like Fibonacci one of the recursive calls would be performed as a tail call, whilst the other would become part of the continuation, e.g. something like:

        function fib(n, k) {
          if (n == 0) k(1);
          if (n == 1) k(1);
          fib(n-1, function(f_1) {
                     fib(n-2, function(f_2) {
                                k(f_1 + f_2);
                              });
                   });
        }

</comment></comment></comment><comment><USER9> I was thinking about this the other day too. Recursion in CS101 is taught in such a bizarre way. At least it was back when I was in CS101. It was almost as though CS tries to discourage its usage simply because "most minds cannot understand it as easily as iterative loops".

<comment><USER10> Iterative loops are much easier to analyze and reason about, by humans and by computers. For example, they always terminate. To paraphrase Dijkstra, "I regard general recursion as an order of magnitude more complicated than just repetition, and I don't like to crack an egg with a sledgehammer."

[https://tinyletter.com/programmingphilosophy/letters/i-don-t...](https://tinyletter.com/programmingphilosophy/letters/i-don- t-like-to-crack-an-egg-with-a-sledgehammer)

<comment><USER11>
        Iterative loops are much easier to analyze and reason about,

This is not the case. Loops and recursion can be translated into each other, hence are of equal complexity in terms of reasoning. And you see that when you write down the Hoare-logic axioms for either.

What Dijkstra had in mind was probably simple, syntactically constrained forms of loops, like for-loops where the loop variable is read-only in the loop body. They are simpler than general recursion, sure. But there are corresponding simpler forms of recursion, e.g. primitive recursion or tail recursion that are much simpler than general recursion.

<comment><USER8> > Loops and recursion can be translated into each other...

True.

> ... hence are of equal complexity in terms of reasoning.

False. That's like saying that Stokes' Theorem says that the integral of a differential form over the boundary of a manifold is equal to the integral of it's derivative over the whole manifold, and therefore the two integrals are equally easy to do. In fact, the two integrals are often not equally easy to do, _which is the primary practical reason that we care about Stokes ' Theorem_ \- it gives us a way to convert hard integrals into easier ones.

You cannot use formal equivalence to prove practical ease of doing the problem.

But the situation isn't even that simple. A blanket statement that "loops are much easier to analyze and reason about" is _also_ false. It depends on the situation, and often on who's doing the reasoning. Different people think in different ways.

<comment><USER12> > You cannot use formal equivalence to prove practical ease of doing the > problem.

Agree completely, but want to bring it back to another computing topic: Technically, anything that can be computed with one Turing-complete language can be computed with another. And every language _clearly_ is not equivalent in terms of ease of understanding and reasoning about as every other language.

Trivially, compare computations in brainfuck to computations in C. Compare the recursive definition of tree traversal available in lisps to languages without recursion (some BASIC variants and others) where you have to jump through hoops and self-manage a stack.

<comment><USER11>
        compare computations in brainfuck to computations in C.

I'd suggest that this is an orthogonal issue. It's better to compare two otherwise identical languages, one where Turing-completeness is achieved by loops, another where the same is done by recursion. (Or a language that offers both). Then _formal_ reasoning is of the same complexity.

</comment></comment></comment></comment></comment></comment><comment><USER13> only bob harper would say that the stack is difficult for students to understand but propose structural operational semantics as a solution.

</comment><comment><USER14> I suppose I had trouble with recursion until I understood that each call should strive to be stateless - meaning, you don't try and remember previous results. Each new call should be just the same as the initial. You only act on the current set and try to reduce the problem further. Trying to remember previous iterations results in a lot of headaches.

</comment><comment><USER15> > Implementing recursion does not require a stack, nor does it require any > special provisions for managing the stack.

When I wanted recursion in Atari BASIC it involved implementing stacks for all my local variables (because there's not such thing as local variable in Atari BASIC).

Thinking about the task in terms of bits of work that should be put on a stack or in the queue felt way more controllable than recursion.

<comment><USER16> Once I needed to reimplement recursion in mathlab because the stack was too small, it was an interesting experience, I had a matrix-repurposed-as-stack and did all the push/pop manually while the recursion ran as a loop - goes to show that recursion isn't that essential if one knows how to split state, data and code properly.

</comment></comment><comment><USER17> Recursion is just induction backwards.

But you need to know what a stack is - because it gives you the practical depth to which you can recurse. Ditto with tail recursion optimization.

And that is why C should be mandatory. You must be able to translate the mathematical concepts into something real and tangible.</comment>


Ask HN: How can I use my phone as a laptop? - <AUTHOR> I have a powerful desktop PC for all the development work I need to do. I have tried and failed to get a laptop that does it all (portable, long battery life but still powerful enough), so I ended up with a laptop and a desktop. Then I realized that I don't use my laptop for anything except SSH-ing to servers and RDP-ing to my desktop, but I still need to maintain it (e.g. keep ssh keys and all kinds of other settings in sync, run updates, etc.).
I think that the best setup for me would be a desktop + phone + something similar to the now-unsupported HP Lapdock or the Mirabook (which is probably going to be a vaporware).
Are there any external screens that I can connect to my Android phone that have built-in battery? Any other ideas?
(What I do not want: custom scripts/software/git repo/etc. to keep my laptop in sync with my desktop. It doesn't work for me.) <comment><USER2> Samsung has along those lines for it's flagships (I think for the S8 and above) [https://www.samsung.com/global/galaxy/apps/samsung- dex/](https://www.samsung.com/global/galaxy/apps/samsung-dex/)

Sentio is working on something similar, but in their case actually having a laptop chassis for your phone. [https://www.sentio.com/](https://www.sentio.com/). Sentio is/was a kickstarter project. I have yet to receive my machine from them (as a word of caution), but their software is on Google Play.

<comment><USER3> The last post on the "See Superbook in Action" section on the Sentio website is from March 2017, so it appears that the project is either dying, dead, or just inactive.

Razer's Project Linda sounds cool, although it's still a concept with no hardware shipping yet: [https://www.razer.com/projectlinda](https://www.razer.com/projectlinda)

<comment><USER4> I noticed today that Superbook seems a little quiet too...

Still, Superbook has delivered an in-market piece of hardware, even though it's 1st gen.

Samsung Dex is a new generation of the past docks they had and are interesting too.

Razer and Mirabook look great but they won't be able to compare until you can buy one.

</comment></comment></comment><comment><USER4> Check out a Sentio Superbook.

Shipped hardware that is a Full HD Laptop dock for Android phones for about $150.

[https://www.sentio.com/](https://www.sentio.com/)

Edit: While folks are still waiting on deliveries they appear to be on eBay.

<comment><USER5> Doh! You beat me to the punch!

</comment></comment><comment><USER6> You need to get this Razer Linda dock [https://www.razer.com/projectlinda](https://www.razer.com/projectlinda) [https://www.theverge.com/circuitbreaker/2018/1/9/16866206/ra...](https://www.theverge.com/circuitbreaker/2018/1/9/16866206/razer- project-linda-phone-laptop-dock-touchpad-prototype-android-concept-ces-2018)

</comment><comment><USER7> Not exactly what you are asking but the Librem 5 phone (ships this year) apparently can be connected to a monitor as per this "Interested in a kit containing the Librem 5 phone with a keyboard, mouse and monitor? Check out the 24″ bundle and the 30″ bundle" [https://puri.sm/products/librem-5/](https://puri.sm/products/librem-5/)

</comment><comment><USER8> Samsung Note 9 Dex mode demo: [https://youtu.be/OeozWvxBgYU?t=174](https://youtu.be/OeozWvxBgYU?t=174)

All one needs a Note 9 and a USB-C > HDMI adapter

<comment><USER4> Samsung is awesome, I loved my note 1,2 and 4.

What makes Samsung unacceptable is their inability to regularly update their phones with up to date patches.

</comment></comment><comment><USER5> If you were fortunate enough to snag one, a Superbook from Sentio fits your request. It certainly is a "first-gen" device, but it does what you're looking for.

Ebay seems to have some currently.

</comment><comment><USER9> [https://maruos.com/](https://maruos.com/) but only works with some Nexus Phones so far.

</comment><comment><USER10> postmarketOS? It's not yet there, but it should get to that point.</comment>


Base65536 – Unicode's answer to Base64 - <AUTHOR> https://www.npmjs.com/package/base65536 <comment><USER2> This only makes sense if your metric is number of code points. You don't actually get better density with this.

Base64, encoded as either ASCII or UTF-8, stores 6 bits per byte; making it 75% efficient.

Base65536 encoded as UTF-8 (by far the most common) will split its characters about evenly between 3-byte and 4-byte encodings (it uses code points up to 165376 roughly evenly distributed [1]). That is 16 bits per 3.5 bytes, or 57% efficient. Much worse.

UTF-16 (what Javascript uses) is slightly better; you get a distribution about even between 2 and 4 bytes. That is 16 bits per 3 bytes, or 67% efficient. Better, but not as good as Base64 in ASCII or UTF-8. (However, it _is_ better than Base64 in UTF-16, which is only 37.5% efficient.)

Stick with Base64 unless you're strictly counting code points (like tweets do).

[1] [https://github.com/ferno/base65536/blob/master/get-block- sta...](https://github.com/ferno/base65536/blob/master/get-block-start.json)

<comment><USER3> > This only makes sense if your metric is number of code points.

Not quite! :) I wrote a similar tool I called baseunicode[1]. (Glad I'm not the only one who's discovered this!) The author here is using it for tweets (which oddly don't count bytes, they count code points); I wrote my version for copy/pasting data between terminals[2]: copying more than a screen's worth is a hassle, so "screen area" is the metric I'm trying to optimize, which ends up being subtly different from the article's, which is code points for a tweet. (for screen area in a terminal, some characters — CJK in particular — end up taking multiple columns; and combining code points (like acute accent) are basically free!)

In my case, it ended up being easier to use base64, because it's installed by default.

[2]: SCP is just a pain sometimes. If you need to read a file only privileged by root, AFAIK, it's out of luck. I'm usually going server-to-server, so I also need to remember to -3, which I inevitably forget. You can get around the root issue w/ `ssh source 'sudo cat /foo/bar' | ssh destination 'cat >foo', (or 'sudo bash -c "cat >foo" if you need root on the write…) but more work; often I find I'm already there in both terminals and I just want these bytes from this split in this other split, so I started doing `tar -cz <stuff> | base64`, copy, `base64 -d | tar -xz`, paste. And then screen size mattered, thus baseunicode.

[1]: [https://github.com/thanatos/baseunicode](https://github.com/thanatos/baseunicode)

<comment><USER4> > which oddly don't count bytes, they count code points

Not so odd, but very sensible! I'm always saddened by this oversight in SMS messages — they're 160 7bit characters, so 140 octets. But those 7bit characters are the GSM charset. If you want to write in other languages than Western European ones, your message will be encoded using UTF-16 — now you only have 70 characters. It might be OK for Chinese, but it's absolutely unusable for Cyrillic.

Of course, the limiting factor in SMS is architectural, whereas in Twitter, it's philosophical, so there's your difference.

<comment><USER5> There's only so many ways you can slice a kilobyte. Measuring bits is just the way to do it for data transmissions.

Support for compact representation of more languages would have been nice. Something like an 8 bit mode with 2 byte escapes for setting code page and 3 byte escapes for arbitrary unicode characters. As a bonus you'd actually be able to fit _more_ emoji in that mode, 46 vs. 35.

</comment></comment></comment></comment><comment><USER6> I was going to complain about lack of benchmarking, but then I saw the "Why" section - I wonder what else could be shared using a single tweet.

<comment><USER7> base65536 can fit at most 280 bytes in a tweet.

Most tweets I make are pure ASCII, which is 7 bit.

(280 * 8) / 7 = 320 septets

Well, 160 septets is the non-Unicode maximum length of an SMS.

So a tweet can fit two SMS messages in it!

<comment><USER8> You could do slightly better by not restricting yourself to the BMP. Full Unicode gives you almost 21 bits per code point, which is what Twitter counts. Round it down to 20 bits per "character" and you have 2800 bits = 350 bytes in a tweet, or 400 ASCII characters.

<comment><USER9> Unfortunately that won't work. Twitter doesn't support the full Unicode; they strip out any Unicode code points that's not used by "normal" people.

<comment><USER7> > they strip out any Unicode code points that's not used by "normal" people.

Such as?

<comment><USER10> LTR and RTL marks (all of them), which are used when the default Unicode bidi algorithm fails to display two intertwined scripts correctly. They are especially useful when writing short technical tweets.

I bet normal people would use them too if they knew about them and were given a chance, but normal people can't because twitter doesn't allow codepoints that aren't used by normal people.

<comment><USER7> Stripping out LTR and RTL override might be reasonable because they're frequently abused to screw up website layouts. But stripping _all_ of the marks is just discrimination against people who need to write bi-directional text.

<comment><USER11> > Stripping out LTR and RTL override might be reasonable because they're > frequently abused to screw up website layouts.

As long as Twitter allows Zalgo it isn't that concerned about website layouts.

(Zalgo: Rampant abuse of stacking combining diacritical marks above and below the line. It can get really, really... uh... _impressive_ , in a Lovecraftian typewriter art kind of way.)

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER7> HATETRIS is pure evil. Try it.

<comment><USER12> i got to 4 lines... incredible!

</comment></comment><comment><USER5> Base65536 that isn't actually 65536? Odd.

Base32k is a similar idea, but it stores exactly 15 bits per codepoint. It uses three ranges of unicode, going for simplicity.

Edit: Ah, I see, it uses 65536 + 256 codepoints across two planes for different numbers of bytes. Which means it is simple in its own way, but it's also wasting a significant amount of its code space.

<comment><USER13> > Base65536 that isn't actually 65536? Odd.

Well, Base64 isn't actually 64 either.

</comment></comment><comment><USER14> Why not use the Chinese characters (Kanji) to encode the moves in Chinese/Japanese semantics, instead of Base65536 ? It might not be as compact, but it would still be far more compact than Ascii _AND_ you'd be able to read it without decoding software if you learn how to read a little Chinese or Japanese.

<comment><USER15> It is significantly easier to write a format decoder than to learn to read, much less write, Chinese or Japanese.

Also, on a pedantic note, kanji are Japanese characters. Chinese characters are hanzi.

For most characters, they're the same, but there are a few differences.

<comment><USER14> Fair point.

As for the pedantic note, _kanji_ is an English word whereas _hanzi_ isn't, so that's why I used it.

<comment><USER15> eh... I think most people who recognize the word "kanji" at all are pretty well aware that it's a foreign word, and are likely to think of it that way. I do have a dictionary with an entry for "kanji", but that dictionary includes plenty of other foreign words too, like "haole" [Hawaiian term for non- Hawaiians, particularly (often pejorative) white people] (it doesn't have "hanzi", but it does have an entry for Han). I also have dictionaries that don't have an entry for "kanji".

</comment></comment></comment></comment><comment><USER16> Suggest: change name to Base64k.

<comment><USER17> I really like this, but I'm not sure that the joke is obvious enough. Also, Base64Ki for more precision.

<comment><USER16> Well maybe it would be less jokey if you called it BaseUTF8 and write it not use the code points that require more than 8 bits. :)

</comment></comment></comment><comment><USER18> Is ROT32768 Unicode's answer to ROT13?

<comment><USER19> It would surely solve that pesky problem that double-ROT13 is so insecure. (Hint: Unicode is larger than the BMP.)

</comment></comment><comment><USER20> Why did I just implement this in Swift? [https://github.com/harlanhaskins/Base65536.swift](https://github.com/harlanhaskins/Base65536.swift)

</comment><comment><USER21> This reminds me of "usenet binaries."

The very existence of binaries on usenet still makes me chuckle. It's such a strange medium for binaries, and yet it was so prolific.

<comment><USER22> NNTP is a general-purpose, globally meshed & distributed, channelized, eventually-consistent pub/sub bus. With optional ordering, GC, and replay semantics, and robust and stable implementations of both client and server protocol available in a variety of language bindings.

So the only real surprise is that it isn't everything's preferred loose- coupling substrate, but we do love reinventing the wheel.

</comment></comment><comment><USER23> Is there no end to the horrors spawned through Twitter's continued arbitrary limitation of 140 code points per tweet? :P

</comment><comment><USER24> Reminds me of this: [https://www.flickr.com/photos/quasimondo/3518306770/in/set-7...](https://www.flickr.com/photos/quasimondo/3518306770/in/set-72057594062596732/)

This is an attempt at encoding images in a tweet, by using Unicode.

</comment><comment><USER25> when would you ever use this? if you ever transmit unicode data, you have to encode it first. So one would probably encode this as UTF-8, which is binary. how about skip the middleman and transmit the binary directly?

<comment><USER2> This makes sense only if (a) your transport medium will only transfer graphical Unicode code points, and (b) you are interested in minimizing _code point_ count as opposed to byte count.

If (a) is not true, you are better off just using binary as you state.

If (b) is not true, you are better off using Base64 if the underlying encoding is ASCII-compatible (e.g. ASCII, ISO-8859, or UTF-8), or Base4096 if the underlying encoding is UTF-16.

In the case of tweets, both (a) and (b) _are_ true, making this somewhat worthwhile.

</comment></comment><comment><USER26> Turn into image

Use pic.Twitter.com

Get 5Mb of data storage

</comment><comment><USER27> I'll stick to base64 or even better base85 (Ascii85).

<comment><USER5> I've used base85 twice. Once internal to a database where it did stupid things with binary data, that went fine. Once for exporting data, that ended up breaking at random when formatters saw the tempting asterisks inside. I'd prefer base64 for most cases.</comment></comment>


Red-flagging misinformation could slow the spread of fake news on social media - <AUTHOR> https://engineering.nyu.edu/news/researchers-find-red-flagging-misinformation-could-slow-spread-fake-news-social-media <comment><USER2> Ah, but who defines what needs to be red-flagged or not?

"One man's 'freedom-fighter' is another man's 'terrorist'."

It isn't going to work.

</comment><comment><USER3> I would not attach a color to the flagging verbage. Makes it sound bias while both sides are producing, promoting, and consuming it.</comment>


Nokia to make smartphone comeback with duo of Android 7.0 Nougat handsets - <AUTHOR> http://www.theinquirer.net/inquirer/news/2465691/nokia-to-make-smartphone-comeback-with-duo-of-android-70-nougat-handsets <comment><USER2> Not exactly. Nokia licensed the brand for a new company.

HMD has made licensing agreement with Nokia Technologies, giving HMD sole use of the Nokia brand on mobile phones and tablets worldwide for the next decade, and cellular standard essential patent licenses. HMD does the sales, marketing and distribution. FIH Mobile Limited (Foxconn subsidiary) manufactures them.

</comment><comment><USER3> Nokia proper does not make phones anymore, but they are looking into wearables and likely smart health devices with the recent acquisition of Withings. As Nokinside pointed out though, it will not be manufacturing phones going forward for the foreseeable future. The ball game is quite different now, as Nokia's competitive advantage in phones was their extensive manufacturing base that allowed for extreme cost savings. That went out the window with the divestiture to Microsoft.</comment>


Here's how Google Fi will work with iPhones - <AUTHOR> https://www.theverge.com/2018/11/28/18116333/google-project-fi-apple-iphone <comment><USER2> "you should know that iPhones won't be able to make calls or text over Wi-Fi, use visual voicemail, or be used as data hotspots outside the US at all"

That's worse than a standard T-Mobile plan, which I'm currently on. I don't see any reason to switch.

Unrelatedly, The Verge's link to the iOS app goes through something called "go.redirectingat.com", which fails because it's on my tracking server blacklist. Seems pretty sketch.</comment>


Ask HN: Can you automate penetration testing? - <AUTHOR> Is it possible to automate penetration testing and not having to have humans doing it manually? If yes, how? If no, what parts can be and what cannot be automated? <comment><USER2> What do you mean by manually? There are several tools used for penitration testing each with a specific purpose.

For example, if you wanted to access a secure wifi network you may use a particular tool but if you wanted to break a password you would use another.

Beyond tools there are also specific techniques used to penitrate SQL databases etc..

I purposely have been vague and not named the tools and techniques for doing this.

That being said, there is a certain live linux distribution that starts with K and ends with ALI which has alot of pentest tools pre installed and I see no reason why you couldn't write a Bash script to "automate" things.</comment>


Twitter's Developer Hostility and What You Can Do to Help - <AUTHOR> http://taptivate.com/blog/twitters-developer-hostility-and-what-you-can-do-to-help

<comment><USER2> Important to mention StatusNet and Identi.ca, the open source, decentralized Twitter alternatives.

<http://status.net/>

<http://identi.ca>

<comment><USER3> Considering that I personally enjoyed Twitter more when it was "just us nerds," perhaps these services don't absolutely need to "catch on" or "take over" to be quite valuable to us in much the same way HN is, despite being much less popular than e.g. Reddit.

<comment><USER2> Because statusnet is a software, not a service, it doesn't really play by the same rules. You can have one site running it that appeals to more niche demographics (like techies and nerds) and one that has more broad appeal.

<comment><USER3> Hmm, can you expound on that and clarify the distinction as it applies to StatusNet?

</comment></comment></comment></comment><comment><USER4> So the plan is:

1) Keep on using twitter as much as ever.

2) Shift the support burden from twitter to companies that twitter would prefer to see go out of business.

?</comment>


The Coronavirus Curve: Tougher Than You Think - <AUTHOR> https://medium.com/@sanitycapital/the-real-coronavirus-curve-tougher-than-you-think-d6629580e3ba <comment><USER2> Another carefully considered analysis that doesn't seem to even want to attempt to discuss how long people can go without income.</comment>


Myntra, India's largest fashion and apparel e-commerce portal to go mobile only - <AUTHOR> http://myntra.myntassets.com/app_only/letter.html <comment><USER2> I don't understand the point in shutting down the website. There's a large audience in India which browses for products on e-commerce website while casually browsing other stuff. Taking the service _entirely_ to an app based platform isolates a lot of such customers.

Another point is that the there is a section of audience which doesn't necessarily use smart phones, or won't use smart phones for making such purchases, who now won't access myntra.

Indian e-commerce space is evolving, and with so many players in the field, the ultimate user would explore all the other options before committing to a purchase (unless they are extremely loyal to myntra), and now it seems to me that with the platform restricted to mobile/tab application, myntra has made a huge mistake.

But it would be interesting to see how this pans out.

<comment><USER3> I can suppose that keeping the web site up to date costs significant resources, while channeling only a small percent of sales.

Not having web presence at all is strange, though. Possibly they'll shut down the e-commerce web site, just leaving a static site with contacts and the links to the mobile apps.

<comment><USER2> I am not well versed with the costs of keeping such a site up, but a scaled down version can be always be maintained using S/IaaS solutions.

</comment></comment></comment><comment><USER4> Very bad decision. Myntra's parent Flipkart is also pushing for something similar. Not every user in India has a smartphone to use apps. They will be losing a lot of customers (like my mom, aunt, grandpa, etc) who can use websites but don't use smartphones.

<comment><USER5> Isn't Firefox OS with their mobile web platform about to flood into India as well?

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

<comment><USER6> Huh? Why India? The link talks about Africa. The Indian mobile market has been completely taken over by Android. About 50% of molbile phones sold in India are cheap Chinese phones. But even those these days come with 1Ghz processors and 4 inch screens (albeit of poor quality).

These run Android fine. Firefox OS is at the moment clearly heading for the no-mobile-phones-yet market and offering a low-end phone. India is somewhere in the mostly-mid-range-mobile-phones zone now.

</comment></comment></comment><comment><USER7> The last time we were discussing this on HN (wrt Flipkart's announcement), someone posted that this was about walled gardens, which I find to be a compelling argument. It is far more harder to do price comparisons, and look for same items across websites on a mobile device (switching between apps, copy-paste, no extensions).

If retailers can force their customers to mobile-shopping, they retain customers and reduce chances of being second-guessed at prices. There are a lot of Chrome Extensions that do price comparisons and people often cross- browse for the same products looking for discounts. Going mobile-only will discourage this behavior.

<comment><USER8> IMO, this is not just to discourage/avoid the price comparison issue but to mainly circumvent the competition in more of the web/SEO way.

Every e-commerce website right now is putting way too much money on PPC to make sure their site pops up for any product you search online.

What flipkart/myntra wants to achieve is this; you think of a particular shoe you want to buy. Instead of firing up your browser and see other others offers from ebay or amazon or snapdeal, they expect you to go to myntra app, search for it and buy it.

Pulling the desktop site means no such comparison nor any other offers would be shown to you instead you would get it from the app.

I am totally against this not just because this sounds stupid to me but kills our freedom of choice. I and you are smart and patient enough to browse around but not many new smartpone users would be and might just buy it from Myntra no matter the price. Especially if Myntra starts coming pre-installed on devices ( which I think would be their next move )

<comment><USER9> This makes sense. Another thing I noticed is that once an app is installed on your phone, it acts like an always present advert. In other words, apps are now the equivalent of having an "icon on the desktop" in the old world. I really suspect that the reason they're doing this is not because discovery through the app is great, but because _repeat purchases_ through the app is great. That would be a good reason to throw marketing money at "install our app and get this coupon" schemes.

</comment></comment></comment><comment><USER10> Data makes the move look compelling..

"From Zero users a year ago, currently about 95% of Myntra's traffic is being channeled through its mobile app. Mobile accounts for 70% of its total revenues.. Of the total time Indians spend on the internet, 90% is through mobile phones."

[http://www.forbes.com/sites/saritharai/2015/05/12/in- global-...](http://www.forbes.com/sites/saritharai/2015/05/12/in-global-first- indias-largest-fashion-portal-myntra-ditches-website-goes-mobile-only/)

<comment><USER8> Actually most articles and even Myntra itself is missing one big variable which has caused this '95%' mobile traffic.

The mobile only offers. I myself have fallen to those offers, downloaded the App, used the mobile-only offers and bought items. But when no such offer is provided I prefer browsing and buying from the desktop site. For the past few months Myntra and Flipkart have been running such mobile-only offers. And I get it why they are doing this but they fail to realise ( I am talking out of my depth maybe ) that eventually when they want to make money and the offers are normal/stopped people would not necessarily use the mobile app. Myntra alternatives are many in India.

<comment><USER11> Completely agree, pushing app only offer is key reason people using there app. It is crazy, u promote app everywhere, give heavy app discounts and then say 95% traffic is from app. The main reason i think is notifications, they can bug users even if they don't want to see the offer, this way they will be retaining more users. I get a offer notification every day.

</comment></comment></comment><comment><USER12> an theory I read was, forcing users to use an app gives better monopoly. users can't drift off to other sites to compare deals; apps will monitor you and study behaviour, and help their marketing strategy; they bug you with deals all the time making you use the app more often than you'd have otherwise( idea from Facebook); flipkart n Amazon did this with the mobile site, flipkart is testing the waters of the next stage by using it's myntra division.

</comment><comment><USER13> hurmm I really dont understand this, How much it would cost for these multimillion dollar companies to maintain a desktop version!?

To my limited knowledge this is only an effort on client side as the apis to interact on server would be the same be it desktop or mobile.

</comment><comment><USER14> I have doubts about the data that 95% of the traffic is now through app. Lots of people, including myself, do shopping through desktop only. Its too cumbersome to flick through so many items on mobile!

</comment><comment><USER15> additional comment :

this is purely a fashion e-commerce portal , I generally want to look at the images of the clothes in good quality on a bigger screen before I buy. I don't think I can get a good overview of the apparel even from my S5 .

</comment><comment><USER3> I wonder how hard would it be to reverse-engineer the APIs used by the app and put out a web site using them.

I also wonder how hard would it be for Myntra to create a basic web site using their own app's APIs.

</comment><comment><USER16> I think they are overvaluing brand loyalty here. I don't even understand people who can shop using mobile apps, especially clothes. You cannot easily compare, read reviews, get a gist of product or compare with other websites before buying. If Myntra goes with this, it would just fall off my list of sites I go to for clothes.

Yes, I buy on Myntra app. That's because they give discounts on it which are app-only. But I simply cannot put myself through horror of clothes browsing on a mobile phone. Thanks, but no thanks.

<comment><USER17> People thought who would watch movies at home. Now people do that on 3.5 inch phone.

Maybe its not impossible. Just a thought.

So, it can be a experiment to see how it goes with myntra and then do that with flipkart too.

<comment><USER16> It's not quiet the same, people were going from theater towards home video. In India, people are going mobile-first. So in effect, it's reversed.

The problem with mobile-first is that it doesn't show that people have moved on from computing. It shows that these people aren't yet exposed to computing. In next 10 years, as 20% more Indians move to middle class, they will need to use some form of computing to conduct their livelihoods, just like the rest of us.

I get your logic, but this is like Flipkart investing 100% in mobile video because 95% revenue is coming from there today, and most Indians can't yet afford a TV. But this totally negates the fact that in next 10 years, the growth in number of people buying TV would be 10 times the current market of Flipkart.

</comment></comment></comment><comment><USER18> Either Flipkart is using Myntra to test the waters.

Or their investors have some goal to become profitable ASAP [http://www.business-standard.com/article/companies/myntra- ai...](http://www.business-standard.com/article/companies/myntra-aims-to- become-indias-first-profitable-e-tailer-115051201309_1.html)

I guess the call was to become profitable no matter what. And if it comes at the cost of shaving off a bit of the Topline (Desktop Revs), then so be it!

</comment><comment><USER19> Not one Indian model on that website.

</comment><comment><USER20> Not every Indian user has access to smartphone at all times, in majority of cases people buy stuff while doing other stuff online, maybe from home or office, those people won't be able to buy anything.

second of all there is nothing called as brand loyalty in ecommerce, the website offering cheapest deals wins, I used to buy many books from flipkart because they give good deals on books, but while buying other stuff I check every other major e commerce website.

</comment><comment><USER21> It might have something to do with their positioning as a m-commerce than an e-commerce where amazon is already a global leader and the way things have been going sooner or later flipkart will have to give up the coveted #1 spot. However if they transition into a mobile only commerce they can create hype (illusory but nonetheless) about being a market leader and innovator in their category and attract further investment or an IPO down the line.

</comment><comment><USER22> WTH! Either start as Mobile only app and be successfull (Eg: Whatsapp) (or) Start a Website and gradually introduce mobile apps (Eg: Google) (or) Start a retail service, use website as entry point, then introduce mobile apps (Eg: Amazon)

Myntra model is backwards. Start retail, use desktop website, start mobile site, think about mobile app, hate desktops, shutdown desktop website, shutdown mobile site.

I don't get it!!

<comment><USER23> I question the wisdom of WhatsApp's move anyway. It seems like the vast majority of my communications suddenly moved to Facebook messenger, in part because it's right there in the desktop website.

</comment></comment><comment><USER24> There are some advantages of going mobile only

1\. Sending deals to customers directly. (Push notifications) Increases customer loyalty.

2\. Harder to compare things on mobile, compared with Web. It easier to compare things on web. Good for myntra.

3\. Competitors can scrape off a website easily to create competing deals.

4\. As you mentioned less dependence on google. All the money spent on SEO and can be spent somewhere else.

5\. Money saved from maintaining the website.

</comment><comment><USER25> I think Myntra went too far by shutting the website down. Normally a site transitioning from web to mobile doesn't make all the features available on mobile(you don't want to make the users suffer) and looks like they are trying to pull of a zuckerberg (when he made the Facebook employees use only mobile with no access to the web internally.) albeit on a bigger scale.

</comment><comment><USER15> any one wanna bet they will re-enable the website access after a while ?

</comment><comment><USER26> On the other hand, thinking about the possibility of every website starting to have its own app we have to install is scary.

</comment><comment><USER27> 90's return, but with Android and iOS apps instead of Windows clients written in Delphi and Visual Basic.

</comment><comment><USER28> This sounds like what Peter Thiel mentions in monopoly chapter in his book. A restaurant marketing itself as south indian food place, and ignoring the fact that they still have to compete with that pizza place next door.

</comment><comment><USER29> It seems we can soon expects the closing date for Myntra. Its not a good move.

<comment><USER23> Also only 70% of your sales coming through mobile leaves a big minority that are not. Can they even afford to remove 30% of their revenue potentially? Is maintaining a website _really_ costing that much?

</comment></comment><comment><USER30> So stupid. Taco Bell tried it and fairly quickly realized how stupid it was.

<comment><USER31> At least Taco Bell was the exclusive way to get your Taco Bell fix. Myntra is just an e-tailer, and many of their products you can get elsewhere. So it makes even _less_ sense than Taco Bell's move.

Interestingly, you can still access Myntra's non-frontpage: [http://www.myntra.com/women](http://www.myntra.com/women)

<comment><USER32> I guess you didn't even try to open [http://www.myntra.com](http://www.myntra.com)

</comment></comment></comment><comment><USER33> I don't get it, just as I don't get why all those chat apps (BBM, KiK, WhatsApp) refuse to create a desktop client on similar philosophical grounds.

</comment><comment><USER34> This will not end well.</comment>


Valve: Are games too expensive? - <AUTHOR> http://www.next-gen.biz/features/valve-are-games-too-expensive

<comment><USER2> That's impressive, BUT there are a couple of hidden variables in these stats:

 _Those that discounted their games by 10 percent saw a 35% uptick in sales-- that's dollars, not units. A 25 percent discount meant a 245 percent increase in sales. Dropping the price by 50 percent meant a sales increase of 320 percent. And a 75 percent decrease in the price point generated a 1,470 percent increase in sales._

Namely,

1) There could be a strong correlation between previous sales and the discount publishers chose. Titles with very low sales might have been given a heavy discount, which means that the impressive percentage wise uptake for titles discounted 75% amount to low absolute sales figures.

2) There is no account of how the products were marketed during the campaign. If the heavily discounted titles went from low sales and almost zero visibility, to being splashed all over the front page, the price point would not be the explanation of the sales figures.

</comment><comment><USER3> FYI: This article is from early 2009. The industry has moved a lot since then. Game prices on Steam are now much more flexible, although console game prices have remained steady (even in the face of stiff competition: a single 3DS game costs $40, which will buy you 40 great iOS games).

<comment><USER4> That's not an entirely fair comparison though: digital distribution where the cost per unit is virtually zero vs. costly ROM modules.

<comment><USER3> It's Nintendo's decision to create a system that requires such modules, and cause games to be priced accordingly.

It isn't like they haven't had five years notice on portable digital distribution.

<comment><USER4> Providing enough storage on the device itself for the kind of games you expect on a system like the 3DS might not be feasible. Ideally I'd like to purchase a few flash cartridges and write games I've purchased to them as I see fit, from the market app they've got on there now. There is definitely room for improvement.

<comment><USER5> In Japan in the 90's Nintendo had ROM burning booths installed in Japanese malls. Kids could write games to a cartridge for the equivalent of a few dollars. It was a huge success. Unfortunately I can't remember the name of it.

When looking at the Nintendo eco system you really need to remember that Nintendo primarily make a system to play Mario, Zelda and Pokémon on. They want a robust system. Cartridges, despite their inherent costs, offer child friendly, robust distribution that limits returns, copying and maximises their revenue.

Having said that I can't see them continuing with cartridges for much longer as their cash cow is being decimated by cheaper devices.

</comment></comment></comment></comment></comment><comment><USER6> 70€ for 10 hours of content of mediocre quality? Pass.

I mostly play multi player games nowadays with an occasional big content single player game. I only buy some multi player games upon release and mostly wait for single player games to become heavily discounted. This enables me to leverage the gathered information to buy classics at an acceptable price.

It's not that I cannot afford to pay the price. It just seems obscene and with all the supply of entertainment that is available today, I reckon there is really no need to pay such ludicrous rates.

</comment><comment><USER7> I expect Steam games to go on sale often and don't buy until they drop below my $25 threshold. Since their sales (revenues) are increasing, that means I'm not as cheap as I thought...

However, the problem with playing with your pricing is the same reason why airlines don't massively discount unfilled seats.

Since the fuel is already paid for, why not discount those seats and make money? It's because people will expect the price to always be discounted near the end, ultimately leading to lower revenue.

</comment><comment><USER8> If the results are legitimate and the market shifts, something like this could be a big deal. If these results could be applied across the industry... tripling the revenue of an entire industry could stimulate incredible changes.

</comment><comment><USER9> Yes, games are too expensive. I can't understand why RAGE, just released a few days ago, would cost $60 on Steam. You can sort-of get away with it when you sell at brick-and-mortar stores, but digital distribution should cut the costs dramatically. Instead, you have to pay $60 to get a game on digital distribution when it comes out. That's why I wait for Steam sales. Occasionally great games that came out a year ago are on sale for a reasonable price.

<comment><USER10> Get out of my head!

I had also planned on buying RAGE but at $60, forget it! I know it will be discounted, maybe around Xmas, so why pay that much?

</comment></comment><comment><USER11>
      The conclusion: The games industry is not pricing its products correctly.

Or it could mean that having a sale increases the number of sales.

<comment><USER12> Right, did you miss the bit about sales producing a sustained boost to rate of units sold even after the sales end?</comment></comment>


Programming Perl 4th Edition E-Book Now Available (at half price) - <AUTHOR> http://shop.oreilly.com/product/9780596004927.do

<comment><AUTHOR> I guess I should point out why this is a big deal: the previous edition of the Camel book was published way back in 2000 for Perl 5.6, and there has obviously been a great amount of evolution of the language between then and the current v5.14.

As you can see from the link, hard copies should be available in a couple of weeks and can now be pre-ordered from O'Reilly and elsewhere.

The new edition covers all the new syntax (much of which was directly inspired by Perl 6), Unicode, regex changes and best practices, in addition to general updates and refinements.

</comment><comment><USER2> Not on Safari Library yet, unfortunately.

</comment><comment><USER3> Awesome

</comment><comment><USER4> title should read 'Programming Perl (NOT Pearls)' I got fooled for a sec.

<comment><USER5> The idea that people should be more specific when talking about one of the most well-known (and used) programming languages on a site called Hacker News is simply odd to me.

<comment><USER6> In fairness, Programming Pearls is a fairly well known, well regarded book-

[http://www.amazon.com/Programming-Pearls-2nd-Jon- Bentley/dp/...](http://www.amazon.com/Programming-Pearls-2nd-Jon- Bentley/dp/0201657880/)</comment></comment></comment>


C++ Lambda Functions in Visual Studio 2010 Beta (new C+0x feature) - <AUTHOR> http://jkukunas.phpnet.us/2009/06/17/c0x-lambda-functions/

<comment><USER2> Upvoted for sadistic reasons, to show others how a conspiracy of C++ and Microsoft can tarnish even the most benign nouns in computing, such as "lambda".</comment>