phoe changed the topic of #lisp to: Common Lisp, the #1=(programmable . #1#) programming language | <http://cliki.net/> <https://irclog.tymoon.eu/freenode/%23lisp> <https://irclog.whitequark.org/lisp> <http://ccl.clozure.com/irc-logs/lisp/> | SBCL 1.4.16, CMUCL 21b, ECL 16.1.3, CCL 1.11.5, ABCL 1.5.0
jkordani has quit [Read error: Connection reset by peer]
karlosz has joined #lisp
slyrus_ has quit [Remote host closed the connection]
jkordani has joined #lisp
slyrus_ has joined #lisp
lavaflow_ has quit [Read error: Connection reset by peer]
Fare has quit [Ping timeout: 255 seconds]
robdog_ has joined #lisp
lavaflow_ has joined #lisp
robdog has quit [Ping timeout: 252 seconds]
wanz has quit [Quit: wanz]
robdog has joined #lisp
<Josh_2> Whats this :O #<CL-SOURCE-FILE "my-site" "server">
<Josh_2> It just says it can't compile but doesn't tell me why
snits has joined #lisp
<Bike> an asdf object representing one of your source files
robdog_ has quit [Ping timeout: 252 seconds]
<Josh_2> O right sorry xD
<Josh_2> #<UIOP/LISP-BUILD:COMPILE-FILE-ERROR
<Josh_2> Referring to that file
<jasom> Josh_2: adding :verbose t to either the asdf operation or quicklisp may show more information.
<Josh_2> awesome I'll try that :)
<Josh_2> What's the best way to manage global variables that are depended upon by other files? put them all in one file?
robdog has quit [Ping timeout: 252 seconds]
<Josh_2> Put them in the file that uses that variable?
<jasom> Josh_2: all in one file is a not-great, not-terrible solution. It is also valid to have a defvar for the same global in all files. Lastly, if there is a clear place that implements the primary functionality that the variable is used by, put it there, and make all consumers depend upon that file.
<Josh_2> hmm perhaps the defvar is the way to go then
<Josh_2> in this case
<Josh_2> thanks jasom
* jasom assumes the value is not needed at compile time; that would change the equation.
<Josh_2> uhm well I have a variable called *directory* which is the directory which both my javascript generator uses and hunchentoot uses to create and start the server
<Josh_2> these are seperate files
<Josh_2> it is the directory where I keep my .lisp file for each page of my website
<Josh_2> has scripts images libaries etc the normal stuff for a website
<jasom> hmm; is it expected to be logically constant? If so, I would put it in a separate file that has all such site-configuration options and use defparameter.
<Josh_2> jasom: well I expect the variable to be set once at launch and then not changed
<jasom> oh, then it's fine. If it's being set at launch, you can just have defvars without bindings wherever it is used, and then set it at launch.
frodef has quit [Ping timeout: 255 seconds]
<jasom> since other than the single use of *directory* those modules sound like they are independent. Some people who are dependency junkies would insist on putting the defvar in its own file, but *shrug*.
Lord_of_Life_ has joined #lisp
robdog has joined #lisp
wanz has joined #lisp
Lord_of_Life has quit [Ping timeout: 240 seconds]
Lord_of_Life_ is now known as Lord_of_Life
robdog has quit [Ping timeout: 250 seconds]
verisimilitude has quit [Remote host closed the connection]
igemnace has joined #lisp
Kevslinger has quit [Quit: Connection closed for inactivity]
scymtym has quit [Ping timeout: 255 seconds]
<Josh_2> went with having a configuration file
<jasom> you may want to have separate files for defining and setting the parameters; otherwise when you change a parameter, everything will recompile.
_whitelogger has joined #lisp
igemnace has quit [Quit: WeeChat 2.4]
igemnace has joined #lisp
robdog has joined #lisp
robdog has quit [Ping timeout: 252 seconds]
<Josh_2> Okay sorted it all out :)
jack_rabbit has joined #lisp
robdog has joined #lisp
robdog has quit [Ping timeout: 252 seconds]
robdog has joined #lisp
robdog has quit [Ping timeout: 252 seconds]
lumm has quit [Remote host closed the connection]
<Josh_2> jasom: dynamically generating pages from 'blocks' is awesome :D
robdog has joined #lisp
robdog has quit [Ping timeout: 252 seconds]
sjl has quit [Ping timeout: 240 seconds]
robdog has joined #lisp
robdog has quit [Ping timeout: 252 seconds]
sjl has joined #lisp
robdog has joined #lisp
pfdietz has quit [Quit: Page closed]
robdog has quit [Ping timeout: 252 seconds]
Essadon has quit [Quit: Qutting]
robdog has joined #lisp
robdog has quit [Ping timeout: 252 seconds]
robdog has joined #lisp
torbo has joined #lisp
nullheroes has quit [Quit: WeeChat 1.9.1]
nullheroes has joined #lisp
robdog has quit [Ping timeout: 252 seconds]
robdog has joined #lisp
wigust- has joined #lisp
fortitude has quit [Remote host closed the connection]
robdog has quit [Ping timeout: 252 seconds]
wigust has quit [Ping timeout: 245 seconds]
fortitude has joined #lisp
robdog has joined #lisp
asarch has joined #lisp
<asarch> Is it good style to have slots as reference to other objects: (defclass rect () ((p1 :initform (make-instace 'point)) (p2 :initform (make-instance 'point)))...?
robdog has quit [Ping timeout: 252 seconds]
<Bike> i mean, it's fine?
dale has quit [Quit: dale]
<Bike> putting objects in slots is definitely fine. initforms might go weird just because you might want to add more arguments later, but other than that whatever
<asarch> Thank you!
<asarch> Thank you very much :-)
dale has joined #lisp
ltriant has quit [Quit: leaving]
robdog has joined #lisp
robdog has quit [Ping timeout: 252 seconds]
robdog has joined #lisp
wanz has quit [Quit: wanz]
abhixec has joined #lisp
Oladon has joined #lisp
robdog has quit [Ping timeout: 252 seconds]
orivej has quit [Ping timeout: 252 seconds]
rumbler31 has joined #lisp
<no-defun-allowed> Xach, jasom: sure, but I don't intend to use the libjit mechanics for generating nested functions
<no-defun-allowed> That'd take away the fun from compiling closures
wanz has joined #lisp
moldybits has quit [Quit: WeeChat 2.2]
robdog has joined #lisp
aeth has quit [Ping timeout: 245 seconds]
robdog has quit [Ping timeout: 252 seconds]
aeth has joined #lisp
wanz has quit [Quit: wanz]
wanz has joined #lisp
beach has joined #lisp
<beach> Good morning everyone!
robdog has joined #lisp
robdog has quit [Ping timeout: 252 seconds]
robdog has joined #lisp
rumbler31 has quit [Remote host closed the connection]
akoana has joined #lisp
nalkri has joined #lisp
robdog has quit [Ping timeout: 252 seconds]
buffergn0me has quit [Ping timeout: 258 seconds]
jack_rabbit has quit [Ping timeout: 252 seconds]
robdog has joined #lisp
robdog has quit [Ping timeout: 252 seconds]
Bike has quit [Quit: Lost terminal]
moldybits has joined #lisp
moldybits has quit [Client Quit]
robdog has joined #lisp
Ukari has quit [Remote host closed the connection]
moldybits has joined #lisp
Ukari has joined #lisp
Josh_2 has quit [Remote host closed the connection]
Josh_2 has joined #lisp
robdog has quit [Ping timeout: 252 seconds]
Oladon has quit [Quit: Leaving.]
mrcom_ has quit [Read error: Connection reset by peer]
Inline has quit [Quit: Leaving]
mrcom_ has joined #lisp
wanz has quit [Quit: wanz]
<LdBeth> Morning
ym has quit [Ping timeout: 268 seconds]
jack_rabbit has joined #lisp
ym has joined #lisp
wanz has joined #lisp
marvin2 has quit [Ping timeout: 255 seconds]
robdog has joined #lisp
robdog has quit [Ping timeout: 252 seconds]
ym has quit [Ping timeout: 252 seconds]
moldybits has quit [Quit: WeeChat 2.4]
ym has joined #lisp
moldybits has joined #lisp
robdog has joined #lisp
robdog has quit [Ping timeout: 252 seconds]
mrcom_ has quit [Ping timeout: 245 seconds]
robdog has joined #lisp
robdog has quit [Ping timeout: 252 seconds]
Tristam has quit [Ping timeout: 252 seconds]
Oladon has joined #lisp
Ricchi has quit [Read error: Connection reset by peer]
mrcom_ has joined #lisp
rozenglass has joined #lisp
robdog has joined #lisp
Tristam has joined #lisp
robdog has quit [Ping timeout: 252 seconds]
verisimilitude has joined #lisp
robdog has joined #lisp
robdog has quit [Ping timeout: 252 seconds]
vilivulpine has joined #lisp
Fare has joined #lisp
wanz has quit [Quit: wanz]
robdog has joined #lisp
robdog has quit [Ping timeout: 252 seconds]
robdog has joined #lisp
robdog has quit [Ping timeout: 252 seconds]
vlatkoB has joined #lisp
dale has quit [Quit: dale]
Oladon has quit [Quit: Leaving.]
robdog has joined #lisp
jdz has quit [Ping timeout: 250 seconds]
robdog has quit [Ping timeout: 252 seconds]
Ukari has quit [Remote host closed the connection]
Ukari has joined #lisp
wanz has joined #lisp
Ukari has quit [Remote host closed the connection]
Ukari has joined #lisp
anewuser has quit [Quit: anewuser]
frodef has joined #lisp
robdog has joined #lisp
torbo has left #lisp ["ERC (IRC client for Emacs 26.1)"]
robdog has quit [Ping timeout: 252 seconds]
jdz has joined #lisp
buffergn0me has joined #lisp
mrcom_ has quit [Ping timeout: 245 seconds]
jprajzne has joined #lisp
drl has joined #lisp
robdog has joined #lisp
milivoj has joined #lisp
gravicappa has joined #lisp
robdog has quit [Ping timeout: 252 seconds]
JohnMS_WORK has joined #lisp
gravicappa has quit [Ping timeout: 252 seconds]
mrcom_ has joined #lisp
akoana has left #lisp ["Leaving"]
robdog has joined #lisp
shka_ has joined #lisp
abhixec has quit [Ping timeout: 250 seconds]
robdog has quit [Ping timeout: 252 seconds]
Fare has quit [Ping timeout: 255 seconds]
robdog has joined #lisp
shrdlu68 has joined #lisp
robdog has quit [Ping timeout: 252 seconds]
milivoj has quit [Read error: Connection reset by peer]
milivoj has joined #lisp
nowhereman has quit [Ping timeout: 252 seconds]
orivej has joined #lisp
robdog has joined #lisp
moldybits has quit [Quit: WeeChat 2.4]
moldybits has joined #lisp
beach has left #lisp ["ERC Version 5.3 (IRC client for Emacs)"]
robdog has quit [Ping timeout: 252 seconds]
Kaisyu7 has quit [Quit: ERC (IRC client for Emacs 26.1)]
orivej has quit [Ping timeout: 250 seconds]
robdog has joined #lisp
adip has joined #lisp
robdog has quit [Ping timeout: 252 seconds]
<adip> I'm trying to make an big array in lisp and I get some errors. https://ideone.com/jwWF2c it runs works on my sbcl 1.4 but doesn't on that website (sbcl 1.3) Could you tell me what's wrong with that code?
<no-defun-allowed> (defvar arr (make-array ...))
<adip> also, is this possible to make an array of 2^30 intigers in lisp? sbcl kills itself around 1gb, is this sbcl's own limit?
<no-defun-allowed> no, but you need to tell it to use a bigger heap, which ideone will not do
<jackdaniel> adip: pass "--dynamic-space-size 2048" as an option to sbcl to have a bigger heap
<jackdaniel> or more
<adip> jackdaniel: I've seen it. but I wonder how much space would 2^30 of intigers actually take in lisp
<adip> I'll test it later
<no-defun-allowed> but to fix your problem, DON'T EVER USE SET (or setf) before defining it using DEFVAR
<no-defun-allowed> well, probably 8 bytes on x86_64 per integer with no element-type
<jackdaniel> let's assume integer takes 64bit it will be around 8GB
<jackdaniel> I suppose giving it 9GB should be fine
<adip> ok, thx. I just didn't know how lisp actually stores intigers
<jackdaniel> it is not that your usual lisp implementation has some stupid array representation which doesn't make much practical sense
robdog has joined #lisp
<adip> ?
<jackdaniel> what I'm saying is that there is no reason to think arrays in CL are implemented less optimal than arrays in (say) C++, from the memory perspective
<jackdaniel> array has a header and a pointer to the actual data which is tightly coupled in the memory, header takes probably less 32 bytes, so there you go
<jackdaniel> less than*
<verisimilitude> Portably, there's a limit of 65,535 for an array's size.
<jackdaniel> portably you can't assume that array is not implemented as a list
<verisimilitude> An array index must be a FIXNUM and FIXNUM must be at least sixteen bits.
<jackdaniel> I'm talking about actual implementations
<verisimilitude> It's reasonable to expect O(1) access.
<jackdaniel> you can't expect it *portably*, so be consistent
robdog has quit [Ping timeout: 252 seconds]
<verisimilitude> I'm being consistent.
<jdz> I've heard vector access in hardware is not really constant time (because, you know, hardware).
<jackdaniel> not really, first you go from "portability" angle and then you talk about "reasonable expectations". but I'm done with this dispute.
<verisimilitude> There's cache and other things, but that's still close enough to O(1).
<jackdaniel> not really to what verisimilitude said, not jdz
<jdz> I saw what he said, and I agree with you, jackdaniel.
<verisimilitude> I wasn't trying to argue, so much as just point something important out.
<jdz> Turns out it was not so important after all.
<verisimilitude> We simply disagree, then.
<flip214> well, just turn all L1/L2/L3 caches in the CPU off, then you are O(1)
<jdz> flip214: not really.
<adip> jackdaniel: anyways it works now :D,thx. I know how it works in c, but I have no experience with lisp so I was worrying about how it would be represented in memory.
<flip214> jdz: an array access every minute sounds mostly constant time ;)
<jdz> It's about memory cells, and data is scattered across different chips physically.
<jackdaniel> adip: you may expect with a reasonable certainity that your lisp implementation does it efficiently
<jdz> Mapping addresses to the cells, and accessing them is not constant time.
<flip214> jdz: and, in fact, with old CPUs (z80, 6502) memory access _was_ constant-time - 1 to 8 clock cycles.
<jdz> Yes, 1 to 8 cycles, very constant.
<jackdaniel> adip: same assumption goes for other lisp primitives (as in: you have no reason to expect them to work suboptimal compared to C counterparts, although you may expect that they may be a little slower)
fortitude has quit [Ping timeout: 240 seconds]
<adip> jackdaniel: live is full suprises ;)
orivej has joined #lisp
<jackdaniel> also, needless to say, it is very easy to write suboptimal code in CL
<jackdaniel> someone said: CL is actually two languages: one is for writing programs fast and the other is for writing fast programs
<White_Flame> jdz: some were a constant 1 cycle, some were a constant 8 cycles
<adip> jackdaniel: I do know, at first I tried to make a list with 2^30 elements :^)
<aeth> I find SBCL to be the most useful here because you can just see the x86-64 asm yourself and test your assumptions directly.
<jackdaniel> adip: ah!
<aeth> I wind up knowing more than my C because disassemble is so convenient
<jdz> White_Flame: OK.
<jdz> I'd also claim that today's memory implementations are a bit more sophisticated than what they were back then.
<White_Flame> jdz: memory was faster than CPUs in that era, and they could hide the dram refresh between CPU cycles
<jdz> Right.
asarch has quit [Quit: Leaving]
<verisimilitude> Yes; the processors have gotten worse and the memory's gotten larger.
<jdz> And the grass was greener, too.
<aeth> verisimilitude: More elaborate in an attempt to keep up with expectations of performance increases, not worse
<jdz> Can't stop the Moloch!
* White_Flame does his obligatory pining for venray techologies' cpu-on-dram designs that never shipped
<verisimilitude> We have fantastically complicated stupid processors, sure.
varjag has joined #lisp
<verisimilitude> I, of course, reference the Lisp Machines.
robdog has joined #lisp
<aeth> Well, we finally have a world where 32-64 cores are realistic in mainstream (e.g. x86-64) architectures. Looking forward, that's our future, sooner or later. Lots of cores.
<aeth> Old processors if they could keep up would be so much nicer. One core where you flip back and forth between what you're doing. Deterministic.
<aeth> A B C A B C A B C really fast is simpler than A A A B B B C C C where that might not be the order
<adip> aeth: welcome to numa hell :D
<White_Flame> and of course, more cores equals more pressure on the same memory interface
<verisimilitude> I've been mulling over purchasing a GA144 development board; I expect Chuck Moore's processors actually work, unlike Intel's.
<White_Flame> I just wish the individual cores did more
<White_Flame> with so little working memory per core, it ends up being more like a propeller than a xeon
robdog has quit [Ping timeout: 252 seconds]
<verisimilitude> I enjoyed the paper on implementing MD5 with just a few processors.
<verisimilitude> Even before this I was embracing the idea of multiple entirely disconnected machines than a single machine for everything, though.
<White_Flame> sure, for pipelining a single task, it's okay
<White_Flame> but it's not really in the realm of independent general computing agents
<verisimilitude> That is, I'd rather have a dedicated machine for individual tasks. It's more reliable this way and also permits specialization not otherwise feasible.
<verisimilitude> My machine for reading documents can be different from my machine for playing music, etc.
<verisimilitude> Perhaps if modern machines were more reliable, I'd be more inclined to trust a single one with all of my computing, but I've been bitten hard by having one machine handle everything, only for it to fail or become otherwise unavailable.
<verisimilitude> It's not just the hardware, though. The software sucks too.
adip has left #lisp [#lisp]
<aeth> The point of digital is to move to general purpose. Not quite there, though. You could have a battery-optimized laptop and a powerful workstation, for instance.
<aeth> One machine for each task would be a step back imo
<verisimilitude> The machine can be general purpose, and likely would be, but there's value in heavily specialized interfaces, I think.
<White_Flame> yeah, efficiency
<verisimilitude> A portable music player is a simple example. It's more convenient to carry clipped to my shirt than a laptop is.
robdog has joined #lisp
<buffergn0me> Music players are a great example. I bought an MP3 player again last year because I feel I cannot trust my mobile phone not to run malware and spyware
<buffergn0me> Something I have been thinking about is a client-server SWANK where the editor process is the server, like with the X Window System or Emacs server
<aeth> Size and energy are the main factors, I think.
robdog has quit [Ping timeout: 252 seconds]
dddddd has joined #lisp
<aeth> Mobile's a special case because the ecosystem is so bad even though the hardware should be fine for way more than what smartphones are usually used for.
<buffergn0me> That would make having several machines dedicated to different tasks easy to manage with CL
<aeth> Oh, and of course cost is the third major factor
<buffergn0me> Marketers at companies like Apple love to use the word "ecosystem" to describe their offerings. It implies there is something natural, good, and adaptable about them, which is a complete lie
orivej has quit [Ping timeout: 252 seconds]
marvin2 has joined #lisp
<aeth> Well, it's quantity over quality. Thanks to 'millions of apps' marketers 10 years ago
<jackdaniel> this is all very interesting although I think #lispcafe better fits the bill (topic-wise)
robdog has joined #lisp
rozenglass has quit [Read error: Connection reset by peer]
Cymew has joined #lisp
robdog has quit [Ping timeout: 252 seconds]
<JohnMS_WORK> I bought the Land of Lisp book, what would be a good editor to use on GNU/Linux? Preferably with some kind of highlighting, auto-complete, and debugging capabilities.
robdog has joined #lisp
<no-defun-allowed> Emacs with SLIME
<no-defun-allowed> (also: you will be able to use SBCL without hurting your head if you have SLIME, since it's a much better environment than CLISP's readline and is portable)
robdog has quit [Ping timeout: 252 seconds]
robdog has joined #lisp
hhdave has joined #lisp
robdog has quit [Ping timeout: 252 seconds]
Cymew has quit [Ping timeout: 255 seconds]
Ukari has quit [Remote host closed the connection]
Ukari has joined #lisp
robdog has joined #lisp
gareppa has joined #lisp
scymtym has joined #lisp
robdog has quit [Ping timeout: 252 seconds]
orivej has joined #lisp
robdog has joined #lisp
Cymew has joined #lisp
dmiles has quit [Ping timeout: 245 seconds]
robdog_ has joined #lisp
wanz has quit [Quit: wanz]
dmiles has joined #lisp
robdog has quit [Ping timeout: 252 seconds]
robdog_ has quit [Ping timeout: 252 seconds]
gravicappa has joined #lisp
dddddd_ has joined #lisp
Ukari has quit [Ping timeout: 252 seconds]
dddddd has quit [Ping timeout: 252 seconds]
dddddd_ is now known as dddddd
Ukari has joined #lisp
robdog has joined #lisp
robdog has quit [Ping timeout: 252 seconds]
karlosz has quit [Quit: karlosz]
robdog has joined #lisp
robdog has quit [Ping timeout: 252 seconds]
crsc has quit [Quit: leaving]
igemnace has quit [Quit: WeeChat 2.4]
ggole has joined #lisp
nostoi has joined #lisp
robdog has joined #lisp
robdog has quit [Ping timeout: 252 seconds]
nostoi has quit [Quit: Verlassend.]
<splittist> (still, just) morning
<nalkri> Good (early) afternoon
gareppa has quit [Quit: Leaving]
orivej has quit [Ping timeout: 246 seconds]
orivej has joined #lisp
robdog has joined #lisp
lemoinem is now known as Guest47052
lemoinem has joined #lisp
Aruseus has joined #lisp
Guest47052 has quit [Ping timeout: 268 seconds]
robdog has quit [Ping timeout: 252 seconds]
milanj has joined #lisp
robdog has joined #lisp
wanz has joined #lisp
robdog has quit [Ping timeout: 252 seconds]
selwyn has joined #lisp
wanz has quit [Quit: wanz]
notzmv has quit [Ping timeout: 244 seconds]
robdog has joined #lisp
milanj has quit [Quit: This computer has gone to sleep]
SlashLife has quit [Ping timeout: 268 seconds]
notzmv has joined #lisp
notzmv is now known as Guest56129
cl-arthur has joined #lisp
SlashLife has joined #lisp
robdog_ has joined #lisp
robdog has quit [Ping timeout: 252 seconds]
wanz has joined #lisp
d4ryus has quit [Ping timeout: 240 seconds]
d4ryus has joined #lisp
nalkri has quit [Ping timeout: 240 seconds]
<pjb> verisimilitude: portably the limit on array size is array-total-size-limit which can be as low as 1024 !!! not 65535.
robdog_ has quit [Ping timeout: 252 seconds]
robdog has joined #lisp
m00natic has joined #lisp
keja has joined #lisp
robdog_ has joined #lisp
robdog has quit [Ping timeout: 252 seconds]
sunwukong has joined #lisp
robdog_ has quit [Ping timeout: 240 seconds]
wanz has quit [Quit: wanz]
robdog has joined #lisp
milanj has joined #lisp
milanj has quit [Client Quit]
<shka_> knowing that maximal array size is at minimum 1024 according to the standard can be one of the least usefull trivia in the CL
robdog_ has joined #lisp
robdog has quit [Ping timeout: 252 seconds]
terpri_ has quit [Ping timeout: 245 seconds]
terpri has joined #lisp
wanz has joined #lisp
robdog_ has quit [Ping timeout: 252 seconds]
robdog has joined #lisp
<pjb> shka_: it means that if you want to really write portable array code, you have to take into account array-total-size-limit, and to implement an array of array to go to at least to (expt array-total-size-limit 2) when you need it.
<pjb> Or don't claim your code is conforming!
<shka_> obviously
<ggole> It's this sort of thing that makes people not care at all about whether code is conforming or not.
robdog_ has joined #lisp
scymtym has quit [Ping timeout: 240 seconds]
<pjb> Which is unfortunate.
<pjb> But we could have a CL implementation targetting a 128KB microcontroller…
robdog has quit [Ping timeout: 252 seconds]
crsc has joined #lisp
robdog_ has quit [Ping timeout: 252 seconds]
Lord_of_Life_ has joined #lisp
Lord_of_Life has quit [Ping timeout: 250 seconds]
Lord_of_Life_ is now known as Lord_of_Life
Zaab1t has joined #lisp
lucasb has joined #lisp
robdog has joined #lisp
Zaab1t has quit [Quit: bye bye friends]
robdog has quit [Ping timeout: 252 seconds]
ggole- has joined #lisp
ggole has quit [Ping timeout: 240 seconds]
Achylles has joined #lisp
wanz_ has joined #lisp
wanz has quit [Ping timeout: 245 seconds]
robdog has joined #lisp
Essadon has joined #lisp
Essadon has quit [Max SendQ exceeded]
Essadon has joined #lisp
scymtym has joined #lisp
robdog_ has joined #lisp
robdog has quit [Ping timeout: 252 seconds]
robdog_ has quit [Ping timeout: 252 seconds]
Guest56129 has quit [Ping timeout: 252 seconds]
robdog has joined #lisp
robdog_ has joined #lisp
robdog has quit [Ping timeout: 252 seconds]
lumm has joined #lisp
hil8 has joined #lisp
<Xach> ggole-: i've often thought of having a suite of tests you could run to confirm that the implementation you're using has sane superstandard limits.
<Xach> and behaviors.
<Xach> like, does an (unsigned-byte 8) array written to disk do what you think?
<Xach> do you have bigger limits than the minimums? etc
<Xach> are the char-codes ascii/latin1/unicode
<jackdaniel> cl-autoconfig
<Xach> ./configure ; make ; make instance
<ggole-> Xach: mmm. It seems in practice that people assume sanity and simply discount any implementation that doesn't provide it.
<Xach> ggole-: that seems accurate
<ggole-> But it might be good to be more explicit about what 'sanity' means.
<jackdaniel> ggole-: such tool would be useful for pathnames
<jackdaniel> i.e people are afraid to use pathnames, because they are underspecified
<jackdaniel> so one could define a standard superset defining missing parts and run this against arbitrary implementation
<jackdaniel> and push a feature :good-pathnames
<jackdaniel> #-good-pathnames (error "your pathnames ain't any good")
robdog has joined #lisp
robdog_ has quit [Ping timeout: 252 seconds]
<pjb> Actually, logical pathnames are correctly specified. And if you use explicit translations, then you have total control.
pierpal has joined #lisp
<jackdaniel> by "underspecified" I meant things like symbolic links to directories and such
<jackdaniel> so pathname <-> filesystem quirks
CCDelivery has joined #lisp
<pjb> jackdaniel: there's no notion of symbol link in logical pathnames. So it's not underspecified.
<pjb> Yes, you have to go only logical-pathname -> explicit physical pathname -> file system. Not the other way around.
<jackdaniel> did I mention logical-pathnames? or it was "people are afraid to use pathnames" what indirectly implied that?
<jackdaniel> because I've heard a few times advice like: don't bother with pathnames, use strings and hope that the implementation does the right thing
<jackdaniel> and in truth if they were well-specified osicat's pathname abstraction wouldn't be needed
robdog has quit [Ping timeout: 252 seconds]
robdog has joined #lisp
<pjb> Also, we have the sources of most of the CL implementations, so anybody can take a good long week end or some short holidays, to implement a common physical pathname for POSIX platforms package and integrate it into them.
Bike has joined #lisp
robdog_ has joined #lisp
igemnace has joined #lisp
robdog has quit [Ping timeout: 252 seconds]
sunwukong has quit [Quit: leaving]
robdog_ has quit [Ping timeout: 252 seconds]
igemnace has quit [Read error: Connection reset by peer]
robdog has joined #lisp
igemnace has joined #lisp
warweasle has joined #lisp
robdog_ has joined #lisp
CCDelivery has quit [Remote host closed the connection]
robdog has quit [Ping timeout: 252 seconds]
LiamH has joined #lisp
wanz_ has quit [Quit: wanz_]
robdog has joined #lisp
amerlyq has joined #lisp
wanz has joined #lisp
wanz has quit [Client Quit]
robdog_ has quit [Ping timeout: 252 seconds]
robdog_ has joined #lisp
robdog has quit [Ping timeout: 240 seconds]
milanj has joined #lisp
frodef has quit [Remote host closed the connection]
FreeBirdLjj has joined #lisp
robdog_ has quit [Ping timeout: 252 seconds]
Cymew has quit [Ping timeout: 245 seconds]
q9929t has joined #lisp
robdog has joined #lisp
<pfdietz_> A codified set of de facto standard extensions would be nice. For example: better guarantees of error behavior in safe code, even when the current standard does not require it.
<pfdietz_> Doing my part to get PLN adopted.
robdog_ has joined #lisp
robdog has quit [Ping timeout: 252 seconds]
q9929t has quit [Quit: q9929t]
shrdlu68 has quit [Quit: WeeChat 2.3]
robdog has joined #lisp
ebrasca has quit [Remote host closed the connection]
robdog_ has quit [Ping timeout: 252 seconds]
<scymtym> that's basically what beach's well specified common lisp aims to do
robdog_ has joined #lisp
robdog has quit [Ping timeout: 252 seconds]
robdog_ has quit [Ping timeout: 252 seconds]
d4ryus has quit [Ping timeout: 252 seconds]
d4ryus has joined #lisp
robdog has joined #lisp
undiscovered has joined #lisp
hil8 has quit [Ping timeout: 250 seconds]
abhixec has joined #lisp
sjl_ has joined #lisp
Fare has joined #lisp
gravicappa has quit [Ping timeout: 252 seconds]
gravicappa has joined #lisp
robdog has quit [Ping timeout: 252 seconds]
dale_ has joined #lisp
dale_ is now known as dale
robdog has joined #lisp
robdog has quit [Ping timeout: 252 seconds]
Achylles has quit [Read error: Connection reset by peer]
fortitude_ has joined #lisp
random-nick has joined #lisp
robdog has joined #lisp
jprajzne has quit [Remote host closed the connection]
gravicappa has quit [Ping timeout: 255 seconds]
robdog has quit [Ping timeout: 240 seconds]
robdog has joined #lisp
robdog_ has joined #lisp
<Xach> argh! mcclim bugs on this of all days!
Inline has joined #lisp
robdog has quit [Ping timeout: 252 seconds]
robdog has joined #lisp
* Xach gets to bugfiling
marcoecc has joined #lisp
robdog_ has quit [Ping timeout: 252 seconds]
<jackdaniel> Xach: give me a few minutes
drl has quit [Ping timeout: 240 seconds]
drl has joined #lisp
<jackdaniel> Xach: please try pulling now
robdog has quit [Ping timeout: 252 seconds]
<Xach> OK!
<Xach> looks good
vilivulpine has quit [Remote host closed the connection]
<jackdaniel> thanks
JohnMS_WORK has quit [Read error: Connection reset by peer]
robdog has joined #lisp
rippa has joined #lisp
Josh_2 has quit [Remote host closed the connection]
Josh_2 has joined #lisp
robdog_ has joined #lisp
robdog has quit [Ping timeout: 252 seconds]
notzmv has joined #lisp
heisig has joined #lisp
mrcom_ has quit [Read error: Connection reset by peer]
mrcom_ has joined #lisp
robdog_ has quit [Ping timeout: 252 seconds]
aeth has quit [Ping timeout: 252 seconds]
nalkri has joined #lisp
jmercouris has joined #lisp
<jmercouris> (/ 40200 1440) --> returns a fraction, I want a ceiling integer
<jmercouris> I tried (ceiling (/ 40200 1440)), again, a fraction
<jmercouris> which doesn't make sense to me
aeth has joined #lisp
<jmercouris> it returned 28 and then on a new line -1/12
<jmercouris> is ceiling returning multiple values?
<jmercouris> how can a remainder be -1/12???
<Josh_2> CL-USER> (ceiling (/ 40200 1440)) 28 (5 bits, #x1C, #o34, #b11100) -1/12 (-0.083333336, -25/3%)
<White_Flame> because you're rounding up
<jmercouris> wouldn't the remainder be then positive?
<White_Flame> if you did floor, it would be more like standard division
<jmercouris> maybe that's what's throwing me off here, mixing up the second value
<jmercouris> okay, and when I don't do a multiple-value-bind, I'll just get the first value right?
<White_Flame> yes
<jmercouris> perfect, thanks for confirming
<jmercouris> I was having a bit of a mental crisis :D
<jmercouris> that positive negative thing really threw me off
nalkri has quit [Read error: Connection reset by peer]
nalkri has joined #lisp
<_death> also you can pass the numerator/denominator straight to ceiling
jack_rabbit has quit [Ping timeout: 245 seconds]
<jmercouris> I saw those as optional arguments
<jmercouris> I think that is implementation specific though
<jmercouris> because in my echo area it says &optional (sb-kernel::divisor 1) for the signature
<TMA> jmercouris: (eql (apply #'+ (multiple-value-list (ceiling (/ 40200 1440)))) (/ 40200 1440)) ; => T
d4ryus has quit [Ping timeout: 252 seconds]
<jmercouris> TMA: I don't understand what you are trying to tell me
<jmercouris> I understand the code you've written, but what are you saying?
<heisig> jmercouris: Simply use (ceiling 40200 1440). It is portable and does exactly what you want.
<_death> jmercouris: it just means that sb-kernel::divisor was used as a parameter name.. if you want to know whether something is implementation specific or not, the place to look in is the CLHS
<TMA> jmercouris: that's why the remainder is negative -- so that when you add it back you get where you started from
<jmercouris> _death: aha!
<jackdaniel> he shows you how you could easily ansewr your own question without asking if it returns mutliple-values and "I'll just get the first alue right?"
<jmercouris> jackdaniel: nope, that was my first assumption as well
d4ryus has joined #lisp
<jmercouris> but it turns out to be false as you can see :D
<jmercouris> sorry for all of this rubber ducking
<jackdaniel> right, mvc
<jmercouris> so you can use ceiling almost like modulo in a way with the second parameter
<White_Flame> the exact same equality should hold true for FLOOR as well
<White_Flame> since it will just round down, and return a positive remainder to add back into the mix
<jmercouris> very interesting, I've never seen a floor with two arguments in another language
klltkr has quit [Ping timeout: 258 seconds]
<jmercouris> heisig: I've done it that way, thank you for the suggestion
<TMA> jmercouris: microsoft excel has it too (of sorts -- you cannot round up to multiples of an arbitrary number, just to powers of ten)
<jmercouris> TMA: I'm not well versed in excel, but good to know I guess :D
Ukari has quit [Ping timeout: 255 seconds]
<TMA> jmercouris: sorry floor/ceiling is to an arbitrary multiple. rounding to nearest is to powers of 10
<jmercouris> TMA: no worries, I don't even have a license to excel :)
Fare has quit [Ping timeout: 245 seconds]
Ukari has joined #lisp
robdog has joined #lisp
heisig has quit [Ping timeout: 245 seconds]
jmercouris has quit [Remote host closed the connection]
robdog has quit [Ping timeout: 252 seconds]
robdog has joined #lisp
ggole- has quit [Quit: Leaving]
cl-arthur has quit [Remote host closed the connection]
abhixec has quit [Quit: leaving]
orivej has quit [Ping timeout: 240 seconds]
robdog has quit [Ping timeout: 252 seconds]
pierpal has quit [Quit: Poof]
pierpal has joined #lisp
robdog has joined #lisp
orivej has joined #lisp
robdog has quit [Ping timeout: 252 seconds]
Oladon has joined #lisp
robdog has joined #lisp
pierpal has quit [Quit: Poof]
heisig has joined #lisp
pierpal has joined #lisp
orivej has quit [Ping timeout: 245 seconds]
robdog has quit [Ping timeout: 252 seconds]
robdog has joined #lisp
hhdave has quit [Ping timeout: 244 seconds]
<p_l> Excel is pretty nifty platform
<p_l> I remember years ago someone here making money using ECL inside Excel
robdog has quit [Ping timeout: 252 seconds]
robdog has joined #lisp
<pfdietz_> Excel Common Lisp :)
<erkin> oh no
Jesin has quit [Quit: Leaving]
robdog has quit [Ping timeout: 252 seconds]
<selwyn> do you remember what they were doing to make money
Jesin has joined #lisp
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #lisp
phoe has quit [Ping timeout: 240 seconds]
m00natic has quit [Remote host closed the connection]
selwyn has quit [Remote host closed the connection]
FreeBirdLjj has quit [Remote host closed the connection]
Jesin has quit [Remote host closed the connection]
FreeBirdLjj has joined #lisp
karlosz has joined #lisp
jmercouris has joined #lisp
<jmercouris> hi everyone, I'm having a problem, maybe I'm too tired http://dpaste.com/2DRWQ86
<jmercouris> for some reason time-to-payment is a negative value
FreeBirdLjj has quit [Ping timeout: 240 seconds]
karlosz has quit [Client Quit]
<jmercouris> here is CURRENT-UNIX-TIME for posterity: http://dpaste.com/1AQE2RX
polezaivsani has joined #lisp
drl has quit [Quit: Ex-Chat]
<heisig> jmercouris: You could bind (current-unix-time) to a variable and then (assert (> current last-payment). Assertions are your friend.
Jesin has joined #lisp
<jmercouris> I could yes
<jmercouris> but it doesn't work even when I supply dates in the past by like 1 day
<jmercouris> which doesn't make sense
robdog has joined #lisp
<heisig> The other thing: I am always scared to see numbers other than zero or one in the source code.
<heisig> You should use something like (load-time-value (compute-length-of-month)).
<jmercouris> it still results in 43200
<jmercouris> but ok, it is cleaner, I will give you that
<heisig> Try to give your bugs no place to hide.
karlosz has joined #lisp
<pjb> jmercouris: earlier dates are smaller than later dates.
<jmercouris> pjb: yes.
<jmercouris> are you giving me a hint here? have I swapped the negatives somewhere?
robdog has quit [Ping timeout: 252 seconds]
<pjb> Why are you using this "unix time" when we have perfectly good universal-times in CL ?
<pjb> jmercouris: it looks ok to me too… :-/
<jmercouris> because my database time is universal-time
<jmercouris> I mean unix time
<jmercouris> and it isn't my database, it is someone elses
<Bike> you said it doesn't work when you supply dates in the past by a day, what about (time-until-next-payment (current-unix-time))?
<pjb> Also, if last-payment contains a number of day, 43200 looks like a very long month.
<Bike> just like, sanity check.
<jmercouris> Bike: that returns 30, which makes sense
<pjb> Also, unix time AFAIK, is a number of second since epoch, not a number of day.
<jmercouris> it is indeed the number of seconds
<jmercouris> if you look at the final line of the function
<pjb> (/ 43200 60 60 24) #| --> 1/2 |# 43200 60 is half a day!
<pjb> s/60 is/is/
<Bike> yeah, what?
<jmercouris> I convert seconds to days
<jmercouris> with (ceiling time-to-payment 1440)
<Bike> you have 43200 as the number of seconds in a month.
<Bike> there are more than 43200 seconds in a month though.
<jmercouris> Right, I am missing a 60
<pjb> (defun seconde (x) x) (defun minute (x) (* 60 x)) (defun hour (x) (* 60 60 x)) (defun day (x) (* 60 60 24 x)) (defun month (x) (* 60 60 24 30 x))
<pjb> (month 1) #| --> 2592000 |#
<pjb> (+ last-payment (month 1)) …
<Bike> like (* 60 60 60 24)? that's sixty days, so kind of weird for a month but i guess it's fine
<Bike> doublemonth
robdog has joined #lisp
<jmercouris> okay so, 60 seconds * 24 hours * 30 days
<pjb> jmercouris: nope.
<jmercouris> am I missing something???
<pjb> jmercouris: (month 1)
<Bike> there's uh
<Bike> sixty seconds in a minute
<pjb> jmercouris: you're missing abstraction!
<Bike> and sixty minutes in an h our
<Bike> so, you're missing minutes?
<jmercouris> so (* 60 60 24 30)
<Bike> and, yes, probably abstracting this would be helpful.
<jmercouris> okay so I'm calculating next-payment correctly now..
milivoj has quit [Quit: milivoj]
<jmercouris> my function finally works
<jmercouris> thank you, I forgot about minutes in an hour
<jmercouris> I'm sorry guys for wasting your time, I have a deadline and have been working exhausted
<jmercouris> resulting in me wasting my time on these trivial things
robdog has quit [Ping timeout: 252 seconds]
Jesin has quit [Quit: Leaving]
<Xach> heisig: hello!!
<heisig> Xach: Dammit. Give me two minutes...
Jesin has joined #lisp
<verisimilitude> I'm glad you corrected me there, pjb.
MichaelRaskin has joined #lisp
<verisimilitude> Of course, the easy way to handle this is to simply ASSERT that the limits are within the bounds you need.
<pjb> Or have more fun, implementing a big array abstraction of arrays of arrays…
<pjb> Can come handy, when you also want array slices.
<heisig> Xach: Fixed. Sorry about that. I should really start testing each subsystem independently.
<Xach> heisig: do you read rss at all? like with a feed reader?
robdog has joined #lisp
<heisig> Xach: No. Is that how I would usually receive failure reports?
<Xach> heisig: no, it is just an extra way
<heisig> Well, after I stared using IRC in 2018, I might as well start using RSS in 2019 :)
<heisig> *started
<Xach> ha! well, if you subscribe to http://report.quicklisp.org/feeds/project/petalisp.rss you will see failure reports
<Xach> i use a program called feedly but there are many more from which to choose
robdog has quit [Ping timeout: 252 seconds]
<MichaelRaskin> I should move more of stream-fetcher code into published part of thoughtful theridion (it fetches from HTML, but RSS is just HTML if you lack care), and make storage backends pluggable (right now everything goes into an SQL DB, end of story)
<pjb> heisig: use a RSS->IRC gateway.
scymtym has quit [Ping timeout: 240 seconds]
<jmercouris> or use elfeed!
robdog has joined #lisp
<Xach> so many options
milivoj has joined #lisp
<pjb> Computer must adapt to their human users. Choose your own prefered interface, and then make the computer address you only with that interface!
robdog has quit [Ping timeout: 252 seconds]
lnostdal has quit [Quit: https://www.Quanto.ga/ -- Immutable state trading system in Clojure]
im0nde has quit [Ping timeout: 250 seconds]
karlosz has quit [Quit: karlosz]
lnostdal has joined #lisp
robdog has joined #lisp
nalkri has quit [Ping timeout: 246 seconds]
karlosz has joined #lisp
lyf[kde] has joined #lisp
robdog has quit [Ping timeout: 252 seconds]
pierpal has quit [Quit: Poof]
pierpal has joined #lisp
lyf[kde] has quit [Remote host closed the connection]
im0nde has joined #lisp
robdog has joined #lisp
jmercouris has quit [Remote host closed the connection]
karlosz has quit [Quit: karlosz]
random-nick has quit [Read error: Connection reset by peer]
robdog has quit [Ping timeout: 252 seconds]
<polezaivsani> hey! what's the good place to get the ansi draft on cl in texi form from? tried the first github hit and got swamped by texinfo errors during make...
robdog has joined #lisp
<jackdaniel> polezaivsani: I think there is no port of ansi standard to texi (it were originally written in tex)
<jackdaniel> http://cvberry.com/tech_writings/notes/common_lisp_standard_draft.html has old and cleaned up source code
robdog has quit [Ping timeout: 252 seconds]
<polezaivsani> jackdaniel: there is a dpans2texi project on github that convert tex sources into dvi, though it failed for me, and i'm a bit reluctant to dive into texinfo details...
robdog has joined #lisp
<jackdaniel> in that case you may try using texinfo 4.x (newest version 6.x broke a lot of texi documents written with 4.x in mind)
Ekho has quit [Quit: An alternate universe was just created where I didn't leave. But here, I left you. I'm sorry.]
<jackdaniel> and /maybe/ it will work
ravenousmoose has joined #lisp
<polezaivsani> thanks, jackdaniel! will see i can get it to work that way. it does make good sense though as the project itself seem pretty dormant since 2013
<jackdaniel> good luck!
<polezaivsani> wonder how other people reference the std? is it clhs?
robdog has quit [Ping timeout: 252 seconds]
<Xach> polezaivsani: i use browser shortcuts and browse it as html online.
izh_ has joined #lisp
milanj has quit [Quit: This computer has gone to sleep]
nowhereman has joined #lisp
heisig has quit [Remote host closed the connection]
phoe has joined #lisp
mingus has quit [Read error: Connection reset by peer]
nowhereman has quit [Ping timeout: 257 seconds]
mingus has joined #lisp
ravenousmoose has quit [Ping timeout: 258 seconds]
Ekho has joined #lisp
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
robdog has joined #lisp
zmt01 has joined #lisp
robdog has quit [Ping timeout: 252 seconds]
robdog has joined #lisp
zmt00 has quit [Ping timeout: 240 seconds]
orivej has joined #lisp
Oladon has quit [Quit: Leaving.]
robdog_ has joined #lisp
<_death> the clhs is the standard, for practical purposes.. the draft is used in projects that annotate or present in other form
robdog has quit [Ping timeout: 252 seconds]
robdog_ has quit [Ping timeout: 252 seconds]
robdog has joined #lisp
milanj has joined #lisp
milanj has quit [Read error: Connection reset by peer]
milanj has joined #lisp
robdog has quit [Ping timeout: 252 seconds]
milanj has quit [Ping timeout: 240 seconds]
ober has joined #lisp
<ober> ,clhs define
vlatkoB has quit [Remote host closed the connection]
<Bike> it would be "clhs define", but "define" isn't actually the name of anything standar
karlosz has joined #lisp
<phoe> ober: DEFINE-COMPILER-MACRO?
<phoe> it is a facility for defining a thing called compiler macros.
<phoe> For each function that you define, you can also define a compiler macro.
<phoe> When the compiler encounters the call to that function, it will expand that compiler macro instead and then try compiling its result.
<ober> debugging a lot of (define convert-json-templete "form data") stuff
<ober>
Josh_2 has quit [Read error: Connection reset by peer]
<phoe> ober: can you link us to source?
<phoe> DEFINE is not a standard Common Lisp macro.
aeth has quit [Ping timeout: 246 seconds]
<phoe> this is where the macro DEFINE is defined.
<phoe> Do you use macrostep-mode for debugging macros?
aeth has joined #lisp
<phoe> If not, please learn it - it is a lifesaver.
<ober> just Naevius Sutorius Macro
<ober> I'll take a look at that. thanks
<phoe> macrostep-mode allows you to expand macros in-place in your code, recursively. This makes it perfect for figuring out what a macro actually does.
<_death> using string templates to generate lisp is like using a knife to fill a cup
<ober> _death: how else do you bleed your enemies?
<ober> ok so yeah mustache makes sense.
<ober> thought it was a compiler macro
aeth has quit [Ping timeout: 245 seconds]
<_death> use ordinary lisp (e.g., backquote) to construct lisp forms and then pretty-print
aeth has joined #lisp
Ricchi has joined #lisp
<ober> #<PACKAGE "COMMON-LISP-USER"> between the following symbols: MUSTACHE:DEFINE, COMMON-LISP-USER::DEFINE
<ober> odd
<ober> agreed.
<ober> just cribbing some swagger code
azrazalea_ has quit [Quit: ZNC 1.6.2+deb2~bpo8+1 - http://znc.in]
robdog has joined #lisp
pierpal has quit [Ping timeout: 252 seconds]
polezaivsani has quit [Ping timeout: 245 seconds]
azrazalea has joined #lisp
aeth has quit [Ping timeout: 240 seconds]
robdog has quit [Ping timeout: 252 seconds]
aeth has joined #lisp
karlosz has quit [Quit: karlosz]
polezaivsani has joined #lisp
Zaab1t has joined #lisp
Josh_2 has joined #lisp
igemnace has quit [Quit: WeeChat 2.4]
Zaab1t has quit [Quit: bye bye friends]
robdog has joined #lisp
warweasle has quit [Quit: later dudes!]
Fare has joined #lisp
karlosz has joined #lisp
asarch has joined #lisp
robdog has quit [Ping timeout: 252 seconds]
robdog has joined #lisp
aeth has quit [Ping timeout: 244 seconds]
aeth has joined #lisp
robdog_ has joined #lisp
robdog has quit [Ping timeout: 252 seconds]
LiamH has quit [Quit: Leaving.]
robdog_ has quit [Ping timeout: 252 seconds]
ym555 has joined #lisp
Aruseus has quit [Remote host closed the connection]
Bike has quit []
robdog has joined #lisp
Fare has quit [Ping timeout: 246 seconds]
robdog has quit [Ping timeout: 252 seconds]
bjorkintosh has joined #lisp
scymtym has joined #lisp
amerlyq has quit [Quit: amerlyq]
robdog has joined #lisp
hlavaty has joined #lisp
robdog has quit [Ping timeout: 252 seconds]
izh_ has left #lisp [#lisp]
Jesin has quit [Ping timeout: 240 seconds]
robdog has joined #lisp
<polezaivsani> jackdaniel: you where right! it went without a hiccup with a texinfo 4.13. And i get to keep my habbits - all the ansi cl accessible via info in emacs ,*
<polezaivsani> jackdaniel: thanks a ton once again
gxt has joined #lisp
spoeplau has joined #lisp
robdog has quit [Ping timeout: 252 seconds]
sjl_ has quit [Ping timeout: 245 seconds]
robdog has joined #lisp
robdog has quit [Ping timeout: 252 seconds]
<asarch> In C++ you can check if the file is actually opened with: if (file) ..., how would you do the same with Common Lisp if: (if (file)...)?
<asarch> I mean, to check if file is non-nil
pierpal has joined #lisp
<asarch> (if (! file)...)?
<sjl> (if file ... ...) or if you want to really take the Norvig style guide to heart: (if (not (null file)) ... ...)
<sjl> But you should probably be using with-open-file to manage opening (and properly closing) files if possible, not doing lots of checks yourself
lucasb has quit [Quit: Connection closed for inactivity]
Bike has joined #lisp
<asarch> Thank you sjl!
<asarch> Thank you very much :-)
pierpal has quit [Ping timeout: 255 seconds]
<asarch> If I access to a slot with (with-slots (x y z) point (....)), do I still need to define the :accessor for each slot?
nirved has quit [Killed (adams.freenode.net (Nickname regained by services))]
nirved has joined #lisp
<spoeplau> asarch: no, you can access slots directly via slot-value and with-slots
<asarch> Thank you!
<asarch> Thank you very much spoeplau :-)
<pjb> (with-open-file (file path :if-does-not-exist nil) (when file …))
ebrasca has joined #lisp
<asarch> When I try to define the callback for the motion function, I get:
<asarch> "CL-GLUT:MOTION-FUNC already names an ordinary function or a macro."
<asarch> What does it mean?
<pjb> It leans that CL-GLUT:MOTION-FUNC already names a function or a macro.
<pjb> asarch: are you implementing CL-GLUT?
<asarch> No, I don't
<pjb> Then why do you define your callback in the CL-GLUT package? It's not yours!
<asarch> Actually I'm porting this GLUT program from Perl to Common Lisp: CL-GLUT:MOTION-FUNC already names an ordinary function or a macro.
<pjb> Use your own packages!
<asarch> I'm just following the way they do in the examples from CL-OPENGL
<Josh_2> With hunchentoot, I created my own errors directory and errors files and set the :error-template-directory to the errors directory however, when I go to a link that doesn't exist
<Josh_2> It doesn't show my error page Q_Q
<asarch> For example, the CLOS version of the Gears: http://paste.scsys.co.uk/583379
<pjb> asarch: what's the first toplevel form in that paste?
orivej has quit [Ping timeout: 245 seconds]
<asarch> (in-package #:cl-glut-examples)
<asarch> ?
<pjb> Why didn't you follow this example?
xkapastel has joined #lisp
<pjb> Define your own package!
<asarch> That file is: http://paste.scsys.co.uk/583380
<spoeplau> asarch: it seems that your code assumes CL-GLUT:MOTION-FUNC to be a generic function (so that you can define a method on it), but apparently in your actual version of CL-GLUT it's a regular function or a macro, hence the compiler error...
<asarch> Oh :-(
<pjb> The point is that the GLUT package is free to define whatever it wants. You are not free to clobber it! Use your own symbols in your own packages!
<pjb> Josh_2: (setf a b) (setf b 2) ; what's the value of a?
<asarch> But even if I defined my own package: (defpackage :asarch ...) (in-package :asarch), I would still need to define the callbacks with (glut:...), right?
<pjb> asarch: Normally callbacks are passed as argument to some other function, so you can name the callback as you want (or even, not name it at all, just a lambda).
<Josh_2> pjb: that's not the actual code as it is laid out in the file
<Josh_2> cos its laid out over two different files
<pjb> Josh_2: then I don't see the problem.
<pjb> As in #lispweb perhaps?
<asarch> If I would (in-package :glut), I could only (defmethod motion-func ((window flor)) ...), right?
<pjb> Asl
<pjb> Ask
<Josh_2> Well idk why hunchentoot isn't using my error html files Q_Q
<pjb> asarch: you cannot because it's not a generic function.
<Josh_2> I shall go #lispweb and see
<asarch> (glut:motion-func #'(lambda (x y) ...))?
<pjb> looks better.
robdog has joined #lisp
<pjb> asarch: note that since it's a C callback, you need to define ith with cffi:defcallback
<spoeplau> that one also matches the definition of glut:motion-func in the sources of cl-opengl: it's a wrapper around a C function that takes a single function pointer (https://github.com/3b/cl-opengl/blob/c664f14d2d750ab2c49796e760c7faf760f6ca8f/glut/callbacks.lisp#L70)
<pjb> (cffi:defcallback my-callback …) (glut:motion-func (cffi:callback my-callback))
<asarch> That's an awful bug, isn't it?
<pjb> It's a dumb bug of yours!
<pjb> You should read the manual of cffi.
robdog has quit [Ping timeout: 252 seconds]
<Josh_2> Whats the recommended webserver database for use with cl and library?
<asarch> What would be the point of CFFI if I could enjoy the what CLOS gives me directly?
<asarch> s/the what/what/
<pjb> Josh_2: I use Postgres for RDBMS, for OODBMS, my choice is not made. There are several.
<Josh_2> If its good enough for you, then postgres is good enough for me
<Josh_2> Thanks :)