synchromesh has quit [Read error: Connection reset by peer]
synchromesh has joined #commonlisp
yitzi has quit [Read error: Connection reset by peer]
<skin>
with-slots, or with-accessors? That is the question.
<skin>
Which one is considered better or more idiomatic?
random-nick has quit [Ping timeout: 246 seconds]
istewart has joined #commonlisp
boogsbunny has quit [Ping timeout: 268 seconds]
jon_atack has quit [Ping timeout: 264 seconds]
ronald has quit [Ping timeout: 260 seconds]
X-Scale has joined #commonlisp
jonatack has joined #commonlisp
ronald has joined #commonlisp
k_hachig has quit [Ping timeout: 268 seconds]
josrr has quit [Remote host closed the connection]
X-Scale has quit [Ping timeout: 250 seconds]
X-Scale has joined #commonlisp
waleee has quit [Ping timeout: 260 seconds]
awlygj has joined #commonlisp
beach has quit [Ping timeout: 260 seconds]
k_hachig has joined #commonlisp
<viaken>
Shinmera is a legend
edgar-rft has quit [Quit: don't waste your life by reading this]
cmack has joined #commonlisp
rtypo has quit [Ping timeout: 256 seconds]
shawnw has quit [Ping timeout: 246 seconds]
bjorkintosh has quit [Quit: "Every day, computers are making people easier to use." David Temkin]
decweb has quit [Ping timeout: 252 seconds]
danse-nr3 has joined #commonlisp
danse-nr3 has quit [Ping timeout: 240 seconds]
jonatack has quit [Quit: WeeChat 4.2.2]
danse-nr3 has joined #commonlisp
kiyafirs has joined #commonlisp
jonatack has joined #commonlisp
genera has quit [Ping timeout: 268 seconds]
<aeth>
skin: with-accessors, I think
<aeth>
accessors are a more general concept than slots, and don't need to be directly associated with a slot
<aeth>
e.g. CAR is an accessor
<aeth>
,(with-accessors ((x car)) (list 1 2 3) x)
<ixelp>
=> 1
<aeth>
though you probably never need to do something like that
genera has joined #commonlisp
admich1 has quit [Ping timeout: 246 seconds]
admich1 has joined #commonlisp
genera_ has joined #commonlisp
genera has quit [Ping timeout: 260 seconds]
<skin>
an interesting idea
<Pixel_Outlaw>
I was thinking WITH-ACCESSORS is preferred because it respects how things are supposed to be interacted with. WITH-SLOTS lets you stomp the other guy's intents when working with things.
cmack has quit [Ping timeout: 268 seconds]
beach has joined #commonlisp
<beach>
Slots are implementation details, and WITH-SLOTS is about slots. Client code should therefore not use slots of a module. Inside the module itself, slots can be referred to, but it is often better to use the power of method combinations and use accessors instead.
ronald has quit [Read error: Connection reset by peer]
<aeth>
and then on top of that there are the accessors that are entirely opaque like CAR that may or may not use CLOS in their implementations, but that do not have any exposed slot
Pixel_Outlaw has quit [Quit: Leaving]
<aeth>
Common Lisp goes beyond most languages by making no distinction between methods (the "dot notation" in many languages) and functions, which means even DEFUN can get you an accessor (even a writer/setter, by DEFUNing a SETF), and WITH-ACCESSORS should still work with it.
k_hachig has quit [Quit: WeeChat 4.2.2]
Pixel_Outlaw has joined #commonlisp
qhong has joined #commonlisp
wacki has joined #commonlisp
Partmedia has joined #commonlisp
jonatack has quit [Ping timeout: 268 seconds]
jonatack has joined #commonlisp
admich1 has quit [Ping timeout: 272 seconds]
admich1 has joined #commonlisp
shka has joined #commonlisp
grawlinson has quit [Quit: SIGTERM]
istewart has quit [Quit: Konversation terminated!]
ronald has quit [Ping timeout: 268 seconds]
ronald has joined #commonlisp
grawlinson has joined #commonlisp
<beach>
Maybe I am not stating the modularity argument very well, so let me try again:
<beach>
The protocols (or interfaces) of a module consist of essentially three things: 1. A bunch of types (usually classes) of objects that the module can manipulate. 2. Operators for creating instances of those types. 3. Operators for manipulating those instances in various ways.
<beach>
The objects that a module can manipulate can be represented in various ways, and the representations used are private to the module, thereby allowing the module to change the representation after the fact. And changing the representation should not affect client code, so should not affect the protocols.
<beach>
Slots are part of this representation and they can be added or removed as the representation changes. Therefore, the protocols do not mention slots.
shawnw has joined #commonlisp
<aeth>
I think the usual example is with geometry... The slot may be %radius and the accessor radius accesses that slot, but the accessor circumference does (* 2 pi (radius circle))
<aeth>
but there's no reason why it can't be the other way around
<aeth>
A less invented geometric example could involve things like different coordinate systems, where only one is stored
<aeth>
But if you find out through usage patterns that only one accessor is used 95% of the time, you may swap which one is the derived accessor and which one is the slot accessor, for performance, in your internals, and you don't have to change any code because an accessor is an accessor.
<aeth>
s/any code/any external code/
danza has joined #commonlisp
danse-nr3 has quit [Ping timeout: 268 seconds]
admich1 has quit [Read error: Connection reset by peer]
admich1 has joined #commonlisp
chomwitt has joined #commonlisp
King_julian has joined #commonlisp
shawnw has quit [Ping timeout: 268 seconds]
admich1 has quit [Ping timeout: 252 seconds]
admich1 has joined #commonlisp
danza has quit [Ping timeout: 268 seconds]
King_julian has quit [Ping timeout: 256 seconds]
Pixel_Outlaw has quit [Quit: Leaving]
X-Scale has quit [Ping timeout: 250 seconds]
deadmarshal_ has quit [Remote host closed the connection]
bollu has quit [Quit: Ping timeout (120 seconds)]
bollu has joined #commonlisp
puke has quit [Remote host closed the connection]
puke has joined #commonlisp
akoana has joined #commonlisp
X-Scale has joined #commonlisp
alcor has joined #commonlisp
bjorkintosh has joined #commonlisp
bjorkintosh has joined #commonlisp
Partmedia has left #commonlisp [#commonlisp]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
donleo has joined #commonlisp
johnjaye has quit [Ping timeout: 268 seconds]
johnjaye has joined #commonlisp
deadmarshal_ has joined #commonlisp
zxcvz has joined #commonlisp
varjag has joined #commonlisp
pve has joined #commonlisp
kenran has joined #commonlisp
Guest62 has joined #commonlisp
neano has joined #commonlisp
nybble has quit [Ping timeout: 268 seconds]
alcor has quit [Ping timeout: 268 seconds]
amb007 has quit [Ping timeout: 268 seconds]
amb007 has joined #commonlisp
tasty has quit [Ping timeout: 268 seconds]
wacki has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
admich has joined #commonlisp
admich has quit [Read error: Connection reset by peer]
kiyafirs has quit [Remote host closed the connection]
amb007 has joined #commonlisp
synchromesh has quit [Read error: Connection reset by peer]
synchromesh has joined #commonlisp
danse-nr3 has quit [Ping timeout: 240 seconds]
danse-nr3 has joined #commonlisp
kopiyka has quit [Remote host closed the connection]
yitzi has joined #commonlisp
attila_lendvai has joined #commonlisp
kopiyka has joined #commonlisp
jon_atack has joined #commonlisp
jonatack has quit [Ping timeout: 268 seconds]
johnjaye has quit [Ping timeout: 256 seconds]
johnjaye has joined #commonlisp
jonatack has joined #commonlisp
jon_atack has quit [Ping timeout: 246 seconds]
random-nick has joined #commonlisp
zxcvz has quit [Quit: zxcvz]
rtypo has joined #commonlisp
amb007 has quit [Ping timeout: 256 seconds]
amb007 has joined #commonlisp
jon_atack has joined #commonlisp
jonatack has quit [Ping timeout: 268 seconds]
danse-nr3 has quit [Ping timeout: 264 seconds]
danse-nr3 has joined #commonlisp
chomwitt has joined #commonlisp
amb007 has quit [Ping timeout: 272 seconds]
decweb has joined #commonlisp
pillton has quit [Remote host closed the connection]
wacki has joined #commonlisp
amb007 has joined #commonlisp
augfab has joined #commonlisp
danse-nr3 has quit [Ping timeout: 268 seconds]
dino_tutter has quit [Quit: Leaving]
wacki has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
danse-nr3 has joined #commonlisp
X-Scale has quit [Quit: Client closed]
admich1 has quit [Ping timeout: 240 seconds]
admich1 has joined #commonlisp
cmack has joined #commonlisp
<Shinmera>
viaken: I assure you I am quite alive, don't kill me off just yet
<Shinmera>
or do, I guess, I'm sick of this mortal coil
admich1 has quit [Read error: Connection reset by peer]
X-Scale has joined #commonlisp
admich1 has joined #commonlisp
ronald has quit [Ping timeout: 272 seconds]
varjag has quit [Quit: ERC (IRC client for Emacs 27.1)]
triffid has quit [Ping timeout: 260 seconds]
triffid has joined #commonlisp
<beach>
I don't think legends have to be dead.
ronald has joined #commonlisp
danse-nr3 has quit [Ping timeout: 268 seconds]
ronald has quit [Ping timeout: 260 seconds]
<Shinmera>
Isn't that case usually qualified as "living legend", though?
<beach>
Maybe so.
danse-nr3 has joined #commonlisp
waleee has joined #commonlisp
even4void has quit [Ping timeout: 260 seconds]
even4void has joined #commonlisp
awlygj has quit [Quit: leaving]
awlygj has joined #commonlisp
kenran has quit [Remote host closed the connection]
awlygj has quit [Quit: leaving]
ec has quit [Remote host closed the connection]
ec has joined #commonlisp
chomwitt has quit [Ping timeout: 256 seconds]
lucasta has joined #commonlisp
admich1 has quit [Ping timeout: 268 seconds]
danse-nr3 has quit [Ping timeout: 272 seconds]
josrr has joined #commonlisp
danse-nr3 has joined #commonlisp
FragmentedCurve has joined #commonlisp
ec has quit [Remote host closed the connection]
<yottabyte>
have any of you used sqlite with common lisp before? is it bussin?
ec has joined #commonlisp
<Shinmera>
"bussin"?
ronald has joined #commonlisp
<beach>
yottabyte: What do you need to use SQL for?
<bjorkintosh>
the schema, I bet.
<beach>
Er, what? What "schema"?
<bjorkintosh>
that's the advantage of a RDBMS over plain text or cvs, for instance.
<bjorkintosh>
but I don't know what yottabyte wants.
<beach>
Well, I am asking because relational databases are not a great match for things like standard objects. So it might be better in some cases to use something else.
<beach>
But of course, if the data already exists in the form of a relational database, then there is not much choice. Hence my question.
<yottabyte>
I want to build a little web application that will have tables for user information and stuff like that. I haven't used sqlite before, but I heard the types are flexible, there isn't real type safety on the columns
<yottabyte>
so you'll need to enforce that on the client side, I guess
<beach>
I would not use a relational database for that, unless the amount of data is truly huge.
<beach>
yottabyte: PRINT and READ, possibly with an additional reader macro.
<Shinmera>
I've had some issues with it in highly threaded envs
<bjorkintosh>
yottabyte: from my experience using sqlite, it's ridiculously simple and flexible. and also incredibly fast.
<xLXGHTNXNGx>
wtf
<bjorkintosh>
of course, it has its own limitations.
<yottabyte>
bjorkintosh: what do you use to interface with it?
<bjorkintosh>
tcl
<bjorkintosh>
and R.
<bjorkintosh>
its native scripting language is tcl.
<bjorkintosh>
but most languages have a binding to it.
<beach>
xLXGHTNXNGx: Was something surprising to you?
<yottabyte>
beach: I guess I want to use sqlite so I can perform data analysis on the data, use the database in other languages, etc.
<yottabyte>
it's more of a standard
<beach>
xLXGHTNXNGx: Are you new here? I don't recognize your nick.
<beach>
yottabyte: I see.
dstein64- has joined #commonlisp
<xLXGHTNXNGx>
I'm a dragon, beach.
<xLXGHTNXNGx>
Not A_Dragon - that is someone else - just a dragon
dstein64 has quit [Ping timeout: 260 seconds]
dstein64- is now known as dstein64
<xLXGHTNXNGx>
but yeah. just got here yesterday
<beach>
xLXGHTNXNGx: I don't care much what you are. But it would be great if you had some slightly more intelligent utterances to make.
admich1 has joined #commonlisp
ec has quit [Remote host closed the connection]
* xLXGHTNXNGx
ponders /ignore
<bjorkintosh>
oh dear. xLXGHTNXNGx. c'mon.
<bjorkintosh>
you're much better than that.
ec has joined #commonlisp
<xLXGHTNXNGx>
bike: very funny.
xLXGHTNXNGx has left #commonlisp [nothing is ever "bussing."]
<bike>
i'm sleep deprived and really don't want to deal with more inscrutable jerks right now, so that works for me, i guess
cross has quit [Remote host closed the connection]
King_julian has quit [Ping timeout: 246 seconds]
<Shinmera>
apparently 'bussin' comes from 'bustin a nut' though I'm not sure why that bit of crassness would be enough to upset that much.
admich1 has quit [Ping timeout: 272 seconds]
shka has quit [Read error: Connection reset by peer]
<Shinmera>
anyway, hope you can sleep soon, bike
<bike>
if only
admich1 has joined #commonlisp
<bike>
just to restate the hopefully obvious, if you just say "wtf" out of nowhere in response to nothing obvious, please be prepared to give some kind of polite explanation if someone asks what you're responding to
jonatack has joined #commonlisp
shka has joined #commonlisp
jon_atack has quit [Ping timeout: 268 seconds]
danse-nr3 has quit [Ping timeout: 246 seconds]
<contrapunctus>
...or just include the explanation in the same breath as the "wtf", to increase information density.
<hayley>
#commonlisp doesn't entirely optimise for throughput over latency, we still have to use external paste sites for code.
<bjorkintosh>
the recently banned fellow was being a troll.
<Shinmera>
This is a small library hooking into the operating system to give more precise timing information than implementations usually provide via get-universal-time or get-internal-real-time.
<yottabyte>
omg I didn't know bussin was such a crass word
<yottabyte>
that is certainly the way I intended it
<yottabyte>
not the way***
danse-nr3 has quit [Ping timeout: 256 seconds]
mgl_ has joined #commonlisp
waleee has joined #commonlisp
mgl_ has quit [Ping timeout: 268 seconds]
genera_ is now known as genera
mgl_ has joined #commonlisp
synchromesh has quit [Read error: Connection reset by peer]
synchromesh has joined #commonlisp
varjag has joined #commonlisp
waleee has quit [Quit: WeeChat 4.1.2]
pve has quit [Quit: leaving]
jmdaemon has joined #commonlisp
waleee has joined #commonlisp
mgl_ has quit [Ping timeout: 268 seconds]
yitzi has quit [Remote host closed the connection]
Pixel_Outlaw has joined #commonlisp
<younder>
I've been looking at cl-gobject-introspection. It seems to me a lot of the problems of interfacing with C libraries can be solves by making the C libraries gobjects and then importing them. Gobjecs have introspection and also have memory management.
duuqnd_ has joined #commonlisp
duuqnd has quit [Ping timeout: 264 seconds]
duuqnd_ is now known as duuqnd
<younder>
I gave it a try. I had a libwacom.so which controls tablets. I loaded it dynamically and wrapped it in a gobject. Then I imported it to CL. Now it works like a charm..
shka has quit [Quit: Konversation terminated!]
pranav has quit [Remote host closed the connection]
pranav has joined #commonlisp
<yottabyte>
trying to quickload "sqlite", it gave me an error: Unable to load any of the alternatives: ((:DEFAULT "libsqlite3") (:DEFAULT "sqlite3")) but I have sqlite installed on my machine, and in path (on windows). when I go to a terminal and type "sqlite", it works and starts the client
<yottabyte>
I did (ql:quickload "sqlite")
random-nick has quit [Ping timeout: 252 seconds]
random-nick has joined #commonlisp
varjag has quit [Ping timeout: 240 seconds]
varjag has joined #commonlisp
pranav has quit [Remote host closed the connection]
notzmv has joined #commonlisp
X-Scale has joined #commonlisp
admich1 has quit [Ping timeout: 264 seconds]
admich1 has joined #commonlisp
Spawns_Carpeting has quit [Quit: ZNC 1.8.2+deb2+b1 - https://znc.in]