freenode/#lisp - IRC Chatlog
Search
0:55:13
asarch
If I have: (defparameter *values* '('(lisp rocks) '(clos rocks even better) '(mcclim is also awesome))) and then I do: (loop for lists in *values* do (loop for element in lists do (format t "Parsing element: ~a~%" element))), how could I get each element?
0:58:08
aeth
You can think of ' as like multiplication. 2*(4+3)=2*4+2*3. '((foo) (bar)) = (list '(foo) '(bar))
1:02:52
White_Flame
asarch: if you (setf *print-pretty* nil), then you'll see the full lists with QUOTE symbols in them when you show *VALUES* at the repl, and you can see how they're in the way
1:04:06
pjb
'('(lisp rocks)) = '((cl:quote (lisp rocks))) and ask yourself why 1- you put (lisp rocks) in a sublist, 2- you put the symbol CL:QUOTE as first element of that sublist.
1:05:02
smokeink
(ql:quickload :com.informatimago) ; System "com.informatimago" not found. Not on quicklisp any more?
1:05:14
aeth
To use the distributive property analogy: '('(foo)) is (list ''(foo)) which of course is just (list (quote (quote (list foo))))
1:05:47
aeth
If you have to work with quote in quote, be aware of that extra quote, but it's rarely what you want
1:06:42
pjb
smokeink: indeed. cd ~/quicklisp/local-projects ; git clone https://github.com/informatimago/lisp informatimago
1:09:15
Xach
smokeink: the author posted many vile racist and neo-nazi things on twitter and i do not wish to work with them in quicklisp or anything else.
1:10:54
pjb
Note how he benefits from free-speech protection by his constitution, but he acts in a completely totalitarian way against others…
1:11:48
smokeink
yeah but if it was nazi stuff and he doesn't want to associate in any way, it's his freedom too
1:18:27
no-defun-allowed
There is also a...was it draw-cons-tree system on Quicklisp which achieves roughly the same thing.
1:20:34
smokeink
pjb: I have neo-nazi friends, I respect their vision , which in part is insightful, but as far as I'm concerned, it's only in part
1:24:23
holycow
Xach: if you are monitoring peoples personal postings online you are no longer worty of support
1:26:19
Xach
holycow: I don't generally seek out things like that, but if I am aware of them and do nothing, I find it intolerable.
1:28:33
holycow
i will make a donation for the work you have done thus far, i find it helpful, but i will no longer be using ql on principle
1:29:11
holycow
* i have not donated to you and should out of principle for the work you have done thus far
1:29:40
no-defun-allowed
holycow: The paradox of tolerance is an odd one; but not really a topic for #lisp. #lispcafe is usually at its greatest throughput when arguing such philosophical things.
1:29:50
holycow
* i admit that my position is hypocritical because my line in the sand is somewhere along the lines of sexual abuse and i would make a similar call then
1:35:21
LdBeth
Does the terminal emulator in CLiki’s suggested projects require to be a VT100 compatible one?
1:36:18
karlosz
i think with suggested projects you should take them in whatever direction you see fit
1:36:40
pjb
LdBeth: you can define your own control codes, but write down a termcap/terminfo entry for your terminal!
5:05:28
beach
HiRE: If you take a job in the right place, or work for the right customer, your employer or customer might not care whether you use Common Lisp or something else.
5:06:13
HiRE
beach: thats true. Similar to the one artcle...cant remember its name where a guy sells common lisp to JPL
5:08:47
beach
Also, consider getting a job at a place that does NOT use Common Lisp, but that has no good reason not to use it. Then you can show them that you can do better with Common Lisp than with what they are currently using.
5:09:22
beach
That's even better than to work for a company that is already convinced about the virtues of Common Lisp.
5:10:34
copec
I do systems admin and devops and my job is 100% remote, I've managed to slip in quite a bit of CL scripting
5:10:42
beach
The only thing I have found to work is to show that you can create a lot of high-quality stuff in a short period of time.
5:14:33
copec
You seem totally qualified for a lot of arbitrary listings I have seen, here in the states
5:16:31
beach
A degree, while not strictly necessary to get the job done, is a kind of international unemployment insurance.
5:17:08
no-defun-allowed
On the contrary, I am trying to find a part-time job so I can pay for university, but I could still wait since it'll just come out of my taxes after university.
5:19:12
HiRE
I'm currently in a PhD program. I just couldn't get enough of paying absurd university prices ;D
5:20:25
HiRE
doing it part time and working full time definitely makes it tolerable despite it taking ages to finish
5:31:22
no-defun-allowed
Anyways, this is probably the reverse of what is usually asked here, but has anyone attempted to implement something like the JVM in Common Lisp?
5:38:09
beach
I strongly recommend you move to a country where the university enrollment fees are low.
5:38:53
Xach
no-defun-allowed: not just "something like" but the real thing, able to load and run java code.
5:58:18
no-defun-allowed
It's bitrotted to the point I can't compile it sadly, but most of the code is there.
9:03:35
no-defun-allowed
I think it's supposed to be usable when the user doesn't have a Common Lisp implementation already.
9:13:27
jackdaniel
beach: it is a package manager which automates downloading the CL implementation of your choice and apparently to set up quiklisp etc
9:13:56
jackdaniel
i.e I couldn't set up my self-build CL implementation for it, managing "active" implementation was quirky etc
9:19:21
pjb
beach: so instead of having the problem of installing a CL implementation, now the newbies have the problem of installing roswell.
9:19:52
beach
Sure. And I would have a problem too, because I don't have a C compiler installed by default.
9:49:38
easye
roswell ain't too bad from a casual user perspective, but I was not very happy when I needed to modify it to install LispWorks last year for Emotiq.
9:52:10
beach
I recently learned that I can't map page 0 because there might be bugs in the OS that dereference NULL and the C compiler does not protect against that by (say) inserting a test.
9:59:28
p_l
and it's less OS bugs and more tricks with application bugs to get them to jump to known address
9:59:43
beach
Yes, so if I distribute SICL, I have to ask every Linux user to reconfigure their systems, thereby making them vulnerable to OS bugs.
10:00:47
beach
So we keep adding kludges on top of hacks to avoid solving the fundamental problems, thereby making life harder for both developers and users.
10:02:11
beach
If I represent NIL as a the machine number 5 and store NIL at address 0, they can't use my system unless they reconfigure.
10:05:30
beach
So now I am in a situation where I must use a 32-bit immediate for NIL, because it can't be stored in the first few pages, and if i want to be able to run the implementation on a system with ASLR, then I also can't have pre-defined data structures in the executable.
10:05:56
no-defun-allowed
https://utcc.utoronto.ca/~cks/space/blog/linux/KernelPageZeroProblem describes it slightly better; the kernel is mapped into the process's address space, and so kernel code could dereference NULL and act weirdly.
10:06:18
beach
So I am basically forced to either have the system behave like a C++ application with ctors, or I am forced to do a full GC at the beginning of the execution, or possibly use relative pointers everywhere. Everything has a cost.
10:31:51
beach
LdBeth: I suspect not. I looked at how Emacs dumped memory to an executable a long time ago, but I think they changed it since. Why do you ask?
10:32:32
no-defun-allowed
"[kdeinit] executes KDE programs and kdeinit loadable modules (KLMs) starting them more efficiently." That's more terrible than I felt while waiting for at least two minutes for KDE4 to load on my old computer.
10:38:30
LdBeth
beach: https://dancol.org/pdumperpres.pdf Indeed, their new solution works on ASLR system
10:39:23
no-defun-allowed
Can you dump an image from a cross-compilation where one implementation compiles another using that method?
10:41:06
LdBeth
Emacs now does not directly mapping data into memory, at the cost of a little overhead
10:43:17
pjb
Let's note that C NULL pointers don't have to be represented by a #b0 bit pattern. At the level of the C source, casting it into a intptr_t should give you 0, and (void*)0 should give you a NULL pointer, but the binary representation of (void*)0 and (intptr_t)0 can be different.
10:43:23
no-defun-allowed
It's certainly useful, but in the "general" case dumping an image doesn't sound easy.
10:44:26
no-defun-allowed
Hm, I think Zeta C/Symbolics C had an odd representation for NULL (which was NIL?) as pointers were arrays of some kind.
10:44:55
no-defun-allowed
pjb: https://stackoverflow.com/questions/2597142/when-was-the-null-macro-not-0
10:45:21
beach
LdBeth: Thanks for the information. That is a terrible kludge that should not have been necessary in the first place.
10:45:50
pjb
beach: there are other reasons why you might not be able to use page 0 (or others pages with small addresses). Sometimes interruption vectors are stored there. Sometimes these addresses are used for fast addressing so the pages are used as temporary registers. And of course, the kernel can memory map them out of the user process reach anyways.
10:46:54
p_l
no-defun-allowed: all "plain" memoy in Symbolics C was a big array that was multiply mapped as different types
10:48:31
beach
So I guess if you take ASLR into account, there is no chance that NIL could be a fixed constant, let alone an 8-bit machine value.
10:54:54
beach
p_l: The problem is not the architecture. The problem is that we insist on programming as if we have access to the raw computer, just as we did in 60 years ago.
10:59:14
LdBeth
There’re lot of tools I can name written using specifically designed languages so they can translated to different architecture and assembled with macro
11:14:20
p_l
beach: making it explicit that you don't have access to raw machine requires either a special machine, or disregard for security. And we no longer can do the latter, niot really
11:15:11
p_l
even AS/400, despite using "special intermediary language" route, implements portion of the necessary stuff in actual physical machine
11:21:19
White_Flame
one of the big historical mistakes of computing was using C as an application langauge
11:21:58
p_l
and C is very much application language, you can't write an OS in it without compiler extensions
11:23:12
White_Flame
but that should be contained in the systems dev stuff, not exposed to the application dev
11:26:15
jackdaniel
I'm sure many people could raise a concern, that while C is indeed part of the topic, it lacks the L suffix :-)
11:29:26
no-defun-allowed
p_l: Clearly you don't use my compiler, where undefined behaviour causes unicorns to shoot out of the screen.
11:55:16
p_l
beach: AS/400 solved security issues involved in having single address space by making a much fine grained control (on hw level) on access to memory locations, with more flexibility than simplistic supervisor/usermode
11:55:57
p_l
as for specific symbol for NIL, it means that a check for NIL doesn't have to dereference memory, nor do you need any special memory location, which is problematic with ASLR and others
11:57:01
p_l
beach: by providing more advanced security measures in hw, the intermediate level "bytecode" could exploit such features for efficient *and* secure implementation
11:57:25
p_l
as for symbols - I honestly believe we have way more cases of NIL-checking than any other, and EQ can just compare the address usually
11:58:10
beach
p_l: I am suggesting making direct access to memory locations impossible. I don't see how that requires special hardware, and I don't see how it would be a security risk.
11:59:21
beach
p_l: Yes, ASLR is a problem for comparing to a constant. So, if ASLR was your argument, I agree.
12:00:14
beach
p_l: But the disadvantages of a separate tag would result in a maintenance nightmare, and also you would need two tests for each iteration in a loop over a list.
12:00:55
beach
p_l: Whereas, even with ASLR, you just have to implement EQ by comparing two lexical locations.
12:00:58
p_l
also, I kinda don't trust "direct access to memory locations is impossible", given several times people escaped from exactly that kind of sandboxing - maybe you'll find a better method to implement it though (I hope)
12:07:00
beach
Also, I would give some more thought to my idea if you could provide some more substance as to what technique would be used to access memory if no operation is provided to do so. More than your distrust, I mean.
12:07:22
beach
I guess the two tests in the loop could be avoided if you don't do it the way SBCL does.
12:12:02
p_l
beach: I'll dig out some details later, but generally there's been a plenty done in JS space - you might be able to avoid them by using a better language for implementation though, so I'm eagerly awaiting more on SICL :)
12:13:06
Shinmera
People have managed to program and launch entirely new games just by pressing the right inputs in Super Mario World
12:15:33
pjb
White_Flame: note that using C for applications is not really the fault of the creators of unix: they provided a fortran compiler!!!
12:17:35
pjb
p_l: you've got an implicit conversion from into to int*; you get a message from the compiler (and if you insist, a segfault when running it).
12:19:51
pjb
As for NIL, I don't think there would be any win today to handle it any differently than any other CL symbol.
12:20:44
pfdietz63
Archaic unix ran in a very constrained environment. It's amazing it (or its C compiler) worked at all in a 16 bit address space.
12:20:59
pjb
Shinmera: security is when you can implement a new game in Super Mario World without crashing or destroying Super Mario World. No security is when pressing buttons let you break Super Mario World, and worse, when it let you program the host computer to a different program.