jackdaniel changed the topic of #lisp to: Common Lisp, the #1=(programmable . #1#) programming language | <https://irclog.tymoon.eu/freenode/%23lisp> <https://irclog.whitequark.org/lisp> <http://ccl.clozure.com/irc-logs/lisp/> | offtopic --> #lispcafe
kam1 has joined #lisp
loskutak has quit [Ping timeout: 240 seconds]
luni has quit [Quit: Connection closed]
long4mud has joined #lisp
iamFIREcracker has joined #lisp
iamFIREc1 has quit [Ping timeout: 272 seconds]
galex-713 has joined #lisp
contrapunctus has left #lisp ["Disconnected: closed"]
surabax has quit [Read error: Connection reset by peer]
contrapunctus has joined #lisp
galex-713 has quit [Ping timeout: 264 seconds]
karlosz has quit [Ping timeout: 268 seconds]
sjl has quit [Ping timeout: 240 seconds]
meursault has quit [Quit: Leaving]
meursault has joined #lisp
villanella1 has quit [Ping timeout: 264 seconds]
galex-713 has joined #lisp
X-Scale` has joined #lisp
X-Scale has quit [Ping timeout: 240 seconds]
rpg has quit [Quit: Textual IRC Client: www.textualapp.com]
judson_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
theothor` has joined #lisp
X-Scale` is now known as X-Scale
judson_ has joined #lisp
hjudt has quit [Ping timeout: 264 seconds]
theothor` has quit [Ping timeout: 264 seconds]
vutral_ has joined #lisp
iamFIREc1 has joined #lisp
galex-713 has quit [Ping timeout: 272 seconds]
galex-713 has joined #lisp
iamFIREcracker has quit [Ping timeout: 265 seconds]
nullkl has joined #lisp
nullkl has quit [Ping timeout: 264 seconds]
meursault has quit [Quit: Leaving]
meursault has joined #lisp
aindilis` has quit [Remote host closed the connection]
amb007 has quit [Read error: Connection reset by peer]
aindilis has joined #lisp
amb007 has joined #lisp
galex-713 has quit [Ping timeout: 272 seconds]
amerigo has quit [Quit: Connection closed for inactivity]
loli has quit [Quit: WeeChat 3.0]
loli has joined #lisp
galex-713 has joined #lisp
nullkl has joined #lisp
akoana has left #lisp ["Leaving"]
judson_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
galex-713 has quit [Ping timeout: 272 seconds]
nullkl has quit [Ping timeout: 240 seconds]
meursault has quit [Quit: Leaving]
nullkl has joined #lisp
aeth has quit [Ping timeout: 264 seconds]
aeth has joined #lisp
cognemo has quit [Quit: cognemo]
judson_ has joined #lisp
cognemo has joined #lisp
semz has quit [Ping timeout: 260 seconds]
zacts has quit [Quit: leaving]
Lord_of_Life_ has joined #lisp
semz has joined #lisp
Lord_of_Life has quit [Ping timeout: 240 seconds]
Lord_of_Life_ is now known as Lord_of_Life
sabrac has quit [Quit: Konversation terminated!]
ikki has quit [Ping timeout: 246 seconds]
vegansbane6963 has quit [Ping timeout: 240 seconds]
prxq_ has joined #lisp
prxq has quit [Ping timeout: 265 seconds]
ilshad has quit [Remote host closed the connection]
ilshad has joined #lisp
Sheilong has quit [Quit: Connection closed for inactivity]
judson_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
vegansbane6963 has joined #lisp
contrapunctus has left #lisp ["Disconnected: closed"]
contrapunctus has joined #lisp
vutral_ has quit [Quit: Connection closed for inactivity]
ilshad has quit [Ping timeout: 272 seconds]
orivej has quit [Ping timeout: 256 seconds]
toorevitimirp has joined #lisp
attila_lendvai has quit [Ping timeout: 272 seconds]
Alfr_ has joined #lisp
<beach> Good morning everyone!
Alfr has quit [Ping timeout: 260 seconds]
<iskander> hi
toorevitimirp has quit [Remote host closed the connection]
toorevitimirp has joined #lisp
ilshad has joined #lisp
Volt_ has joined #lisp
_whitelogger has joined #lisp
aindilis has quit [Remote host closed the connection]
aindilis has joined #lisp
ikrabbe has joined #lisp
ikrabbe|2 has quit [Ping timeout: 264 seconds]
peasynt has joined #lisp
ex_nihilo has joined #lisp
pankajsg has joined #lisp
<Josh_2> Morning beach
ilshad has quit [Ping timeout: 264 seconds]
skapata has quit [Remote host closed the connection]
nullkl has quit [Ping timeout: 240 seconds]
ebrasca has quit [Remote host closed the connection]
sauvin has joined #lisp
Inline has quit [Ping timeout: 272 seconds]
Bourne has joined #lisp
brandfla` has quit [Remote host closed the connection]
judson_ has joined #lisp
Volt_ has quit [Quit: ]
judson_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nullkl has joined #lisp
nullkl has quit [Ping timeout: 240 seconds]
Bike has quit [Quit: Lost terminal]
aeth has quit [Ping timeout: 240 seconds]
aeth has joined #lisp
thmprover has quit [Quit: [Exit, pursued by bear]]
nullkl has joined #lisp
nullkl has quit [Ping timeout: 265 seconds]
imode has joined #lisp
judson_ has joined #lisp
judson_ has quit [Client Quit]
theothor` has joined #lisp
narimiran has joined #lisp
pve has joined #lisp
azrazalea2 has joined #lisp
<azrazalea2> I've noticed in my sbcl 2.10 from the debian package the *evalhook* global doesn't exist. Is this intended behavior? From what I could tell, *evalhook*/*applyhook* was part of standard but I haven't used it before so might be wrong?
<azrazalea2> 2.1.0 that is
<beach> Those are not part of the standard.
<azrazalea2> That would explain it then! Alright.
<azrazalea2> So I was looking into it because I'm wanting to make a simple bot calculator by accepting lisp forms as a string from a user and then evaluating and returning them. I wanted those hooks so I could validate what types of data they had sent using *evalhook* to check overall types (numbers and symbols only) and *applyhook* to validate the functions
<azrazalea2> are in a whitelist. Is the best way to do this going to be to use `read` and then walk the forms myself?
<azrazalea2> (well `read-from-string` but yeah)
<beach> That's one possibility. There are several other options. You could use Eclector to read the form. Then you can control how symbols are created and you can have those symbols interned in the package of your choice.
ilshad has joined #lisp
<beach> Or, you can do what I do for SICL bootstrapping. I evaluate the forms relative to a first-class global environments of my choice.
peasynt has quit [Quit: Connection closed for inactivity]
karlosz has joined #lisp
kam1 has quit [Read error: Connection reset by peer]
kam1 has joined #lisp
<azrazalea2> Well, I might eventually want to get more fancy and allow setting and expansion of local variables but to start with my needs were pretty simple. Just cons based lists with the basic numeric operations (including sqrt, expt, etc etc) as the first element and either another valid list or a numeric value as arguments.
<azrazalea2> Anything else rejected
<azrazalea2> I can write it myself relatively easily, but I was looking to see if I didn't have ot
kam1 has quit [Ping timeout: 265 seconds]
<fe[nl]ix> jmercouris: ping
judson_ has joined #lisp
aeth has quit [Ping timeout: 272 seconds]
aeth has joined #lisp
ilshad has quit [Ping timeout: 240 seconds]
azrazalea2 has quit [Quit: Connection closed]
theothor` has quit [Remote host closed the connection]
theothornhill has joined #lisp
kam1 has joined #lisp
Nilby has joined #lisp
h4ck3r9696 has joined #lisp
ilshad has joined #lisp
luni has joined #lisp
shka_ has joined #lisp
theothornhill has quit [Remote host closed the connection]
theothornhill has joined #lisp
judson_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
prxq_ has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
prxq has joined #lisp
theothornhill has quit [Remote host closed the connection]
nullkl has joined #lisp
nullkl has quit [Ping timeout: 256 seconds]
luni has quit [Quit: Connection closed]
anticrisis has quit [Read error: Connection reset by peer]
cantstanya has quit [Remote host closed the connection]
cantstanya has joined #lisp
ilshad has quit [Ping timeout: 240 seconds]
aindilis has quit [Read error: Connection reset by peer]
<loke[m]> Tes
<loke`> Test
loke` is now known as loke
lottaquestions_ has joined #lisp
loskutak has joined #lisp
lottaquestions has quit [Ping timeout: 264 seconds]
karlosz has quit [Quit: karlosz]
orivej has joined #lisp
imode has quit [Quit: Sleepy time.]
citizenajb has quit [Ping timeout: 256 seconds]
kam1 has quit [Read error: Connection reset by peer]
cage_ has joined #lisp
aartaka has joined #lisp
salazar has joined #lisp
caesarsalad has quit [Ping timeout: 264 seconds]
christopheroei[m has quit [Quit: Idle for 30+ days]
hendursa1 has joined #lisp
jasom has quit [Ping timeout: 246 seconds]
a138 has joined #lisp
jasom has joined #lisp
hendursa1 has quit [Remote host closed the connection]
hendursaga has quit [Ping timeout: 268 seconds]
hendursa1 has joined #lisp
caesarsalad has joined #lisp
salazar has quit [Ping timeout: 240 seconds]
ilshad has joined #lisp
kam1 has joined #lisp
skapata has joined #lisp
scymtym_ has joined #lisp
kam1 has quit [Read error: Connection reset by peer]
kam1 has joined #lisp
aartaka_d has joined #lisp
scymtym has quit [Ping timeout: 272 seconds]
aartaka has quit [Ping timeout: 264 seconds]
ikrabbe|2 has joined #lisp
ikrabbe has quit [Ping timeout: 240 seconds]
kam1 has quit [Read error: Connection reset by peer]
kam1 has joined #lisp
aartaka_d has quit [Ping timeout: 264 seconds]
aartaka has joined #lisp
kam1 has quit [Ping timeout: 240 seconds]
surabax has joined #lisp
zacts has joined #lisp
shka_ has quit [Quit: Konversation terminated!]
nullkl has joined #lisp
luna_is_here has quit [Ping timeout: 272 seconds]
nullkl has quit [Ping timeout: 272 seconds]
kam1 has joined #lisp
luna_is_here has joined #lisp
aartaka_d has joined #lisp
<jmercouris> fe[nl]ix: Yes, I would be very interested in that!
<jmercouris> Are my messages not going through?
aartaka has quit [Ping timeout: 264 seconds]
luna_is_here has quit [Ping timeout: 272 seconds]
datajerk has quit [Ping timeout: 272 seconds]
datajerk has joined #lisp
Bourne has quit [Ping timeout: 240 seconds]
villanella has joined #lisp
zacts has quit [Quit: leaving]
Inline has joined #lisp
<phoe> I see your messages
<phoe> two of them
aartaka has joined #lisp
villanella has quit [Read error: Connection reset by peer]
scymtym_ has quit [Remote host closed the connection]
meursault has joined #lisp
scymtym has joined #lisp
kam1 has quit [Ping timeout: 264 seconds]
aartaka_d has quit [Ping timeout: 272 seconds]
vegansbane6963 has quit [Quit: The Lounge - https://thelounge.chat]
aeth has quit [Ping timeout: 240 seconds]
aeth has joined #lisp
aeth has quit [Ping timeout: 272 seconds]
aeth has joined #lisp
vegansbane6963 has joined #lisp
random-nick has joined #lisp
frgo has quit [Remote host closed the connection]
frgo has joined #lisp
rogersm has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
attila_lendvai has joined #lisp
add^_ has left #lisp [#lisp]
zdm has quit [Quit: ZNC 1.8.2+deb1~bpo10+1 - https://znc.in]
nullkl has joined #lisp
zdm has joined #lisp
aeth has quit [Ping timeout: 240 seconds]
aeth has joined #lisp
nullkl has quit [Ping timeout: 246 seconds]
rogersm has quit [Quit: Leaving...]
ikrabbe has joined #lisp
Nilby has quit [Ping timeout: 260 seconds]
ikrabbe|2 has quit [Ping timeout: 240 seconds]
Bourne has joined #lisp
_Posterdati_ has joined #lisp
Posterdati has quit [Ping timeout: 246 seconds]
muyinliu has joined #lisp
_Posterdati_ is now known as Posterdati
muyinliu_ has joined #lisp
muyinliu_ has quit [Client Quit]
muyinliu has quit [Quit: Textual IRC Client: www.textualapp.com]
Bourne has quit [Ping timeout: 240 seconds]
kapil_ has quit [Ping timeout: 272 seconds]
kapil_ has joined #lisp
kopiyka has quit [Ping timeout: 264 seconds]
puchacz has joined #lisp
puchacz has quit [Client Quit]
varjag has joined #lisp
heisig has joined #lisp
Sheilong has joined #lisp
h4ck3r9696 has quit [Quit: Leaving.]
h4ck3r9696 has joined #lisp
VincentVega has joined #lisp
McParen has joined #lisp
<VincentVega> Hi! With parachute, how do I run all known tests? `(mapcar #'parachute:test (parachute:package-tests *package*))' includes repeating tests, since some are suites and have children. Hmmm.....
andreyorst has quit [Ping timeout: 240 seconds]
VincentVega17 has joined #lisp
mrchampion has quit [Ping timeout: 265 seconds]
VincentVega has quit [Ping timeout: 240 seconds]
mrchampion has joined #lisp
galex-713 has joined #lisp
docl_ is now known as docl
ukari has quit [Remote host closed the connection]
ukari has joined #lisp
luna_is_here has joined #lisp
andreyorst has joined #lisp
nullkl has joined #lisp
kopiyka has joined #lisp
nullkl has quit [Ping timeout: 256 seconds]
luni has joined #lisp
luna_is_here has quit [Quit: No Ping reply in 180 seconds.]
galex-713 has quit [Ping timeout: 272 seconds]
galex-713 has joined #lisp
luna_is_here has joined #lisp
<VincentVega17> nvm, problem solved, just removed those that have a parent
<Josh_2> Afternoon
pfdietz has quit [Ping timeout: 240 seconds]
<beach> Hello Josh_2.
galex-713 has quit [Ping timeout: 272 seconds]
kam1 has joined #lisp
luna_is_here has quit [Remote host closed the connection]
galex-713 has joined #lisp
hendursa1 has quit [Quit: hendursa1]
hendursaga has joined #lisp
<Josh_2> how is your work going beach?
<beach> It is going great, thank you. I recently finished adapting the high-level intermediate code to the required structure according to may draft paper on call-site optimization, and I am now thinking about register allocation.
<beach> Josh_2: What about yours?
luna_is_here has joined #lisp
kam1 has quit [Ping timeout: 256 seconds]
alanz_ is now known as alanz
McParen has left #lisp [#lisp]
andreyorst[m] has joined #lisp
luna_is_here has quit [Quit: luna_is_here]
<Josh_2> Good news all around then
<Josh_2> My 'work' is going quite well
<beach> Great!
luna_is_here has joined #lisp
<Josh_2> Does someone have an example of how I should structure my tests so they are seperate but I can use asdf to invoke them?
galex-713_ has joined #lisp
galex-713 has quit [Ping timeout: 272 seconds]
<Josh_2> Okay I found one!
<ex_nihilo> Yesterday I posted a question here about what seems to me to be a peculiar interaction between the Slime repl and user i/o with code run from a file. No responses yet; any takers? The question was posted over several messages, but I can repost if someone wants me to.
galex-713_ has quit [Ping timeout: 240 seconds]
aeth has quit [Ping timeout: 264 seconds]
theBlackDragon has quit [Ping timeout: 240 seconds]
luni has quit [Quit: Connection closed]
luna_is_here has quit [Quit: luna_is_here]
aeth has joined #lisp
theBlackDragon has joined #lisp
luna_is_here has joined #lisp
Bourne has joined #lisp
toorevitimirp has quit [Remote host closed the connection]
galex-713 has joined #lisp
<Josh_2> can I write my own metaclass that would mean all associated methods would only be evaluated conditionally, basically I want to check if I have freed some memory with an associated object before any methods (but one) are called?
<Josh_2> theres no point calling something like (identity-keys <object>) if I had previously freed the pointer assocated with <object>
<Josh_2> but I don't want to write an :around for every method that would be a pain
loskutak has quit [Ping timeout: 246 seconds]
puchacz has joined #lisp
Bike has joined #lisp
<Bike> ex_nihilo: i think that's just slime? dunno. does the same thing happen when you run your lisp from the shell or whatnot?
<Bike> Josh_2: I'm not sure I totally understand what you want, but method combinations can do completely arbitrary things.
<ex_nihilo> Bike: no. If I run the code as a script from a shell it works as expected, and if I type the code directly into the Slime repl it runs as expected. It is only when I send the code from a Slime buffer to the repl, e.g., with slime-compile-and-run, that the behavior gets wonky.
<puchacz> Bike: having read your article, the memory barrier linux kernel article and lispworks doc, I decided that the portable way between lisps of starting a thread with a new lambda or submitting a lambda to a queue to be executed by a long running thread is:
renzhi has joined #lisp
<Bike> ex_nihilo: slime isn't usually used that way, i spose
nullkl has joined #lisp
<puchacz> (let ((arg1 "something") (arg2 3) (started-p)) (write-barrier) (submit-lambda (lambda () (loop :until started-p) (read-barrier) (use arg1 arg2))))
<ex_nihilo> Bike: that's fair enough; what seemed most peculiar to me was that (let ((line (read-line))) (format t "~A~%" line)) works as expected when typed directly into a Slime repl, but not when sent to a Slime repl from a file.
<Bike> puchacz: if you're going that far you may as well use an actual lock
<puchacz> as barriers are not about timings, but partial ordering only, so in this "design pattern" when I see started-p as true, I know that other variable was already written.
<Bike> more lisps have locks exposed than have barriers exposed, too
<puchacz> Bike - not really, how would I know that a lock is already available in a lexical variable?
<puchacz> (let ((lock (bt:make-lock))) (submit-lambda () ... car I really assume lock is bound) )?
<puchacz> car = can
<Bike> that's true. i suppose it would need to be a lock used by the actual long living thread
<puchacz> yes. also lock protected section does not protect against reodering from before lock acquire to after lock release.
<puchacz> and I want to make sure that arg1 arg2 are bound and objects they point to are fully written to memory
<puchacz> and in the loop in my example you can add :do (bt:yield) to make the wait less busy
<puchacz> that's what I started using
nullkl has quit [Ping timeout: 272 seconds]
<Josh_2> Bike: well I have a lot of various methods for various classes but almost all of them utilize a foreign pointer, I don't want the methods to execute their bodies if the pointer has previously been freed, but I don't want to go and write a :before / :around method for all of them
VincentVega17 has quit [Quit: Connection closed]
<puchacz> sorry, there is (setf started-p t) after my (write-barrier) of course
<Bike> i would guess there's not a difference between binding it to T, and binding it to NIL and then setting it to T. i mean, you're kind of implicitly assuming that if the lambda doesn't read started-p = T, it will read started-p = NIL, no?
<Bike> and my basic concern is that i suspect the queue just uses locks itself, in which case you don't need to do any synchronization
<Bike> like, if submit = (with-lock (queue-lock) (enqueue lambda)) and the work thread does (with-lock (queue-lock) (dequeue))
<Bike> Josh_2: i think a method combination might work for this yeah.
<puchacz> according to the memory-barriers.txt article, lock only ensures the right ordering between acquire and release, so using a lock on dequeuing only does not protect arg1 and arg2. by binding started-p to nil and then setting it to t I am (1) assuming that lisp is designed well enough that started-p will never be a garbage, but indeed it will have nil
<puchacz> first and then t, nothing else.
<Bike> if you're programming at this level that may not be a reasonable assumption
<puchacz> I am programming a normal Lisp :)
<puchacz> at least I try
<puchacz> I did not figure out how to do it with fewer assumptions and not using globally available lock
<Bike> if the enqueuing and dequeing work with locks it will be synchronized. When you do the enqueue, queue-lock is released, which gives you a write barrier, so arg1 and arg2 are written.
ebrasca has joined #lisp
<Bike> i mean if you're at this level, then for the lambda to observe started-p = nil, you are assuming some kind of write barrier anyway, right?
<puchacz> assuming normal Lisp's lexical visibility rule only
<puchacz> lispworks docs is very careful about the objects that are pointed by these lexical variables. they are not guaranteed to be fully committed
<Bike> i thought we decided lisipworks didn't really make any guarantees about closures
<puchacz> they say though that a variable will have any of the values it ever had, never garbage or something else
<puchacz> I hope that this can stand true for other lisps
josrr has joined #lisp
<josrr> ex_nihilo: out of curiosity I tried it in SLY; this is what happened: https://www.rufina.link/video/vokoscreen-2021-02-20_10-12-49.mp4
<puchacz> Bike, they say here: http://www.lispworks.com/documentation/lw71/LW/html/lw-142.htm "When one of these mutable atomic objects is modified, readers see either the old or new value (not something else), and it is guaranteed that the Lisp image is not corrupted by the modification even if multiple threads read or write the object simultaneously."
<puchacz> so I know started-p will be nil or t as seen by the other thread, and I am assuming that other lisps are keeping this guarantee. if they don't, I don't know how I could really pass anything to a closure.
zxcvz has joined #lisp
attila_lendvai has quit [Ping timeout: 256 seconds]
<Bike> this doesn't mention access to closure variables, which is what you're doing here
<ex_nihilo> josrr: interesting; is SLY opening up a separate repl to take the input there? How did you compile and run; C-c C-k?
<Bike> and i mean normally what you'd do is set up some kind of synchronization method with the long-running thread beforehand, as with the queue-lock i mentioned
<puchacz> yes, having thought of it now, you are right
<puchacz> synchronisation on the queue adding is enough
<Bike> i'm worried i might have led you down an overcomplicated path here
<puchacz> I don't know if android supplied queue has the lock
<puchacz> and I cannot use the same lock anyway
<puchacz> so I would need to provide my own lock
<Bike> i think i said this before, but if you're paying for lispworks, you should really be able to just ask them what the story is
attila_lendvai has joined #lisp
<puchacz> I also want my code to be portable, android access is not the only place I use threads.
<puchacz> I spoke to them many times, but not about this yet
<josrr> ex_nihilo: no, SLY is using the minibuffer to get de input. I used C-c C-k, but C-c C-r does the same
<Bike> i mean the only problem with the android access is that you're using this add-to-queue function that you don't control, like you can't look at it and see if it does use a lock or what
<Bike> (and if it does i don't see why you'd need your own lock)
<puchacz> so for other threading, do you agree that a portable lisp code should not rely on the lock being visible in the lexical variable?
<puchacz> where I have started-p, if I keep a lock
<puchacz> android stuff is not portable outside of lispworks anyway
<ex_nihilo> josrr: for completeness, I saw the same issue when I used C-c C-r with Slime. It sounds like SLY has the issue sorted; I have never tried SLY, but I have wanted to for some time....
IPmonger has quit [Quit: ZNC 1.7.5+deb4 - https://znc.in]
<puchacz> Bike, I know what I was thinking:-)
heisig has quit [Quit: Leaving]
IPmonger has joined #lisp
<puchacz> if I was to use a lock, I would put (setf started-p t) (notify) inside a critical section, and do the same (bt:with-lock-held () loop :until started-p :do (wait)
<puchacz> simply because the whole critical section and therefore a barrier can appear to happen after my closure is already running
<puchacz> but I would still need to be sure about lock and condition-variable visibility in the closure
<puchacz> so basically I would do java style pattern, but in java a lock and cv are the same object, and I could ensure its visibility if it was put in final variable
<puchacz> so I believe as there are no final lexical variables in lisp, I am making fewer assumptions by using a binary started-p instead
<Bike> i mean here's the fundamental problem: you're trying to ensure a closure variable is visible. to do that, you're synchronizing... through a closure variable.
<puchacz> without a lock, I am using a simple binary flag and a barrier
<puchacz> but yes, I agree. if the binary flag has a garbage, then it would not work
long4mud has quit [Quit: WeeChat 3.0.1]
<Bike> "simply because the whole critical section and therefore a barrier can appear to happen after my closure is already running" no, because with what i'd be thinking you'd be holding the lock _while enqueing the thunk_, and there's no way a dequeue can get the thunk until after it's been enqueued
<puchacz> yes, I see it now.
<puchacz> my problem of critical section in the parent thread happening after dequeueing would only be an issue with my pattern, but with a lock/cv and a flag instead of a memory barrier
<puchacz> so you gave me a solution - use a lock to queue and dequeue
<puchacz> it is portable
<puchacz> as of android queue, I will ask lispworks support :)
attila_lendvai has quit [Ping timeout: 256 seconds]
<Bike> i've been reading atomic queue designs over the last few weeks, ones that mention not doing synchronization. this conversation has really put into perspective what an incredible pain in the ass that can be
<puchacz> indeed. and I am really not doing anything low level, just trying to do normal application level Lisp correctly
<Bike> yeah
<Bike> the lispworks people are smart, i don't think they'd expose a queue if it would result in garbage appearing everywhere
<puchacz> I am wondering now if I design a queue/dequeue mechanism (or say use lparallel), can I get "bla-bla is not a lock" on dequeuing? if the long running executor thread tries to dequeue in critical section, and encounters a lock that is not fully created? I will not get this error in lispworks, as they explicitely say that everything created before
<puchacz> creating a thread will be fully committed, so it is enough if I create a lock first and then my long running executor. easy. but other implementations?
<Bike> i really doubt any implementation would not synchronize make-thread
<Bike> if make-thread is not synchronized, i'm not sure you could coordinate anything across threads ever
<puchacz> some things are created on (load ...) or simiar
rogersm has joined #lisp
<puchacz> anyway, my comment is not relevant
<puchacz> you are probably right
nullkl has joined #lisp
surabax has quit [Quit: Leaving]
<puchacz> I am only wondering what stassats (on #sbcl) meant by saying I need to protect everything that is shared with locks or barriers, and my scenarios are not about shared things.
<puchacz> I will try to catch him at some point :)
<puchacz> so thanks for all your input, Bike :)
<Bike> i hope it helps
rozenglass has joined #lisp
<puchacz> it does. I narrowed down my problem to android queue only. other cases are sorted by a queue/dequeue lock providing I create a long running executor after the lock in lispworks, because their manual says so, and it will work in sbcl because stassats says so, at least about similar scenarios, so I need more details.
<puchacz> and as a side note, I heard that clojure people sorted a lot of these problems, but I never tried. and I would not want to use clojure for other reasons anyway, despite many similarities it is a different language than common lisp after all.
terpri has quit [Remote host closed the connection]
terpri has joined #lisp
josrr has quit [Quit: rcirc on GNU Emacs 27.1]
villanella has joined #lisp
galex-713 has quit [Ping timeout: 272 seconds]
galex-713 has joined #lisp
bitmapper has quit [Quit: Connection closed for inactivity]
Bike has quit [Quit: Connection closed]
rogersm has quit [Remote host closed the connection]
rogersm has joined #lisp
davros_ has joined #lisp
davros has quit [Ping timeout: 258 seconds]
rogersm has quit [Remote host closed the connection]
long4mud has joined #lisp
orivej has quit [Ping timeout: 256 seconds]
rogersm has joined #lisp
renzhi has quit [Quit: WeeChat 2.3]
villanella has quit [Ping timeout: 240 seconds]
Jesin has quit [Quit: Leaving]
Jesin has joined #lisp
Jesin has quit [Remote host closed the connection]
Jesin has joined #lisp
didi has joined #lisp
rogersm has quit [Remote host closed the connection]
villanella has joined #lisp
rozenglass has quit [Remote host closed the connection]
<didi> What about https://paste.debian.net/hidden/9b945b27 for reading every object from a stream?
rozenglass has joined #lisp
jonatack has joined #lisp
ilshad has quit [Ping timeout: 264 seconds]
rogersm has joined #lisp
bitmapper has joined #lisp
hiroaki has quit [Ping timeout: 240 seconds]
rogersm has quit [Remote host closed the connection]
Jesin has quit [Quit: Leaving]
Jesin has joined #lisp
rpg has joined #lisp
karlosz has joined #lisp
jonatack_ has joined #lisp
<devon> didi: Looks good to me. I'd say end, eof or eos not x.
<didi> devon: True.
<devon> didi: and I'd say (loop :with end := '#:end ...
* didi nods
jonatack has quit [Ping timeout: 256 seconds]
villanella has quit [Ping timeout: 256 seconds]
<didi> devon: Thank you.
Christ0pher has joined #lisp
KeyboardWorrier has quit [Ping timeout: 272 seconds]
jonatack_ has quit [Quit: jonatack_]
loskutak has joined #lisp
luni has joined #lisp
miasuji has joined #lisp
anticrisis has joined #lisp
caesarsalad has quit [Quit: Bye]
cosimone has joined #lisp
Tordek_ is now known as Tordek
zxcvz has quit [Read error: Connection reset by peer]
zxcvz has joined #lisp
ikki has joined #lisp
hiroaki has joined #lisp
zaquest has quit [Quit: Leaving]
pfdietz has joined #lisp
ilshad has joined #lisp
zaquest has joined #lisp
cosimone has quit [Quit: cosimone]
rogersm has joined #lisp
jeosol has quit [Quit: Connection closed]
sepanko_ has joined #lisp
karlosz has quit [Read error: Connection reset by peer]
zxcvz has quit [Quit: Leaving]
Bike has joined #lisp
nij has joined #lisp
ilshad has quit [Ping timeout: 272 seconds]
<nij> Hello! Frequently I need to parse timestrings in several different format. I have written ad hoc solutions for them.. but I think there should be a more general way to parse.. any package that has achieved that?
<nij> For example.. I'm hoping for a #'parse-time such that
<nij> (parse-time "%m%m/%d%d/%y%y%y%y" "11/20/2020") => @2020-11-20
<nij> Or.. is there a general enough parser that helps me do this, with a smarter control sequence?
<nij> Bike: local-time is actually my favorite time-related library.. iirc it doesn lemme do that. Just checked its doc. But let me double check again.
<nij> Bike: in particular, its #'parse-timestring accepts by default its +iso-8601-format+.
<nij> (formatting is easy; parsing is hard..)
<Bike> mm, you're right, i don't see arbitrary parsing here
<nij> I feel this is used many times.. but weird enough that there is no general library as I checked..
<nij> so maybe people just use full fledged parsers.. which is something that i haven't learned
<nij> e.g. parsec, but in lisp
<Bike> i haven't worked with time enough myself to tell you, sorry
contrapunctus has left #lisp ["Disconnected: closed"]
karlosz has joined #lisp
<nij> hey no worries at all!
<nij> thanks for reaching out anyway :-)!
contrapunctus has joined #lisp
<nij> and now im more convinced that i need to learn parser combinators badly
<pfdietz> or call out to a parser in some other language using cffi.
<nij> pfdietz: hehehe that'd work
<nij> i will see if parser combs work.. its an elegant idea
<nij> so worth learning anyway
<pfdietz> The easiest way to write a parser is let someone else already have done it.
<nij> agree!
<didi> I did the same thing regarding "War and Peace".
<edgar-rft> you wrote CFFI bindings for "war and peace"?
nullkl has quit [Ping timeout: 256 seconds]
<nij> didididthesamething
<_death> there is a library called chronicity, though I've not used it
<didi> edgar-rft: Didn't even need to do it. Tolstoy beat me to it.
Cymew has quit [Ping timeout: 256 seconds]
* edgar-rft didn't know that Tolstoy was a CFFI user
<nij> _death: oh it's very sweet
* nij neither, edgar-rft
<nij> _death: im so curious how that's done
<nij> thanks for pointing that out
rogersm has quit [Remote host closed the connection]
VincentVega has joined #lisp
karlosz has quit [Quit: karlosz]
<nij> Ah.. but the limit of natural language parsing is that there's not standard answer anyways.. so sometimes it needs to guess.
<nij> E.g. (chronicity:parse "12/11/2020") returns November, but (chronicity:parse "12/15/2020") returns December.
rogersm has joined #lisp
<nij> so.. I will go learn parser combinators anyway xD
<VincentVega> how do I import/export a ```defun (setf smth)```? ```(import '(smth))``` isn't doing the trick.
akoana has joined #lisp
<VincentVega> i meant `(import '(other-package::smth))` ofc
<_death> nij: I wrote this https://plaster.tymoon.eu/view/2307#2307 a long-time ago for some small-time date-time parsing
rozenglass has quit [Remote host closed the connection]
aartaka has quit [Read error: Connection reset by peer]
aartaka_d has joined #lisp
<Bike> VincentVega: import/export is about symbols. if SMTH is imported you can refer to SMTH, (setf smth), whatever
<nij> _death: dod you remember what's an example of TEMPLATE?
<pfdietz> Generally you should do import/export with defpackage.
ilshad has joined #lisp
rpg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<_death> nij: for example (parse-using-digits-template "22/11/0000 33:44" "05/08/1962 05:25")
VincentVega has quit [Quit: Connection closed]
pfdietz has quit [Quit: Connection closed]
VincentVega has joined #lisp
<VincentVega> Bike: you are right, I messed up the spelling of the symbol I imported : D
orivej has joined #lisp
<VincentVega> pfdietz: OK! By the way, is there a way to check for unused symbols which were imported with a defpackage?
<nij> _death: oh i see i need cl-utilities
rpg has joined #lisp
<_death> nij: once-only is from alexandria
<nij> oh oh ! both worked
<_death> anyway.. nowadays I wouldn't make some of the choices I did back then :).. but that's what I use in some scrapers I wrote back then
<nij> it's useful anyway :D
<nij> hmm but i think the following would be useful
pfdietz has joined #lisp
<nij> which isn't in cl-str (https://github.com/vindarel/cl-str)
<nij> for example
<nij> (collect "aaaa-bb-cc-b" "2020-11-20-@") => (:a "20203" :b "11@" :c "20" :- "---")
<nij> (expand "a4-b2-c2-b") => "aaaa-bb-cc-b"
<nij> What do you guys think? Useful? Improvable?
<nij> Ah.. a typo sorry. Fixed: (collect "aaaa-bb-cc-b" "2020-11-20-@") => (:a "2020" :b "11@" :c
<nij> "20" :- "---")
<nij> Similarly, (collect "aabbccaabb" "1234567890") => (:a "1278" :b "3490" :c "56")
miasuji has quit [Quit: Leaving]
rpg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<_death> you can use Lisp syntax for structure, instead of a string template.. like (collect '((a 2) (b 2) (c 2) (a 2) (b 2)) sequence)
<nij> oh yeah! i was fainted by #'format
<_death> then you can extend the pattern language
<nij> what's the pattern lang?
<_death> the template describes a pattern
ex_nihilo has quit [Quit: Leaving]
ukari has quit [Remote host closed the connection]
<_death> maybe there's a CL version of emacs's rx?
ukari has joined #lisp
<_death> if not, feel free to write one ;)
<didi> cl-ppcre can use a sexp syntax.
<_death> didi: yeah.. but I like rx better
aartaka_d has quit [Ping timeout: 246 seconds]
rozenglass has joined #lisp
<_death> I tend not to use regular expressions.. but I guess for a task like scraping they may be ok
louis_ has joined #lisp
rpg has joined #lisp
aeth has quit [Ping timeout: 240 seconds]
drdo has joined #lisp
luni has quit [Quit: Connection closed]
Bike has quit [Quit: Connection closed]
aeth has joined #lisp
ukari has quit [Remote host closed the connection]
Bike has joined #lisp
ukari has joined #lisp
<_death> nij: for format, there was a (setf format) thingy.. so you could (setf (format nil "~D-~D-~D" year month day) "1999-12-31") and it would assign the numbers to year/month/day
andreyorst[m] has quit [Remote host closed the connection]
a138 has quit [Read error: Connection reset by peer]
louis_ has quit [Quit: leaving]
louis771 has joined #lisp
<nij> yep format is nice
<nij> but.. how does my #'collect has anything to do with rx?
<_death> it's just another way to extract fields from a string
iskander has quit [Quit: bye]
<louis771> can anyone of you recommend lispwork over sbcl?
<mfiano> LispWorks is nice, but it's very easy to write non-portable code with the array of impleemntation-specific niceties it has, and I can't justify the license cost over free and extremely performant SBCL.
iskander has joined #lisp
<nij> _death: Oh wow indeed, I thought rx is just for pattern matching.. but it's actually almost the same problem. There's a nice showcase here: http://francismurillo.github.io/2017-03-30-Exploring-Emacs-rx-Macro/
<nij> I might just use rx... but is there an easier way to call elisp functions?
<nij> Better/easier then (run-program "emacsclient -e \'...\'")
ikrabbe has quit [Ping timeout: 246 seconds]
<louis771> i'm just a few weeks into lisp and oscillate somewhat between CL and Racket. I found CL the more mature, practial Lisp however Racket provides a unified batteries-included approach incl. an IDE and a central package server.
<louis771> What I don't like about Racket is the obsession of it being a language to program programming languages. It's just what I'm not so much interested in. I want to do more practical stuff (web app, etc.)
<nij> speaking of this.. how great is racket's ide comparing to emacs?
<nij> louis771: A reason I heard of why Lisp is great is that it's easier for you to implement your own language for your specific problem.
<mfiano> Well that's hard to answer. Racket being derived from Scheme has a different take on live-recompilation/incremental modifications.
<nij> So implementing languages don't really imply that it's not practical.
<louis771> far far away from great. No search, and no live REPL eval
rogersm has quit []
<louis771> nij: no its just that the whole community is obsessed by that particular use case
<nij> oh i c..
<louis771> when I build a web app I don't need to write a new language.
<louis771> some nice macros to make life easier is fine for me, but inventing a new DSL so nobody else but me will be able to understand my code is outside my scope :)
<louis771> from a "getting things done" perspective, or say a more business point of view, you guys think that CL is the better alternative?
ikki has quit [Ping timeout: 240 seconds]
<mfiano> Most definitely.
<louis771> and quicklisp is alive and healthy?
<louis771> on it's page I see "Bye, Common Lispers 👋
<louis771> Quickdocs had been closed on Oct 16th, 2020. Thank you for using Quickdocs."
<louis771>
<nij> louis771: note that #lisp is "actually #common-lisp".. so answer here might be biased.
<mfiano> That's not Quicklisp
<nij> general lisp related stuff actually goes to ##lisp
<louis771> mfiano: I'm sorry, true. But when I do a search on quicklisp this is where I end up
<Cthulhux> the weirdest thing about quicklisp is its neverending beta.
<nij> xD
<nij> louis771: you might also be interested in #racket too
<Cthulhux> i used racket to write a web application once
<Cthulhux> interestingly, it was easier than with common lisp
<louis771> nij: oh I have some nice conversations in the racket community in the last few days and did some coding, but somehow I "feel" that it's not the direction I wanna go. But I'm unable to express why at the moment.
citizenajb has joined #lisp
citizenajb has left #lisp [#lisp]
<Cthulhux> it just doesnt require all that project boilerplate
<louis771> Cthulhux: because it has an integrated web-server ?
<Cthulhux> asdf still annoys me
rpg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Cthulhux> louis771: probably.. :)
citizenajb has joined #lisp
<louis771> Cthulhux: yes, Racket has a nice package management but try to get a packet in the package server.
<louis771> You have to learn Scribble first, which is the documentation language written in Racket
<louis771> Which was exactly the moment where I realized that maybe the price of "build a new language for every use case" is too high
wanamingo has joined #lisp
<Cthulhux> racket comes with half a dozen languages already - i'll need to find out how they can talk to each other though
<Cthulhux> e.g. i haven't found out how to use lang/<anything else> features from lang/webserver
meursault has quit [Ping timeout: 240 seconds]
<louis771> the racket devs are not interested in making Racket a day-to-day language for practical/business use cases. They are into language research, so everything in the community evolves around that.
<louis771> so you guys can tell me that it's not that way in the CL community? :-)
<VincentVega> louis771: I don't know how much of it is still relevant (e.g. racket 8.0 just came out and it's supposed to be quite faster), but here's the comparison https://gist.github.com/vindarel/c1ef5e043773921e3b11d8f4fe1ca7ac
<Cthulhux> it's not. because there are no CL devs. the standard is there, everything else is a package
<Cthulhux> :))
<VincentVega> goddamn, this autoinsert
<puchacz> CL is the most pragmatic language I know
<VincentVega> well, i guess you wont have to click the link then
<louis771> "No introspection compared to one with SLIME." - yes that was really disappointing
<louis771> in CL you can even hot-update classes, that is amazing
<louis771> "most of Racket libraries are half-baked: unfinished, failing to build, and lacking documentation" - I must agree here too
didi has left #lisp ["O bella ciao bella ciao bella ciao, ciao, ciao."]
<louis771> VincentVega: a very nice article, thanks! I have to agree to most of it from what I experience the last few days of studying Racket
luni has joined #lisp
<VincentVega> louis771: yeah, no problem : ) Note that Emacs is no small thing to consider either, especially with the aggressive-indent + paredit (lispyville for evil) combination, which I have grown to think of as indispensible now.
<VincentVega> don't know if racket ide has those
<puchacz> is there slime or sly (I use sly) for racket?
<louis771> there is racket-mode
<puchacz> I was considering playing with it to boost my general computer science knowledge
<louis771> but I didn't really do much with it
<louis771> editing cl in emacs is a joy
<puchacz> agree
<Cthulhux> paredit is annoying in all languages which aren't lisp
<louis771> emacs _is_ a lisp IDE and slime makes it even more powerful
puchacz has quit [Quit: Connection closed]
<VincentVega> Cthulhux: even with lisp it only clicked for me on the second try
puchacz has joined #lisp
ilshad has quit [Ping timeout: 264 seconds]
iskander has quit [Quit: bye]
<markasoftware> i've got a small MOP question. At http://mop.lisp.se/www.alu.org/mop/concepts.html#defmethod it says that the (make-instance) call for the method metaobject can receive a :declarations initarg
<markasoftware> for declarations in the defmethod body
VincentVega has quit [Quit: Connection closed]
<markasoftware> but here http://www.lispworks.com/documentation/lw71/MOP/mop/dictionary.html#Initialization there is no :declarations initarg mentioned for method metaobjects
VincentVega has joined #lisp
Christ0pher is now known as KeyboardWorrier
Bike has quit [Quit: Connection closed]
nullkl has joined #lisp
<markasoftware> and the SBCL definition of `standard-method` seems not to take a :declarations initarg
ilshad has joined #lisp
theothornhill has joined #lisp
iskander has joined #lisp
theothornhill has quit [Remote host closed the connection]
citizenajb has quit [Remote host closed the connection]
theothornhill has joined #lisp
nullkl has quit [Ping timeout: 265 seconds]
puchacz has quit [Quit: Connection closed]
luni has quit [Quit: Connection closed]
Bourne has quit [Ping timeout: 240 seconds]
pve has quit [Quit: leaving]
pfdietz has quit [Quit: Connection closed]
narimiran has quit [Ping timeout: 265 seconds]
euandreh has quit [Ping timeout: 264 seconds]
euandreh has joined #lisp
ljavorsk has joined #lisp
Bike has joined #lisp
orivej has quit [Ping timeout: 240 seconds]
warweasle has joined #lisp
<warweasle> Yay! I'm pulling data from the stock market! Ah, my ridiculously circuitous plan is one quarter complete!
villanella has joined #lisp
<warweasle> It's so nice to be working in lisp again.
<_death> step 4 is the big one
<warweasle> ...let's see... one...two..three...AH, FOUR...Profit!
<warweasle> Honestly I'm a little more concerned with using the training data to create a stock predictor.
<_death> retrodictor?
<warweasle> Given the size of the data set and the number of variables... I should be done just before the heat death of the universe...if I had a quantum computer.
<warweasle> :(
<warweasle> Screw it: (defun paperclip-maximizer (starting-planet) ...
h4ck3r9696 has quit [Quit: Leaving.]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
<markasoftware> I'm also a confused about the example `defmethod` expansion given here http://mop.lisp.se/www.alu.org/mop/concepts.html#defmethod will work if the generic function is not defined yet
<markasoftware> it seems to me like the (ensure-generic-function) call will initialize it with a nil lambda-list, so adding a method with a non-nil lambda list right afterwards will trigger an error
<markasoftware> because the empty lambda list is not congruent with the lambda list of the new function
theothornhill has quit [Ping timeout: 265 seconds]
orivej has joined #lisp
<Bike> the MOP book has a lot of little issues like this. you might be better off looking at what implementations actually do.
theothornhill has joined #lisp
ljavorsk has quit [Ping timeout: 240 seconds]
iskander has quit [Quit: bye]
iskander has joined #lisp
Josh_2 has quit [Ping timeout: 246 seconds]
loskutak has quit [Ping timeout: 240 seconds]
nij has quit [Ping timeout: 264 seconds]
louis771 has quit [Ping timeout: 246 seconds]
amb007 has quit [Ping timeout: 240 seconds]
theothornhill has quit [Ping timeout: 240 seconds]
nullkl has joined #lisp
louis771 has joined #lisp
amb007 has joined #lisp
marusich has joined #lisp
louis771 has quit [Ping timeout: 240 seconds]
pankajsg has quit [Ping timeout: 265 seconds]
louis771 has joined #lisp
ilshad has quit [Ping timeout: 240 seconds]
v3ga has quit [Ping timeout: 256 seconds]
quanta[m] has joined #lisp
frgo has quit [Remote host closed the connection]
frgo has joined #lisp
contrapunctus has left #lisp ["Disconnected: Replaced by new connection"]
loli has quit [Quit: WeeChat 3.0]
contrapunctus has joined #lisp
loli has joined #lisp
ramus has quit [Ping timeout: 240 seconds]
luis has quit [Quit: The Lounge - https://thelounge.chat]
theothornhill has joined #lisp
contrapunctus has left #lisp ["Disconnected: closed"]
contrapunctus has joined #lisp
aindilis has joined #lisp
theothornhill has quit [Ping timeout: 272 seconds]