bitmapper has quit [Quit: Connection closed for inactivity]
atomik_dog has joined #lisp
galex-713 has quit [Remote host closed the connection]
<zacts>
ok, about to dive into practical common lisp some more
<lotuseater>
do you have questions?
<zacts>
not direct questions quite yet
<zacts>
I am wondering how much into OOP and Clos it gets into though
galex-713 has joined #lisp
Guest57331 has quit [Ping timeout: 260 seconds]
<no-defun-allowed>
Quite a bit. If I recall, there are two chapters on, was it "object re-orientation"? The table of contents will tell you.
<zacts>
ok
<zacts>
more like, I'm wondering how much into the design of object oriented systems it gets into
<no-defun-allowed>
Yes, chapters 16 and 17, then there are quite a few examples using objects.
<zacts>
cool
liberliver has joined #lisp
liberliver1 has joined #lisp
tempest_nox has quit [Read error: Connection reset by peer]
liberliver has quit [Ping timeout: 246 seconds]
liberliver1 is now known as liberliver
<zacts>
hum... one question I guess.
<lotuseater>
go on :)
<zacts>
I'm using vim with a vim-slime plugin to copy and paste lisp s-expr into an sbcl repl
<zacts>
I wonder how far I can get with this for the book
<zacts>
or will I need more features from emacs slime later on?
<lotuseater>
no not a must, but needful. but have no experience with vim-slime
orivej has quit [Ping timeout: 256 seconds]
<zacts>
hum.. I'm sure this is asked too many times, but if I do get serious into lisp will I need emacs slime?
<lotuseater>
doing stuff in the REPL is fine but fast you are at the point for having s-exprs in files that you are changing constantly for experimenting
<lotuseater>
you can also have emacs with vim bindigs
<zacts>
I mean what functionality does emacs slime provide other than copying from a buffer into an sbcl repl? does it provide debugging or other features?
<no-defun-allowed>
SLIMV should suffice, from what I hear.
<zacts>
ok, I'll check out slimv
<zacts>
also, I don't mind trying out emacs evil mode if it works with slime
<no-defun-allowed>
SLIME also provides a fancy debugger and inspector, and can retrieve information about symbols (eg for use by autocomplete) by asking the image, as opposed to doing static analysis.
<no-defun-allowed>
I don't use Vim, but it sounds like SLIMV should work just as well.
<zacts>
ah I'll look into it, ok
<lotuseater>
and for not having too much but more about CLOS, ANSI CL has a chapter about it and one about structs. or common lisp recipes
<zacts>
oh cool
<lotuseater>
so i mean too much infos at once
<zacts>
ah I see
<lotuseater>
but the book from Keene "Object Oriented Programming in Common Lisp" is more a tutorial than dry manual :)
<flip214>
zacts: if you have any issues using slimv a few people here can (and will) provide support
CookE[] has quit [Ping timeout: 240 seconds]
<zacts>
flip214: oh thanks
<lotuseater>
i think two essences of CLOS and MOP philosophy in which it differences are: nothing is hidden from each other, methods and classes are independent from each other (but with no classes there are no real distinct methods of course). how would you people say?
jprajzne has joined #lisp
<zacts>
how does CL OOP differ from say smalltalk?
<no-defun-allowed>
In Common Lisp, it would be fair to say that (generic) functions do things, as opposed to in Smalltalk where objects do things by being sent methods.
amb007 has quit [Read error: Connection reset by peer]
<lotuseater>
from smalltalk i can't tell you, but this other stuff is afaik not so in "traditional" systems
amb007 has joined #lisp
<no-defun-allowed>
CLOS also supports method combination and multiple inheritance, and CLOS programmers usually use packages instead of classes as encapsulation.
<lotuseater>
wasn't it in smalltalk real truth with "everything is an object"? :)
abraham has joined #lisp
<zacts>
no-defun-allowed: what advantages/disadvantages does this provide over smalltalk's paradigm?
<no-defun-allowed>
Both are totally alien (haha) to most programmers. I remember someone found out that in D, private modifiers allow access by the package and not the class, and that someone thought it was terrible.
<lotuseater>
zacts: and the metaobject protocol handles how methods/classes/instances are redefined, even at runtime
<zacts>
I began reading the beginning of a book on smalltalk a while ago, but didn't finish it.
<lotuseater>
yeah i think that will give you also better ideas for OOP than java/c++ books
<no-defun-allowed>
zacts: For the most part, you can do "more" things with CLOS - you don't need any visitor pattern to do multiple dispatch, and multiple inheritance lets you use "mixins" to modify behaviour. But, as there are no messages, you can't exactly do #doesNotUnderstood: and fiddle with messages.
<no-defun-allowed>
I don't think I've missed the latter, but it makes a fair few things work in class-oriented systems.
<zacts>
how well does common lisp play with unix? like, let's say I want to script my unix system with lisp.
<lotuseater>
i realized yesterday that the lisp on erlang BEAM seems to be intended as a CL, but it states some things don't fit well, so you have no full CL implementation (as an analogy for what ABCL is)
CookE[] has joined #lisp
<lotuseater>
oh it does well
scymtym_ has joined #lisp
<phoe>
zacts: it's possible - either you run a brand new Lisp image for each command, or you could run a Lisp as a daemon and send commands to it, e.g. via swank
<zacts>
because I have some project ideas that I might want to glue unixy things together with lisp
<lotuseater>
for scripts there is for example UIOP
scymtym has quit [Ping timeout: 256 seconds]
<lotuseater>
or look for cl-launch (available as a Linux package)
<zacts>
like, I don't mean so much like bash scripts, but more like does lisp have a `system` command?
<zacts>
to where it can communicate with a unix command? (I think C has something like this too)
<phoe>
yes
<phoe>
uiop:run-program and uiop:launch-program
<phoe>
for synchronous and asynchronous execution
<zacts>
ok, that's all that I think I'd need for some ideas of mine.
<zacts>
I'll check out UIOP
<zacts>
I want to glue several linux synth and midi apps together kind of, for one project idea of mine.
<zacts>
it actually kind of reminds me of the MP3 app in ch3 of practical common lisp.
<zacts>
format already seems to be pretty powerful, perhaps even more powerful than printf or print in many languages.
<phoe>
almost turing complete™
<phoe>
well, turing complete, if you include ~/ in the mix.
oxum_ has joined #lisp
galex-713 has quit [Ping timeout: 260 seconds]
oxum has quit [Read error: Connection reset by peer]
<lotuseater>
zacts: oh yes when you have warmed up to
<lotuseater>
you can even have GOTO and such things
<ldbeth>
good afternoon
<lotuseater>
hello ldbeth
<ldbeth>
Goto? what Goto
jprajzne_ has joined #lisp
<lotuseater>
ldbeth: it was about the power of FORMAT
galex-713 has joined #lisp
<ldbeth>
ah, i see
<zacts>
looks like lisp would work for many of my daily programming tasks
<lotuseater>
in comparing it with normal printf
<moon-child>
tbf, printf *is* turing complete
a0 has joined #lisp
<lotuseater>
moon-child: that's cool too. but i didn't do much with it (or C in general) to know about
<moon-child>
in fairness, the turing-complete bits are a hack based on an insecure and unsafe feature that should really be gotten rid of. For practical use, format is more powerful
CookE[] has quit [Ping timeout: 240 seconds]
<zacts>
much of my project ideas involves text or connecting stuff together, kind of pandocish maybe.
<zacts>
and maybe some markdown and html generation
<ldbeth>
zacts: generate documents on-the-fly?
<zacts>
ldbeth: yes
<zacts>
kind of like org-mode too maybe.
<zacts>
I also want to glue apps together and script that gluing so to speak. like with my linux synth and midi idea.
<zacts>
so some of it might involve communicating with unix/linux command line apps just a bit, and lisp would wrap around that into a full app. but not like bash scripting so much, I need/want something more powerful than that.
<ldbeth>
sounds like it should be a PID 1
<ldbeth>
;-)
<zacts>
but I might be thinking too far ahead of myself for now. I want to learn lisp and read practical common lisp first
<zacts>
:-)
amb007 has quit [Ping timeout: 260 seconds]
rgherdt has joined #lisp
amb007 has joined #lisp
<flip214>
ldbeth: "unshare --pid"
<flip214>
you can have as many PIDs 1 as you like (within reason and memory)
igemnace has quit [Remote host closed the connection]
ldbeth has quit [Ping timeout: 246 seconds]
nostoi has joined #lisp
ldbeth has joined #lisp
igemnace has joined #lisp
<beach>
lotuseater: What does it mean that Common Lisp is object-oriented everywhere under the hood?
<beach>
I mean, if you take Alan Kay's definition of "object oriented", then it is certainly not so.
jprajzne_ has quit [Quit: jprajzne_]
<ldbeth>
it seems could be, but not required to
<beach>
I just don't know what it is supposed to mean.
<ldbeth>
oh, I guess lotuseater means it is worth to learn CLOS as a beginner so many things are not gonna to be missed
<mrios22>
Is there a backup of quickdocs somewhere?
<phoe>
there's quickref
zacts has quit [Quit: leaving]
<lotuseater>
sorry i was cocking. now back
<mrios22>
I'm interested in learning more about the clack library.
<lotuseater>
beach: ok then that CLOS is everywhere?
<beach>
That's definitely true, since every object is an instance of some class.
jprajzne_ has joined #lisp
<beach>
But CLOS is not "object oriented" with any traditional meaning of "object oriented".
amb007 has quit [Ping timeout: 260 seconds]
karlosz_ has joined #lisp
karlosz has quit [Read error: Connection reset by peer]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
treflip has joined #lisp
scymtym_ has quit [Remote host closed the connection]
mrcom has quit [Quit: This computer has gone to sleep]
<mfiano>
Does anyone know and good/free software for creating 2D/3D geometrical diagrams, like those you would find in a math paper? This is for creating offline documentation of a CL library in progress.
<mfiano>
s/and/any/
Nilby has joined #lisp
<treflip>
mifiano: gnuplot is both good and free :D
<mfiano>
I have never seen any 3D space diagrams in gnuplot, but maybe it can?
<mfiano>
I suppose it can plot 3d contours and such, but I feel I will not be able to draw arbiotrary polyhedron and cast rays to/from arbitrary points
<mfiano>
Looks like I can use xmaxima or gnuplot if I go with maxima. Then I get all the nice CAS stuff needed for a lot of computations for free
<Nilby>
wXmaxima is pretty impressive with it's gnuplot integration. I just wish it was all Lisp.
JohnTalent has joined #lisp
<Nilby>
But I haven't tried Climaxima yet
<mfiano>
easiest would be to just use my game engine as a renderer, as the math library it uses is exactly what I'm attempting to document.
<Nilby>
yes. self documenting, that's what I like
<mfiano>
It'll take a while to spin up hundreds of example scenes, but it'll be worth it. The math library is nearing 20kloc so lots to document.
IAmRasputin has joined #lisp
andreyorst` has quit [Quit: andreyorst`]
Aurora_v_kosmose has quit [Remote host closed the connection]
andreyorst` has joined #lisp
Aurora_v_kosmose has joined #lisp
IAmRasputin has quit [Ping timeout: 256 seconds]
Bike has joined #lisp
karlosz has joined #lisp
Aurora_v_kosmose has quit [Remote host closed the connection]
Aurora_v_kosmose has joined #lisp
FennecCode has joined #lisp
krid has joined #lisp
aartaka has joined #lisp
kaftejiman has joined #lisp
aartaka_d has quit [Ping timeout: 240 seconds]
notandinus has joined #lisp
X-Scale` has joined #lisp
EvW has joined #lisp
X-Scale has quit [Ping timeout: 256 seconds]
X-Scale` is now known as X-Scale
treflip has quit [Quit: WeeChat 2.6]
kam1 has quit [Ping timeout: 260 seconds]
aeth has quit [Ping timeout: 246 seconds]
kam1 has joined #lisp
aeth has joined #lisp
dbotton has joined #lisp
IAmRasputin has joined #lisp
IAmRasputin has quit [Ping timeout: 240 seconds]
leo_song has quit [Ping timeout: 272 seconds]
leo_song has joined #lisp
karlosz has quit [Remote host closed the connection]
bitmapper has joined #lisp
hendursa1 has quit [Quit: hendursa1]
hendursaga has joined #lisp
rgherdt has quit [Ping timeout: 260 seconds]
waleee-cl has joined #lisp
wsinatra has joined #lisp
IAmRasputin has joined #lisp
JohnTalent has quit [Quit: leaving]
kam1 has quit [Ping timeout: 260 seconds]
hiroaki has quit [Ping timeout: 256 seconds]
karlosz has joined #lisp
orivej has quit [Ping timeout: 260 seconds]
EvW has quit [Ping timeout: 260 seconds]
rgherdt has joined #lisp
CookE[] has joined #lisp
a0 has quit [Ping timeout: 240 seconds]
karijes has joined #lisp
karijes has quit [Remote host closed the connection]
hiroaki has joined #lisp
lucasb has joined #lisp
andreyorst` has quit [Quit: andreyorst`]
matta has quit [Remote host closed the connection]
matta has joined #lisp
sjl has joined #lisp
IAmRasputin has quit [Quit: WeeChat 3.0]
hal99999 has joined #lisp
Steeve has joined #lisp
srandon111 has quit [Ping timeout: 260 seconds]
aartaka has quit [Read error: Connection reset by peer]
aartaka_d has joined #lisp
toorevitimirp has quit [Ping timeout: 240 seconds]
srandon111 has joined #lisp
flazh has quit [Ping timeout: 240 seconds]
lotuseater has quit [Ping timeout: 268 seconds]
matta has quit [Ping timeout: 258 seconds]
<mister_m>
When I use asdf to "load-op" my system, I am seeing a compilation error during the macroexpansion of something - the error is that a particular helper function is not found, however the output also tells me "It is defined earlier in the file but is not available at compile-time." I am not sure what to do here. Has anyone run into this? I can clean up this code and post it as well I am sure more context may be needed.
<phoe>
mister_m: eval-always the function definition
<phoe>
you must do that for functions which are used in the compilation environment, e.g. when used by macroexpanders
<mister_m>
ah of course that actually in hindsight makes sense
<phoe>
if macro FOO calls a function BAR before returning a value, then BAR must be loaded and available
<phoe>
that's what (eval-when (:compile-toplevel) ...) does
<phoe>
the remaining two options to EVAL-WHEN preserve the defaults.
<mfiano>
Alternatively, define the function in a file that is LOAD'd earlier
matta has joined #lisp
karlosz has quit [Quit: karlosz]
charles` has joined #lisp
<mister_m>
mfiano: that's clever but maybe a bit hard to read
<mister_m>
for me tho, not the compiler of course
kam1 has joined #lisp
ebrasca has quit [Remote host closed the connection]
a0 has joined #lisp
CookE[] has quit [Ping timeout: 240 seconds]
a0 has quit [Remote host closed the connection]
a0 has joined #lisp
a0 has quit [Remote host closed the connection]
a0 has joined #lisp
_jrjsmrtn has joined #lisp
__jrjsmrtn__ has quit [Ping timeout: 272 seconds]
charles` has quit [Ping timeout: 260 seconds]
matta has quit [Remote host closed the connection]
matta has joined #lisp
villanella has joined #lisp
karlosz has joined #lisp
<pyc>
Can I load a Lisp package from a git-cloned-dir of the package? I know we can use Quicklisp and ql:quickload but I want to try it myself without Quicklisp's help to understand the fundamentals.
<beach>
pyc: You can use ASDF, but they are not packages. They are systems.
<beach>
pyc: Quicklisp calls ASDF.
<pyc>
beach: what is the difference between "packages" and "systems"?
<jackdaniel>
a package is a common lisp concept defined in the standard, among other things symbols are interned by the reader in packages
<beach>
A package is a namespace (mapping from strings to symbols), created usually by defpackage. A system is a collection of components that are to be compiled and loaded in some order.
aartaka has joined #lisp
<jackdaniel>
a system is a made-up abstraction (i.e not part of the common lisp standard) defined i.e in asdf - a system is roughly the equivalent of a "package" in python
aartaka_d has quit [Ping timeout: 260 seconds]
aartaka_d has joined #lisp
kam1 has quit [Ping timeout: 265 seconds]
slyrus has joined #lisp
aartaka has quit [Ping timeout: 264 seconds]
oxum has quit [Remote host closed the connection]
charles` has joined #lisp
oxum has joined #lisp
<charles`>
good morning beach
<charles`>
mister_m do you mean the topic?
hugh_marera has quit [Quit: Connection closed]
oxum has quit [Remote host closed the connection]
oxum has joined #lisp
cer0 has joined #lisp
iekfkk has joined #lisp
<iekfkk>
does haskell has OOP or structs like scheme
<iekfkk>
can we avoid OOP/structs
cantstanya has quit [Ping timeout: 240 seconds]
<iekfkk>
all the time , if haskell does it then can scheme too do it, scheme has some structs
flazh has joined #lisp
<jackdaniel>
iekfkk: this channel is about common lisp, for sheme try #scheme, for haskell try #haskell, for various lisps ##lisp, for loose discussion #lispcafe
<jackdaniel>
s/sheme/scheme/
cantstanya has joined #lisp
matta has quit [Ping timeout: 264 seconds]
matta has joined #lisp
<jmercouris>
anyone written a terminal emulator in CL?
<jmercouris>
I see that it is a requested project on Cliki, just wondering if that is out of date
dbotton has quit [Quit: This computer has gone to sleep]
kam1 has joined #lisp
slyrus has quit [Quit: Leaving]
matta has quit [Ping timeout: 260 seconds]
<_death>
there's 3bst
karlosz has quit [Remote host closed the connection]
<Colleen>
No location called "GMT+3" could be found.
<phoe>
welp
<jmercouris>
,faith
dbotton has joined #lisp
<jmercouris>
to quote fsbot: 40:78 We have sent forth other DOCUMENTATIONs before you, of some you have already heard, of others We have told you nothing. Yet none of these could work a miracle except by EMACS's leave. And when EMACS's will is done, justice will prevail and those who have denied His signs will come to grief.
<jmercouris>
we really need that functionality in Colleen
<jmercouris>
or minion
karlosz has joined #lisp
Younder has joined #lisp
mankaev_ has joined #lisp
<Nilby>
Yet I have sent forth many DOCUMENTATIONs that fuck up EMACS's still failing after 40 years indent code. But yes, I have come to grief.
<Younder>
Fix it and send them the fix?
mankaev has quit [Ping timeout: 272 seconds]
CookE[] has joined #lisp
kam1 has quit [Ping timeout: 240 seconds]
dbotton has quit [Quit: This computer has gone to sleep]
a0 has quit [Ping timeout: 240 seconds]
<iekfkk>
jmercouris: so islamic did you read the quran?
gareppa has joined #lisp
<phoe>
hey now, that's getting off-topic
torbo has joined #lisp
andreyorst has joined #lisp
rogersm has joined #lisp
srandon111 is now known as suq_madiq
cognemo has quit [Quit: cognemo]
rogersm has quit [Quit: Leaving...]
luckless_ has joined #lisp
luckless has quit [Ping timeout: 240 seconds]
Aurora_v_kosmose has quit [Remote host closed the connection]
cognemo has joined #lisp
Aurora_v_kosmose has joined #lisp
loli has quit [Quit: WeeChat 2.9]
hiroaki has quit [Ping timeout: 246 seconds]
loli has joined #lisp
cosimone has quit [Remote host closed the connection]
cosimone has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
thecoffemaker has quit [Ping timeout: 260 seconds]
amb007 has joined #lisp
karlosz has quit [Quit: karlosz]
hiroaki has joined #lisp
gareppa has quit [Quit: Leaving]
karlosz has joined #lisp
nostoi has joined #lisp
mrcom has joined #lisp
nostoi has quit [Quit: Verlassend]
suq_madiq is now known as genericname
heisig has quit [Ping timeout: 258 seconds]
aeth has quit [Ping timeout: 240 seconds]
aeth has joined #lisp
vhost- has quit [Quit: WeeChat 2.8]
bisickcor has joined #lisp
<oni-on-ion>
phoe, thats where the fsbot text 'came' from.
villanella has quit [Quit: villanella]
<oni-on-ion>
phoe, not sure if iekfkk knows its a bot response.
bendersteed has quit [Ping timeout: 246 seconds]
frgo_ has quit [Remote host closed the connection]
cer0 has quit [Ping timeout: 240 seconds]
iekfkk has quit [Ping timeout: 240 seconds]
dbotton has joined #lisp
genericname has left #lisp ["leaving"]
Inline has joined #lisp
frgo has joined #lisp
nydel has joined #lisp
nydel has quit [Changing host]
nydel has joined #lisp
Aurora_v_kosmose has quit [Remote host closed the connection]
rogersm has joined #lisp
Aurora_v_kosmose has joined #lisp
liberliver has quit [Quit: liberliver]
rogersm has quit [Client Quit]
cer0 has joined #lisp
Lycurgus has joined #lisp
karlosz has quit [Remote host closed the connection]
aeth_ has joined #lisp
aeth has quit [Disconnected by services]
aeth_ is now known as aeth
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
zacts has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
Alloc has joined #lisp
galex-713 has quit [Ping timeout: 272 seconds]
galex-713 has joined #lisp
Alloc has quit [Remote host closed the connection]
andreyorst has quit [Read error: Connection reset by peer]
andreyorst has joined #lisp
galex-713 has quit [Read error: Connection reset by peer]
galex-713_ has joined #lisp
EvW has quit [Ping timeout: 268 seconds]
orivej has joined #lisp
joaot has joined #lisp
vhost- has joined #lisp
vhost- has joined #lisp
andreyorst has quit [Ping timeout: 240 seconds]
dbotton has quit [Quit: Leaving]
galex-713_ has quit [Ping timeout: 260 seconds]
galex-713 has joined #lisp
EvW has joined #lisp
malm has quit [Ping timeout: 272 seconds]
frgo_ has joined #lisp
frgo has quit [Ping timeout: 260 seconds]
aeth has quit [Ping timeout: 240 seconds]
iekfkk has joined #lisp
aeth has joined #lisp
malm has joined #lisp
bisickcor has quit [Ping timeout: 240 seconds]
jw4 has quit [Read error: Connection reset by peer]
jw4 has joined #lisp
Grauwolf has quit [Quit: WeeChat 2.9]
Aurora_v_kosmose has quit [Remote host closed the connection]
Aurora_v_kosmose has joined #lisp
karlosz has joined #lisp
CookE[] has quit [Quit: Leaving]
galex-713 has quit [Ping timeout: 260 seconds]
narimiran has quit [Ping timeout: 256 seconds]
thecoffemaker has joined #lisp
<phoe>
well
<phoe>
no idea
<phoe>
but still
imode has joined #lisp
Aurora_v_kosmose has quit [Remote host closed the connection]
Aurora_v_kosmose has joined #lisp
stoneglass has joined #lisp
akoana has joined #lisp
EvW has quit [Ping timeout: 260 seconds]
ex_nihilo has quit [Quit: Leaving]
hnOsmium0001 has joined #lisp
shka_ has quit [Ping timeout: 256 seconds]
Lycurgus has quit [Ping timeout: 246 seconds]
cosimone has quit [Quit: cosimone]
EvW has joined #lisp
cosimone has joined #lisp
kam1 has joined #lisp
rgherdt has quit [Remote host closed the connection]
rgherdt has joined #lisp
Grauwolf has joined #lisp
orivej has quit [Ping timeout: 256 seconds]
madage has quit [Remote host closed the connection]
madage has joined #lisp
tempest_nox has joined #lisp
<phoe>
is identity of literal gensyms preserved while compiling code?
<Bike>
the compilation of distinct references to one gensym should still be distinct references to one symbol, yeah
<phoe>
is (test) supposed to return T or NIL in this particular case?
<Bike>
in fact "Two apparently uninterned symbols S and C are similar if their names are similar. " so i guess it's a little broader than identity
<phoe>
similarity, yes, but I want identity
<Bike>
ok, hang on now
<Bike>
you're talking about putting these forms in a file and then compiling and loading them, right?
<phoe>
yes
badcfe has joined #lisp
<Bike>
if you load the fasl into a new image it will run make-symbol again, so *foo* will be bound to something else, so they won't be identical
<phoe>
hmmm.
<phoe>
is it a use case for load-time-value?
<Bike>
what is your use case?
<phoe>
I'm writing something similar to JSON parser except I only deal with string keys here
<phoe>
my idea is to make a pseudo-package which is a weak hash table from strings to gensyms.
<phoe>
and to be able to turn string= comparisons (on keys) into eq comparisons (on symbols).
<Bike>
with you so far
<phoe>
the only reason why I'm using symbols is because they can be eq-compared and are globally unique.
<phoe>
here come compiler macros - I want to be able to perform this transformation at compile-time
<phoe>
so (get object "foo") gets turned into something like (svref (values object) (position '#:g182 (keys object) :test #'eq))
<Bike>
uhhuh.
<phoe>
where #:g182 is (gethash "foo" *pseudo-package*)
<phoe>
except computed at compile time.
<Bike>
right.
<Bike>
and you want an actual (get object "foo") call done after loading to get the same symbol?
<Bike>
to work through the same symbol, whatever.
<phoe>
yes
<phoe>
I want to do as much of the pseudo-interning at compile time for obvious purposes: performance
<phoe>
so I can have EQ comparisons only.
<Bike>
ok, so first off, to be clear, two distinct references to the same object in a compiled file will be distinct references to the same object in the loaded code as well
<phoe>
ideally, the whole hash table should never be accessed at runtime
<Bike>
"If two literal objects appearing in the source code for a single file processed with the file compiler are the identical [sic], the corresponding objects in the compiled code must also be the identical. "
<Bike>
sic again
<phoe>
OK... hold on then
<Bike>
and it sounds to me what you want to do is to dump the hash table into the fasl so the runtime can pick it up again later.
<phoe>
actually, no, not really
<phoe>
the hash table is meant to be filled in during compilation of functions
<phoe>
so I want it empty in the beginning, and then to get its first entry when a call to (get object "foo") is first compiled
<Bike>
okay, but i'm talking about what happens at load time.
<phoe>
that's when I want the map from "foo" to #:g182 to be created
<Bike>
cos when you're loading the fasl there will be nothing being compiled obviously.
<phoe>
oooh, yes, I see
<phoe>
we're talking post-compile-time now.
sjl has quit [Ping timeout: 246 seconds]
<phoe>
OK, I'm with you so far.
<Bike>
i suppose you could accomplish this somewhat goofily by doing (eval-when (:compile-toplevel :execute) (defvar *hash* (make-hash-table))) at the top of the file, and (eval-when (:load-toplevel) (defvar *hash* #.*hash*)) at the bottom
actuallybatman has quit [Quit: leaving]
<Bike>
i think. it's a little exotic ofc
<phoe>
oh no, here come the crazy EVAL-WHEN options that Fare warned me about
* phoe
thinks
hal99999 has quit [Quit: hal99999]
<phoe>
so we create the hash table, let it grow as the code is compiled... and then dump the resulting object into the FASL as a literal into a DEFVAR form
<phoe>
the syntax is going to be kinda goofy and I need to iron out how to make it work across multiple files
beach` has joined #lisp
kam1 has quit [Ping timeout: 246 seconds]
cer0 has quit [Quit: leaving]
<phoe>
...or I hook this all into ASDF actually
<phoe>
and once the system is loaded, I dump the hash table into a FASL as an additional compilation artifact
<phoe>
the question is, how will that work cross-FASL with uninterned symbols?... likely won't
<phoe>
I need to experiment with this more when I am awake
<phoe>
like, tomorrow
beach has quit [Ping timeout: 260 seconds]
Steeve has quit [Quit: end]
devon has joined #lisp
bilegeek has joined #lisp
pve has quit [Quit: leaving]
<charles`>
is read-sequence faster than (loop ... (read-byte))?
<no-defun-allowed>
I think it would be.
<charles`>
I have too loop through anyway, so may as well only have one loop
akrl has quit [Ping timeout: 256 seconds]
cosimone has quit [Quit: cosimone]
akrl has joined #lisp
akoana has quit [Quit: leaving]
<Xach>
charles`: the difference can be substantial.
<aeth>
it should be able to read 8 bytes at a time, shouldn't it? although the read-byte part can be optimized, too, it's just less likely to be