Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-4041-

Why not port Linux kernel to Common Lisp?

Name: Anonymous 2013-05-25 19:18

Conventional wisdom states that OS kernels must be written in C in order to achieve the necessary levels of performance. This has been the justification for not using more expressive high level languages.

However, for a few years now implementations of Common Lisp such as SBCL have proven to be just as performant as C. What then are the arguments against redoing the kernel in a powerfully expressive language, namely Common Lisp?

I don't think anyone (at least anyone who knows what they are talking about) could argue against the fact that the benefits in transparency and readability would be tremendous, not to mention all the things that can't be done in C that can be done in Lisp, but there may be implementation details that would make this a bad idea.

Name: Anonymous 2013-05-25 19:20

I'm not sure about how would you go about things like memory allocation and drivers.

Name: Anonymous 2013-05-25 19:25

anus
anus
anus

Name: Anonymous 2013-05-25 20:24

>>2
Easy: implement a DSL for that, using macros and higher-order functions. LISP excels at DSLs and macros.

Name: Anonymous 2013-05-25 20:29

for a few years now implementations of Common Lisp such as SBCL have proven to be just as performant as C

Source required - this appears to be complete bullshit from here.

http://benchmarksgame.alioth.debian.org/u64q/benchmark.php?test=all&lang=sbcl&lang2=gcc&data=u64q

Name: Anonymous 2013-05-25 20:37

>>5
extra line after the quote
How about you 1. go back to Reddit, 2. take your links to gaming websights with you?

Name: Anonymous 2013-05-26 0:42

The Linux kernel cannot be written in rispu because the Linux kernel is not a factorial function.

Name: Anonymous 2013-05-26 8:08

Why not port Linux kernel to Common Lisp?

The maintainers don't wish to maintain a Lisp Linux, only a C Linux.

Name: Anonymous 2013-05-26 8:23

>>1
Why not port Linux kernel to Common Lisp?
If you write a C/C++ to Lisp compiler, then your kernel will be in Lisp

Name: Anonymous 2013-05-26 8:24

>>9
Although Common Lisp has some annoying features, like all symbols being upper-case, while C/C++ is cases sensitive.

Name: Anonymous 2013-05-26 8:24

>>6
How about you











































LLLLLLLLLLLLLEEEEEEEEEEEEEEEEEEELLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL
>EGIMWING GROZO

Name: Anonymous 2013-05-26 8:27

Modern x86 processors also have some features for visualization and dynamic dispatch. So one can probably implement bignums without overhead.

Name: Anonymous 2013-05-26 12:34

why don't you do it seeing as you're such a CL aficionado

Name: Anonymous 2013-05-26 12:39

Because Linux is a shit kernel, at least pick something decent to begin with.

Name: Anonymous 2013-05-26 12:47

Name: Anonymous 2013-05-26 12:48

>>15
it already uses Lisp:
Available programming languages(s)     ProtoLisp

Name: Anonymous 2013-05-26 12:50

Name: Anonymous 2013-05-26 12:52

>>15
or SymtaOS, where everything is a function:

SYMTA> (symta "lib map: F => F")
($(folder (lib data)) $(file (lib test.png)))
NIL
SYMTA> (symta "lib map: F => F name")
(data `test.png`)
NIL
SYMTA>

Name: Anonymous 2013-05-26 12:58

>>18
and it can potentially detect if FASL misses some external files or garbage collect unreferenced ones

Name: Anonymous 2013-05-26 13:51

>>19
Plz explain

Name: Anonymous 2013-05-26 15:27

>>20

SYMTA> (symta "lib.data.chest")
$lib.data.chest.png
NIL
SYMTA> (symta "lib.data map: X => X name")
(chest flower potion)
NIL
SYMTA> (symta "lib.data map: X => list X.name X.type")
((chest png) (flower png) (potion png))
NIL
SYMTA>

Name: Anonymous 2013-05-26 15:33

