@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3 4 5 6 7 8 9



Comments:

<0> )
<0> (:default-initargs :MaxFA 4 :MaxFD 8)
<0> )
<1> ARGH.
<0> sorry
<1> lisppaste: url?
<2> Ok, so this is a CLOS cl***, and (nth 1 list) is a CLOS object (or instance).
<3> To use the lisppaste bot, visit http://paste.lisp.org/new/lisp and enter your paste.
<4> First, the pastebot. Second, the indentation.
<5> laggy bot heh
<0> ok
<2> Now, the point is that each cl*** has its own rules about how you can initialize an instance (what :initarg you can p*** to make-instance) and therefore, how you can "copy" an instance.
<6> cliini: make-sudoku9, make-sudoku16, make-sudoku25 actually initialize the sudokus
<2> In simple cases, you could just make a new instance, and use MOP to get the list of attributes and copy them. But it's the cl*** really that knows what attribute must be copied shallowly and what must be copied deeply.
<2> Nemonik: so the best, would be to define a COPY method on this PTIERRA or POKEMUN cl***, and use it to copy (nth 1 list).
<6> xach: should i use either of defparameter or defvar instead?



<0> if i use (setf a (nth 1 list)) and i make some change on a the list too change
<7> smokecfh: yes
<8> Nothing especially unportable there as far as I can see.
<2> Nemonik: of course. this is the same object.
<8> Maybe GCL is buggy, but it seems far fetched.
<0> i don't know how create a copy to don't change the list
<2> If I take Nemonik, and I make it project manager, if I later hit the project manager on the head, Nemonik will be hurt. Normal.
<6> cliini: thank you for looking
<2> Nemonik: You start like this: (defmethod copy ((self pokemun)) (let ((copy (make-instance (cl***-of self) ...))) (setf (slot-value copy '...) (copy-... (slot-value self '...)) ...) copy))
<2> Then you can write (copy (nth 1 list))
<0> pjb: hmmm i go to try it
<2> Now, if I make a clone of Nemonik, what attribute will be the same? the DNA? Well, there could be mutations, so we'll have to deep-copy the DNA. The name? Interesting legal question. But you'll probably want to keep the name Nemonik for the original and perhaps call the clone miniNemonik. The age? Of course not, the clone will be younger...
<9> those who were looking at the spoj competitions--they're unworkable with clisp & gcl; even simple input-output is way too slow. oh well
<2> eadmund: not totally. With the right techniques, you can even do some of the I/O intensive ones.
<2> And anyways, it's still itneresting to do them, in our own category...
<10> just do the ones with no solutions yet :)
<11> eadmund: You do realize that your algorithm n/5+n/5^2, etc. will use rational numbers, which might be slow.
<6> cliini: all i can figure now is that it could be SORT. i'll try replacing it with STABLE-SORT.
<6> is https://www.spoj.pl/ranks/PIVAL/ limited in any way? it shouldn't be too hard to generate more digits in infinite time, right?
<6> hm sorry. i should read better. it's runtime is limited to 25 seconds.
<12> ASDF is dumping stuff to standard output, even when I run SBCL with --noprint --noinform. Is there any way to disable that?
<13> (operate ... :verbose nil)
<12> Ah, thanks.
<12> Perfect. Thanks!
<6> hm. it was indeed the sort / stable-sort issue that caused gcl not to find a solution.
<12> That's interesting. sbcl is segfaulting under strace.
<6> for reference: sbcl takes 350 seconds to find a solution, gcl takes 440.
<1> quotemstr: that's by design.
<1> quotemstr: SBCL garbage collection is triggered by stepping on a guard page which is mprotected, which causes a SIGSEGV or SIGBUS (depending on platform) to be sent to the process
<1> quotemstr: the siginfo_t argument to the signal handler contains the address of the fault, which in turn tells us that we stepped on this guard page and that it's time to collect garbage
<12> chalnder`: Right. I was just trying to do an strace to see where the process was spending most of its startup time.
<12> chandler: Clever.
<1> the process being SBCL, or your code?
<14> smokecfh: you can probably improve that by an order of magnitude just by declaring the types of your arrays
<12> chandler: Well, SBCL. It's taking 500ms to start up.
<14> specify --userinit /dev/null
<15> chandler`: doesn't that confuse many debugging and analysis-tools, by the way? Most tools (and operating systems) I have used do not really expect a process to survive a SIGSEGV.
<4> Athas: It doesn't -matter-, and if so, it's a bug in the debug/analysis tool.
<13> Athas: That's their problem. :)
<14> (on my machine starting sbcl 500 times with --userinit /dev/null takes under 5 seconds)
<4> Heh. What if the contest is run in a UML instance?
<12> jsnell: Even with --no-userinit and --no-sysinit, it takes 500ms.
<12> Well, it's not just SBCL starting up. ASDF is loading a package too.
<14> well, there you go
<12> jsnell: Right. I was trying to use strace to figure out what was going on with that.
<13> quotemstr: save an image with the system already loaded, if you want fast startup
<14> that's going to be useless
<12> Okay.
<14> (referring to using strace for that, not to saving an image)
<1> nyef: indeed. talk about slow SBCL startup...
<6> jsnell: i was considering that (typing the arrays), but then i figured it would be better to use 1d arrays, and then i lost interest, because i found a solution to the puzzle i was trying to solve :)
<1> Athas: it horribly breaks gdb on OS X, which can't p*** a signal to the process being debugged and also give it the correct siginfo_t. This is gdb's brokenness, however. It's the 21st century; reliable signal delivery should be expected. (Hah.)
<12> Why oesn't SBCL provide a thread join operation?
<16> "To join another thread is to wait until the other thread has completed."; is that what you want? In that case, there seem to be ways to wait for another thread.
<12> rydis: Of course. :-) I'm just surprised that phread_join isn't exposed. Ahwell. :-)
<16> quotemstr: SBCL threads don't use pthreads, as far as I know.
<7> quotemstr: i don't know if it's relevant, but the original thread implementation of sbcl did not use pthreads.
<12> Ah, I se.
<12> err, see. That explains it.
<14> and even in the pthread-based implementation the actual posix thread doesn't quit at the time the logical lisp thread quits, but later
<14> so just exposing pthread_join wouldn't do what you want



