nowhere_man has quit [Read error: Connection reset by peer]
nowhere_man has joined #lisp
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Ping timeout: 260 seconds]
raphaelss has joined #lisp
Bike has joined #lisp
fikka has quit [Ping timeout: 248 seconds]
tom34 has joined #lisp
turkja has joined #lisp
Trasformatore has joined #lisp
_Trasformatore_ has quit [Ping timeout: 240 seconds]
eudoxia has joined #lisp
rpg has joined #lisp
terpri has quit [Ping timeout: 264 seconds]
fikka has joined #lisp
rumbler3_ has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
milanj has joined #lisp
milanj has quit [Read error: Connection reset by peer]
rumbler3_ has quit [Ping timeout: 264 seconds]
fikka has joined #lisp
milanj_ has joined #lisp
fikka has quit [Ping timeout: 272 seconds]
<sjl>
I think I'll probably end up using flexi-streams. My next question is how to check whether a stream supports binary i/o.
<sjl>
(subtypep (stream-external-format s) 'integer) is close, but doesn't pick up e.g. SBCL's bivalent streams
milanj_ has quit [Read error: Connection reset by peer]
milanj has joined #lisp
fikka has joined #lisp
fikka has quit [Ping timeout: 272 seconds]
fikka has joined #lisp
eudoxia has quit [Remote host closed the connection]
eudoxia has joined #lisp
<Xach>
fwiw: binary adj. 1. (of a stream) being a stream that has an element type that is a subtype of type integer.
<Xach>
sjl: no standard way. out of curiosity, what prompts the desire?
<Xach>
i agree that sbcl bivalent streams don't look like they can be sussed out by the element-type
tom34 has quit [Ping timeout: 260 seconds]
fikka has quit [Ping timeout: 240 seconds]
<jasom>
suggestions for wall-clock profiling of sbcl? I am getting about a 1:4 ratio of CPU to wall-clock time, and assume it's I/O bound in foreign libraries, but am not sure if there's a better way than manually instrumenting my code.
<jasom>
though again that doesn't pick up SBCL's bivalent streams
fikka has joined #lisp
fikka has quit [Read error: Connection reset by peer]
<Xach>
sjl: burning with curiosity!
tom34 has joined #lisp
dmiles[m] has quit [Ping timeout: 248 seconds]
pedh has joined #lisp
<sjl>
Xach: sorry got paged for work, hang on
eudoxia has quit [Remote host closed the connection]
pedh has quit [Ping timeout: 240 seconds]
wigust has joined #lisp
eudoxia has joined #lisp
fikka has joined #lisp
dieggsy has joined #lisp
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
rumbler31 has quit [Ping timeout: 248 seconds]
red-dot has joined #lisp
fikka has quit [Ping timeout: 268 seconds]
jack_rabbit has quit [Ping timeout: 260 seconds]
red-dot has quit [Remote host closed the connection]
red-dot has joined #lisp
tom34 has quit [Ping timeout: 240 seconds]
tom34 has joined #lisp
<jasom>
blargh. So sb-sprof has a :mode :time option, which should do what I want. However, I have 8s of wall-clock time and only ~2s worth of samples. If I add a (sleep 2) to the main body of my with-profiling, I get ~4s worth of samples. Anybody know what sorts of thing(s) sb-sprof can't discover runtime from?
dmiles has joined #lisp
pedh has joined #lisp
tom34 has quit [Ping timeout: 272 seconds]
jack_rabbit has joined #lisp
fikka has joined #lisp
pedh has quit [Ping timeout: 260 seconds]
fikka has quit [Ping timeout: 256 seconds]
<sjl>
Xach: I'm making a little library that will parse a simple image format
<sjl>
my goal is to have a function users can call which takes a stream and reads the image from it, and returns a Lisp array with the pixel data
<sjl>
ideally I'd like this library to work with both character and binary input streams
<sjl>
but this is proving tricky to do
<Zhivago>
Why would you want to use character input streams?
<sjl>
Zhivago: the image format is PPM, which has an ascii-based format
<sjl>
so if someone wants to type in a simple PPM file to test on stdin, I'd like to let them
<Xach>
sjl: when i am faced with problems like that, i deal only with binary streams but make it easy to express the ascii codes as characters to be translated to code for parsing.
<sjl>
but, I could live with requiring them to supply only binary input streams
<sjl>
or rather, supplying only input streams that support binary operations
<sjl>
e.g. sbcl's standard-input
fikka has joined #lisp
<sjl>
which brings me back to my request: how do I detect that they've given me what I've asked for, so I can fail with a nice error message if they don't
<Xach>
i have something like (ascii-code-case ((#\a #\b 12 :cr :lf) ...) ...)
<Xach>
so, a character, a bare code, or a symbolic thingy could match, but obviously only against an integer underneath
<Zhivago>
Well, you can read ascii in binary.
<sjl>
I could live with (assert (stream-supports-binary-ops-p ...) ...) at the beginning of the function
<sjl>
but I don't want someone to pass a character input stream and get a stack trace from wherever the hell my first `read-byte` function call happens to be
<Xach>
sjl: I suspect there isn't a portable way.
<Xach>
The error is too generic for non-binary stream errors.
<Xach>
Specified as too generic, that is.
<Zhivago>
Why not decouple it by removing streams from the equation?
<sjl>
I was hoping either flexi-streams or trivial-gray-streams might have something, but couldn't find anything
<Zhivago>
I assume your code wants to do something like 'read the next byte'?
<Xach>
sjl: this could be a good question for a different audience, like stack overflow.
<Xach>
they have good responses there
<Xach>
pretty often, anyway
<sjl>
I haven't used my SO account in years... I guess I could dust it off
<Xach>
it's basically a way to get rainer joswig to dig into it, or sam steingold, or a handful of other prolific commenters who aren't usually here.
<Xach>
twitter can work sometimes but sometimes you get a really useless peanut gallery
<Xach>
like here!
<Zhivago>
If so, why not just supply the library with a function to get the next byte?
fikka has quit [Ping timeout: 265 seconds]
<dmiles>
well something like a &key next-byte-fn
<Xach>
sjl: i like the noble goal of a nice direct error like "use a binary stream" but it feels somewhat out of reach to me in this situation
* Xach
wonders if he is forgetting something
<sjl>
Streams are used all over the place in CL -- I don't want to have to force users to figure out how to use some weird byte-reading interface
<pjb>
sjl: this is idiotic. Will you be able to parse the image if the stream is a binary stream of (unsigned-byte 3)?
<pjb>
sjl: what about a stream of (unsigned-byte 36)?
<Xach>
sjl: is this limited to netpbm stuff?
tom34 has joined #lisp
<sjl>
Xach: yes
<Xach>
sjl: one thought is you could try to read the magic with a read-byte and if it fails, try a read-char, and if that succeeds signal a nice error of some sort.
<Xach>
That is pretty early.
<dmiles>
well one thing that is possible (thinking about what pjb is saying) is that you might be able to create a small sanity test for the stream type you get provided and test if certain bytes come back accurate based on a file that you know what should be therer
<sjl>
that might be an option (getting the magic-byte via read-byte)
<sjl>
and if it fails, just bailing there
<pjb>
sjl: the point is that it's not up to your client to choose the stream type! You must open the file yourself using the kind of stream you want!
<Xach>
there are a handful of reasons read-byte could fail, so it would be speculative to mention non-binary-ness
<sjl>
pjb: and if they want to read from standard-in?
<Xach>
but it would be early, anyway
<pjb>
sjl: then parse it from a text stream, happily that's ascii files.
fikka has joined #lisp
<pjb>
sjl: alternatively, you could parse a in-memory string (or byte vector), and let the client do the I/O.
<dmiles>
ahah, what pjb said is really agood idea.. copy the stream data to a stream you know the details of
<pjb>
It's always a good idea to separate the concerns and avoid doing the I/O in the processing code.
rpg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<sjl>
sure, I could provide alternative interfaces. But it should also be able to take an input stream. What if they've implemented their own kind of stream (via trivial-gray-streams) and want to use its functionality?
<sjl>
e.g. the example gray-stream in SBCL's manual
tom34 has quit [Ping timeout: 264 seconds]
rumbler31 has joined #lisp
<sjl>
I can't avoid interleaving the processing and the reading -- I need to know how much data to read, which is encoded partway through the file header
<dmiles>
(though i guess is just getting the stream copied correctly is the basic underlying problem)
rumbler31 has quit [Remote host closed the connection]
<sjl>
I'm not just gonna copy the entire stream contents into a buffer or something. There could be more things in the stream after the file
<Xach>
sjl: what prompted the interest in netpbm files?
<Xach>
i used to use them a lot as intermediate formats but haven't in quite a long time
<dmiles>
*not* what i am wondering is if you wanted to copy the data out of the stream is even really possible
<dmiles>
*not*
<dmiles>
oops *nod*
<Zhivago>
sjl: Why not just decouple from the stream via an accessor?
fikka has quit [Ping timeout: 272 seconds]
<sjl>
Xach: I read an article somewhere that mentioned them, and they seem like a simple way to get graphics in/out, using e.g. imagemagic to reencode at the boundaries
<Xach>
they are pretty simple
<Zhivago>
sjl: Presumably you don't care about streams -- just about reading the next N bytes -- so why not just provide a function which does that?
<Xach>
the raytracer in ANSI Common Lisp uses it for output, iirc.
d4ryus1 has joined #lisp
<sjl>
Zhivago: I care about providing a simple interface to the user, not working around the streams problem by making them provide a function
<dmiles>
Zhivago: i assume slj is wanting to be able to in most cases be able to extract which accessor will make sense
<sjl>
I want them to say (read-ppm-from *standard-input*) not (read-ppm-with (alexandria:curry #'read-byte *standard-input*))
<Xach>
that was a real eye-opener. write some bytes on disk and you get graphics out of it!
<sjl>
and s-e-t doesn't seem to help with the latter
terpri has joined #lisp
<Zhivago>
Ah, well -- bivalent streams were not a very sensible extension, but fair enough.
<dmiles>
actualy what almost sounds reasonable is for the user to &key stream-type for bivaliant streams
fikka has quit [Ping timeout: 248 seconds]
<sjl>
I think Xach's idea of trying to read the magic byte with read-byte first is a good compromise
<sjl>
it's early enough in the process
dieggsy has quit [Quit: ERC (IRC client for Emacs 27.0.50)]
fikka has joined #lisp
<dmiles>
i would have expected the user to use the wrong type of stream even out of no choices so reading for a magic would be required most cases
<dmiles>
(anyways)
fikka has quit [Ping timeout: 248 seconds]
sz0 has quit [Quit: Connection closed for inactivity]
pedh has joined #lisp
dtornabene has quit [Quit: Leaving]
rumbler31 has joined #lisp
pedh has quit [Ping timeout: 240 seconds]
makomo has quit [Ping timeout: 265 seconds]
rumbler31 has quit [Ping timeout: 240 seconds]
fikka has joined #lisp
attila_lendvai has quit [Ping timeout: 272 seconds]
<dmiles>
in a program i work with, a user supplies concatenated ascii and binary mixed from FASLs over a socket opened as either ascii or binary .. so in most transmitions i must change the element types based on some headers and even then they tend to lie
pedh has joined #lisp
nightfly has quit [Quit: WeeChat 1.5]
pedh has quit [Ping timeout: 240 seconds]
sz0 has joined #lisp
philosau1 has quit [Quit: philosau1]
philosaur has joined #lisp
damke_ has joined #lisp
fikka has quit [Ping timeout: 260 seconds]
<Zhivago>
dmiles: Just imagine how much simpler it would have been if they couldn't do that. :)
damke has quit [Ping timeout: 264 seconds]
tonton has quit [Ping timeout: 248 seconds]
tonton has joined #lisp
fikka has joined #lisp
Cymew has joined #lisp
rumbler31 has joined #lisp
heurist`_` has joined #lisp
fikka has quit [Ping timeout: 248 seconds]
zooey_ has joined #lisp
zooey has quit [Ping timeout: 248 seconds]
pedh has joined #lisp
heurist_ has quit [Ping timeout: 240 seconds]
Cymew has quit [Ping timeout: 265 seconds]
fikka has joined #lisp
pedh has quit [Ping timeout: 240 seconds]
zooey_ has quit [Remote host closed the connection]
zooey has joined #lisp
fikka has quit [Ping timeout: 256 seconds]
SaganMan has joined #lisp
<dmiles>
hehe
ramus has quit [Ping timeout: 260 seconds]
wheelsucker has quit [Ping timeout: 264 seconds]
fikka has joined #lisp
caffe has quit [Quit: brb]
ramus has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
tom34 has joined #lisp
fikka has joined #lisp
ahungry has joined #lisp
tom34 has quit [Ping timeout: 248 seconds]
EvW has joined #lisp
dddddd has quit [Remote host closed the connection]
fikka has quit [Ping timeout: 264 seconds]
EvW has quit [Ping timeout: 248 seconds]
zooey has quit [Ping timeout: 248 seconds]
fikka has joined #lisp
smurfrobot has joined #lisp
zooey has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
smurfrobot has quit [Ping timeout: 256 seconds]
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Ping timeout: 255 seconds]
fikka has joined #lisp
fikka has quit [Read error: Connection reset by peer]
schoppenhauer has quit [Ping timeout: 264 seconds]
schoppenhauer has joined #lisp
SaganMan has quit [Quit: WeeChat 1.6]
rpg has joined #lisp
rumbler31 has quit [Remote host closed the connection]
fikka has joined #lisp
vtomole has joined #lisp
tom34 has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
tom34 has quit [Ping timeout: 240 seconds]
fikka has joined #lisp
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
fikka has quit [Ping timeout: 240 seconds]
pierpa has quit [Quit: Page closed]
fikka has joined #lisp
fikka has quit [Ping timeout: 256 seconds]
fikka has joined #lisp
fikka has quit [Ping timeout: 256 seconds]
Kevslinger has quit [Quit: Connection closed for inactivity]
fikka has joined #lisp
red-dot has joined #lisp
ahungry has quit [Remote host closed the connection]
Bike has quit [Quit: Lost terminal]
fikka has quit [Ping timeout: 256 seconds]
<beach>
Good morning everyone!
pedh has joined #lisp
fikka has joined #lisp
pedh has quit [Ping timeout: 248 seconds]
fikka has quit [Ping timeout: 264 seconds]
milanj has quit [Quit: This computer has gone to sleep]
tom34 has joined #lisp
fikka has joined #lisp
LocaMocha has joined #lisp
tom34 has quit [Ping timeout: 240 seconds]
notzmv has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
pedh has joined #lisp
fikka has joined #lisp
pedh has quit [Ping timeout: 256 seconds]
shenghi has quit [Remote host closed the connection]
shenghi has joined #lisp
amdt has joined #lisp
turkja has quit [Ping timeout: 248 seconds]
mishoo_ has joined #lisp
fikka has quit [Ping timeout: 264 seconds]
fikka has joined #lisp
sword has joined #lisp
fikka has quit [Ping timeout: 248 seconds]
rippa has joined #lisp
sz0 has quit [Quit: Connection closed for inactivity]
damke has joined #lisp
turkja has joined #lisp
damke_ has quit [Ping timeout: 264 seconds]
Kundry_Wag has joined #lisp
pedh has joined #lisp
rpg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Kundry_Wag has quit [Ping timeout: 255 seconds]
fikka has joined #lisp
pedh has quit [Ping timeout: 256 seconds]
fikka has quit [Read error: Connection reset by peer]
fikka has joined #lisp
ezgoat has joined #lisp
fikka has quit [Ping timeout: 264 seconds]
shka has joined #lisp
tom34 has joined #lisp
tom34 has quit [Ping timeout: 268 seconds]
fikka has joined #lisp
Karl_Dscc has joined #lisp
Xal has quit [Ping timeout: 264 seconds]
fikka has quit [Ping timeout: 255 seconds]
igemnace has quit [Read error: Connection reset by peer]
makomo has joined #lisp
igemnace has joined #lisp
fikka has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
Xal has joined #lisp
raphaelss has quit [Remote host closed the connection]
makomo has quit [Ping timeout: 240 seconds]
fikka has joined #lisp
flamebeard has joined #lisp
fikka has quit [Ping timeout: 265 seconds]
Xal has quit [Ping timeout: 240 seconds]
Karl_Dscc has quit [Remote host closed the connection]
vtomole has quit [Ping timeout: 260 seconds]
knobo1 has quit [Ping timeout: 240 seconds]
fikka has joined #lisp
DeadTrickster has quit [Remote host closed the connection]
dec0n has joined #lisp
Xal has joined #lisp
fikka has quit [Ping timeout: 264 seconds]
<fiddlerwoaroof>
morning beach!
Younder has quit [Remote host closed the connection]
<fiddlerwoaroof>
So, I've noticed there's been a lot of talk about abandoned libraries and libraries that are about to be abandoned.
<fiddlerwoaroof>
I'd love to be able to be able to help maintain some libraries, but I don't have much spare time these days
<beach>
Sounds familiar.
tom34 has joined #lisp
fikka has joined #lisp
<Zhivago>
The question probably ought to be how much impact those abandonments would cause.
<Zhivago>
An abandonment with minimal impact is probably a good thing.
<fiddlerwoaroof>
Well, the one that concerns me most is Fare + ASDF
eSVG has joined #lisp
<Zhivago>
Seems like these days the main impact of ASDF ought to be via QuickLisp.
<Fare>
and I'll probably stay until all my pending changes are released, hopefully in 3.3.2.
<Fare>
so no big breakage expected. Actually, Xach and stassats will probably be relieved that I'm not there anymore... unless someone even more radical than I replaces me, of course.
EvW1 has joined #lisp
Cymew has joined #lisp
knobo1 has joined #lisp
hooman has quit [Remote host closed the connection]
EvW1 has quit [Ping timeout: 248 seconds]
whoman has joined #lisp
shka has quit [Ping timeout: 248 seconds]
Kundry_Wag has joined #lisp
pedh has joined #lisp
Kundry_Wag has quit [Ping timeout: 255 seconds]
trittweiler has joined #lisp
varjag has joined #lisp
pedh has quit [Ping timeout: 248 seconds]
<Zhivago>
It might make sense for the QL maintainers to take ASDF also.
<Shinmera>
I don't think Xach wants to maintain ASDF.
tom34 has joined #lisp
jameser has joined #lisp
tom34 has quit [Ping timeout: 240 seconds]
mingus has quit [Remote host closed the connection]
<jackdaniel>
code doesn't belong to "self-documenting" type either, so maintaining it would require some motivation and time
<jackdaniel>
and sense of purpose ;)
trn has quit [Remote host closed the connection]
scymtym has joined #lisp
terpri has quit [Ping timeout: 248 seconds]
pedh has joined #lisp
orivej has quit [Ping timeout: 240 seconds]
pedh has quit [Ping timeout: 248 seconds]
trn has joined #lisp
dddddd has joined #lisp
terpri has joined #lisp
Cymew has quit [Remote host closed the connection]
schweers has quit [Remote host closed the connection]
earl-ducaine has quit [Ping timeout: 256 seconds]
earl-ducaine has joined #lisp
earl-ducaine has quit [Client Quit]
earl-ducaine has joined #lisp
schweers has joined #lisp
zulu_inuoe has quit [Ping timeout: 264 seconds]
damke_ has joined #lisp
damke has quit [Ping timeout: 264 seconds]
Murii has joined #lisp
smurfrobot has joined #lisp
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Ping timeout: 240 seconds]
smurfrobot has quit [Ping timeout: 256 seconds]
smurfrobot has joined #lisp
trn has quit [Remote host closed the connection]
smurfrobot has quit [Ping timeout: 248 seconds]
teddy_error has joined #lisp
trn has joined #lisp
smurfrobot has joined #lisp
Murii has quit [Ping timeout: 255 seconds]
raphaelss has joined #lisp
smurfrobot has quit [Ping timeout: 264 seconds]
smurfrobot has joined #lisp
shenghi has quit [Remote host closed the connection]
shenghi has joined #lisp
tom34 has joined #lisp
SaganMan has joined #lisp
smurfrobot has quit [Ping timeout: 264 seconds]
tom34 has quit [Ping timeout: 248 seconds]
milanj has joined #lisp
Cymew has joined #lisp
smurfrobot has joined #lisp
smurfrobot has quit [Ping timeout: 240 seconds]
smurfrobot has joined #lisp
amdt has quit [Quit: rcirc on GNU Emacs 25.3.4]
Murii has joined #lisp
varjagg has joined #lisp
varjag has quit [Remote host closed the connection]
elts has quit [Quit: .]
elts has joined #lisp
smurfrobot has quit [Ping timeout: 255 seconds]
hajovonta has joined #lisp
<hajovonta>
hello
pedh has joined #lisp
pedh has quit [Ping timeout: 248 seconds]
eli has quit [Ping timeout: 268 seconds]
antismap has quit [Ping timeout: 246 seconds]
<fikka>
hajovonta: hi
<SaganMan>
hello
antismap has joined #lisp
milanj has quit [Quit: This computer has gone to sleep]
tom34 has joined #lisp
hhdave has joined #lisp
iarenaza has joined #lisp
smurfrobot has joined #lisp
tom34 has quit [Ping timeout: 265 seconds]
iarenaza has quit [Ping timeout: 248 seconds]
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
smurfrobot has quit [Remote host closed the connection]
djinni` has quit [Quit: Leaving]
<phoe>
Hey hi
djinni` has joined #lisp
fikka has quit [Ping timeout: 264 seconds]
attila_lendvai has joined #lisp
iarenaza has joined #lisp
shenghi has quit [Remote host closed the connection]
smurfrobot has joined #lisp
pedh has joined #lisp
shenghi has joined #lisp
attila_lendvai has quit [Quit: Leaving.]
pedh has quit [Ping timeout: 248 seconds]
iarenaza has quit [Ping timeout: 260 seconds]
fikka has joined #lisp
jack_rabbit has quit [Ping timeout: 256 seconds]
iarenaza has joined #lisp
damke has joined #lisp
shenghi has quit [Remote host closed the connection]
shenghi has joined #lisp
damke_ has quit [Ping timeout: 264 seconds]
_cosmonaut_ has joined #lisp
iarenaza has quit [Quit: Leaving.]
nirved has joined #lisp
teddy_error has quit [Quit: Peace ☮︎]
Kundry_Wag has joined #lisp
m00natic has joined #lisp
shenghi has quit [Remote host closed the connection]
shenghi has joined #lisp
Kundry_Wag has quit [Ping timeout: 255 seconds]
jack_rabbit has joined #lisp
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
Cymew has quit [Remote host closed the connection]
theBlackDragon has quit [Ping timeout: 264 seconds]
j0nd0e has joined #lisp
atgreen has joined #lisp
theBlackDragon has joined #lisp
shenghi has quit [Remote host closed the connection]
shenghi has joined #lisp
EvW has joined #lisp
tom34 has joined #lisp
red-dot has joined #lisp
milanj has joined #lisp
tom34 has quit [Ping timeout: 272 seconds]
shenghi has quit [Remote host closed the connection]
shenghi has joined #lisp
wxie has joined #lisp
EvW has quit [Remote host closed the connection]
EvW1 has joined #lisp
shenghi has quit [Remote host closed the connection]
shenghi has joined #lisp
Cymew has joined #lisp
j0nd0e has quit [Ping timeout: 256 seconds]
j0nd0e has joined #lisp
raynold has quit [Quit: Connection closed for inactivity]
shenghi has quit [Remote host closed the connection]
shenghi has joined #lisp
_8hzp has joined #lisp
<dmiles>
if someone use LABELS at the toplevel of a file, are these declared in the global environment?
Kundry_Wag has joined #lisp
Tobbi has joined #lisp
<jackdaniel>
no
<dmiles>
what level should it be at? just the file?
<elonopea>
anyone know how to turn off auto-repeat-mode in CLX for the duration the program is running, and then ensure it's turned back on before gracefully exiting? I currently have the auto-repeat-mode turned off globally before the loop, and turn it back on on a key-release event, but this doesn't work unless I return nil from the key-release clause. if I close/destroy the window/display within the key-release clause, auto-repeat-mode gets
<elonopea>
me into debugger
<elonopea>
I then issue Abort and get back to REPL with key repeat back on, but how to do this cleanly?
<elonopea>
sorry, auto-repeat-mode gets turned ON if I destroy the screen/display within the clause
tom34 has quit [Ping timeout: 265 seconds]
<elonopea>
I thought I could just add the call to turn auto-repeat-mode off into the key-release event clause (within event-case) as that would return T, but although the program exits auto-repeat-mode stays off
<elonopea>
sorry, turn it on...
<jackdaniel>
auto-repeat-mode is local to display, no?
<jackdaniel>
so if you open new display, then you should have previous value
<elonopea>
local to display yes, but the display is basically the X root AFAIUC
<jackdaniel>
you may open another display for new application
<jackdaniel>
display object represent single Xserver client
<jackdaniel>
you should close the display when you dispose it
<jackdaniel>
CLX doesn't maintain state of auto-repeat-mode, it is maintained on server side
<jackdaniel>
we just marshall request to set it on, off or default
Tobbi has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<elonopea>
I'm not sure how to go about this. yes, key repeat remains off globally in X after the program exits.
Kevslinger has joined #lisp
<jackdaniel>
there is no syntactic sugar to ensure it gets back to previous value
<elonopea>
here is the code: https://pastebin.com/UTq1FXRr (sorry about horrid indentation, comments and stray parens, I've been moving stuff around in desperate attempt to fix this)
<jackdaniel>
I would appreciate if you could fix the indentation before I try to tread the code
Amplituhedron has joined #lisp
milanj has quit [Quit: This computer has gone to sleep]
<elonopea>
alright, will do.
SaganMan has quit [Quit: WeeChat 1.6]
attila_lendvai has joined #lisp
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
red-dot has joined #lisp
milanj has joined #lisp
<elonopea>
jackdaniel: https://pastebin.com/7qLiWsrq - hopefully better, though not necessarily perfect by the book...
<elonopea>
apparently sneaked in an indent inconsistency with the key-repeat declarations. I've been splitting the keywords on separate lines for clarity, and try to condense when I think I'm done twiddling with them
attila_lendvai1 has joined #lisp
attila_lendvai has quit [Disconnected by services]
attila_lendvai1 has joined #lisp
attila_lendvai1 has quit [Changing host]
<jackdaniel>
OK, I see the code, and what is wrong with it?
<jackdaniel>
if this key closes the application
<jackdaniel>
you may change auto-repeat-mode before you call xlib:close-display
<elonopea>
jackdaniel: when I release key 's', the key-repeat is turned back on, but it throws me into debugger: https://pastebin.com/Nv6un6Yv
<elonopea>
you mean at the unwind?
<elonopea>
I tried to put it after the event-case form, but it never changed the key-repeat, so when I get back to REPL it's off
<elonopea>
same if I only leave the change-keyboard-control call to turn repeat back on inside the key-release clause within event-case, then the program exits but key-repeat is still off. I don't get it to be honest.
rpg has joined #lisp
<jackdaniel>
btw, what clx do you use? I see `require' call – what is your lisp implementation?
<jackdaniel>
where did you get xembed extension from?
<elonopea>
with the current code, key-repeat is on (as supposed), but it throws me into the debugger. I don't really understand the event handling well, seems like it's async and I don't know how to bring the whole thing down in controlled manner
<elonopea>
the xembed is for something else entirely, it's from quicklisp. not sure if I even need it (for something else I'm doing)
jack_rabbit has quit [Ping timeout: 260 seconds]
<elonopea>
SBCL 1.3.13, 64bit, threaded, on FreeBSD. CLX is from quicklisp.
jack_rabbit has joined #lisp
<jackdaniel>
you should access events with process-event function
nowhere_man has quit [Ping timeout: 260 seconds]
nowhere_man has joined #lisp
<jackdaniel>
your snippet doesn't even run for me due to async errors
milanj has quit [Quit: This computer has gone to sleep]
pedh has joined #lisp
<elonopea>
alright, thanks... I've been reading the manual but frankly the lack of examples is killing me. even google has been quite unhelpful on this particular topic and I've had to resort to somewhat unrewarding studying of random (mostly uncommented) code
<jackdaniel>
there is demo/ directory
<jackdaniel>
with some examples
<jackdaniel>
when you grok it, and if you are willing to spend some time, you could write a tutorial for CLX
jameser has joined #lisp
pedh has quit [Ping timeout: 260 seconds]
Kundry_Wag has joined #lisp
nullman has quit [Ping timeout: 264 seconds]
nullman has joined #lisp
<elonopea>
I glanced at it but often my problem with reading other people's CL sources is the (IMO) over-eager abstraction... people toss way too many layers upon layers of code for the sake of making everything general, tidy and purpose-built, but hiding the simple and obvious logic and structure in the process. or that's how I often feel. when I'm trying to get friendly with a new API I appreciate really, really stupid code that I can then h
<Shinmera>
You should look into getting an IRC client that isn't broken.
<Shinmera>
Or in other words, your message cut off after "code that I can then h"
atgreen has quit [Quit: atgreen]
<elonopea>
anyway I'm going to take a more careful look at the demos now... if I get somewhere with this stuff I'll take the tutorial into consideration :-)
<elonopea>
... "code that I can then hide under my own pretty wrapping"
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
milanj has joined #lisp
<pjb>
elonopea: on the other hand, I don't find that most lisp code is too high level or abstracted at all; on the contrary, I find it rather rare to find multi-layered abstraction levels. The reason being that it's costly to produce (in time and IQ).
<pjb>
elonopea: see for example O-META; very rarely used.
<|3b|>
Shinmera: isn't that a protocol problem, so clients can at best be "more conservative" rather than "not broken"?
<Shinmera>
|3b|: There is a way to make it perfect, but even just having an arbitrary limit that is low enough to not just split your messages is better than trimming your messages and not realising.
Amplituhedron has quit [Read error: Connection reset by peer]
rumbler31 has joined #lisp
dieggsy has joined #lisp
Kundry_Wag has quit [Remote host closed the connection]
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Ping timeout: 252 seconds]
fikka has quit [Ping timeout: 272 seconds]
fikka has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
rumbler31 has quit [Remote host closed the connection]
LiamH has joined #lisp
wigust has quit [Ping timeout: 264 seconds]
fikka has joined #lisp
<elonopea>
pjb: thanks. I know SICP but never got around to reading it. meanwhile I've acquired a ton of other literature on Lisp.
BitPuffin|osx has joined #lisp
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
dieggsy has quit [Remote host closed the connection]
fikka has quit [Ping timeout: 248 seconds]
dieggsy has joined #lisp
drewc has quit [Ping timeout: 272 seconds]
fikka has joined #lisp
asarch has joined #lisp
yeticry has joined #lisp
<mfiano>
It is conforming for a client of IRC to either continue or cut off text consisting of more than 503 characters.
<pjb>
Are irc clients have their standard?
<pjb>
s/Are/Do/
<mfiano>
Not a standard, but an RFC
<mfiano>
IIRC it's 2^9 characters, minus the command length and trailing CRLF
atgreen has joined #lisp
dieggsy has quit [Ping timeout: 265 seconds]
attila_lendvai has quit [Quit: Leaving.]
<mfiano>
Reading it again, it's kind of funny though, because character encoding is not mentioned at all.
TCZ has joined #lisp
* |3b|
thought it also includes host names, making it harder to predict where it will be further truncated during transmission
<mfiano>
|3b|: Not only that, but the target (channel or user for PRIVMSG), too.
<Shinmera>
|3b| is correct. You can't know your own hostname because the server might change it somehow
<|3b|>
sure, but source probably knows those :)
<Bike>
i thought the rfc was defined in terms of octets and didn't really mention encoding
<Shinmera>
So you need to first probe for your own hostname, remember that, and then calculate the proper prefix length to split "perfectly".
<Bike>
of course it still defines characters... dunno
tom34 has joined #lisp
Kundry_Wag has joined #lisp
oleo has joined #lisp
<pjb>
mfiano: and indeed, in practice you have channels using any coding system. Some are ASCII, some are Latin-1, some are utf-8, some are KOI, etc. You can find any encoding.
luis` has joined #lisp
luis` is now known as luis
tom34 has quit [Ping timeout: 264 seconds]
red-dot has joined #lisp
<luis>
uei
<foom>
Haha, the IRC protocol RFC is about the least accurate specification ever written.
zooey has quit [Remote host closed the connection]
<foom>
It's hard to say whether it or HTML4 was worse.
zooey has joined #lisp
eSVG has quit [Quit: Leaving]
Tobbi has joined #lisp
rumbler31 has joined #lisp
TCZ has quit [Quit: Leaving]
<luis>
What's new and exciting in the world of Lisp?
<pjb>
sexps
<luis>
How about that CL REPL for Android? That's neat.
<pjb>
Yet another one.
EvW1 has quit [Ping timeout: 252 seconds]
fikka has quit [Ping timeout: 248 seconds]
knobo1 has quit [Ping timeout: 248 seconds]
FreeBirdLjj has joined #lisp
fikka has joined #lisp
orivej has joined #lisp
nika has joined #lisp
milanj has quit [Quit: This computer has gone to sleep]
fikka has quit [Ping timeout: 268 seconds]
papachan has joined #lisp
warweasle has joined #lisp
Murii has quit [Ping timeout: 248 seconds]
Cymew has quit [Remote host closed the connection]
anunnaki is now known as vertigo
tom34 has joined #lisp
hexfive has joined #lisp
vaporatorius__ has quit [Remote host closed the connection]
sjl has quit [Quit: WeeChat 1.9.1]
fikka has joined #lisp
tom34 has quit [Ping timeout: 248 seconds]
Cymew has joined #lisp
fikka has quit [Ping timeout: 256 seconds]
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
red-dot has joined #lisp
Cymew has quit [Ping timeout: 264 seconds]
SaganMan has joined #lisp
Cymew has joined #lisp
fikka has joined #lisp
elonopea has quit [Ping timeout: 260 seconds]
Cymew has quit [Ping timeout: 264 seconds]
Cymew has joined #lisp
fikka has quit [Ping timeout: 264 seconds]
drewc has joined #lisp
Cymew has quit [Ping timeout: 260 seconds]
dec0n has quit [Read error: Connection reset by peer]
Cymew has joined #lisp
emacsomancer has quit [Remote host closed the connection]
pedh has joined #lisp
Kundry_Wag_ has joined #lisp
Kundry_Wag has quit [Ping timeout: 255 seconds]
Cymew has quit [Ping timeout: 240 seconds]
raphaelss has quit [Remote host closed the connection]
Cymew has joined #lisp
pedh has quit [Ping timeout: 268 seconds]
EvW has joined #lisp
fikka has joined #lisp
Cymew has quit [Ping timeout: 240 seconds]
flamebeard has quit [Quit: Leaving]
fikka has quit [Ping timeout: 268 seconds]
varjagg has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
tom34 has joined #lisp
atgreen has quit [Quit: atgreen]
notnull has joined #lisp
sjl has joined #lisp
tom34 has quit [Ping timeout: 272 seconds]
fikka has joined #lisp
fikka has quit [Ping timeout: 265 seconds]
hajovonta has quit [Ping timeout: 255 seconds]
Tobbi has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rpg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
red-dot has joined #lisp
Kundry_Wag_ has quit [Remote host closed the connection]
Folkol has joined #lisp
Kundry_Wag has joined #lisp
fikka has joined #lisp
trittweiler has quit [Ping timeout: 256 seconds]
Kundry_Wag_ has joined #lisp
Kundry_Wag has quit [Read error: No route to host]
fikka has quit [Ping timeout: 248 seconds]
Tobbi has joined #lisp
FreeBirdLjj has quit [Remote host closed the connection]
rpg has joined #lisp
ezgoat has joined #lisp
jmercouris has joined #lisp
FreeBirdLjj has joined #lisp
_cosmonaut_ has quit [Ping timeout: 264 seconds]
wheelsucker has joined #lisp
fikka has joined #lisp
wheelsucker has quit [Client Quit]
wheelsucker has joined #lisp
vtomole has joined #lisp
cgay has quit [Remote host closed the connection]
varjag has joined #lisp
vaporatorius has joined #lisp
vaporatorius has quit [Changing host]
vaporatorius has joined #lisp
vap1 has joined #lisp
CrazyEddy has quit [Ping timeout: 240 seconds]
_cosmonaut_ has joined #lisp
pedh has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
tom34 has joined #lisp
pedh has quit [Ping timeout: 240 seconds]
tom34 has quit [Ping timeout: 264 seconds]
Arcaelyx has joined #lisp
__main__ has quit [Read error: Connection reset by peer]
__main__ has joined #lisp
hhdave has quit [Ping timeout: 268 seconds]
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
fikka has joined #lisp
schweers has quit [Ping timeout: 265 seconds]
<Bike>
jasom: you ever figure out that weird code deletion note?
fikka has quit [Ping timeout: 272 seconds]
<jasom>
Bike: nope, it's still being noted, but that line of code is being run as far as I can tell
epony has quit [Quit: QUIT]
Tobbi has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
fikka has joined #lisp
Karl_Dscc has joined #lisp
<Bike>
wack.
fourier has joined #lisp
fourier has quit [Changing host]
fourier has joined #lisp
m00natic has quit [Remote host closed the connection]
knobo1 has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
<jmercouris>
Bike: What does it mean for a line of code to be "noted"?
_cosmonaut_ has quit [Ping timeout: 265 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
knobo1 has quit [Ping timeout: 240 seconds]
shka has joined #lisp
epony has joined #lisp
raynold has joined #lisp
fikka has joined #lisp
lclark` has joined #lisp
epony has quit [Max SendQ exceeded]
<scymtym>
jmercouris: a "note" is the least severe type of condition signaled by SBCL's compiler. more severe ones are style-warning, warning, error
epony has joined #lisp
red-dot has joined #lisp
cgay has joined #lisp
lclark has quit [Ping timeout: 240 seconds]
<Bike>
jmercouris: in this case, sbcl is signaling a(n errant) note that a line of code is being deleted by the compiler.
fikka has quit [Ping timeout: 240 seconds]
orivej has quit [Read error: Connection reset by peer]
<beach>
"Anywhere ``,@'' may be used, the syntax ``,.'' may be used instead to indicate that it is permissible to operate destructively on the list structure produced by the form following the ``,.'' (in effect, to use nconc instead of append). "
<sjl>
so you have a widget in the UI the user can put some text into, edit, copy, paste, etc etc
<jmercouris>
Yes
<sjl>
okay, go on
<jmercouris>
sjl: Here's the issue, people can write functions that say "Ask the user for some input"
Jesin has joined #lisp
<jmercouris>
I want them to be able to do a sort of "blocking" ask
<jmercouris>
instead of asking the user for input, getting the input, and then calling some function with that input
<jmercouris>
the reason being that it makes it much more complex for the end user when they have to consider 2 or more user inputs into a function, they would have to prompt the user and chain several funcetions together
<jmercouris>
does that make sense or no?
<sjl>
you're essentially trying to avoid javascript-style callback hell?
<jmercouris>
sjl: More or less yes, for the person writing plugins for nEXT
<sjl>
right
<jmercouris>
or packages in this case
attila_lendvai has joined #lisp
<jmercouris>
Anyways, the other user here on #lisp said it was a mistake to use semaphores and to make new threads for for every input, they said it would cause huge problems
fikka has quit [Ping timeout: 272 seconds]
<beach>
It sounds like you need CLIM. It does a good job of turning event-style backends into stream-style application code.
<beach>
Not that I completely understand the problem.
<jmercouris>
beach: How does it do that? how does it block?
Kaisyu has quit [Quit: Connection closed for inactivity]
<beach>
Like I said, I don't quite know what your problem is, so I am not sure how to answer that question.
<jmercouris>
Ok let me place the problem in a context
<jmercouris>
1. There exists a GUI box on screen that the user can type text into
<jmercouris>
2. I may ask the GUI box on the screen what are its contents
<jmercouris>
3. My program detects all keystrokes (RET, Ctrl, A, Q, L, etc)
<jmercouris>
4. Users of of my program write functions that except the following sequence of events I. Ask user some question II. User types input into GUI Textbox III. User presses the return key
<jmercouris>
s/except/expect
<jmercouris>
5. Currently users of my program can only get input in the following way (get-input-from-user "Some Prompt Message" function-to-call-with-input)
<beach>
Right, so in CLIM, you would just call an ordinary Common Lisp READ function. It would work automatically.
fikka has joined #lisp
<jmercouris>
6. So, the program will say to the user "Some Prompt Message", collect their input, then fire off (function-to-call-with-input)
<sjl>
But instead of providing a callback, you'd rather (get-input-from-user) suspend computation at that point, wait for the input to happen, and resume computation once it's ready, with the result value being the input
<jmercouris>
beach: That's the functionality I'm trying to imitate , I can't exactly use CLIM though as I am already using Cocoa/GTK
<sjl>
because it's more natural to read/write that way, right?
<jmercouris>
sjl: Yes, EXACTLY!
<sjl>
that's what you're hoping for?
<sjl>
ok
<|3b|>
is the waiting function running in its own thread already?
<jmercouris>
|3b|: No, but I can create a new thread for it if necessary
<beach>
jmercouris: Sounds like Cocoa/GTK was a bad match for you needs.
<|3b|>
so every other plugin/whatever blocks if it takes a while to do something (including wait for input)?
<jmercouris>
|3b|: There is no function waiting right now, it is on a callback
<jmercouris>
I thought you were talking about a hypothetical waiting function
<|3b|>
i mean in the hypothetical waiting function
<jackdaniel>
then create a channel and enqueue event for it
<jackdaniel>
from the callback
<jackdaniel>
or a thread-safe queue
<sjl>
one option is to write a macro that lets you write code that LOOKS like what you're asking for, but translates into the callback-style code
<jackdaniel>
basically a mailbox
<jmercouris>
sjl: Yeah, there are some things I think (compositors?) that can do this kind of translation but are unreliable or so
<jmercouris>
|3b|: Yeah, it would block while waiting for input, correct
<|3b|>
and it would block all other plugins as well?
fikka has quit [Ping timeout: 268 seconds]
<jmercouris>
jackdaniel: can you expand on that, what do you mean by a channel? each function has it's own channel? how does it prevent code from executing until some evenet?
fourier has joined #lisp
* Xach
gets gist posting working in githappy
fourier has quit [Changing host]
fourier has joined #lisp
* |3b|
is wondering if this is a special case of a problem you would still need to solve (or if already solved could be used here as well)
<jackdaniel>
you have an event-distributing-thread which calls read on a thread-safe queue (blockingly)
<jackdaniel>
and you write to that queue from callbacks
<jackdaniel>
I've used word channel, because lparallel has abstraction for that (with a pool of workers)
<jackdaniel>
but you don't want lparallel (because it requires retrival of results)
<scymtym>
jackdaniel: callbacks are not necessarily like events. they may have to return a value
<jmercouris>
jackdaniel: Let me try rephrasing what you said to confirm my understanding
<shka>
channel != queue
<jmercouris>
shka: I think we all know that :), plus we all know what he meant
<jackdaniel>
scymtym: ah, right, then maybe channel could be the right abstraction after all
<jmercouris>
jackdaniel: What's the purpose of the queue?
<jmercouris>
jackdaniel: To make sure events are delivered in-order?
attila_lendvai has quit [Ping timeout: 272 seconds]
<jackdaniel>
that's for one, the second is that I had an impression, that you are interested in computation in some kind of singleton loop
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
red-dot has joined #lisp
<jackdaniel>
but maybe I misunderstood the problem
<jmercouris>
I'm drawing out a quick sketch one sec
<jmercouris>
jackdaniel: I still see an issue though, would the thread with (some-user-function) not freeze?
peterhil has quit [Ping timeout: 260 seconds]
<jmercouris>
sjl: You know, that's lookign more appealing, I guess the user is just constrained to using it with a "with-result"
<jmercouris>
It's like a let binding in a way, no?
vibs29 has quit [Ping timeout: 256 seconds]
<|3b|>
how is some-user-function called?
raphaelss has joined #lisp
peterhil has joined #lisp
<jmercouris>
|3b|: process-keystroke detects a keybinding and does a funcall on it
<|3b|>
and how does waiting for minibuffer input differ from spending 5 seconds doing some image processing or whatever?
vibs29 has joined #lisp
attila_lendvai has joined #lisp
<|3b|>
so if it takes a while without waiting for input your input loop blocks?
<jmercouris>
|3b|: In this hypothetical scenario, yes
<jmercouris>
|3b|: I'll draw another sketch showing how it currently works
fikka has joined #lisp
peterhil has quit [Max SendQ exceeded]
<|3b|>
so minibuffer input is a special case, but some-user-function still needs to be written in CPS if it wants to sleep, read a file from somewhere, etc?
<jmercouris>
sjl: Ah shit, I didn't look closely enough, sorry
attila_lendvai has quit [Ping timeout: 272 seconds]
<jmercouris>
I'll try using this and see how it comes out, thank you all for your advices
<smurfrobot>
so basically you cannot write stuff like device drivers in CL?
<fourier>
but yes as Bike said do it with only foreign objects, not your lisp objects
<sjl>
jmercouris: though if you want to do non-callback-based stuff in between, you'd need to interleave that with the with-results macros (or use something like fare's nesting macro to flatten it out)
<jmercouris>
_death: I'll check it out later, thank you, I have to go for now!
<beach>
smurfrobot: You can't in C either.
<smurfrobot>
hmm just curious what I could use the language for. I am rather fond of the uniform syntax etc- but interested in problems like binary analysis.
<beach>
smurfrobot: In the case of CL, it requires an extension provided by the implementation. In the case of C, it requires using unspecified behavior of a particular compiler.
<smurfrobot>
doing static/dynamic analysis on machine code.
<Bike>
you can do that easy, just read the code into a byte vector or whatever
attila_lendvai has joined #lisp
<fourier>
^ exactly
<fourier>
and dont fiddle with ffi then
Kundry_Wag has quit [Ping timeout: 240 seconds]
<Bike>
well, "easy", a disassembler and so on is nontrivial
tom34 has joined #lisp
<smurfrobot>
and possibly stuff like instrumentation. i have been looking into stuff like pintools
<smurfrobot>
yeah been looking at tools that do the disassembly for me so i can focus on working on the dataflow etc.
jmercouris has quit [Ping timeout: 256 seconds]
<fourier>
its too generic. tell exactly what is the problem language-wise you have. there are at least 2 approaches: using ffi to access "foreign" memory and tweak it and 2) read the data into byte-array and do the same stuff as you would do in c/c++ etc
knobo1 has joined #lisp
<smurfrobot>
yeah i think its possible from what you are telling me but might require some effort with ffi and perhaps writing some c code as well.
<|3b|>
probably better to use separate files + asdf systems with explicit dependencies rather than enabling optional features at read time anyway... always fun when things behave differently depending on load order
attila_lendvai has quit [Ping timeout: 272 seconds]
<|3b|>
some random thing 3 layers deep in the dependency chain from your code decides to add another dependency, and suddenly an unrelated thing loaded later behaves differently, and everything breaks :)
<|3b|>
or gets compiled from a project that uses the optional thing, then you load the fasl from something that doesn't, and again everything breaks
warweasle has quit [Quit: rcirc on GNU Emacs 24.4.1]
<Xach>
that happened with wilbur this month
fikka has joined #lisp
<Xach>
a dependency loaded cl-ppcre first, and then wilbur, and then when wilbur was loaded solo from fasl, crash with no ppcre package
knobo1 has joined #lisp
<Xach>
not worded quite properly but can explain more if needed
atgreen has quit [Quit: atgreen]
pedh has joined #lisp
fikka has quit [Ping timeout: 264 seconds]
<rpg>
Xach: I have definitely seen this flavor of error. It's very odd to see code getting failed package errors from systems that (you think) are irrelevant!
<Xach>
rpg: reminds me of an old-school bug that has disappeared. people would sometimes write (in-package foo), and FOO would actually be SOME-PREVIOUSLY-REFERENCED-PACKAGE::FOO, and that would end up in the fasl, and break stuff
<Xach>
now I believe every implementation eagerly stringizes FOO into fasls
<smurfrobot>
the two projects i know of for binary analysis are bap and bitblaze. I think both are written in ML derived languages. I have however been wondering if there are other choices for doing binary analysis. my understanding is that ML is highly regarded in the academic community especially for compiler type stuff. I was wondering if lisp could be adapted for this as well.
hexfive has joined #lisp
pedh has quit [Ping timeout: 260 seconds]
attila_lendvai has joined #lisp
<|3b|>
yeah, looks like wilbur has a read-time optional dep on cl-ppcre
jmercouris has joined #lisp
heurist`_` is now known as heurist
<jmercouris>
sjl: I know what happened now, I had somehow entered your previous paste in twice, so I didn't see the new one you sent
<jmercouris>
sjl: I'm sorry about that!
drewc has joined #lisp
heurist` has joined #lisp
<jmercouris>
_death: That's an interesting example you've got there, I don't understand where you make a new thread though
<jmercouris>
_death: So your simply demonstrating a server client setup here?
<_death>
jmercouris: that's one example of communicating processes.. the other I have there is the ping-pong example..
<jmercouris>
My challenge is a little different and as I will have to do something similar, but with threads, or follow sjl's compositor approach
fikka has joined #lisp
attila_lendvai has quit [Ping timeout: 272 seconds]
<jmercouris>
|3b|: The more I think about it, the more I think that all processing should block on user scripts
<_death>
jmercouris: you could have your system schedule another task when one waits for IO
<jmercouris>
|3b|: s/scripts/commands
Tobbi has joined #lisp
<jmercouris>
_death: Yeah, that's why I thought maybe I should just launch all user commands in new threads
<jmercouris>
and then just create a semaphore for user inupt, and then release upon the RET key
<|3b|>
if only 1 can run at once no matter how long it takes, then just having a dedicated thread for them sounds easiest
<jmercouris>
I also really like the with macro though
<jmercouris>
|3b|: What about 1 thread per user invoked command
<|3b|>
then it can just send a request to UI thread and wait for response (with whatever IPC method you prefer)
<jmercouris>
|3b|: So If user type input X -> function Y, it will launch a new thread and execute whatever stack that command invokes in that thread
<|3b|>
depends on whether you already have something for dispatching work to other threads i guess
<jmercouris>
then if user type input Z -> function Q WHILE function Y is still processing, open yet another thread
<|3b|>
if they need to be serialized you would probably still need a separate thread for serializing them
<jmercouris>
|3b|: Is there not an easy way in Cl to say something like (with-new-thread (...))?
fourier has quit [Ping timeout: 265 seconds]
milanj has joined #lisp
<|3b|>
problem is what happens if you get another request to run a user script while that one is running
<_death>
jmercouris: the point is that you have your own scheduler, not the operating system's, and you don't need threads to achieve multitasking, and this can be simpler for the modules.. even if you actually want preemptive multitasking, threads may be too low-level.. channels/queues have been mentioned..
<jmercouris>
That's fine, it should launch a new thread
<|3b|>
so 2 running at once?
<jmercouris>
|3b|: Yes, why not?
<|3b|>
"the more I think that all processing should block on user scripts" suggests it shouldn't
<|3b|>
script1 thread is running => blocked so don't run script2 yet
<jmercouris>
I'm just afraid of turning into Emacs and being super slow
<jmercouris>
though that is the simplest model to program
<jmercouris>
I just meant that all invokations of some command should be blocking for and serially on their own threads
<jmercouris>
for example if Command A requires some network IO that blocks, fine, no problem, it is on its own thread
<jmercouris>
if command B is simultaneously blocked waiting on user input, again, no problem, on their own threads
<|3b|>
ok, for that you probably want a thread per command (or more likely a thread pool, so you don't create threads for tiny things)
<jmercouris>
|3b|: Yeah, that's what I've been trying to say :D
milanj has quit [Client Quit]
<jmercouris>
|3b|: So what do you think though, sjl macro way, or thread pool way?
<jmercouris>
Maybe I'll start with the sjl macro way as it will be easy to integrate into my system, and try the thread pool on an experimental branch after the GTK release
<jmercouris>
_death: Why do you think threads are too low level?
<jmercouris>
_death: Is there a lot of overhead in CL? do lightweight threads exist in CL?
<|3b|>
CL doesn't have a concept of threads (or processes)
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
<|3b|>
most implementations use OS threads
* |3b|
thinks cmucl does/did something else, not sure how it compared though
Achylles has joined #lisp
red-dot has joined #lisp
<|3b|>
macro to do CPS transform seems reasonable though, if it handles your use case
<jmercouris>
_death: On the other hand a scheduler souds like a lot of work
<jmercouris>
|3b|: Yeah, I don't have to cover the general cas at this time with the CPS, just input, if in time I find users writing commands with other blocking operations, then the thread pool solution may make sense
<|3b|>
either way you might need to be careful with any interaction scripts might make with shared state (like page contents), though amount and type of care probably differs
<_death>
jmercouris: oh it's just hard, bitter experience.. there are powerful abstractions that are much simpler to use for most purposes.. see lparallel's for example
heurist` is now known as heurist
zooey has quit [Ping timeout: 248 seconds]
<|3b|>
which now that i think about it might be a problem with hidden CPS transforms, might not interact as expected with specials or with-foo macros
<jmercouris>
shka: look for string: read-string prompt initial history default inherit
<jmercouris>
see that? code WITH LOGIC is nested within some code WITH USER INPUT
<jmercouris>
unless there's some deep magic I'm not understanding going on under the hood
<|3b|>
in particular "Minibuffer input is a special kind of recursive editing."
quazimodo has quit [Ping timeout: 256 seconds]
<shka>
jmercouris: why do you expect gui to freeze?
<jmercouris>
because the statement collecting the input cannot return until the input is satisfied
<jmercouris>
|3b|: Where do you see that line?
<shka>
call-interactively ?
<|3b|>
in the link i pasted to Recursive-Editing page in emacs manual
<shka>
jmercouris: thing is, there is plenty of ways to deal with this issue
<|3b|>
so main loop calls user elisp code, elisp code calls function to get input from minibuffer, that runs a new copy of the main loop, which runs until it has full input, then exits that instance of main loop back to user function, which does whatever then returns back to outer main loop
<jmercouris>
|3b|: Seems quite convoluted, that also explains the trouble with only having 1 minibuffer at at ime
<|3b|>
yeah, not sure i'd suggest that strategy for new code
<|3b|>
(though not sure if i have any specific objections to it either)
<jmercouris>
I guess for now the macro is okay, with some caution to end users about how it works
<jmercouris>
and still later on move to either thread pool, or self scheduling/event loop stuff
<jmercouris>
I'm sure I will change my mind a million times until then, but the macro is a very good "interim" solution
<jmercouris>
or maybe "green-threads" which _death suggested, if that turns out to be a good idea, not sure
<|3b|>
don't forget to think about what happens if someone hits a hotkey that calls a user script while entering response to a prompt from a user script :)
<jmercouris>
|3b|: Yeah, I haven't tried that yet even in my current implementation, le tme see what happens
<_death>
3b: I think such manifestation of recursive editing is disabled by default in emacs because it can be confusing, no?
<|3b|>
_death: which?
<jmercouris>
seems my current implementation handles it just fine, it simply "cancels" the previous operation and works on the new one
<_death>
for example M-x M-x
<jmercouris>
Yeah, I will disable that permanently because I think it's a terrible idea
sz0 has joined #lisp
<jmercouris>
e.g. I will not implement it :D
<jmercouris>
I think the problem/solution space is pretty clear to me now mentally, once again, thank you all for your inputs
knobo1 has quit [Read error: Connection reset by peer]
<_death>
did you unblock
shka has quit [Ping timeout: 265 seconds]
vaporatorius has quit [Quit: Leaving]
<jmercouris>
_death: Did I unblock what?
Ven`` has quit [Read error: Connection reset by peer]
<_death>
yourself, after we entered our inputs to your mind
Ven`` has joined #lisp
<jmercouris>
_death: Ah yes, indeed :)
pedh has joined #lisp
<_death>
*mindbuffer
scymtym has joined #lisp
<_death>
guess it's a M-joke
<jmercouris>
_death: There's no joke key, it'd be more like M-x joke
<jmercouris>
(defun joke () (interactive) (...))
pedh has quit [Ping timeout: 240 seconds]
sellout has quit [Ping timeout: 248 seconds]
sellout has joined #lisp
<jasom>
jmercouris: what lame keyboard are you using that has no joke key?
sellout has quit [Ping timeout: 240 seconds]
sjl has quit [Ping timeout: 264 seconds]
LocaMocha is now known as TamePikachu
jdz has quit [Ping timeout: 255 seconds]
tom34 has joined #lisp
Kundry_Wag has quit [Remote host closed the connection]
Kundry_Wag has joined #lisp
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
tom34 has quit [Ping timeout: 256 seconds]
red-dot has joined #lisp
moei has quit [Quit: Leaving...]
quazimodo has joined #lisp
Kundry_Wag has quit [Ping timeout: 240 seconds]
Oddity has quit [Ping timeout: 260 seconds]
pedh has joined #lisp
<jmercouris>
jasom: some cherry keyboard I found on amazon
<jmercouris>
it was hard finding an american layout keyboard in germany
<jmercouris>
I've remapped M-x to S-SPC
<jmercouris>
I mean s-SPC*
pedh has quit [Ping timeout: 240 seconds]
<rme>
I once had to try to use a French keyboard instead of a US keyboard, and I just could not type at all.
tom34 has joined #lisp
<pjb>
rme: that said, only A<->Q, W<->Z, and ;<->M are swapped.
<pjb>
rme: that is, for text, you could do it; it's when it comes to programming that it gets harder, with all the special characters and digits in different places.
<rme>
numbers and parens are elsewhere, too
<rme>
right
rlp10 has joined #lisp
<rme>
It'd be nice to have é and è keys when typing French, but using dead keys on a US keyboard is good enough for me.
Bike has quit [Ping timeout: 260 seconds]
drewc has quit [Quit: Leaving]
Ven`` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<pjb>
rme: not really: you don't type only French; you can type any number of languages, so it's much better to have dead-keys and be able to compose all the accents. Also, on the AZERTY layout there's this ù key that is used only in ONE word in French! (où = where; ou = or).
<pjb>
Yes, I use erc; there are several irc client for emacs.
<pjb>
also, the topic should be the first thing displayed when you join a new channel…
wxie has quit [Quit: Bye.]
Achylles has quit [Quit: Leaving]
attila_lendvai has joined #lisp
<rlp10>
Oh it makes sense now. When you said I had a strange "erc client", you meant that I had a strange "IRC client". You would recommend ERC, which is what you use.
Murii has quit [Ping timeout: 240 seconds]
<pjb>
oh, sorry, yes I meant IRC; but since I use erc, it mistype that often.
<pjb>
and phoe ported it, and it's now in quicklisp.
<rme>
Oh, I didn't know that.
<rme>
(that it had been added to quicklisp, that is)
hexfive has quit [Quit: WeeChat 1.9.1]
pedh has joined #lisp
ChadMcNugget has joined #lisp
lerax has joined #lisp
Karl_Dscc has quit [Remote host closed the connection]
<lerax>
Hey guys, how work adding a independent software distribution on QuickLisp? There is some place with this well documented? I didn't find on the main page of quicklisp official website.
<lerax>
"You will be able to make your own private repositories of Quicklisp software (called dists), but it's not documented right now. "
<lerax>
Well... this doesn't help too much.
<lerax>
But thanks.
rumbler31 has quit [Ping timeout: 256 seconds]
<earl-ducaine>
I think the bigest criteria are: 1) make sure everything is free and you have basic project info set up; 2) make sure that the project build under quicklisp using the :verbose t setting; 3) make sure that it runs under at least 2 (preferably more) Lisps, eg. CCL and SBCL
<lerax>
(I'm no trying publishing a package, but creating a private "channel" distribution of personal softwares)
<earl-ducaine>
Oh... haha... ic.
<lerax>
* I'm not *
<lerax>
Yes, I know.
<lerax>
I have a published package on Quicklisp already. The problem is another thing.
<earl-ducaine>
Just wanted to make sure you weren't missing the easy solution.
<lerax>
Yes, thanks for your attention!
<lerax>
This is just curious for me because I didn't find any documentation about that. There is some blog or repo about that, but completly outdated and obscure.
<lerax>
But I was expecting (as always) a better documentation about that. But if doesn't exists, I'm ok with that. There is the reason I asked here instead... well, there is no much choice when you didn't find something.
tom34 has quit [Ping timeout: 240 seconds]
<earl-ducaine>
definitely, having experimental/unstable elpa packages has turned out to be very productive for the emacs community.
<lerax>
Yes, like melpa.
<lerax>
I use, I like it.
<Xach>
lerax: i am working on documentation
<Xach>
i think gigamonkey wrote a dist-creating project, too, a few years ago
<lerax>
Xach: good to know! I'll be glad reading it :)
<lerax>
Xach: this is interesting, I'll make a search later.
nonlinear has joined #lisp
<Xach>
it is not super complex (i don't think) but it is not written down anywhere but in code
turkja has joined #lisp
<Shinmera>
You can make dists with quickdist.
<Xach>
as previously mentioned
red-dot has joined #lisp
<Shinmera>
Oh, missed that message. My bad.
<emaczen>
wow, I'm having a horrible day if I couldn't think of #'find-package...