freenode/#lisp - IRC Chatlog
Search
6:56:18
shangul
Any OS with Lisp tools and a Lisp implementation as its shell? Emulating Lisp machines for example
6:58:27
beach
shangul: There is also Movitz, but I don't think it is being maintained. The author has declared that he wants to create a new version.
7:00:28
beach
shangul: I am planning on as well, but it is not going to be imminent: http://metamodular.com/closos.pdf
7:14:19
beach
Though if you read Tanenbaum & Bos "Modern Operating Systems", you will learn that Genera, Movitz, and Mezzano can't possibly exist, because according to that book, it is impossible to write an operating system in a language that requires automatic memory management.
7:17:48
beach
shangul: It does not have to contain any assembler. There can be a code-generator module in the compiler that generates machine code directly, without using an assembler.
7:18:30
no-defun-allowed
Alternatively, you could generate consing-free code for your CL runtime. The T Scheme system did this a fair bit for its own runtime.
7:20:56
edgar-rft
Build your own Lisp Machine: http://www.justgeek.de/a-fistfull-of-transistors-building-a-cpu-from-scratch-1/
7:21:25
beach
shangul: Most Common Lisp compilers would have an intermediate representation that looks like a symbolic version of machine code. You may or may not call that "assembler".
7:21:43
beach
shangul: Certainly, the compiler needs to contain knowledge about the processor instructions and such.
7:22:14
no-defun-allowed
I should also add most C operating systems are written in invalid C technically: how do we get pointers to wherever (such as 0xb8000 for video memory) and what do we do without malloc, free, etc? There is no conforming C runtime or client code there.
7:22:46
beach
no-defun-allowed: That's what I meant when I said that no operating system can be written in C.
7:23:45
no-defun-allowed
Yes, but it's more of a comment on ridiculous constraints set by the authors.
7:24:17
beach
The standards (C and Common Lisp) do not have anything in them that allows direct access to memory by conforming code.
7:26:25
MichaelRaskin
Bash is better than C. You have a chance to concatenates trings in bash and not leakmemory
7:28:04
jackdaniel
it is like in this meme: 'CL: "I feel sorry for you C!", C: "I don't think about you at all CL"'
7:28:11
oni-on-ion
C is unix language -- dumping core is like stacktrace for a process. don't see how its like ebola
7:28:39
MichaelRaskin
It's fine when it does dump core, the problem is that it should have but does not
7:29:03
jackdaniel
I know that I may have incited bash (sorry about that), but let's focus on the channel topic :)
7:30:02
beach
shangul: So let me put it this way, I don't think Mezzano contain any code in a language that is not Common Lisp.
7:30:40
jackdaniel
no-defun-allowed: conforming C does not either. I'm sure you saw LDB in sbcl at least once, and AVER twice or thrice ,p
7:31:28
jackdaniel
let's focus on advancing Common Lisp world instead of patting ourself that we did chose better than C programmers ^_^
7:32:09
no-defun-allowed
There are more ways for a C program to dump core. Yeah, let's talk about something else.
7:33:06
no-defun-allowed
I read in a Smalltalk editor there was a command to move some selected code into a method and replace it with that method call. Is there such a thing in SLIME?
7:35:00
no-defun-allowed
Say I have (defun f (x) (let ((y ......)) (g x y))), and I select the G call, which is actually more complex cause magic. Then it would ask me for a name, I write something like H, and it places (defun h (x y) (g x y)) before that defun.
7:36:34
no-defun-allowed
There is also some simple closure analysis though, copy-paste can't tell what variables are closed by that form. (Let's not worry about macros for now.)
7:37:14
oni-on-ion
yea, seems like http://www.foldr.org/~michaelw/emacs/redshank/ does some extra things for context
7:37:53
oni-on-ion
but using paredit (et.al) i cannot recommend higher for the business of s-expressing
9:37:36
flip214
well, in vim it would be 'da(' for "delete this parenthesis", "{" to move outside the "paragraph" (ie. the current DEFUN), "p" to paste, and then a bit of typing to surround with the necessary (DEFUN h ()" stuff
13:49:01
beach
shangul: There is no widely agreed-upon definition of "Lisp", so we avoid the issue by only dealing with Common Lisp, which *is* well defined.
14:12:32
shangul
beach, I'll be thankful if you upload it somewhere and give me the link to download :)
14:13:19
beach
Just ask frodef. He comes to #sicl regularly. Or send him email. I don't know how up-to-date my code is.
14:17:59
edgar-rft
shangul: I think https://gitlab.common-lisp.net/movitz is what you're looking for
14:22:49
edgar-rft
Sorry, I don't have a prebuild image, but here's a description how yow you can make one yourself https://trac.common-lisp.net/movitz/wiki/FromNothingToImage
14:25:24
edgar-rft
But *sigh*, again dead source-code links. This seems indeed a thing only frodef can solve.
17:14:33
interruptinuse
hey #lisp, does anyone know of a way to use GNU readline with (read-line) (clisp, mainly)? if I use (read-line) in a REPL, it supports line editing, but doesn't in batch mode
17:16:29
asarch
Is it really bad to do (defclass my-window (glut:window) ...) and then (defmethod glut:display ((w my-window)) ...)?
17:17:35
asarch
I've tried with (defmethod display ((w my-window)) ...) but the main process cannot use it
17:17:59
interruptinuse
Josh_2: i don't need completions or whatnot, but clisp batch-mode (read-line) by itself doesn't support line editing, which would be comfy
17:21:16
interruptinuse
file.lisp is a standalone program which has a small REPL of its own, and will likely be executed in batch mode as `clisp file.lisp`. it evaluates strings which are read by read-line. how can I use line editing with this setup?
17:23:16
interruptinuse
my last resort atm is ffi-ing readline, which is not that bad, but i was wondering there's something built-in i could exploit
17:29:20
Bike
read-line itself doesn't have line editing, it's just waiting for your terminal, i think
17:30:00
interruptinuse
the first one is in batch mode, when you go `clisp file.lisp`, and it doesn't do anything except read stdin
17:30:47
grewal
According to this, https://clisp.sourceforge.io/beta/impnotes/readline-mod.html, clisp has builtin support for calling readline
17:31:27
Bike
interactive read-line isn't different. it's just waiting for an actual line to appear on stdin. i think.
18:01:18
pjb
Then the description insists: "readline will read a line from the terminal and return it"
18:01:36
pjb
"from the terminal" = interactive. There's no batch here. And in batch, there's no terminal!