freenode/#lisp - IRC Chatlog
Search
23:59:08
pfdietz_
I've found it useful to run unit tests repeatedly in random order. In systems with hidden state this can expose bugs. Found a bug in clisp doing this.
2:07:32
pierpa
"My advisor (Dan Friedman) used to express it like this in the 1980s: \"Software crisis? What software crisis? Just put all programmers in front of a Lisp machine and your crisis is over.\"" -- Matthias Felleisen, 1 hour ago.
2:41:45
pierpa
(MFs point, though, is that at the time they were wrong. He wrote this in a rant *against* Lisp Machines style of developing software)
3:40:56
ealfonso
I'm trying to debug a condition raised in my hunchentoot , but I don't want to resort to print statements when I have slime. Is there a way to get backtraces from hunchentoot handlers in slime?
3:45:32
shrdlu68
Did LispMachines of old have system calls as we know them today? I'm trying to gain perspective on whether it would be possible/desirable to expose the OS's API by some other means, perhaps through a pseudo-filesystem of network.
3:49:38
p_l
what the oldest of them had was multi-threaded VM lying deep inside the CPU that handled some of the work in a way that could be considered "syscalls", but more adequately formed the "Virtual Machine" in which the code lived
3:53:51
p_l
also classic windows pre 4.x (i.e. 1.01 - 3.x) which was implemented essentially as a bunch of shared libraries you linked with
3:54:30
shrdlu68
I'm wondering whether it would make sense to expose syscalls in Linux in some other way, such that one doesn't have to rely in C/Assembly to interface with the kernel.
3:55:57
p_l
shrdlu68: well, you need to do the actual call. Though VDSO kinda does exactly that, for some specialized calls that don't actually do any context switch
3:57:21
p_l
shrdlu68: also, several systems had language-agnostic call interfaces, it's more of an Unix thing that brought C-defined interfaces itno life
3:58:40
beach
shrdlu68: Is it something like this that you are thinking of? http://metamodular.com/POSIX-API/
3:58:45
p_l
shrdlu68: the documentation for VMS should be still out there on HP webservers, it was one of the more language agnostic systems
3:59:18
p_l
MVS (now called z/OS) is old enough to not care, and had significant amount of code written to this day in assembly
3:59:49
p_l
While a lot of windows is now in C land, the COM system is *heavily* used to provide API and handle ABIs
4:00:11
p_l
especially since you can't depend on such silly things as malloc() and free() being the same for two different libs
4:02:26
p_l
I *suspect* AS/400 (now called IBM i) might have Lisp Machine-style lack of system calls across all languages outside of the POSIX environmnet
4:02:57
p_l
but that's because it has capability-style addressing, so calling a function might actually trigger apropriate security measures
4:04:10
p_l
I do sometimes envy the people who got to actually experience or build the things I only got to read about or use emulators for
4:05:19
beach
p_l: I can see that. So how about you help build a LispOS according to my specification? Then you would be part of something like that.
4:08:02
p_l
hard to say. Current priorities involve paying off debts ASAP, in order to free up capital for a planned move to france
4:08:56
p_l
beach: girlfriend likes warm climates, wants spacious area far away from people and a big house :)
4:08:58
beach
shrdlu68: Not really, no. For my LispOS project I don't plan to have anything POSIX like.
4:10:08
shrdlu68
beach: I'm not sure I understand the document. I'm thinking of writing a kernel module that would facilitate language-agnostic syscalls in the Linux kernel. Is this something like that?
4:12:08
beach
shrdlu68: I would need more time to think about it. I haven't had my coffee yet, and it is still early in the morning. :)
4:12:27
p_l
shrdlu68: ahh, one more interesting thing to read, possibly, is classic x86 segmentation and permission handling involved
4:12:46
vtomole
Why does (apply '+ '(1 2))=> 3 and (apply 'and '(1 NIL)) =>The function COMMON-LISP:AND is undefined.?
4:13:03
p_l
shrdlu68: I haven't looked at it in a long time, but it had "call gates" which controlled how you could call from different "modules" with different permission levels
4:14:55
shrdlu68
p_l: You've left me with enough material for a lot of reading. Does what I'm planning make sense?
4:15:51
p_l
I have a bit more pragmatic streak so I always look into things like security model and dealing with both having restricted system *and* hackable system
4:16:19
shrdlu68
I guess what I'm wondering is why this has not been done before. I was inspired by namespaces and cgroups in Linux. The former is implemented in syscalls while the latter is implemented through a pseudo-filesystem.
4:16:54
p_l
shrdlu68: funnily enough, both namespaces and use of pseudo-filesystems the way cgroups are done come from the same OS
4:17:15
shrdlu68
I ahve thought about security a little, not sure how my module would play nice with things like seccomp.
4:17:33
p_l
and there's documented reasoning behind which parts are done through system call and which through exported filesystem
4:18:25
p_l
which had *very* strong separation of what was kernel and user space, yet at the same time mixed the actual programming model in weird way
4:23:47
p_l
they are very close but separate implementations of similar ideas, and generally speaking are interoperable to great degree (as Plan9 4thEd and Inferno had resynced their protocol implementations)
4:24:30
antoszka
but was Inferno rewritten from scratch? Or was it just a "new version" with stuff added/partly rewritten and so on?
4:25:29
p_l
it was a completely new OS that happens to be from related if not same team and which targeted Java as competitor
4:27:05
antoszka
yeah, I can see it was written mostly in Limbo, which is kinda a remake of p9's Alef, right?
4:30:46
p_l
arguably Inferno is one of the more recent "language OSes" but which tries to abstract the underlying hw fully
4:33:13
p_l
Plan 9 was also used not exactly commercially in grid computing efforts and at least one supercomputer
4:36:43
antoszka
p_l: Doesn't Inferno fill a similar niche to Erlang based systems? I know this is a different level of abstraction (OS + lang + runtime) vs (any-OS + lang + runtime).
4:41:54
antoszka
yeah, so that's what I said, but anyway, guess that's a topic for #lispcafe, so i'll shup up here for now :)
4:54:15
drmeister
Say you have a list of N jobs on a machine with M logical processors (N > M) - does anyone have an elegant way to keep all M logical processors busy until the N jobs are done?
4:58:55
beach
Pick an arbitrary subset of M out of N jobs. When a job finishes, select one of the remaining ones to put on that processor.
5:04:32
drmeister
I guess the devil is in the details - how do I know when a job finishes using say Bordeaux threads? thread-alive-p? condition-variable.
5:06:03
shrdlu68
drmeister: You could use locks, such that running threads block execution, and when they finish they reklease the lock and allow the other jobs to run.
5:07:02
p_l
drmeister: you could create M execution threads that pick lambdas to execute from a queue
5:08:04
p_l
however you might have to ensure that there's no blocking calls, or possibly move them to a different thread
5:13:56
p_l
one could mix together Petalisp with ideas of IBM MVS, and optimize the I/O pathways *upfront* and only release the process to execution with I/O pretty much all queued to run
5:14:02
ealfonso
does it make sense to define a macro like this to merge two structs? https://gist.github.com/erjoalgo/1b9dcb5f317639e4b4971255c8b3c5cd
5:16:29
beach
Plus, your indentation is wrong. You must not be using the SLIME-INDENTATION contribution.
5:18:01
beach
And, it looks like you are using CLASS-DIRECT-SLOTS, MAKE-INSTANCE and such that are not defined for structs.
5:19:44
beach
And you use IF with only a `then' branch that is also negated. In such cases, it is better to use UNLESS.
5:21:04
ealfonso
beach I'm using it with a struct and it worked, and CLASS-DIRECT-SLOTS, MAKE-INSTANCE did work
5:21:34
ealfonso
beach I have a config struct with many slots, and I need to default nil values to default ones
5:21:48
beach
ealfonso: Common Lisp is not defined by what works in a particular implementation, but by what the Common Lisp HyperSpec says.
5:22:41
beach
ealfonso: But, sure, if you want your code to work only in a particular implementation, you can use whatever works in it. But you didn't say that, so I am giving you feedback with respect to the language specification.
5:23:55
beach
ealfonso: If I were you, I would not use structs in the first place. I would use standard instances instead.
5:26:38
antoszka
drmeister: doesn't lparallel manage that automatically when you create an appropriate kernel?
5:26:39
ealfonso
I guess I was wondering if there is a more standard way of doing something like this
5:27:31
antoszka
drmeister: BTW, did you guys get to the US without problems? (i'm the guy you met at the airport :))
5:28:30
beach
ealfonso: Furthermore, when you work with standard instances, you have functionality at your disposal that, while not in the Common Lisp HyperSpec, is more consistent across implementations than when you work with structs.
5:41:28
ealfonso
beach thanks for the feedback. I turned it into a function and got SLIME-INDENTATION. I don't really care about other implementations for now
5:48:08
phoe
drmeister: if you want threads and just that, use BORDEAUX-THREADS; if you want to get actual work done, use LPARALLEL
5:50:09
pillton
Depending on the problem it might be worth structuring your computation to work with schedulers like SLURM or Sun Grid Engine.
5:51:41
aeth
If you only use low-level libraries like bt you're probably going to reinvent things, but you're probably going to reinvent them exactly to your specifications, whereas higher-level libraries are going to do things you don't like.
10:11:53
borodust
Xach: latest ccl ("Version 1.11.5/v1.11.5 (LinuxX8664)") seems to bork ~/quicklisp/local-projects/system-index.txt
10:12:33
borodust
I nailed it down to (ql::matching-directory-files "~/quicklisp/local-projects/" (lambda (file) t)) returning different results for sbcl and ccl
10:24:50
borodust
Xach: ah, i see why :/ ccl's directory-entries calls merge-pathnames with :follow-links nil
10:25:45
jackdaniel
borodust: not a solution, but a workaround: issuing ql:register-local-projects from sbcl should make things work on ccl too
10:26:41
borodust
jackdaniel: yeah i did that so far this way, but i use #'write-asdf-manifest-file and call to it overwrite system-index.txt :/
10:46:17
light2yellow
is there a way to splice a list without comma and comma-at? for example, how do I create (a 1 2 3 c) if (setq b '(1 2 3)) ? what would be the equvalent of `(a ,@b c) ?
10:53:23
light2yellow
jackdaniel: no high-level goal, just reading about macros and wondering what would be a substitute in normal expressions not prefixed by backquote, since I feel like splicing might be a useful thing
10:55:58
ecraven
light2yellow: it's very instructive, especially since CL has macroexpand-1. unfortunately, most Schemes miss that one :-/