Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Perl/Linux, a Linux distribution where all programs are written in Perl (sourceforge.net)
134 points by colinprince on Aug 17, 2012 | hide | past | favorite | 89 comments


I have been working on [1] a Lua library that can implement all the functionality to do what is needed to bring up a Linux userspace. I should have a very minimal bootable environment very soon, as I have enough of the network tools, mount and so on implemented to put it together. There is not really intended to be a shell and command line tools though, it is just a library but you could have a REPL console. I am more interested in easily creating small system images to run single applications in, see [2] for rationale, building small testable whole system images that are quick to rebuild. Planning to use Musl libc [3] which is small and easy to debug so you can easily follow what is going on, plus the whole userspace will be BSD licensed.

[1] https://github.com/justincormack/ljsyscall [2] http://www.myriabit.com/ljsyscall/ [3] http://www.etalabs.net/musl/


Neat ideas, I hope you continue to make good progress! I'm reminded of LuaOS, of course: http://luaos.net/

As an 8-bit nerd I'd love to return to the days when there was, basically, just one language onboard the computer, and all vendors just used it. :) LuaOS is a cute way to achieve this, as is your efforts too, if I understand you properly.

Of course such an idea is not so foreign in the embedded sphere, where there are plenty of appliances whose LCD interface are little more than a PUTS/GETS in some shell script, but there is some merit to the idea that the ethos of a single-system-language-onboard as an Open Source target may well be worth a serious effort. I'd love to have a new Tablet paradigm where the entire thing is LuaOS and such things as MOAI are easily onboard as well .. it could represent a brave new effort against the Walled Garden Wars we're seeing ..


> As an 8-bit nerd I'd love to return to the days when there was, basically, just one language onboard the computer, and all vendors just used it. :)

Oh, like a Lisp machine. ;)

(Be careful what you wish for, though; the 'one language to rule them all' world was essentially why ADVENT was written in FORTRAN of all languages.)

(Also: Was it ever just one language? Eight-bit systems always had BASIC and assembly language; for a lot of tasks, assembly language was pretty much it, unless you bought a Pascal compiler or something. Lisp machines had Lisp written in the normal way, Lisp written in an obscure way to improve performance, and microcode. Even old AS/400 systems had COBOL and RPG, which is rather a pick-your-poison dilemma but the choice was there.)


Symbolics had C, Fortran, Pascal, Ada and Prolog implementations. The promised benefit of a single-language userspace is in simplifying the tools and debugging and/or making them more powerful. The Linux ABI, ELF, DWARF, linkers, make, and all the awful POSIX stuff is huge and hugely complicated, but you don't really get a lot for it. The other alternative are systems like Plan 9 and software from http://suckless.org/


Well, native assembler is always (hopefully?) going to be a given in any serious architecture decision, so it'd be something like:

languages_onboard ={} lanuages_onboard[0]="assembly" lanuages_onboard[1]="lua" -- .. &etc.


Like busybox on Lua? Sounds interesting


I remember reading about this hack in 2003 wondering if there was any other variations of Linux than just "GNU/Linux". I always hated the term "GNU/Linux" and was looking for an excuse to generalize the name to just "Linux" and win a silly argument with some Stallman following, freedom loving zealots (system admins) at work.

These days Android (being almost 100% GNU free) is a decent argument against the GNU/Linux name for me (although busybox/uClibc stacks on most routers are pretty close as well).


Android is not GNU/Linux. Most desktop and server installations are. "GNU/Linux" is not another name for linux - it's the name of "GNU/Linux".

For the record, I find the name a little silly myself (despite being, as you put it, a Stallman-following freedom-loving zealot). But the fact that linux can be used without GNU is not an argument against naming systems where it is used with GNU, GNU/Linux.


i think RMS just picked the wrong name - GNU is difficult to pronounce. Linux is easy - it rolls off the tongue.

If RMS picked something a bit catchier, it'd have taken more mindshare.


Not to mention it doesn't use the pronunciation of the existing word 'gnu', so there's additional friction as you explain to the newcomer why it's pronounced a stupid way.

I heard a talk by a gnome foundation lawyer, and even she had difficulty sticking to guh-nome. If these were nonsense words it'd be less of a problem.


