jackdaniel changed the topic of #commonlisp to: Common Lisp, the #1=(programmable . #1#) programming language | Wiki: <https://www.cliki.net> | IRC Logs: <https://irclog.tymoon.eu/libera/%23commonlisp> | Cookbook: <https://lispcookbook.github.io/cl-cookbook> | Pastebin: <https://plaster.tymoon.eu/>
random-nick has quit [Ping timeout: 248 seconds]
jmdaemon has joined #commonlisp
hrberg has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
goober has quit [Remote host closed the connection]
goober has joined #commonlisp
goober has quit [Remote host closed the connection]
goober has joined #commonlisp
waleee has quit [Ping timeout: 246 seconds]
wonko-the-sane has joined #commonlisp
yitzi has quit [Remote host closed the connection]
wonko-the-sane has quit [Ping timeout: 246 seconds]
dinomug has joined #commonlisp
igemnace has joined #commonlisp
pestctrl` has quit [Remote host closed the connection]
blunder has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
ldb has joined #commonlisp
blunder has quit [Ping timeout: 255 seconds]
habamax has joined #commonlisp
edgar-rft has quit [Ping timeout: 250 seconds]
edgar-rft has joined #commonlisp
b00p has joined #commonlisp
pranavats has quit [Ping timeout: 255 seconds]
wonko-the-sane has joined #commonlisp
bilegeek_ has joined #commonlisp
bilegeek has quit [Ping timeout: 240 seconds]
hernan has quit [Server closed connection]
hernan has joined #commonlisp
b00p has quit [Ping timeout: 245 seconds]
deadmarshal_ has quit [Remote host closed the connection]
dirtcastle has quit [Remote host closed the connection]
NotThatRPG has joined #commonlisp
triffid has joined #commonlisp
NotThatRPG has quit [Ping timeout: 248 seconds]
Pixel_Outlaw has quit [Quit: Leaving]
NotThatRPG has joined #commonlisp
ldb has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.1)]
NotThatRPG has quit [Ping timeout: 255 seconds]
deadmarshal_ has joined #commonlisp
zaymington has joined #commonlisp
light has quit [Server closed connection]
dirtcastle has joined #commonlisp
light has joined #commonlisp
igemnace has quit [Quit: WeeChat 4.0.4]
Pixel_Outlaw has joined #commonlisp
blunder has joined #commonlisp
rtypo has joined #commonlisp
blunder has quit [Quit: leaving]
dinomug has quit [Remote host closed the connection]
easye has quit [Ping timeout: 246 seconds]
bilegeek_ has quit [Quit: Leaving]
Pixel_Outlaw has quit [Remote host closed the connection]
shka has joined #commonlisp
puke has quit [Quit: puke]
puke has joined #commonlisp
zxcvz has joined #commonlisp
Catie` has quit [Server closed connection]
leeb has quit [Server closed connection]
Catie has joined #commonlisp
leeb has joined #commonlisp
zxcvz has quit [Client Quit]
easye has joined #commonlisp
easye has quit [Ping timeout: 246 seconds]
pve has joined #commonlisp
keja has quit [Read error: Connection reset by peer]
marsipan has quit [Ping timeout: 244 seconds]
rgherdt has joined #commonlisp
fiddlerwoaroof has quit [Server closed connection]
fiddlerwoaroof has joined #commonlisp
azimut has quit [Ping timeout: 246 seconds]
anticomputer_ has joined #commonlisp
anticomputer has quit [Ping timeout: 246 seconds]
Posterdati has quit [Quit: KVIrc 5.0.0 Aria http://www.kvirc.net/]
zxcvz has joined #commonlisp
Posterdati has joined #commonlisp
zxcvz has quit [Client Quit]
dnhester26 has joined #commonlisp
dnhester26 has quit [Ping timeout: 246 seconds]
masinter has quit [Ping timeout: 248 seconds]
anticomputer_ has quit [Remote host closed the connection]
anticomputer has joined #commonlisp
randm has quit [Remote host closed the connection]
randm has joined #commonlisp
dcb has quit [Quit: MSN Messenger 4.0.4]
masinter has joined #commonlisp
Irvise has joined #commonlisp
dino_tutter has joined #commonlisp
Inline has quit [Quit: Leaving]
Inline has joined #commonlisp
attila_lendvai has joined #commonlisp
admich has joined #commonlisp
admich` has joined #commonlisp
jeosol has quit [Quit: Client closed]
mingus has quit [Server closed connection]
mingus has joined #commonlisp
hefner has quit [Server closed connection]
hefner has joined #commonlisp
random-nick has joined #commonlisp
seok has quit [Quit: Client closed]
seok has joined #commonlisp
gty has quit [Quit: gty]
rgherdt_ has joined #commonlisp
rgherdt has quit [Ping timeout: 248 seconds]
admich has quit [Remote host closed the connection]
admich has joined #commonlisp
jeosol has joined #commonlisp
Inline has quit [Remote host closed the connection]
Inline has joined #commonlisp
wonko-the-sane has quit [Ping timeout: 246 seconds]
admich has quit [Ping timeout: 250 seconds]
admich` has quit [Ping timeout: 250 seconds]
wonko-the-sane has joined #commonlisp
<fitzsim> borodust: do you remember how you compiled/linked libnuklear.so in nuklear-blob?
<fitzsim> borodust: https://github.com/vurtun/nuklear doesn't have any target for libnuklear.so
<ixelp> GitHub - vurtun/nuklear: A single-header ANSI C gui library
azimut has joined #commonlisp
<fitzsim> seems to work: in nuklear/src: for i in *.c; do gcc -c $i; done; gcc -shared -o libnuklear.so *.o
random-jellyfish has joined #commonlisp
<random-jellyfish> I wrote a function that looks at the slots of a class and keeps only the ones that are of certain types, it looks like this: https://pastebin.com/78hVywex
<ixelp> (defun get-signals (obj) (declare (optimize (speed 0) (space 0) (debug 3))) - Pastebin.com
<random-jellyfish> the problem is I get nil whenever I used it on an object of this class:
<random-jellyfish> (defclass example-class ()
<random-jellyfish>   ((clk :accessor clk :initform (make-instance 'sl-signal-binary :bit-width 1))
<random-jellyfish>    (rst :accessor rst :initform (make-instance 'sl-signal-binary :bit-width 1))
<random-jellyfish>    (valid :accessor valid :initform (make-instance 'sl-signal-binary :bit-width 1))
<random-jellyfish>    (data :accessor data :initform (make-instance 'sl-signal-binary :bit-width 8))
<random-jellyfish>    (obj :accessor obj :initform (make-instance 'sl-signal-object))
<random-jellyfish>    (event :accessor event :initform (make-instance 'sl-sync-event))
<random-jellyfish>    (val :accessor var :initform 5)))
<random-jellyfish> why is that happening?
<beach> random-jellyfish: That code has many issues.
<beach> For starters, it is not correctly indented.
<random-jellyfish> it will be, it had a lot of comments and debugs messages that I had to remove before pasting it on pastebin
<random-jellyfish> that's the least of my worries tbh
<beach> random-jellyfish: But that makes it impossible to read.
<random-jellyfish> okay I'll repaste it, one second
<fitzsim> oh, I'm missing symbols like this __claw_nk_begin in my ppc64le libnuklear.so
<random-jellyfish> beach there it is https://pastebin.com/mvdKTkra
<ixelp> (defun get-signals (obj) (declare (optimize (speed 0) (space 0) (debug 3))) - Pastebin.com
<random-jellyfish> it should be read from bottom to top to make sense
<random-jellyfish> I'm building a list with all the slots of a class, and then I apply some filters to it
<beach> Why do you mix FIRST and CADR? Why do you take TYPE-OF and then FIND-CLASS rather than CLASS-OF?
<beach> And why do you use EQUALP to compare symbols?
<random-jellyfish> I want for each slot to get something like (:name slot-name ...the slot's initform...)
<random-jellyfish> I want a list of lists, each list describing the slot of the class
<random-jellyfish> so that I could use getf to get what I want from them
<beach> It seems to me you would be better of with LOOP and to build the list in one iteration.
<beach> The repeated application of MAPCAR and REMOVE-IF-NOT is both confusing and inefficient.
<random-jellyfish> it's strange that everything words except for the top most remove-if-not
<random-jellyfish> works**
<random-jellyfish> that member call returns nil
<random-jellyfish> even though those symbols are in that list
<random-jellyfish> I printed them out with format
<random-jellyfish> I try to evaluate the (memeber ...) in the repl and it works
<random-jellyfish> anyway, I'll try the loop thing
<random-jellyfish> sometimes I find it easier to use mapcar and remove-if-*
<random-jellyfish> probably because of all the fun I had with Haskell
<beach> That's fine. But now you are submitting it to be read by people who might not have had that much fun.
<beach> random-jellyfish: At the very least, extract the (now anonymous) functions to global functions with a name.
<beach> random-jellyfish: And use more relevant names (like not IT), perhaps also for intermediate results.
<beach> random-jellyfish: And put names on things like (member instance-type '(sl-...))
<beach> random-jellyfish: So way more smaller functions.
<beach> random-jellyfish: Then you can TRACE individual functions for better debugging.
duuqnd has quit [Quit: ZNC 1.8.2 - https://znc.in]
<fitzsim> borodust: I didn't notice the nuklear submodule of bodge-nuklear; that has the libnuklear.so build in it
<fitzsim> borodust: ok, on ppc64le: just cleared ~/.cache/common-lisp/sbcl*, then in a new sbcl process: (ql:quickload :trivial-gamekit) and everything *loads* successfully
<fitzsim> this is with most bodge projects in ~/quicklisp/local-projects
tyson2 has joined #commonlisp
viata is now known as viatatribal
rgherdt_ is now known as rgherdt
<fitzsim> borodust: needed this patch to bodge-glfw: http://paste.debian.net/plain/1291505
<fitzsim> otherwise bodge-host errored out looking for that function
<fitzsim> er, macro
<fitzsim> now the "Hello, Gamedev!" example shows a frame with a white background; no errors, but the text doesn't draw for some reason
habamax has quit [Remote host closed the connection]
<fitzsim> oh yeah, there's still a hack I have to fix, for nanovg; that's probably why the text doesn't show
<fitzsim> I'm going to discuss this further on #cl-bodge
yitzi has joined #commonlisp
jonatack has quit [Read error: Connection reset by peer]
jonatack has joined #commonlisp
jmdaemon has quit [Ping timeout: 258 seconds]
zxcvz has joined #commonlisp
zxcvz has quit [Client Quit]
jello_pudding has quit [Ping timeout: 255 seconds]
jello_pudding has joined #commonlisp
dino_tutter has quit [Ping timeout: 248 seconds]
aeth has quit [Server closed connection]
aeth has joined #commonlisp
nature has joined #commonlisp
<nature> Currently facing an issue with cl-readline and cffi (I think it might be more of a cffi bug, as cl-readline really just is a wrapper)
<nature> If I isolate the cffi call to this function: https://github.com/openbsd/src/blob/master/gnu/lib/libreadline/funmap.c#L191
attila_lendvai_ has joined #commonlisp
<nature> whatever the string I pass for the name, it gets all garbled up, and when I call the list funmap names functions, I only see stuff like "\337\337\337\357..." where my function name should've been, and no the number of chars doesn't correspond, it looks like a null-pointer access or something...
<beach> What are you using readline for?
attila_lendvai has quit [Ping timeout: 258 seconds]
<nature> I want to create a little utility to scan and select wifi networks (I am on UNIX)
<nature> And readline itself works
<nature> it's when I want to bind a function in it that it fails
<nature> because I want a shortcut to refresh the wifi scan
notzmv has joined #commonlisp
<semarie> nature: on openbsd, libreadline from base is old (it is here for gdb if I remember well), so it could not work well with cl-readline. it is preferable to use devel/readline port (pkg_add readline). it is installed with not standard name (to not clash with base): -I/usr/local/include/ereadline -lereadline
<semarie> see pkg_info -L readline , for the list of files in the package
Lycurgus has joined #commonlisp
amb007 has quit [Ping timeout: 258 seconds]
amb007 has joined #commonlisp
<nature> semarie: Thanks, but how do I use it with sbcl then?
<nature> because I believe sbcl is linked with the readline from base no?
<nature> Also thank you for your work on maintaining sbcl on OpenBSD
Inline has quit [Remote host closed the connection]
Inline has joined #commonlisp
<edgar-rft> nature: on debian there's a rlwrap(1) binary (readline wrapper), so I do `rlwrap sbcl'
<nature> Then maybe, is there a more straightforward way to create minimal UIs?
<nature> TUI would be nice, but I don't mind GUI too
<edgar-rft> there was a readline-like interface written entirely in Common Lisp, but I must search for the name
<edgar-rft> I think it was -> https://www.cliki.net/Linedit
<ixelp> CLiki: Linedit
<ixelp> linedit / linedit · GitLab
chrcav has joined #commonlisp
tyson2 has quit [Read error: Connection reset by peer]
<edgar-rft> for toy GUIs (talking to a Tcl/Tk interpreter via a pipe) -> https://www.cliki.net/ltk
<ixelp> CLiki: ltk
<edgar-rft> for more serious GUI tasks -> https://www.cliki.net/McCLIM
<ixelp> CLiki: McCLIM
<edgar-rft> the full list -> https://www.cliki.net/GUI
<ixelp> CLiki: GUI
Lycurgus has quit [Quit: Tschüss]
<edgar-rft> there's a #clim channel full of McClim people :-)
<nature> Which one would be the simplest and most staightforward?
<nature> also linedit seems to still use uffi, isn't this a bit outdated?
<edgar-rft> LTK is probably the simplest, but also the most limited
<edgar-rft> Lisp folks usually are happy to use the REPL for everything, there are not overly many UI programmers
<nature> My goal really is a simple tool that scans for wifis and asks the user which one he wants to join and eventually asks a password if needed
<nature> What sounds like the best approach for such a tool
<nature> I initially thought of a little interactive cli tool, but it seems that this is not as straightforward as I thought
<beach> nature: I would definitely use McCLIM.
<_death> there's already such a tool on linux called wifi-menu
tedwing has joined #commonlisp
<nature> _death: I wanna do it to practice cl :)
skin has left #commonlisp [#commonlisp]
<_death> last time you mentioned that you were going to try cl-charms..
hrberg has joined #commonlisp
<nature> yes, it's taking me a while just to figure out how to do this relatively simple task :(
Inline has quit [Read error: Connection reset by peer]
<nature> I decided to go with cl-readline initially to just try to get something simple working, but it seems that I am dealing with readline compatibility issues...
yitzi has quit [Remote host closed the connection]
Inline has joined #commonlisp
<_death> if you don't want to deal with foreign code you could try acute-terminal-control.. I don't know how well it will work with your console or what its current status is though (I tried it some years ago)
<semarie> nature: reading cl-readline, you could clone it inside local-projects, and apply the following patch: https://pbot.rmdir.de/U5mUFulHhRTFEqHULYRFAw
<semarie> the source tree is at https://github.com/vindarel/cl-readline
<ixelp> GitHub - vindarel/cl-readline: Common Lisp bindings to the GNU Readline library
random-jellyfish has quit [Quit: Client closed]
<nature> semarie: I just tried it, but I still have the exact same issue
<nature> So it seems that the issue is shared between readline in base and readline in ports
zxcvz has joined #commonlisp
<semarie> the example in doc works well with the diff (whereas it isn't the case without)
<nature> yes using "(rl:bind-keyseq "\\C-r" #'print-some-text)" works indeed now
<nature> but doing "(rl:add-defun "print-some-text" #'print-some-text)" and then "(rl:parse-and-bind "\C-r: print-some-text")"
<nature> still doesn't
<nature> when you do "(rl:list-funmap-names)" you will see the garbled up function name instead of "print-some-text"
<nature> Ultimately it seems that cl:add-defun will call rl_add_funmap_entry, so trying to do: (cffi:foreign-funcall "rl_add_funmap_entry" :string "test1" :pointer (cffi:null-pointer))
<nature> will also create a garbled up entry in the "funmap"
random-jellyfish has joined #commonlisp
tasty has quit [Quit: bye bye!]
overclucker has quit [Ping timeout: 258 seconds]
tasty has joined #commonlisp
tasty has joined #commonlisp
tasty has quit [Changing host]
pranavats has joined #commonlisp
seok has quit [Quit: Client closed]
seok has joined #commonlisp
pranavats has left #commonlisp [Error from remote client]
overclucker has joined #commonlisp
zxcvz has quit [Quit: zxcvz]
amb007 has quit [Ping timeout: 240 seconds]
amb007 has joined #commonlisp
mgl has joined #commonlisp
echos has quit [Quit: cheerio]
random-jellyfish has quit [Quit: Client closed]
jeosol has quit [Quit: Client closed]
b00p has joined #commonlisp
wheeler has joined #commonlisp
pranavats has joined #commonlisp
ebrasca has joined #commonlisp
tevo has quit [Read error: Connection reset by peer]
tevo has joined #commonlisp
dcb has joined #commonlisp
pranavats has left #commonlisp [Error from remote client]
jeosol has joined #commonlisp
dinomug has joined #commonlisp
azimut has quit [Remote host closed the connection]
azimut has joined #commonlisp
LispTyro has quit [Server closed connection]
LispTyro has joined #commonlisp
markb1 has joined #commonlisp
NotThatRPG has joined #commonlisp
tyson2 has joined #commonlisp
sukaeto has quit [Server closed connection]
sukaeto has joined #commonlisp
attila_lendvai_ is now known as attila_lendvai
Brucio-61 has quit [Remote host closed the connection]
Brucio-61 has joined #commonlisp
mgl has quit [Quit: Client closed]
dino_tutter has joined #commonlisp
ldb has joined #commonlisp
Fare has joined #commonlisp
tedwing has quit [Ping timeout: 255 seconds]
tedwing has joined #commonlisp
random-jellyfish has joined #commonlisp
jeffrey has joined #commonlisp
waleee has joined #commonlisp
seok has quit [Quit: Client closed]
seok has joined #commonlisp
amb007 has quit [Ping timeout: 246 seconds]
amb007 has joined #commonlisp
liminality has joined #commonlisp
jeosol has quit [Quit: Client closed]
tyson2 has quit [Remote host closed the connection]
igemnace has joined #commonlisp
attila_lendvai has quit [Ping timeout: 255 seconds]
speskk0 has joined #commonlisp
speskk has quit [Ping timeout: 246 seconds]
speskk0 is now known as speskk
overclucker has quit [Ping timeout: 245 seconds]
tyson2 has joined #commonlisp
shka has quit [Ping timeout: 248 seconds]
pve has quit [Ping timeout: 255 seconds]
thuna` has quit [Remote host closed the connection]
tedwing has quit [Quit: leaving]
overclucker has joined #commonlisp
pranavats has joined #commonlisp
NotThatRPG has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
waleee has quit [Ping timeout: 240 seconds]
overclucker has quit [Ping timeout: 240 seconds]
overclucker has joined #commonlisp
waleee has joined #commonlisp
NotThatRPG has joined #commonlisp
jmdaemon has joined #commonlisp
NotThatRPG has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
NotThatRPG has joined #commonlisp
NotThatRPG has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
NotThatRPG has joined #commonlisp
NotThatRPG has quit [Client Quit]
amb007 has quit [Ping timeout: 240 seconds]
liminality has quit [Quit: Leaving]
rtypo has quit [Ping timeout: 244 seconds]
speskk has quit [Read error: Connection reset by peer]
speskk has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
amb007 has joined #commonlisp
ldb has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.1)]
dino_tutter has quit [Ping timeout: 246 seconds]
tyson2 has joined #commonlisp
habamax has joined #commonlisp
yitzi has joined #commonlisp
Fare has quit [Ping timeout: 246 seconds]
rgherdt has quit [Quit: Leaving]
dra has joined #commonlisp
dra has quit [Changing host]
dra has joined #commonlisp
kevingal has joined #commonlisp
<doulos05> I've got a CLOS question. Say I've got two classes, (defclass a () ()) and (defclass b (a) ()). Each of these classes has slots, obviously B has all of A's slots because it inherit them.
<doulos05> Is there a way I can use the `make-a` constructor I created (defun make-a (&key args go here) (make-instance 'a :args args :go go :here here)) directly inside the `make-b` constructor?
<doulos05> Or do I have to duplicate that code?
waleee has quit [Ping timeout: 258 seconds]
waleee has joined #commonlisp
<aeth> my guess would be CHANGE-CLASS, but it doesn't seem efficient
flip214 has quit [Read error: Connection reset by peer]
ebrasca has quit [Remote host closed the connection]
Fare has joined #commonlisp
flip214 has joined #commonlisp
random-nick has quit [Ping timeout: 248 seconds]
<doulos05> The other thing I considered was just to make `a` a slot inside `b` (A is an empty tank you can select in the army building list and B is a tank on the battlefield, with crew stats, a location, damage, etc)
chomwitt has joined #commonlisp
<doulos05> But that feels like an extra level of misdirection because then I'm going to have to do things like (a/slot-accessor (b/a-slot b)) instead of just (a/slot-accessor b)
chomwitt has quit [Ping timeout: 255 seconds]
<aeth> wait what
<aeth> that doesn't seem right
<aeth> wouldn't B be just be an instance of A then?
random-jellyfish has quit [Quit: Client closed]
<doulos05> Maybe I'm breaking this problem down wrong in my head? I'm certainly open to that possibility. I have tried several ways to structure this data in my head and I haven't yet arrived at one that I like. Let me switch to the actual class names.
igemnace has quit [Remote host closed the connection]
<doulos05> There's a lobby where you build your `FORCE`. To build this, you select `MEK`s from the list, which have their base stats. But you also assign pilots to them, you might choose to change the ammo loadout from the base load, etc.
<aeth> I guess you could solve it with a component rather than inheritance architecture
<aeth> instead of e.g. having tank subclassing tank-template, you can have tank-template as a slot
<aeth> which is sort of like what you were saying earlier, except you're looking at it as empty-tank and tank
<aeth> rather than tank-template and tank
Perflosopher has quit [Server closed connection]
Perflosopher has joined #commonlisp
kevingal has quit [Ping timeout: 240 seconds]
<doulos05> You can also have multiple of the same MEK in an FORCE. Then, when the game begins, a MEK with a pilot, a location, etc is called a COMBAT-UNIT in the board game I'm emulating
<doulos05> Ok, so then a COMBAT-UNIT has a MEK slot, and I'd have to just access all its stats with something like (mek/movement (cu/mek unit))
jello_pudding has quit [Ping timeout: 248 seconds]
hineios has quit [Server closed connection]
hineios has joined #commonlisp
gty has joined #commonlisp
nature has quit [Ping timeout: 255 seconds]
tyson2 has quit [Remote host closed the connection]
jello_pudding has joined #commonlisp
notzmv has quit [Ping timeout: 258 seconds]
gty has quit [Remote host closed the connection]
Lord_of_Life has quit [Ping timeout: 240 seconds]
Lord_of_Life has joined #commonlisp
dra has quit [Quit: Leaving]
tyson2 has joined #commonlisp