
Perl/Linux, a Linux distribution where all programs are written in Perl - colinprince
http://perllinux.sourceforge.net/
======
justincormack
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/>

~~~
primitur
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 ..

~~~
derleth
> 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.)

~~~
sedachv
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/>

------
zbowling
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).

~~~
ricardosallmanu
Ι'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.

~~~
klez
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?

~~~
anonymous
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.

------
itmag
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?

~~~
draegtun
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.

------
zokier
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.

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

~~~
zokier
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...

~~~
jff
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.

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

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

------
aaronbrethorst
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!

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

So... a little of both it seems.

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

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

~~~
aaronbrethorst
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>)

------
mariuz
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

------
mhd
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.

------
luckydude
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.

------
mhd
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.

------
pjmlp
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.

~~~
mulander
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/>

~~~
pjmlp
Thanks for the tip, cool information!

------
buntar
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.

~~~
zokier
perl -p -e?

~~~
peterwwillis
add -i to edit a file in place

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

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

~~~
gpvos
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).

~~~
colomon
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.

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

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

------
phete
what? no javascript?

~~~
sp332
That's over here <http://bellard.org/jslinux/tech.html> (runnable
<http://bellard.org/jslinux/>)

------
mochizuki
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

~~~
jlgreco
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.

