selwyn has quit [Read error: Connection reset by peer]
<aeth>
if I have a (with-open-file (stream #P"test42.txt" :direction :output :if-exists :append :if-does-not-exist :create) ...) for quite a few streams (42 would not be too many, since I'm talking about IRC logging), when do I hit limits?
<aeth>
in a typical implementation of today
<moon-child>
on modern unix, a file descriptor is a signed 32-bit integer between 0 and 2^31-1 or so
notzmv has joined #commonlisp
<moon-child>
so I would not worry about that if I were you
lisp123 has joined #commonlisp
<White_Flame>
there are limits beyond running out of descriptors though. Don't recall where they are unfortunately
<White_Flame>
per-process defaults
<aeth>
I'm just wondering how naive I can make my IRC logging, that's all
<aeth>
Very naive is just leave all of the streams open for all of the files and just keep appending, with periodic FORCE-OUTPUT. Less naive is to only leave it open for very active channels (e.g. here), while not leaving it open for very inactive channels (e.g. my own project channels) until necessary.
<aeth>
However, guessing "inactive" incorrectly is going to mean opening/closing a lot of files
<aeth>
I suppose it kind of has to guess it, though, once queries are taken into account, but those can just be special cased to time out, unlike channels, which are probably going to have some joins/parts/quits/nicks at the very least
<moon-child>
ah, ulimit -n
<aeth>
I could also buffer it for an arbitrary amount of time, but the longer the buffer period is, the more likely that a system failure loses a lot of logs.
lisp123 has quit [Ping timeout: 268 seconds]
<aeth>
I guess with-open-file isn't the way to go since (1) there will be a lot of files and (2) files need to be able to "time out" if inactive until active again (at the very least, for queries)
Lycurgus has joined #commonlisp
Lycurgus has quit [Quit: Exeunt]
Lycurgus has joined #commonlisp
cjb has quit [Quit: brb]
cjb has joined #commonlisp
<pjb>
aeth: ulimit -n
Lycurgus has quit [Quit: Exeunt]
<pjb>
aeth: note: the programs use already a good number of the available file descriptors for the shared libraries etc.
akoana has joined #commonlisp
<aeth>
hmm, interesting, I get 1024, and oddly enough, that might not be enough for IRC
<aeth>
you can "easily" be in a few hundred channels (I'm constantly in anywhere from 16 to 35), which is already pushing into the limits assuming that the machine isn't being used solely for IRC
<aeth>
And yet, every single channel might be active if it logs joins/parts/quits. Most trivially, if you ping out and reconnect before your connection gets the ping timeout, since that ping out will show up in every channel you (re)join.
<phadthai>
shared lib fd are usually closed after reading+mapping, for irc there's the standard 3 (stdin/stdout/stderr) plus one socket per network/server, possibly a few for the display via curses etc... but yes if every channel is logged depending on client it may also mean one fd per channel. As for the 1024, it's probably the process limit more than the total system one
<moon-child>
ooh, hehe, come to think of it
<moon-child>
you can split up your thing into a bunch of different processes, where each one only has a file or two open
<moon-child>
arrange them (the processes) into a tree
<moon-child>
(please don't actually do this)
<White_Flame>
aeth: just use sqlite
<aeth>
White_Flame: hah, no
<aeth>
White_Flame: for one thing, idk the no-power failure state of sqlite, while I know the no-power failure state of appending to a bunch of log files
<phadthai>
it has a recovery log too iirc
<White_Flame>
or a "real" dbms then
<aeth>
also, IRC is pretty much designed for appending to plain text files since it's a text-and-line oriented protocol with no editing/deletion
<White_Flame>
let it deal with all the file/disk handling
<phadthai>
but last I checked does full updates all at a time rewriting the db
<White_Flame>
quassel logs everything to sqlite, and I've not had a problem with recovering from system crashes and such
<aeth>
Afaik, some people lost their logs when they moved from freenode to libera because it wasn't just plain text files.
<aeth>
anyway, using a databse to append a line of text is major overkill
<phadthai>
and text is very natural for irc of course...
<aeth>
you'd only need a database to cache unsent messages in a bouncer (not client)... more for the reliability guarantees than anything else
<White_Flame>
also, since irc logs are often-written, seldom-read, you could just do a singular linear log, and grep for individual channels later
<phadthai>
and can fdatasync at regular intervals
<aeth>
White_Flame: I mean, yes, that's what I do to display my bot's messages in SLIME (it's running in a background thread).
<aeth>
White_Flame: i.e. 19:09:01 <aeth:#lispcafe> In my client, it's just /ping aeth
<aeth>
White_Flame: However, the stateless all-in-one-place log has a few issues. In particular, QUIT and NICK (and perhaps a few others) are global in IRC, which makes it unclear in which channels those are actually taking place.
<phadthai>
you would ideally add your own tags
<aeth>
Since I can /nick foobarbaz1234 but I might not be in every channel where the bot is
<phadthai>
or IDs
<aeth>
Also it becomes unreadable without grep if I was in a bunch of channels, with one way noisier than the others. For instance, my SLIME is basically just a log of #lispcafe because cond is present there, but it is also present in other, quieter channels
<waleee>
what would be the likely reason for someones (not me) M-x slime-connect to fail with "Can't locate module: SWANK-IO-PACKAGE::SWANK-INDENTATION"?
<waleee>
the app image (which has swank enabled) and the system sbcl is the same version
<waleee>
... slime installed an at the current melpa-version &c
random-nick has quit [Ping timeout: 252 seconds]
dlowe has joined #commonlisp
derelict has quit [Quit: WeeChat 3.2]
derelict has joined #commonlisp
[deleted] has joined #commonlisp
livoreno has quit [Ping timeout: 272 seconds]
dlowe has quit [Remote host closed the connection]
bilegeek has quit [Quit: Leaving]
prxq_ has joined #commonlisp
prxq has quit [Ping timeout: 244 seconds]
peterhil has quit [Ping timeout: 252 seconds]
Josh_2 has quit [Quit: ERC (IRC client for Emacs 27.1)]
dsk has joined #commonlisp
waleee has quit [Ping timeout: 272 seconds]
<beach>
Good morning everyone!
IAmRasputin has joined #commonlisp
IAmRasputin has quit [Ping timeout: 265 seconds]
Lycurgus has joined #commonlisp
Lycurgus has quit [Client Quit]
lisp123 has joined #commonlisp
<lisp123>
Hello
<lisp123>
I have an interesting problem for this morning
Lycurgus has joined #commonlisp
<lisp123>
Say I have class A, which I inherit in Class B. Class has slot slot-a
Lycurgus has quit [Remote host closed the connection]
<lisp123>
I want to add keys to slot-a in class B but not class A, i.e. in B it should look like (slot-a :accessor :get-slot-a :initform nil :MY-CUSTOM-KEY key-value) whereas in Class A it should be the same but without my-custom-key
<lisp123>
is that possible?
<loke[m]>
lisp123: if I understand you question correctly, then yes it's possible.
<pjb>
lisp123: yes. Just do it.
<loke[m]>
I presume A and B would have different metaclasses.
<pjb>
loke[m]: unrelated.
<lisp123>
loke[m]: yes exactly, class b has a metaclass, and class a is the generic form of it without a metaclass
<lisp123>
thanks pjb and loke[m] let me try it out now :)
<beach>
lisp123: Your example is very strange with a GET- prefix and an access that is named with a keyword.
<beach>
*accesso
<beach>
*sigh*
<beach>
*accessor
<beach>
And I don't understand this idea of different metaclasses.
<beach>
Then, having A as superclass of B might be problematic.
<lisp123>
beach - I did get instead of b-slot-a since I want the same accessor function across the two classes
<beach>
lisp123: How about you explain a bit more what it is you want to do.
<beach>
Er, what?
<lisp123>
I want to use BKNR datastore to store objects (it uses a metaclass + requires some keys) but want a generic version of the class to also play around with when I don't want it ta automatically go to the datastore
<loke[m]>
lisp123: You are aware of the fact that accessor functions are independent from classes, right?
<lisp123>
yes, but if I name the accessor function class-name-slot-name, then it wouldn't work for 2 classes, since they have different class names
<beach>
lisp123: The name of the access or totally unrelated to the class names. You can name it whatever you want.
<beach>
It is just the global name of a generic function.
<lisp123>
yes exactly, thats why i am doing get-slot-name as the name of the accessor
<lisp123>
in this case
<beach>
*sigh*
<lisp123>
what would you do?
<beach>
Well, I haven't thought of a solution to your problem, but 1. The prefix GET- seems like an import from languages that don't have SETF and should be avoided. 2. The accessor should be named after some intrinsic property that you want to read or write, whereas a slot is an implementation detail the name of which is usually uninteresting.
<lisp123>
That doesn't sound unreasonable
<beach>
So get-<slot-name> has two problems has two problems in as many words.
Lord_of_Life_ has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 265 seconds]
Lord_of_Life_ is now known as Lord_of_Life
<beach>
So, do I understand you correctly that you want to use the custom initarg in a slot option when you define class B using DEFCLASS, but you don't want it to be possible when you define class A using DEFCLASS?
<lisp123>
Yes (p.s. 'slot' in 'slot-name' was just for this example, now that I read your comment a second time - I don't use the word slot in my slot names. I haven't used GET so far, but having a think now on how to avoid it as much as possible)
<lisp123>
Also, Class B is a metaclass of bknr.datastore:persistent-class - whereas Class A is not - that's the main distinction
<beach>
Well, example: In Common Lisp it is more convenient to say (name <instance>) and (setf (name <instance>) <value>).
<beach>
(setf (get-name <instance>)...) looks very strange.
<lisp123>
Yeah I do the same style as you do it, but it's not a super strong view I have. For example, with database related functions I'm currently liking adding the verbs 'insert' 'create' etc in because it distinguishes them to some degree from a vanilla CL form
<beach>
"is a metaclas of"? Do you mean "has as its metaclass"?
<loke[m]>
beach: It doesn't look that strange though. Similar to (SETF (GETHASH ...) X)
<beach>
loke[m]: And that looks very strange.
<lisp123>
beach: yes has as its metaclass
<loke[m]>
How about (SETF (GETF ...) X)
<beach>
Same.
<beach>
lisp123: My immediate reaction is that you may need to intervene in some MOP stuff like COMPUTE-EFFECTIVE-SLOT-DEFINITION.
<beach>
Your direct slot definition classes are different in A and B since A does not have a special metaclass, but B does. So the metaclass of B has a different DIRECT-SLOT-DEFINITION-CLASS.
<beach>
So I presume COMPUTE-EFFECTIVE-SLOT-DEFINITION is defined by the bknr library so that it can handle the custom DIRECT-SLOT-DEFINITION-CLASS, and it may very well ask for the value of a slot in the direct slot-definition object that is not present in the direct slot from A.
<lisp123>
beach: thanks, i just tested and it doesn't work
<lisp123>
is there anyway around it without having to do MOP stuff as its beyond my scope?
lisp123 has quit [Remote host closed the connection]
lisp123 has joined #commonlisp
lisp123 has quit [Remote host closed the connection]
lisp123 has joined #commonlisp
<lisp123>
I'm just going to define two sets of classes (otherwise equivalent)
<lisp123>
and replicate the defmethods where appropriate
<lisp123>
Not elegant, but at least easily understandable and will only take me 30 minutes
lisp123 has quit [Remote host closed the connection]
lisp123 has joined #commonlisp
lisp123 has quit [Ping timeout: 268 seconds]
lisp123 has joined #commonlisp
lisp123_ has joined #commonlisp
Inline has quit [Quit: Leaving]
lisp123_ has quit [Ping timeout: 265 seconds]
etiago has quit [Ping timeout: 244 seconds]
jemoka_ is now known as jemoka
etiago has joined #commonlisp
elf_fortrez has joined #commonlisp
elf_fortrez has quit [Write error: Broken pipe]
lisp123_ has joined #commonlisp
akoana has quit [Quit: leaving]
derelict has quit [Ping timeout: 250 seconds]
derelict has joined #commonlisp
wilfred has joined #commonlisp
<loke[m]>
lisp123: Do you know what when you specify :READER (or :ACCESSOR or :WRITER) all that really does is to create a DEFMETHOD on that generic function?
<loke[m]>
There is really nothing magic about it.
<loke[m]>
The magic in accessors are actually in SLOT-VALUE (and the more specific SLOT-VALUE-USING-CLASS)
spiaggia has joined #commonlisp
[deleted] has quit [Read error: Connection reset by peer]
livoreno has joined #commonlisp
lad has quit [Remote host closed the connection]
lad has joined #commonlisp
derelict has quit [Ping timeout: 250 seconds]
shka has joined #commonlisp
lisp123_ has quit [Ping timeout: 265 seconds]
davep has joined #commonlisp
CrashTestDummy2 has joined #commonlisp
CrashTestDummy3 has quit [Ping timeout: 258 seconds]
<coat>
are lists passed by value into functions? when I push new elements to a list within a function, the caller of the function cannot see those changes.
<spiaggia>
Common Lisp uses call-by-value, but the values are semantically speaking references to objects in memory.
<moon-child>
all objects are references, but they are passed by value; 'push' reassigns a local value
<spiaggia>
coat: So you now need to understand how Common Lisp lists work.
<spiaggia>
coat: A list is either NIL (denoting the empty list) or a CONS cell. Can I assume you knew that?
<spiaggia>
coat: I.e., a Common Lisp list is not an abstract data type, or not so much. It's implementation is known.
<spiaggia>
So when you pass a list to a function, you pass a reference to the first CONS cell. The caller and the callee share this reference.
<coat>
"push reassigns a local value" - did not know about this. But I see it is mentioned in CLHS in the notes. "The effect of (push item place) is equivalent to (setf place (cons item place))" I had overlooked this note earlier
<coat>
spiaggia: yes, I knew NIL and CONS cell
<spiaggia>
coat: PUSH changes a "place". When the place is a variable, it changes the value of that variable.
<spiaggia>
So it changes the value of the lexical variable inside your function.
<spiaggia>
And that has no effect on the caller.
<spiaggia>
coat: Think of (pushd <object> <variable>) as roughly equivalent to (setf <variable> (cons <object> <variable>))
<spiaggia>
coat: Does that equivalence make it easier to understand what you observe?
<moon-child>
nit: 'has no effect on the caller' unless it closed over the caller's environment
<coat>
spiaggia: Yes, CLHS notes for push has this: " The effect of (push item place) is equivalent to
<coat>
(setf place (cons item place))
<coat>
except that the subforms of place are evaluated only once, and item is evaluated before place. "
<spiaggia>
coat: This is the same reason why your NCONC didn't work when the first list is empty.
<spiaggia>
coat: NCONC is a function, so when you pass it NIL as the first argument, there is no last CONS cell to update, so it just returns the second argument and does not update anything.
<coat>
okay
<coat>
in an earlier discussion, push was discouraged because it mutates the list but it does not, does it? For example: (defparameter *a* (list 10 20 30)) (defparameter *b* *a*) (push 40 *a*) Here *b* is unaffected
<spiaggia>
So to use terms from general programming, the LIST type in Common Lisp is not an abstract data type, and PUSH is therefore not an operation on instances of an abstract data type.
<shka>
coat: push does not mutate cons cell, it mutates lexical binding
<shka>
well, binding
<spiaggia>
shka: Careful what you say.
<shka>
not always lexical
<shka>
spiaggia: even if i am saying the truth?
<shka>
push does not alter cons cells
<spiaggia>
coat: PUSH will not mutate the list if the place is a variable. But if the place is (cdr (last ...)) then it will.
<spiaggia>
shka: It does if the place is (cdr ...).
<coat>
spiaggia: thanks
<pjb>
push mutates the place.
<pjb>
So if the place is (car …) it mutates the car.
<pjb>
if the place is var (and var is not a symbol-macro to something else), the it mutates the variable var.
<spiaggia>
shka: Now do you see why you had to be more careful?
<coat>
pjb: thanks
<shka>
yes dady
<shka>
*daddy
spiaggia has left #commonlisp [ERC Version 5.3 (IRC client for Emacs)]
<coat>
why does PUSH behave differently when called outside a macro and when called inside a macro?
Cymew has joined #commonlisp
<White_Flame>
you're pushing into a symbol, not into a variable place
<White_Flame>
remember, macros deal with source code, not runtime values
lisp123_ has quit [Ping timeout: 272 seconds]
<White_Flame>
I don't know why it's not erroring out completely, which implementation are you using?
IAmRasputin has joined #commonlisp
<White_Flame>
ah, I get the same on sbcl now
<coat>
White_Flame: SBCL. It is not erroring out I guess because I have not called the macro yet. The macro is of course incorrect. I am just trying to understand the expansion of my incorrect macro.
<coat>
What does it mean to push to a symbol? This is not valid code, is it? (push (cons "a" "apple") '*a*) ; This errors out
<White_Flame>
right, that's what I assumed the macro was doing
<White_Flame>
because you're calling PUSH on the literal source code passed in, instead of generating the runtime code to perform teh push
<White_Flame>
I bet it has to do with either compiler macros or general compiletime optimization of PUSH that shuffles things around in this way
<White_Flame>
at least, that's a random guess as I don't see how it doesn't error
<coat>
how does (push-key-value "a" "apple" *a*) end up expanding to (("a" . "apple") . *A* I want to understand in a step by step manner.
<White_Flame>
(I tend to assume non-newbie in #commonlisp, and newbie in #clschool I guess :-P)
<White_Flame>
backlog differs now that I read it
<beach>
Yeah.
<coat>
thanks White_Flame C-c Enter helped to understand it
<White_Flame>
but still, stepping back and considering that you're not actually doing any macro code generation, the body is just like a function and is PUSHing to its own variable A
<White_Flame>
even without the macroexpansion
<White_Flame>
in the (push (cons k v) a)
<coat>
White_Flame: yes, I understand that. My macro is wrong. But I wanted to understand its wrongness precisely before moving on
<White_Flame>
yep, and then PUSH's return value happens to be returned as the macroexpansion
<White_Flame>
which as (("a" ....)..) isnt' a valid code form
cjb has quit []
<coat>
noticed a strange thing in my Emacs. Both C-c ENTER and C-c C-m does slime-expand-1. But when I type C-h w slime-expand-1 RET it says slime-expand-1 is on C-c RET. Why does it not know that it is also on C-c C-m?
<White_Flame>
pop quiz: What's C-m?
<coat>
ohhhh! understood it now! C-m *is* RET :)
<coat>
thanks White_Flame
<White_Flame>
yep
<White_Flame>
(of course, on second thought I guess ascii control codes and such might not be as much common knowledge anymore)
<coat>
now I wonder why that doc does not simply mention C-c RET which is simpler
<White_Flame>
C-c C-m might be a bit easier to type, to emacs hands
<White_Flame>
hold down ctrl for the whole sequence
<White_Flame>
I just happened to learn it as C-c RET, from whatever source I originally saw it
<White_Flame>
and it was probably chosen specifically as 'm' for 'macro', not ret
<susam>
coat: Another trivia: 'M' = 77 (dec) = 4d (hex) = 100 1101 (bin). The ctrl + char combination zeroes bits 6 and 7 (first two in this example) of char. We get 000 1101 (bin) = 0d (hex) = 13 (dec) = RET.
dsk has quit [Ping timeout: 250 seconds]
<moon-child>
I always thought of ctrl as masking the low 5 bits. But it occurs to me that with an 8-bit meta it couldn't do that; it would have to, as you say, zero just bits 6 and 7
<coat>
susam: wow! never knew ctrl is meant for zeroing bits of character code. I always thought ^A = 0, ^B = 1, etc.
<White_Flame>
^A=1, ^B=2... actually
<White_Flame>
^@ is for 0
<moon-child>
coat: another fun thing: toggle bit 5, and you toggle the case of a number
<moon-child>
a xor (1 << 5) is the same as A
<moon-child>
err, bit 6
<moon-child>
1 << 5
<White_Flame>
case of a number?
<susam>
coat: Well, yes. Different ways to look at the same thing. '@' = 0x40, 'A' = 0x41, etc. So zeroing bits 6 and 7 is equivalent to selecting the lowest 5 bits with a mask which is equivalent to ^@ = 0, ^A = 1, etc.
<White_Flame>
oh, I thought you were trying to map #\1 to #\! or something
<moon-child>
White_Flame: err, duh, yeah. Case of a letter
<White_Flame>
in any case, an ascii table clearly shows all the alignments between case, ctrl codes, etc
<coat>
these control code facts make me happy. this channel is fun! :)
<moon-child>
(though it maintains accordance between [] and {} as well)
treflip has joined #commonlisp
Guest7506 has quit []
lad has quit [Ping timeout: 268 seconds]
notzmv has quit [Read error: Connection reset by peer]
livoreno has quit [Read error: Connection reset by peer]
livoreno has joined #commonlisp
hendursaga has joined #commonlisp
hendursa1 has quit [Ping timeout: 244 seconds]
<lisp123>
loke[m]: thanks, yes I had a suspicion it was like that
kevingal has joined #commonlisp
wilfred has quit [Quit: Connection closed for inactivity]
<beach>
The first one is better. In fact the second one contains a bug.
<beach>
The place for alist is evaluated twice. If you are going to write macros, then you need to read something like On Lisp that mentions this and other potential problems.
<beach>
coat: Would you like an example that demonstrates this bug?
<lisp123>
Qn from me: How to apply OR to a list, e.g. (or (list nil nil t)) [I want to apply OR to a list of predicate results]
<lisp123>
I can figure out my own custom function / way, but want to know if there is an out-of-the-box solution
<lisp123>
thanks pve & moon-child, worked perfectly
<pjb>
lisp123: (reduce (lambda (a b) (or a b)) (list nil nil t)) #| --> t |#
selwyn has quit [Ping timeout: 268 seconds]
<pjb>
lisp123: (defun
<pjb>
lisp123: (defun ∧ (a b) (and a b)) (defun ∨ (a b) (or a b)) (reduce '∨ list)
igemnace has joined #commonlisp
<beach>
coat: if you use the second definition, try this: (defparameter *v* (vector (list '(0 . a)) (list '(1 . b)))) then (defparameter *index* -1) then (add-key-value2 2 'c (aref *v* (incf *index*)))
<pjb>
lisp123: also: or = (find nil list :test-not 'eql) and = (not (find nil list))
selwyn has joined #commonlisp
<beach>
coat: Then inspect *v* and see what you think.
<coat>
beach: trying your example now
attila_lendvai has joined #commonlisp
<beach>
coat: If you macroexpand (add-key-value2 2 'c (aref *v* (incf *index*))), you can see that (aref *v* (incf *index*)) appears twice. And that means that (incf *index*) is going to be evaluated twice, which is wrong. Page 133 of On Lisp explains why.
<coat>
beach: ah! understood it now. this is like C macros. if an expression in macro is evaluated twice due to macro expansion, it may have surprising side effects.
<beach>
Exactly.
<beach>
Except that Common Lisp has way to avoid this problem.
<coat>
beach: what is that way?
<beach>
On Lisp will give you a few techniques.
<coat>
okay, next book in my wishlist then. right now working through PCL
peterhil has joined #commonlisp
<beach>
Sure, just be careful with macros. They aren't needed as often as some people think.
<coat>
thanks. so far if something can be done with defun, I am using defun. this is the only place where I used defmacro because I did not know how to do it with defun.
<beach>
Right.
Lycurgus has quit [Quit: Exeunt]
<phadthai>
PCL chapter 8's "Plugging the Leaks" also covers it a little
<beach>
Oh, right. Thanks.
lisp123_ has joined #commonlisp
<phadthai>
coat: particularly the example with gensym
<phadthai>
but I agree with beach that On Lisp covers macros much deeper
lotuseater has joined #commonlisp
stanislav has joined #commonlisp
lisp123_ has quit [Ping timeout: 265 seconds]
<coat>
phadthai: thanks
stanislav has left #commonlisp [#commonlisp]
lisp123 has left #commonlisp [ERC (IRC client for Emacs 26.3)]
selwyn has quit [Read error: Connection reset by peer]
notzmv has joined #commonlisp
selwyn has joined #commonlisp
selwyn has quit [Read error: Connection reset by peer]
selwyn has joined #commonlisp
tyson2 has joined #commonlisp
frgo has quit [Remote host closed the connection]
frgo has joined #commonlisp
X-Scale has quit [Ping timeout: 268 seconds]
CrashTestDummy3 has joined #commonlisp
CrashTestDummy2 has quit [Ping timeout: 265 seconds]
Nilby has joined #commonlisp
kakuhen has quit [Quit: Leaving...]
Danishman has joined #commonlisp
IAmRasputin has joined #commonlisp
IAmRasputin has quit [Ping timeout: 252 seconds]
amk has quit [Remote host closed the connection]
random-nick has joined #commonlisp
frgo has quit [Ping timeout: 272 seconds]
<flip214>
apart from *GENSYM-COUNTER*, is there a difference between MAKE-SYMBOl and GENSYM?
waleee has joined #commonlisp
<Nilby>
flip214: I think gensym is frequently implemented with something equivalent to (make-symbol (concatenate 'string (or prefix "G") (incf *counter*))), so not much difference.
<flip214>
Nilby: ack, thanks
selwyn has quit [Read error: Connection reset by peer]
selwyn has joined #commonlisp
IPmonger has joined #commonlisp
selwyn_ has joined #commonlisp
IPmonger has quit [Remote host closed the connection]
selwyn has quit [Ping timeout: 268 seconds]
Bike has joined #commonlisp
IPmonger has joined #commonlisp
Tomte has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
tyson2 has joined #commonlisp
cage has joined #commonlisp
yitzi has joined #commonlisp
selwyn_ has quit [Read error: Connection reset by peer]
Lycurgus has joined #commonlisp
IAmRasputin has joined #commonlisp
amb007 has quit [Ping timeout: 268 seconds]
amb007 has joined #commonlisp
IAmRasputin has quit [Ping timeout: 272 seconds]
Inline has joined #commonlisp
amb007 has quit [Ping timeout: 272 seconds]
peterhil has quit [Ping timeout: 265 seconds]
yitzi has quit [Remote host closed the connection]
lisp123_ has joined #commonlisp
pjb has quit [Ping timeout: 268 seconds]
lisp123_ has quit [Ping timeout: 272 seconds]
contrapunctus has joined #commonlisp
<contrapunctus>
How much work might it be to implement something like this as a Common Lisp extension? https://ytakano.github.io/blisp/
treflip has quit [Remote host closed the connection]
attila_lendvai has joined #commonlisp
sander has joined #commonlisp
Cymew has quit [Ping timeout: 272 seconds]
Mandus has quit [Ping timeout: 244 seconds]
Mandus has joined #commonlisp
<shka>
contrapunctus: link to the talk or that didn't happen
Josh_2 has joined #commonlisp
<Josh_2>
Hello
<Josh_2>
Does bknr datastore handle redefinitions of classes in different images, say I have one main image that is used for my current version of my program, but then I have my testing version which adds a new slot to a persistent class, if I just dropped my new image in place of the old will bknr have a fit?
<Josh_2>
if not well bugger
<Bike>
so you want like a migration in rails? i'd like to see a lisp version of that if it exists...
<Josh_2>
uh
<Bike>
don't see anything about it from flipping through the bknr manual, though
<Josh_2>
maybe all I have to do is call the database connection function before the class definitions happen when creating my image
<beach>
Josh_2: I invented Clobber because I suspected that existing "object stores" could not handle redefinitions.
<beach>
I just store "transactions" that are based on initargs and accessors. It doesn't have a clue about representation.
<Bike>
in rails, when you change your database ontology you (or it, automatically) defines a "migration", which describes how to change a database with the old ontology into one in the new and vice versa
char has quit [Read error: Connection reset by peer]
<Bike>
kind of like update-object-for-redefined-class, i think
<Josh_2>
bknr doesn't mind updating the slots in a class
<Josh_2>
I have redefined my classes many times
char has joined #commonlisp
<Josh_2>
but in those instances I have already called the initiation function and then I compile my new definition
<jackdaniel>
I suppose that classes must have stamps in that case (to recognize different generations)
<Josh_2>
maybe I can just have my project running on my laptop and I can always be connected with emacs xD
<Josh_2>
if it breaks it breaks
peterhil has joined #commonlisp
<Josh_2>
it would be more ideal to be connected to my project when its running on a vps though, but for some reason sly doesn't want to connect, despite port forwarding
<shka>
contrapunctus: i enjoy that communist vintage room :D
<contrapunctus>
shka: communist vintage room? O.o
<shka>
sure, early 80s late 70s democratic republic :P
<shka>
anyway, see ya
Tomte has quit [Quit: Leaving]
azimut_ has joined #commonlisp
azimut has quit [Ping timeout: 244 seconds]
Mandus has quit [Ping timeout: 252 seconds]
<Josh_2>
:( slynk throwing errors when trying to connect to a remote machine :(
Mandus has joined #commonlisp
<phoe>
Josh_2: on form?
varjag has joined #commonlisp
Lycurgus has quit [Quit: Exeunt]
<Josh_2>
yes on form
<contrapunctus>
phoe: wasn't stylewarning looking for help with coalton? I figured from that, that implementing something like that in CL might be a non-trivial undertaking 🤔️
<Josh_2>
its a compliment dw
<Josh_2>
I have sbcl 2.1.2 on my machine, and 2.1.3 on my remote machine, is this going to break slynk?
<phoe>
Josh_2: thanks, I'm not used to that English term
<phoe>
Shinmera: much better quality; if you have a while, could you record a version with e.g. 1.0s instead of 0.2s? I don't think the 0.2s effect is very easy to notice in the video
jeosol has quit [Quit: Connection closed]
<Shinmera>
Sorry, I'm done touching code for today.
<Josh_2>
Do I have to have the same username on my remote system as on my home system to connect to it with sly?
<Josh_2>
I have upgraded both local and remote to 2.1.5, I have grabbed the latest version of sly on both systems, I have purged all leftover binaries to make sure that only 2.1.5 binaries exist on both systems, I have removed all the .cache entries related to non current versions of sbcl..
<Josh_2>
and yet I keep getting this problem
<jackdaniel>
Josh_2: slime has i.e ~/.slime/fasl/ directory
<jackdaniel>
perhaps slynk inherited that behavior
<Josh_2>
can I purge that?
<White_Flame>
I believe it's assumed that slime and swank see the same filesystem, when it comes to loading & fasls. Filenames are passed around
<jackdaniel>
if you don't care about the environment then sure
<jackdaniel>
s/*/sure/
<Shinmera>
White_Flame: there is some translation thingy, but I never looked deep enough into it to make it work.
<jackdaniel>
Shinmera: looks great
<Shinmera>
Thanks!
<Nilby>
Shinmera: That looks so good, maybe I should forget my UI and work on yours.
<Shinmera>
I'd definitely appreciate more hands on deck :)
yitzi has joined #commonlisp
<Josh_2>
jackdaniel: what do you mean?
<jackdaniel>
that was a bad joke (bad because not very intelligible), so I've corrected myself
<Josh_2>
oh right
<jackdaniel>
you may safely remove fasl files if you are restarting the image
<jackdaniel>
that will lead to their recompilation
<jackdaniel>
White_Flame: afaik it is possible to set slime translations to your local sources when you work remotely
<jackdaniel>
I think that it is described in the manual
<Josh_2>
yes I used the use-value restart to enter the same path but with manage instead of josh and it made it a lot further this time
<Josh_2>
if I just change my remote machines user to josh it'll probably work
killsushi has joined #commonlisp
<Josh_2>
I like that Steel Bank CL is still referred to as South Bank CL in the Sly manual
pjb has joined #commonlisp
<pjb>
flip214: note: if you don't mind the symbol name, (loop repeat 3 collect (make-symbol "")) #| --> (#:|| #:|| #:||) |#
<pjb>
flip214: gensym only helps the human distinguish them: (loop repeat 3 collect (gensym)) #| --> (#:g1678 #:g1679 #:g1680) |#
<pjb>
flip214: but indeed, when not debugging, we could just use (make-symbol "") it would be less (memory) costly.
<Josh_2>
Rip. Tried a new user, not getting the missing files anymore but now it just wont compile
<Josh_2>
maybe I should just try swank
<Josh_2>
I finally got it to work!~
<shka>
mmmm, i like the declarative style of the alloy already
<shka>
Shinmera: does alloy work on linux and windows?
<Shinmera>
who do you think I am :v
<phoe>
GHOST-BUSTERS
* phoe
ducks
<shka>
could be a strict OSX user to be fair :P
<Shinmera>
I hate macOS with every fibre of my being
lisp123_ has joined #commonlisp
<Shinmera>
but it also works on there.
<shka>
good, good
<Shinmera>
or I should say, it works on macOS for now. Who knows, apple might just decide to fuck me up again tomorrow.
<shka>
i personally enjoy the clim models/presentations stuff, but i am not huge fan of how the actual code for GUI looks like
<shka>
i should give alloy a chance
frgo has joined #commonlisp
frgo has quit [Remote host closed the connection]
lisp123_ has quit [Ping timeout: 252 seconds]
frgo has joined #commonlisp
tyson2 has quit [Read error: Connection reset by peer]
tyson2 has joined #commonlisp
frgo has quit [Client Quit]
green__ has joined #commonlisp
CrashTestDummy2 has joined #commonlisp
atgreen has quit [Ping timeout: 272 seconds]
CrashTestDummy3 has quit [Ping timeout: 272 seconds]
<Josh_2>
Is a sigint the same signal sent to sbcl if I was to use something like systemd to stop my lisp service?
<Josh_2>
I would like to gracefully shutdown my lisp images
<Bike>
SIGINT is for an asynchronous interrupt. SIGTERM means "terminate"
<Bike>
ctrl-c is generally a sigint
<Josh_2>
Alright thanks :)
<jasom>
90 seconds is nice unless you are trying to reboot your machine and you have 2 or 3 services in a row take that long
<Bike>
sigkill you don't need to worry about since it means your process will die whether you want it to or not
<Josh_2>
yeh
killsushi has quit [Read error: Connection reset by peer]
<Josh_2>
sbcl has sb-sys:interactive-interrupt for c-c's
killsushi has joined #commonlisp
killsushi has joined #commonlisp
killsushi has quit [Changing host]
amb007 has quit [Ping timeout: 252 seconds]
amb007 has joined #commonlisp
aeth_ has joined #commonlisp
char has quit [Ping timeout: 272 seconds]
derelict has quit [Ping timeout: 268 seconds]
aeth has quit [Killed (NickServ (GHOST command used by aeth_))]
aeth_ is now known as aeth
<jasom>
I notice that trivial-signal does not claim to support SIGTERM on sbcl, listing only these: 4-8, 10-11, 16, 18, 21-22, 30-31, 34-64 (SIGTERM is 15).
<jcowan>
That's weird.
<phoe>
jasom: I wonder why, SBCL seems to handle it normally
CrashTestDummy2 has quit [Ping timeout: 268 seconds]
char has quit [Ping timeout: 258 seconds]
[deleted] has quit [Read error: Connection reset by peer]
livoreno has joined #commonlisp
slant has quit [Remote host closed the connection]
slant has joined #commonlisp
cage has quit [Quit: rcirc on GNU Emacs 27.1]
slant has quit [Remote host closed the connection]
slant has joined #commonlisp
peterhil has joined #commonlisp
tyson2 has joined #commonlisp
shka has quit [Ping timeout: 272 seconds]
slant has quit [Remote host closed the connection]
slant has joined #commonlisp
char has joined #commonlisp
makomo has quit [Quit: WeeChat 3.0.1]
scymtym has quit [Ping timeout: 252 seconds]
<Josh_2>
How do I stop systemd restarting my program? Normally I deploy a webapp I would bring the hunchentoot thread to the foreground with join-thread, I tried dropping into the sbcl top level but its still restarting