freenode/#lisp - IRC Chatlog
Search
11:53:11
beach
I don't think I see the problem. If a thread is stopped because it is waiting for I/O, why would it be bad to start it so that it can run the GC and then go back to waiting?
11:53:12
flip214
perhaps, later on, you'll want or need some "fast FFI" calls as in "they're guaranteed to complete quickly"
11:54:27
jmercouris
if it is waiting for I/O somehow you will have to switch to "GC" mode, while it is in the middle of doing something
11:54:35
flip214
jmercouris: that's another dimension -- "contexts" as in userspace/kernelspace, or lisp/FFI, ....
11:56:16
flip214
beach: do you have empirical data whether the thread-local heap is likely to include references to global data?
11:57:01
flip214
because if you could determine that since the last GC it's only doing "local" allocations that have no global impact, it could tell the global GC to not bother with this local heap
11:57:42
flip214
yeah, of course, but these are not likely to be released anyway - I'd imagine a (gc :full T :really-full T) flag or so ;)
11:57:55
jmercouris
beach: sorry to distract, but how did your language presentation go? how did the participants receive the information?
11:58:46
flip214
beach: _can_, yes, but some (for me) typical workloads actually won't... like a hunchentoot thread that just builds up an output stream buffer and reads some global state
12:00:13
flip214
beach: if all of your objects have a heap pointer (yeah, expensive, I know), then you might be able to build up a tree of dependent heaps during allocation
12:00:38
flip214
and if one private heap isn't referenced in this tree of heaps, it doesn't need GC (by definition)#
12:01:52
flip214
sorry, that wasn't clear enough. the global GC doesn't need to wait for that thread to mark global objects if the thread knows that it didn't reference any global objects since the last GC.
12:03:43
flip214
I don't know your use cases. Mine include hunchentoot frontends, which (most of the time) won't have any (changing) references to global data...
12:05:02
flip214
beach: if you allow me a bad pun, interrupting stopped threads might require you to solve the halting problem ;)
12:07:19
beach
flip214: Let me try to summarize to see whether I got this: When a thread is stopped due to I/O, it will wait on a lock before going back to its normal business. If that lock is taken, it means that there is a thread doing GC on behalf of the one that just got unstopped. Correct?
12:10:19
beach
shka: Because I don't think I need more than that, and more would just complicate things.
12:11:15
flip214
beach: uh, well, if the locks memory is in the RAM of the other socket and causes some L1, L2, and L3 cache areas to be invalidated, it might...
12:11:59
beach
flip214: Well, I don't care. Your examples (FFI and Web stuff) are not high on my list of important considerations. :)
12:13:20
beach
flip214: Besides, I'll have much better cache performance than a typical copying collector.
12:16:03
flip214
hmmm, I'm not sure about that... making a list's cons cells contiguous in memory during GC has a few nice performance implications, which keeping the cells distributed over multiple (private) heaps doesn't
12:16:39
flip214
perhaps all the CPUs in 5 to 10 years won't have that fancy stuff any more anyway, because of all the possible exploits
12:47:47
mansalss
hey I need a list of words from official Polish Scrabble dictionary. They are available in two forms: in the official Windows app (offline) and in online service. They both deliver an option to check word(s) and find words by anagrams.
12:47:59
mansalss
I want to create a tool for myself to become better Scrabble player, but I need to have a full list of words. I have no experience in reverse engineering. I think the best we can do here is to use this offline dictionary and find out how it works. All I know is that it's most likely encrypted in some way.
12:52:54
jackdaniel
first of all, coercing copyrighted material that way is illegal (in Poland you can't freely break DRM or any sort of security measures in copyrighted material), second it is offtopic for Lisp – sure you can create dictionary-managing engine in Lisp if that's your question, third – I'd recommend building your dictionary on free licenses, like the one present on sjp.pl
12:54:05
jmercouris
another idea might be, find all polish books on project gutenberg, and create your own dictionary. As far as I understand, you don't need the definitions as well, do you?
12:54:38
jackdaniel
that would be counterproductive given I've linked full dictionary which is ready to use
13:09:44
mansalss
<jackdaniel> that would be counterproductive given I've linked full dictionary which is ready to use
13:20:03
xificurC
jackdaniel already pointed out what you were (or still are) trying to do is illegal. Furthermore this is not a place to discuss reverse engineering
13:21:54
mansalss
<mansalss> How would you do it with that given dicitionary? <shka> mansalss: https://sjp.pl/slownik/growy/sjp-20180612.zip
13:22:47
minion
mansalss: please look at gentle: "Common Lisp: A Gentle Introduction to Symbolic Computation" is a smoother introduction to lisp programming. http://www.cs.cmu.edu/~dst/LispBook/
13:24:55
jackdaniel
you could also benefit from reading this essay http://catb.org/~esr/faqs/smart-questions.html (and this is offtopic on my side, sorry about that)
13:33:39
beach
flip214: I might ask for help if I can't work it out, and I might ask for remarks on what I write if I do think I can work it out.
14:24:43
jmercouris
I am reading "Gentle introduction to symbolic lisp" and one of the questions has thrown me off guard "Why can't the special symbols T or NIL be used as variables in a function definition?
14:24:55
jmercouris
My answer was because we are not allowed to evaluate the arguments used in a function definition
14:25:53
jmercouris
further, we need to, when invoking the function assign the symbols to a variable based on the value passed in, this is not possible for T or NIL
14:27:57
jmercouris
that's what I would have said, but they have not introduced that concept yet in the book
14:28:13
jmercouris
so apparently, somehow some way, given the knowledge already introduced in the book, someone should know the answer to the question at that point in time
14:49:42
Ukari
i wanna use with-macro in defmacro, but found it is hard to write the inner macro due to write (list 'fn ,arg) instead of `(fn ,arg)
15:17:16
Ukari
i write (defmacro logger (&body body) `(print (+ ,@body))) (defmacro outside (&body body) `(defmacro inside () `(logger ,,@body))), (outside 1 2), (inside)
15:55:25
fouric
Ukari: you're not sure if you believe me (don't worry, i'm not sure either) or you believe me you just don't know *why*?
15:58:16
fouric
which is to start with the innermost level of backquotes, try to understand that, and then work your way up/out
15:58:58
Ukari
beach, this is one of my condition, https://tinyurl.com/y8t27qoj. another is to make macro yield accessable locally instead of global
16:01:06
beach
Ukari: That's very different. You are defining a macro with the same name each time, namely INSIDE.
16:02:29
beach
Local macros are defined using MACROLET and not DEFMACRO if that is what you are trying to do.
16:02:53
Ukari
it provides a defmacro* which returns a generator and also has lambda list arguements like defmacro
16:03:32
beach
I don't think I am smart enough today to follow what you are trying to say. Sorry about that.
16:28:08
u92urksvz78
anyone out there care to share what kind of interesting CL projects they are currently working on?
16:29:20
u92urksvz78
anyone out there care to share any details about any interesting Common Lisp programming projects they are currently working on?
17:47:16
gendl
Hi, i'm working on some interesting CL projects based on http://gendl.org, don't have a lot of time to share details right now though.
17:47:47
gendl
I do have a question though -- if I have an error object in a variable (like from a handler-case), how can I get a stack trace of that actual error?
17:48:18
gendl
like (handler-case (some-form) (error (err) ;; now I want to get into the debugger directly for err . ...
17:51:31
gendl
nirved: well, yep, that does give a debugger, it seems pretty much the same as just calling (error err)
17:52:24
gendl
in the stack, I'm still seeing let bindings and such which are connected with the handler-bind
17:53:20
gendl
what I really want is a debug stack which would be the same as what I would get just from
17:53:46
gendl
[sorry -- replace 'div' with '/' -- 'div' is our operator which always returns double-floats)
17:54:38
Bike
lisp implementations don't usually store a backtrace in the condition object, as far as i'm aware
18:11:02
nirved
gendl: if you really must have the backtrace, it is implementation dependent, look at slime/swank
18:29:39
rpg
I'm embarrassed to ask this, but does anyone have an example of an ASDF system definition that quashes warnings to avoid failures? I have been using Allegro, whose COMPILE-FILE doesn't fail (as it properly should) on warnings, and now using SBCL, I can't get compile-system to work...
18:40:55
rpg
I tried muffle-warning, but it looks like compile-file may grab up the warning and fail before I can muffle it....
18:44:04
rpg
Xach: I believe it's that SBCL's COMPILE-FILE is refusing to write an output file, not that there are warnings. At least, I *think* so.
19:06:35
rpg
Xach: Aha! *SOMETHING* is rebinding those error interpretation flags, so that they are both valued :ERROR inside COMPILE-FILE*
19:22:59
rpg
hahaha. OK, I see part of the problem -- the AROUND-COMPILE-HOOK isn't scoped around the checking of those flag variables.
19:37:00
rpg
Yes, that's it -- you can bind the behaviours in an around-compile-hook, but that isn't scoped around check-lisp-compiler-warnings
20:49:44
dxtr
So I've got a plist (:|foo| 1 :|bar| 2) - and neither (get :bar) nor (get :|bar|) works
21:14:01
Xach
aeth: pcl mentions a use of them, iirc it stores some reader/writer information in the symbol plist. or you could use it in an interpreter to store the value bound to the symbol. there are other things!
21:14:19
Xach
i don't use them often and can't think of when i used them, but it's a way to associate a bit of your own app data with a symbol
21:19:37
pjb
aeth: (length (remove-if-not (function symbol-plist) (let (l) (dolist (p (list-all-packages) (remove-duplicates l)) (do-symbols (s p) (push s l)))))) #| --> 306 |#
21:20:58
pjb
(length (remove-duplicates (mapcan (lambda (s) (loop for k on (symbol-plist s) by 'cddr collect k)) (let (l) (dolist (p (list-all-packages) (remove-duplicates l)) (do-symbols (s p) (push s l))))))) #| --> 519 |#
21:30:05
pjb
aeth: (remove-duplicates (mapcan (lambda (s) (loop for (k nil) on (symbol-plist s) by #'cddr collect k)) (let (l) (dolist (p (list-all-packages) (remove-duplicates l)) (do-symbols (s p) (push s l)))))) #| --> (com.informatimago.common-lisp.data.constant:unit com.informatimago.common-lisp.data.constant::physical-constant swank/backend::implementation swank/backend::default optima.core:pattern-expand-function) |#
23:32:39
granttrec
does lisp have good build tools? I'm interested in learning a functional language but with experience from previous languages I'd appreciate a simple build tools
23:37:56
pillton
granttrec: Common lisp is a multi-paradigm language. ASDF (https://common-lisp.net/project/asdf/) is what most people use to build common lisp software.
23:49:26
pillton
You will probably have a hard time adjusting to the fact that compilation can mutate the global environment.