freenode/#lisp - IRC Chatlog
Search
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.
13:00:29
samlamamma
There used to be a video on YouTube where some LispM guys (Symbolics?) present an emacsen C++ IDE. Any idea what that video is called?
13:08:35
Nilby
samlamamma: Maybe you mean Lucid Engergize https://www.youtube.com/watch?v=pQQTScuApWk
14:53:22
boeg
ah that works, I had been trying with normal "list" but it just wanted the "cons list" and i'm not sure I understand why, but "list*" works
14:54:29
beach
boeg: You will understand why when you read the Common Lisp HyperSpec page for LIST*.
14:55:36
decent-username
The list section from the book "ANSI Common Lisp" by Paul Graham helped me a lot.
14:58:17
boeg
yeah, I think I know the difference - the dotted list it just "the items" where as a proper list is composed of a dotted list with an element and a pointer to another dotted list, and so on, and the last dotted list will have a nil as its last element? And in this case, the function i'm calling wants a dotted list with elements all the way through, and not a nil at the end
15:01:34
boeg
right - but am I wrong or? a List say (list 1 2 3) is actually (cons 1 (cons 2 (cons 3 nil))) right whereas (list* 1 2 3) is (1 . 2 . 3) or?
15:03:48
phoe
(list* 1 2 3 4 5 ...) == (list 1 2 3 4 5 ...) as long as you only care about the first five elements
15:04:05
dlowe
boeg: lists in CL are standard singly linked lists of two-field structures called conses. all this other stuff is notation
15:04:34
boeg
dlowe: yes, I had just gotten confused - i knew lists were linked lists, but I thought for some reasons conses wasn't
15:05:58
boeg
I am trying to up my common lisp game, but now that i am trying out (next browser) I guess i'll get a lot more practical experience with common lisp since it's configured in common lisp
15:06:28
dlowe
I mean, a linked list is an arrangement - conses are just a convenient standard to build lists out of
15:10:27
boeg
boeg: no done with that for a first pass, right now I'm reading that paradigms of artificial intelligence programming
15:13:25
jdz
jmercouris: there are quite a few more keybindings with C-c C-v prefix, Press C-c C-v ?.
15:25:34
pjb
boeg: note the names: proper-list, dotted-list, circular-list. proper-list implies that the other types of lists are IMproper. This is quite negative. Why would you want to create and use IMproper lists? This will lead to all sorts of difficulties, given that most CL functions are not prepared to deal properly with IMproper lists. They will in general fail on dotted-list, and enter infinite loops on circular-lists.
15:25:53
pjb
boeg: so you have to have a strong justification to use improper lists such as dotted-lists…
15:29:12
luis
I think I'm holding ironclad wrong. https://pastebin.com/nXu6ch1e Can anyone tell me what I'm doing wrong? The encrypted message is unchanged. %-)
15:34:15
gabc
If it returns a value you're throwing it out and not saving it, which would explain what you're describing
15:40:07
_death
for padding, you can use ironclad::add-padding-bytes (for some reason it's not exported?)
15:40:51
luis
_death: seems like I can pass :padding :pkcs7 (or whatever) to the cipher and :handle-final-block t to encrypt.
15:41:03
_death
and for key, you will likely want to use key derivation.. and if you're actually plan on using it rather than learning, you shouldn't use blowfish, and shouldn't use ECB :)
15:42:27
luis
_death: I'm just porting some code, so I think I have to stick to blowfish and ECB since I have encrypted messages floating around that way
15:43:21
luis
_death: but the wikipedia article about ECB illustrates why ECB is a bad idea very eloquently :)
15:50:15
_death
I guess.. personally I like CTR mode (+ authentication) so I don't need to pad or steal from ciphertext :)
15:50:52
_death
there are other useful ironclad operators whose symbols should be exported.. e.g., ironclad::modular-inverse
15:57:22
_death
pkcs7 padding will always add at least one byte.. if the message size is an exact multiple of block size, it will add another block
16:43:39
_death
boeg: huh, we were talking about lists and cons cells, and Joe Marshall just put out a post about it (check planet lisp)