<phoe> is FOO defined early enough?
<jasom> I haven't found an implementation that *doesn't* like it, and it seems correct with my first reading of the spec
<phoe> also FOO isn't returned, but that's a detail
<jasom> it's fine to not return foo
<phoe> good
<phoe> I think it's valid, AFAIK the variables are first collected and bound, and only then computation progresses
<Bike> "The var argument is bound as if by the construct with to a zero of the appropriate type."
<Bike> seems okay to me.
<phoe> s/computation/loop
k-stz has quit [Remote host closed the connection]
bkst has quit [Ping timeout: 255 seconds]
red-dot has joined #lisp
fikka has joined #lisp
knobo1 has quit [Ping timeout: 248 seconds]
TCZ has joined #lisp
fikka has quit [Ping timeout: 255 seconds]
bkst has joined #lisp
turkja has joined #lisp
shenghi has quit [Ping timeout: 276 seconds]
mejja has quit [Quit: mejja]
isoraqathedh has quit [Ping timeout: 268 seconds]
isoraqathedh_ has joined #lisp
shenghi has joined #lisp
isoraqathedh_ is now known as isoraqathedh
fikka has joined #lisp
fikka has quit [Ping timeout: 255 seconds]
jack_rabbit_ has quit [Ping timeout: 248 seconds]
pareidolia has quit [Ping timeout: 240 seconds]
nirved has quit [Quit: Leaving]
pareidolia has joined #lisp
EvW1 has quit [Ping timeout: 276 seconds]
jack_rabbit_ has joined #lisp
fikka has joined #lisp
yangby has joined #lisp
mson has joined #lisp
fikka has quit [Ping timeout: 268 seconds]
igemnace has joined #lisp
yangby has quit [Client Quit]
jack_rabbit_ has quit [Ping timeout: 248 seconds]
neoncontrails has joined #lisp
Guest24518 has quit [Ping timeout: 276 seconds]
zachk has quit [Quit: night night]
zooey has quit [Ping timeout: 248 seconds]
zooey has joined #lisp
<aeth> Why does clx have a separate opengl?
margeas has quit [Ping timeout: 248 seconds]
Tobbi has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
fikka has joined #lisp
jack_rabbit_ has joined #lisp
fikka has quit [Ping timeout: 276 seconds]
<Xach> separate from what?
<Xach> clx's predates cl-opengl by a long long long long time.
sz0 has quit [Quit: Connection closed for inactivity]
<aeth> Is there anything that stops a CL X client from using cl-opengl? It looks like there's something called DRI that bypasses the X server. https://en.wikipedia.org/wiki/Direct_Rendering_Infrastructure
fikka has joined #lisp
<aeth> Unless I'm mistaken, it looks like it might be possible to write a pure CL 3D application for Linux except for OpenGL (and sound?) by writing an X client.
orivej has quit [Ping timeout: 276 seconds]
<aeth> Unless cl-opengl for some reason requires xlib...
<aeth> The Windows backend would still have to use more foreign code, either directly or through something like cl-sdl2.
fikka has quit [Ping timeout: 260 seconds]
smurfrobot has joined #lisp
smurfrobot has quit [Ping timeout: 248 seconds]
fikka has joined #lisp
fikka has quit [Ping timeout: 260 seconds]
<aeth> I'm starting to think that the only way I can get the level of control I want for my game engine is to either write my own X client or write my own wrapper to xlib and then keep the cl-sdl2 backend for Windows until I eventually replace it with something built on the Windows API directly.
jibanes has quit [Remote host closed the connection]
fikka has joined #lisp
emaczen has joined #lisp
<emaczen> how can I capture #'time output into a string?
<aeth> rebind its output temporarily.
<aeth> I was going to say *standard-output* but it's actually *trace-output*, apparently
<pfdietz_> Time prints to a stream, so with-output-to-string lets you bind the appropriate stream variable to a string-stream, then return the string.
<aeth> (with-output-to-string (string-stream) (let ((*trace-output* string-stream)) (time (+ 1 2))))
<Bike> why do you want to do that?
<emaczen> aeth: I was looking for *trace-output* -- I literally tried all streams except that one!
<pfdietz_> Or just (with-output-to-string (*trace-output*) ...)
<pfdietz_> CLHS
<emaczen> pfdietz_: Yep that's what I've been doing
fikka has quit [Ping timeout: 248 seconds]
<pfdietz_> CLHS: time
<pfdietz_> Using get-internal-run-time might be more useful.
<aeth> Generally, for timing you want this (* (/ internal-time-units-per-second) (get-internal-real-time)) unless its precision is too low (then you might need a foreign library? strange how its precision in SBCL is lower than SBCL's time precision)
milanj has quit [Quit: This computer has gone to sleep]
<aeth> Except you probably don't want rational, so you probably want to define a constant that's e.g. (coerce (/ internal-time-units per-second) 'double-float) because otherwise SBCL will complain (at max optimization level) that it can't really optimize it.
<aeth> and if SBCL can't, they all probably can't
<aeth> double-float will almost certainly cons under normal circumstances, which could affect your timing. One way to avoid this that might work on some implementations (it works in SBCL) is to work with double-floats stored to arrays of :element-type double-float.
<aeth> e.g. (defconstant +seconds-per-time-unit+ (coerce (/ internal-time-units-per-second) 'double-float)) (declaim (inline %current-second)) (defun %current-second () "Converts internal CL time to a double-float second." (* (get-internal-real-time) +seconds-per-time-unit+))
<aeth> You'll want to inline that function because (1) it's trivial arithmetic that should never change and (2) otherwise you'll allocate a double-float when you can avoid that by setting to double-float arrays
python476 has joined #lisp
<aeth> #'%current-second will appear to cons if you disassemble it, but if you use it in a setf to an array of :element-type 'double-float it should potentially be non-consing, depending on if the implementation is that advanced. SBCL handles it afaik.
<aeth> You can define a struct that's really just a vector if you want to have a higher level interface above the array, e.g. (defstruct (times (:type (vector double-float)) (:conc-name nil)) (current-time 0d0 :type double-float) ...) and make sure to always setf values of that struct with no non-constant intermediate doubles.
phadthai has quit [Ping timeout: 240 seconds]
fikka has joined #lisp
jibanes has joined #lisp
fikka has quit [Ping timeout: 260 seconds]
<aeth> This portable code should be non-consing in SBCL for a time struct of 3 values: (defun time-diff (times) (declare ((simple-array double-float (3)) times) (optimize (speed 3))) (setf (new-time times) (%current-second) (time-diff times) (- (new-time times) (current-time times)) (current-time times) (new-time times)) times)
<aeth> This assumes current-time has already been set to the current time.
<aeth> I probably could have said this in far fewer IRC lines if Lisp paste was still up.
fikka has joined #lisp
quazimodo has quit [Ping timeout: 260 seconds]
<pfdietz_> Or use single floats, which I believe in SBCL 64 bit are non-consing.
<aeth> single-floats should be non-consing in most if not all 64 bit implementations, but it afaik depends on the time interval you're working with. If you do a short non-consing workaround and then coerce the end result to 'single-float, if you're careful, you shouldn't cons anywhere along the line
<aeth> double-floats will definitely work for more time intervals
fikka has quit [Ping timeout: 268 seconds]
<aeth> oh oops, I used the name time-diff twice
<aeth> The custom function should be update-time-diff and then you can add one more function to get the single-float value, which won't cons: (defun time-diff-to-single (times) (declare ((simple-array double-float (3)) times) (optimize (speed 3))) (coerce (time-diff times) 'single-float))
<aeth> I use something very similar and I just tested these in the REPL and they should be non-consing in SBCL. (Other implementations might cons, but if they do, someone should probably submit a patch. The hardest one to patch would be CLISP because it doesn't even have double-float arrays.)
TCZ has quit [Quit: Leaving]
fiddlerwoaroof has quit [Read error: Connection reset by peer]
fiddlerwoaroof has joined #lisp
Bike has quit [Quit: Lost terminal]
fikka has joined #lisp
<aeth> Something like this: https://gitlab.com/snippets/1687407
<aeth> and it should match the first line of SBCL's time, that says e.g. "3.610 seconds of real time"
d4ryus1 has joined #lisp
fikka has quit [Ping timeout: 260 seconds]
phadthai has joined #lisp
d4ryus has quit [Ping timeout: 248 seconds]
eSVG has joined #lisp
fikka has joined #lisp
fikka has quit [Ping timeout: 255 seconds]
<aeth> It doesn't appear to cons in the disassemblies. It does appear to cons slightly when I run it repeatedly in sb-profile:profile, but I think that that's the struct itself. (declare (dynamic-extent ...)) might even be able to get rid of that. (room) doesn't show up any double-floats so it's probably good enough in SBCL. I'm not sure how I could profile other implementations to check.
tonton has quit [Ping timeout: 255 seconds]
<aeth> oooh, can't stack allocate it.
lieven has quit [Ping timeout: 260 seconds]
fikka has joined #lisp
sz0 has joined #lisp
Bike has joined #lisp
fikka has quit [Ping timeout: 255 seconds]
kmb has quit [Quit: kmb]
fikka has joined #lisp
lieven has joined #lisp
dieggsy has quit [Quit: ERC (IRC client for Emacs 27.0.50)]
tonton has joined #lisp
damke has joined #lisp
fikka has quit [Ping timeout: 260 seconds]
damke_ has quit [Read error: Connection reset by peer]
fikka has joined #lisp
mson has quit [Quit: Connection closed for inactivity]
asarch has quit [Quit: Leaving]
dddddd has quit [Remote host closed the connection]
fikka has quit [Ping timeout: 276 seconds]
phadthai has quit [Ping timeout: 268 seconds]
fikka has joined #lisp
hooman has joined #lisp
whoman has quit [Remote host closed the connection]
hooman has quit [Remote host closed the connection]
<drmeister> I'm using ASDF to build a monolithic fasl file for several systems that have dependencies between them.
<drmeister> I wrote this file: build-cando.lisp
<drmeister> It uses (asdf:load-asd ...) for every dot-asd file that is part of the final monolithic bundle
whoman has joined #lisp
whoman has quit [Remote host closed the connection]
<drmeister> The system looks like this
fikka has quit [Ping timeout: 255 seconds]
<drmeister> That's the build-cando.asd file.
<drmeister> To build this I load the first file and then use (asdf:make :build-cando)
<drmeister> If anyone has recommendations on better ways to do this - I'd love to hear them.
myrkraverk_ has joined #lisp
myrkraverk has quit [Ping timeout: 248 seconds]
myrkraverk_ is now known as myrkraverk
pfdietz_ has quit []
fikka has joined #lisp
fikka has quit [Ping timeout: 260 seconds]
dieggsy has joined #lisp
fikka has joined #lisp
dieggsy has quit [Quit: ERC (IRC client for Emacs 27.0.50)]
fikka has quit [Ping timeout: 268 seconds]
dieggsy has joined #lisp
dieggsy has quit [Remote host closed the connection]
mson has joined #lisp
EvW has joined #lisp
python476 has quit [Ping timeout: 255 seconds]
fikka has joined #lisp
dieggsy has joined #lisp
fikka has quit [Ping timeout: 276 seconds]
fikka has joined #lisp
ryanbw has joined #lisp
terpri has quit [Remote host closed the connection]
fikka has quit [Ping timeout: 260 seconds]
pierpa has quit [Quit: Page closed]
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
whoman has joined #lisp
whoman has quit [Remote host closed the connection]
fikka has joined #lisp
whoman has joined #lisp
fikka has quit [Ping timeout: 258 seconds]
Bike has quit [Quit: Lost terminal]
eSVG has quit [Ping timeout: 276 seconds]
fikka has joined #lisp
SuperJen has joined #lisp
SuperJen has quit [Remote host closed the connection]
SuperJen has joined #lisp
Guest70025 has quit [Ping timeout: 255 seconds]
fikka has quit [Ping timeout: 260 seconds]
fikka has joined #lisp
Zhivago has quit [Quit: Leaving]
d4ryus1 is now known as d4ryus
eSVG has joined #lisp
fikka has quit [Ping timeout: 255 seconds]
<mfiano> How do I correctly specify the test/key of PUSHNEW for pushing conses of 2 symbols?
fikka has joined #lisp
EvW has quit [Ping timeout: 276 seconds]
rm8 has quit [Quit: i slep]
fikka has quit [Ping timeout: 248 seconds]
phadthai has joined #lisp
quazimodo has joined #lisp
red-dot has joined #lisp
<pjb> mfiano: (pushnew k l :test (function equal)) (equal '(a . b) '(a . b)) #| --> t |#
quazimodo has quit [Ping timeout: 248 seconds]
fikka has joined #lisp
fikka has quit [Ping timeout: 248 seconds]
sjl has joined #lisp
<drmeister> If the package :energy does not exist (find-package :energy) -> NIL then the system should signal a package-error - correct?
sjl has quit [Ping timeout: 248 seconds]
<drmeister> ECL and Clasp give the unhelpful error: There exists no package with name NIL
<drmeister> SBCL gives a more helpful error - I will copy it.
fikka has joined #lisp
fiddlerwoaroof has quit [Ping timeout: 260 seconds]
fikka has quit [Ping timeout: 276 seconds]
damke_ has joined #lisp
damke has quit [Ping timeout: 240 seconds]
fikka has joined #lisp
BitPuffin|osx has joined #lisp
<pjb> drmeister: yes, a package-error.
<pjb> drmeister: defpackage forms cannot include circular dependencies. For this you have to use run-time package functions.
fikka has quit [Ping timeout: 260 seconds]
fikka has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
<drmeister> Thank you.
<drmeister> Monolithic ASDF builds for the win - I can package up all of the cando Common Lisp source code along with cl-jupyter, cl-jupyter-widgets and nglview (for viewing molecules) into a single fasl file.
<drmeister> It loads much faster than loading quicklisp systems at startup.
beach` has joined #lisp
beach has quit [Ping timeout: 252 seconds]
mson has quit [Quit: Connection closed for inactivity]
hyero has quit [Remote host closed the connection]
quazimodo has joined #lisp
mishoo_ has joined #lisp
shka has joined #lisp
vlatkoB has joined #lisp
SaganMan has joined #lisp
madrik has joined #lisp
fikka has joined #lisp
lieven has quit [Changing host]
lieven has joined #lisp
Guest24518 has joined #lisp
fikka has quit [Ping timeout: 268 seconds]
beach` is now known as beach
damke_ has quit [Ping timeout: 240 seconds]
fikka has joined #lisp
fikka has quit [Read error: Connection reset by peer]
murii has joined #lisp
dieggsy has quit [Ping timeout: 255 seconds]
<beach> Good morning everyone!
<loke> Beach!
damke_ has joined #lisp
Guest24518 has quit [Ping timeout: 255 seconds]
jack_rabbit_ is now known as jack_rabbit
oleo has quit [Quit: Leaving]
Cymew has joined #lisp
<jack_rabbit> 'morning.
orivej has joined #lisp
flamebeard has joined #lisp
Karl_Dscc has joined #lisp
raphaelss has quit [Remote host closed the connection]
LocaMocha has joined #lisp
chens has joined #lisp
fikka has joined #lisp
Zhivago has joined #lisp
dec0n has joined #lisp
fikka has quit [Ping timeout: 255 seconds]
<shka> beach: good morning!
Karl_Dscc has quit [Remote host closed the connection]
fikka has joined #lisp
jack_rabbit_ has joined #lisp
fikka has quit [Ping timeout: 268 seconds]
jack_rabbit has quit [Ping timeout: 260 seconds]
jasom has quit [Ping timeout: 240 seconds]
jack_rabbit_ has quit [Ping timeout: 268 seconds]
jack_rabbit_ has joined #lisp
jack_rabbit_ is now known as jack_rabbit
<borodust> phoe larsen: that's unfortunate, but no :) i forged the API before Shinmera's :flow was introduced: naming is so hard, i don't feel like redoing all the name-fiddling again :/. More details in the issue comment.
<borodust> phoe larsen: thank you nevertheless! :)
aindilis has quit [Ping timeout: 248 seconds]
neoncontrails has quit [Remote host closed the connection]
<phoe> borodust: got it, thanks!
<borodust> obviously, i'm the only one to blame for not pushing :cl-flow to quicklisp, but at the time i didn't feel like it was complete enough
osune has joined #lisp
<Shinmera> Search-replace flow: => cl-flow: and remove the nickname.
JenElizabeth has joined #lisp
zmt00 has quit [Quit: Leaving]
SuperJen has quit [Ping timeout: 276 seconds]
<borodust> Shinmera: nope, this nicknames is introduced exactly for the reason to have sound full symbol names
<borodust> s/nicknames/nickname/
<borodust> flow:concurrently, flow:atomically and so on
<Shinmera> I don't see the difference to just cl-flow:concurrently
emaczen has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
scymtym has quit [Ping timeout: 260 seconds]
chens has quit [Ping timeout: 248 seconds]
<borodust> ok
DeadTrickster__ has joined #lisp
DeadTrickster_ has quit [Ping timeout: 255 seconds]
EvW1 has joined #lisp
<larsen> borodust: ok, thanks for the update
<larsen> yesterday night I was commenting on the general idea of nicknames defined by package authors. it seems to me a bad idea in general: wouldn't they serve the same purpose if it was the user assigning them when a package is used ?
Amplituhedron has joined #lisp
<borodust> larsen: to be fair, this nicknames is really should have been just a package name
<borodust> that's not really a nickname, this is how it supposed to be addressed
<borodust> otherwise, i agree about nickname thing
EvW1 has quit [Ping timeout: 268 seconds]
<larsen> ok, I guess I need to learn how to use rename-package then :)
quazimodo has quit [Ping timeout: 260 seconds]
mc40 has joined #lisp
mc40 has quit [Client Quit]
shka has quit [Ping timeout: 255 seconds]
scymtym has joined #lisp
<borodust> larsen: my apologies for the inconvenience
<borodust> i'm pretty sure :gamekit package would be taken too ;p
<larsen> no problem
<larsen> I'm more concerned about one bit in the comment to the issue: " those two systems (this and Shinmera's flow) would never be able to coexist". Besides naming, do you see any other technical problem preventing them to work together ?
<borodust> nope
<larsen> ok
<borodust> i meant that i'm not going to rename package and neither Shinmera, i'm pretty sure ;p
<borodust> larsen: oh! Fare has a thing exactly for such cases: https://github.com/fare/package-renaming
<larsen> I'll look into that, thanks
<borodust> now that's a good reason to have whatever convenient nickname and jibberish main package name (java-style or whatever)
<Ober> Shinmera: hey, you have mwe-log-commands installed?
aindilis has joined #lisp
binghe has joined #lisp
NaNDude has quit [Ping timeout: 260 seconds]
mondec` has quit [Read error: Connection reset by peer]
mondec` has joined #lisp
varjag has joined #lisp
fikka has joined #lisp
<Shinmera> Ober: I have no idea what that is
dddddd has joined #lisp
<Shinmera> borodust: It's already released on QL and people might be using it, so I can't without breaking people's code.
<borodust> Shinmera: yup, exactly
<Shinmera> Before I release anything I always check QL for systems with the same name to avoid problems like this
bkst has quit [Ping timeout: 260 seconds]
<borodust> that's what i did :)
<borodust> but wasn't fast enough
<Shinmera> I also prepare for the day when package-local-nicknames will be available on all implementations that matter by internally using FQDNs. I could then remove the shorter name for all of my systems in a big, breaking change. Alas I don't see the p-l-n future coming any time soon.
<borodust> but that's no probs, that would always be the problem with custom dists
<borodust> i'll investigate Fare's package-renaming and maybe add something convenient for bodge dist users
<Shinmera> In other news apparently Harmony's WASAPI backend is pretty badly broken... but only on some Windows setups. SIGH.
<Shinmera> So much for never having to touch that crap again
Amplituhedron has quit [Ping timeout: 248 seconds]
fikka has quit [Ping timeout: 240 seconds]
fikka has joined #lisp
sjl has joined #lisp
fikka has quit [Ping timeout: 260 seconds]
sjl has quit [Ping timeout: 240 seconds]
nirved has joined #lisp
fikka has joined #lisp
fikka has quit [Ping timeout: 248 seconds]
damke_ has quit [Ping timeout: 246 seconds]
knobo1 has joined #lisp
dddddd has quit [Remote host closed the connection]
fikka has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
fikka has joined #lisp
Amplituhedron has joined #lisp
wigust has joined #lisp
moei has quit [Read error: Connection reset by peer]
moei has joined #lisp
wigust has quit [Ping timeout: 255 seconds]
_cosmonaut_ has joined #lisp
madrik has quit [Remote host closed the connection]
madrik has joined #lisp
resttime has joined #lisp
wigust has joined #lisp
schweers has joined #lisp
milanj has joined #lisp
eSVG has quit [Ping timeout: 276 seconds]
strelox has joined #lisp
<resttime> Is there a good way of handling C opaque structures as pointers without know the size of the structure in the CFFI?
<resttime> Or impossible
<varjag> why, unless you need to descend the structure it can be just an untyped pointer
<Shinmera> I don't know what you mean. You have a pointer and you want to do... what with it?
ssake has joined #lisp
<Shinmera> Pointers are addresses as values. They don't in themselves contain data.
<Shinmera> Aside from the address.
<Shinmera> The struct is going to remain in memory whether you have a pointer to its starting address or not
<resttime> Hmm, I guess here's the use case: http://liballeg.org/a5docs/trunk/keyboard.html
<resttime> There is no function which straight up returns a structure pointer pointer
<p_l> I'd probably add a "type" declaration for ease of debugging later on, but that's it
<Shinmera> resttime: Liking to docs tells me exactly nothing about what you want to do
<Shinmera> *linking
<resttime> (still writing)
<resttime> So I'm forced to define the cstruct with CFFI and then allocate the structure before then passing
<varjag> resttime: there is probably an allocator method in the c api
<ssake> remember to free
<varjag> otherwise it can't really be "opaque"
<resttime> varjag: There isn't, Use cases seem to be defining the keystate like: ALLEGRO_KEYBOARD_STATE keyState;
<p_l> varjag: looks like there's no allocator, but you're expected to do malloc(sizeof struct_type)
<varjag> ok, then it's all the way down the rabbit hole
<Shinmera> What you do in this case is write a C program that emits the sizeof and then just allocate that.
<Shinmera> Remember to run that program and record the size for all systems you want to run on. It might change!
<Shinmera> Or don't and just pray it stays constant.
<Zhivago> Or, perhaps better, write a C function to allocate it for you.
<Zhivago> Remember that there is also alignment to consider.
<Shinmera> Zhivago: Then you'd have to compile that C program on every system and you'd be back to the same deal.
<p_l> SWIG can help automate some of that, iirc
<Zhivago> Sure -- there's no way around that.
<resttime> I was hoping to be able avoid external C stuff, but I guess it's "impossible" after all.
<p_l> including writing helper libs
<resttime> I'll just pray that the structure remains constant
<Zhivago> The size of C structs is up to the C implementations.
<varjag> it's possible, just a lot of typing
<p_l> resttime: it seems to be that allegro went out of its way to be a PITA in this
<varjag> i did just that with pjsip wrapper
<resttime> p_l: Well they do have a new event system which mostly gets used. Someone using the bindings I wrote for allegro was wondering if there could be more support for the keyboard routines, so I started looking into this
<resttime> Keyboard routines outside of the event system that is
<Shinmera> Another thing you can do is grovel the headers
<Shinmera> That would at least automate the "figuring out the sizeof" part.
JuanDaugherty has joined #lisp
<resttime> Shinmera: Well at this point I'm thinking that the structure probably won't be changing so I'll define the opaque type and write a WITH-KEYBOARD-STATE macro that could work
<resttime> Or make a defctype that'll interally do the stuff with translate -to-foreign
<resttime> And change a function or two that'll become an allocater
dmiles has quit [Ping timeout: 248 seconds]
<Zhivago> resttime: If the structure is opaque, you should not be allocating yourself in the first place. There is somewhere that it will have a complete type, and that's where the allocator needs to be.
<resttime> Zhivago: I'm looking at how it's used and I don't think I have a choice :/
<Zhivago> ALLEGRO_KEYBOARD_STATE has a complete type.
<Zhivago> ALLEGRO_KEYBOARD seems to have an incomplete type -- which one do you need?
<resttime> The state and hmmm, what's your definition of complete type and opaque
dmiles has joined #lisp
<Zhivago> opaque is gibberish made up by people to express an intent realized via a pointer to an incomplete type.
<Zhivago> struct foo; <- this type is incomplete here. struct foo { int i; }; <- Now struct foo is a complete type, and has a sizeof, etc.
jameser has joined #lisp
<borodust> resttime: you possibly could benefit from cl-autowrap
fikka has quit [Ping timeout: 250 seconds]
<borodust> it can make opaque structs (bit blobs)
<borodust> more like define than make, but anyway
margeas has joined #lisp
fikka has joined #lisp
<borodust> resttime: shameful self-plug: if all you need is simple graphics, audio and input for your game w/o diving into native and/or configuration land, trivial-gamekit might work for you
<Shinmera> The context is his existing library for Allegro
<Shinmera> Plugging another system doesn't help.
<borodust> oh
<borodust> i see, my bad
<resttime> borodust: Counter plug, if you need a monolith game programming library you can use my cl-liballegro :D
<borodust> ;p
<borodust> will it make distributable binaries for me? ;)
* resttime checks out trivial-gamekit to stea- research features
Amplituhedron has quit [Read error: Connection reset by peer]
Amplituhedron has joined #lisp
fikka has quit [Ping timeout: 255 seconds]
<p_l> resttime: CFFI-grovel might help in getting manageable code for allegro
<resttime> Well, at this point "everything" is written so it's probably alright
<resttime> (didn't know much about many things when I first wrote bindings)
<resttime> I'm curious though, is that CFFI-grovel requires the header files right?
<resttime> So if one was to distrubutethey would also need to include them?
fikka has joined #lisp
m00natic has joined #lisp
fikka has quit [Ping timeout: 248 seconds]
<resttime> Hmmm yeah that seems to be the case
damke_ has joined #lisp
orivej has quit [Ping timeout: 255 seconds]
fikka has joined #lisp
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
orivej has joined #lisp
<borodust> resttime: not only that, but you would require users to install whole gnu thing onto their machines for groveller to work :/
<resttime> borodust: Also cl-bodge looks interesting, game engines and stuff are currently above me since my knowledge is meagre :P
hhdave has joined #lisp
fikka has quit [Ping timeout: 255 seconds]
<resttime> Maybe one day I'll have my own to add onto the pile of game enginers laying around
<borodust> resttime: same boat ;p
<resttime> borodust: In your exp do think making a game is orthogonal to making a game engine?
<borodust> cl-bodge is a pile of functionality at the moment with vast api i literally don't have time to cover with docs - part of the reason trivial-gamekit exists
<borodust> resttime: yes, totally
<resttime> I'm a bit hesitant to go all into working in game engine because of that
<borodust> if you want make game, you should start making a game, not tool
<borodust> unless there's not tools, but then you would just write specific tool, not an engine
<borodust> *there's no
fikka has joined #lisp
fikka has quit [Ping timeout: 276 seconds]
_cosmonaut_ has quit [Ping timeout: 255 seconds]
fikka has joined #lisp
jameser has joined #lisp
orivej has quit [Ping timeout: 260 seconds]
wxie has joined #lisp
jmercouris has joined #lisp
<paule32> hello
<paule32> have problem with hash table
<paule32> the error from clisp is under the code
Tobbi has joined #lisp
Tobbi has quit [Remote host closed the connection]
jmercouris has quit [Ping timeout: 255 seconds]
Tobbi has joined #lisp
<resttime> paule32: I think it's the way you're using LOOP
dec0n has quit [Read error: Connection reset by peer]
<resttime> There's a different way if you want to iterate a hashtable
<Shinmera> resttime: If you're interested in gamedev and game engine dev: I have a weekly stream on Sundays where I do exactly that. https://events.tymoon.eu/1 https://www.youtube.com/playlist?list=PLkDl6Irujx9MtJPRRP5KBH40SGCenztPW
dec0n has joined #lisp
quazimodo has joined #lisp
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Shinmera> Baggers' stuff is more about OpenGL and CEPL than necessarily gamedev, though.
<Shinmera> Except for the one time he did make a game
<Shinmera> (I wish he'd do it again)
mondec`` has joined #lisp
mondec` has quit [Ping timeout: 240 seconds]
milanj has quit [Quit: This computer has gone to sleep]
<borodust> resttime: also i can recommend #lispgames channel for sharing and acquiring lispgamedev experiences (not always on topic)
damke_ has quit [Ping timeout: 240 seconds]
<wxie> paule32: What do you want to do with the code
<wxie> paule32:
<wxie> paule32:     (loop for wrd in *word-table*
<wxie>         do (*word-table* :test #'equal))
<beach> wxie: You may be wasting your time. paule32 has come here for quite some time, and he doesn't follow the advice he is given.
BitPuffin|osx has quit [Ping timeout: 260 seconds]
<paule32> Shinmera: cool streams
madrik has quit [Ping timeout: 258 seconds]
<beach> wxie: He continues to submit code that does not follow accepted conventions, and he refuses to go read a book about Common Lisp.
<paule32> wxie: iterate through *word-list*
<wxie> beach: Thanks.
murii has quit [Ping timeout: 248 seconds]
hhdave has quit [Read error: Connection reset by peer]
fikka has quit [Ping timeout: 255 seconds]
fikka has joined #lisp
Xof has quit [Ping timeout: 240 seconds]
Bike has joined #lisp
<paule32> if you prefer ^
<paule32> i have reformat with emacs
milanj has joined #lisp
bkst has joined #lisp
<wxie> paule32: *user-table*
<wxie> #S(HASH-TABLE :TEST FASTHASH-EQL ((0 NIL) . ((1 . "paule32") (2 . "leero"))))
<wxie> paule32: It seems not what you want, right?
quazimodo has quit [Ping timeout: 240 seconds]
<paule32> yes
<paule32> at first, i would like see, if the input text/word is present
<paule32> in *word-list*
<wxie> paule32: *word-table*
<wxie> #S(HASH-TABLE :TEST FASTHASH-EQL (2 . ("guten" "good")) (1 . ("hallo" "hello")))
<paule32> yes, sorry, *word-table*
<wxie> paule32: This will cause problem.
<paule32> yes
<wxie> paule32: What is your wrd?
mondec`` has quit [Ping timeout: 240 seconds]
<paule32> wxie: line 75 => 1 for cw00001
<paule32> cw00001 => line 58 => '("hallo" "hello")
mondec`` has joined #lisp
<Xach> borodust: anything I can try today?
<borodust> hi Xach, i'm scheduling a debug session on friend's machine, if we would be able to reproduce the issue
malcom2073 has quit [Remote host closed the connection]
<borodust> Xach: meaning, not yet, no :)
<Xach> Ok, thanks for looking into it.
EvW has joined #lisp
<borodust> Xach: thanks for your patience
JenElizabeth has quit [Remote host closed the connection]
JenElizabeth has joined #lisp
_cosmonaut_ has joined #lisp
<paule32> wxie: have i missing something?
fikka has quit [Ping timeout: 255 seconds]
<SaganMan> wxie: german?
fikka has joined #lisp
<paule32> it seems, there is a ( missing
<wxie> paule32: ENDP: A proper list must not end with #1=#S(HASH-TABLE
<wxie> (1 . ("hallo" "hello")))
<wxie> :TEST FASTHASH-EQL (2 . ("guten" "good"))
<paule32> (2 . ("guten" "good")) (1 . ("hallo" "hello")) ) <--- this one
_cosmonaut_ has quit [Ping timeout: 260 seconds]
fikka has quit [Ping timeout: 248 seconds]
<wxie> paule32: That one is for #S(.
<paule32> yes, the last ) missing first (
Guest24518 has joined #lisp
jameser has joined #lisp
<wxie> paule32: So you can fix it.
<paule32> wut?
<paule32> the clisp sources?
<wxie> Yes, the error.
<paule32> not that i can't programming in C, but this is high math
fikka has joined #lisp
<paule32> or is it enough, to programming a if condition with the display/output code in Lisp?
<jdz> wxie: it seems your enthusiasm is dwindling.
fikka has quit [Ping timeout: 255 seconds]
fikka has joined #lisp
k-stz has joined #lisp
eSVG has joined #lisp
<wxie> paule32: I don't know what you want to test in the loop. Could you explain?
<paule32> firstly, i would like print the *word-table* items of a given item/counter = wrd
fikka has quit [Ping timeout: 248 seconds]
_cosmonaut_ has joined #lisp
TCZ has joined #lisp
TCZ has quit [Client Quit]
_cosmonaut_ has quit [Ping timeout: 240 seconds]
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<paule32> i have to go to meeting, back in some hours
<paule32> may be someone has an idea
<paule32> bbl
orivej has joined #lisp
Vivvy has joined #lisp
<wxie> paule32: You need do something like loop for v being the hash-value of h do
<wxie> paule32: You cannot use hash-table as list
_cosmonaut_ has joined #lisp
wxie has quit [Quit: Bye.]
Amplituhedron has quit [Ping timeout: 240 seconds]
EvW has quit [Ping timeout: 276 seconds]
Bike_ has joined #lisp
Bike_ is now known as Bicyclidine
fikka has joined #lisp
mathrick has quit [Ping timeout: 240 seconds]
<jackdaniel> alexandria has function which converts ht to plist afair
<jackdaniel> also, for k/v, one could use maphash
EvW has joined #lisp
cromachina has quit [Read error: Connection reset by peer]
damke has joined #lisp
rumbler31 has joined #lisp
dieggsy has joined #lisp
rumbler31 has quit [Remote host closed the connection]
Vivvy has quit [Ping timeout: 248 seconds]
dieggsy has quit [Remote host closed the connection]
rumbler31 has joined #lisp
Vivvy has joined #lisp
dieggsy has joined #lisp
raynold has quit [Quit: Connection closed for inactivity]
dieggsy has quit [Quit: ERC (IRC client for Emacs 27.0.50)]
rumbler31 has quit [Ping timeout: 248 seconds]
rumbler31 has joined #lisp
NaNDude has joined #lisp
mson has joined #lisp
_rumbler31 has joined #lisp
kobain has joined #lisp
sjl has joined #lisp
rumbler31 has quit [Ping timeout: 255 seconds]
epony has quit [Read error: Connection reset by peer]
epony has joined #lisp
sjl__ has joined #lisp
<resttime> I used lisp on CSV's to generate 'schedules' for a small C testing utility
damke_ has joined #lisp
<resttime> Adding 4 more definitions to that code I generated a C++ braced initializer list for an unordered map that associates hardware commands to hexstrings :3
sjl has quit [Ping timeout: 260 seconds]
fikka has quit [Ping timeout: 260 seconds]
warweasle has joined #lisp
FreeBirdLjj has joined #lisp
<resttime> Doing the little stuff like this is nice
damke has quit [Ping timeout: 240 seconds]
sz0 has quit [Quit: Connection closed for inactivity]
oleo has joined #lisp
papachan has joined #lisp
dddddd has joined #lisp
FreeBirdLjj has quit [Ping timeout: 260 seconds]
rippa has joined #lisp
TCZ has joined #lisp
EvW has quit [Remote host closed the connection]
fikka has joined #lisp
EvW has joined #lisp
<flip214> can a macro signal the macroexpander to stop expanding this level, and continue with subforms only?
TCZ has quit [Quit: Leaving]
<Shinmera> What does that even mean
<Shinmera> Macros are functions that are run at compile time to emit new forms in place of the macro expression.
<flip214> Shinmera: yeah, right.
<flip214> and I'd like to have (foo . args) to be expanded into (foo something . args), ie. insert a state argument into a function call.
nika_ has joined #lisp
<Shinmera> What part of that is a macro
<flip214> currently I'm using a macro that puts the function on a gensym, and provides a macro that expands into such a call instead
<flip214> but that means I can't trace the original function name anymore, I need to trace the gensym instead
<schweers> flip214: is it possible you’re actually looking for refactoring tools?
<flip214> schweers: no.
fikka has quit [Ping timeout: 268 seconds]
<flip214> on the source level I'd like this argument to be hidden.
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
<Shinmera> (defmacro with-injected-thing (&body body) `(flet ((fn (&rest args) (apply fn something args))) ,@body)) ?
<flip214> so, (defmacro define-state-fn (name args &body body) `(progn (defun ,<gensym> ,(cons state args) ...)) (defmacro ,name (args) (,<gensym> state ,@ args))) is the gist of it
<flip214> Shinmera: sadly no, different context - the function is defined on the top level.
<Shinmera> And what prevents you from just supplying a foo* that calls foo with the argument you need?
<flip214> what I'm asking is can I do something like (defmacro foo (args) (values `(,foo state ,@ args) :STOP-TRANSLATING-THIS-FORM)))
<Shinmera> You can't have a function and macro bound to the same symbol,
<Shinmera> so
<Shinmera> no
<flip214> Shinmera: it's still not possible to use the _visible_ symbol for tracing, seeing the documentation, etc.
fikka has joined #lisp
<Shinmera> but the visible symbol will be foo*, and you can trace that just fine
<Shinmera> And you can copy the docstring over easy
<Shinmera> Though arguably the docstring shouldn't be the same since it'll be supplying a hidden argument
<flip214> Shinmera: still, foo* might create a conflict with another function
hexfive has joined #lisp
<Bicyclidine> What if the user was to write in the state argument? It would fail, if I follow correctly.
<Bicyclidine> the macro and the function are essentially two different things. Giving them the same name is just confusing.
<Shinmera> Yeah, you'd have different semantics for (foo ..) vs (funcall 'foo ..)
<flip214> Bicyclidine: well, perhaps I should just put all that on a blog somewhere... having the big picture makes discussing about the feature easier
<flip214> Shinmera: yeah, right, but that wouldn't be an issue for that usecase.
<Shinmera> I can't see how that's ever possible.
<Bicyclidine> if you don't want to allow funcall (or apply) then it's a macro.
mejja has joined #lisp
<jackdaniel> in McCLIM many macros have pairs
<jackdaniel> invoke-with-foo which accepts the continuation
<jackdaniel> and foo, which accepts body and creates lexical function for it
<jackdaniel> s/for/from/
fikka has quit [Ping timeout: 255 seconds]
<flip214> thanks for trying to help me, though! much appreciated!
FreeBirdLjj has joined #lisp
Guest24518 has quit [Ping timeout: 240 seconds]
sjl__ is now known as sjl
devon has joined #lisp
orivej has quit [Ping timeout: 246 seconds]
fikka has joined #lisp
damke_ has quit [Ping timeout: 240 seconds]
flamebeard has quit [Quit: Leaving]
dec0n has quit [Read error: Connection reset by peer]
smurfrobot has joined #lisp
Cymew has quit [Remote host closed the connection]
Cymew has joined #lisp
Cymew has quit [Remote host closed the connection]
eSVG has quit [Ping timeout: 255 seconds]
eudoxia has joined #lisp
EvW has quit [Ping timeout: 264 seconds]
Xof has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
LiamH has joined #lisp
Cymew has joined #lisp
<pjb> minion: memo for Josh_2: perhaps you want to count the ACTUAL number of operations needed to sort, and compare that for your different inputs. For sort algorithms, it's usually the number of swap that is counted. Or the number of accesses to the sequence. Or the number of comparison. Unless you have your own quicksort implementation, if you use cl:sort it will be easier to just count the number of comparisons.
<minion> Remembered. I'll tell Josh_2 when he/she/it next speaks.
<pjb> paule32: at this point, it might be a good idea to read a book about NLP… Perhaps Gazdar & Mellish, Natural Language Processing in LISP - An Introduction to Computational Linguistics, Addison Wesley.
Cymew has quit [Ping timeout: 260 seconds]
smurfrobot has quit [Remote host closed the connection]
Cymew has joined #lisp
EvW1 has joined #lisp
Cymew has quit [Ping timeout: 268 seconds]
EvW1 has quit [Ping timeout: 246 seconds]
Cymew has joined #lisp
Cymew has quit [Ping timeout: 260 seconds]
Cymew has joined #lisp
mathi_aihtam has joined #lisp
Cymew has quit [Ping timeout: 260 seconds]
Cymew has joined #lisp
FreeBirdLjj has quit [Remote host closed the connection]
orivej has joined #lisp
neoncontrails has joined #lisp
Cymew has quit [Ping timeout: 240 seconds]
malcom2073 has joined #lisp
binghe has left #lisp [#lisp]
FreeBirdLjj has joined #lisp
Cymew has joined #lisp
Cymew has quit [Ping timeout: 276 seconds]
Cymew has joined #lisp
emaczen has joined #lisp
Cymew has quit [Ping timeout: 268 seconds]
varjag has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
resttime has quit [Quit: Leaving]
Tobbi has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
random-nick has joined #lisp
Tobbi has joined #lisp
teddy_error has joined #lisp
<emaczen> SBCL does a tail call optimization but CCL instead overflows the stack. Any suggestions for getting CCL to do the same tail call optimization?
<emaczen> I could manually re-write but I think the recursive code is much more clear
<beach> It is better to use iteration than recursion in Common Lisp.
domovod has joined #lisp
rm8 has joined #lisp
Kaisyu has quit [Quit: Connection closed for inactivity]
<Bicyclidine> you'd have to check the ccl manual for when it does tail call optimization.
Karl_Dscc has joined #lisp
Karl_Dscc has quit [Remote host closed the connection]
mathrick has joined #lisp
<schweers> emaczen: SBCL does tco depending on the optimization settings, maybe CCL does so to, but has different criteria?
<emaczen> schweers: I'm just finding out that my optimization settings are not what I thought they were.
FreeBirdLjj has quit [Remote host closed the connection]
<schweers> have you tried aggressive optimizations?
<emaczen> I expect (declaim (optimize ...)) to be evaluated at startup in init files for each implementations compiler.
smurfrobot has joined #lisp
<emaczen> schweers: what is an aggressive optimization?
<schweers> (declaim (optimize (speed 3) (safety 1))) for instance
<schweers> that’s what I mostly use when not debugging
<beach> emaczen: Where did you put that declaim form?
warweasle has quit [Quit: rcirc on GNU Emacs 24.4.1]
<schweers> emaczen: um, I’m not sure, but it might be that declaim only has an effect during the compilation of the file in which it occurs
<schweers> I put the aforementioned declaim at the beginning of my files
mathrick has quit [Ping timeout: 248 seconds]
<emaczen> beach: I put the declaim form at the top of my .ccl-init.lisp and .sbclrc
<beach> That ought to work.
<Bicyclidine> declaim is per file sometimes. i forget if it is in ccl.
<schweers> beach: so declaim has an effect after the file in which it was put ends?
<Bicyclidine> that's unspecified.
mathrick has joined #lisp
<Bicyclidine> unspecified for compile file. if the rc is loaded maybe it's defined to continue effecting. not sure.
<emaczen> how can I check optimization settings in SBCL? #ccl informed me in CCL how to do it, which is how I found out.
_cosmonaut_ has quit [Ping timeout: 276 seconds]
Tobbi has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mson has quit [Quit: Connection closed for inactivity]
<phoe> sb-ext:describe-compiler-policy
<emaczen> phoe: thanks, well the SBCL settings are as I expect
<schweers> phoe: cool, thanks for mentioning this. I didn’t know this
Josh_2 has joined #lisp
jasom has joined #lisp
<phoe> schweers: it pays to read software manuals once in a while, including your language specification and implementation manual :)
<phoe> emaczen: no problem. BUT
<phoe> take into account that these are global settings and can be modified by local declarations.
emaczen has quit [Read error: Connection reset by peer]
<phoe> If you want to be EXTRA sure that your programs are compiled without tricks like (declare (optimize (speed 3) (debug 0) (safety 0))) you may want to sb-ext:restrict-compiler-policy
<phoe> which can set a minimum and maximum value on all optimization settings.
<phoe> what is common in people's .sbclrc files is actually firmly setting the debug/safety policy to 3, so everything is compiled with debug 3 and safety 3.
<Xach> common?
<_rumbler31> beach: why is it better to do iteration than recursion in cl?
<_rumbler31> emaczen: I've gotten ccl to do tco before, what code are you testing?
<phoe> Xach: from the suggestions I saw over time on #lisp
<phoe> _rumbler31: CL has no TCO so your stack may explode at the implementation's discretion
fikka has joined #lisp
<phoe> also, it is common for Lisp programmers in general to favor iterative programming style. Macros like LOOP are an example of that.
<phoe> or rather, CL *standard* has no TCO, implementations may and do provide it.
<phoe> most of the time.
<phoe> but if someone does debug 3 safety 3, like above, then SBCL will not TCO.
smurfrobot has quit [Remote host closed the connection]
Guest24518 has joined #lisp
<Xach> sometimes recursion is a great fit for a problem
fikka has quit [Ping timeout: 248 seconds]
SaganMan has quit [Quit: WeeChat 1.6]
FreeBirdLjj has joined #lisp
EvW has joined #lisp
Bicyclidine has quit [Ping timeout: 260 seconds]
<jasom> It is very rare that *tail* recursion is a better fit than interation
FreeBirdLjj has quit [Ping timeout: 255 seconds]
<jasom> The only one that comes to mind are state-machines, where tail-calling the next state is IMO more readable than alternatives.
neoncontrails has quit [Remote host closed the connection]
m00natic has quit [Remote host closed the connection]
JuanDaugherty has quit [Ping timeout: 260 seconds]
Bike_ has joined #lisp
Bike_ is now known as Bicyclidine
Vivvy has quit [Ping timeout: 276 seconds]
orivej has quit [Quit: No Ping reply in 180 seconds.]
FreeBirdLjj has joined #lisp
orivej has joined #lisp
mishoo_ has quit [Quit: (save-lisp-and-die)]
vhost- is now known as reblank
mishoo has joined #lisp
reblank is now known as reblonk
shka has joined #lisp
<shka> good evening!
kmb has joined #lisp
milanj_ has joined #lisp
neoncontrails has joined #lisp
milanj has quit [Ping timeout: 248 seconds]
varjag has joined #lisp
<Josh_2> Evening shka
<minion> Josh_2, memo from pjb: perhaps you want to count the ACTUAL number of operations needed to sort, and compare that for your different inputs. For sort algorithms, it's usually the number of swap that is counted. Or the number of accesses to the sequence. Or the number of comparison. Unless you have your own quicksort implementation, if you use cl:sort it will be easier to just count the number of comparisons.
damke_ has joined #lisp
<Josh_2> pjb: Thanks for the memo but it's a bit late now :P I gave my presentation yesterday and the assessor said it was an excellent presentation and that I hit all the points
turkja has quit [Ping timeout: 248 seconds]
Ven`` has joined #lisp
Vivvy has joined #lisp
<pjb> Josh_2: congratulations!
EvW has quit [Ping timeout: 258 seconds]
<Josh_2> Would share my presentation but idk where to upload somewhere I don't have to sign up
jmercouris has joined #lisp
EvW1 has joined #lisp
random-nick has quit [Remote host closed the connection]
Vivvy has quit [Ping timeout: 260 seconds]
pseudonymous has joined #lisp
Vivvy has joined #lisp
knobo1 has quit [Ping timeout: 268 seconds]
Ven`` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
milanj__ has joined #lisp
milanj_ has quit [Ping timeout: 255 seconds]
strelox has quit [Remote host closed the connection]
<beach> _rumbler31: Because Common Lisp does not guarantee tail-call optimization. There are cases where recursion is the best way, of course (like when you deal with a data structure that is naturally recursive). But for traversing linear data structures, iteration is preferable.
Vivvy has quit [Ping timeout: 240 seconds]
<shka> thing is, common lisp is really functional language
<shka> *is not really
zmt00 has joined #lisp
knicklux has joined #lisp
kmb has quit [Quit: kmb]
Princess17b29a has joined #lisp
orivej has quit [Ping timeout: 258 seconds]
orivej has joined #lisp
Cymew has joined #lisp
<jmercouris> I can't think of a scenario in which recursion is more performant than iteration, are there any examples?
pmcana has joined #lisp
kmb has joined #lisp
nowhere_man has quit [Read error: Connection reset by peer]
dxtr has quit [Quit: leaving]
Cymew has quit [Ping timeout: 260 seconds]
<jackdaniel> performance isn't the only metric important in software development
<jackdaniel> *if* recursion is easier to learn and understand, it saves programmer time
<beach> jmercouris: What jackdaniel says. It has to do with what makes the code easy to understand and maintain.
nowhere_man has joined #lisp
<shka> yes, exactly
<beach> jmercouris: So if you traverse a tree, for example, recursion is often preferable to iteration.
<shka> if your code needs to construct stack in order to iterate, you are better off with recursive function
<beach> Indeed.
<shka> most of the time
<shka> sometimes performance IS really important
<shka> but it is not that often
neoncontrails has quit [Remote host closed the connection]
<jmercouris> I'm a software engineer too, don't confuse me being a noob with lisp that I am a noob in general, I understand the importance of developer time, I am just wondering if there is ever a scenario in which a recursive implementation is more performant than an iterative one
<beach> jmercouris: Define "performant".
SuperJen has joined #lisp
<jmercouris> beach: real time between start and completion of task
zachk has joined #lisp
<jmercouris> not necessarily time complexity, but on actual hardware, an example of a recursive solution being quicker
<jackdaniel> if problem is better expressed iteratively, then you're better of using iteration. It's not always the case though
<jackdaniel> someone mentioned state machines earlier
<beach> I think that depends a lot on the implementation and on the architecture of the underlying computer.
<jmercouris> state machines are a great use case for recursion, trees, as well, but will it every be quicker?
<shka> jmercouris: if your stack is vector and it reallocates, you may hit sweet spot where performance degrades badly
<jmercouris> shka: I wouldn't call that a "sweet" spot :P
<shka> but that would be poor craft
<shka> so as you can see, problem is not yet clearly defined
<jackdaniel> jmercouris: given perfect implementation, which maps nicely into thought, what is faster: (loop over states if match my-state (do-my-state)) or maybe rather (do-my-state) ?
<jmercouris> jackdaniel: I don't understand, can you please rephrase?
JenElizabeth has quit [Ping timeout: 276 seconds]
<shka> what people around think about cl-cont?
<jackdaniel> shka: it is very slow, because it emulates cps
<shka> i don't care about performance that much, i just want to know if it works correctly
<jackdaniel> jmercouris: if you can do a tail call, you just call a function (and you are done), if you have a loop, you need to wait until function returns and decide what to do next (so the caller controls the execution)
<shka> or there are some nasty bugs, corner cases etc. that
raynold has joined #lisp
<shka> that would make my pull my hair
<jackdaniel> s/so the caller/because the caller/
<scymtym> shka: known limitations, rather. it can be useful if you are aware of the limitations but it won't give you anything like scheme's call/cc or reset/shift
<jmercouris> jackdaniel: Aha I get it! Yes, that's a good example of a problem
<shka> what else i can pick for continuations?
<shka> is cl-cont still way to go?
<jackdaniel> shka: you may pick scheme
<jackdaniel> or ecl when 16.2.0 is released
<shka> way to much code already written in CL
<jackdaniel> I'm re-introducing delimited continuations there
<Shinmera> You can pick not using continuations
<shka> Shinmera: or that!
<shka> still more likely then picking scheme
<scymtym> jackdaniel: is there documentation regarding ECL's continuations?
<razzy> < razzy> hi, i would like to have random acces FIFO buffer
<razzy> 20:03 < razzy> and i found only complicated solutions
nika_ has quit [Quit: Leaving...]
<jackdaniel> scymtym: I can send you a pdf (it was removed from documentation when they were removed, but it builds fine when you go back in time in git)
<shka> perhaps i just write it manually with CPS style
<shka> honestly, I like Graham style macros the most
<shka> it is the least magical approach
<scymtym> Shinmera: i think that one argues against call/cc specifically, not necessary against e.g. reset/shift (which closer to the style cl-cont supports)
<scymtym> jackdaniel: please do if it doesn't cause too much trouble
<jackdaniel> scymtym: sure
LocaMocha has quit [Ping timeout: 255 seconds]
fikka has joined #lisp
kmb has quit [Quit: kmb]
asarch has joined #lisp
mathrick has quit [Ping timeout: 240 seconds]
kmb has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
jmercouris has quit [Ping timeout: 276 seconds]
mathrick has joined #lisp
mathrick has quit [Ping timeout: 248 seconds]
dxtr has joined #lisp
smurfrobot has joined #lisp
milanj__ has quit [Quit: This computer has gone to sleep]
neoncontrails has joined #lisp
smurfrobot has quit [Ping timeout: 260 seconds]
mathrick has joined #lisp
damke has joined #lisp
Cymew has joined #lisp
damke_ has quit [Ping timeout: 246 seconds]
mejja has quit [Quit: mejja]
Cymew has quit [Ping timeout: 240 seconds]
<razzy> solved :]
mathrick has quit [Read error: Connection reset by peer]
<Shinmera> scymtym: Yeah. It's worth reading anyway, though.
<scymtym> Shinmera: agreed
Cymew has joined #lisp
Cymew has quit [Ping timeout: 258 seconds]
Cymew has joined #lisp
Trystam has joined #lisp
python476 has joined #lisp
ketralnis has quit [Quit: Coyote finally caught me]
Cymew has quit [Ping timeout: 248 seconds]
Tristam has quit [Ping timeout: 260 seconds]
Trystam is now known as Tristam
mathrick has joined #lisp
<paule32> yippie
<paule32> (defvar cw1 cw00001)
vlatkoB has quit [Remote host closed the connection]
<paule32> (defvar cw00001 '("hallo" "hello"))
<paule32> (setf (gethash cw1 *word-table*) cw00001)
<paule32> (maphash #'(lambda (k v) (print k)) *word-table*)
Cymew has joined #lisp
<paule32> this code's do the job
<paule32> lambda is great
fikka has joined #lisp
<jurov> Hi all, when I do (ql:quickload 'usocket) (usocket:socket-server #(127 0 0 1) 8910 nil nil) I get undefined function error.
<jurov> NFI how to approach this? In dists/quicklisp/software/usocket-0.7.0.1/ the function does exist
<Xach> jurov: hi! what does (ql:where-is-system "usocket") say?
<jackdaniel> oh, there is such function? interesting!
knobo1 has joined #lisp
<Xach> i use that function very much when troubleshooting
<Xach> since systems can be not what or where you expect
<Xach> it is just a thin layer over a couple of asdf functions, but so handy
<jurov> (ql:where-is-system "usocket") has output ~/quicklisp/dists/quicklisp/software/usocket-0.7.0.1/ which is right, and which I've checked
Cymew has quit [Ping timeout: 260 seconds]
fikka has quit [Ping timeout: 240 seconds]
terpri has joined #lisp
Cymew has joined #lisp
<jurov> but (find-package "usocket") returns nil
<Xach> jurov: (find-package "USOCKET") is more likely to work
knobo2 has joined #lisp
<Xach> jurov: i don't think usocket:socket-server is meant to be a function, is it? is it documented as such?
<jurov> (do-external-symbols (s (find-package "USOCKET")) (print s)) does list USOCKET:SOCKET-SERVER
<Xach> jurov: sure - but that doesn't mean it names a function
Karl_Dscc has joined #lisp
Cymew has quit [Ping timeout: 268 seconds]
knicklux has quit [Ping timeout: 240 seconds]
<jurov> it is definitely something that can be called. and it worked fine on this machine few months ago.
<_rumbler31> jurov: can you restart your lisp, ql usocket and then re-issue your test and paste full output?
<Xach> I also get an undefined function error. Hmm.
knobo1 has quit [Ping timeout: 276 seconds]
<Xach> jurov: i think it would be good to discuss on the list, because that seems like a strange oversight
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<jurov> which list?
orivej has quit [Ping timeout: 240 seconds]
<paule32> jurov: you could be try: 127.0.0.1 instead 127 0 0 1
<paule32> jurov: note: this is a string
cgay has quit [Remote host closed the connection]
<paule32> jurov: may be: "127.0.0.1"
<jurov> paule32:but that has no influence on whether the function exists. and I remeber this working with the vector parameter
<paule32> jurov: if you would like to set the vector value, try: (setf ip-address (vector 127 0 0 1))
shka has quit [Ping timeout: 255 seconds]
milanj__ has joined #lisp
<jurov> paule32: and what's the problem with #() notation?
<paule32> symbols, not numbers
<Xach> jurov: the usocket-devel list, which is not very busy, but still quite responsive
<jurov> Xach: ok, ty
Jen has joined #lisp
fikka has joined #lisp
Jen is now known as Guest94462
<Xach> jurov: i think i have sussed it
<Xach> jurov: (ql:quickload "usocket-server") will load the file that defines what you want to use.
<Xach> my grep failed me earlier
SuperJen has quit [Ping timeout: 255 seconds]
<jurov> But then symbols should not be exported either, i guess? what is the usual practice?
<Xach> jurov: it is not too unusual to act as it does.
<Xach> there is no problem exporting symbols that are not fbound
Guest94462 has quit [Remote host closed the connection]
Guest94462 has joined #lisp
<jurov> Xach tyvm! Seeing from that thread, you actually had the same problem :)
<_rumbler31> oh dang, I forgot about that
scymtym has quit [Ping timeout: 276 seconds]
<Xach> heh
damke_ has joined #lisp
rm8 has quit [Quit: i slep]
alexmlw has joined #lisp
damke has quit [Ping timeout: 240 seconds]
cgay has joined #lisp
Zakkor has joined #lisp
<Zakkor> (defun square (x) ... ; how come (x) isn't a function call in this case?
<Bicyclidine> defun is a macro, so it can define its own syntax.
<pjb> macros and special operators have special rules.
<Zakkor> is it something you could do within the language?
<pjb> It is.
<Bicyclidine> you can define your own macros, yeah.
<Zakkor> intredasting
<pjb> Zakkor: (defmacro defun (name lambda-list &body body) `(setf (symbol-function ',name) (lambda ,lambda-list ,@body))) ; basically.
<Bicyclidine> (defmacro myquote (form) (list 'quote form)). now (myquote (7)) => (7), whereas (print (7)) would be an error
<pjb> lambda is a macro that expands to (function (lambda …)) and function is a special operator, so special rules.
Tobbi has joined #lisp
scymtym has joined #lisp
mishoo has quit [Ping timeout: 260 seconds]
eudoxia has quit [Quit: Leaving]
neoncontrails has quit [Remote host closed the connection]
neoncontrails has joined #lisp
neoncontrails has quit [Ping timeout: 255 seconds]
asarch has quit [Quit: Leaving]
rm8 has joined #lisp
mson has joined #lisp
orivej has joined #lisp
shenghi has quit [Remote host closed the connection]
shenghi has joined #lisp
gabc has quit [Ping timeout: 240 seconds]
gabc has joined #lisp
LiamH has quit [Quit: Leaving.]
raphaelss has joined #lisp
python476 has quit [Remote host closed the connection]
turkja has joined #lisp
emacsomancer has joined #lisp
varjag has quit [Quit: ERC (IRC client for Emacs 25.2.1)]
foschia has joined #lisp
<foschia> hi
smurfrobot has joined #lisp
foschia has quit [Quit: Leaving]
Bicyclidine has quit [Quit: Page closed]
smurfrobot has quit [Remote host closed the connection]
Cymew has joined #lisp
smurfrobot has joined #lisp
osune has quit [Remote host closed the connection]
wigust has quit [Ping timeout: 260 seconds]
Cymew has quit [Ping timeout: 248 seconds]
Karl_Dscc has quit [Remote host closed the connection]
hexfive has quit [Quit: WeeChat 1.9.1]
Cymew has joined #lisp
scymtym_ has joined #lisp
damke_ has quit [Ping timeout: 240 seconds]
Cymew has quit [Ping timeout: 258 seconds]
foschia has joined #lisp
scymtym has quit [Ping timeout: 276 seconds]
damke_ has joined #lisp
smurfrobot has quit [Remote host closed the connection]
<foschia> help me!! i'm lost in Stupid Parentheses ahahaha
nirved has quit [Quit: Leaving]
<Josh_2> wow
<foschia> i'm a beginner lol :)
Tobbi has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
wxie has joined #lisp
damke has joined #lisp
turkja has quit [Ping timeout: 268 seconds]
<foschia> i'll solve my problem in a next moment.. bye bye :)
damke_ has quit [Ping timeout: 240 seconds]
sjl has quit [Ping timeout: 260 seconds]
foschia has left #lisp ["Leaving"]
smurfrobot has joined #lisp
alexmlw has quit [Quit: alexmlw]
zulu_inuoe_ has joined #lisp
zulu_inuoe has quit [Ping timeout: 255 seconds]
dieggsy has joined #lisp
pseudonymous has quit [Ping timeout: 248 seconds]
schoppenhauer has joined #lisp
<papachan> that was quick :p
smurfrobot has quit [Remote host closed the connection]
vaporatorius has quit [Ping timeout: 240 seconds]
turkja has joined #lisp
neoncontrails has joined #lisp
phao has joined #lisp
jack_rabbit has quit [Ping timeout: 260 seconds]
ft has quit [Ping timeout: 248 seconds]
smurfrobot has joined #lisp
mathi_aihtam has quit [Quit: mathi_aihtam]
ft has joined #lisp
mathi_aihtam has joined #lisp
wxie has quit [Remote host closed the connection]
mathi_aihtam has quit [Client Quit]
mathi_aihtam has joined #lisp
pierpa has joined #lisp
mson has quit [Quit: Connection closed for inactivity]
mathi_aihtam has quit [Ping timeout: 240 seconds]
jack_rabbit has joined #lisp
ft has quit [Remote host closed the connection]
ft has joined #lisp
k-stz has quit [Remote host closed the connection]
smurfrobot has quit [Remote host closed the connection]
xrash has joined #lisp
xrash has quit [Read error: Connection reset by peer]