free blog   apache   shopping directory   php powered
Andrii_Torba(setq (nth 2 ddd) <new value>)??
LiamH(setf (nth 1 ddd) 777)
selloutAndrii_Torba: forget about setq, just use setf all the time.
Andrii_Torbathanks alot
kiumaIs there any example or client app in CL that reads emails via IMAP ?
attila_lendvaidlowe: pull cffi?
dloweattila_lendvai: I'm using the latest stable?
attila_lendvaidlowe: i use the head from http://common-lisp.net/project/cffi/darcs/cffi
attila_lendvaiand i'm on iolib head
attila_lendvaihrm, almost on head. i'll pull both of them to double check
dloweit's our own lispy version of DLL hell
attila_lendvaiwell, dependencies will always be a headache in big systems
Xachkiuma: the original, i think.
attila_lendvaidlowe: cffi and iolib head seems to work fine here
Xachkiuma: sorry, apparently it was in interlisp
dloweattila_lendvai: yeah, that was the issue
kiumaXach, using java libs is the thing I want to avoid at any cost, but the only thing I've been able to test is mel-base, then when it's time to read the message body, the stream is not in a usable format
dloweattila_lendvai: does iolib really qualify as a big system? :p
Xachkiuma: You could always write Lisp code that does what you want.
blandestXach: you mean implementing the whole IMAP RFC ? :)
kiumayep, I could do everything , but it's somewhat to start from 0 or nearly
kiumablandest, mel-base implements a bit, but extractions need to be managed, they are not 'ready to use'
Xachblandest: It'd be more interesting than the current frequent requests for someone else to tell him where to download a pre-existing solution.
GuthurWell obviously you probably don't have to implement the server side of IMAP
GuthurSo just get working on an IMAP client, and tell us when you are done, hehe
kiuma:P
XachAlso, Lisp lets you write software faster. So you might already be done by the time you find what you need.
blandestI agree, but it usually depends on what the application needs to do
p_lalso, IMAP isn't that complicated of a protocol (it's a sweet one, IMHO, with all that async. support)
stassatsi'd go with "implement what you need"
kiumaI was checking a solution based on mel-base + cl-mime
mathrickXach: the complexity of IMAP comes from the utter brokenness of the RFC as well as all the implementations out there
mathrickthat's the category of software that's slow to write because the problem domain is stupid, and Lisp won't help you much
p_lmathrick: RFC broken? Care to elaborate?
p_lIMAP was always the protocol I had the least issues with when it came to email...
hypnoHooking UW IMAP is probably done in a hour or so tho, with the proper tools. Then you only have to wrap up the API to be lisp friendly, but that part is easy and fun compared to implementing all of the rest of the bullshit. :)
mathrickp_l: sure. For instance, it assigns unique IDs to messages that are valid for the duration of the validity of "session token" generated by the server. And the server can make a new token whenever it feels like, say when you connect.
mathrickwhich means your IDs are not IDs anymore
mathrickand you need to pull everything again and try to match it against what you remember of your inbox from the last session
fe[nl]ixdlowe: use CFFI HEAD
mathrickit's completely retarded and in no way useful
mathrickp_l: in general, it's stupid and/or vague precisely in those places that matter for interop
fe[nl]ixdlowe: well, it's about 10K lines of code. big for an opensource library, perhaps
pmdis there something for emacs that indents lambda-lists better? like, if you make a newline after &key argument, it'll indent at argument instead of a column after &key?
_8davidpmd: use ELI instead of SLIME? ;-)
XachHmm, I am trying to run "git clone git://common-lisp.net/projects/alexandria/alexandria.git", but I get "The remote end hung up unexpectedly." Am I doing something wrong? Is there a c-l.net problem?
pmd_8david: yes, ELI does that... but... i want to use slime
pmd_8david: even if it's just to be able to have several running images under the same emacs
stassatsisn't alexandria using darcs?
Xachstassats: according to http://common-lisp.net/project/alexandria/ it is using git now, and offers that command line
pmdthis has greatly enhanced my habits. i started to use emacs as a server, and added an explorer context menu to "edit with emacs" (similar to "edit with vim") that either runs emacs if there is no server or reuses the existing one
stassatsXach: http://common-lisp.net/r/projects/alexandria/alexandria.git works
Xachstassats: thanks.
Xachstassats: Now I wonder if the web page is in error, or if common-lisp.net is having a problem, or what.
stassatsthough, somebody should fix it anyway, since git:// is faster
pmd_8david: well, thanks anyway
stassatsXach: seems like the latter
pmd_8david: have you ever wanted to make eli be able to support multiple connections in one emacs?
stassatsssh:// also works (if you have an account)
Action: Xach tries emailing clo-devel
attila_lendvaidlowe: re system complexity. where do you draw a line? from one point of view iolib and linux is in one system, because the former provides an interface to the latter... and cffi is merely handling some accidental complexity caused by the impedance mismatch between them...
_8davidattila_lendvai: can you point me to the place in the code where a PERSISTENT-ASSOCIATION injects the PERSISTENT-ASSOCIATION-END-DIRECT-SLOT-DEFINITIONs into the association end point PERSISTENT-CLASS?
attila_lendvai_8david: err, it sounds too simple, but have you macroexpanded defassociation?
mathrickuh-huh, are there any circumstances where PRINT-OBJECT could be defined for a type implicitly?
_8davidyeah, I've macroexpanded it and also TRACEd ensure-class, and I'm as mystefied as I was before doing it :-)
mathrickI'm trying to track where it's defined, and SBCL points to a macro invocation, but when I expand it there's no trace of PRINT-OBJECT being touched
_8davidI'm seeing such dslotds in CLASS-DIRECT-SLOTS, but I can't find a place where the dslotd gets passed to ensure-class or so.
mathrick_8david: oh, I see you're having the same fun. Welcome to the club
attila_lendvai_8david: i haven't seen the internals or perec much, but how about update-persistent-class-for-association-definition ?
attila_lendvaierr, no, that's not the injection
attila_lendvai_8david: shared-initialize-around-persistent-class ?
attila_lendvaiit invokes call-next-method with :direct-slots (append (process-direct-slot-definitions direct-slots) (association-direct-slot-definitions class))
_8davidoh, thanks, that looks promising
Action: Xach is surprised that http://en.wikipedia.org/wiki/Ironclad_(Common_Lisp) exists
Odin-The Wiki page, then?
stassatsyou can always suggest it for deletion!
Odin-Wow. That's one hell of a stub.
stassatsi'd do that, but i'm not playing in the english wikipedia
rpgsomewhat random question:  anyone have a good pointer to how to run SBCL program as a Unix daemon?
rpgspecifically, we've been having trouble with sbcl wanting to write stuff at the console when it's supposed to be a daemon.
p_lrpg: redirect output somewhere
rpgp_l: output from errors seems to  creep through anyway.
p_lrpg: did you redirect all descriptors?
rpgeven with disable-debugger and disable-ldb, when sbcl is crashing, it seems to leak stuff to the console.
rpgp_l: as far as I can tell, yes.
stassatsand *debug-io*?
rpgstassats: you mean redirect that, as well as stdout and stderr?
stassatsi thought you were redirecting on the lisp side
rpgstassats: no, unix daemon, so we've been redirecting in daemon bash script
attila_lendvairpg: using this http://dwim.hu/darcsweb/darcsweb.cgi?r=HEAD%20hu.dwim.build;a=summary we build executables. then
Guthurrpg: I'd be interested if you get that solved. I tried for quite some time to get that, but was never really successful.
attila_lendvaiusing these http://dwim.hu/darcsweb/darcsweb.cgi?r=HEAD%20hu.dwim.environment;a=tree;f=/etc/service-scripts we run those executables
GuthurI was trying on Linux.
attila_lendvaihere http://dwim.hu/darcsweb/darcsweb.cgi?r=HEAD%20hu.dwim.home;a=tree;f=/bin there's an actual example usage
rpgattila_lendvai: thanks very much.  I will look at those.
rpgGuthur: Our stuff is also on linux
attila_lendvairpg: here http://dwim.hu/darcsweb/darcsweb.cgi?r=HEAD%20hu.dwim.meta-model;a=headblob;f=/source/production.lisp you can find the interesting chunk of the exe toplevel lambda. and here http://dwim.hu/darcsweb/darcsweb.cgi?r=HEAD%20hu.dwim.home;a=headblob;f=/source/server.lisp there's an actual toplevel function using the former
p_lrpg: clbuild lisp --eval '(asdf:load-system :swank)' --eval '(setf swank:*use-dedicated-output-stream* nil)' --eval '(swank:create-server :dont-close t)' >/dev/null 2>&1
rpgp_l:  that looks similar to what we're doing, except we don't use clbuild.  We are additionally doing --disable-debugger and --disable-ldb, and redirecting streams to a log file instead of /dev/null.
p_ldump an image with swank initialization as startup function and you don't need to deal with stdin (I left it because normally it would execute repl)
_8davidI don't think SBCL's SB-SYS:*TTY* aka *TERMINAL-IO* actually goes to stdout.
p_lafaik most people use something like detachtty even if they want to run a daemon
_8davidIt goes directly to /dev/tty.
_8davidSo if you either SETF SB-SYS:*TTY* or dup2 the real stdout over its fd, that should help.
p_l_8david: /dev/tty won't work if you redirect it and it is signaled to the code, iirc
_8davidp_l: I don't understand what you mean.
attila_lendvaishould i be worried if i don't follow this tty stuff? we use start-stop-daemon
_8davidrpc said he's redirecting stdout and stderr, and I'm pointing to a case where SBCL ignores said redirection.
p_l_8david: it's just that I recall something about /dev/tty not allowing itself to be open if you aren't attached to a tty
rpgp_l what do you mean by "it is signaled"?  "it" is ?
p_lrpg: "error"
_8davidp_l: oh yes, that's true.  But if rpg is starting from a shell script, I doubt he has detached from the tty.
p_li.e. open of /dev/tty should fail, iirc
rpgp_l: ah, thaks.
rpg_8david: I will check the bash script for detachtty...
_8davidArguably a process that hasn't detached from the tty isn't a daemon at all.
p_lrpg: IMHO, if you want to do all that daemon-mode stuff, you should implement necessary routines in your image init function
p_lthat is, close the descriptors, then fork
rpgp_l: we actually have a bash script that can use more than one different lisp impl, so I'd /prefer/ to do that in the bash script, but could move to the image init, if necessary.
rpgdoing a fork in lisp seems very exciting...
attila_lendvairpg: if you make progress i'd be interested in where you get to. maybe we can port over something useful to our toplevel function
_8davidrpg: I think there's also a setsid(1) program that you could use in a shell if you don't want to call setsid(2) yourself
rpgattila_lendvai: I'll let you know if we have any luck.  Have to compare your scripts with ours, and follow up the detachtty suggestion --- I don't see anyone doing this here.
_8david(Personally I prefer to write this kind of wrapper in C.  More robust than shell.)
rpg_8david: thanks.  I will check that, too.
rpg_8david: Not my code, actually --- someone else wrote the bash scriptage, but wants me to keep sbcl from blatting to screen...
Phantom_HooverIs there a Lisp logo?
Odin-A few. None official.
p_lrpg: do you need that portable?
Phantom_HooverI've wanted to have an application launcher for Slime for ages, but I can't find a decent icon.
rpgp_l: ideally portable --- we have been going back and forth b/w sbcl and acl, and between linux and macs.
stassatsslime has a logo
Odin-http://www.normal-null.de/lisp_logo.php && http://www.lisperati.com/logo.html
attila_lendvairpg: also note that our solution is only tested on sbcl, although i don't think there are any showstoppers if saving executables with a toplevel lambda is supported
rpgattila_lendvai: we have somewhat different code for ACL and SBCL in the init function and builder, but that level of portability is already done.
p_lwould IOlib work properly on acl?
fe[nl]ixno
fe[nl]ixmaybe
fe[nl]ixonly on acl 64bit
p_lheh
_8davidluis pointed me to a cffi "long long" patch, but I haven't tried it yet
fe[nl]ix_8david: the long long patch doesn't work for function arguments and return values
fe[nl]ixonly for emulating long long in struct access
_8davidbah.
npoektophi! is there a way to protect port 4005 of swank? I want to have swank running on remote server, but how to make it securely?
rpgp_l, _8david, attila_lendvai:  thanks so much to all of you!  I have a lot of directions to follow up now, and I really appreciate the help.
Xachnpoektop: by default it only listens on localhost. if you want to access it remotely, you have to e.g. use a tunnel.
Xachnpoektop: you can also, iirc, create a "cookie" file, and protect it with file permissions, and slime won't accept connections that don't use the right value from the cookie.
rpgfe[nl]ix: we have had some luck doing iolib-like portability, but came to it topsy-turvy --- we have been emulating the ACL socket facilities in SBCL...
attila_lendvairpg: i remember all my struggling to put together anything useful, not to mention reusability (we use those from several projects). so with those memories i very much hope you'll have less headaches (with this cimpletely accidental complexity)
p_lrpg: I can try writing you a general "daemon init" function for both SBCL and ACL :)
luis_8david: fe[nl]ix is talking about something else
luis_8david: that patch does work for function arguments, that's the point. long long emulation in mem-ref is already in CFFI.
rpgp_l:  we have written our own sort of boot script that's portable, and invoke it from front ends that differently handle command-line arguments for the two implementations (wclas on sbcl, built-in stuff on ACL)...
Action: rpg goes off to skim boot-script.lisp...
Phantom_HooverCan you make arbitrary Lisp objects callable?
fe[nl]ixluis: and for return values too ?
npoektopXach, ok. I'll try to find smth on that
npoektopthank you
rpgQuick follow-up question:  will a saved sbcl lisp image properly handle --disable-debugger and --disable-ldb when restarted?
attila_lendvairpg: there's some --save-runtime-options which always confused me. is saves some arguments, but i don't think those two are included...
attila_lendvaierr, no, it's actually :save-runtime-options for save-lisp-and-die
rpgattila_lendvai: actually, I want the opposite of save-runtime-options --- I want to have those arguments be interpreted by the image when it restarts, so that it can be run either with or without debugger.
attila_lendvairpg: originally we tried that first, but for some reason ended up having our own arg handling (which includes --disable-debugger and uses :sro t so that sbcl doesn't interfere with the args)
Xachrpg: disable-debugger is handled by the default toplevel function in sbcl
attila_lendvaihrm, i *think* it was due to --help
Xachrpg: disable-ldb is handled by the runtime
attila_lendvainote: sb-ext:disable-debugger disables ldb, too
rpgattila_lendvai, Xach:  thanks.  We have been handling disable-debugger ourselves, and using sb-ext:disable-debugger.  sounds like that's The Right Thing.
Action: rpg may once have known this, and forgotten it.
attila_lendvairpg: fyi, a related sbcl bug: https://bugs.launchpad.net/sbcl/+bug/450280
Xachrpg: I found the runtime/toplevel argument handling pretty confusing in sbcl.
rpgbtw, I notice that the sbcl manual's function index has no entry for disable-debugger....
rpgI wonder how easy it would be for me to patch to add that...
Action: rpg doesn't really understand the way docstrings are transduced into the texinfo...
Action: attila_lendvai will add a new bug to launchpad about better runtime option parsing that doesn't capture --help unconditionally
rpgattila_lendvai: thanks.  all the more reason for us to handle --disable-debugger ourselves!
rpgAh.  no docstring on DISABLE-DEBUGGER....
rpgIs there anything that needs to be said besides "When invoked, this function will turn off both the SBCL debugger AND the LDB."
rpg?
rpgAlso, does anyone know if ENABLE-DEBUGGER simply is the inverse?  There's a comment about the setting of *DEBUG-IO* which I don't fully understand.
attila_lendvairpg: about the fact that it _used to_ set *debug-io*?
rpgattila_lendvai: Yest.
rpgs/yest/yes/
attila_lendvaiimho, that is just noise and shouldn't have been written there
Phantom_HooverIs it possible to make arbitrary objects callable?
p_lrpg: http://paste.lisp.org/+25LQ
rpgattila_lendvai: Do you know if enable-debugger turns the LDB back on, too?  I'm afraid I don't know how to reliably force sbcl into the ldb...
rpgp_l: wow.  Brilliant!  thanks!
p_lrpg: it's very simple, direct translation of canonical UNIX daemon init code
p_lI recommend running it before starting any threads, though
attila_lendvairpg: it turns ldb back on unconditionally
rpgp_l:  I can see that now, but don't know the bottom end of sbcl very well; it would have taken me a long time to winkle out the sbcl equivalents of the C code.
rpgattila_lendvai: thanks.
akamausis it possible to use a single loop macro to step across a two dimensional array? Or two nested loops needed?
rpgI'll try to submit a patch to sbcl-devel with rudimentary docstrings for enable/disable debugger so that they will at least show up in the function index.
attila_lendvaip_l: why do you close the io? isn't it useful? we redirect stdout and stderr into a file which came handy several times
p_lattila_lendvai: that's why I marked it as *simple*
p_lattila_lendvai: I didn't bother with writing all redirection code, but it shouldn't be too hard
attila_lendvaiahh, ok
Popular searches: upgrade openoffice 3   glib CFRunLoop   cookiemon5ter   

Generated by irclog2html.pl 2.1mg by Jeff Waugh - return