semz has quit [Quit: ZNC 1.8.2+deb2build5 - https://znc.in]
semz has joined #commonlisp
<doulos05>
Is this a good place to ask about cl-cffi-gtk or is there another place that'd be better.
<fosskers>
Give it a shot and see who responds 👍
<doulos05>
I'm trying to draw a map, which based on the GTK tutorials I've seen should be done using Cairo and a gtk-drawing-area widget.
<doulos05>
I've copy/pasted their demo code into my project (but as a drawing area instead of a window and placed where I eventually want my map to appear) and nothing happens.
<doulos05>
It freezes on load, no error messages appear in sly. I have to restart my lisp in order to recover.
<doulos05>
The demo, when run outside my code, works fine. I think I must be missing something important, but I have no idea where to start guessing what it is.
dcb has quit [Quit: MSN Messenger 4.0.2]
<doulos05>
I'll link a code snippet as soon as I finish vacuuming for the missus
<doulos05>
Ok, wait. I found one line that was different, which I missed in copy/pasting a more complex demo (that's closer to what I actually need to do). Removing that and now I'm at least getting a window.
<doulos05>
But the drawing-area appears to be taking up zero space and is blank.
<doulos05>
Got it! At least now I have a drawing. Words cannot express how much I hate working with GUIs...
<fosskers>
Nice!
<doulos05>
I just wish I understood why one demo they have requires a call to (cairo-destroy) and one doesn't.
<doulos05>
Since I'm certain that's eventually going to come back to bite me in the ass. Not allocating space I can almost understand (after all, the "drawing area" is infinitely small before I draw anything on it)
<doulos05>
And easy to solve because I want that pane to take up all the available space anyway, so I can just set hexpand and vexpand to T for that. But when should I use cairo-destroy?
szkl has quit [Quit: Connection closed for inactivity]
yewscion has quit [Remote host closed the connection]
waleee has quit [Ping timeout: 246 seconds]
Oladon has quit [Quit: Leaving.]
nij- has joined #commonlisp
<fosskers>
What do the docstrings for that function say?
NotThatRPG has joined #commonlisp
ecraven has quit [Server closed connection]
nij- has left #commonlisp [Using Circe, the loveliest of all IRC clients]
ecraven has joined #commonlisp
ldb has quit [Ping timeout: 246 seconds]
m5zs7k has quit [Ping timeout: 245 seconds]
m5zs7k has joined #commonlisp
ROYGBYTE has quit [Server closed connection]
ldb has joined #commonlisp
poselyqualityles has quit [Remote host closed the connection]
ROYGBYTE has joined #commonlisp
bilegeek has joined #commonlisp
oselyqualitylesp has joined #commonlisp
m5zs7k has quit [Ping timeout: 240 seconds]
istewart has quit [Quit: Konversation terminated!]
m5zs7k has joined #commonlisp
habamax has quit [Remote host closed the connection]
habamax has joined #commonlisp
<doulos05>
Decreases the reference count on cr by one. If the result is zero, then cr and all associated resources are freed. See the cairo-reference function.
<doulos05>
Which says "Increases the reference count on cr by one. This prevents cr from being destroyed until a matching call to the cairo-destroy function is made."
<fosskers>
What is `cr` in this case?
<doulos05>
A cairo-t context, which is basically the area you're drawing on, the color you're using to draw, and the things you haven't drawn yet.
<doulos05>
It sounds like not calling cairo-destroy is going to cause a memory leak.
<fosskers>
Yeah eh. Although the OS would clear up the resources afterward anyway.
<doulos05>
And yet calling cairo-destroy crashes the program
<fosskers>
Was it being called before an initial call to `cairo-reference` had been made?
<doulos05>
There aren't any direct calls to cairo-reference in either of the demos (the one that uses cairo destroy and the one that doesn't). But this gives me a direction to go in terms of figuring out what called that.
ldb has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.1)]
oselyqualitylesp has quit [Ping timeout: 245 seconds]
azimut has quit [Ping timeout: 240 seconds]
rtypo has quit [Ping timeout: 250 seconds]
shka has joined #commonlisp
kenran has joined #commonlisp
nij- has quit [Ping timeout: 246 seconds]
fosskers has quit [Ping timeout: 246 seconds]
fosskers has joined #commonlisp
MajorBiscuit has quit [Quit: WeeChat 3.6]
alcor has joined #commonlisp
alcor has quit [Remote host closed the connection]
kurfen_ has quit [Ping timeout: 245 seconds]
alcor has joined #commonlisp
kurfen has joined #commonlisp
alcor has quit [Remote host closed the connection]
alcor has joined #commonlisp
elderK has joined #commonlisp
Pixi has joined #commonlisp
luna-is-here has quit []
luna-is-here has joined #commonlisp
habamax has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.1)]
bilegeek has quit [Quit: Leaving]
poselyqualityles has joined #commonlisp
attila_lendvai has joined #commonlisp
pve has joined #commonlisp
dino_tutter has joined #commonlisp
pranavats has left #commonlisp [Disconnected: Replaced by new connection]
pranavats has joined #commonlisp
<fosskers>
Discovered the Sly Inspector today and am quite impressed. Along with sticker I really like this way of developing. Are there other tricks to try out?
<beach>
Yes, try out Clouseau for a much better inspector.
<fosskers>
Does that integrate into the editor?
<beach>
What kind of integration are you looking for?
<fosskers>
I found "McCLIM". Is that what you were referring to?
<beach>
McCLIM is the GUI framework and it is an implementation of CLIM, and Clouseau is an application written using McCLIM.
poselyqualityles has quit [Ping timeout: 245 seconds]
<fosskers>
Found the subdirectory, thanks
<beach>
Sure. You can install it using Quicklisp I think.
<fosskers>
Have you ever written anything with McClim?
<beach>
Yes, I have.
<beach>
I was a significant part of the reason McCLIM started developing in its current form. Lots of things have happened since then, of course.
<beach>
McCLIM is also actively maintained and developed. The channel of choice then is #clim.
<beach>
I was just thinking about that when we heard about the difficulties with FFI-based GUI frameworks.
<fosskers>
Yeah eh? And any thoughts about Clog?
<beach>
Not from me.
<fosskers>
McClim would be a way to get a full GUI problem in a single Lisp image, is that right?
<fosskers>
I wonder what Nyxt uses...
<fosskers>
s/problem/program
<beach>
McCLIM is pure Common Lisp, so it's ideal to use in a single Common Lisp image.
<beach>
Nyxt uses a (I think C-based) library the name of which escapes me. libweb or something like that.
<White_Flame>
webkit
<beach>
Right. Thanks.
Gleefre has joined #commonlisp
<White_Flame>
so nyxt doesn't really do any rendering itself at all
<fosskers>
Ah looks like McClim is x-only eh?
masinter has quit [Ping timeout: 245 seconds]
<beach>
Not really.
<beach>
It can handle several backends, but it so happens that the CLX backend is the most complete one.
<fosskers>
Gotcha
<beach>
Others are being worked on, and perhaps some are even fairly complete.
masinter has joined #commonlisp
Noisytoot has quit [Excess Flood]
<beach>
As I have often said in the past, it saddens me to see all the wasted (and hard) debugging effort needed for FFI-based GUI applications, when some of that effort could be used to improve (say by writing a new backend for) McCLIM for the benefit of many Common Lisp users.
Noisytoot has joined #commonlisp
<fosskers>
By FFI here you're referring to linking to things like GTK, as opposed to connecting directly to X or Wayland? Although I assume there would need to be some linking there too
attila_lendvai_ has joined #commonlisp
<beach>
Yes, that's what I mean, and no, CLX uses the X11 wire protocol directly.
<fosskers>
Ah gotcha, so no C involved?
<beach>
Correct.
attila_lendvai has quit [Read error: Connection reset by peer]
yitzi has joined #commonlisp
AkashaPeppermint has joined #commonlisp
paulapatience has joined #commonlisp
bitblit1 has joined #commonlisp
surabax[m] has joined #commonlisp
sepanko has joined #commonlisp
char[m] has joined #commonlisp
Pixi` has joined #commonlisp
Pixi has quit [Ping timeout: 245 seconds]
Brucio-61 has quit [Read error: Connection reset by peer]
Brucio-61 has joined #commonlisp
kopiyka has quit [Remote host closed the connection]
kopiyka has joined #commonlisp
Brucio-61 has quit [Ping timeout: 260 seconds]
<Gleefre>
If I have a system that "hacks" the implementation and exports two symbols - enable/disable, would it make sense to create two more systems "my-system/enable" and "my-system/disable" that simply call these functions when loaded?
habamax has joined #commonlisp
<alcor>
So it monkey-patches the implementation?
<Gleefre>
Kind of, I think
<alcor>
In that case, it's logical that it should have a symbol to apply the monkey patch, and symbol to revert it.
<Gleefre>
Yeah, that's what my-pkg:enable / my-pkg:disable do
<alcor>
In python, there is also a pattern where the patch is applied only within a scope. I also prefer that.
<alcor>
E.g. with myMonkeyPatch.apply(): ...
<alcor>
in lisp it would be something like (with-my-monkey-patch (progn …))
Brucio-61 has joined #commonlisp
<Gleefre>
Hm, that won't work though I think
<Gleefre>
I "patch" (or rather extend) the loop macro
<Gleefre>
And there is no guarantee on the time of the macroexpansion :/
Lycurgus has joined #commonlisp
seanw has quit [Remote host closed the connection]
<Gleefre>
The question is more about systems, would it make sense to have system my-sys/enable? So that you can do (ql:quickload :my-sys/enable) and have the patch already applied
<Gleefre>
(And also the system disable for symmetrie)
seanw has joined #commonlisp
Lycurgus has left #commonlisp [rly?]
Lord_of_Life_ has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 252 seconds]
Lord_of_Life_ is now known as Lord_of_Life
earl-ducaine has quit [Ping timeout: 246 seconds]
Brucio-61 has quit [Ping timeout: 244 seconds]
jmdaemon has quit [Ping timeout: 260 seconds]
tyson2 has joined #commonlisp
jmdaemon has joined #commonlisp
amb007 has quit [Ping timeout: 260 seconds]
amb007 has joined #commonlisp
fosskers has quit [Ping timeout: 245 seconds]
zaymington has quit [Remote host closed the connection]
Brucio-61 has joined #commonlisp
amb007 has quit [Ping timeout: 260 seconds]
amb007 has joined #commonlisp
attila_lendvai has joined #commonlisp
attila_lendvai_ has quit [Ping timeout: 244 seconds]
elderK has quit [Quit: Connection closed for inactivity]
pillton has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.1)]
lucasta has joined #commonlisp
NotThatRPG has quit [Ping timeout: 245 seconds]
jonatack3 has quit [Read error: Connection reset by peer]
jonatack3 has joined #commonlisp
<jmercouris>
let's say i have an init form in a class, will that initform be again evaluated when i reload that image?
<jmercouris>
s/class/class slot
<jmercouris>
i would test it on my phone, but i don't have a way to save and load images
skeemer__ has quit [Remote host closed the connection]
raevohr has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.1)]
raevohr has joined #commonlisp
<bike>
The values in slots shoud just remain what they are without reevaluating initforms. saving images usually works like a savestate rather than involving some arduous recreation
<jmercouris>
bike: damn, so it has something to do with my meta class then
<jmercouris>
i'll have to investigate, thanks bike
mjoerg has joined #commonlisp
<Gleefre>
fwiw afaik the initform is not evaluated during the defclass but during the instance initialization :/
mjoerg has quit [Remote host closed the connection]
Gleefre has quit [Remote host closed the connection]
Gleefre has joined #commonlisp
mjoerg has joined #commonlisp
mjoerg has quit [Remote host closed the connection]
<bike>
jmercouris: why do you need it reevaluated?
Gleefre has quit [Ping timeout: 246 seconds]
Gleefre has joined #commonlisp
raevohr has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.1)]
fosskers has quit [Remote host closed the connection]
lucasta has quit [Quit: Leaving]
habamax has quit [Remote host closed the connection]
Gleefre has quit [Remote host closed the connection]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
Gleefre has joined #commonlisp
White_Flame has quit [Quit: No Ping reply in 180 seconds.]
kenran has quit [Remote host closed the connection]
White_Flame has joined #commonlisp
Brucio-61 has quit [Ping timeout: 246 seconds]
Brucio-61 has joined #commonlisp
azimut has joined #commonlisp
son0p has quit [Remote host closed the connection]
alXsei has joined #commonlisp
alXsei has quit [Remote host closed the connection]
szkl has joined #commonlisp
cage has joined #commonlisp
nytpu has quit [Remote host closed the connection]
nytpu has joined #commonlisp
nytpu is now known as Guest9516
Guest9516 has quit [Killed (mercury.libera.chat (Nickname regained by services))]
nytpu_ is now known as nytpu
nytpu_ has joined #commonlisp
poselyqualityles has joined #commonlisp
Noisytoot has quit [Ping timeout: 245 seconds]
Pixi` is now known as Pixi
rtypo has joined #commonlisp
Noisytoot has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
Noisytoot has quit [Remote host closed the connection]
dino_tutter has quit [Ping timeout: 260 seconds]
nij- has quit [Remote host closed the connection]
nij- has joined #commonlisp
bilegeek has joined #commonlisp
igemnace has quit [Remote host closed the connection]
Noisytoot has joined #commonlisp
luna-is-here has quit [Ping timeout: 245 seconds]
tyson2 has joined #commonlisp
<rendar>
let's say '(1 2 3) is a list, while 1,2,3 are atoms, right? my question is: there is a difference between an atom in string form e.g. "1" as typed by user, and the real atom inside the machine e.g. int32 0x1, is called that atom too? or there are different names for those?
<bike>
lisp semantics don't operate on the machine level. asking if the "atom inside the machine" is an atom is like asking if a proton is alive.
cosimone has joined #commonlisp
<rendar>
bike, i see, but there are 2 representation of the data, one is string, one is integer, how lisp thinks about this?
<bike>
certainly strings are distinct from integers. one is a string, which is a type of vector, and receptible to AREF and so on. one is an integer and you can do arithmetic like + or LDB on it.
cosimone has quit [Remote host closed the connection]
szkl has quit [Quit: Connection closed for inactivity]
<_death>
the implementation chooses how to represent objects, and this choice is often influenced by the platform and machine the implementation is implemented for.. for example a small integer like 1 may be represented as a particular sequence of 64 bits, and references to it may be "immediate", i.e. it could be stored wholly in a register and copied around cheaply (moved to another register, or pushed to/popped from the stack), and a string
<_death>
may be represented as another sequence of bits, perhaps with a header specifying its length and other properties and having the characters encoded according to say UTF8, too big to be stored in a register and so resides in RAM, usually on the heap, and references to it would be integers that represent the address of its beginning in RAM (pointers)
dino_tutter has joined #commonlisp
cage has quit [Quit: rcirc on GNU Emacs 28.2]
<_death>
it's abstractions all the way down, so if you're talking about physical machines that are based on bits, you need of course physical means to represent those bits, what it means to store them, read and write them, etc.
tyson2 has quit [Remote host closed the connection]
nij- has quit [Ping timeout: 245 seconds]
igemnace has joined #commonlisp
morganw has joined #commonlisp
<bike>
a 1 character in a string would probably be encoded as the number 49 rather than the number 1, as far as different representations go
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
Gleefre has quit [Remote host closed the connection]
yottabyte has quit [Quit: Connection closed for inactivity]
tyson2 has joined #commonlisp
igemnace has quit [Remote host closed the connection]
SAL9000_ is now known as SAL9000
jello_pudding has quit [Ping timeout: 258 seconds]
Gleefre has joined #commonlisp
alcor has quit [Read error: Connection reset by peer]
attila_lendvai has quit [Read error: Connection reset by peer]
dino_tutter has quit [Ping timeout: 264 seconds]
attila_lendvai has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
tevo has quit [Ping timeout: 244 seconds]
jello_pudding has joined #commonlisp
alcor has joined #commonlisp
attila_lendvai has quit [Ping timeout: 260 seconds]
attila_lendvai has joined #commonlisp
peterhil__ has joined #commonlisp
Psybur has quit [Read error: Connection reset by peer]
peterhil__ has quit [Remote host closed the connection]
peterhil_ has quit [Ping timeout: 260 seconds]
csos95 has joined #commonlisp
Posterdati has quit [Ping timeout: 246 seconds]
tyson2 has joined #commonlisp
bilegeek has quit [Quit: Leaving]
waleee has joined #commonlisp
poselyqualityles has quit [Ping timeout: 244 seconds]
dino_tutter has joined #commonlisp
dcb has joined #commonlisp
<Josh_2>
Hi hi
<Josh_2>
is it possible with postmodern to return the column names with the data from those columns? :thinking:
<Josh_2>
Destructuring lists where you have to be certain of the order of columns is a bit of a nuisance
<jcowan>
Josh_2: The problem is that SQL doesn't require all result columns to have names. SELECT EXPT(X+1, 2)+2 FROM ..." is perfectly valid. For that matter, you can define tables whose columns all have the same name and extract them with SELECT *.
<jcowan>
s/EXPT/POWER
<jcowan>
you could rewrite that SELECT as SELECT POWER(X + 1, 2) + 2 AS "POWER(X + 1, 2) + 2"
Lycurgus has joined #commonlisp
<Josh_2>
Bit of a nuisance
<Josh_2>
I was only curious. I just make sure to specify the column names in my SELECT <columns> so that when I destructure the result I know what I'm getting
<Josh_2>
a nuisance but hey.
<Josh_2>
Need lisp all the way down :smile:
<jcowan>
I don't think that would change anything. You still have the problem of the named vs. the unnamed.
jmdaemon has joined #commonlisp
Lycurgus has quit [Quit: Tschüss]
fermat has quit [Remote host closed the connection]
fermat has joined #commonlisp
<Josh_2>
:(
<Josh_2>
Wouldn't have to use SQL instead could use lisp :heart:
<Josh_2>
Postgres is pretty cool with its inheritance, can create mixin tables
Alfr has quit [Read error: Connection reset by peer]