I think that's part of it, and another part is that GNU failed to pick up the Linux kernel early on. I think if they had quickly recognized, "hey this is a great way to complete a releasable version of GNU OS, at least for an initial release" and put out a preliminary package of some sort, labeled as the GNU operating system with Linux kernel, people would've called it that. The fact that the distro packaging went the other way—people from the Linux community, not the GNU project, plugged together parts of the unfinished GNU OS and the Linux kernel—meant that it got more associated with the name Linux.


March 1994: Linus releases Linux 1.0, November 1994: GNU sponsers the creation of Debian.


That, and it was kind of a jerk move to try and put GNU first in the name.


I think you might be mistaken about the order of events. Originally, the operating system was supposed to just be called "GNU". They developed almost everything except that they bet on the wrong horse with The Hurd. Then Linux came along (Linus used the already available GNU tools to develop Linux) and filled the empty spot.

I sort of can understand that Stallman is pissed that he not only realized the necessity, but actually sat down and spent a lot of time and energy developing a project which today is portrayed as being (mostly) Linus' achievement. I mean, interested techies know the deal with GNU and Linux (the kernel). But in the general public? By now the word "Linux" (meaning the full OS) has already gained some attention outside tech circles, but who has ever heard of "GNU"? At the same time when you listen to Stallman talk about this he likes saying things like "the GNU system was just missing the kernel", as if it was a minor contribution.

I think calling the OS that is based on both GNU and Linux "GNU/Linux" is fair, but at the same time it really just sounds a bit silly.


If anything they put GNU first solely because it's 'GNU over Linux', like TCP/IP or Debian's GNU/kFreeBSD.


Ι'd јuѕt lіkе tο іntеrјесt fοr а mοmеnt. Wһаt уοu'rе rеfеrrіng tο аѕ Lіnux, іѕ іn fасt, GΝU/Lіnux, οr аѕ Ι'vе rесеntlу tаkеn tο саllіng іt, GΝU рluѕ Lіnux. Lіnux іѕ nοt аn οреrаtіng ѕуѕtеm untο іtѕеlf, but rаtһеr аnοtһеr frее сοmрοnеnt οf а fullу funсtіοnіng GΝU ѕуѕtеm mаdе uѕеful bу tһе GΝU сοrеlіbѕ, ѕһеll utіlіtіеѕ аnd vіtаl ѕуѕtеm сοmрοnеntѕ сοmрrіѕіng а full OS аѕ dеfіnеd bу ΡOSΙX.

Mаnу сοmрutеr uѕеrѕ run а mοdіfіеd vеrѕіοn οf tһе GΝU ѕуѕtеm еvеrу dау, wіtһοut rеаlіzіng іt. Τһrοugһ а ресulіаr turn οf еvеntѕ, tһе vеrѕіοn οf GΝU wһісһ іѕ wіdеlу uѕеd tοdау іѕ οftеn саllеd "Lіnux", аnd mаnу οf іtѕ uѕеrѕ аrе nοt аwаrе tһаt іt іѕ bаѕісаllу tһе GΝU ѕуѕtеm, dеvеlοреd bу tһе GΝU Ρrοјесt.

Τһеrе rеаllу іѕ а Lіnux, аnd tһеѕе реοрlе аrе uѕіng іt, but іt іѕ јuѕt а раrt οf tһе ѕуѕtеm tһеу uѕе. Lіnux іѕ tһе kеrnеl: tһе рrοgrаm іn tһе ѕуѕtеm tһаt аllοсаtеѕ tһе mасһіnе'ѕ rеѕοurсеѕ tο tһе οtһеr рrοgrаmѕ tһаt уοu run. Τһе kеrnеl іѕ аn еѕѕеntіаl раrt οf аn οреrаtіng ѕуѕtеm, but uѕеlеѕѕ bу іtѕеlf; іt саn οnlу funсtіοn іn tһе сοntеxt οf а сοmрlеtе οреrаtіng ѕуѕtеm. Lіnux іѕ nοrmаllу uѕеd іn сοmbіnаtіοn wіtһ tһе GΝU οреrаtіng ѕуѕtеm: tһе wһοlе ѕуѕtеm іѕ bаѕісаllу GΝU wіtһ Lіnux аddеd, οr GΝU/Lіnux. All tһе ѕο-саllеd "Lіnux" dіѕtrіbutіοnѕ аrе rеаllу dіѕtrіbutіοnѕ οf GΝU/Lіnux.


