Learn just enough Linux to get things done - <AUTHOR> http://alexpetralia.com/posts/2017/6/26/learning-linux-bash-to-get-things-done <comment><USER2> _One example of this is the popular version control system (VCS) called git. Developers could have written this software to work on Windows, but they didn 't. They wrote it to work on the command line for Linux because it was the ecosystem which already had all the tools they needed._

I think the real (and even stronger) reason is that Linus Torvalds specifically built Git to serve as the VCS for the Linux codebase.

<comment><USER3> And git _does_ work on Windows. There's even a windows logo on the official download page. [https://www.git-scm.com/downloads](https://www.git- scm.com/downloads)

<comment><USER4> Git for Windows relies pretty heavily on MinGW, though. And it's best used from the included bash shell.

<comment><USER5> I do want to point out that Git being built with MinGW doesn't do anything to affect its compatibility. MinGW is basically just the GCC compiler suite ported Windows. It doesn't do anything about making C code written for Linux compatible with Windows.

Now typically, when you install MinGW it also installs some tools that let you operate within Windows a little bit more like you're working under Linux, such as by installing a more sane terminal emulator and Windows-compatible ports of some popular programs e.g. grep. But all those tools and such are _ports_ of Linux programs running on Windows, not standard Linux programs running atop a compatibility layer to allow them to work on Windows.

I mention the above because this was an unclear distinction to me originally. Additionally, this was based on my experience with MinGW some five years ago, and I don't know if everything I've described is still true. Hopefully this slight aside clarifies things for someone.

<comment><USER6> > MinGW is basically just the GCC compiler suite ported Windows.

That's where you get it wrong. MinGW is a compatibility layer that helps port unix apps to windows. Yeah, it comes with GCC, but it also comes with support for POSIX, including a unix shell and other standard components.

Claiming that MinGW was just GCC would imply that to run Git on windows would be just a matter of recompiling the source code. But it isn't.

</comment></comment></comment></comment></comment><comment><USER7>
      This is not a surprise - the Windows ecosystem simply wasn't designed with software development in mind.

Aha? What is C# and Visual Studio? Or .NET? Was Linux designed for software development?

This article is so bad, I'm really getting mad over here. Stop publishing such crap, you feed a lot of people's resentment against all those hipster developers who don't want to learn by RTFM, but want to have handled everything.

Articles like this are a real hurdle on the way towards making Linux and programming in general more approachable to non-techies. Just stop, please.

<comment><USER8> > Was Linux designed for software development?

Linux was designed to emulate Unix and run the pre-existing Unix-like userspace from GNU.

And _absolutely yes_ , Unix was "designed" for software development. That's exactly what it was in its early days: a hacker playground for the geeks at Bell Labs to try new ways of doing things.

And windows wasn't. Early windows development (for years after it became popular) was done at a DOS command line. Eventually Visual C++ because the dominant product, and certainly you can't say it wasn't innovative. But it remained a separate product. "Windows" wasn't for development. And we still suffer from this in, say, the way windows basics (like the standard C runtime!) typically need to be shipped per-app and are only vaguely compatible across OS and toolchain changes.

<comment><USER9> > Early windows development (for years after it became popular) was done at a > DOS command line ...

I could just as easily flip this and claim that Linux development is all backwards because it's still done on the command line.

Given Microsoft's commitment to tooling, backwards compatibility and extensive documentation I think it's pretty lame to try and paint windows as not targeted towards developers. The difference is that windows has actual users, as opposed to the eternal horizon of "the year of linux on the desktop".

<comment><USER10> Effective early Windows development required a surprisingly thorough knowledge of DOS and x86 memory management/pointers that one had to get through books (unless one was poring through Intel chip specs). Even though Petzold's books were/are sold through Microsoft in my opinion is it's a stretch to call it documentation. For a long time, the best debugger was a third party tool - Soft-Ice. Their documentation/tools for XBox was pretty great, though, they had to do well there being new kid on the block. Microsoft had the benefit of 90% of PC market share at that time so we all had to learn it if we wanted a piece of that pie.

<comment><USER11> Those books where widely published from the start from Microsoft and Developers. There was aspects of the API were not released to the general public but it didn't stop a developer from knowing about them.

You also has the MSDN subscription that did cover a lot about the development.

<comment><USER10> Yes the MSDN subscription which seemed like kind of a racket at several hundred dollars ( it was up to $1000+ by 2001 depending upon support level/media ). Also they would frequently have documentation about something in one year, then drop it from the CD's/DVD's and if you got lucky you had those or someone was really nice and posted it on the internet. I remember having to figure out the IME's for Far East/etc input circa 2000 from a usenet post then handing that information down to a someone else on usenet so they could implement it as well.

</comment></comment></comment></comment></comment></comment><comment><USER12> Mentioning strace in an article titled "Learn just enough Linux to get things done" seems so out of place as to be absurd, even in an "Advanced" section. Anyone who needs the rest of this advice is going to be absolutely baffled by strace.

Otherwise, decent little primer.

<comment><USER13> I've been a linux user for almost eleven years now, and a professional software developer for four, and I wasn't even aware that strace existed until just now.

<comment><USER14> I've been tinkering on Linux as a hobby for about 2 years now and was made aware of strace a couple of months after starting to dig a bit deeper. You make me hopeful of my future employment.

<comment><USER15> I'm 100% telling the truth when I say I got a job as a Linux sys admin at a massive tech company on the basis of knowing a little bit of bash scripting. And this wasn't even that long ago. Learn some devops stuff and you're golden.

</comment></comment></comment></comment><comment><USER16> This article should be named "Learn just enough Unix to get things done". Almost everything explained can be done on any Unix-like system like macOS and it's not exclusive to Linux.

<comment><USER17> Disagree.

It could be mentioned early in the article.

However for its target audience (I assume) that would be far less useful.

("This looks great but seems to be about Unix and I know this is a Linux thing.")

</comment></comment><comment><USER18> In my project, I maintain 3 documents. The first one is a similar list of basic linux knowledge that people should learn when arriving on the project. The second is "UnixTipsAndPitfalls" where people should add new entries when they encounter usefull commands. The third one is about tar.

<comment><USER19> Over years I've heard a lot of complains on tar being hard to use, but in real-life I really ever had to use only these two commands: tar zcvf and tar zxvf. It's actually quite easy to remember: tar Zip Compress Verbose File, and tar Zip eXtract Verbose File.

<comment><USER20> It's even easier than that! Less memorization, more understanding.

You can think of Tar arguments as either _subcommands_ or _options_. The dashes are optional

The "subcommands" are x (extract), c (create), t (list), among others.

The "options" are f (read from named file rather than stdin), v (verbose mode), and z (run gzip on the archive before processing).

The fact that these options can be written without leading dashes, and all smashed together in a single argument, is legacy silliness for saving a few keystrokes. Don't confuse yourself with it, and don't confuse other people by teaching it to them, instead of teaching them how to actually use the command (which is really not hard at all).

So when I write Tar commands, I like to think along these lines. Instead of "tar zcvf foo.tar.gz", I write "tar -c -zv -f foo.tar.gz". After doing that about 3 times, it all sank in. Nowadays I'm much more intimidated by Git than Tar.

In the version of tar on the machine I'm posting from (GNU tar 1.27.1), this structure is obvious from right there in the man page:

        SYNOPSIS
           Traditional usage
               tar {A|c|d|r|t|u|x}[GnSkUWOmpsMBiajJzZhPlRvwo] [ARG...]

           UNIX-style usage
               tar -A [OPTIONS] ARCHIVE ARCHIVE

               tar -c [-f ARCHIVE] [OPTIONS] [FILE...]

               tar -d [-f ARCHIVE] [OPTIONS] [FILE...]

               tar -t [-f ARCHIVE] [OPTIONS] [MEMBER...]

               tar -r [-f ARCHIVE] [OPTIONS] [FILE...]

               tar -u [-f ARCHIVE] [OPTIONS] [FILE...]

               tar -x [-f ARCHIVE] [OPTIONS] [MEMBER...]

<comment><USER21> Thank you! That was very useful

</comment></comment></comment></comment><comment><USER22> In place of the "tabview" command (which is a non-standard, pip-installed program) a simple "column -t" would be less trouble for most users.

<comment><USER23> Thanks. I was looking for tabview but it wasn't easy to find, and in python (not that it's bad, but it wasn't a native tool). Rather, column -t is definitely a better choice, since it is a native posix tool.

<comment><USER24> column(1) is not in POSIX.

It originates from BSD, but it's also part of util-linux, so it should be available on most Linux distros.

</comment></comment></comment><comment><USER25> I don't think I could disagree more with having `man` at the bottom of the advanced/infrequently-used section. Learning how to read and search through the documentation that comes with the system is a very beneficial thing to learn how to do.

<comment><USER26> I think I agree with the placement. It's definitely a good skill, I wouldn't dispute that, but it really is advanced/infrequent by the standards set here.

Historically that wasn't true, but Stack Overflow has made it vastly easier to answer simple questions ("Which 'ls' flag shows permissions? How about hidden files?") without ever using a man page. You can go a long time without ever touching that and not have problems, while jumping to man pages without experience tends to be an overwhelming jumble of flags and conditions.

Which isn't to say it's low value! Learning Linux well beyond "good enough" is still an enormously worthwhile project. But I do think it's correct to say it's no longer an entry-level step.

</comment></comment><comment><USER27> Hi everybody - author here.

Surprised to see this on the front page. I agree with most of the feedback and criticism here.

Hopefully some readers found it helpful regardless.

<comment><USER28> It's ... pretty OK :-). My points/suggestions...

1\. I've never heard of tabview and it's not on MacOS or Fedora.

2\. Add ctrl-D to your possible exits. It's actually more common than ctrl-C.

3\. Some of those commands are not installed by default on many systems; e.g. htop or dstat. And they require sdvanced knowledge to properly interpret. But they can be very useful. I'd suggest standard `top` and things like iostat instead.

