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
orivej has joined #lisp
JetJej has quit [Read error: Connection reset by peer]
<aeth> yes, it is
<aeth> Not a lot of progress lately because it's a very big, fragile thing even though I've tried my hardest to be modular. The nature of the problem is kind of anti-modular. Takes a while to be able to dive into the code.
<ebrasca> aeth: How does it compare with cepl?
<aeth> ebrasca: CEPL is an interactive graphics framework, Zombie Raptor is a game engine. So they both work on top of cl-opengl and probably both on top of cl-sdl2 (not sure about CEPL), but the abstractions are different. CEPL assumes you're in something like SLIME and wanting to edit graphics interactively. ZR assumes you're creating a game that's run by instantiating the game object with #'make-game
<aeth> ZR doesn't do as many things 'live' (i.e. change the code and see the result immediately), but it probably could add some more of that by adding periodic checking for change (like once a second) or by having F5 see if shaders need to be reloaded, etc.
orivej has quit [Ping timeout: 240 seconds]
<Jachy> aeth: do you have a game you're working on as well to exercise/prove the engine?
<aeth> Jachy: Not yet, although of course I do have lots of ideas.
<aeth> Jachy: Although I guess that's not quite true. I do have a chess GUI, as in, the user interface of a chess program... a chess engine is the AI part, and I use UCI for that, defaulting to running the "stockfish" command, but it should run any stockfish-like UCI-using chess engine. At the moment it's just AI vs AI because I haven't finalized the click-recognizing API.
<aeth> Fun fact: my engine is entirely 3D, but that chess program is currently entirely 2D (using the free chess graphics from Wikipedia). The chess board is actually rendered on the 2D HUD.
<pjb> It would be nice to make it 4D so that time is taken into account and movement in the 3D space be possible…
<aeth> cl-chess doesn't do complete AI vs AI games yet. I need to be able to recognize checkmate and draws (mostly draws when the AI plays itself). My checkmate code was broken in edge cases so iirc I removed it.
<Jachy> Can objects in the HUD have different z-orders, or is it mostly dependent on draw order?
<aeth> Jachy: I suspect at the moment if you put two objects on top of each other you're going to get z-fighting.
<aeth> Everything is very basic at the moment because you kind of have to do everything 70% of the way in order to get anything that's usable.
<Jachy> I see. Still, will be neat to keep an eye on.
<aeth> At the moment instead of moving chess piece sprites on top of a board sprite, I use 64 piece-on-board sprites (or blank) for the correct background color
<aeth> Obviously not the final rendering design
Essadon has quit [Quit: Qutting]
krwq has joined #lisp
<ebrasca> mmm for now cepl is better.
<aeth> Well, I don't really promote this engine because it's not really usable at the moment because I can and do break things dramatically. I even got some memory errors a while back in my older test programs when I revisted them because I switched to static-vectors and so it was trying to free CL arrays (there's no way to tell static-vectors arrays appart from CL arrays).
<aeth> That one took me a while to figure out. Imagine if a user saw that!
<aeth> I had to switch to static-vectors for textures and 3D models to avoid copying from CL arrays to C arrays for use in OpenGL, which made my terrain test (not the one included in the engine, a different one) take several minutes to load instead of < 1 second.
pierpal has joined #lisp
Mr-Potter has quit [Quit: Leaving]
FreeBirdLjj has joined #lisp
Oladon has joined #lisp
varjag has quit [Ping timeout: 246 seconds]
<nirved> verisimilitude: how would you write 9 bits to a file? AFAIK all fs are using bytes as smallest thing to write.
milanj has quit [Quit: This computer has gone to sleep]
meepdeew has quit [Remote host closed the connection]
undiscovered has quit [Quit: WeeChat 2.3]
iovec has joined #lisp
<pjb> nirved: first, you're dead wrong.
<pjb> All FS I know are using blocks as the smallest thing they can write. Also, most random-access devices use sectors as the smallest thing they can write.
<pjb> You will also observe that some FS will optimize reading and writing from hard disks by using the track or the cylinder as unit of read or write.
<pjb> The idea of files as a sequence of bytes is a figment of the imagination of the POSIX standard.
<pjb> Now, as for how one would write 9 bits to a file, well, basically what will occur ultimately, is that a sector is read from the hard disk and copied in a memory buffer, then you will modify 9 bits (or more) in that memory buffer, and then that memory buffer will be copied back to write a sector (possibly the same, often a new one).
<pjb> (plus some more complication to update the metadata).
<pjb> Knowing that, how you use the POSIX file abstration to write 9 bits is rather irrelevant; several solutions are possible.
<pjb> For example you can use a write-bit and read-bit abstraction.
<nirved> pjb: you can create an one byte file, so this is the smallest thing; internally there might be blocks, but this is not exposed
<pjb> Or you can use the write and read (byte buffer) abstraction of POSIX, and spread the 9 bits over two bytes. Or 9 bytes as non-clisp implementations do.
<nirved> pjb: is there a fs in which the length of the file is in bits?
<pjb> I don't know. I'd guess there is. It'd be funny (there are 1-bit processors, so…)
<pjb> nirved: notably, controller-less disk media (eg. Apple floppies), had just hardware to read the tracks as a sequence of bit. Mapping track bits to sectors of bytes was done by software.
quazimodo has joined #lisp
<nirved> pjb: how does clisp do it? is it msb-first or lsb?
<pjb> probably lsb.
<nirved> pjb: looks like LSB first
<pjb> Since it writes them sequentially.
funnel has quit [Ping timeout: 268 seconds]
funnel has joined #lisp
xkapastel has quit [Quit: Connection closed for inactivity]
<nirved> pjb: files with element-type bit are really strange in clisp - there is a 4-byte file-length prefix at the beginning
<no-defun-allowed> makes sense, you couldn't count bits just by file length without some information
<aeth> Going back to both of the earlier topics of McCLIM and my game engine, I'm not going to be integrating McCLIM because that would go against my two goals of (1) leaving anything that could hurt performance to the user of the engine to do and (2) all-in-one binary distribution (my interpretation of McCLIM's LGPL license would mean that it should ship separately from a binary)...
<aeth> ...but what does it take to become a McCLIM backend? Because I suspect that there would be interest there.
<pjb> Note: it works with any byte-size from 1 up.
<pjb> also it doesn't write metadata.
<pjb> With a 1-bit file, the file-length should give you the number of bits.
<pjb> With files with more than 1-bit bytes, you can reserve a header and update it to contain the total bit length header, or just the bit-offset in the last byte. Using just the bit-offset would be easier, since it takes only one byte to write.
<aeth> pjb: re "The idea of files as a sequence of bytes is a figment of the imagination of the POSIX standard." it seems like it's more than just POSIX
<aeth> That seems to be the standard interface presented.
<aeth> Even in CL you see either bytes or characters, which are usually UTF-8 translated into the internal format (probably UTF-32) unless there's some configurable encoding support.
<aeth> Usually. Apparently CLISP is different.
<pjb> aeth: again, try to write a single byte to a SCSI, or a IDE, be it PATA or SATA disk!
<pjb> aeth: worse, try to write a single byte to a woz-machine floppy!
<aeth> pjb: Well, yes, I'm aware that there's a lie there, I think that's why you have to 'safely remove' external hard drives.
<pjb> aeth: have fun, try to write a single byte to a tape!
<pjb> and again, if you read above, I wouldn't have to repeat that to write a byte to a disk you have to first read a fucking whole sector!
<pjb> There's also the case of networks. Both serial and Ethernet are bit-based transmission protocols (level 2).
<pjb> Hence you can transmit bit stream over networks using those links.
<aeth> pjb: And I don't think you mentioned solid state drives yet, which are afaik extremely elaborate internally.
<pjb> They're more complicated, but they still use sectors.
<nirved> pjb: do you mean by serial rs-232?
<pjb> Yep.
<pjb> Usual hardware UART let you configure the number of data bits and mark bits, and the presence of parity bit, but really, they just transmit bits. When you program a GPIO on raspberry you can send the bits yourself.
jlarocco has joined #lisp
<pjb> Actually, if POSIX specifies files as sequences of bytes, it's only because it's inspired from unix which was written in C. If it had been written in Lisp, we'd have variable length bytes just as in CL read-byte and write-byte.
krwq has quit [Ping timeout: 245 seconds]
<pjb> I can't wait the singularity. We'll be able to ask the AI to evole a whole field such as computing, starting from different premices…
<nirved> pjb: heh, why would a real AI do anything for you?
<pjb> Because we'd be their Gods! :-)
<nirved> if AI is belief-based it would be utterly stupid
<pjb> Or because I would ask very nice.
ebrasca has quit [Remote host closed the connection]
<pjb> Or perhaps the AI would do it to insert googleads in the results.
FreeBirdLjj has quit [Ping timeout: 268 seconds]
FreeBirdLjj has joined #lisp
<aeth> This is why it would be safer to augment human intelligence instead of developing superhuman artificial intelligence from scratch. You know humans will want to benefit humans (or at least themselves)
<aeth> In a sense, tools like SLIME already do that, but things will really take off once we get a more efficient brain-computer interface than keyboards.
xkapastel has joined #lisp
SaganMan has joined #lisp
_whitelogger has joined #lisp
markoong has quit [Remote host closed the connection]
_whitelogger has joined #lisp
_whitelogger has joined #lisp
<beach> Good morning everyone!
<fiddlerwoaroof> morning beach
zotan has quit [Ping timeout: 268 seconds]
zotan has joined #lisp
FreeBirdLjj has quit [Ping timeout: 250 seconds]
FreeBirdLjj has joined #lisp
FreeBirdLjj has quit [Ping timeout: 240 seconds]
FreeBirdLjj has joined #lisp
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #lisp
SaganMan has quit [Quit: WeeChat 1.6]
<LdBeth> hola
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #lisp
FreeBirdLjj has quit [Ping timeout: 240 seconds]
_whitelogger has joined #lisp
rippa has joined #lisp
FreeBirdLjj has joined #lisp
FreeBirdLjj has quit [Ping timeout: 246 seconds]
zmv has joined #lisp
zmv is now known as notzmv
_whitelogger has joined #lisp
Arcaelyx has quit [Quit: Textual IRC Client: www.textualapp.com]
abhixec has quit [Ping timeout: 250 seconds]
verisimilitude has quit [Remote host closed the connection]
orivej has joined #lisp
teej has quit [Quit: Connection closed for inactivity]
orivej has quit [Ping timeout: 240 seconds]
dale has quit [Quit: dale]
FreeBirdLjj has joined #lisp
holycow has joined #lisp
FreeBirdLjj has quit [Ping timeout: 244 seconds]
FreeBirdLjj has joined #lisp
FreeBirdLjj has quit [Ping timeout: 240 seconds]
FreeBirdLjj has joined #lisp
orivej has joined #lisp
notzmv has quit [Remote host closed the connection]
orivej has quit [Ping timeout: 244 seconds]
Krystof has quit [Ping timeout: 250 seconds]
FreeBirdLjj has quit [Ping timeout: 250 seconds]
gxt has quit [Quit: WeeChat 2.3]
verisimilitude has joined #lisp
themsay has quit [Ping timeout: 268 seconds]
Younder has quit [Remote host closed the connection]
shka_ has joined #lisp
FreeBirdLjj has joined #lisp
igemnace has quit [Quit: WeeChat 2.3]
dddddd has quit [Read error: Connection reset by peer]
robdog has joined #lisp
robdog has quit [Read error: Connection reset by peer]
Oladon has quit [Quit: Leaving.]
robdog has joined #lisp
varjag has joined #lisp
xkapastel has quit [Quit: Connection closed for inactivity]
holycow has quit [Quit: Lost terminal]
varjag has quit [Ping timeout: 245 seconds]
quazimodo has quit [Ping timeout: 240 seconds]
FreeBirdLjj has quit [Read error: Connection reset by peer]
scymtym has quit [Ping timeout: 244 seconds]
rumbler31 has joined #lisp
<beach> The 300€ I offered to extract the Cleavir environment code is no longer available. I have almost finished the work myself.
<phoe> beach: congratulations!
<shka_> beach: good job
<shka_> though i was sure someone will take this
<shka_> maybe IRC exclusive is not the best way to organize such things
<beach> Possibly.
<beach> It's just as well. This way, I had the opportunity to improve the implementation.
<phoe> Is there a centralized place for all Lisp bounties currently posted?
<beach> I doubt it.
<phoe> I know beach and jackdaniel have some, there is the current CCL one for PLNs, and I know stylewarning also has some posted.
<phoe> It would be good to have a common place for those.
rumbler31 has quit [Ping timeout: 246 seconds]
<beach> Not for what I am proposing. I don't want any old person to apply. Then I would have to deal with explaining to them that they are unqualified, with looking at their existing code, etc, etc.
<beach> Oh, and I would like the applicant to have the desire to learn things. Not just make money.
<phoe> Hm. I see.
<verisimilitude> What's this about?
<beach> It has to do with the environment code of Cleavir.
<Posterdati> phoe: a Common Place for Common Lisp?
<no-defun-allowed> There are libre software funding pages, a lisp presence on some would be interesting.
<beach> Posterdati: He is suggesting a common place for bounties related to Common Lisp.
<no-defun-allowed> Also, I have a very small bounty since websocket implementing is not the best use of my time.
<Posterdati> a sencond lispjobs site?
<no-defun-allowed> I'll pay someone au$3.80 on PayPal for a synchronous websocket client.
<no-defun-allowed> Such a client should have methods for reading and writing events, but the client only should pass data events to the user and raise conditions for disconnects.
<beach> Posterdati: Maybe you don't know what "bounties" are. They are not employments. Just small amounts of money for specific tasks.
<no-defun-allowed> Yeah, bounties are a much shorter timescale.
<Posterdati> beach: :) ok, seems intriguing
<no-defun-allowed> Also, admittedly, I don't know if PayPal will let me use the $3.80 as I don't have a credit card. I think it should, hopefully.
<beach> Posterdati: We have such things for McCLIM.
<no-defun-allowed> Additionally in the constraint list, no CFFI stuff other than SSL thanks.
<beach> no-defun-allowed: That is a very small amount of money. I doubt you will have any takers.
<Posterdati> beach: :)
<no-defun-allowed> But at less than $4, I'm basically begging :')
<Posterdati> no-defun-allowed: what about using iolib?
<beach> no-defun-allowed: Absolutely.
<no-defun-allowed> Drakma allows you to get perfectly usable streams, Posterdati.
<no-defun-allowed> I do have a rough prototype for a websocket client like I describe, but most of the required features are missing.
frodef has joined #lisp
<beach> Posterdati: In the case of McCLIM, we get regular (monthly?) support from a bunch of contributors.
<Posterdati> no-defun-allowed: why don't you read the UNIX Networking Programming manual and Network Programming in ANSI Common Lisp with IOLib?
<Posterdati> beach: I see, I'm looking at the site you posted, I'm interested in usign McCLIM
<no-defun-allowed> Cause I retch at seeing Unix documentation and streams are much more natural for CL.
wigust- has joined #lisp
<Posterdati> beach: I have the API manual from 2006, is it still valid?
varjag has joined #lisp
quazimodo has joined #lisp
<beach> Posterdati: CLIM hasn't changed, if the manual is for that.
<beach> McCLIM has changed significantly, but it is still an implementation of CLIM.
<Posterdati> no-defun-allowed: I did a client/server using iolib, not easy, but not impossible!
<no-defun-allowed> Also, again, the less CFFI, the better. I'm sorry, but it'd give me more shit to maintain and deploy.
<no-defun-allowed> CFFI won't work too well on Heroku, and I want to avoid it for everything other than SSL.
<Posterdati> no-defun-allowed: since you have to use system libs I do not understand the CFFI problem...
wigust has quit [Ping timeout: 246 seconds]
<no-defun-allowed> The only C library I want to pull in is SSL, since that's definitely going to be present, everything else is more work.
wigust- has quit [Ping timeout: 250 seconds]
<no-defun-allowed> Additionally, more C means more things that go wrong that I can't gracefully recover from. I'm terrible at prototyping and I've killed a few images from being stupid with CFFI.
<phoe> no-defun-allowed: does fukamachi's websocket-driver work for your case?
<phoe> it's asynchronous, that's the only thing not matching your description
<no-defun-allowed> No, it depends on CFFI too.
<no-defun-allowed> Yeah, I have to spawn two threads instead of one to get cl-decentralise talking to it too.
<phoe> no-defun-allowed: what foreign dependencies does it have aside from CL+SSL?
<no-defun-allowed> But I suppose the synchronous requirement can be worked with, it's easy to hack on to the other.
<no-defun-allowed> There was some kind of fast-io which used static vectors which used CFFI, which I can't disable.
<phoe> STATIC-VECTORS does not really use CFFI.
<phoe> As in, it accesses foreign memory, but AFAIK it does not use external libraries.
<phoe> So in some cases it uses CFFI but does not have foreign dependencies.
<no-defun-allowed> Either way, CFFI refuses to load on Heroku.
<phoe> Oh. Wait, why?
<no-defun-allowed> Maybe I need to update the buildpack, since there is an issue with a uiop macro from what I remember.
<no-defun-allowed> >i got a very, very weird error using websocket-driver on heroku: https://pastebin.com/4XjhbYQ4
<phoe> CFFI itself should load fine. It's just another Lisp library.
ravenousmoose has joined #lisp
<no-defun-allowed> I should try to update the used SBCL anyway. It's getting a bit stale.
<phoe> OS-COND was not treated as a macro.
<phoe> It means that its macro-definition was not loaded.
<no-defun-allowed> Yeah.
<phoe> Try getting a newer UIOP and making sure you load it.
<phoe> CFFI'
<phoe> CFFI's ASD file depends on UIOP, so there is no issue there.
<phoe> Anyway, that's nothing that seems to be Heroku's fault.
wigust has joined #lisp
<no-defun-allowed> Would that come with sbcl? I think asdf did and they're fairly related libraries.
<phoe> Which version of SBCL, ASDF and UIOP do you have there?
<phoe> (list (asdf:asdf-version) uiop:*uiop-version*) ;=> ...?
<phoe> It's ("3.2.0" "3.2.0") in my case.
<no-defun-allowed> I don't know, honestly. Heroku does not let you get at a remote repl too easily.
<no-defun-allowed> SBCL is 1.2.13 though.
<phoe> That's... ancient.
<phoe> Well then, you could run an application that prints the result of this form.
<phoe> Though by now I expect it to ship ASDF2 which is ancient as well and many modern libraries refuse to run on it.,
milivoj has joined #lisp
<no-defun-allowed> I should definitely fix the buildpack then.
<phoe> Very much so. 1.2.13 was released mid-2015.
<phoe> So your implementation is 3.5 years old now.
<no-defun-allowed> Lovely.
<phoe> At this point CFFI should load, which should aid your original issue.
<no-defun-allowed> It probably should, I'll try to update the buildpack tomorrow.
<no-defun-allowed> Thank you very much for the advice.
<phoe> No problem!
random-nick has joined #lisp
<no-defun-allowed> I suppose the SBCL developers have forgotten to add the finewine(tm) program longevity improving libraries.
<phoe> It's not SBCL's fault if a library drops support for old UIOP versions.
<phoe> Hm!
<phoe> 1.2.13 has ASDF 3.1.3 though.
<phoe> ASDF/UIOP 3.1.3 does not have OS-COND though, as expected.
<phoe> So, not SBCL's fault either. Complain to CFFI maintainers that they dropped support for earlier UIOP versions.
jprajzne has joined #lisp
ismay has joined #lisp
Lycurgus has joined #lisp
ravenousmoose has quit [Quit: Taking a quick nap...ZZzzz]
karlosz has quit [Quit: karlosz]
milanj has joined #lisp
angavrilov has joined #lisp
verisimilitude has quit [Remote host closed the connection]
pvaneynd has joined #lisp
rumbler31 has joined #lisp
Lycurgus has quit [Quit: Exeunt]
rumbler31 has quit [Ping timeout: 268 seconds]
Lord_of_Life has quit [Ping timeout: 272 seconds]
Lord_of_Life has joined #lisp
scymtym has joined #lisp
JetJej has joined #lisp
dimpase_ has joined #lisp
<dimpase_> how does one install quicklisp into a custom location, rather than ~/quicklisp ?
<dimpase_> their FAQ is rather unclear on it, and in my setup (require :ecl-quicklisp) starts installing things into ~/quicklisp straight away.
akoana has joined #lisp
<Inline> i suppose there are 2 ways
<Inline> maintain a symlink to your quicklisp (wherever it is)
<Inline> i.e. let ~/quicklisp be a symlink
<Inline> or set an ENV variable
<phoe> dimpase_: you are free to move ~/quicklisp/ anywhere after it's installed
<phoe> then load the setup.lisp file from the new location
<dimpase_> the scenario we talk about is to use quicklisp to install a package systemwide.
<dimpase_> one does not want 100 students creating ~/quicklisp and downloading stuff there...
<dimpase_> seems to be a reasonable thing to do - perhaps I miss something trvial here...
<phoe> you don't want to use Quicklisp in that case
<phoe> quicklisp operates with the assumption that users can download arbitrary stuff into the Quicklisp directory
<phoe> basically, your Lisp implementation will have RW access to the quicklisp homedir
<phoe> if you want read-only access to systems, you can run Quicklisp as a privileged user, download the packages from the Internet into a directory that is read-only by other users
<phoe> then other users add that directory to their ASDF registry so they can (asdf:load-system :foo) from it.
<Inline> no he means like distributing stuff
DGASAU has quit [Ping timeout: 245 seconds]
<phoe> distributing? what do you mean?
<Inline> like a main base on some dir then everyone with his own clutter of their own quicklisp dir
<phoe> same idea
Lord_of_Life has quit [Ping timeout: 246 seconds]
<phoe> you have a system-wide registry (Quicklisp mirror) that is scanned first, and if a system is not found there, then QL/ASDF can search for it
<dimpase_> in fact, it's about adding a package into ECL embedded into SageMath... (http://sagemath.org)
makomo has joined #lisp
<Inline> phoe: is there a support for ql:quickload :stuff :path ?
<dimpase_> right now, we only have Maxima installed this way, now we want Kenzo.
Lord_of_Life has joined #lisp
<Inline> phoe: i.e. installing some libs to arbitrary paths, and keep the pointers in the registry ?
<dimpase_> so probably we will go with ASDF, and won't touch QL.
<phoe> Inline: AFAIK (ql:quickload :foo) first checks if ASDF is aware of a system
<phoe> so if the package is present in the external ASDF registry, QL won't touch it
<phoe> if it is not present, it will try to download it
<phoe> so: use an external ASDF registry, and Quicklisp on the clients, while making sure that QL is aware of the external registry.
markoong has joined #lisp
DGASAU has joined #lisp
pjb has quit [Ping timeout: 252 seconds]
q3d has joined #lisp
Bike has joined #lisp
ebrasca has joined #lisp
wxie has joined #lisp
ravenousmoose has joined #lisp
milanj has quit [Quit: This computer has gone to sleep]
pjb has joined #lisp
robdog has quit [Remote host closed the connection]
akoana has left #lisp ["Leaving"]
quazimodo has quit [Ping timeout: 272 seconds]
Josh_2 has joined #lisp
wxie has quit [Ping timeout: 246 seconds]
ravenousmoose has quit [Quit: Taking a quick nap...ZZzzz]
ravenousmoose has joined #lisp
jprajzne has quit [Quit: jprajzne]
jprajzne has joined #lisp
frodef has quit [Ping timeout: 272 seconds]
JetJej has quit [Read error: Connection reset by peer]
jprajzne has quit [Client Quit]
jprajzne has joined #lisp
pjb has quit [Ping timeout: 240 seconds]
sjl has quit [Quit: WeeChat 2.2-dev]
dddddd has joined #lisp
pjb has joined #lisp
dimpase_ has quit [Ping timeout: 245 seconds]
ravenousmoose has quit [Quit: Taking a quick nap...ZZzzz]
<jackdaniel> I've answered this question on the mailing list (about ecl-quicklisp contrib). To sum up: 1. ql should be installed from quicklisp.org (ecl-quicklisp is a conveniance hack), 2. to customize location for ecl-quicklisp contrib do something like: (push '("HOME:QUICKLISP;**;*.*" "/tmp/quicklisp/**/*.*") (logical-pathname-translations "HOME"))
xkapastel has joined #lisp
<Xach> i get frustrated sometimes when the same question is posted to irc, mailing list, reddit, stack overflow
nirved has quit [Read error: Connection reset by peer]
jprajzne has quit [Quit: jprajzne]
jprajzne has joined #lisp
jprajzne has quit [Client Quit]
jprajzne has joined #lisp
JetJej has joined #lisp
phoe has quit [Read error: Connection reset by peer]
nanoz has joined #lisp
FreeBirdLjj has joined #lisp
akoana has joined #lisp
igemnace has joined #lisp
Zaab1t has joined #lisp
scymtym has quit [Ping timeout: 240 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
q3d has quit [Ping timeout: 256 seconds]
FreeBirdLjj has joined #lisp
q3d has joined #lisp
jason_m has quit [Ping timeout: 240 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #lisp
nirved has joined #lisp
FreeBirdLjj has quit [Ping timeout: 250 seconds]
pierpal has quit [Quit: Poof]
pierpal has joined #lisp
pvaneynd has quit [Ping timeout: 268 seconds]
phoe has joined #lisp
orivej has joined #lisp
q3d has quit [Ping timeout: 256 seconds]
dvdmuckle has quit [Quit: Bouncer Surgery]
orivej has quit [Ping timeout: 250 seconds]
dvdmuckle has joined #lisp
orivej has joined #lisp
Oladon has joined #lisp
gravicappa has joined #lisp
orivej has quit [Ping timeout: 246 seconds]
pierpal has quit [Quit: Poof]
pierpal has joined #lisp
Lycurgus has joined #lisp
dale has joined #lisp
ntbre has joined #lisp
FreeBirdLjj has joined #lisp
orivej has joined #lisp
ntbre has quit [Quit: ntbre]
FreeBirdLjj has quit [Ping timeout: 245 seconds]
mrcom has quit [Quit: This computer has gone to sleep]
<phoe> What condition type would be the best for the kind of error "START is greater than END"?
<phoe> Is that a TYPE-ERROR?
<nirved> in sbcl (subseq "123" 2 1) gives BOUNDING-INDICES-BAD-ERROR
<phoe> that's a SBCL-internal condition that also happens to be a TYPE-ERROR
random-nick has quit [Read error: Connection reset by peer]
<nirved> in clisp the condition is SIMPLE-ERROR
milanj has joined #lisp
Necktwi has quit [Ping timeout: 246 seconds]
makomo has quit [Ping timeout: 240 seconds]
milanj has quit [Quit: This computer has gone to sleep]
mrcom has joined #lisp
Necktwi has joined #lisp
devon has joined #lisp
SaganMan has joined #lisp
makomo has joined #lisp
makomo has quit [Client Quit]
makomo has joined #lisp
dale has quit [Quit: dale]
atgreen has joined #lisp
devon has quit [Ping timeout: 240 seconds]
frodef has joined #lisp
Lycurgus has quit [Quit: Exeunt]
pierpal has quit [Quit: Poof]
pierpal has joined #lisp
Mr-Potter has joined #lisp
devon has joined #lisp
elem6 has joined #lisp
gravicappa has quit [Ping timeout: 246 seconds]
Zaab1t has quit [Quit: bye bye friends]
elem6 has quit [Ping timeout: 250 seconds]
<stylewarning> It could be either
orivej has quit [Ping timeout: 272 seconds]
jprajzne has quit [Quit: jprajzne]
<margaritamike> What would be the equivalent of php's bin2hex in Common Lisp?
<Bike> (write (parse-integer binstring :radix 2) :base 16)
<Bike> er, write-to-string
<pjb> (format nil "~{2,'0X~}" (coerce sequence 'list))
<Josh_2> (format t "~x" <ur number>)
<pjb> (let ((sequence #(0 1 2 3 128 129 130 254 255))) (format nil "~{~2,'0X~}" (coerce sequence 'list))) #| --> "00010203808182FEFF" |# ; sorry, missed a ~
zotan has quit [Ping timeout: 245 seconds]
zotan has joined #lisp
karlosz has joined #lisp
nanoz has quit [Quit: Leaving]
<LdBeth> seems STEP in ccl does nothing
<phoe> LdBeth: did you compile with high enough debug settings?
<LdBeth> well, no
<LdBeth> phoe: so declare in function body and then step?
<phoe> ...welp
<phoe> this gives me very little hope
<LdBeth> that't why i asked. 😂
<Josh_2> phoe: oof
Selwyn has joined #lisp
<LdBeth> they lacks funding
themsay has joined #lisp
SaganMan has quit [Quit: WeeChat 1.6]
themsay has quit [Ping timeout: 240 seconds]
makomo has quit [Ping timeout: 272 seconds]
makomo has joined #lisp
tempate has joined #lisp
Josh_2 has quit [Quit: ERC (IRC client for Emacs 26.1)]
makomo has quit [Ping timeout: 245 seconds]
<tempate> Hello. I'm reading Practical Common Lisp and I am kind of stuck. For some reason https://bpaste.net/show/6a504c25c54d isn't working as it should. When running (test+-) I should be getting T if all tests are passed. Instead, it's just returning nil every time.
<tempate> Also, for some other reason, when compiling the first time (fyi, using Portacle) I get 1 Error 1 Warning and 3 Style-warnings. But, when compiling for the second time, it all works out just fine.
<Fade> tempate: trace #'report-result .. is it returning what you'd expect?
<Fade> this code reports pass for every form, and returns nil, on my system.
<Fade> which is pretty much what you'd expect.
dueyfinster has joined #lisp
dueyfinster has quit [Client Quit]
<tempate> the thing is I don't know where I've gone wrong, as much of the code is just copied from the book
<tempate> I've tried to understand it and so, but I have no idea why it's not working
<Fade> I don't have the book nearby, but I don't think you have gone wrong.
<margaritamike> I wonder if Common Lisp is still used at Google
<shka_> tempate: how do you load this file?
<margaritamike> Or if they gutted that one project and replaced it with Java or whatever
<pjb> I get no compilation errors.
<Fade> you were expecting the #'test+- to return t?
<shka_> margaritamike: they would want to
<pjb> And (test+-) prints 3 pass and returns nil.
<tempate> shka_: C-k
<tempate> Fade: when all the tests are passed, yeah
<Fade> that macro expands to calls to format
<Fade> format returns nil
<Fade> what is the return value of: (format t "What do I return?")
makomo has joined #lisp
<margaritamike> shka_: I wonder why
<_death> tempate: the PCL chapter has a section "Fixing the Return Value"
<tempate> Fade: nil
<shka_> margaritamike: easier to manage if code base in the whole company is in one laguage
<Fade> the output is a side effect, which is different from the return value of the call.
<tempate> _death: yes, it's that section I just finished reading and updating the code, which is the one I send
<_death> tempate: you forgot to first snippet shown
<_death> *the
<tempate> Fade: supposedly, combine-results is what should fix it
<shka_> so they have java, C++ and go, i suspect that C++ would be rewritten if not for the size of the code base
<shka_> that would leave just Go and Java
<shka_> and some python at youtube
<tempate> _death: ohh...
<tempate> you are right
<tempate> sorry for the stupidity then
<shka_> that is python 2 AFAIK
<shka_> so you have it
<Fade> :)
<tempate> are there some good exercises I can do as I follow the book?
<tempate> I'm liking it very much but I feel it's lacking practice
<margaritamike> shka_: tragic :[
<shka_> nah
<margaritamike> tempate: kattis now supports SBCL
<shka_> people starving to death is tragic
<shka_> this is just stupid
<margaritamike> tempate: https://open.kattis.com/help/lisp
<shka_> but perhaps this is the efficient way to run the company
<tempate> margaritamike: I'll give it a try
<tempate> thanks
angavrilov has quit [Remote host closed the connection]
<_death> tempate: there are many sites for programming "challenges".. lisp specific ones are http://www.ic.unicamp.br/~meidanis/courses/mc336/2006s2/funcional/L-99_Ninety-Nine_Lisp_Problems.html and https://github.com/google/lisp-koans I guess
makomo has quit [Quit: WeeChat 2.2]
<Fade> see also: https://projecteuler.net/
<_death> tempate: books like ANSI Common Lisp, Paradigms of AI Programming, Structure and Interpretation of Computer Programs also have exercises
<tempate> Fade: I've checked that one already, but the problems require a level which I don't yet have
<tempate> _death: noted. I'll give them a good look
<Fade> PAIP in particular is an excellent learning resource.
<shka_> also, PAIP has those classical AI algorithms that probably everyone is ought to know
<shka_> so that would be two birds with one stone
terpri has quit [Remote host closed the connection]
<tempate> I'm not lying when I say that that was the one that I was planning to read first
<tempate> after I've finished PCL, that is
<Fade> that's a good trajectory through the standard materials, imo
<tempate> great
<shka_> das good, das optimal ;-)
<Fade> after PAIP, I'd read Art of the Metaobject Protocol
meepdeew has joined #lisp
<flip214> and Loλ, and LoL
ntbre has joined #lisp
frodef has quit [Ping timeout: 246 seconds]
abhixec has joined #lisp
Khisanth has quit [Ping timeout: 245 seconds]
Selwyn has quit [Ping timeout: 272 seconds]
random-nick has joined #lisp
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
kajo has joined #lisp
<fe[nl]ix> phoe: please redo the commits
<fe[nl]ix> git reset origin/master, then use Magit or something similar to split the changes in 3-5 commits
<fe[nl]ix> I can't review a series of 38 commits (and continuing)
Khisanth has joined #lisp
nydel has quit [Quit: WeeChat 2.1]
drolax has joined #lisp
nydel has joined #lisp
devon has quit [Ping timeout: 240 seconds]
dimpase_ has joined #lisp
iovec has quit [Quit: Connection closed for inactivity]
<shka_> phoe: you can do this by using interactive rebase and squash
devon has joined #lisp
Krystof has joined #lisp
<phoe> fe[nl]ix: oh yes, okay - I'll squash them in a second
<phoe> fe[nl]ix: though, honestly, I do not know how to organize these commits within these 3-5 ones - I literally completely reorganize the code in there.
zmv has joined #lisp
dimpase_ has quit [Ping timeout: 250 seconds]
zmv is now known as notzmv
devon has quit [Ping timeout: 268 seconds]
<tempate> should macros be defined before functions?
<phoe> tempate: macros must be defined before the functions that call them.
<phoe> a macro generates code. the compiler that compiles a function must know what kind of code it contains in order to compile it.
<phoe> so, if the compiler encounters a function that contains a macro call, that macro must be defined right during that moment of compilations (unlike functions, which may be defined later).
<tempate> oh, alright
shka_ has quit [Ping timeout: 244 seconds]
<tempate> but if a function is not calling a certain macro, it doesn't matter if it's defined before or after, right?
<aeth> Afaik, defmacros and defuns are generally mixed, unlike globals/constants, which should go at the top by convention.
<phoe> sure
<phoe> if a function doesn't use a macro, then it doesn't care if or when that macro is defined
<phoe> as for when macros/functions should be defined in the code: anywhere as long as it's logical
<tempate> ok. I wasn't sure if it was good practice to define macros before all else or not. That sorts it out, thanks
igemnace has quit [Quit: WeeChat 2.3]
<phoe> the only rule here is: define a macro before anything that uses it
<phoe> otherwise your compiler will refuse to work
dueyfinster has joined #lisp
orivej has joined #lisp
<_death> also define the functions that a macro uses before use of the macro.. one way to do it cleanly is to separate macro definition from use, for example by placing them in different files
<aeth> Usually, I wrap the functions in eval-when until they get too long. After a few hundred or so, then a separate file becomes the clear answer.
<aeth> s/a few hundred or so/a few hundred or so lines/
<aeth> lines, not functions!
ntbre has quit [Quit: ntbre]
<aeth> The options are (a) put the functions in a separate file or (b) wrap the functions in eval-when. This is only necessary for functions called *while the macro is expanding*, not called in the final expansion result. i.e. (defmacro foobar () (foo 42)) requires this workaround but (defmcaro foobar () `(foo 42)) does not.
ntbre has joined #lisp
tempate has quit [Quit: Leaving.]
<aeth> These functions usually return lists acting as Lisp syntax. e.g. (foo 42) in the first example might return `(make-array 42 :element-type 'single-float :initial-element 0) but (foo 42) in the second example if doing the same functionality shouldn't do that because it's being called at runtime.
<aeth> (oops, the initial element should be 0f0)
amerlyq has joined #lisp
orivej has quit [Ping timeout: 246 seconds]
drolax has quit [Ping timeout: 252 seconds]
milivoj has quit [Quit: milivoj]
gxt has joined #lisp
moei has quit [Quit: Leaving...]
JetJej has quit [Read error: Connection reset by peer]
makomo has joined #lisp
zmt01 is now known as zmt00
meepdeew has quit [Remote host closed the connection]
karlosz has quit [Quit: karlosz]
karlosz has joined #lisp
dale has joined #lisp
<LdBeth> is there a lib helps generating LLVM IR?
quazimodo has joined #lisp
<no-defun-allowed> there's a cl-llvm which uses the LLVM library
<no-defun-allowed> i had a go at abusing the CL printer to print LLVM IR, but it's a bit tricky
<no-defun-allowed> LLVM IR has weird nesting rules to be honest
MichaelRaskin has quit [Quit: MichaelRaskin]
<LdBeth> wait, did quicklisp remove cl-llvm
dacoda has joined #lisp
<aeth> they just did in the latest release, I noticed that.
<aeth> I'm not sure why. You should ask the Quicklisp team.
nopf has quit [Ping timeout: 246 seconds]
ismay has quit [Ping timeout: 268 seconds]
<LdBeth> > Removed projects: cl-llvm, cl-skkserv
<LdBeth> > The removed projects no longer build for me.
corvidzz has joined #lisp
varjag has quit [Quit: ERC (IRC client for Emacs 26.1)]
random-nick has quit [Read error: Connection reset by peer]
<LdBeth> well, I tested, seems new version of LLVM factored their lib
dacoda has quit [Ping timeout: 268 seconds]
Lord_of_Life has quit [Ping timeout: 245 seconds]
<no-defun-allowed> yeah, you need a really old llvm to use it
Lord_of_Life has joined #lisp
nowhereman has quit [Read error: Connection reset by peer]
devon has joined #lisp
atgreen has quit [Ping timeout: 240 seconds]
nowhere_man has joined #lisp