For those who don't know, this post is becoming a sort of meme on /r/linux . And while I'm all for giving credit where it's due (by calling the OS GNU/Linux), I think, as I said on Reddit, that this copy/paste job devalues the discussion, since it gets tossed anywhere the system is called just Linux, gets downvoted as off-topic and nobody reads it anymore. So it's, IMHO, pointless and counter-effective.

Since I noticed people tend to be a little less emotional here then on Reddit, does anybody have any opinion on this?


It's troll copypasta from /g/. It's meant to derail discussion and kill threads. It is actually filtered (meaning you can't post it) on 4chan in order to reduce the number of shitposts. If you see it posted, it's a troll.


My main concerns with this message are: 1) Although GNU was conceived as a full operating system, without a kernel it became (in practice) the GNU Toolkit -- a collection of replacement command line tools that you could install on any Unix (style) system, in order to improve / standardize them (made the interoperability among AIX, Solaris, HP/UX, Digital/True64, etc more tolerable). Now I know this wasn't the intention, but that was mostly the reality of that time (early 90's, late 80's).

2) Although Linux is the name of a kernel, it also became a banner for a different style of free software (free vs. open source, the two have different philosophies). The Linux style seems to be OK with free and non-free software co-existing. So calling a distribution GNU/Linux sounds like the entire distribution is in line with the FSF goals. I'd rather leave the GNU title only to distributions that are 100% Free (GNU style free).

3) Back to point 1, a lot of people were brought together due to the different style (Cathedral vs. Bazaar) of Linux (the movement, not the kernel). So Linux should get recognition for more than "just a kernel".


What's wrong with all your letters "h"?



To me, it seems like that just strengthens the argument for using the term GNU/Linux. When GNU was the only userland in town there wasn't much point, but now the extra descriptive power of it is useful.


Android is at most, Android/Linux.

Linux is just a plain kernel, Stallman is right to refer to Linux based distributions as GNU/Linux, since it is the Linux kernel with GNU tools userland.


He's right, and at the same time wrong. Yes, GNU/Linux includes the GNU tools, but if we start naming the component systems where do we stop? Should i tell people i use Gnome/X.org/GNU/Linux? What makes GNU so special that it deserves to be included in the name?

Linux is a nice simple, catchy name that i can use to communicate something to somebody. Putting GNU in front when i say linux does not change what i'm saying.


The FSF folks, and their followers usually, say that besides the GNU userland (coreutils, libc, etc.) the Linux kernel can't be built without gcc. Of course, there are icc builds, clang builds, although both builds require specific patches, but who am I to argue with all of them. Besides, if the userland is so damn important that they're placing its name in front of the kernel name, where's HURD, 20-something years later? Even DNF managed to deliver.

Sometimes I wish a specific distribution, GNU-free, so people can call it LNG (Linux is Not GNU).

PS: Gnome is a GNU project. X.org/GNU/Linux?


> where's HURD, 20-something years later?

Please. HURD is now a low-priority hobby project that a few people are working on for the hell of it. The urgency of building HURD ended when Linux took off.


> where's HURD, 20-something years later?

Here, http://people.debian.org/~sthibault/hurd-i386/installer/cdim...

Linux development only managed to get so far, because many companies saw it as a way to get a cheap UNIX clone, and allocated developers to it, specially due to the BSD litigation going on at the time.

If it wasn't for those companies, Linux would be toy kernel now.


The question wasn't about "where's HURD" as in where's the "download URL". I ran most of the Debian flavors. I'm still interested in their progress as well. But the question still remains: if it's so difficult to write an entire userland, and so easy to write an entire kernel, then why the GNU didn't deliver yet "THE" HURD? Why they don't have a completely free GNU OS that I can install on my completely free hardware with an open BIOS, etc. You know, the same old story that doesn't seem to progress anywhere.