</comment></comment><comment><USER29> [https://github.com/jlevy/the-art-of-command- line](https://github.com/jlevy/the-art-of-command-line)

<comment><USER30> [https://linuxjourney.com/](https://linuxjourney.com/)

<comment><USER31> [https://www.learnenough.com/command-line- tutorial](https://www.learnenough.com/command-line-tutorial)

</comment></comment></comment><comment><USER32> Learn Just Enough Linux To Make QA, Ops, Security Hate You.

Learning to do a thing and learning to do a thing well enough to create a production quality result that isn't a liability to the company are very different. That said, improving Linux knowledge among those who had little/none before is a net win in the long term IMO.

<comment><USER33> >Learn Just Enough Linux To Make QA, Ops, Security Hate You.

Hey, that's me!

</comment></comment><comment><USER34> And not even one mention of man pages... That is was my main resource for learning new (remembering old) commands. Maybe it's out of date now due to google, but if you're already in the terminal man is the way to go. Also, I feel like cat and less should have separate explanations as they have diverging utilities.

<comment><USER35> There's two mentions of man pages.

<comment><USER34> <Apologize> I missed in my initial skim

</comment></comment></comment><comment><USER36> I've always felt there are two different kinds of Unix/Linux: sysadmin vs user. While Linux distros have been getting better and easier for many years, installing and maintaining Linux on my own machine still requires sysadmin Linux knowledge to this day.

I personally believe this is why Macs have been so popular since OSX, it's really the only machine out there that comes with Unix but doesn't require _any_ sysadmin knowledge to use productively.

As soon as Linux truly reaches that same point where users can install and maintain it without needing sysadmin Linux, I think it could take over Mac's position. And I wish it would, OSX seems to stuck in old version limbo.

<comment><USER37> > While Linux distros have been getting better and easier for many years, > installing and maintaining Linux on my own machine still requires sysadmin > Linux knowledge to this day.

I'm not sure that's true. You can buy a few computers (including from Dell) with Linux pre-installed, and maintenance doesn't take a lot more than clicking on the upgrade button with the daily update-manager prompt.

I _do_ have sysadmin knowledge and find the shell more efficient than the GUI in 99% of everyday-use cases (I can't remember the last time I opened a file browser). So it's entirely possible that there's some day-to-day work required that I'm not even thinking about.

But my dad is running a Linux Mint system and I switched him to it (about ~10 years ago) because it required so much _less_ maintenance than running a Windows machine did. The number of phone calls for tech support I got from him plummeted from twice a week to zero when I switched him from Windows: I did so because I got tired of fielding constant questions about antivirus software, defragmentation, startup programs littering his systray, possible viruses installed, etc etc etc etc. It's really beyond me why anybody thinks that Windows is an appropriate OS for a non-technical user (er, or for a technical user, or really anyone who doesn't need specialty software).

<comment><USER26> > _I 'm not sure that's true. You can buy a few computers (including from > Dell) with Linux pre-installed, and maintenance doesn't take a lot more than > clicking on the upgrade button with the daily update-manager prompt._

Is it really that good these days?

I can definitely appreciate the constancy of Linux, it feels like Windows/Chrome/etc stacks move under my feet constantly. But my experience with Linux is still that when problems _do_ arise, I have to escalate to shell commands and arcane sysadmin-ry for all but the simplest problems. Windows and OS X still offer a lot more hope of an accessible fix via the GUI or even an automated troubleshooting tool.

It's totally possible I'm dealing with the wrong distros, or am resorting to Linux for weirder tasks and therefore seeing harder problems. But I don't have the sense that Linux is more painless, only that it's less chaotic.

<comment><USER37> > Is it really that good these days?

Honestly, I constantly doubt myself on this because other people keep claiming you need to be some sort of tech-savvy god in order to use Linux: but I've had various Linux systems as my primary and only OS since 2007 and I pretty much haven't had any problems to speak of since like, 2012.

To the extent that I can take myself out of my own head and try to model someone not that tech-savvy, I find Windows _much_ harder to use on a day-to- day basis. This is further validated by the experience of my dad: I went from 1-2 tech support calls a week to maybe once a YEAR.

> But my experience with Linux is still that when problems do arise, I have to > escalate to shell commands and arcane sysadmin-ry for all but the simplest > problems.

I actually prefer the command line for pretty much everything (I haven't opened a GUI file browser in years), so I'm leaning primarily on the experience of a few friends/family who switched to Linux when they saw how awesome my system in college was (where awesome = not plagued with the ridiculous problems that every Windows user has to rationalize out of existence). I've tried to evangelize the command line to most of them and they remain pretty firmly uninterested. And yet none of them ever really _have_ any problems with their system[1] to speak of: clicking "install now" on the Update Manager pop-up is the only interaction they have to have with their system beyond usage. They usually tend to be on something like Linux Mint, which has all the GUI-heavy config tools pre-installed already. When they feel like dipping a toe in the water of customization, they can do so to the precise extent that they're comfortable and think that the trade-off is worth it (e.g. re-arranging their panel).

AFAICT, all the work in Linux is upfront and pretty quick: make sure that you buy hardware that supports Linux well (an easy Google search) and either buy pre-installed or spend 20 minutes installing it.

[1] These include my best friends and girlfriend, people I've talked to almost literally every day for the last decade.

</comment></comment></comment></comment><comment><USER38> Great list for starters. But getting real work done requires much more.

Having just walked through some basic steps with a novice, I can concur, modern linux is impossible without "recipes".

Just setting up a hello world web app can involve: ssh login to running instance, using curl to download the gcloud sdk, tar to unpack, sudo to install, systemctl to start local processes, useradd dedicated www, chmod and chroot to allow access, rsync to tranfer files, netcat to manage ports, etc.

For beginners, without a trusted hand to guide them, its beyond intimidating. These systems must become more accessible to the average human.

<comment><USER39> > _These systems must become more accessible to the average human._

I disagree. Firstly, all the commands you mentioned are pretty simple to understand given that they have a manpage and lots of help available online.

Secondly, not everything needs to dumbed down for the average user. A large part of the power comes from all the tools and flags available and the combination possibilities. Dumbed down tools are limiting and frustrating.

I'd expect any software engineer worth their salt to not be an "average user" and grasp a few simple commands the same way they approach a new project or programming language, i.e. they should be able to pick up the basics even if it's a complex system. That's a prerequisite for programming and understanding a project's code well anyways.

<comment><USER17> Problem is, as I've already mentioned elsewhere, that the manpages do a pretty poor job in a number of places.

Yes, I do use them but I guess most Linux users learned most of what they use from colleagues and Internet, not the official documentation.

<comment><USER40> I rarely use `man`. Most of the time I find what I'm looking for with --help, and if I don't, I end up doing a web search. Sometimes I end up at the HTML version of a man page, somewhere like linux.die.net, which is much more comfortable to read than the terminal.

</comment></comment></comment></comment><comment><USER41> Learn just enough GNU coreutils and bash to get things done.

<comment><USER42> Learn enough _literally every modern OS that isn 't Windows_ to get things done.

</comment></comment><comment><USER43> > Basic tasks, like file parsing, job scheduling, and text search are more > involved than running a command-line utility

This seems backwards. Going to the command line for these things is a horrible workflow. It's not necessary in Linuxes either ...

</comment><comment><USER44> Another pretentious thought leader spewing misconceptions.

</comment><comment><USER45> The key is the text stream. Both for computer interaction, and for communication in general. The rest are just names.

</comment><comment><USER46> This article is about bash and not linux

</comment><comment><USER47> Something is wrong.

Quitting is ctrl+d

Ctrl+c is for interrupting the current job.

Some repl like the mysql cli does not rrspect that and it is a PITA</comment>


Clojure: Creating a reducible repeat - <AUTHOR> http://insideclojure.org/2014/12/21/reducible-repeat/

<comment><USER2> This reminds me of a daydream I've been having, that goes something like this: Rewrite the core Clojure data structures in Rust. Link in LuaJIT. Write a bunch of finalizers and a reader in Lua, skin the Clojure library in the proper syntax, and Bob's your uncle.

I'm far too busy to take ownership on such a project, but if anyone starts it or finds it, please contact me.

<comment><USER3> The core datastructures are immutable and uses structural sharing. This would require reference counting (slower) or a proper GC to be efficient (Rust doesn't have one). Doing this in Rust would probably give you worse results than the JVM.

Also, why LuaJIT? LuaJIT (or Lua) is not threadsafe, so you wouldn't be able to share state between threads safely, which would conflict with the way Clojure handles concurrency.

I'm not trying to be negative. But unless this is a project for fun or excercise, the JVM is a better host.

<comment><USER4> Rust doesn't require reference counting to make sharing immutable datastructures safe. The interface would require lifetimes for safety, though, and might be generally unpleasant to use.

<comment><USER3> Oh? Lifetimes are that flexible? It's been a long time since I looked into Rust, so I had no idea. I would thought it was difficult to decide when to free an object, if it is linked to by two separate data structures and one of them goes out of scope.

<comment><USER5> They are not. Sending something to another thread requires the thing to send to implement some kinds (I think Send + Sync).

To have those guarantees the data would need to stored in an atomically reference counted structure (or something else with the same guarantees), which is just like you said.

And you would need to watch out for reference cycles. I guess they are quite easy to create with Clojure.

<comment><USER4> > To have those guarantees the data would need to stored in an atomically > reference counted structure (or something else with the same guarantees), > which is just like you said.

That is not true.

`Send` is having its `'static` bound removed, so sharing data will no longer require reference counting for threads with bounded lifetime: [https://github.com/rust-lang/rfcs/pull/458](https://github.com/rust- lang/rfcs/pull/458) (the RFC hasn't been officially accepted but it's been referenced as a foregone conclusion several times by Rust core team members).

There is already an experimental library exploiting this for `Sync` data, which includes immutable substructures: [https://github.com/nikomatsakis/rayon](https://github.com/nikomatsakis/rayon)

The only reason people aren't more aware of this is because the functionality isn't exposed in the standard library yet. The language is perfectly capable.</comment></comment></comment></comment></comment></comment>


Ask HN: Looking for mature software directory with 10+ years production usage - <AUTHOR>

Sth. like https://packages.debian.org/stable/ but the criteria of the packages in this list are not clear to me.<p>If such a directory does not exist, we do need this! <comment><AUTHOR> I also guess only Open Source Software really qualifies, because after a certain point, you need to inspect the source code to write better testsuites.

</comment><comment><AUTHOR> Found another link: [http://www.dwheeler.com/gram.html](http://www.dwheeler.com/gram.html)</comment>


Ask HN : How to teach children to write fast? - <AUTHOR>

People, What is the best way to teach children to write and read fast. My son, who is studying in primary, is little slow in his writing and he is not able to keep pace with teacher writing speed. He is having slight problem in his vision, suffering from spherical aberration. <comment><USER2> I'd say it's all about practise.

Through-out my life I've found that I get better/quicker or worse/slower at writing depending on how much I've been doing of it lately.

Working for home for the past two years purely on a computer, my writing looks terrible and I'm very slow.

Rather than traditional "practise makes perfect" methods used in classrooms (copying out lines etc.) I'd suggest that it's very important that what he is writing doesn't bore/anooy him. Obviously that's unavoidable in life, whether at school/work/other, but if he were to practise at home... if he enjoys what he's writing about, he's more likely to pay attention, care more, and therefore improve faster.

<comment><AUTHOR> Currently, to make the writing interesting, I take short children stories and print it out on cursive font (dotted) and make him write over it and read it later, this is done as an time bound activity. I need to wait few more weeks to see the results of this exercise.

<comment><USER2> Not sure how old he is nor how advanced he is at writing, but my advice is that, as soon as he's ready, don't keep him just copying text.

Maybe find relatives/friends he can exchange letters with, get him to write a blog/diary kinda thing, get him to write about stuff that interests him.

</comment></comment></comment><comment><USER3> I'll let others address your actual question of increasing speed, but I'd just like to make the [perhaps obvious] point that speed isn't everything. I'd argue that comprehension and composition (diction, logical structure, etc.) are more important than unqualified speed.

<comment><AUTHOR> I second that. One of the drawback of writing slow, is that children often miss what's written on the board and unfortunately at times, teachers forget this.</comment></comment>


Hack: a new programming language for HHVM - <AUTHOR> https://code.facebook.com/posts/264544830379293/hack-a-new-programming-language-for-hhvm/ <comment><USER2> I am baffled as to why you'd build your castle atop a crumbling foundation.

I have wondered why FB didn't use a proper language with proper typing to begin with. I mean, I "understand" logistically: they already had a giant codebase in PHP, migrating a codebase is expensive, and it's difficult to hire and train 1000s of hackers in e.g., OCaml. (They _do_ have some OCaml people, but they are outliers. OCaml was my favorite thing to write there, though it didn't afford some of the same niceties and interactivity as the PHP code they had, only because the support was down by several orders of magnitude.)

But at the same time, layering FP with a home rolled static type checking server (??) is bug prone and is certainly yak shaving (which they have time and money to do). Now they've written (1) a compiler to C++, (2) a compiler to VM byte code, (3) a corresponding runtime for each, (4) extensions to PHP, (5) a type checker, and (6) an inference engine. That's a lot of stuff. And in the end, it's still PHP, which is duly disliked. (Though Facebookers don't seem to care. The prevalent attitude toward it is that "PHP, as it's coded here, is mostly like C++, and that's OK.")

Writing correct type checkers and inference engines is kind of difficult. They seemed to take the approach of just building onto it incrementally until it just seems to work. That approach led to many bugs in many cases that just simply aren't thought of when one is trying to build inference engines by hand, as opposed according to theory. Type checking and inference is an area ripe with theory and attached formal, mathematical semantics. Standard ML's standard is perhaps the most infamous; it's a collection of mathematical statements about the language. That way, the compiler is now almost an engine to prove your code is correct. I don't see how the same guarantee can be made with something that is just cobbled together.

<comment><USER3> The HN crowd seems to dislike (or despise perhaps?) PHP, but it's really not that bad. Yes it has a lot of warts, but it has a lot of things that make it nice for web development.

a) try your new code by saving in your editor, and hitting reload in your web browser.

b) it's very approachable. People who only know HTML and CSS can be expected to do a little bit of PHP work to integrate their changes. If you setup the right network mounts, they just need to edit files and reload (see a)

c) it's not super high overhead at runtime. If you're not using a framework, and you don't build up a crazy object hierarchy, it's not too hard to get your page out with about 10 ms of overhead beyond data fetching. For very simple webservices (fetch data, possibly from multiple sources, and do a little formatting for the consumer), I was able to get the overhead down to 2ms. You can certainly do better with other languages, but you can usually get better throughput improvement by working on getting data quickly. Btw, all the frameworks are terrible; many of them add 100 ms to the page just for the privilege of loading the includes; PHP is a framework for web programming thank you very much.

d) cleanup; you don't have to worry about it. If you don't do anything weird (c extensions, with non-preferred malloc), at the end of the request, everything is thrown away.

That said, there are plenty of things PHP isn't good at: I wouldn't run a long running process in PHP; and multithreaded PHP sounds like a bad idea.

<comment><USER4> If you want to know: just checked the one project where I did a long running PHP-process.

It is a job scheduler which takes jobs from a Redis queue and executes it.

It does fork a new process for 1 type of task (image resizing in this case) to make sure it doesn't leak memory.

It also reuses these forked processes so it doesn't need to fork for every task.

It was last started on Jan. 2013 (because of maintenance) and still running fine.

The reason ? I didn't want to introduce an extra language for project for which all the server code was already written in PHP.

So if it fits the task, you can do it.

<comment><USER3> Duly noted, will not be so negative on long running processes. :)

</comment></comment></comment></comment><comment><AUTHOR> I'm the manager of the team that developed Hack, and I'm sitting here with some of the language designers. Happy to answer your questions.

<comment><USER5> Why use

public string $x = '';

instead of

public $x:string = '';

It seems inconsistent to me, probably because I've used AS3/Haxe.

<comment><USER6> PHP is based on C. It's way more consistent with C, Java, C# , etc to do the former. So the real question is why

        function foobar() : int { .. }

instead of

        function int foobar() { .. }

<comment><USER7> 1\. function foobar() makes it easier to grep for. 2\. if I recall correctly, it made some parts of the grammar easier.

</comment></comment></comment></comment><comment><USER8> So argue. Much armchair quarterback. Very flame. Wow.

It's entirely appropriate and reasonable to say "I don't understand why Facebook would do this; please explain it to me." But it reflects a supreme lack of humility to say "I don't understand why Facebook would do this; they must be idiots, and when they, armed with inside information I don't even know I don't have, come to defend themselves, I will angrily try to convince them of the error of their ways."

If you think what Facebook has done here is stupid, why is that something to get upset over? In fact, why is it even something worth arguing about? You're not going to convince anyone who matters, and anyway you have nothing to gain by doing so: Instead, just short Facebook stock and be smug in the knowledge that, when Facebook announces next year that they're abandoning PHP in favor of a ménage à trois of OCaml, F#, and Clojure, you'll be able to say "I told you so".

<comment><USER9> Wish I could upvote this a bunch of times

</comment></comment><comment><USER10> Facebook is always pushing PHP to new places. Would it be too broad to say PHP is the worst thing that ever happened to Facebook's engineering but Facebook's engineering is the best thing that ever happened to PHP?

<comment><USER11> I'd rephrase the question to be "Would Facebook be Facebook without PHP?"

<comment><USER12> I don't see why not. It's possible to have done it any any mainstream language.

<comment><USER13> Which mainstream language would you have chosen in 2003 that you think would have had similar success?

<comment><USER14> Any. Really, any. Facebook is throwing a lot of engineering effort into fixing things that now matter to them, but didn't when they started (and were small).

They could have picked Perl CGI's and it'd still have happened (perhaps Perl 6 would be a success these days).

I don't think PHP has played any role in bringing FB to the size it is today (programming language does not translate to number of users signing up). So yes, any mainstream language available in 2003 would do it.

<comment><USER15> Perl was a possibility, but CGI is/was a pain to use. To get started you had to understand things like headers. You frequently had scripts refusing to run for whitespace issues relating to CRLF vs LF. You'd need to come up with your own templating language... It was just much more difficult.

Also Perl libraries typically require superuser rights to install. That's a big deal if you're a poor student using shared hosting on your fun hacking projects.

Python really wasn't an option. mod_python by default required you to restart Apache whenever a python file changed. It was designed to be configured by sysadmins on dedicated servers... if you wanted something you could hack together an put on a shared host, it just wasn't an option.

Also the hot Python framework in 2003 was Zope. No one uses Zope anymore. For good reason.

Ruby was much smaller, and this was pre-rails so it didn't have any significant web framework. I'm not even sure if there was a production ready way of hosting ruby scripts.

<comment><USER16> > To get started you had to understand things like headers

since when is this a problem? really.

<comment><USER15> To make something accessible you need to let people learn it one small chunk at a time.

PHP lets you ease in, starting at html with some inserted php code and working your way up to more complex code.

CGI, at least as I recall, required you to return valid HTTP responses with correct headers. That's a big jump from simple HTML.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER17> If you want to try out Hack (and HHVM) quickly, my FOSS project lets you quickly set up a VM using Vagrant and Puppet: [https://puphpet.com](https://puphpet.com)

<comment><USER18> PuPHPet is great for getting a ready to go VM with a PHP and all the trimmings. Super easy, super fast.

</comment></comment><comment><USER19> My favourite comments are the ones where some random geeks tell the guys who have built a multi-billion dollar business with hundreds of millions of daily active users how they're doing it wrong.

Congrats to Facebook on taking PHP forward. It powers a vast amount of the web and it's great to see that it's getting some engineering love!

<comment><USER20> >> where some random geeks tell the guys who have built a multi-billion dollar business with hundreds of millions of daily active users how they're doing it wrong.

Remind me the words from Steve Jobs:

"By the way, what have you done that's so great? Do you create anything, or just criticize others work and belittle their motivations?"

</comment></comment><comment><USER21> Man, it's going to be really hard to search the Internet to troubleshoot this.

Search: "Hack Anonymous Function" Search: "Hack Background Process"

<comment><USER22> As a frequent user of R, this is one of my biggest pet peeves. There are a practically infinite number of unique, interesting, pronounceable, google-able names for a new programming language, yet we continue to get stuck with this shit.

<comment><USER23> A few months ago, "Martini" came out for "Go". I love the framework, but man, searching for stuff on Google was a PITA.

<comment><USER24> At least go says in their official docs, when posting/searching for the language, use "Golang"

</comment></comment></comment></comment><comment><USER25> See this presentation[1] from Strange Loop 2013 about some design decisions on Hack.

[1] - [https://github.com/strangeloop/StrangeLoop2013/blob/master/s...](https://github.com/strangeloop/StrangeLoop2013/blob/master/slides/sessions/Adams- TakingPHPSeriously.pdf)

</comment><comment><USER26> Naming a language hack ... very poor choice. Searching for Go, C, C++ is already bad, now you can add hack to the list.

<comment><USER27> Hacklang. There, just like go, problem solved.

<comment><USER22> That would only solve the problem if everyone referred to it as "Hacklang", which will surely not be the case.

</comment></comment></comment><comment> vezzy-fnord Looks like Facebook might have inadvertently turned PHP trendy again.

Expect "Why I migrated from Go to Hack" articles soon enough.

Either way, the name is very fitting. I have no use for this, but good for Facebook that they've managed to (at least to some extent) evade some of the many PHP pitfalls.

<comment><USER28> I started web programming using PHP back in 2000, but quickly moved to Python a couple of years later and never looked back. That is, until I joined FB this year as a data engineer. Programming in PHP with Hack/XHP is awesome.

<comment><USER29> Is Hack an evolution of XHP, or is XHP a subcomponent of Hack?

<comment><USER30> Engineer working on Hack here.

Historically XHP was developed before Hack. It's available as an add-on for PHP but never became a formal part of the PHP language. When Hack was being designed it needed to work well with XHP (as XHP is used a fair amount with Facebook's code base), so over time it made more sense to start thinking of XHP as being one the language features that Hack offers that is not available in stock PHP.

</comment></comment></comment></comment><comment><USER31> Is Facebook's code so monolithic that they can't deploy new, decoupled services written in new languages? Twitter did this with Ruby, Java, and Scala. Didn't Facebook create Thrift RFC for exactly this purpose??

<comment><USER13> Facebook already has several decoupled services written in other languages. The PHP codebase is mostly the front-end code which, beyond some database work, dispatches heavy lifting to back-end services written in C++, Java, and other languages.

As you say, Thrift connects this all. You can look into our C++ core library, Folly, and other C++, C, Python, and Java applications and libraries like Rocksdb, Presto, watchman, Buck, flint, scribe, and so forth on github.

</comment></comment><comment><USER32> PhpStorm support issue [http://youtrack.jetbrains.com/issue/WI-21737](http://youtrack.jetbrains.com/issue/WI-21737)

</comment><comment> wes-exp Sounds like they added optional type declarations, lambda expressions, and a few more goodies to PHP.

I am reminded of [http://en.wikipedia.org/wiki/Greenspun%27s_tenth_rule](http://en.wikipedia.org/wiki/Greenspun%27s_tenth_rule).

Facebook is now at sufficient scale where they are reimplementing Common Lisp on top of PHP.

</comment><comment><USER5> I haven't looked this over too much but I'm curious as to why they did this: <?hh class MyClass { const int MyConst = 0; private string $x = ''; public function increment(int $x): int { $y = $x + 1; return $y; } }

instead of this: <?hh class MyClass { const MyConst: int = 0; private $x: string = ''; public function increment(int $x): int { $y = $x + 1; return $y; } }

The first seems inconsistent to me. Especially coming from AS3/Haxe where the function return value is indicated in the same manner.

<comment><USER33> Would be more consistent to suffix the types in function decls as well, e.g. `increment($x: int)` vs. `increment(int $x)`.

<comment><USER5> Yep. So much weirdness here when they had a really good shot at "fixing" it.

</comment></comment></comment><comment><USER34> Very excited to play with this. While I know many poo-poo PHP, it still is a pretty decent gateway language.

If these type of innovations introduce hobby programmers into more professional practices and concepts, I'm all for it.

<comment><USER27> Well, it's been poo-pooed for obvious reasons (like Javascript) but those are the languages that are getting all the love in the end, so maybe I should stop programming in a language that I find beautiful (Ruby) and go with the flow.

Yes, I'm slightly bitter :/

<comment><USER35> You should develop in whatever you love. It's a great thing to know multiple languages, though.

</comment></comment></comment><comment><USER36> Every negativity thread on PHP on HN just serves as a reminder how poorly informed and inexperienced most developers here really are.

Good to keep in mind the next time you read a topic on how awesome language X/framework Y/method Z is.

It's depressing to see how much of our profession is informed by the desire to being cool and fashionable, like kids in schoolyard.

</comment><comment><USER37> "Hack provides instantaneous type checking via a local server that watches the filesystem."

What does this mean?

<comment><AUTHOR> On Linux, we use the inotify subsystem to be informed every time you save a source file or switch branches. The hh_server process can then update its data structures immediately, without being explicitly asked.

<comment><USER38> I don't really get why this is the second paragraph on the page of a _language_ though. It's like touting the jar command in an overview of Java.

<comment><AUTHOR> Because this is tremendously important to the usability of the language.

One of the reasons that PHP has been such a success is that you can simply save a source file and reload a web page to see what's going on.

The server-based typechecker that runs instantaneously is what makes it possible for Hack to replicate this experience: you save a file and reload a web page, but you have the safety net of a typechecker that told you about your type errors as soon as you saved the file.

I can't overstate how important this instant feedback is: it's really the thing that distinguishes Hack from working in a more traditional compile-based static language.

</comment></comment></comment></comment><comment><USER39> Am I the only one who finds it ironic they have the old deprecated `mysql_*` API in the sample?

</comment><comment><USER40> Are there any plans for a Hack -> PHP transpiler? Or is that impossible? It would be nice to develop on Hack, transpile back to vanilla PHP where we still have to use the PHP.net runtime (shared hosts, Google app engine, Engine Yard, etc)

<comment><USER7> Hack is more than just a type system. At the type level, it would be trivial to erase the types and run the code on vanilla PHP. Dealing with everything else is much harder (xhp, containers, lambda, etc.), at which point it just makes more sense to use HHVM.

</comment></comment><comment><USER41> As said on reddit, that is really a poor choice of name. Good luck looking something related to this language on google putting "hack" in the searchbox... It is even worse than "Go"

<comment><USER42> I imagine everyone is going to start calling it hacklang.

</comment></comment><comment><USER43> I don't understand why there is so much fuss about PHP in 2014. Hasn't most serious web development moved beyond scripting languages? Java and C# have been mature languages for statically-typed web development for years and are not difficult to achieve competence in. And for more fluid yet terse server- side languages you could always go with Ruby, or Smalltalk, or Racket, or F#, and their associated frameworks. Defending PHP in 2014 is almost as surreal as defending Classic ASP in 2014.

</comment><comment><USER44> This rubs me the wrong way.

> Thus, Hack was born. We believe that it offers the best of both dynamically > typed and statically typed languages, and that it will be valuable to > projects of all sizes.

In which way does it offer the benefits of dynamic typing? The entire point seems to be to abandon dynamic typing, which is fine, but not what that sentence says.

I'm guessing, for example, you can't really do meta-programming with Hack in the way you can with dynamic languages, is that correct?

<comment><USER45> AFAIK large PHP libraries(Doctrine/Symfony) generate PHP code (from config files for instance) that is then required and executed.

You cant be more meta than that.

I dont know if you can do that with Hack, but that's definetly a big PHP pattern.

<comment><USER46> It depends on what you mean by "with Hack". You cannot do this in Hack code -- we disallow the dynamic features of the language you need to do this; they are impossible to statically typecheck and verify. However, Hack code iteroperates seamlessly with PHP code, so there's nothing stopping you from having some PHP files in your codebase that do anything that standard PHP can do.

<comment><USER44> So.. my question remains unanswered... if you cannot do meta-programming in hack, how can you say it "offers the best of both dynamically typed and statically typed languages"?

</comment></comment></comment></comment><comment><USER47> I wish these extensions came by way of the PHP core rather than a language that is superimposed on PHP. However, this is awesome.

Is this a layer that is superimposed on PHP that falls back to the default interpreter for unimplemented features or is this a fresh implementation. I suppose my question is, how reliable is this. Are the core PHP bugs going to manifest here? If a bug gets fixed on core PHP, will hack be lagging behind?

<comment><USER45> > I wish these extensions came by way of the PHP core

Well where is PHP core then? to my knowledge while PHP 5 was a huge step forward, PHP core did little to fix PHP stupid design flaws,for the sake of backward compatibility.

We are in a new era, libraries are more and more decoupled,so they are easy to write or rewrite,backward compatibily shouldnt be an issue when libraries are well versioned and tested across different versions.

And Wordpress folks dont care about PHP.next.Why bother with them?

<comment><USER48> Can you expand on "Wordpress folks dont care about PHP.next" ?

<comment><USER45> look at Wordpress codebase.It's not modern PHP because old PHP versions support.

<comment><USER48> And your best explanation is that WordPress core devs just don't care?

</comment></comment></comment></comment></comment><comment><USER49> Odd, just two days ago I was remembering a college class where we had to create a new programming language, and I named mine "Hack". The cover of the paper was a copy of K&R only "C" was replaced by "Hack" and of course I was the author.

</comment><comment><USER50> It seems like a strange monster with PHP body and C++ head or the other way around you choose

<comment><USER7> Yes, pieces of Hack will feel similar to other languages.

bos said in another thread: "Yep, we're happy to be inspired by good ideas when they're obviously the right path to walk."

</comment></comment><comment><USER51> Off topic: Can anyone else see a trend to name projects so that they're impossible to google? Hack, Go, Celery, Fig, Cucumber, Lettuce, you name it.

E.g. the only way how I could find useful resources on how to run celery with fig was to exclude -gorgonzola.

</comment><comment><USER52> I'm really curious to know if any __new __project will start using this language. I really wouldn 't understand why they would. I think that would be an argument to explain why some consider this whole project a loss of time in the long run ( although probably something really great from a purely CS pov)

Edit : i just forgot that i still haven't found any server side language i'm satisfied with. I'm still waiting for a type-annotated variant of python to catch on.... So maybe hack would be a good choice after all. It's such a pity they started this work based on php rather than any other cleaner language.

</comment><comment><USER33> Why a brand new language, instead of building or optimizing the PHP backend for HHVM with an existing language like Haxe? [http://haxe.org/](http://haxe.org/)

<comment><AUTHOR> It was very important to us to have a gradual and smooth upgrade path, such that you can start using Hack by just tweaking the "<?php" header at the top of a source file.

Obviously switching to a syntactically incompatible programming language would be at odds with that goal.

</comment></comment><comment><USER53> I'm really intrigued by the concept of array Shapes. I actually implemented that for Obvious and use it for type checking hashes in ruby with Contracts. [https://github.com/RetroMocha/obvious/blob/master/lib/obviou...](https://github.com/RetroMocha/obvious/blob/master/lib/obvious/contract.rb#L176)

It's cool to see the same idea implemented in Hack. I don't know if anyone at FB has even heard of Obvious, but it's cool that they had the same idea in their language.

</comment><comment><USER54> Hack to PHP is as Dart to JavaScript.

</comment><comment><USER55> This is great and exactly what I need in my PHP. Glad to see types making sort of a come back (see also: TypeScript) as I think they're, in one way or another, necessity in a large scale applications.

One note though - the success of this depends on the success of HHVM. Hopefully FB guys understand that and will push even more to make HHVM the best platform to have for running PHP on.

</comment><comment><USER56> everyone has it's own <opinion> over the fact that facebook had to use another language rather than php. On the other side there is the fact that facebook managed to get one of the most visited website on top of php, period. This is a <fact> and we would never know what would be facebook if it was built on top of another language. Probably they had to shut down early just because they were not able to hire enough developers to keep pace with new stuff and scale. At the same time they haven't suffered the same amount of issues twitter had to deal with (remember the landing whale?) with much less users and traffic just because they were using RoR and that lead them to move to something completely different with scala and a different architecture. But still, facebook has about 4x times users and much more data to deal with (more text, images, video and so on).

Nevertheless, let's remember that web applications are not a one-shop monolithic anymore.

</comment><comment><USER57> Firstly, Awesome! Need to traverse more in it - definitely.

But as the documentation says primarily "HHVM can run both your PHP and Hack code, either separately or when both are part of one project." \-- does that means we can imagine a framework or something like that - where parts of it is in Hacklang and parts are in old PHP?

or such project is somewhere there already?

</comment><comment><USER58> _Somewhat unrelated, but curious_ : Does anyone know if Facebook still uses MySQL heavily?

<comment><USER59> Yes, we are still very active users of MySQL. Most of the primary portions of facebook.com are still served from a backend MySQL system (with lots of caching and many other services involved). Some data is not stored in MySQL, but in other systems such as HBase (messages being a big one).

</comment></comment><comment><USER60> It looks promising, I highly dislike writing PHP and this seems like it might ease the pain, but they could've gotten rid of the damn dollar sign in front of variables, how ugly is this? "return ($y) ==> { return $y + 1; }"

<comment><USER30> Engineer working on Hack here.

You can actually write you example a bit more concisely in Hack: "$y ==> $y + 1".

<comment> iso8859-1 Return statements are optional? So it's just the last statement in a function that'll get returned?

<comment><USER30> The "return" keyword is not needed if the right hand side of the lambda arrow ("==>") is an expression that is not wrapped in curly braces.

If the right hand side _is_ wrapped in curly braces then it is treated as a list of statements, in which case you do need to use the "return" keyword.

<comment><USER30> Edit: My previous comment was referring to the second occurrence of "return" in your example (after the "==>" arrow). Just noticed I mistakenly dropped the first occurrence of "return"; the first occurrence of "return" in your example is needed.

</comment></comment></comment></comment></comment><comment><USER61> Provides some context on the language development. [http://www.wired.com/wiredenterprise/2014/03/facebook- hack/](http://www.wired.com/wiredenterprise/2014/03/facebook-hack/)

</comment><comment><USER62> It's good to see gradual typing rising!

2 things are not obvious from the article:

1\. Why a new language, and not just a gradual typing tool for PHP (like Typed Racket and Typed Clojure)?

2\. Is type information somehow passed to runtime to assist JIT compilation?

</comment><comment><USER63> "You have reinvented PHP better, but that's still no justification": [http://colinm.org/language_checklist.html](http://colinm.org/language_checklist.html)

</comment><comment><USER64> Any¹ sufficiently advanced social network contains an ad-hoc, statically typed² implementation of half of PHP.

¹ YMMV ² sometimes

See also:

KPHP (subset of PHP to C++ translator, released by Vkontankte).

</comment><comment><USER65> Does anybody know if Hack can correctly parse integer literals, properly rejecting malformed ones?

PHP cannot, so I wonder how deep the relationship goes.

</comment><comment><USER66> Looks like another way to polish the PHP turd.

</comment><comment><USER67> > PHP only supports a 256-character set, and hence does not offer native > Unicode support

:(

This was their opportunity to to get multi-byte strings right...

</comment><comment><USER68> Oh great. Now when PHP expands its type annotations, they'll be incompatible with Hack. :(

</comment><comment><USER69> They have best functional programming language geeks around and they made this?

<comment><USER70> I realize it must be shocking to see functional programming language geeks solving real-world problems in a pragmatic way. :-)

Seriously, though, they wanted to move a large PHP codebase over to a better language, at the scale of a multi-billion-dollar tech company, in a reasonable amount of time. They accomplished this. What's the criticism here?

<comment><USER69> I am actually impressed. What shocked me was, functional programming technomancers are not like that at all!

</comment></comment></comment><comment><USER71> Wanted: Backend developer. Must have 5 years of experience with Hack.

<comment><USER72> Wanted: Backend developer. Must have max 1 year of experience in PHP.

</comment></comment><comment><USER73> It seems like the name really suits the language.

</comment><comment><USER58> I thought Hack was already released months ago?</comment>


Ask HN: Motivation to do entrepreneurship?  - <AUTHOR>

I thought about quitting my job and start entrepreneurship. Presently trying to do it in part time - moonlighting. Reality - Iam not able to work satisfactorily in part time doing both.
My idea involves Software but it is not pure play web application.It is more of a platform where software/webapp is one component. I am passionate about the idea to be present in the real world.
So I have a dilemma
- Is Entrepreneurship all about creating what the world want now by pivoting your ideas and making a business model around it. (In that case it is not about the motivation behind your idea but more about serving the people,running the show by yourself and making money eventually.
or
- Is Entrepreneurship all about creating something which is not existing in the real world. Doing it no matter what it takes and finally realizing it in true form what you envisaged - In this case it is about the idea which acted as a motivation to start and less about the money/leverage or the immediate low hanging fruits.
Sub question :
What is the best way to test your idea while on the job before getting in full time? Or it is best to attempt by doing it in full time ? <comment><USER2> _What is the best way to test your idea while on the job before getting in full time?_

It's not easy, but it can be done. Anecdote: my approach has been to build "stuff" related to my idea, using my nights and weekends to code away. After reaching a point where I had a reasonable demo of some of my ideas built, I started calling on friends, former co-workers, acquaintances, etc. - people I considered to be smart, insightful and thoughtful - and arranging to meet with them (over lunch, before work, after work, whatever) and go over things and get their thoughts. I'm at the point now where I'm about to embark on a more formal process using @sgblank's "Customer Development Methodology" approach.

Some key points seem, to me, to be this:

It's going to take some sacrifice and stretching yourself... giving up nights and weekends that could be spent going out with friends, or playing sports, or reading, or any number of other leisure activities.

It takes flexibility... if you're trying to squeeze meetings in around a day- job, you may have to get up early (not easy if you're not a "morning person") for a breakfast meeting, or hustle from work to a meeting location across town for an after-work meeting.

Leverage your network of friends, acquaintances, former co-workers, etc. Get preliminary feedback from them, and ask them to refer you to other people that you might need to interact with.

It helps if your day-job employer is fairly laid-back and accommodating. I have the luxury of having a day-job where I can get away with the occasional 2-hour lunch, or where I can leave an hour early, or come in an hour late, or take a half-day off, etc., to chase my entrepreneurial ambitions, and they don't mind (as long as it doesn't interfere with me getting work done). If your day-job isn't like that, it'll be a lot tougher.

<comment><AUTHOR> Thnx. My day job requires traveling. So I couldnt optimise it well. but your efforts are inspiring. Will definitely try harder.

</comment></comment><comment><USER3> Entrepreneurship is all about the pursuit of a vision - one that manifests as you lead the way.

Ultimately, a full time commitment is required. You have a job right now. So the immediate challenge is to transition - from the job - to full time on this.

Capital can be your bridge to a full time commitment. In this case, you would use it to replace income previously received from that job. To fund your efforts, while you build something.

This capital must come from somewhere. It could be from your savings account. A friend or family member. It could come from bank in the form of a loan. Perhaps an investor. Or a combination all of above.

Truly, this challenge is your first test of business. Your performance will be a measure of entrepreneurial ability.

Goodluck.

<comment><AUTHOR> Entrepreneurship is all about the pursuit of a vision - one that manifests as you lead the way. \- Thnx for that.Its helpful in my thought process.

</comment></comment><comment><USER4> Entrepreneurship is about both things. Typically the second route is one that is going to take longer, cost more, and require a lot more explaining. As such it is generally a bit riskier (ideas 'ahead of their time' can take years to mature).

If you don't have a outside responsibilities like a family, you should leave your job to pursue your idea. Entrepreneurs unwilling to take the risk of leaving their job to follow their dream send a bad signal to investors-- you should be passionate enough and believe enough in your idea that you're certain it will succeed.

</comment><comment><USER5> The best type of Entrepruership IMOP is innovation. Dont mistake that for invention. There are already great inventions out there that are not working to their full potential. You need innovation to take these inventions and make them applicable to the present and future.

My advice: Test your idea with human to human interaction. Do you need a website to do what your doing? If you can solve a problem for a person doing it yourself for $5 dollars, well then you have a business! Put it on a website and attract millions, you sustain your business.

</comment><comment><USER6> You've set up a false dilemma between "build what the customer wants" and "build what I want to build". Entrepreneurship can be both those things and more. It depends on the business, the team, the customers, the market, and luck.

As to your sub question, it's really hard to start a company part time, but people still do it. Like all things in business and in life, the answer is "it depends."

<comment><AUTHOR> Thnx for your points. my worry was "I shouldn't end up in a place where I worry that the very idea which was the starting point for moving from a well paid job is not getting realized". This was heard from my friend very recently and so he was demotivated for a while to pursue it further before pivoting. I want to clarify if that is the norm or it is the persistence in an idea against the odds does it.</comment></comment>


Ask HN: Only pay min student debt if there's a non-0 chance it may be canceled? - <AUTHOR> There's talk on the democratic side on coming up with a plan to cancel student debt. If that's the case, is there any reason to pay anything other than the absolute minimum? <comment><USER2> Obama promised to close Guantanamo, and sent plans to Congress to do so. Congress never approved those plans.

You could try to figure out the expected costs of doing what you propose. What are the odds that (for example) Warren becomes president, the plan gets passed by Congress, and is substantially unchanged? Oh, and how long does it take? The analysis changes if it takes 1 month or 3 years.

Then you need to work out what your debt would grow to, assuming minimum payment.

Warren's plan only cancels the first $50K and only for those making under $100,000/year, so you'll also need to figure out your expected salary.

Even if the expected value says it's worthwhile, you also need to consider the full effects of paying a minimum. Are you willing to risk the worst case? Perhaps the political winds change and your debt situation actually gets worse? How will it affect your credit rating in the meanwhile?</comment>


Magnet-hashes for all torrents on The Pirate Bay: 164 MB - <AUTHOR> http://thepiratebay.se/torrent/7016365/The_whole_Pirate_Bay_magnet_archive <comment><USER3> This gets very meta very quickly.

If linking to copyrighted data 'should' be illegal (SOPA), then what about descriptions of that data that are sufficient to identify the original, but not reconstruct it (magnet links)?

And if _those_ were made illegal, then what about descriptions of those descriptions? You can recurse infinitely on this.

Beyond mere amusement, after just one or two recursions, you get to the point where it would be difficult to write a law that would criminalize magnet links without also criminalizing people who link to a Sparknotes-like summary or commentary for a piece of media.

<comment><USER4> That's what this is already, eh?

A description of copyrighted data would be the torrent file, which content producers would probably like to argue are infringing.

A magnet link is a hash of the torrent file, so it's already two steps removed.

Of course, the Pirate Bay magnet dump is _itself_ a torrent, so it's a hash of a hash of a hash of copyrighted data.

And that torrent itself has a magnet link: 938802790a385c49307f34cca4c30f80b03df59c is a hash of a hash of a hash of a hash of copyrighted data. (In the MP/RIAA's ideal world, I've just committed criminal copyright infringement with damages reaching into the $billions.)

Theoretically, the Pirate Bay dump could include the torrent for the Pirate Bay dump, and be an infinitely recursive description of itself... but that's probably an intractable cryptographic process.

<comment><USER5> And, continuing back from hexadecimal, we have the splendid:

        842254760070427756125843951997302119090555319708

in base 10 for the magnet link of the torrent containing the list of magnet links for the pirate bay's torrents. Shall we add to the list of illegal numbers?

Perhaps its prime factorization also belongs on that list.

        2^2×3^2×23×89×24733×462111028392156064869667382167578133253

Best to include the Roman numeral version of the number, as it's equally illegal.

<http://i.imgur.com/JROu8.png>

It would also be wise to outlaw the URL I've just linked, and perhaps also the combination of letters "JROu8" as they also contain the information in question given proper context.

<http://en.wikipedia.org/wiki/Illegal_number>

<comment><USER6> So, going back to hex and turning it into a flag just like the Free Speech flag in the wiki link, would that make this image:

<http://i.imgur.com/OHg3l.png>

the most copyright-infringing flag of all time?

<comment><USER7> What will they do if we find a crazy enough way to make, say, the number 5 infringing? And who owns 5, anyhow?

<comment><USER8> Even worse, they will make pointers illegal.

</comment></comment></comment></comment></comment></comment><comment><USER9> Hello, I am an author of the scrape. I did it more to try it, but who knows, maybe it will be useful to someone.

I went trough the description pages like <http://thepiratebay.se/torrent/$i> by increasing the $i and saving the magnet if pirate bay didn't return 404 error. I went trough the pages as unlogged user, though, so that might be the reason why I got only 1.5m torrents.

I didn't know pirate bay has hidden porn torrents; there is TONS of porn in the scrape already.

The script is in perl, I will post it to pastebin in a moment.

edit: allright, the script itself is here <http://pastebin.com/8RXXthXB>

as you can see, it's not very complicated.

<comment><USER10> I think it's a great idea, and a nifty hack.

It might be an to release a diff against this once a week, and write a quick script to grab it, keeping the list up-to-date.

<comment><USER9> I am thinking of releasing new versions once a week and putting the hash of the torrent of the newest version on some public site. (Say, some twitter account.)

But it would still be more proof of concept than really anything useful - <USER2> comments and descriptions ARE important.

edit: More I am thinking about it, the less useful it sounds.

First, the information about seeders vary constantly, especially with the new torrents.

Also, it STILL depends on single point of failure - the Pirate Bay itself. If TPB will be down for any reason, I will have no place to scrape this from and it will all fall apart anyway.

Plus, I think Pirate Bay itself should make dumps like this. It would probably be much better for their database anyway :)

<comment><USER11> I like the idea of a weekly twitter update with the master magnet hash. I feel like the purpose would not be the usefulness of the string of chars, but more to prove a point.

</comment></comment></comment></comment><comment><USER12> The Pirate Bay front page claims 4.187.907 torrents. But, this 164MB is only ~1.5 million torrents. Is the discrepancy from exclusion of the porn torrents? I'm guessing this guys scrape missed them; you have to be logged in to TPB to see them.

<comment><USER13> It does contain adult content.

The IDs are sequential, but there are substantial gaps. Removed spam torrents, most likely.

</comment></comment><comment><USER14> When TPB had to be blocked in the Netherlands and they switched to recommending magnet links instead of torrents (pretty close after each other), I thought someone would have done this sooner. But it's here now, and proxies do their job just fine ^^. (I couldn't load the page directly as it's blocked here.)

<comment><USER15> magnet of the magnets: magnet:?xt=urn:btih:938802790a385c49307f34cca4c30f80b03df59c&dn=The+whole+Pirate+Bay+magnet+archive&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80&tr=udp%3A%2F%2Ftracker.publicbt.com%3A80&tr=udp%3A%2F%2Ftracker.ccc.de%3A80

<comment><USER16> Should be titled "The whole Pirate Bay magnet archive except this torrent" :-)

I think a magnet link is based on the hash of the contents too, so it might be an interesting problem to include the torrent's own magnet link in itself.

<comment><USER17> Son, in this house we respect Russel's paradox!

</comment></comment></comment></comment><comment><USER18> Fun discussion here, guys. I've posted my thoughts on it at TechCrunch here: [http://techcrunch.com/2012/02/08/is-a-hash-of-hash-of-a- torr...](http://techcrunch.com/2012/02/08/is-a-hash-of-hash-of-a-torrent-of-a- torrent-of-copyrighted-data-copyrighted/)

Hope the community doesn't think I've hijacked the thread for my own purposes. I just thought it was an interesting little discussion and wanted to point it out.

</comment><comment><USER19> I wonder if some self-updating mechanism could be implemented in magnet links. Something like additional signature part in the magnet url so the owner could inform other peers that content is changed and need to be updated.

<comment><USER20> how can this happen i wonder

</comment></comment><comment><USER17> Got it down to 70 MB with lrzip. Any better?

<comment><USER21> 68MB with "xz -9 --extreme" :P

<comment><USER13> 70841044 bytes (67.56 MB) by running it through "sort" first.

Bonus: it's in chronological order.

<comment><USER9> it's in sort-of chronological order originally (partially ordered is the correct term, I guess?)

but not 100%

<comment><USER13> I don't know how it was ordered originally. I imagine just whatever order the scraper returned data.

putting it throughs sort ordered by tpb's id, which I imagine are assigned in chronological order. The low-numbered torrents seem to be from 2004.

</comment></comment></comment></comment></comment><comment><USER22> I wrote <https://github.com/Bogdanp/Pirate> as a fun little exercise and thought some of you might find it useful.

<comment><USER9> Great!

Just one thing: I see you are splitting by |, and some torrents (very few, but some) have | in their name (I didn't bother with escaping that).

<comment><USER22> I've accounted for that by grabbing all the other fields before grabbing the title. `python pirate.py -l | grep '|'` seems to yield correct results :).

<https://github.com/Bogdanp/Pirate/blob/master/pirate.py#L27>

</comment></comment></comment><comment><USER23> I was inspired to _steal and pirate the above magnet link_ into this quick vigilantist internet liberation site: <http://yason.kapsi.fi/piratebay.html>. I would be positively surprised to catch the interest of even a single MAFIAA party, though.

</comment><comment><USER24> i'm in holland from Ziggo, so cant see it.. :( but good news!

<comment><USER25> Does www.br3in.nl work to access it?

<comment><USER26> I didn't know about that one yet, but that's hilarious!

</comment></comment></comment><comment><USER27> Awesome idea. Magnet links will be around as the standard for some time it seems :)

</comment><comment><USER28> sorry if i'm being daft, but can't you get this down to a magnet link itself? THe page linked does just that: magnet:?xt=urn:btih:938802790a385c49307f34cca4c30f80b03df59c&dn=The+whole+Pirate+Bay+magnet+archive&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80&tr=udp%3A%2F%2Ftracker.publicbt.com%3A80&tr=udp%3A%2F%2Ftracker.ccc.de%3A80

but wikipedia has an example of a magnet link like this:

magnet:?xt=urn:sha1:YNCKHTQCWBTRNJIV4WNAE52SJUQCZO5C

so could we get the magnet link to ALL of the magnet-hashes for ALL torrents on the Pirate Bay tdown to, what is that, 35 characters oplus the magnet cruft "magnet:?xt=urn:sha1:"?

<comment><USER29> Hi, would you mind editing your post to remove the really really long string of text? It's breaking the page.

<comment><AUTHOR> Which browser are you using? I am not seeing this no matter how much I resize the window. (I use Nightly, Firefox alpha)

Edit: To clarify, the line/link he posted splits across three rows automatically.

<comment><USER30> Works fine for me on Chrome Stable x64.

<comment><USER31> It breaks the page on Chrome 16.0.912.77m on Windows 7 x64.

<comment><USER30> The stable build is on 17.0.963.46 m. Been a while since you've restart your browser?

<comment><USER32> Breaks with Chrome 18.0.1017.2.dev on Lucid as well.

<comment><USER33> Still broken on Chrome 28.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER34> Maybe I'm being a bit black-and-white on this, but while the meta and the philosophy is interesting to talk about, no one is mentioning the morality. Stealing is wrong. You're taking someone else's work and not compensating them for it. I think it's sad that we're all so worried about the law when, in reality, you shouldn't pirate music for the same reason you don't steal a candy bar from the grocery store or snag 5 dollars out of your coworker's wallet or hack into Dropbox to get extra storage for free. It's wrong.

<comment><USER10> I'm getting a bit sick of the 'piracy is theft' nonsense. It isn't. Nobody is deprived of their possession. Me copying your song doesn't result in you no longer having a song.

Piracy is far closer to plagiarism, but even then only to a point. In plagiarism, one attempts to pass off the work of another as one's own. In piracy, one simply copies another's work for one's own use. They are fundamentally different.

This is why piracy is as prevalent as it is: it simply is not as bad as plagiarism, let alone theft. Most people have an intuitive understanding of this, and those who pirate do so without the cognitive dissonance that comes with acting against their moral code. It might be "wrong" in an abstract sense, sort of like lying on your resume is "wrong", but it's not wrong in the absolute sense of harming another person's body or property.

<comment><USER33> The real problem is that piracy is an attack on our capitalist society's framework for handling a new type of good--a non-scarce good. Copies of data are not scarce, yet society has decided to declare them to be scarce, by law, on pain of jail time.

Declaring copies of data to be scarce is a convenient convention (for capitalists), because it allows data itself to be sold exactly like the scarce vessels (records, cassettes, books) which used to be sold as a stand-in for the data itself, and like other scarce things (bread, oil).

Without scarcity, capitalism cannot function. You cannot sell air (yet, but see "Spaceballs") because there is air all around so you can't run out of it. You can't sell "fours" because you can create as many fours as you need with a pen and paper or keyboard. However, the capitalists have successfully legislated that certain sequences of data are scarce. If this fictional scarcity of data collapses many people would be unable to make money selling non-scarce "virtual" things like ideas and data, and would have to fall back to selling real things. And they'd be unable to "allocate" these goods to people because everybody could just have whatever they wanted. Very good for people, very bad for capitalists.

Much like the attempt to legislate Pi (a half-true half-myth btw), this 'fiat scarcity' (just coined that) is doomed to ultimate failure. If not in the law, in practice. Like the War on Drugs.</comment></comment></comment>


The movie that doesn't exist and the Redditors who think it does - <AUTHOR> http://www.newstatesman.com/science-tech/internet/2016/12/movie-doesn-t-exist-and-redditors-who-think-it-does <comment><USER2> While reading the article I kept thinking, yea I remember this movie, I can picture the box art. Then it reveals the Kazaam box art and I thought, oh no it's Kazaam I'm thinking of.

</comment><comment><USER3> Seems like the work of a few dedicated trolls taking advantage of people's susceptibility to false ("incepted") memories about long-ago events.

</comment><comment><USER4> This kind of story always reminds me of the Larry Niven's "For a Foggy Night".

</comment><comment><USER5> This is pretty interesting stuff about false group memories, albeit inconclusive.

<comment><USER6> I mean, it seems pretty conclusive to me that the movie didn't exist. It would require a massive and bizarre conspiracy theory to be true.

</comment></comment><comment><USER7> I saw this in a double-feature, paired with "Beverly Hills Gun Club".

</comment><comment><USER8> The movie is kazaam

<comment><USER9> Yeah, I distinctly remember Kazaam, and it didn't have Sinbad.

What did star Sinbad though were First Kid and Jingle All the Way, both of which were released in 1996 (same as Kazaam) and I remember seeing at around the same time as Kazaam.</comment></comment>


Ask HN: Feedback for my first landing page to validate my idea - <AUTHOR>

Dear HNers,
Just created my first landing page to validate my idea and wanted to get some feedback from the community. Followed patio11's advice as much as I can about communicating benefits instead of features.
Would also like to connect with independent consultants to understand the tools that you use to manage projects.
http://unbouncepages.com/tixo/ <comment><USER2> This will seem more harsh than intended, but there's no easy way to say it; I would need to be _extremely_ interested to knowingly give my email address to a marketing-research email-collection landing page, and if a supposedly new company was unwilling or unable to create a simple product announcement web page without using something like unbounce.com, then I'd consider them incompetent.

Let's pretend I'm a busy consultant (I'm not, but I was in a past life). Would I trust my time tracking and billing to supposed company building a web service when they can't even create a simple web page? Or set up their own webserver? --I'm sure you can see my point.

I'm guessing you've used an unbounced template?

With slightly older browsers, the template is broken.

Firefox 18: [http://designtools.org/pix/txio.png](http://designtools.org/pix/txio.png)

Chrome/Chromium 24: [http://designtools.org/pix/txio- chrome.png](http://designtools.org/pix/txio-chrome.png)

It's even worse in a text-based browser (for impaired vision), since the curly brackets "{ }" don't do what you want, and seem like an error of some sort:

[http://designtools.org/pix/txio-text.png](http://designtools.org/pix/txio- text.png)

The text reads pretty good. I'd use "Txio Is Launching Soon!" rather than using "We" \--Other than the URL, I've got no clue who "we" is until I get to the bottom of the page.

For some unknown reason, the first line seems a little rough, and worse, I have no idea why it seems a little rough.

"We're working hard on helping busy consultants find more time ..."

Maybe something like:

"We help busy consultants find more time ..."

"We help busy consultants save time ..."

"We enable busy consultants find more time ..."

"We enable busy consultants to save time ..."

The one thing that Patrick (patio11) does remarkably well is he communicates the benefits of his service without getting bogged down in the details of the features. But, he _also_ communicates the features in very simple language. e.g. "You'll save time by ..."

You've done a good job of stating the benefits, but you've left off any real mention of the "how and why" you're able to provide those benefits. After reading through it multiple times, the most I can divine is you've built some kind of time-tracking and invoicing program/service. Why is your offering better than what I'm currently using? How is your offering better than what I'm currently using?

Though there are plenty of products/services in the time-tracking and invoicing market, it's _huge_ market, and no one has really solved the drudgery of it (well, as far as I know, but I haven't looked in a very long time). Good Luck!

<comment><AUTHOR> Thanks for the fantastic feedback, jcr. Don't worry about being harsh - it's where we all learn :)

I'll definitely address your decisions. Was following a someone else's advice about putting it together quickly and getting it up and running but clearly it's not worked out yet. Haven't had a single conversion!</comment></comment>


Ask HN: Why are we hiding feminism threads now? - <AUTHOR> This thread from today https://news.ycombinator.com/item?id=9941712 quickly rose to the front page and then dropped off to the third page even though there was over 200 points in just a couple hours.
Is talking about feminism too off topic for HN or was it because of the article associated with the topic, or other?
I didn't see any comments from dang in there mentioning it was inappropriate so genuinely curious now. <comment><USER2> > Is talking about feminism too off topic for HN or was it because of the > article associated with the topic, or other?

I'd say it's closer aligned to politics than technology. But I'm just a person with an opinion, not an HN staffer. Definitely as 'dang about that.

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

</comment><comment><USER3> Nothing has changed recently. There have been dozens (probably hundreds) of discussions about feminism on HN. Some stay on the front page; many don't. As with any divisive topic that comes up frequently, the threads tend quickly to become flamewars, and those tend not to stay on the HN front page, though the discussions stay open for additional comments.

Many things affect a story's rank. Upvotes make it go up. User flags make it go down. Moderators downweight posts for various reasons (e.g. when a story or thread breaks the site guidelines or has been discussed recently). Software downweights posts for various reasons. Sometimes it's all of the above.

Please follow the guidelines and send this kind of question to firstname.lastname@example.com, rather than posting it on HN itself, where it's largely off topic.

<comment><USER4> If meta-discussions were fundamentally off-topic, homo sapiens wouldn't exist. Says something about HN right there.

</comment></comment><comment><USER5> I believe I've read before that there is code to detect "controversy" or flamewars and bomb the relevant thread in the default ordering.

<comment><USER6> In looking at that thread (from the OP) I am wondering how much the algorithm, among other things, takes into account the appearance of comments downvoted to oblivion. I would guess that that needs to be a factor considered. A quick scan of that link seems to indicate many grayed out comments. (Which I didn't read..)

</comment></comment><comment><USER7> It only takes a few people flagging a story for it to bumped off the front page. If the general premise of "feminism threads" is that some men in technology treat most women in technology badly, and HN readers are mostly men in technology, it make sense that any "feminism thread" would acquire some flags. And then, when you read the story, you realize that it's "anti- feminism", and so you get the feminists also flagging it. And then on top of all this, you get a third group of people, those who are just sick to death of the whole thing, also flagging it. Whoever's left in the middle has been run over by the pros, the antis, and the don't care's.

</comment><comment><USER8> I have noticed this too, find it deeply frustrating, and concede that it's a major reason why I find myself feeling less welcome here and less interested in being part of the HN community.

</comment><comment><USER9> At the bottom of the page Lists->Active is what I always check after checking the front page.

When there are a lot more comments than upvotes I think its pushed off the front page.</comment>


Building the worst Linux PC ever: 6 hours to boot Ubuntu - <AUTHOR> http://hackaday.com/2012/03/28/building-the-worst-linux-pc-ever/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+hackaday%2FLgoM+%28Hack+a+Day%29 <comment><USER2> These crazy projects are the most fun. As Richard Feynman notoriously said: "What I cannot create, I do not understand".

shameless plug below:

Last year, inspired by Bellard's jslinux, I too wrote an emulator that can run Linux on the browser. Only I was lazy and emulated the vastly easier LatticeMico32 processor.

Anyways, the result was very intellectually satisfying.

After writing the interpreter, I went ahead and wrote a version that generates Javascript code on the fly (and captures up to 3 backwards jumps to the same block), for massive speed ups.

Anyways, it doesn't serve any purposes, but boy was it fun...

The code is at: <https://github.com/ubercomp/jslm32/>

And there's a demo running on: <http://www.ubercomp.com/jslm32/src/>

BEWARE: It only works well on Chrome (takes download time + 10s to boot on my machine).

If anyone is interested in this stuff, just ask and I'll write a post describing what I did to take boot time from 2.5 minutes to 10 seconds.

<comment><USER3> I love stuff like this. If only there was an easy way to make 'GUI' programs Flash/Java might have competition.

<comment><USER2> Working on it...

The LatticeMico32 toolchain (gcc, gdb, ar, ld) is very bad, seriously... I'm thinking of doing a MIPS or ARM emulator, just because the toolchains are so much better to work with.

Anyways, I do have a framebuffer demo that runs at a very decent frame rate on my machine (at this moment it is Chrome only and I unfortunately don't have the binaries for the demo on github). But this is not on Linux, it's on a barebones newlib environment (no Operating System).

Writing a mouse interface is trivial, the only reason I haven't done it yet is I'm thinking if it is worth to continue investing on the LatticeMico32 architecture, as the toolchain makes me want to pull my hair out.

Besides running Linux, the emulated system also runs RTEMS (actually it runs anything as long as you can get the toolchain to produce working binaries), and it might be easier to get an RTEMS system running with a simple graphical environment, but then there wouldn't be man y libraries do choose from.

So that's the status. I believe we are on the verge of having a viable option for making "GUI" programs on a canvas screen. If I were to work full time on it, I could pull a prototype off in about a month or two (literally), maybe a little less as this thing is so addictive I would easily work 16h days on it if I could.

IMHO, the ideal thing would be having an easy to use environment with a mature toolkit on it (I was thinking Qt) and let the user choose the language of choice to develop in. Possible choices would be C, Python, Ruby and Lua, which are fairly easy to have on the web.

Technically, it can be done, I just don't know if there would be enough interest, and how to have a sustainable business model around this idea. What do you think?

<comment><USER3> I think it's a great idea! I also think you are on the right path with using a barebones environment; I use Linux, but it's not right for the purpose.

The biggest market I see for something like this is games or displaying some sort of video. It seems like it is getting harder and harder to find something that Java/Flash can do that HTML5/Javascript can't but they still have their uses. For Flash it's RTMPS for encrypted video. For Java it's ease of development.

I'm so intrigued because it seems it seems like an awesome way to do some browser fuzzing :D

</comment></comment></comment></comment><comment><USER4> The linked blog post misses the interesting bits. Yes, it boots Ubuntu (slowly) via an ARM emulator written for AVR. That's just software.

What struck me is that he wrote a controller for an 8 bit FPM DRAM bus instead of just using a big SRAM. That's surprising, and not at all trivial to do over a bunch of GPIO pins.

<comment><USER5> Would love a more extended explanation of what this means and why it's surprising, for a this software geek who dabbles in hardware.

<comment><USER6> You have to periodically refresh DRAM. That's what the dynamic means in DRAM. If you don't, the memory will "forget" what it's holding. This is because the memory cell is essentially a capacitor.

SRAM would be easier because it's set and forget. It needs a more complex internal circuit, and therefore more expensive.

</comment></comment></comment><comment><USER7> From the actual web site[1], describing the video of the boot process[2]:

 _"The raw video is in a few segments, since I had to change camera batteries a few times while filming."_

[1]: [http://dmitry.co/index.php?p=./04.Thoughts/07.%20Linux%20on%...](http://dmitry.co/index.php?p=./04.Thoughts/07.%20Linux%20on%208bit)

[2]: <http://www.youtube.com/watch?v=nm0POwEtiqE>

</comment><comment><USER8> Impressive. And now I'm wondering if a Minecraft inside Minecraft would actually be realizable. As 8bit CPUs have already been made (altough with unknown architecture), it is a bit less crazy to imagine running linux with a java stack on it. It will be hellish slow and you probably need some sort of "hardware" graphic acceleration. And a lot more memory than the current versions. But hey, running Minecraft in Minecraft would be pure brainmelting awesomeness!

Maybe some sort of Hardware Description Language to Minecraft compiler would be useful.

<comment><USER9> How about Conway's Life in Conway's Life? (Yo, dawg: [http://www.youtube.com/watch?feature=player_embedded&v=Q...](http://www.youtube.com/watch?feature=player_embedded&v=QtJ77qsLrpw) )

<comment><USER10> That pretty much completely blew my mind

</comment></comment></comment><comment><USER11> This link from the comments on that site just has to be shared here:

"Hackers Successfully Install Linux on a Potato" <http://www.bbspot.com/news/2008/12/linux-on-a-potato.html>

<comment><USER12> I see your potato and raise you a dead badger!

<http://www.strangehorizons.com/2004/20040405/badger.shtml>

</comment></comment><comment><USER13> In the '90s I wanted to show a friend the Apple ][ game Robot Odyssey. The only Apple ][ emulators I could find were for Windows. There was a Windows machine in a lab, but it was really awkward to access. However, I had a SPARC on my desk and found a Windows emulator. Running the Apple ][ emulator inside the Windows emulator running on a Sparc I -- it actually ran at about the original speed of the Apple ][.

And this was 15 years before Inception... ;)

Anybody have a SPARC 1 emulator?

<comment><USER14> qemu will do a SparcStation 5 or 10. <http://www.aurel32.net/info/debian_sparc_qemu.php>

</comment></comment><comment><USER15> The article claim that an MMU and minimum bit width of 32-bit is required for Linux. Wasn't µCLinux rolled back into the official kernel, meaning that with the right configuration the Linux kernel will run on CPUs without an MMU and with bit widths less than 32-bit? Eg. the H8 [1].

Perhaps the author meant to write "Ubuntu", rather than "Linux"?

[1] <http://kernel.org/doc/readme/arch-h8300-README>

</comment><comment><USER16> _Linux is generally considered the go-to OS for under powered computers_

"Under-powered" is a moving target. It seems to apply best to computers that don't _quite_ meet the specs of the current Windows, or perform very poorly with it. Anything without a prayer of running WinXP is much worse than under- powered, and modern Linux is a poor choice. An old linux2.4 distro would be a good option, or my personal favorite for truly pathetic hardware, OpenBSD.

 _[Dmitry] threw an antique 30-pin RAM SIMM at the problem. It's wired up directly to the microcontroller..._

Whoa. You can do that? I mean, it makes complete sense, but it never occurred to me... suddenly I might have a use for all those old free RAM sticks.

<comment><USER17> Depends on what you define as a distro. LFS and Gentoo run pretty fast on anything that will run OpenBSD. OpenBSD runs on underpowered stuff because it runs nothing by default. NetBSD is probably more portable though.

</comment></comment><comment><USER18> I hope Sophie Wilson is reading this, as that microcontroller probably isn't far off the BBC Micros that were originally used to prototype the ARM instruction set.

I bet nobody then imagined anyone would emulate un*x on a chip being emulated at such slow speeds.

</comment><comment><USER19> The best part about this is the battery pack in the picture.

I wonder if there's a niche for the equivalent of the Model 100 in today's world?

[http://www.trs-80.com/wordpress/trs-80-computer- line/model-1...](http://www.trs-80.com/wordpress/trs-80-computer- line/model-100/)

A fully mobile general purpose computer with instant boot, impressive battery life, running off 4 AA's.

The Wikireader comes close as the modern equivalent. The input method would have to be something like Siri, with an optional keyboard. With a form factor and batteries from an iPad 3, but with a slower processor and a fast refresh eInk screen, you could have truly phenomenal battery life.

<comment><USER20> Siri (and most other voice recognition on phones) relies on a network connection, that'll put a bit of a dent in the battery life.

</comment></comment><comment><USER21> this is an amazing hack. Well done for this guy, and his totally useless project.

</comment><comment><USER22> As I said earlier, he needs to run jslinux on this stack. It will be like `computing slowmo @ 1Mfps`

</comment><comment><USER23> I'm sure he could coax at least a few more hours out of it by somehow finding a working 1x CD-ROM drive to boot a LiveCD from.

<comment><USER24> I've got one in my basement but getting a working 8 bit scsi interface might be harder.

</comment></comment><comment><USER25> A single cool C hack is a million times more cool than all html/css/js hacks combined.. awe inspiring.. jaw dropping stuff.

</comment><comment><USER25> He hasnt left anything for the rest.. the next coolest stuff will be to run linux in the air.

</comment><comment><USER26> I disbelieve. How could this possibly boot to X without a framebuffer emulator too?

<comment><USER27> There is no X, he is accessing the system through minicom.

<comment><USER28> Theoretically you could boot X without a hardware framebuffer emulator. X supports rendering to normal RAM as well (for example, for VNC connections).

<comment><USER29> Actually, if you go read my source code, you'll see that the emulator DOES in fact emulate a framebuffer. In fact I even have code in place to output the image. I just didn't connect a graphical LCD to this particular built. It is, however, supported.

<comment><USER26> Wow, neat.

What's your day job?

<comment><USER30> software engineer @ google

<comment><USER26> Figures. MTV? (xoogler here)

</comment></comment></comment></comment></comment></comment></comment><comment><USER31> And someone told me recently that Linux won't run on a 286.

</comment><comment><USER32> What's really impressive, is that it still work somehow...

</comment><comment><USER33> This article got me laughing into tears.

Only to make it even funnier by the glazed look in my girlfriends eyes when I was trying to explain whats so funny about guy bootstrapping a 32bit OS on a 8bit micro controller.

I mean the idea of emulating 32bit OS on a 8bit machine is not something too ridiculous on its own. But the setup he used. Oh my god. Must stop trying to comprehend this madness.

Kudos to Dmitry.

<comment><USER34> That's how the first version of the ARM was made, by software simulation on a 6502 in BASIC:

<http://en.wikipedia.org/wiki/ARM_architecture#History></comment></comment>