>>20
It goes like this: you're a nigger kike.

Name: Anonymous 2013-05-26 16:10

>>21
Syntax allows a lot of syntatic sugar

SYMTA> (symta "lib.data.map{to X: list X.name X.type}")
((chest png) (flower png) (potion png))
NIL
SYMTA> (symta "lib.data.map{X => list X.name X.type}")
((chest png) (flower png) (potion png))
NIL
SYMTA> (symta "lib.data.map{| to X || list X.name X.type}")
((chest png) (flower png) (potion png))
NIL
SYMTA>

Name: Anonymous 2013-05-27 3:12

A DSL for memory and drivers? Why not write them in good suitable, already existent language to start with?

A layered approach is a better idea in my opinion. Write from the metal towards an abstract machine specification, which includes things like memory mapping and address spaces, processes, file system and drivers. Some things in this layer could be implemented in lisp if proper hooks are provided.
This then plugs into a lisp implementation which constitutes the upper part of the kernel and the user space.

Instead of forcing lisp to fit a machine, make the machine fit lisp

Name: Anonymous 2013-05-27 3:48

Name: Anonymous 2013-05-27 4:34

I've a few new ideas for Lisp OS security, which would eliminate even the possibility of writing a virus:

Unauthorized program should't be able to access filesystem or internet. Every program should be limited in access only to files and directories provided by the user, while internet access is given only to programs installed under apps.interned_allowed directory. There should be a way to reject privileges given to file/directory handles, so accessing them would produce exception. Users shouldn't see outside of their home directory and all file-sharing should be explicit. User password should be too kept under's home directory, so it could be changed without much fuzz with /etc/passwd.

Name: Anonymous 2013-05-27 4:40

>>26
The file system is an artifact of the limitations of early processors that had no memory virtualization capabilities and had an insufficient memory address word size. Programs and data had to be marshalled out of and back into a logically distinct store because 64K can only hold so much information. Modern 32 and 64 bit processors with memory management units can treat storage as large, slow, persistent memory obviating the contortions required in conventional operating systems to keep data from going away when the computer is shut down.

A heirarchical name space is still required for users to keep track of where they put things but virtual memory can hold that tree structure just as well as inodes can and the judicious use of separate memory spaces can side-step a 4 gigabyte limitation for storage on 32-bit machines.

Name: Anonymous 2013-05-27 4:40

>>25
It's kind of hard to appreciate the differences (between Zmacs and Emacs) from reading a description. It's even hard to appreciate it from using Zmacs. Where the light dawns is when you've been using Zmacs for a while and go back to using plain old Emacs.

What, you mean there's no keystroke to bring up a list of every change I've made in every file on the box? What, you mean there's code on the box whose source I can't pop up with a keystroke? What, you mean I have to run some sort of tags program on source files before I can find definitions? What, you mean there's code on the box that isn't cross-referenced? What, you mean there's running code on the box whose source I can't step into? What, you mean I can't insert references to objects on the screen into my code just by clicking the screen objects?

Zmacs is tightly integrated with Genera, and it's Lisp all the way down to the microcode. Emacs is great, don't get me wrong, but it's at a different remove from the system.

Name: Anonymous 2013-05-27 8:38

>>4
Let's see a prototype. Go.

Name: Anonymous 2013-05-27 8:46

Name: Anonymous 2013-05-27 8:57

>>26
Much better, only programs reviewed by a comitee of governemt officials, bankers, and representatives of the biggest companies that trade in Wall Street should allow binaries to be uploaded on the Internet.

Name: Anonymous 2013-05-27 9:13

>>30
That's a proof of concept for programming a NES machine in Lisp. We need someone to take it to the next step and implement memory allocation and drivers for something. Whoever does this should do it either for the Raspberry PI architecture or x86.

Name: P. 2013-05-27 9:36

If it ain't lispm, it's crap.

Name: Anonymous 2013-05-27 9:36