Some people are sick and tired to be "corrected" by the FSF gang. I use the term "Linux". Some people, in a very impolite mode, interrupt me with: "the correct name is GNU/Linux" or other unholy mess that RMS could think of.

> If it wasn't for those companies, Linux would be toy kernel now.

I'd say that without the funding of the Linux kernel, GNU would be a toy OS right now. RMS and co. managed to put together an entire UNIX clone at the time, but they simply didn't grasp a proper kernel for their stuff. Bummer.

The "open source software built by volunteers" meme is long dead by now. Fun fact: people need to eat. The problem with FSF is that they see the World in black and white, when everything is mostly shades of gray. I'm an advocate of the free software, but I got sick and tired of the FSF crowd. Their black/white philosophy won't let them see the forest for the trees. I even had a debate about GPL. Seriously, a software license that protects the freedom by restricting the freedom? Have I passed into a parallel reality where this kind of logic works? The argument of a FSF zealot was: "you know, the train is free to move in any direction guided by the rails". That was the moment I stopped arguing with the FSF zealots as there's no point.


Just a short note of clarification about the GPL: The intent is to protect the freedom of the users, not the developers. Essentially so that every user can potentially be a developer, too.


I know. I read the license. I understand the reason why such restriction exists and it is debatable if the BSD licensed software suffers because it doesn't have an equivalent restriction (eg: Apple/OS X). But for a crowd that's yapping all day long about freedom, they surely need a proper dictionary.


Hurd seems usable ( this video shows many interesting features http://archive.org/details/SamuelThibaultOnGnuHurd )

With the "let's rebuild everything" trend I hope Hurd could be brought to light again. Just to shook the view of what an OS is, and how its design influences the upper stacks.

BTW, how many single-lang userspace projects exists ? perl, lua, any other ? lisp ?


You mean, you want a GNU-free distribution of the GNU GPL licensed kernel?


The fact that it uses the licensing, it does not mean that it is a GNU project. Or the fact that it has to bear the GNU/Something name.


>He's right, and at the same time wrong. Yes, GNU/Linux includes the GNU tools, but if we start naming the component systems where do we stop? Should i tell people i use Gnome/X.org/GNU/Linux? What makes GNU so special that it deserves to be included in the name?

Their FAQ answers that: GNU is the single largest source of code for the system; if you look at all the packages in e.g. debian or fedora you'll find that the largest percentage by far is written by the GNU. So if you want to call it only one thing, that one thing should be "GNU".


> if you look at all the packages in e.g. debian or fedora you'll find that the largest percentage by far is written by the GNU.

No: http://pedrocr.pt/text/how-much-gnu-in-gnu-linux.html


GNU is not a company or a particular group of people. It's more of a label/umbrella under which many projects are developed.

The only reason Linux itself is not considered part of the GNU project is... well I'm not even sure. I guess it's partly because Stallman already had his own baby Kernel in the works (Hurd) and because Linus wanted his own brand name apart from GNU, possibly. Also because GNU itself started as a "system" project and that's what it mostly does, except an outsider provided the Kernel and this Kernel doesn't need the GNU userspace to work. Linux is GPL-licensed software.

As far as I'm concerned it's a matter of egos and tags. I personally go with whatever distribution I use, which is a lot more relevant to practical matters. Debian also runs on NetBSD and FreeBSD kernels, by the way.


Code which is part of the GNU project has its copyright assigned to the Free Software Foundation, which makes it easier for them to sue violators if necessary. Linux doesn't use copyright assignment; its code is owned in part by all of the contributors, and to assign copyright to the FSF, every contributor would have to agree. So that's a practical reason why Linux can't become part of the GNU project.


>GNU is not a company or a particular group of people. It's more of a label/umbrella under which many projects are developed.

True. But it's a representative way to describe the aggregation of all those projects (and doesn't promote a single contributor (a very major one, but still one among many) above everyone else the way calling it "linux" does).


It's because Linux contains non-free firmwares. The Linux-Libre fork of Linux became part of GNU sometime in the last year (I can't find the announcement).


[...] largest source of crap [...] there, fixed it for you


