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
<aeth> What implementation? Maybe there's a bug in FORMAT
<PuercoPop> mfiano: The bug you reported to Sly was supposedly fixed a while ago. (Issue #87). Wonder what happend
<mfiano> Interesting
lucasb has quit [Quit: Connection closed for inactivity]
gabbiel has quit [Remote host closed the connection]
<PuercoPop> mfiano: it was re-introduced ~6 months ago in a commit to speed up completion
<PuercoPop> Are you going to send the PR with your solution?
hhdave has joined #lisp
<mfiano> I won't be able to today. I'm deep in a bigger mess right now. Feel free to commit it
psqueak` has quit [Remote host closed the connection]
gabbiel has joined #lisp
<gabbiel> hey guys, how do I print a tab with format
<gabbiel> I know ~% is a newline
<edgar-rft> ~T prints a Tab
hhdave has quit [Quit: hhdave]
<gabbiel> i looked it up and that stands for tabulation, which im not familiar about
<oni-on-ion> column alignment
<gabbiel> so ~t is tab then?
<aeth> gabbiel: I often mix and match write functions with format. It's (usually) stream based, so it's okay to mix and match. (write-char #\tab stream) can work
<aeth> gabbiel: e.g. (let ((stream *standard-output*)) (write-char #\tab stream) (format stream "Hello, world!") (terpri stream))
<gabbiel> I know, but im already using format, i guess Ill ~a and pass it in as an arg
<aeth> gabbiel: you can also do this: (let ((stream *standard-output*)) (format stream "~cHello, world!~%" #\tab))
<aeth> Lots of flexibility
<gabbiel> but it is weird how u can't hardcode it
<gabbiel>
<mooshmoosh> you can use a literal tab character in your format string
<gabbiel> how so
<gabbiel> I tried \t, but it just prints t
<mooshmoosh> what text editor do you use?
<gabbiel> emacs
<gabbiel> there should be a ~ for it
<edgar-rft> gabbiel: (format t "1<tab>2") where <tab> is just pressing the Tab key, but take care that emacs doesn't convert <tab> to a sequence of spaces
<mooshmoosh> type the tab key when youre typing the format string
<aeth> gabbiel: CL strings don't support th \t, \n, etc., that you expect a new programming language to offer, although you could write your own reader macro (don't, that's a lot of work) to support it
<aeth> s/support th/support the/
<gabbiel> if newline is supported with ~%, i dont see why tab shouldn't
<gabbiel> i have a handy old book for this
<gabbiel> let me fetch it
<aeth> In emacs it's C-q TAB
<dlowe> gabbiel: you can add these with the cl-interpol library
<gabbiel> lmao the book so old it uses guy steels' first edition of the common lisp standard
<mooshmoosh> gabbiel: if you find a better solution i would love to know
<aeth> gabbiel: In most programming languages \n is part of the " syntax. So you can just say "Hello\n" and that will be the string. In CL, you'd have to do (format nil "Hello~%") to get the equivalent
<gabbiel> yeah I checked in the book, no \tab, but I can use ~t
<gabbiel> I can give it an arg, like so (format t "~4t" meaning it will print 4 spaces
<gabbiel> good enough for me
<aeth> I think in CL you just have \\ and \" but I could be forgetting a few
<pjb> aeth: nope. to get the equivalent in CL you just write "Hello
<pjb> world"
<pjb> (write-line "Hello
<pjb> world
<pjb> world") #| Hello
<pjb> --> "Hello ; world" |#
dddddd has quit [Remote host closed the connection]
<aeth> Interesting extension idea. Arrays can have a dimension (42) which says it's exactly 42. It would be interesting if they could also have the dimension ((42 *)) i.e. at least 42 or ((* 42)) i.e. at most 42. ((42 *)) would be very useful because then (aref foo 32) doesn't need bounds checking, but you don't restrict yourself to one known size if you have a type declaration or check-type that encodes the length.
mindCrime has quit [Ping timeout: 244 seconds]
<Josh_2> Can't you just use a macro that does bounds checking?
<Josh_2> Then you don't have to think about it
<aeth> Josh_2: that will just double the bounds checking unless you're in SBCL and locally turn on (safety 0) in the aref after you do your bounds check.
<gabbiel> how do I run a command line program with sbcl?
<aeth> Josh_2: Doing a >= or <= in the type itself gives the compiler more freedom, just like the current = in the type itself
<Bike> you could go whole hog and make the array dimensions a type themselves.
<Bike> gabbiel: sb-ext:run-program, i think.
<grewal> aeth: wouldn't there still be bounds-checking? the implementation would still need to allocate memory as needed
<gabbiel> I tried that but it gives me errors, says "ls" couldn't be found
<Josh_2> Why would u allocate memory that isn't going to be used? maybe the implementation can shrink the size down to match when you compile
<Josh_2> Idk
<aeth> grewal: It would do the bounds checking as part of the check-type or type declaration (or the, etc.) check, once, and then realize it doesn't need to do any further checks.
<aeth> grewal: So it's a probable performance win if it's done before a loop, depending on the compiler. Certainly for SBCL
<aeth> Of course, LOOP itself might do some tricks to avoid bounds checking, if your loop semantics work well with :across
<Bike> gabbiel: you should check the manual. in particular, did you use :search? if you didn't, it won't check the PATH.
<grewal> gabbiel: you can also use the full path
<aeth> Josh_2: The array would still be a (simple-array (unsigned-byte 8) (42)) or whatever, it's just that you could check for a (simple-array (unsigned-byte 8) ((42 *))) and then safely use bounds-unchecked for AREFs up to 41.
<gabbiel> it works now, but output isn't in the repl
<aeth> Josh_2: At the moment you'd only be able to do this for an exact match, and it would have to be length 42.
<grewal> aeth: I see. I thought you were getting at "infinite" lists or something
<aeth> grewal: No, it's * in the same sense of * currently is in integer, and similar to having a (simple-array (unsigned-byte 8) (*))
<Bike> gabbiel: the manual expalains this in some detail.
<grewal> gabbiel: check out the sbcl manual. `info sbcl`. it's also on the web. There are options to send output to particular places
<aeth> grewal: e.g. (let ((number 42)) (check-type number (integer * 42)) number)
cdegroot has quit [Remote host closed the connection]
oni-on-ion has quit [Read error: Connection reset by peer]
oni-on-ion has joined #lisp
<aeth> This would just let you have e.g. a (simple-vector (3 *)) or (simple-array (unsigned-byte 8) ((3 *))) in a check-type or type declaration
<gabbiel> i made ouptut t but still nothing
ebrasca has joined #lisp
wxie has quit [Remote host closed the connection]
<gabbiel> manual says pty key arg can be a stream?
<grewal> When I use slimv, :output t sends the output to the xterm that lisp is running in, not the repl in the editor
<gabbiel> yeah, pty must be set to *stanard-output*
<gabbiel> but output is iffy, lots of ^M in there
<grewal> are you on windows?
<gabbiel> no
wxie has joined #lisp
<gabbiel> ok i made output be *standard-ouput* and now it works correctly
<gabbiel> no ^M
<gabbiel> is pty for windows?
<grewal> ^M is carriage return
<gabbiel> I guess if u want correct output on windows u must use pty then, and not output
moldybits has quit [Quit: WeeChat 2.4]
Josh_2 has quit [Read error: Connection reset by peer]
<gabbiel> do you guys know if there's a function in the standard or sbcl's that returns the filename of a path? e.g. (f "/home/user/whatever/file.png") => file.png
<gabbiel> and also a function that removes the extension of a filename e.g. (g "file.png") => "file"
<Xach> gabbiel: file-namestring, sort of
<Xach> gabbiel: pathname-name
Oladon has joined #lisp
wxie has quit [Quit: Bye.]
<stylewarning> But it doesn’t “remove” the extension that sense. It extracts the file’s name within a pathname
<stylewarning> in that sense*
<gabbiel> which one, file-namestring?
<stylewarning> pathname-name
zotan has quit [Ping timeout: 250 seconds]
<stylewarning> Which would be read as “get the name out of a pathname”
<gabbiel> just tested it, it does remove the extension
<gabbiel> wow, just what I need, thanks guys
<Xach> heh
<gabbiel> file-namestring has the extension
<gabbiel> but pathname-name doesn't
<gabbiel> perfect
<stylewarning> Yes, it “removes” the extension, but it’s actually not removing anything. I’m being pedantic about what it’s doing. A pathname is an object, and the “name” within a pathname is sort of the “base name” of the path
<stylewarning> The file name without the extension
zotan has joined #lisp
<gabbiel> thanks everyone
arescorpio has joined #lisp
caltelt has joined #lisp
asarch has joined #lisp
<asarch> If I do in the Unix shell: echo -e "#!/usr/local/bin/sbcl --script\n(ql:quickload 'cl-cffi-gtk-demo-gtk)\n(gtk-demo:main)" > gtk-demo.cls && sh gtk-demo.cls
<asarch> I would get "Package QL does not exist."
<asarch> How could I load the cl-cffi-gtk-demo-gtk package?
<gabbiel> its because the .sbclrc isn't ready
<gabbiel> *read
<gabbiel> remember the (ql:add-to-init-file)
<gabbiel> and u launched sbcl, it read .sbclrc, which made the ql package be available
<asarch> Because the −−noinform −−disable−ldb −−lose−on−corruption −−end−runtime−options −−no-sysinit −−no-userinit −−disable-debugger −−end−toplevel−options flags implicit with the --script flag
<gabbiel> basically, make .sbclrc be read I think
<asarch> That's the point of my question: how?
<Xach> asarch: you could include (load "~/quicklisp/setup.lisp") somewhere
<asarch> #!/usr/local/bin/sbcl --userinit ~/.sbclrc --script
<gabbiel> yeah, load it
<asarch> YEAH!!
<asarch> THANK YOU!!
<gabbiel> np
<asarch> I was trying with (require ’cl-cffi-gtk-demo-gtk)
<asarch> D'oh!
<gabbiel> hey guys do u know if the file-name arg in the with-output-to-file macro needs to already be a string, or can I have a form which evauluates to a path?
<Bike> clhs with-output-to-file
<specbot> Couldn't find anything for with-output-to-file.
<gabbiel> like so (with-output-to-file (*standard-output* (format nil ...))
<Bike> you mean with-open-file?
<asarch> I just invented a new MIME file extension: .cls (Common Lisp Script)
<asarch> Thank you very much guys :-P
<gabbiel> ohh guys, sorry, I wasn't aware that was from alexandria
psqueak has quit [Ping timeout: 256 seconds]
mindCrime has joined #lisp
<gabbiel> difference between :supersed and :overwrite?
<gabbiel> *:supersede
<Xach> gabbiel: http://l1sp.org/cl/open explains
<gabbiel> thanks
_whitelogger has joined #lisp
femi has quit [Ping timeout: 244 seconds]
femi has joined #lisp
dtw has joined #lisp
igemnace has quit [Ping timeout: 250 seconds]
<mooshmoosh> If i have two functions that each take a stream, but on reads data from it, and the other writes data to it, is there a canonical/clean way to join them together?
igemnace has joined #lisp
<mooshmoosh> Specifically, im trying to read a zip file that is contained within another zip file. zip:zipfile-entry-contents takes a stream to write a file to, and zip:with-zipfile-stream opens a stream that is a zipfile.
<mooshmoosh> im using this https://github.com/bluelisp/zip
<katco> hey all, if you happen to use cl-ana, please weigh in on where users should go for live help/discussion: https://github.com/ghollisjr/cl-ana/issues/25
<pjb> mooshmoosh: missing semantic information. How do you want to join them?
oni-on-ion has quit [Read error: Connection reset by peer]
madmuppet006 has joined #lisp
oni-on-ion has joined #lisp
t58 has quit [Quit: Night]
femi has quit [Ping timeout: 250 seconds]
pierpal has quit [Quit: Poof]
pierpal has joined #lisp
femi has joined #lisp
wxie has joined #lisp
wxie has quit [Client Quit]
gxt has quit [Quit: WeeChat 2.4]
<mooshmoosh> pjb: i want to join the functions together, so that one writes to the stream the other reads from. if these functions returned data instead of writing to a stream, and took data from an argument instead of reading from a stream, then it would be a case of function composition.
<mooshmoosh> Does that make sense?
arescorpio has quit [Remote host closed the connection]
<pjb> You're still not precise enough. For example: (progn (write-to-stream stream) (read-to-stream stream)) is a solution.
<pjb> But: (progn (read-to-stream stream) (write-to-stream stream)) is also a solution.
Bike has quit [Quit: Lost terminal]
<pjb> Just like (lambda (input) (sink input) (produce-output)) or (lambda () (sink-input (produce-output))) would also be two solutions in your example.
<pjb> Well, (lambda (input) (sink-input input) (produce-output))
<mooshmoosh> right, so what do i pass to that lambda?
<pjb> Your input.
<pjb> For example: (defun sink (input) (print input) (values)) (defun produce-output () 42) ((lambda (input) (sink input) (produce-output)) 33) #| 33 --> 42 |# ((lambda () (sink (produce-output)))) #| 42 |#
<pjb> As for the stream, it can be a file-stream, or it could be some other kind of bi-directional stream, such as a socket.
<pjb> a socket connected to some server or client.
<pjb> It could also be a stream connected to both ends of a pipe. Then you'd have more problems.
caltelt has quit [Ping timeout: 244 seconds]
keep_learning_M has quit [Quit: This computer has gone to sleep]
zotan has quit [Ping timeout: 264 seconds]
<mooshmoosh> i havent used bidirectional streams before, can they function like a queue?
<mooshmoosh> Because that would solve the problem
zotan has joined #lisp
<aeth> I literally implement my gray-stream streams that do this as a thin wrapper over a queue
arescorpio has joined #lisp
quazimodo has quit [Ping timeout: 246 seconds]
<pjb> mooshmoosh: streams are communication channels. File stream let you move data between file and memory and between memory and file.
<aeth> The file solution is the slower, but more general solution.
<pjb> The cannot function like a queue. Do you need a queue? Why are you using files?
X-Scale has quit [Ping timeout: 255 seconds]
libertyprime has joined #lisp
<pjb> mooshmoosh: if you need a queue, with a stream API, you may want to have a look at com.informatimago.clext.pipe
quazimodo has joined #lisp
<aeth> The queue-backed gray-stream solution will either have a maximum size after which it becomes full or it will potentially have very slow "doubling" moments when you're doing a write when at the current-max size
<pjb> mooshmoosh: but again, if you want to deal with pipes, you have a problem: you need to use threads!
<pjb> mooshmoosh: again, if you want a queue, why do you want to use files?
<pjb> see com.informatimago.common-lisp.cesarum.queue
<aeth> pjb: The way I deal with it is that I don't try to deal with concurrency in the pipe itself and just require the user to use a BT lock when they use different threads (which is probably why the user's even using them in the first place)
<pjb> mooshmoosh: or com.informatimago.clext.queue
<aeth> I *think* it might just be possible with inheritance to have one with a lock inherit from the regular one, though.
<mooshmoosh> pjb: i was given these two functions that only read from and write to streams, but i want to compose them
<pjb> mooshmoosh: you're still making 0 sense.
<pjb> It doesn't mean anything to compose functions that read or write to stream. You need to elaborate on your specifications.
<pjb> mooshmoosh: see my paste!
<aeth> mooshmoosh: you either have to use files like in pjb's pastebin example or you have to write your own fairly trivial (assuming you have a queue data structure) gray-streams stream
<aeth> afaik
<aeth> at least, these are the two general approaches for pipes when I looked into it
<aeth> (of course, you can also just use someone's library)
keep_learning_M has joined #lisp
<mooshmoosh> pjb: your paste is helpful
<pjb> notice that the two reader and writer functions are careful not to write or read the same file range.
<mooshmoosh> youre using a file as the go between
<pjb> Therefore they're independent, they can run in any order, or in parallel.
<pjb> There's no go between there!
<pjb> So my paste is only useful if you understand that.
<pjb> There's no dependencency implemende when you just say a function that reads a stream and a function that writes a stream. No dependency, therefore no meaning.
<pjb> s/implemende/implied/
<mooshmoosh> Sorry a buffer, not a file
<pjb> Again, a buffer can be big!
<pjb> This doesn't imply anything.
<pjb> You need to be meaningful. Think and say what you mean.
<mooshmoosh> The dependency i want, is that the data read from or written to streams is the same
<pjb> So you want the reader to read the data that has been written by the writer?
<mooshmoosh> So the stream object that i pass to the functions might be different
<mooshmoosh> Correct
<pjb> Ok. Do you have a time machine?
<mooshmoosh> do i need one?
<pjb> No. But if you don't have one, there's only one solution.
<pjb> You must first write, then you can read.
<pjb> So (progn (write-data stream) (read-data stream)) is the only solution.
<pjb> Assuming those functions set the file-position.
<pjb> (progn (file-position stream some-position) (write-data stream) (file-position stream some-position) (read-data stream)) if not.
gabbiel has joined #lisp
<mooshmoosh> So my original question would be "whats the most clean and canonical thing to use for stream"
<aeth> mooshmoosh: Do you want a file or do you want an in-memory queue? Those are the two common solutions.
<pjb> Not a queue, there's no question of queue here.
gravicappa has joined #lisp
<aeth> okay
<pjb> It depends on the size of data, and whether you want some persistence, or whether you need the file created.
<aeth> so they have to be a file, then?
<mooshmoosh> So i can write (let ((stream (what-goes-here))) (write-data stream) (read-data stream))
<pjb> You can still use a file on a RAM file system. /tmp is often mounted from a RAM file system.
<pjb> mooshmoosh: nope. Check by paste.
<pjb> (WITH-OPEN-FILE (stream …) (write-data stream) (read-data stream))
<pjb> if you want to avoid hitting the file system, but keep the stream API, you can use strings or byte vectors.
<pjb> (with-input-from-string (stream (with-output-to-string (stream) (write-data stream))) (read-data stream))
<pjb> or flexi-stream for byte vectors.
<gabbiel> is there a standard function that replaces some x with some y in a tree?
<aeth> yes
<pjb> clhs subst
v88m has quit [Remote host closed the connection]
<aeth> beat me to it
<pjb> aeth: your answer was more correct.
<mooshmoosh> pjb: yeah i think thats what ill use
<mooshmoosh> (with-input-from-string (stream (with-output-to-string (stream) (write-data stream))) (read-data stream))
<pjb> Again, you see that the answer depends on a lot of things you've not told us.
<pjb> You need to be meaningful!
<aeth> pjb: What I meant about a queue is that if you want something more fancy than your "(with-input-from-string (stream (with-output-from-string ..." is that you can write a trivial gray-stream backed by a queue data structure
<aeth> this allows you to e.g. have one thread read and one thread write
<mooshmoosh> aeth: yes
<pjb> If you have a lot of data, that is produced and consummed progressively, you can indeed use a pipe. But then you need your producer and your consumer to run in different threads. Meanings that you need to explain.
<mooshmoosh> aeth: can you link me to some resources about gray streams you mentioned
<mooshmoosh> I read your gitlab file id like to read more
<pjb> mooshmoosh: I mentionned: com.informatimago.clext.pipeor com.informatimago.clext.queue
<mooshmoosh> pjb: thanks
<aeth> mooshmoosh: this is my pipe implementation that I linked to earlier: https://gitlab.com/zombie-raptor/zombie-raptor/blob/485bba98b450d34f9cc268255a8bd3a5f40aa692/util/stream.lisp
<mooshmoosh> The amount of data im dealing with is around 100mb so it will fit in ram
<gabbiel> dude, work with buffers
<mooshmoosh> but it would be nice to know a solution that can deal with bits at a time
<mooshmoosh> aeth: thanks
<gabbiel>
<gabbiel> just came into convo, what r u trying 2 do?
<mooshmoosh> Open a zipfile that is inside another zipfile
<mooshmoosh> without extracting them all
<gabbiel> unzip it, and unzip it agn
<gabbiel> ohh, nvm
<gabbiel> is there a function which allows unzipping programmatically?
<gabbiel> maybe some C function, and use CFFI
<mooshmoosh> Im using this
<mooshmoosh> it has a function that extracts the contents of a file within the zipfile
<mooshmoosh> But it returns it as a vector, or writes it to a stream
<mooshmoosh> And i need to pass a stream to the function that opens zipfiles
Kevslinger has quit [Ping timeout: 250 seconds]
Kevslinger has joined #lisp
jasom has quit [Ping timeout: 250 seconds]
Grue` has quit [Ping timeout: 250 seconds]
<gabbiel> okay, so obvs my first try would be WITH-ZIPFILE
mgsk has quit [Ping timeout: 250 seconds]
gko has quit [Ping timeout: 250 seconds]
<pjb> mooshmoosh: Not even with buffer, just pass the data directly, without serializing/deserializing!
<gabbiel> but since u only care about 1 file withing the zipfile
<pjb> Don't lose time zipping/unzipping.
Grue` has joined #lisp
<gabbiel> maybe use ZIPFILE-ENTRIES, get the handle for the zip within the zip
mgsk has joined #lisp
<mooshmoosh> ZIPFILE-ENTRY-CONTENTS gets the binary data of the zip within a zip
<mooshmoosh> am i missing an obvious way to pass that to with-zip-file?
<mooshmoosh> Other than using streams as we've been discussing
jasom has joined #lisp
gko has joined #lisp
orivej has quit [Ping timeout: 250 seconds]
arescorpio has quit [Remote host closed the connection]
<gabbiel> i dont see why u cant just (gethash name-of-zip-within-zip (zip-entries original-zip))
<gabbiel> and then work on that
<gabbiel> because original-zip has same type as the value of the above form
cyberoctopi has quit [Ping timeout: 246 seconds]
techquila has quit [Remote host closed the connection]
techquila has joined #lisp
Oladon has quit [Ping timeout: 258 seconds]
<gabbiel> wait nv, one is zipfile-entry and the other is zipfile
<mooshmoosh> yeah
<mooshmoosh> Zipfile-entry is an object with data about where the files content is within a zipfile
<mooshmoosh> To get the content out you use zipfile-entry-contents
techquila has quit [Remote host closed the connection]
mindthelion has joined #lisp
<gabbiel> I see the problem, open-zipfile doesn't take a stream as arg, only pathname
<gabbiel> and u dont wanna write it to a file
<mooshmoosh> thats right
<gabbiel> fortunately, we can access a packages un-exported symbols, maybe we can construct a zipfile struct which will let us do what u want
<mooshmoosh> reading the inner zipfile into a buffer then letting with-zipfile read from that buffer is the best solution i think
<gabbiel> but with-zipfile also needs a pathname
<mooshmoosh> Sorry, there is also with-zipfile-stream
<mooshmoosh> ny bad
<mooshmoosh> *my bad
ian_0xF has joined #lisp
<gabbiel> that's not even exported, but whatever
wxie has joined #lisp
<gabbiel> lmao its weird how it returns the content in a list, why not an actual array
<mooshmoosh> fortunately, we can access a packages un-exported symbols right?
<mooshmoosh> I know
<gabbiel> oh wait nvm it is an array
<gabbiel> a vector to be exact
<gabbiel> yeah you'd just need to make the vector a stream
ian_0xF has quit [Quit: Mutter: www.mutterirc.com]
<gabbiel> yeah but how would you open a stream which doesn't write to disk
dumbintel has joined #lisp
marusich has joined #lisp
noobineer has joined #lisp
<gabbiel> are you using sbcl?
vlatkoB has joined #lisp
noobineer has quit [Read error: Connection reset by peer]
mindthelion has quit [Remote host closed the connection]
<mooshmoosh> yes sbcl
techquila has joined #lisp
techquila has quit [Remote host closed the connection]
techquila has joined #lisp
rwlisp has quit [Quit: rwlisp]
techquila has quit [Remote host closed the connection]
<gabbiel> i heard something about grey-streams im playing around with that right now
techquila has joined #lisp
ludston has joined #lisp
<gabbiel> ok I think grey streams are classes you're supposed to subclass and implement your own streams or whatever
<gabbiel> which seems overkill
wxie has quit [Quit: Bye.]
<gabbiel> maybe make-string-input-string?
<gabbiel> nvm
<gabbiel> but that raises the question, why can't we make streams out of arrays
techquila has quit [Remote host closed the connection]
<gabbiel> i googled, and flexi-streams seem promising
techquila has joined #lisp
techquila has quit [Read error: Connection reset by peer]
techquila has joined #lisp
sauvin has joined #lisp
Oladon has joined #lisp
oni-on-ion has quit [Remote host closed the connection]
techquila has quit [Remote host closed the connection]
techquila has joined #lisp
techquila has quit [Remote host closed the connection]
techquila has joined #lisp
techquila has quit [Remote host closed the connection]
techquila has joined #lisp
<pjb> gabbiel: you can of course. The question is whether you want to use the CL stream API or not.
<pjb> gabbiel: flexi-streams use Gray streams!!!
<pjb> gabbiel: ie. flexi-streams is overkill :-)
dale has quit [Quit: dale]
<pjb> gabbiel: you can use strings, indeed. This is lightweight: (let ((buffer (make-array 100 :element-type 'character :fill-pointer 0))) (format buffer "Hello ") (format buffer "world!") buffer) #| --> "Hello world!" |#
techquila has quit [Remote host closed the connection]
techquila has joined #lisp
ecilam has joined #lisp
<beach> Good morning everyone!
<gabbiel> >morning
<gabbiel> lisp keeps me up
<gabbiel> lol its 2am over here
<gabbiel> but goodmorning
<gabbiel> pjb: the problem is that we are given a vector of type (unsigned-byte 8)
<pjb> gabbiel: then: com.informatimago.common-lisp.cesarum.stream
techquila has quit [Remote host closed the connection]
gxt has joined #lisp
techquila has joined #lisp
<beach> gabbiel: "The idea behind establishing this convention was to eliminate noise generated almost every time someone comes in and greets using some form of day-time based greeting, and then channel members on the other side of the globe start pointing out that it's different time of the day for them."
<gabbiel> lol i just read that
<gabbiel> ok sorry, im not much accustomed to irc rules
<pjb> Hence: GTOD = Good Time Of Day
<beach> gabbiel: No need to apologize. Just learn.
techquila has quit [Read error: Connection reset by peer]
techquila has joined #lisp
<gabbiel> is that quicklisp
<gabbiel> 'able, sorry accidentally hit enter, i know multiline is frowned upon
<pjb> in the ultralisp distribution.
techquila has quit [Remote host closed the connection]
<gabbiel> I should probably sleep, gnite everyone
gabbiel has quit [Quit: ERC (IRC client for Emacs 26.1)]
techquila has joined #lisp
techquila has quit [Remote host closed the connection]
techquila has joined #lisp
v88m has joined #lisp
v88m has quit [Read error: Connection reset by peer]
v88m has joined #lisp
asarch has quit [Quit: Leaving]
manualcrank has quit [Quit: WeeChat 1.9.1]
ggole has joined #lisp
Oladon has quit [Quit: Leaving.]
v88m has quit [Read error: Connection reset by peer]
v88m has joined #lisp
pankajgodbole has joined #lisp
mindthelion has joined #lisp
techquila has quit [Read error: Connection reset by peer]
Lord_of_Life has quit [Ping timeout: 244 seconds]
Lord_of_Life has joined #lisp
anewuser has joined #lisp
<phoe> pjb: no it won't
<phoe> (ql:quickload :parenscript) (do-all-symbols (s) (unless (symbol-package s) (return s))) ;=> #:OPEN
<phoe> that is on SBCL
<phoe> and this is without any threads in the background
<phoe> fe[nl]ix: my PR for split-sequence issues is ready, please review and merge at will.
rumbler31 has joined #lisp
rumbler31 has quit [Remote host closed the connection]
mindCrime has quit [Ping timeout: 268 seconds]
orivej has joined #lisp
wxie has joined #lisp
mindCrime has joined #lisp
<adlai> good morning #lisp !
<beach> Hello adlai.
<adlai> any idea whether the admin(s) of c-l.net lurk here?
* adlai sent admin@ an email recently, hasn't heard back
<phoe> adlai: #common-lisp.net
<adlai> dankeeschoen, phoe
<phoe> bitte, adlai
dumbintel has quit [Ping timeout: 255 seconds]
shka_ has joined #lisp
mindCrime has quit [Ping timeout: 246 seconds]
rippa has joined #lisp
varjag has joined #lisp
random-nick has joined #lisp
orivej has quit [Ping timeout: 246 seconds]
orivej has joined #lisp
Arcaelyx has quit [Ping timeout: 250 seconds]
marusich has quit [Remote host closed the connection]
varjag has quit [Ping timeout: 250 seconds]
random-nick has quit [Ping timeout: 245 seconds]
orivej has quit [Ping timeout: 244 seconds]
mooshmoosh has quit [Read error: Connection reset by peer]
mooshmoosh has joined #lisp
moldybits has joined #lisp
random-nick has joined #lisp
nowhere_man has joined #lisp
nowhere_man has quit [Remote host closed the connection]
myrkraverk has quit [Ping timeout: 250 seconds]
elazul has joined #lisp
pierpal has quit [Ping timeout: 244 seconds]
pierpal has joined #lisp
nowhere_man has joined #lisp
selwyn has joined #lisp
<selwyn> hi everyone
<selwyn> does anyone maintain LLA? https://github.com/tpapp/lla i notice various forks of this project, they don't seem to have been updated recently
<selwyn> or indeed, does anyone here use it
wxie has quit [Remote host closed the connection]
<phoe> seems like the project is unmaintained.
igemnace has quit [Quit: WeeChat 2.4]
wxie has joined #lisp
karlosz has joined #lisp
ludston has quit [Remote host closed the connection]
ludston has joined #lisp
mrak has joined #lisp
lumm has joined #lisp
cosimone has joined #lisp
ian_0xF has joined #lisp
nowhere_man has quit [Ping timeout: 246 seconds]
ian_0xF has quit [Client Quit]
FreeBirdLjj has joined #lisp
lumm has quit [Quit: lumm]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #lisp
lumm has joined #lisp
lumm_ has joined #lisp
ian_0xF has joined #lisp
lumm has quit [Ping timeout: 245 seconds]
lumm_ is now known as lumm
elazul has quit [Ping timeout: 246 seconds]
ian_0xF has quit [Remote host closed the connection]
nowhere_man has joined #lisp
Inline has quit [Quit: Leaving]
Inline has joined #lisp
nanoz has joined #lisp
dddddd has joined #lisp
kajo has joined #lisp
nowhere_man has quit [Ping timeout: 250 seconds]
pierpal has quit [Ping timeout: 245 seconds]
lumm has quit [Quit: lumm]
serviteur has joined #lisp
cyberoctopi has joined #lisp
gareppa has joined #lisp
FreeBirdLjj has quit [Remote host closed the connection]
SaganMan has joined #lisp
lumm has joined #lisp
_whitelogger has quit [Remote host closed the connection]
makomo has quit [Ping timeout: 255 seconds]
edgar-rft has quit [Quit: Leaving]
ggole has quit [Remote host closed the connection]
gravicappa has quit [Ping timeout: 246 seconds]
_whitelogger has joined #lisp
altgray has quit [Remote host closed the connection]
nicball has quit [Remote host closed the connection]
nicball has joined #lisp
nanoz has quit [Read error: Connection reset by peer]
hhdave has joined #lisp
nicball has quit [Remote host closed the connection]
ring has joined #lisp
gareppa has quit [Quit: Leaving]
Inline has quit [Ping timeout: 264 seconds]
gareppa has joined #lisp
cosimone has joined #lisp
simendsjo has joined #lisp
ring has quit [Ping timeout: 245 seconds]
Inline has joined #lisp
nanoz has joined #lisp
gabbiel has joined #lisp
<gabbiel> mooshmoosh: were you able to solve problem?
<gabbiel> mooshmoosh: I emailed the author about this, but I doubt he'll read it since his last activity was 4 years ago
hhdave has quit [Ping timeout: 248 seconds]
ring has joined #lisp
<gabbiel> was ark a failure?
vlatkoB has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
elazul has joined #lisp
ring has quit [Ping timeout: 244 seconds]
<pjb> phoe: #+ccl (let (r) (do-all-symbols (s r) (unless (symbol-package s) (push s r)))) #| --> nil |#
edgar-rft has joined #lisp
<minion> Remembered. I'll tell aozt when he/she/it next speaks.
<pjb> phoe: you must use the result of nconc, like the result of delete! (setf original-list (nconc original-list (list new-elt))) works on empty lists too!
Josh_2 has joined #lisp
<gabbiel> what's the reason for () evaluating to nil
elazul has quit [Ping timeout: 252 seconds]
<edgar-rft> you can use a list as boolean, non-empty list = true, empty-list = false
<pjb> diip: for small machines, you might want to consider clicc, ecl, or mocl. libecl is about the size of libc, well below your 1GB limit. ecl will compile to native code thru gcc, so your executable will be faster than with clisp. clicc and mocl translate your CL program to C, that you can then compile for your limited machine. clicc is opensource but oldish, would need some love. mocl is commercial but somewhat limited. It target
<pjb> gabbiel: () evaluates to nil, because the default binding of *readtable* is a standard readtable that has a standard reader macro for #\( which reads () as the symbol CL:NIL, and CL:NIL is defined to be a constant variable bound to the symbol CL:NIL.
<shka_> i second pjb about ecl
<shka_> it produces small files
<shka_> one of non-obvious things it has going for it
<pjb> gabbiel: (let ((*readtable* (copy-readtable nil))) (set-macro-character #\( (lambda (stream ch) (if (peek-char #\) stream) (progn (read-char stream) 42) (read-delimited-list #\) stream)))) (read-from-string "(hello () nil world)")) --> 42 ; 9
dale has joined #lisp
<pjb> diip: in practice, ecl is probably your best option currently. Notably if you can set up a separate development environement for your target, so you can compile binaries on the development workstation and copy just the binaries on your target.
<gabbiel> ok so its because of readtable then
<gabbiel> could I make it to give me an error?
<Xach> gabbiel: yes.
<pjb> gabbiel: (let ((*readtable* (copy-readtable nil))) (set-macro-character (character "(") (lambda (stream ch) (error "We need no ( !"))) (read-from-string "(hello () nil world)")) => Debug: We need no ( !
mooshmoosh has quit [Ping timeout: 246 seconds]
mooshmoosh has joined #lisp
Arcaelyx has joined #lisp
vms14 has quit [Quit: WeeChat 2.3]
serviteur has quit [Remote host closed the connection]
karlosz has quit [Quit: karlosz]
karlosz has joined #lisp
mindCrime has joined #lisp
sr5h has quit [Ping timeout: 258 seconds]
ring has joined #lisp
ring has quit [Remote host closed the connection]
Oladon has quit [Quit: Leaving.]
makomo has joined #lisp
vlatkoB has joined #lisp
elazul has joined #lisp
gareppa has quit [Quit: Leaving]
makomo has quit [Quit: WeeChat 2.4]
mindCrime has quit [Ping timeout: 246 seconds]
dale has quit [Quit: dale]
dale has joined #lisp
scymtym has quit [Ping timeout: 248 seconds]
idlus_ has quit [Ping timeout: 256 seconds]
idlus_ has joined #lisp
cosimone has quit [Quit: WeeChat 2.3]
kpoeck_ has quit [Quit: Connection closed for inactivity]
didi has joined #lisp
<didi> Heh, it's not much, but today I realized that function parameters can shadow dynamic variables.
Achylles has quit [Read error: Connection reset by peer]
<didi> I was wondering why some macros gensym parameters of functions even if the parameters are only visible to the macro. Avoiding shadowing dynamic variables seems like a good reason.
<didi> It's also another good reason for muffling dynamic variables.
lumm has quit [Ping timeout: 248 seconds]
rumbler31 has quit [Remote host closed the connection]
TheWild has quit [Ping timeout: 248 seconds]
<sjl> Yeah I've seen it used for streams before, e.g. (defun myprint (object &optional (*standard-output* *standard-output*)) (prin1 object) (terpri) object)
<sjl> I guess I should gensym parameter names like you said... but I'm lazy, and if someone is declaring a non-earmuffed symbol in MY package to be special... well, I don't lose any sleep over that breakage.
mindCrime has joined #lisp
aeth has quit [Ping timeout: 268 seconds]
ludston has quit [Ping timeout: 244 seconds]
aeth has joined #lisp
mindCrime_ has joined #lisp
mindCrime has quit [Ping timeout: 246 seconds]
<diip> pjb: Thanks, But I am trying to develop on the target, and it was really a choice between trying sbcl or clisp. I managed to get an old version of clisp working. I might try ecl, but I am not sure I can get all the dependencies (which might also be problem with cffi on clisp)
andrei-n has quit [Remote host closed the connection]
<pjb> diip: to develop on the target, indeed clisp might be the best choice. Otherwise you can try sbcl and ccl. ccl is smaller than sbcl. If you can do without native code (ie. if you accept clisp), you may also try ecl without gcc. ecl also has a bytecode compiler and a bytecode interpreter like clisp.
<pjb> That said, 1 GB is enough for a gcc+ecl.
<diip> I have a version of gcc,
deng_cn has quit [Ping timeout: 252 seconds]
<diip> but ccl failed
<diip> now my plan is to move the asdf folder to an external drive which should help somewhat
Lord_of_Life_ has joined #lisp
v88m has quit [Ping timeout: 250 seconds]
aeth has quit [Ping timeout: 248 seconds]
nanoz has quit [Ping timeout: 245 seconds]
aeth has joined #lisp
Lord_of_Life has quit [Ping timeout: 258 seconds]
Lord_of_Life_ is now known as Lord_of_Life
notzmv has joined #lisp
aeth_ has joined #lisp
aeth has quit [Ping timeout: 248 seconds]
mrak has joined #lisp
aeth_ is now known as aeth
xkapastel has joined #lisp
<didi> How do I turn the sixteen bit-long integer #b1000000000000001 into -1 instead of 32769?
kajo has joined #lisp
<pjb> (- 32768 #b1000000000000001) #| --> -1 |#
<didi> pjb: Thanks.
<pjb> But only when (< 32767 n)
<shka_> oh
<shka_> interesting
<shka_> why does this works?
nowhere_man has joined #lisp
t58 has quit [Quit: buying dinner]
<pjb> shka_: because the result of 2-complement is to move the negative range to the upper range: 0..32767 32768..65535 = 0..32767 -32768..-1
<shka_> ok, but how does #b drives this?
<pjb> #b doesn't matter. Numbers are not their representations.
TheWild has joined #lisp
KLoop has quit [Quit: Konversation terminated!]
<pjb> #b1000000000000001 #| --> 32769 |#
<shka_> oh
<shka_> somewhat i missed the leading 1
<shka_> silly me
<pjb> shka_, didi: but right, #b1000000000000001 is not the 2-complement representation of -1. 000001 ~ -> 111110 +1 -> 111111
<pjb> didi: so what was your question? (it's never a good idea to use examples).
<didi> pjb: I'm reading bytes from a file and I need to turn them into signed integers.
<pjb> I mean, people complain all the time about how IQ tests are meaningless because you can infer an infinite number of series from a few examples, but they keep asking questions with only examples.
<pjb> didi: the question is what is the encoding/decoding rule for those bytes?
<pjb> didi: then you can ask how to implement a rule.
<shka_> didi: so you literally want to do c style cast from unsigned to signed
<didi> Xach: Thank you.
<didi> Xach: That's it. I thought it might involve log* functions. I also hoped that I finally used BOOLE.
Jesin has quit [Quit: Leaving]
<aeth> didi: This is how you go ub32 to sb32, which I wrote the other day (for someone else?) in here: (defun ub32-to-sb32 (number) (declare (type (unsigned-byte 32) number)) (multiple-value-bind (quotient remainder) (truncate number (expt 2 31)) (- remainder (* quotient (expt 2 31)))))
<didi> aeth: Thank you.
<aeth> For ub16-to-sb16 just substitute 32 with 16 and 31 with 15
Jesin has joined #lisp
<aeth> The only caveat with this approach is it allocates some bignums for ub64 and sb64... but they're going to be bignums anyway unless you modify that function to set to an array and return that array like so: (setf (aref array) (- remainder (* quotient (expt 2 63)))) array
Blukunfando has quit [Ping timeout: 245 seconds]
<aeth> For every smaller byte size it should afaik be the most efficient approach, especially in SBCL
elazul has quit [Ping timeout: 244 seconds]
<aeth> didi: In case you're wondering with how it works, instead of doing mod it does a truncate (or floor, but there's no difference since it's positive input) and it uses the secondary value like mod and the primary value is 1 if it needs to be shifted and 0 if it doesn't, so that can be multiplied and subtracted to do the actual shift of the upper numbers into the negatives
idlus_ has quit [Ping timeout: 256 seconds]
TheWild has quit [Ping timeout: 252 seconds]
<aeth> It should be more efficient than branching for fixnums, but it might not be as efficient as a more naive approach for ub64-to-sb64 and up
<shka_> Xachs approach should be optimal
<shka_> just hint types and it should be ideal
nowhere_man has quit [Ping timeout: 252 seconds]
<aeth> shka_: That approach is probably the second most efficient, but it has branching.
<shka_> well, this may not matter in the superscalar
<edgar-rft> The most efficient approach is throwing away the argument and always return zero. The result might be totally wrong but therfore it's most efficient.
pankajgodbole has quit [Ping timeout: 255 seconds]
vlatkoB has quit [Remote host closed the connection]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
mrak has quit [Remote host closed the connection]
v88m has joined #lisp
<aeth> edgar-rft: well, that passes my unit test.
v88m has quit [Client Quit]
v88m has joined #lisp
idlus_ has joined #lisp
v88m has quit [Client Quit]
v88m has joined #lisp
cosimone has joined #lisp
cosimone has quit [Client Quit]
TheWild has joined #lisp
rpg has joined #lisp
ian_0xF has joined #lisp
<edgar-rft> aeth: I was quite sure it does
ian_0xF has quit [Client Quit]
ggole- has quit [Quit: Leaving]
rpg has quit [Ping timeout: 252 seconds]
vms14 has joined #lisp
t58 has joined #lisp
<vms14> pjb: how can I use ~va "" while iterating from a list?
<vms14> (defun create-class (name list)
<vms14> (format t ".~a~%{~%~{~3t~a: ~a;~%~}}" name list))
<pjb> (dolist (line lines) (format out "~VA~A~%" indent "" line))
<vms14> no
<vms14> (create-class "red" `("color" "red" "border-radius" "3%"))
<vms14> while using ~{ ~va ~a ~}
<vms14> the "" for ~va need to be inside that list?
<pjb> Or, you may implement formatter functions: (format out "~{~/newline-and-indent/~A~}~%" '(1 2 3))
<pjb> or: (format out "~&~{~/indent/~A~%~}" '(1 2 3))
<pjb> (defvar *indent* 0) (defun cl-user::indent (stream arg colon at &rest params) (declare (ignore arg colon at params)) (format stream "~VA" *indent* "")) (let ((*indent* 3)) (format t "~&~{~/indent/~:*~A~%~}" '(1 2 3))) #| 1
<pjb> 3
<pjb> 2
<pjb> --> nil |#
<pjb> Unfortunately we need to pass an argument to ~/…
<pjb> But we can get it back with ~:8
<pjb> ~:*
FreeBirdLjj has joined #lisp
<vms14> thanks, that was very illustrating. I didn't know I can create functions for format
idlus_ has quit [Ping timeout: 256 seconds]
FreeBirdLjj has quit [Ping timeout: 258 seconds]
idlus_ has joined #lisp
<vms14> pjb: seems you had fun playing with format
<pjb> vms14: more than you think; have a look at: http://paste.lisp.org/display/163695
t58_ has joined #lisp
<vms14> I'll save this
t58__ has joined #lisp
t58 has quit [Ping timeout: 264 seconds]
v88m has quit [Quit: Quit]
v88m has joined #lisp
orivej has quit [Ping timeout: 248 seconds]
t58_ has quit [Ping timeout: 264 seconds]
vaartis has joined #lisp
<vaartis> heyhey
<minion> vaartis, memo from pjb: perhaps a mixup between float and double? https://pastebin.com/4Dd4BZ6u
<vaartis> pjb: it actually was the fact that there were not releases for more than a year, it was fixed but not included in a release, so the GH versioin worked fine and the version a made a package for did not
<vaartis> now, another question
<vaartis> this time autowrap-related
<vaartis> there are two functions returning the same thing in C, but autowarp returns a wrapper for one and a raw pointer for another
<pjb> for C questions, try: ##c
<pjb> Nobody knows what an autowarp is here.
<vaartis> well, it's a lisp thing, huh
<pjb> awww, FFI
<vaartis> C people probably won't be much of help here, but there might be people here who used this
<pjb> Can't you just write the code in lisp?
<vaartis> It's physics
<vaartis> And collisions
<vaartis> Kind of a lot to write
<aeth> autowrap is pretty tricky
<aeth> I've gone through it when I've had issues. I'd rate the code as "too clever"
<vaartis> yeah, figured.. cl-plus-c doesn't really work well..
<vaartis> >too clever
<vaartis> i mean
<vaartis> typical lisp i guess?
<aeth> nah, it's not typical to have lots of advanced, undocumented macros
<vaartis> well, yeah
<vaartis> true.
<pjb> Also, wrapping functions with macros doesn't sound a good idea.
<aeth> It's basically readability worst case, well, short of reader macros, of course
<pjb> But you can use macroexpand to see what they're doing.
<aeth> it takes a few days to see what's going on ime
<vaartis> i wonder why it's returning inconsistent result
<vaartis> maybe i can just macroexpand c-include and look at it..
<vaartis> it's gonna have a lot of stuff though probably
<aeth> Only real way to know is to dive in with M-. and macroexpands etc. but you should expect for it to take a few days
<vaartis> i've used this thing for a few days now
<vaartis> yeah it's tricky
<vaartis> i'd just work around this exact one but im curious why it happens
<pjb> The only way to know that is to read and understand the sources of cl-autowrap.
<vaartis> looking into it..
<aeth> vaartis: borodust is probably the closest to an expert on autowrap, even though he uses his own fork of it, called claw.
<vaartis> claw is probably way easier, huh
<vaartis> yeah i saw it before
<aeth> it looks like the fork borodust maintain has no wrapped pointers, which is my main (performance) objection with cl-autowrap
<aeth> s/maintain/maintains/
<vaartis> i don't REALLY care about performance _yet_
<vaartis> besides, validity checking sounds nice in theory
<aeth> in theory, but it makes things extremely complicated and the author for cl-autowrap doesn't appear to be active anymore (still accepts pull requests, though?)
<vaartis> he did accept a pull request of mine into c2ffi
<vaartis> and said he's working on making it not-so-big-of-a-hack
<aeth> it's sort of the whole worse is better thing... do you make the library very elaborate and save work for the application author or do you keep things (somewhat) simple and have the application author do more work?
<vaartis> I'd rather not do more work, i'm doing it mostly for myself rn
<aeth> as far as the whole game use case goes, though, you put most of your stuff in very clearly defined places with unwind-protect anyway so e.g. cl-sdl2 just adds unnecessary overhead with autowrap
<aeth> s/your stuff/your foreign stuff/
idlus_ has quit [Ping timeout: 256 seconds]
idlus_ has joined #lisp
karlosz has quit [Quit: karlosz]
karlosz has joined #lisp
karlosz has quit [Remote host closed the connection]
idlus_ has quit [Ping timeout: 256 seconds]
bars0 has quit [Quit: leaving]
t58__ is now known as t58
<vaartis> aeth: who could've thought.. there are reader macros in there too
idlus_ has joined #lisp
cosimone has joined #lisp
<vaartis> the problem might be connected to libffi it seems..
<vaartis> those functions returning raw stuff use libffi
<aeth> vaartis: it looks like borodust's claw doesn't use libffi, either!
<vaartis> yeah, it uses a c library..
<aeth> The solution might just be to try claw instead if you're doing your own wrapping.
<aeth> borodust: poke
<vaartis> I'm doing more of a high level thing
didi has left #lisp ["O bella ciao bella ciao bella ciao, ciao, ciao."]
<vaartis> autowrap helps a lot with that
<borodust> aeth: yes?
<borodust> lemme catch on convo :)
<aeth> borodust: basically vaartis is having issues with stuff autowrap has but your fork doesn't
<vaartis> yeaaaah it's probably because of libffi, maybe he just forgot to wrap libffi stuff lol
<vaartis> not really an issue, just an inconsistency
<Xach> phoe: can't build postmodern-execute-file because of implicit dependency on postmodern.
<borodust> vaartis: can you link to functions your are trying to wrap that return inconsistent reults? autowrap-generated functions return wrappers for structure pointers
<borodust> if it's non-structure pointer it would just return it (except for char* which it will turn into lisp string by default)
<vaartis> thing is, the return type is the same in C
<vaartis> and the same in the introospection data from autowrap
<vaartis> but in reality, those that have structure-by-value parameters return raw pointers
<vaartis> while they should return wrappers
<borodust> i see, yeah, could be
idlus has joined #lisp
<borodust> libffi support was the last major feature introduced before rpav left lispdev
idlus_ has quit [Ping timeout: 256 seconds]
<vaartis> i made an issue, not sure if it will ever be looked at
<vaartis> eh..
caltelt has quit [Ping timeout: 250 seconds]
<borodust> vaartis: btw, congratz on submitting a lgj2019 entry :)
<phoe> Xach: thanks, this library should not be merged anyway.
<phoe> I've commented and closed.
<vaartis> borodust: tyty
Achylles has joined #lisp
<vaartis> it was a fun time
<borodust> oh, i see you are using chipmunk
<vaartis> trying to
<vaartis> i want to write a higher-level thing
<borodust> vaartis: bodge-chipmunk might be of help: https://github.com/borodust/bodge-chipmunk
<borodust> as aeth mentioned, it is wrapped with claw though
<vaartis> it's really really thing, huh
shka_ has quit [Ping timeout: 250 seconds]
<vaartis> thin*
<aeth> vaartis: A thin wrapper is a good idea because the higher level really should be at... another level. Don't try to do too many things at once.
<aeth> Ideally, at the lowest level of wrapping you should just be able to use the C (or whatever) API documentation and do the translations in your head imo.
<borodust> vaartis: yup, some ppl call them raw bindings
<vaartis> i'm more of a fan of making ideomatic bindings, not like i'm good at it though
<borodust> :claw doesn't use libffi, but requires a special C wrapper which it generates - hopefully, you can use chipmunk-blob as specified in README
<vaartis> i might..
<aeth> vaartis: idiomatic bindings can be built on top of raw bindings, though
<borodust> vaartis: cl-bodge has idiomatic API based on bodge-chipmunk :)
<aeth> I'm sensing an incoming trivial-gamekit pitch
<borodust> nah, not atm though ;p
<borodust> because it doesn't has this api exposed
<borodust> i'm thinking about making a physics plugin for it though - if anyone would be interested
idlus has quit [Ping timeout: 256 seconds]
<vaartis> borodust: i assume cl-bodge's physics system is tied into everything else it has and wouldn't really work outside?
<borodust> vaartis: at this moment - no, it won't work outside, but i can splice it into a library - but i'm too lazy optimizing things, so if you are after performant code, you better avoid it ;p
<vaartis> i see
khisanth_ has quit [Ping timeout: 246 seconds]
<borodust> anyway, i'm just saying that you can take bodge-chipmunk and make a higher level (rich) library on top of it
<vaartis> i will consider that
<vaartis> thank you
<borodust> no probs, feel free to ping me anytime if you have any qns regarding libraries in bodge collection ;p https://github.com/borodust/bodge-projects
idlus has joined #lisp
libertyprime has joined #lisp
lumm has joined #lisp
Josh_2 has quit [Quit: ERC (IRC client for Emacs 26.1)]
khisanth_ has joined #lisp
idlus has quit [Ping timeout: 256 seconds]
Jesin has quit [Quit: Leaving]
<vaartis> i wonder if it would theoretically be possible to somehow make C dynamic libraries use lisp gc
<vaartis> gee that'd be a cool conect
<vaartis> concept
Jesin has joined #lisp
idlus has joined #lisp
Achylles has quit [Read error: Connection reset by peer]
vaartis has quit [Read error: Connection reset by peer]
makomo has joined #lisp
idlus_ has joined #lisp
idlus has quit [Ping timeout: 256 seconds]
idlus_ has quit [Ping timeout: 256 seconds]
random-nick has quit [Read error: Connection reset by peer]
TheWild has quit [Ping timeout: 248 seconds]
cosimone has quit [Quit: WeeChat 2.3]
libertyprime has quit [Ping timeout: 252 seconds]
nowhere_man has joined #lisp
ring has joined #lisp
Oladon has joined #lisp
lumm has quit [Ping timeout: 248 seconds]
varjag has quit [Ping timeout: 250 seconds]
rumbler31 has joined #lisp
moei has quit [Quit: Leaving...]
ring has quit [Ping timeout: 255 seconds]
<pjb> minion: memo for vaartis: not lisp GC, because of limitations of C, but there are several garbage collectors that work with C: BoehmGC, https://www.hboehm.info/gc/ (just try to link with -lgc it's probably already here), MPS https://www.ravenbrook.com/project/mps/ and others.
<minion> Remembered. I'll tell vaartis when he/she/it next speaks.
Achylles has joined #lisp
karlosz has joined #lisp
idlus_ has joined #lisp
diip has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
rumbler31 has quit [Remote host closed the connection]
rumbler31 has joined #lisp
rumbler31 has quit [Ping timeout: 248 seconds]
cyberoctopi has quit [Ping timeout: 248 seconds]
caltelt has joined #lisp
sr5h has joined #lisp
Achylles has quit [Remote host closed the connection]
vms14 has quit [Quit: WeeChat 2.3]
ring has joined #lisp
rumbler31 has joined #lisp