>>32
Still the main problems are dynamic typing and garbage collection, which could be unpredictable, but using manual memory management and limiting precision to fixnums would just invite bugs. I.e. one would want to use full blown Lisp all the way down, just after bootstrap.

Name: Anonymous 2013-05-27 9:39

>>34
Although modern PCs have fast CPUs, so one could instead hard limit GC heap to just 512kb, which could be collected in a microsecond.

Name: Anonymous 2013-05-27 10:35

>>35
And what if I want to store 513kb of data in memory, huh?

Name: Anonymous 2013-05-27 11:04

>>36
Unit tests will fail.

Kernel code can use a few conses for the sake of map and reduces functions, but that is all.

Name: Anonymous 2013-05-27 11:19

I have really crazy idea: files on disk should act directly as functions. So lib.database.select{where job is "programmer"} could be used directly, without referencing the database engine, using deserializer from lib.formats.db, and text file with program code should be directly executable, so so that format handler would jit compile it and cache result.

Name: Anonymous 2013-05-27 11:23

>>38
Unix filesystem already implements it in a half-assed way through /dev/ and ioctl. Lisp OS should take it to extreme - no more files, just closures, so that even symlinks will be implement in userspace.

Name: Anonymous 2013-05-27 11:49

>>37
Unit tests
TDD A SHIT

Name: Anonymous 2013-05-27 15:22

>>10

(readtable-case *readtable*)
=> :UPCASE
(setf (readtable-case *readtable*) :preserve)
=> :PRESERVE
'a
=> 'a
'A
=> 'A

Name: Anonymous 2013-05-27 17:12

>>27
The file system is an artifact of the limitations of early processors
Yes, but we're stuck with it because it's what most are used to. The hierarchial file system is simple and robust. It's pretty tedious to serialize and deserialize in some environments, but in shell scripts that treat files almost as variables it's very easy and suitable to use. Also, it's pretty easy to find a way to organize stuff into a hierarchy, as you say in the following.

A heirarchical name space is still required for users to keep track of where they put things but virtual memory can hold that tree structure just as well as inodes can and the judicious use of separate memory spaces can side-step a 4 gigabyte limitation for storage on 32-bit machines.
Even assuming that all files on the machine would fit in a single 32-bit address space, I wonder where do you put the boundary between program data and user data/content? How do I share an image between two programs? Is it so that instead of using files (with the implication that the data is stored on a disk) I have to juggle address spaces (that contain the image in some format) that different programs can map into or out of memory? Or is there no way to separate a program's data (runtime data, code, etc.) and content? Secondly, how would you ensure consistency?

If we're still talking about lisp OS, then I think I see your point. In that case the data would always be in native lisp data structures that every program on the machine understood and which could be passed from program to program as easily as text streams are piped on unix. The operating system would somehow automagically map or copy data structures and serialize them at times of need in the same way processes are currently swapped out.