It should be GNU+Linux, not GNU/Linux. This is where the attribution people get seized-up and go all fruity-colored, but its a fact: these are not related sub-brands of each other, they are connected components. You cannot divide Linux from GNU, only add and subtract it.


What do you mean? There were already examples given of Linux without GNU (Android, busybox), and GNU can run on kernels other than Linux (HURD, mach). They are quite divisible.


I think he means that Linux and GNU don't need each other, therefore its not /, its +, as in one is not a sub-component of the other.


Oh! I get it now. primitur: It's supposed to be GNU on (or over) Linux, like TCP/IP.


There was also "Mastodon Linux"[1], an attempt to both get rid of most of the GNU userland as well as stick to the a.out format (for binary compatibility and glibc-sucks reasons). Always thought it was kinda interesting, but pretty dead due to basically being a one-man project (by David Parsons, nowadays mostly known as the author of the discount markdown parser).

[1] http://www.mastodon.biz/


This made me think of something: it's my subjective experience that there is a relative dearth of Perl articles/discussion posted on HN. Is this correct? And if so, why is that the case? Hackers don't use Perl anymore? :)

Is anyone here using Perl in a significant way for their startup?


re: Perl posts on HN - There's actually quite a lot of Perl articles posted here (and I maybe the main culprit of that!). However only a small subset percolate to front page.

re: startups - Ones that quickly come to mind... Lokku, Blekko, Moonfruit, DuckDuckGo, CareerJet & Adzuna.


My tiny company's been around for 13 years now, so it doesn't qualify as a startup. My Perl 5 scripts are very important to my business, and I've even got a couple of Perl 6 scripts helping out these days.


Is anyone here using Perl in a significant way for their startup?

Onyx Neon ( http://onyxneon.com/ ) isn't a startup, but the main part of our publishing pipeline is Perl. (Half of it is on CPAN, and the rest will soon be there.)

Of my other business ventures, two are entirely Perl on the server side and the other uses Perl substantially.


Perl discussions historically tended to be trolled mercilessly on HN, seemingly from adherents of certain competing language environments, so I assume people don't like to post discussions of Perl here.


Anything I would use Perl for, I use Ruby instead.


This reminds me of the sad fact that most distributions are just repackaging the same old GNU tools, or if embedded then busybox. Where's the innovation/experimentation of base userland? Android (other mobile linuxes probably too) is a nice exception, even though I'm not particularly fond of it as a system, I approve that at least it's trying to be different.


Well, there's BSD, Plan 9, Inferno. If you don't want the "same old GNU tools", there are plenty of places to go.


I guess I should have specified Linux distributions, but then I thought that would be obvious from the context.

Besides latest stable of Plan9 was 10 years ago and latest stable of Inferno was 5 years ago...


I wish there was a way to end this meme, so people didn't keep saying the same dumb thing every time: Changes to Plan 9 are continually integrated, with a new ISO being generated every day. Inferno lives as a Mercurial repository these days, and it too gets updated frequently. In Plan 9, for instance, they recently added a better bootloader and support for timed semaphore acquires (and after that patch, you can now build Go for Plan 9). We even get ports to new systems from time to time, like the beagleboard or the gumstix.


Good start would be to edit their respective Wikipedia pages to be more clear on the issue.


At the speed Linux changes, a 5-year-old Inferno would not even build. The lates available tarball is from 2010, but the reason a tarball is even provided is because it speeds up a pull from Mercurial. If you are interested in the current goings on, I've summarized some of them: http://debu.gs/entries/plan-9-and-inferno


plan9 still gets regular updates and there are various forks now all in pretty active development: http://lsub.org/ls/nix.html http://www.quanstro.net/plan9/9atom/ http://code.google.com/p/plan9front/


Erm, GNU is doing the "innovation" here, i.e. adding spurious new flags and options. Which got quite annoying back in the days when I had to work with other commercial Unices and still hits me from time to time on BSDs (including OS X).

Anyone still remember /usr/ucb/bin?


How's that a sad fact? Non-GNU tools are horrible. Want sort -h? Want find -mmin? etc. etc.


Maybe if alternative tools were more actively developed then they wouldn't be so horrible. Not having competition causes stagnation, which is the sad part.


Many are actively developed, but simply do not share GNUs enthusiasm for adding new features. BSD userlands get plenty of love, but they are something I have little interest in using myself. Busybox also gets lots of development, but has much different objective than GNU. Both BSD userlands and Busybox are great.. in their niche; just like GNU is great in its.


Hosted on sourceforge to complete the "remembering years gone by" full house.


In all seriousness, what year is this thing from? I honestly can't tell if this was someone's idea of a joke in 2000, or if this is someone's idea of a joke in 2012. Both seem equally plausible!


> Registered: 2001-03-12 > Last Update: 2009-07-17

So... a little of both it seems.


Thanks for the info. Also, just out of curiosity, are you a U of MN student or alum?


Nope, other side of the country in fact :) Is there another mediocregopher?