<12> Ah.
<17> morning
<4> Hello splittist.
<12> Given a nickname of a package, how can I get that package's true name?
<2> (package-name (find-package nickname))
<18> has anyone been having trouble with c-l.net CVS?
<19> emu, which project, describe your trouble
<19> the cvs pserver daemon is broken by design so it requires some ongoing maintence and every now and then it's broken for some projects without my knowing it. (though if you don't use pserver you'll never know.)
<19> svn is so much more convenient anyways
<2> darcs
<18> i use darcs myself, and svn at work
<18> i dunno i just got it working
<18> you should "encourage" all projects to switch over to svn at least =)
<18> i converted a 400MB repository filled with lisp, binaries, etc from the last 15 years over to SVN
<19> emu, i set up an svn repo for every single project, by default. that's plenty encouragement, isn't it? :)
<2> I'm fed up, every project has its own RCS nowadays! cvs, hg, svn, darc, svn tla, enough!!! Lets all switch to darcs!
<18> i wanted to use darcs for that project but it choked on the size
<2> I've got 429 MB of darcs repositories...
<7> MFTRCS
<20> maybe some day one of hg darcs tla git bzr baz (did I miss some?) will actually work well enough to use.
<18> well rather the conversion process choked on the size
<18> darcs works great, i use it for all my projects
<18> but it's a different way of working, and i guess it's difficult to convert
<20> tell me, why do I want people's work branches not be visible to others in the company?
<2> Not really, darcs' simple and clear.
<2> foom: not really, you use darcs push to publish and darcs pull to update.
<4> Hrm... "Common Lisp Advanced Semantic Source Integration Control System"?
<5> CL***ICS? heh
<18> well 2 things you can do: establish branches on a central server that people can push to if they want; or, people can publish their own repositories
<18> the latter option isn't even available with svn-style "normal" source control
<18> centralized
<4> mbishop: First thing that came to mind that started with CL and ended with CS.
<14> I found darcs to be unusably slow for a medium-sized project (<200kloc)
<14> as in the initial checkout taking several hours, and pulling one patch taking several minutes
<21> for me, git is very fast; initial checkout time is limited by bandwidth (40MB for all of sbcl's history), and commit & update times are below half a minute
<7> quotemstr: you can do that.
<7> quotemstr: sb-posix in particular, iirc, is designed to be used with package prefixes, though.
<20> as a google employee said in an lwn.net comment: """
<20> "State of the art" is debatable. There are lots of interesting alternatives [to centralized version control] being developed today, but I do not believe any of them have the maturity, robustness, tool support, documentation, history of deployment, and more that Subversion has. None of them. In a few years? Sure, I hope that the fragmentation will be reduced and there will be a clear and solid winner in the distributed-repository camp which answers "
<20> yes" to all of those points."""
<22> don't several of them predate Subversion?
<21> foom: I would like the moon on a stick, too. but there is only one moon.
<5> google offers svn
<12> Xach: Ah, I see.
<12> Xach: Can I give a package a new nickname?
<21> so, I guess I'll have to fight google for it.
<23> hi all
<7> quotemstr: yes.
<7> quotemstr: rename-package is it
<2> quotemstr: I've got a add-nickname function in http://darcs.informatimago.com/darcs/public/lisp/common-lisp/package.lisp
<12> Okay, another question. Why do I need to use (require ...) before I enter my package?
<7> quotemstr: you don't.
<12> Well, it compiles one way and not the other. :-)
<7> your package must be loaded before you interact with it.
<7> in some lisps, REQUIRE will do the needed compiling and loading, but it may be using something else underneath.
<12> Well, I'm using asdf and SBCL; I have a defpackage.lisp that's loaded first, and a main lisp file that depends on that. If I use require for these packages in the main lisp file, I get 'package SB-BSD-SOCKETS" not found', while exactly the same lines in defpackage.lisp do what I'd expect them to do.
<7> don't use require to load things.
<12> It also doesn't work in the main lisp file even if those requires come before the (in-package).
<7> write a system definition that expresses the dependency on sb-bsd-sockets and load your system.
<7> in general, don't put (require ...) in lisp sources.
<7> using it at the repl is convenient.
<7> whenever your project grows dependencies on some other system, or multiple files, write out a defsystem file for it to make it load things in the right order.
<24> I thought I could earn a cool award for #n= usage, by doing (let #1=(foo bar baz quux ...) (dolist (el some-arg #.`(values ,@'#1#)) ...), but now I see that I've to nreverse some of vars of #1#. I considered that such a cool hack, damn. :(
<12> Okay.
<8> I'm sure the award for that is not for cool.
<8> Maybe "most like perl".
<25> cool hacks may lead to a hot programming session instead of sleep. no cool hacks anymore please...
<8> Do you actually have to say #.`(values ,@'#1#), wouldn't just (values . #1#) do the same thing?
<8> You would lose the perl award, though.
<24> cliini: oh, indeed. :)
<24> that's even niftier :)
<12> How is :use different from :import-from in defpackage?


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #lisp
or
Go to some related logs:

ubunto acx 111 wireless simple
#math
how to install macchanger on ubuntu
#suse
ubuntu apt-get install gmake
networkinstall ubuntu
#gentoo
initial command counter-strike
Reiser+vs.+XFS
repository for xgl fro kubuntu



Home  |  disclaimer  |  contact  |  submit quotes