I have a suggestion (that isn't new), however, for a lisp OS that doesn't go this far, but still throws out the file system. Some operating systems have used relational databases instead of, or in conjunction with a file system to some success. But instead of a full blown relational database, what about using tuple spaces for durable storage and IPC? In processes current-input-port and current-output-port (or equivalents) would be bound to a tuple space from where it could read and write tuples (i.e. lists). Writing a tuple could be done with just plain old write, but as with tuple spaces in general there would be different read procedures for reading or taking a tuple, or getting any or all the tuples that match a certain wild card.

There could be private tuple spaces for programs to store things like settings and other configuration, and shared ones for what would generally be stored on the file system. Tuple spaces were invented to tackle concurrency and parallellism and all the operations on them would naturally be atomic. Finally, there could be distributed tuple spaces for a network of machines where any program with access to the tuple space could read or contribute with data.

Maybe there could be pipes as well.

Name: Anonymous 2013-05-27 18:23

>>41
That is useless, because all default symbols are |FUCKING-UPPERCASE|.

Name: Anonymous 2013-05-27 18:35

here is how prototype works http://410chan.org/dev/src/136969236946.png

Name: Anonymous 2013-05-27 18:57

>>44
hello ilya
kike name. shalom, hymie!

Name: Anonymous 2013-05-27 19:50

>>42
tl;dr

Name: Anonymous 2013-05-27 20:21

>>45
He uses a Macbook with Intel. He's such a hypocrite.

Name: Anonymous 2013-05-27 20:42

>>44
Apple is a company of kikes. So is Intel, which has some of their production plants in Tel Avevil Jerusalem, Haifa, Petach Tikva, Qiryat Gat and Yakum.

Good job supporting the kikes, Nikiketa Sadvosky the closet kike.

Name: Anonymous 2013-05-27 20:51

>>34
Manual memory management is how the world does their OS. Doing it in Lisp should be easy, am I right?

Name: Anonymous 2013-05-27 21:30

>>49
It's impossible to manually manage memory in Lisp. It's the reason GC was invented.

Name: Anonymous 2013-05-27 21:47

>>50
What if you design a language that is pretty much C using Lisp-style infix notation and static type-checking? This language would only be intended for limited applications like the kernel, drivers, high performance apps or bootstrapping a higher Lisp. It wouldn't a full featured and general Lisp language with REPL, homoiconic data, implicit typing and GC.

Name: Anonymous 2013-05-27 21:58

>>50
That depends on whether your definition of Lisp includes GC, and stuff like closures that would need GC to be useful.

You could still make a language with first class functions, s-expressions and macros, dynamic typing, etc.  Symbolics used low-level Lisp-like languages (or DSLs, whatever) to write device drivers and bootstrap lisp machines.

Name: Anonymous 2013-05-28 3:57

>MOAR LIEK E/G/IN D/G/IKSTRA XDDDDDDDDDDDD
>/PROG/N

Name: Anonymous 2013-05-28 4:25

>>45
http://en.wikipedia.org/wiki/Julie_%28given_name%29 isn't a kike name. Moreover, Romans destroyed filthy Jewish empire and killed Jesus the kike.

Name: Anonymous 2013-05-28 4:30

>>51
You will be severely limited in design
1. no map/reduce
2. no upward funarg
3. integer overflow, because of no bignums
4. insecure design, because of direct memory access
5. no revocable capabilities, because of direct memory access and no GC with upward funargs

Name: Anonymous 2013-05-28 4:33

>>55
6. slow/complicated syscalls and message passing, because of virtual memory context switches.

Name: Anonymous 2013-05-28 5:49

>>42
How do I share an image between two programs?
If "image" is a lib/image.png, then calling lib.image would use system or overridden codec to load it as an immutable WxH array, so you can share it among different applications, without crap like load_png("lib/image") or filenames

Name: Anonymous 2013-05-28 5:50

>>57
And absence of direct filesystem access would enhance overall security, just forbidding unmanaged memory access.

Name: Anonymous 2013-05-28 5:51

>>58
just LIKE forbidding unmanaged memory access.
self fix

Name: Anonymous 2013-05-28 9:11

>>55
Isn't that the nature of using a language that requires fine programmer control and machine knowledge? Now thinking about it, I don't really see the point of a C with infix syntax in order to simulate a Lisp-like language, it's probably better to use C instead.

>>56
I sincerely doubt slow syscalls would be an issue when your Lisp language uses a garbage collector that you can't control.

Name: Anonymous 2013-05-28 9:27

>>60
Isn't that the nature of using a language that requires fine programmer control and machine knowledge?
Nope. Even assembly language provides macro, which trade abstraction for efficiency.

I.e. a funcall in C/C++ is less efficient than a plain goto, yet we use functions anyway.

>I sincerely doubt slow syscalls would be an issue when your Lisp language uses a garbage collector that you can't control.
C/C++ too uses generational garbage collection. It is called "stack", but stores only the first generation.

Don't change these.
Name: Email:
Entire Thread Thread List