Not that I'm aware of, but our (is it still 'our' if you graduated ten years ago?) mascot is the gopher.

Of course, the original artist didn't have a gopher picture to go on when he drew Goldy, so he used a chipmunk instead, assuming there wasn't any difference (http://www.mndaily.com/2003/07/21/goldie-really-gopher)


The download says it was zipped in 2005.


It's nice to study the code and i used some of it for chroot type applications , it's easy to let users play in a restricted environment with perl inside and a few linux utils


A user-editable userland is a pretty neat idea, and if your language of choice is Perl, why not? Plan 9 has the pretty neat 'src' command that immediately opens the source file (or main entry point) of a given command.

Given something like file system overlays, individual users forking their own command versions would be a pretty neat idea, albeit it might turn out to be a bit chaotic. Although not much more than e.g. a highly-customized shell or emacs environment.


This is a hoot! I semi-seriously proposed that we do this at Sun back in the SunOS 4.x days.

Got shot down, of course, as it should have been back then, the CPUs were just not fast enough. Even today, C beats perl pretty handily.

Even so, I think this is pretty cute. Anyone know why it was done? Just because? Or was there a reason.


A Rosetta Code-like site featuring Unix utilities for language comparison / code golfing would be a pretty neat idea. Use the V7 man pages as specs, so you don't go overboard.


This reminds me of Aurorax, an attempt to have a Solaris distribution with the userland software written in Ada.

Sadly the project seems to no longer be alive.


Yes, AuroraUX is generally dead but on the bright sight it initiated[1] the development of GNAT-AUX[2] which is fine up to this day and even compiles Ada for Android devices :)

[1] http://www.dragonlace.net/questions/quest_003/

[2] http://www.dragonlace.net/


Thanks for the tip, cool information!


I could use a lightweigt and fast perl version of SED. There are incompatibilities between sed versions, especially between linux and mac. Therefor a small sed utility that you can ship with every release would be useful.


perl -p -e?


add -i to edit a file in place

     $ perl -p -i -e 's/\r\n/\n/' file1 file2 file3


No one has asked yet, so I guess I have to: is the Perl binary written in Perl?


No. The article says:

> The only compiled code in this Perl/Linux system is: Linux Kernel (not currently built with this project), perl, and uClibc.

The Perl 5 compilers that currently exist all produce code that still needs to be linked to the perl library, which itself is written in C, not Perl. (I don't know the current situation for Perl 6).


Rakudo Perl 6 runs on Parrot, which is written in C. Niecza Perl 6 runs on .NET/mono, and its libraries are a mix of Perl 6 and C# code.


Interesting idea. I guess the guys who wrote it, learned a lot on this way :)


I can't see /bin/sh, and I haven't heard of posix shell implementation in Perl. Am I missing something?


what? no javascript?



I wish they'd make a serious attempt to do this in python, it'd be do fun to hack up all my programs without having to know C, C++, and every other programming language under the sun. Then again maybe I'm just lazy


With rather few exceptions, you only need to learn C if hacking on your userland is your idea of fun. Check out Busybox for a particularly easy one to start hacking.


Well, there is PyCoreutils [1] for the userspace and supervisord [2] for pid 1. This is certainly an interesting idea - too bad the world isn't in dire need for more distributions.

[1] https://launchpad.net/pycoreutils

[2] http://supervisord.org/




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: