<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
<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
<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>
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)
<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]