freenode/#lisp - IRC Chatlog
Search
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 :-/
10:58:27
edgar-rft
light2yellow, you might be interested in <https://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node367.html>
12:16:35
knobo
I tried css-lite, I did not like it as I need to look in the source for documentation.
12:41:01
drmeister
antoszka: Hello! Yes we got home fine - it was a very smooth trip. I hope it was the same for you.
12:42:43
drmeister
antoszka, phoe, jasom, p_l, shrdlu68: Thanks - I'll check out lparallel and or use a queue. We have Bordeaux threads working.
13:25:29
Xach
mfiano: http://report.quicklisp.org/2018-04-30/failure-report/gamebox-math.html#gamebox-math
13:31:34
jackdaniel
can someone try to load serapeum on the newest ql release? I have an error: `The function SERAPEUM::KEY is undefined.'
13:44:26
jackdaniel
same problem on ecl. I'll try on a separate user account later (without polluted asdf's registry)
13:47:46
knobo
With enhancement: better handling of unknown keyword arguments, which I have been wating for a couple of years :)
14:04:22
mfiano
Xach: This is strange. Even if I touch package.lisp as to force a full recompile, I do not get an error. However if I quickload with :verbose t, warnings become errors.
14:05:15
Xach
mfiano: the best way to catch is to use :verbose t all the time or set *quicklisp-verbose*
14:06:50
jackdaniel
I'm puzzled, I've cleaned cache, removed local-projects and common-lisp/ and I still have this weird issue
14:08:13
Xach
mfiano: when you ql:quickload something, by default, you don't see cl:warnings. if you asdf:load or use quickload verbose, you do.
14:12:11
Xach
From my perspective, I wish there was a really easy way to say "build verbosely and don't catch warnings when building local things but build quietly and catch warnings when building quicklisp-provided things"
14:55:43
jasom
drmeister: one of my first mentors taught me that communicating via queues is hard to mess up. Being hard to mess up is worth its weight in gold when it comes to concurrency
14:56:55
jasom
lparallel's channels are less general-purpose than a queue, but if they do what you need they are even easier.
15:07:42
phoe
"enhancement: namestrings can now be computed for certain pathnames that previously did not have namestrings because of #\. characters in their name and/or type components. "
15:32:38
Xof
Xach: (handler-bind ((warning (lambda (x) (if (quicklisp-provided-p *current-system*) (muffle-warning x) nil)))) ...) ?
15:37:26
Xach
I was thinking about doing something with *compile-file-truename* and if it's in the quicklisp path structure but I don't remember where I landed on that.
15:37:53
Petit_Dejeuner
Is there an easy way to determine the endianess of the machine? All I found in uiop was some stuff for reading little endian bytes.
15:38:15
Xof
the way I'm thinking aloud about is finding the current operation / component and using that
15:38:40
Xach
Petit_Dejeuner: I don't know offhand, but I'm curious - what would you do with that info?
15:41:00
Xof
*systems-being-operated* unfortunately does not have the property we would like -- it doesn't tell us the innermost system
15:41:42
Xof
and it's not clear to me whether you as quicklisp author are allowed to write methods on asdf:operate
15:41:47
Petit_Dejeuner
Xach: I'm trying to write a lisp library equivalent to the following python library. https://docs.python.org/2/library/struct.html
15:42:47
Petit_Dejeuner
I wanted to do something like cl-ppcre where there was a sexpr and text notation, so I want the text notation to be as python comaptible as possible.
15:42:48
Xof
(if you are, you could write an around method that binds a special to the component being operated on, and test for that being in quicklisp's path)
15:43:14
Petit_Dejeuner
Even though I don't see the point of a "native" byte order and figure people could determine that on their own. :/
15:43:43
Xach
Petit_Dejeuner: you could spawn python, pack in "native" order, and check the bytes you get back :)
15:44:10
Petit_Dejeuner
lol, might as well just write a python script and have my library call it at that point
15:56:27
puchacz
I understand there are 2 levels of quoting, either preserving whitespace (rare) or not preserving whitespace (common)
15:57:08
puchacz
not sure if text into attributes needs to be quoted in the same way as text sitting in text nodes
16:06:19
mfiano
Now that Lisp Game Jam 2018 is over, everyone can show a little support and vote for their favorites for the next 3 days before the results are public: https://itch.io/jam/lisp-game-jam-2018/entries