danielxvu has quit [Remote host closed the connection]
suskeyhose has quit [Ping timeout: 245 seconds]
Kaisyu has joined #lisp
Pixel_Outlaw has joined #lisp
suskeyhose has joined #lisp
SaganMan has quit [Ping timeout: 250 seconds]
jasmith has joined #lisp
asarch has joined #lisp
kajo has quit [Ping timeout: 252 seconds]
eddof13 has quit [Ping timeout: 240 seconds]
brettgilio has quit [Quit: Konversation terminated!]
mindCrime has joined #lisp
meepdeew has joined #lisp
elfmacs has joined #lisp
serichsen has quit [Ping timeout: 252 seconds]
razzy has quit [Ping timeout: 252 seconds]
foom2 has quit [Remote host closed the connection]
foom has joined #lisp
nullniverse has joined #lisp
P1RATEZ has quit []
mindCrime_ has joined #lisp
mindCrime has quit [Ping timeout: 240 seconds]
megalography has joined #lisp
nowhere_man has quit [Read error: Connection reset by peer]
nowhere_man has joined #lisp
igemnace has joined #lisp
slyrus1 has joined #lisp
kdas_ is now known as kushal
nowhere_man has quit [Remote host closed the connection]
pierpal has joined #lisp
nowhere_man has joined #lisp
lyf[kde] has joined #lisp
quazimodo has quit [Ping timeout: 240 seconds]
megalography has left #lisp [#lisp]
<stylewarning>
aeth: reducing repetition for the sake of it leads to very bad code
<lyf[kde]>
[style warning]
<stylewarning>
;)
buffergn0me has joined #lisp
elfmacs has quit [Ping timeout: 252 seconds]
mindCrime_ has quit [Ping timeout: 245 seconds]
atgreen__ has quit [Remote host closed the connection]
atgreen__ has joined #lisp
shlemas has quit [Quit: shlemas]
<lyf[kde]>
What are some ways to implement call/cc in a imperative language?
<lyf[kde]>
Using CSP, I can wrap the continuations, to implement event loops and to optimize tail calls, but CSP is handly only when it comes to tail calls.
Roy_Fokker has quit [Read error: Connection reset by peer]
<no-defun-allowed>
that looks hackish as all fuck
<lyf[kde]>
yeah... when programs panic they crash
<lyf[kde]>
compiling with optimization could break it
<no-defun-allowed>
panic! is pretty much "all shit went south" so it seems like a bad idea to reuse that for normal program flow
razzy has joined #lisp
<Bike>
"Implementation Strategies for First-Class Continuations" is also informative
<Bike>
it basically amounts to what you can do with the stack
makomo has quit [Ping timeout: 246 seconds]
<lyf[kde]>
I can use a stack (collection) explicitly
<Bike>
huh?
<Bike>
like, the call stack. languages don't usually let you fuck with it arbitrarily.
brettgilio has quit [Read error: Connection reset by peer]
<lyf[kde]>
Stack as in BFS, DFS... In DFS you have a todo queue. In BFS you have a todo stack. You can also implement DFS as a recursive function without the todo collection.
ealfonso has joined #lisp
<Bike>
you can use an explicit stack in a limited context to do something like continuations, s ure
dddddd has quit [Read error: Connection reset by peer]
warex has joined #lisp
lrx33 has joined #lisp
nullniverse has quit [Ping timeout: 246 seconds]
eschulte_ has quit [Ping timeout: 252 seconds]
Bike has quit [Quit: Lost terminal]
ealfonso has quit [Ping timeout: 250 seconds]
shifty has quit [Remote host closed the connection]
igemnace has quit [Remote host closed the connection]
lyf[kde] has quit [Quit: Konversation terminated!]
razzy has quit [Ping timeout: 240 seconds]
shka_ has joined #lisp
_whitelogger has joined #lisp
ealfonso has joined #lisp
<beach>
Good morning everyone!
mathrick has quit [Ping timeout: 250 seconds]
Inline has quit [Quit: Leaving]
mathrick has joined #lisp
sauvin has joined #lisp
<no-defun-allowed>
Hi beach
brettgilio has joined #lisp
graphene has quit [Remote host closed the connection]
iskander has joined #lisp
graphene has joined #lisp
<ebrasca>
Hi beach
bigfondue has quit [Ping timeout: 255 seconds]
brettgilio has quit [Quit: Konversation terminated!]
graphene has quit [Remote host closed the connection]
<aeth>
stylewarning: It depends. If it's something like shortening names to make them easier to type, that usually makes things worse, just get some form of autocomplete. But if it's removing a variable, that often makes the code clearer imo.
<Shinmera>
Xach: Yes, I'll fix once I'm out of bed
ealfonso has quit [Remote host closed the connection]
sz0 has joined #lisp
<aeth>
stylewarning: mapcar itself is sort of an example of this. It's basically just maplist where you're calling car on every variable.
<aeth>
a one variable version could be implemented as trivially as: (defun mapcar* (function list &rest more-lists) (declare (ignore more-lists)) (maplist (lambda (x) (funcall function (car x))) list))
bigfondue has joined #lisp
<no-defun-allowed>
Xach: who would win in a fight: you or xahlee?
montxero has joined #lisp
figurehe4d has quit [Quit: Leaving]
anunnaki is now known as vertigo
vlatkoB has joined #lisp
<Shinmera>
Xach: Hopefully fixed now.
doubledup has joined #lisp
housel has quit [Remote host closed the connection]
asarch has quit [Quit: Leaving]
suskeyhose has quit [Remote host closed the connection]
Lord_Nightmare has quit [Ping timeout: 252 seconds]
<slyrus1>
It would be great if all of these were combined into one library/suite that could read and write icalendar/vcard and talk to caldav/carddav servers.
<Shinmera>
I knew about that one, but it's incomplete and undocumented
<Shinmera>
Sure, PRs are welcome, of course
<slyrus1>
soiree does parsing but not serializing, iclendar looks like it does serialzing but not parsing...
<Shinmera>
iclendar also does validation
arbv has quit [Read error: Connection reset by peer]
jack_rabbit has quit [Ping timeout: 260 seconds]
mange has quit [Remote host closed the connection]
jack_rabbit has joined #lisp
scymtym has quit [Ping timeout: 252 seconds]
Bronsa has joined #lisp
caltelt has quit [Ping timeout: 245 seconds]
astalla has joined #lisp
buffergn0me has quit [Ping timeout: 260 seconds]
scymtym has joined #lisp
lieven has joined #lisp
warex has quit [Ping timeout: 245 seconds]
<hjudt>
i have a design question: i am developing a web application which reads data from a hash-table. The hash-table gets updated (on demand), this process is usually very fast. nothing else writes to that hash table except the update method. do i still need to protect the hash-table with locking in every place it gets accessed? is there a better solution? i need a data structe like a hashtable because lookup would
<hjudt>
otherwise be slow.
<phoe>
hjudt: what's your implementations?
makomo has joined #lisp
<phoe>
some implementations have synchronized hash tables that are good for concurrent acccess.
<hjudt>
so wich :synchronized t i don't have to care about locks anymore?
<phoe>
hjudt: T
<hjudt>
thanks
<phoe>
you can simply #'(SETF GETHASH) and all the synchronization is going to happen in the background
<hjudt>
that's great.
<jackdaniel>
mind that despite transparency you still hit the protection penalty
<jackdaniel>
so writes / reads will be a little slower
l1x has joined #lisp
<phoe>
yep, nothing in the world is for free except for segfaults
zfree_ has quit [Quit: zfree_]
smokeink has quit [Ping timeout: 252 seconds]
kini has quit [Remote host closed the connection]
lumm has joined #lisp
kini has joined #lisp
Kaisyu has quit [Quit: Connection closed for inactivity]
razzy has joined #lisp
serichsen has quit [Ping timeout: 240 seconds]
random-nick has joined #lisp
steiner has quit [Remote host closed the connection]
steiner has joined #lisp
<Xach>
Shinmera: very good
<no-defun-allowed>
Hi Xach
jack_rabbit has quit [Ping timeout: 250 seconds]
lavaflow has quit [Ping timeout: 252 seconds]
<no-defun-allowed>
What do you think the odds are of you beating xahlee in a fight?
<Xach>
no-defun-allowed: I don't think that is a fruitful topic of discussion.
<shka_>
what is the best way to transfer error between threads?
<phoe>
shka_: you mean a condition?
<phoe>
what do you mean, transfer?
jack_rabbit has joined #lisp
<shka_>
well, condition
<phoe>
so one thread blocks until the second thread handles the condition originating in the first thread?
<phoe>
or is it "fire and forget" where the thread does whatever after "sending" the condition object to a different thread?
<shka_>
phoe: thread1 waits for thread2 to finish, thread2 signals error, thread1 has logic to handle error
<shka_>
ideally thread2 should wait for thread1 to decide what it is supposed to do
<phoe>
shka_: any kind of message passing should do
<shka_>
that does not help to be honest, but ok
<phoe>
thread2 has a handler that sends the condition object to thread1 and blocks waiting for response, thread1 sends the "result" of how to handle error back to thread2, thread2 reacts accordingly
m00natic has joined #lisp
<shka_>
phoe: eh
<shka_>
that is literally scenario i described
<phoe>
I don't recall any library that does that behavior
<phoe>
yep
<phoe>
I could imagine it implemented using some simple queues or something like that
<shka_>
i think i will just take lparallel queue for that
<shka_>
i am always using lparallel so it is loaded anyway
<no-defun-allowed>
Xach: I think it's an important question.
<phoe>
no-defun-allowed: it's pretty off-topic here, you could try #lispcafe
<phoe>
interpersonal brawls aren't Lisp-related in the slightest
<no-defun-allowed>
Xach isn't there though and I already asked there
<Shinmera>
Then you'll just have to put up with it.
<phoe>
you could always ask him in private.
<phoe>
and if he doesn't respond, well, no one forces him to.
<no-defun-allowed>
Fair enough
<jackdaniel>
shka_: I don't understand the use case here -- why would you handle error in parent thread instead of a child thread?
<shka_>
jackdaniel: because otherwise i will need user to know details about internal implementation
<phoe>
I still don't understand it
<phoe>
what is the user doing that they can't handle errors on their own?
<zigpaw>
maybe you could want to handle errors in an aggregate manner probably? (in some algorithms, where only a significant percent of errors require automatic reaction), but even then you can do it on the same thread and just pass the counter to error-handling thread (supervisor).
<jackdaniel>
I mean why do you want something like (handle-thread (fork (error "hi"))) instead of (fork (handle-thread (error "hi"))) ?
<zigpaw>
so having something like producer-consumer, between failing threads and error-handling thread?
<shka_>
jackdaniel: basicly
<shka_>
zigpaw: that's pretty strong assumption
orivej has joined #lisp
<shka_>
i think that i can copy transfer-error restart from lparallel
shrdlu68 has joined #lisp
* jackdaniel
wonders whenever "basicly" was an answer of something bigger is comming
<jackdaniel>
s/of/or/
<shka_>
jackdaniel: answer, in summary this is what i want
<jackdaniel>
ah, so you are fixed on your left-grabbing-right-pocket mindset. in that case I won't interfere
<zigpaw>
shka_ : more like just an idea I got for such a use case, it is not exhaustive. In most cases I can think of I don't see such architecture needed.
<shka_>
*sigh*
rozenglass has joined #lisp
<shka_>
anyway, i think lparallel has it all figured out so i will just check it out
<shka_>
zigpaw: essentially i have library that introduces RANGES (like iterators, just with few extra elements)
<shka_>
i have operations that can produce ranges, i have algorithms that work on those
<shka_>
i have ranges that alter how algorithm works (like group-by)
<shka_>
essentially this often boils down to constructing pipes out of ranges
<shka_>
if i could introduce way to allow part of pipe to run on separate thread, i could speed up few use cases
<zigpaw>
ah, I see.
<zigpaw>
if one fails everything fails?
<shka_>
well, yes
<shka_>
but there are restarts
<shka_>
so signaling condition may not lead to auto-fail
<shka_>
so ideally, i want transfer error to parent thread
pierpal has quit [Quit: Poof]
pierpal has joined #lisp
<shka_>
because range can be constructed by internal function and user can't do anything with that
<shka_>
and also it is slightly more convinient
Kevslinger has quit [Quit: Connection closed for inactivity]
<zigpaw>
yeah, that seems a reasonable use-case. but probably you'll have to catch the condition on the failing thread and pass that somehow to the parent thread. That is the one thing I don't like in most impl of threads in various oses, the child doesn't know their parent. Some languages do have easier to use constructs for parent-child communication, lik
<zigpaw>
e erlang or go with their channels, I'm quite sure CL have those too but I'm not that good in CL to have any experience in this regard (and I don't know about overhead which it surely have).
steiner has quit [Read error: Connection reset by peer]
<shka_>
well, condition is signalled there should not be extra cost involved
<shka_>
*if condition is not signalled
razzy has quit [Ping timeout: 240 seconds]
<zigpaw>
I mean for inter-thread communication that you would probably need to establish for each and every thread.
steiner has joined #lisp
<zigpaw>
or rather between parent and each thread.
mange has joined #lisp
razzy has joined #lisp
<shka_>
zigpaw: i already have a queue, i can transfer over it
<zigpaw>
great, then you are probably all set up :-) at the end you may even wrap it into a function/macro and have it ready as a multi-purpose thing?
<zigpaw>
maybe useful for others too :)
pierpal has quit [Quit: Poof]
pierpal has joined #lisp
<shka_>
eh, maybe
quazimodo has joined #lisp
zfree has joined #lisp
jack_rabbit has quit [Ping timeout: 250 seconds]
jack_rabbit has joined #lisp
dddddd has joined #lisp
Denommus` has joined #lisp
scymtym has quit [Ping timeout: 260 seconds]
Denommus has quit [Ping timeout: 252 seconds]
trittweiler has quit [Remote host closed the connection]
Kevslinger has joined #lisp
nckx has quit [Quit: Updating my GNU GuixSD server — gnu.org/s/guix]
brettgilio has joined #lisp
nckx has joined #lisp
Bike has joined #lisp
lumm has quit [Ping timeout: 260 seconds]
mange has quit [Ping timeout: 240 seconds]
lumm has joined #lisp
lumm has quit [Client Quit]
Lycurgus has joined #lisp
lumm has joined #lisp
Bronsa has quit [Remote host closed the connection]
Bronsa has joined #lisp
Cymew has quit []
lavaflow has joined #lisp
lavaflow has quit [Ping timeout: 252 seconds]
orivej has quit [Ping timeout: 240 seconds]
mindCrime_ has joined #lisp
<AeroNotix>
First time thinking I might need eval-when. I have some constant values that are a pain to write out in full. I can write a small piece of code to create them instead. Do I want to use eval-when :compile to compute the constants at compile time or shall I choose a different method?
<phoe>
AeroNotix: are they very, very constant?
<phoe>
if yes, you might want to use the #. notation to evaluate them at read-time
<AeroNotix>
Sharpsign (as in clhs) sounds like a bloody transformer or something
<AeroNotix>
SHARPSIGN, transform and ROLL OUT
<phoe>
(roll-out (transform #\#))
<AeroNotix>
:)
anewuser has joined #lisp
pjb has quit [Remote host closed the connection]
pjb has joined #lisp
mindCrime has joined #lisp
mindCrime_ has quit [Ping timeout: 252 seconds]
Copenhagen_Bram has quit [Ping timeout: 252 seconds]
brettgilio has quit [Quit: Konversation terminated!]
trittweiler has joined #lisp
nowhere_man has quit [Ping timeout: 252 seconds]
mindCrime has quit [Ping timeout: 240 seconds]
quazimodo has quit [Ping timeout: 252 seconds]
pjb has quit [Remote host closed the connection]
quazimodo has joined #lisp
gector has quit [Ping timeout: 245 seconds]
pjb has joined #lisp
gector has joined #lisp
lrx33 has quit [Remote host closed the connection]
makomo_ has joined #lisp
sauvin has quit [Ping timeout: 252 seconds]
makomo has quit [Ping timeout: 246 seconds]
scymtym has joined #lisp
lavaflow has joined #lisp
lavaflow has quit [Ping timeout: 250 seconds]
papachan has joined #lisp
trittweiler has quit [Ping timeout: 246 seconds]
jkordani_ has joined #lisp
<russellw>
What's the naming convention for variants? Like if I have a function named foo, and I want to create another function similar to it but slightly different, so a slight variant of the name, that would be foo' in ML?
<Xach>
russellw: there is no standard convention. appending * is sometimes used sometimes.
jkordani has quit [Ping timeout: 240 seconds]
<russellw>
Xach, thanks!
<phoe>
russellw: like let and let*
<russellw>
phoe, good point
pjb has quit [Remote host closed the connection]
cage_ has joined #lisp
<Xach>
Someone I know used unicode prime
<Xach>
It felt like a cheeky pun
<russellw>
:)
<phoe>
like, uh
<phoe>
unicode prime?
<phoe>
...
<phoe>
let′
<phoe>
this is absolute evil
<phoe>
`(let′.,@foo)
<phoe>
and suddenly we have perl
jack_rabbit has quit [Ping timeout: 250 seconds]
jtecca has joined #lisp
Copenhagen_Bram has joined #lisp
jtecca has quit [Remote host closed the connection]
mindCrime has joined #lisp
lumm has quit [Quit: lumm]
jmercouris has joined #lisp
steiner has quit [Remote host closed the connection]
<AeroNotix>
It's filled with that kind of sentiment. Quite funny since nowadays I tend to see far more non-American lispers
<AeroNotix>
"If there is to be only one ISO Lisp, we could fight to make it Common
<AeroNotix>
Lisp (as defined by us),
<AeroNotix>
"
<AeroNotix>
lord almighty
<phoe>
"it didn't occur to me that the LeLisp and Cambridge Lisp people, with a combined user community of maybe 50 people, might have such an influence."
<phoe>
(;
<AeroNotix>
in that context us == americans
<isoraqathedh>
Yeah, nowadays Lispers seem to be mostly Europeans and surprisingly Japanese.
<isoraqathedh>
I have no idea how the latter came in.
<Xach>
AeroNotix: lots of money was at stake
<jkordani_>
hey there are like 5 US lispers come on now
<shrdlu68>
Well one of the very first implementations (albeit pre-ANSI) was Japanese.
<AeroNotix>
Who is this "RPG" guy? Sounds like an utter knob
<Xach>
Peter Seibel's talk on the topic remains a great resource
<Xach>
AeroNotix: richard p. gabriel
<varjag>
i'm afraid if rpg is not to your liking you are really in the wrong community :)
<AeroNotix>
varjag: the language exists separately from the community in most respects. I see a lot of rpg-isms in this channel regularly. I can ignore it. Though, despite ignoring it, I can still classify it=.
<varjag>
i think you read between the lines too hard
<mason>
AeroNotix: It shouldn't, but seeing what look like modern, well-formed emails from 1986 seems odd. :)
SaganMan has quit [Ping timeout: 240 seconds]
<varjag>
like it or not, common lisp is a language out of darpa and american academia
<varjag>
iso lisp was utter failure as predicted in the email
varjag has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
<AeroNotix>
Something like CL was inevitable. No matter where it came from
<russellw>
You can read one thing from the current input stream with (read). But suppose what you want is to read as many things as are in the input stream, up to the end of file; how do you do that? Experiment so far says trying to read when there is end of file is an error
NB0X-Matt-CA has quit [Excess Flood]
<Xach>
russellw: READ has an option to return a particular object rather than signal an error
<shrdlu68>
russellw: :eof-error nil
<russellw>
aha! thanks!
<Xach>
russellw: one trick is to use the stream object itself, which is something that READ would normally not return (NIL is usually a bad choice because NIL is a pretty normal thing to READ)
<isoraqathedh>
And then :eof-value would let you specify a sentinel value you want.
<russellw>
good point!
<isoraqathedh>
Honestly any unreadable object would do.
shrdlu68 has left #lisp ["hometime"]
NB0X-Matt-CA has joined #lisp
chipolux has quit [Quit: chipolux]
<Xach>
yes. the stream is simply conveniently close to hand.
chipolux has joined #lisp
lavaflow has joined #lisp
SaganMan has joined #lisp
<jkordani_>
Xach: I like that
<dlowe>
it'd be neat if loop had an until-error clause that gracefully exited the loop.
<dlowe>
(loop until-error eof-error do collect (read stream))
<dlowe>
er, s/do //
<jackdaniel>
mit-derived loop is extensible, go ahead! :-)
<dlowe>
would be easier to extend iterate
<phoe>
intercal-loop
<phoe>
(LOOP FOR i FROM 0 TO 40 PLEASE DO (print i))
<oni-on-ion>
oh gosh, the ethics of programming, if computers and devs and runtimes etc had manners and forms of speech!
<jackdaniel>
there is shakespear language
<oni-on-ion>
if it would please you, sir, it would be best to create an object, and it would be especially convenient if this were an array of size 20, but thats cool if you can't
FreeBirdLjj has joined #lisp
FreeBirdLjj has quit [Remote host closed the connection]
<AeroNotix>
oni-on-ion: not what I was even talking about.
<oni-on-ion>
some form of optimization too; hurry! sum this list asap! or else ur fired
FreeBirdLjj has joined #lisp
lumm has joined #lisp
<oni-on-ion>
AeroNotix: i didnt see what you were talking about sorry. im responding to phoe's code line there.
<russellw>
CCL when my program contains an error, spits out five screens of output when I really just want the first couple of lines. What's the best way to get just the first couple of lines?
<jkordani_>
russellw: got a paste?
<Xach>
russellw: are you using Clozure CL directly? (not mediated by slime or something like it)
<russellw>
jkordani_, one moment
<russellw>
Xach, yes
<russellw>
hmm, in the process of trying to capture the output for paste, I discovered it sends the first two lines to stderr and the rest to stdout. Which in itself suggests a way to separate them. But to proceed with paste anyway
<Xach>
The clozure cl debugger is usually not very verbose, so it may be something else producing a bunch of output.
<Xach>
Oh, one option would be to not run things in batch, but interactively and iteratively develop things, and then (if needed) make changes for batch purposes.
Lycurgus has quit [Quit: Exeunt]
<Xach>
russellw: I don't know the shortcut to get what you want right away
<Xach>
russellw: there may be one. but the reason it prints that stuff in batch mode is there is no way to get it in another way, because the program is over.
<russellw>
Xach, my number one criterion for choosing a programming language is ability to run things in batch; I find that so much more productive
<Xach>
russellw: more productive than interactively and incrementally?
<russellw>
yes
<Xach>
Ok. That's not my experience, and it isn't typical for Common Lisp development.
<dlowe>
russellw: can you expand on that? How batched are we talking here?
<russellw>
If you find interactive/incremental works better for you, then by all means you should do things the way you find best!
<shka_>
hmmm
<Xach>
Mikel Evins had an analogy that matched my experience - working with languages like Smalltalk or Common Lisp is like teaching an eager assistant how to get the job done. Other environments are more like developing a recipe or set of plans to hand off.
<russellw>
dlowe, I write my program as a set of text files, and each time I want to test it, I type a command in the command line
varjag has joined #lisp
<shka_>
well, you kinda can use cl like it is C
<Xach>
russellw: what do you view as the opposite, unproductive mode?
<russellw>
shka_, yes that's exactly what I want to do
<_death>
Lisp programmers write their programs as a set of functions, and when they want to test them they type a form in the REPL
<dlowe>
russellw: I wrote CL like that for a while
<russellw>
Xach, yes
wigust has joined #lisp
<shka_>
well, actually i do that as well, but just to run unit tests
<shka_>
so there will be no accidental passes
<Xach>
shka_: best to reboot first too.
elfmacs has quit [Ping timeout: 240 seconds]
<jackdaniel>
unless you distribute binaries as if in save-lisp-and-die, it might be worth to restart image and try to load your application (even without reboot:)
<jackdaniel>
some could argue, that clean deployment should be done from environment, where asdf doesn't have access to personal repositories too
<shka_>
Xach: reboot is a joke, right?
<Xach>
shka_: yes. of course you use docker instead to weaponize rebooting.
housel has joined #lisp
<mason>
Heh. Weaponized rebooting. /me squirrels it away.
FreeBirdLjj has quit [Remote host closed the connection]
quazimodo has quit [Ping timeout: 240 seconds]
quazimodo has joined #lisp
astalla has quit [Ping timeout: 245 seconds]
azimut has quit [Ping timeout: 240 seconds]
Inline has joined #lisp
FreeBirdLjj has joined #lisp
makomo_ has quit [Quit: WeeChat 2.2]
makomo has joined #lisp
azimut has joined #lisp
charh has joined #lisp
<razzy>
Weaponised rebooting, Courtesy of microsoft.
LiamH has joined #lisp
MetaYan has joined #lisp
<fouric>
*ahem ahem*secure boot*ahem*
<razzy>
"in more ways than you can imagine" dam dam dam *sinister music playing*
anewuser has quit [Read error: Connection reset by peer]
buffergn0me has joined #lisp
oystewh has joined #lisp
m00natic has quit [Read error: Connection reset by peer]
Bronsa has quit [Ping timeout: 252 seconds]
buffergn0me has quit [Ping timeout: 250 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
jmercouris has joined #lisp
karstensrage has joined #lisp
FreeBirdLjj has joined #lisp
Denommus` has quit [Ping timeout: 244 seconds]
shka_ has joined #lisp
pjb has joined #lisp
<razzy>
anyone tried hard-real-time scheduling with any lisp?
<pjb>
razzy: you ask this as if it was difficult.
<jackdaniel>
hard real time guarantees *are* difficult to achieve
<jackdaniel>
no matter the language
<pjb>
In lisp you would want an implementation that offers real-time guarantees with the garbage collector for example.
<jackdaniel>
if it is lisp, you have a gc puzzle to solve (though it's something possible to overcome from what I've heard)
<pjb>
Or at least, an implementation where you can disable (temporarily) the garbage collector.
<pjb>
The later is more common than the former.
<pjb>
You could become instant lisp hero, by implementing a real-time garbage collector in some CL implementation (eg. sbcl or ccl).
<razzy>
hmm :]
zfree has quit [Quit: zfree]
<pjb>
Now, while there's little guarantee, you could study the GC algorithms used, and compute an upper limit to the time spent by the GC, given the memory size.
<pjb>
Say that a GC on a given system cannot take more than 2 seconds top.
<pjb>
Then you can giev hard-real-time guarantee, on the order of the minute.
<razzy>
I will add "becoming a hero" to the if-i-get-bored list thx all
<pjb>
The point here is that hard-real-time is parameterized by a response time, and this response time doesn't need to be small.
<razzy>
but you qarantee the response
<pjb>
Yes.
<razzy>
you typically decrease minimum time by adding computin power
<pjb>
For example, you get a telemetry packet from a sonde on Mars. You guarantee that you can answer back command in one hour ± 30 second. top
orivej has quit [Ping timeout: 250 seconds]
<razzy>
or send back error message
<pjb>
Perhaps it would be better to ask for a given application.
<pjb>
We could tell if it would look hard or easy to achieve your time constraints.
<razzy>
i was loking for lisp schedulers in general
<razzy>
and if some are hard-real-time
<razzy>
i can get away without realtime, but it would make my life easier
<pjb>
Have a look at com.informatimago.common-lisp.cesarum.activity ; there are others in quicklisp too.
<pjb>
Notably, CL provides you with 3 time bases: universal-time, real-time and run-time.
<pjb>
So you can do scheduling in real-time.
<razzy>
wow, CL is a monster
<razzy>
pjb: link not working
jmercouris has quit [Ping timeout: 240 seconds]
<pjb>
razzy: note that real-time and run-time are given in more precise increments than universal-time, but they're not based on a specific epoch. I have code to adjust them to the same epoch as universal-time.
<pjb>
Not a link.
<pjb>
It's the name of a package. It is assumed you already have installed my code.
<pjb>
You can use queues, mailboxes, global variables, whatever.
<shka_>
ok, i think that i am missing something here
<pjb>
Now, in the other thread, dyou don't need a hander-bind, you can just handle the condition when you receive it. Since it must return the result and send it back to the original thread for handling by handler-bind.
jmercouris has joined #lisp
<shka_>
pjb: just one question: do you think that i can make interactive restarts thread-transparent?
<pjb>
You cannot do the non-local jump in this other thread.
lumm has joined #lisp
jmercouris has quit [Remote host closed the connection]
<shka_>
oh, ok
<shka_>
so i was not wrong
<pjb>
Well, implementations usually do it the other way: they allow several thread to be in the debugger, and the user may switch the debugger UI from one thread to the other.
<shka_>
i should go to sleep
<pjb>
But you could do it like you want. You only would have to collect the restarts in the debugged thread,a nd pass them along with the condition, to let the debugger thread do the UI, and return back the decision.
<pjb>
shka_: have you read beach's document on debugger?
<shka_>
not yet
<pjb>
It may help.
<shka_>
right
<shka_>
collect-restarts trick is exactly what lparallel is doing
<pjb>
You must distinguish the debugged/handler-bind thread, and the debugger (UI) thread.
<shka_>
obviously
<shka_>
debugger shows up in slime-threads at the very least
<shka_>
or at least i think it does
<shka_>
eh, sorry i am a bit tired
<shka_>
pjb: thanks though, i will certainly read beach's paper
<pjb>
Now, if you want to use an existing debugger, you would have to restablish the restart names and resignal the condition, but you wouldn't have the same stack frames.
<shka_>
well, this is far to complex for my scope
<shka_>
pjb: good night
v0|d has quit [Remote host closed the connection]
Lycurgus has joined #lisp
masterdonx has joined #lisp
<pjb>
Good night!
brettgilio has quit [Quit: Konversation terminated!]
dueyfinster has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
grumble has quit [Quit: brb]
orivej has quit [Ping timeout: 252 seconds]
zfree has joined #lisp
lumm has quit [Quit: lumm]
lumm has joined #lisp
grumble has joined #lisp
asarch has quit [Quit: Leaving]
Bronsa has joined #lisp
rumbler31 has joined #lisp
grumble has quit [Quit: grumble]
grumble has joined #lisp
Roy_Fokker has joined #lisp
shka_ has quit [Ping timeout: 240 seconds]
Roy_Fokker has quit [Client Quit]
Roy_Fokker has joined #lisp
rumbler31 has quit [Remote host closed the connection]
<AeroNotix>
Shinmera: is QString not available in common qt?
<AeroNotix>
(qtapropos "QString") and (find-qtclass "QString") don't seem to have it. I've ensure-smoke'd everything possible
vlatkoB has quit [Remote host closed the connection]
jmercouris has joined #lisp
bars0 has quit [Quit: leaving]
jxy has joined #lisp
jxy has quit [Client Quit]
<Shinmera>
No, cause they can't reach you. They're translated to lisp strings
mrcom_ has joined #lisp
mrcom has quit [Ping timeout: 272 seconds]
jxy has joined #lisp
Bronsa has quit [Ping timeout: 244 seconds]
<Shinmera>
As in, Lisp strings /are/ QStrings
<AeroNotix>
Shinmera: but there are static methods on QString that are useful
jxy has quit [Client Quit]
<AeroNotix>
e.g. methods that operate with QByteArray /etc
<Shinmera>
Like what?
<AeroNotix>
converting between QByteArray to string, for example.
<AeroNotix>
parsing QByteArray contents as ASCII/Unicode
<AeroNotix>
seems like the class is in commonqt, but not exposed, right?
<Shinmera>
It's not exposed by Smoke, but the type information is there.
<AeroNotix>
alright, I'll think of a workaround for this bug ;)
<phoe>
AeroNotix: you can translate Lisp strings to octets, Qtools should be able to read a vector of ub8 as QByteArray
<Shinmera>
You can get the pointer to a QByteArray contents and use CFFI.
jxy has joined #lisp
<Shinmera>
Oh, hm
<AeroNotix>
honestly it just seems weird to not expose QString
<Shinmera>
CommonQt unmarshal char * is already turned into a string
<Shinmera>
Nah, it's just never really needed.
<AeroNotix>
I get there is automatic marshalign between QString and lisp strings but it wouldn't hurt to have it available, surely?
<Shinmera>
*shrug* It's not CommonQt's decision.
<AeroNotix>
oh!
<AeroNotix>
I thought it was
<AeroNotix>
nevermind then
<Shinmera>
No, it's Smoke.
<AeroNotix>
gotcha
<Shinmera>
Anyway, it seems CommonQt unmarshals char* to String, so maybe just QByteArray::data will get you a string?
<AeroNotix>
very liekly
* edgar-rft
will write an interface to G by using g-strings
<AeroNotix>
I can't believe I ever started lispkit with gtk
<AeroNotix>
what an absolute waste of time. I should've used Qt from the beginning.
<phoe>
Is there some kind of Lisp library or interface to an English dictionary?
<Shinmera>
Well the problem with the QtWebKit bindings available from CommonQt is that they're real old by now :/
<phoe>
Shinmera: I'd prefer something offline - I'll be deploying an app and I don't want everyone to share the same key.
<AeroNotix>
Shinmera: yeah good call, I never actually l-ooked at the state of the bindings
<AeroNotix>
phoe: how big do you need?
<phoe>
AeroNotix: uh, what choices do I have?
<AeroNotix>
I dunno. I'm just trying to think of what you could use.
<phoe>
GCIDE, it seems
<jmercouris>
phoe: there's lots of english lang dictionaries
<AeroNotix>
phoe: cause there's stuff like /usr/share/dict
<Shinmera>
Someone supposedly ported Smoke to Qt5, but I haven't looked into it
<jmercouris>
phoe: look for stuff that is in public domain, I'm sure there is something on project gutenberg
<jmercouris>
then just store things in a dictionary/hash, key/value
<AeroNotix>
phoe: are you writing a translation application?
<phoe>
AeroNotix: nope, I'm writing an application for textual roleplayers.
<AeroNotix>
ah ok
<Shinmera>
That's a mail that's been rotting in my inbox for a long time :/
<phoe>
I assume they'll need a spellchecker, a dictionary and a thesaurus handy
<jmercouris>
Maybe, maybe not
<jmercouris>
I usually wait until a feature is requested before implementation
<Shinmera>
phoe: bundle hunspell or something would be my suggestion, if that feature is really needed at all.
<phoe>
jmercouris: good point
<Shinmera>
Also, dictionary data can be surprisingly hard to get
<edgar-rft>
phoe: make creating a dictionary part of the game and let the users write it themselves
<Shinmera>
Unless you use an API that is
detectiveaoi has joined #lisp
<jmercouris>
dictionary data is not surprisingly hard to get
<jmercouris>
there are several available on project gutenberg
<jmercouris>
I don't have a good internet connection at the moment, otherwise I would link a few
<edgar-rft>
dictionary data is dead easy to get but to sort out the unwanted stuff takes ages
<jmercouris>
maybe my opinion is a little different, but I find it not so difficult
<Shinmera>
I knew I should have added "good"
<jmercouris>
I've been working with NLP tools, and I think that the community has done a great deal to ensure quality, accessible data exists
<jmercouris>
also what is unwanted stuff? infrequently appearing definitions? very easy to remove them when you just do some simple statistics on a corpus
<edgar-rft>
jmercouris: dictionary data tends to be *huge*, rolplayers do not need to waste gigabytes of ram for dictionary data like NLP folks usually do. They often only need a subset of a big dictionary, therefore my suggestion to let the users write the dictionary themselves
makomo has quit [Quit: WeeChat 2.2]
<jmercouris>
well, maybe you can scrape forums of roleplayers or their conversations on twitter, and then determine which words need to exist as definitions
<jmercouris>
then you could also automatically extract definitions from where they exist in the corpus by training a model
<jmercouris>
you could use a simple decision tree classifier
<jmercouris>
people generally start definitions in the same way, so you wouldn't need a very large training set to get meaningful results
<phoe>
I'm damn fine with not keeping it in memory at all
<jmercouris>
e.g. people will say "x means y"
<phoe>
Dictionary lookups are going to happen a few times per minute at most, I'm fine with accessing a flatfile and fseeking to it as long as I have an index
<Shinmera>
A lot of effort for a simple spellchecker feature
mindCrime has quit [Ping timeout: 240 seconds]
<phoe>
And it seems that GCIDE has an index
<AeroNotix>
phoe: out of interest could you describe what you are using a dictionary for?
<AeroNotix>
I don't understand what kind of game a "textual rolepaying" is
void_pointer has joined #lisp
<phoe>
AeroNotix: cooperative storywriting
<edgar-rft>
As a non-english speaker I often skim dictionaries for learning interesting words, I assume phoe wants it for similar purposes
<AeroNotix>
ok
slyrus1 has quit [Ping timeout: 240 seconds]
<no-defun-allowed>
Hi everyone
<jmercouris>
hi
v0|d has joined #lisp
nowhere_man has joined #lisp
jmercouris has quit [Remote host closed the connection]
Bike has quit [Ping timeout: 252 seconds]
nowhere_man has quit [Ping timeout: 240 seconds]
azimut has quit [Ping timeout: 240 seconds]
pierpal has quit [Ping timeout: 252 seconds]
azimut has joined #lisp
dented42 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
light2yellow has quit [Quit: woosh]
brettgilio has joined #lisp
varjag has quit [Ping timeout: 240 seconds]
Bike has joined #lisp
rozenglass has quit [Ping timeout: 246 seconds]
quazimodo has joined #lisp
rumbler31 has joined #lisp
zooey has quit [Ping timeout: 250 seconds]
zooey has joined #lisp
<jasom>
AeroNotix: I've seen textual roleplaying done via forum, e-mail or in RP heavy MUDs
rumbler31 has quit [Ping timeout: 240 seconds]
jasmith has joined #lisp
random-nick has quit [Ping timeout: 240 seconds]
nullniverse has joined #lisp
lumm has quit [Quit: lumm]
pierpal has joined #lisp
<aeth>
or IRC
brettgilio has quit [Quit: Konversation terminated!]
<aeth>
Who runs #lispcafe? There should be an official #lispcafe-rp channel
rpg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nullniverse has quit [Ping timeout: 252 seconds]
<AeroNotix>
I put on my #'CAR and #'CDR hat
<no-defun-allowed>
I spend my unallocated memory to coerce my list to a vector.
ealfonso has joined #lisp
<ealfonso>
jasom thanks
<ealfonso>
can I write a nested destructuring list macro argument as an &optional or &key argument?
<Bike>
yes.
<Bike>
you have to be careful since both of those can be lists though.
pierpal has quit [Quit: Poof]
pierpal has joined #lisp
<Bike>
like if you have (&key (x y)) it will interpret that as keyword :x, variable x, default y
<Bike>
in particular you'll have to explicitly specify the keyword
<jasom>
ealfonso: oh, be aware that (uiop:pathname-parent-directory-pathname #p"/foo/bar") => #p"/" because the parent directory of the file bar in the directory /foo is /
<jasom>
but (uiop:pathname-parent-directory-pathname "/foo/bar/") => #p"/foo/"
<jasom>
ealfonso: if you want to have the parameter always treated as a directory you can use uiop:ensure-directory-pathname on it first
SenasOzys has joined #lisp
<ealfonso>
jasom thanks
<ealfonso>
Bike I want to allow the macro user to provide a two-type (sym form) where form uses sym. But I don't want to make them required
<ealfonso>
Bike what do you mean by explicitly specify the keywoard
<jasom>
ealfonso: note from that link the example of: (&key ((:radix radix)) ((:type type) 'integer)) ...)
Jesin has quit [Quit: Leaving]
<ealfonso>
I see. I guess I can replace :type with (var1 var2) and 'integer with the corresponding default to get nested destructuring?
lnostdal has quit [Ping timeout: 252 seconds]
<Bike>
replace in what?
<Bike>
in the example? because then it's type you need to replace, not :type
<ealfonso>
yes
<Bike>
:type is the keyword you'll pass in for that
<Bike>
so like, if you have (&key ((:type (a b) '(x y)))), you could pass :type (3 4) or something.
<Bike>
er
<Bike>
(&key ((:type (a b)) '(x y)))
cgay has quit [Read error: Connection reset by peer]
pierpa has joined #lisp
LiamH has quit [Quit: Leaving.]
lnostdal has joined #lisp
it3ration has joined #lisp
<it3ration>
Hey folks, is this the main channel for Common Lisp?
<Bike>
yes.
<it3ration>
great thanks - I had a question or two if anyone has a second
<Bike>
ask away.
<it3ration>
I use Clojure in my day job and have been an Emacs hacker for about a decade - I'm trying to understand how Common Lisp handles (or if it has) any similar way of namespacing the way Clojure does
<AeroNotix>
it3ration: quite similar
<AeroNotix>
but not the same
<Bike>
i don't know how clojure works, but in lisp the namespacing is "packages".
<it3ration>
Is there any way to have namespaced keywords?
<AeroNotix>
it3ration: yes
<AeroNotix>
keywords are in packages
<it3ration>
AeroNotix: ah ok, good to know
jack_rabbit has joined #lisp
<serichsen>
Uhwat
lnostdal has quit [Ping timeout: 240 seconds]
<Bike>
what do you mean by "keyword"?
<serichsen>
Keywords are symbols in the keyword package.
<AeroNotix>
Bike: clojure has :keywords, quite similar to CL's
rpg has joined #lisp
<Bike>
those are used for more than one thing, is all
<Bike>
and like serichsen said, in cl "keyword" means symbols in a particular package
<it3ration>
specifically, in Clojure you can distinguish between the same keyword defined in separate namespaces, for example, :user/foobar
<it3ration>
where user is a namespace
<AeroNotix>
it3ration: no they are all in one package
<serichsen>
For that, I'd just use symbols.
<AeroNotix>
you can kind of get the same effect though by manually namespacing them
<it3ration>
Ah ok, good to know
<it3ration>
Are there any good libraries that introduce laziness in CL?
<Bike>
i mean, for example for &key parameters, you can use arbitrary symbols, so there's namespacing there
shlemas has joined #lisp
<it3ration>
AeroNotix: oh that's PCL right, that's on my reading list actually
<AeroNotix>
it3ration: it's a good book. It doesn't treat CL as some kind of God Language like a lot of other SLW books do
<serichsen>
Ah sorry, FSET is not exactly right, but there are several hits for "common lisp lazy" on duckduckgo.
<it3ration>
I've been pretty spoiled by Clojure's immutability, concurrency primitives, laziness, and consistency - I've used Emacs Lisp for years but never played with CL, it's very different from Clojure
eddof13 has quit [Ping timeout: 240 seconds]
<AeroNotix>
and Emacs Lisp
<AeroNotix>
it3ration: aside from core.async do you actually use the other primitives regularly? I wrote clojure for a couple of years professionally and none of my problems fit those use-cases
bradcomp has quit [Ping timeout: 245 seconds]
figurehe4d has joined #lisp
figurehe4d has quit [Client Quit]
<p_l>
it3ration: you can write :ns/keyword style in CL, it will just bundle the whole thing after : as symbol name
<it3ration>
p_l: ah yeah ok
mindCrime has joined #lisp
lnostdal has joined #lisp
Jesin has joined #lisp
dale has quit [Quit: dale]
<it3ration>
AeroNotix: you mean concurrency primitives?