<Josh_2>
The symbols that are being imported are conflicting with local variables
<White_Flame>
symbols are symbols, regardless of how they're used
whiteline has quit [Remote host closed the connection]
whiteline has joined #lisp
<White_Flame>
if your code used (let ((foo ...)) ..), then there's a my-package::foo created for it to represent the source code
<Josh_2>
hmm alright
<Josh_2>
well it works when shadowing
MerlinTheWizard has quit [Ping timeout: 260 seconds]
MerlinTheWizard has joined #lisp
orivej has quit [Ping timeout: 246 seconds]
orivej has joined #lisp
MerlinTheWizard has quit [Ping timeout: 260 seconds]
flazh has quit [Read error: Connection reset by peer]
flazh has joined #lisp
nullman has joined #lisp
choegusung has joined #lisp
Lord_of_Life_ has joined #lisp
EvW has quit [Ping timeout: 260 seconds]
Lord_of_Life has quit [Ping timeout: 265 seconds]
Lord_of_Life_ is now known as Lord_of_Life
bhartrihari has left #lisp ["Disconnected: Replaced by new connection"]
bhartrihari has joined #lisp
MerlinTheWizard has joined #lisp
fengshaun has quit [Quit: bibi!]
bitmappe_ has joined #lisp
fengshaun has joined #lisp
bitmapper has quit [Ping timeout: 265 seconds]
phadthai has quit [Ping timeout: 272 seconds]
orivej has quit [Ping timeout: 256 seconds]
phadthai has joined #lisp
rumbler31 has joined #lisp
easye has quit [Remote host closed the connection]
fengshaun has quit [Quit: bibi!]
easye has joined #lisp
fengshaun has joined #lisp
phadthai has quit [Ping timeout: 272 seconds]
phadthai has joined #lisp
fengshaun has quit [Client Quit]
fengshaun has joined #lisp
SGASAU has joined #lisp
terpri_ has quit [Remote host closed the connection]
SGASAU` has joined #lisp
shifty has joined #lisp
terpri has joined #lisp
SGASAU has quit [Ping timeout: 272 seconds]
SGASAU` has quit [Remote host closed the connection]
SGASAU`` has joined #lisp
bitmappe_ has quit [Ping timeout: 246 seconds]
mangul has joined #lisp
shangul has quit [Ping timeout: 246 seconds]
marusich has quit [Quit: Leaving]
marusich has joined #lisp
sword has joined #lisp
<Josh_2>
I like little 1 function libraries
dsmith has joined #lisp
sword has quit [Client Quit]
Mawile has quit [Read error: Connection reset by peer]
none has joined #lisp
none is now known as Guest38791
<dsmith>
Howdy folks. Some time ago (many years) I rememer reading about some web site that was implemented in CL. And it went though many changes over the years. But it was still running the *same* lisp process. (Same PID).
Guest38791 has quit [Remote host closed the connection]
<dsmith>
I don't remmeber it, and I haven't been able to find it.
<dsmith>
IF that sounds familiar, can you point me to it?
sword has joined #lisp
<dsmith>
I think it was using hunchentoot
sword has quit [Read error: Connection reset by peer]
SGASAU`` has quit [Ping timeout: 264 seconds]
<Josh_2>
sounds reasonable
<Josh_2>
once you have started your image and have swank/slynk going there isnt much reason to restart it
<Josh_2>
unless you break it ofcourse
<dsmith>
I'd like to re-read that article I'm remembering, if it's still available.
MerlinTheWizard has quit [Ping timeout: 260 seconds]
shifty has quit [Ping timeout: 265 seconds]
shifty has joined #lisp
KingOfCSU has joined #lisp
toorevitimirp has joined #lisp
MerlinTheWizard has joined #lisp
bhartrihari has left #lisp ["Disconnected: Replaced by new connection"]
bhartrihari has joined #lisp
zmt01 has quit [Quit: Leaving]
zmt00 has joined #lisp
shifty has quit [Ping timeout: 256 seconds]
shifty has joined #lisp
KingOfCSU has quit [Ping timeout: 256 seconds]
ralt has quit [Quit: Connection closed for inactivity]
bhartrihari has left #lisp ["Disconnected: closed"]
shifty has quit [Ping timeout: 272 seconds]
shifty has joined #lisp
bhartrihari has joined #lisp
msk has quit [Ping timeout: 272 seconds]
gaqwas has quit [Ping timeout: 258 seconds]
gaqwas has joined #lisp
MerlinTheWizard has quit [Ping timeout: 260 seconds]
sirmacik has quit [Ping timeout: 264 seconds]
mason has left #lisp [#lisp]
Codaraxis has quit [Remote host closed the connection]
Misha_B has quit [Remote host closed the connection]
Codaraxis has joined #lisp
MerlinTheWizard has joined #lisp
<beach>
Good morning everyone!
paul0 has joined #lisp
SGASAU has joined #lisp
<solrize>
morning beach
<beach>
solrize: In addition to myself, Bike, karlosz, and heisig, scymtym is also working on the SICL project. He is maintaining the Eclector reader.
zaquest has quit [Quit: Leaving]
SGASAU has quit [Ping timeout: 272 seconds]
<beach>
He is also working on McCLIM, and while McCLIM is not part of SICL directly, it's an important brick in the overall picture. And jackdaniel is the main maintainer of McCLIM, and there are several other doing great work there.
<solrize>
nice
<solrize>
is eclector a big project? is it more than a CL reader?
<beach>
I just wanted to set the record straight, since you asked. It is not terribly important otherwise.
<solrize>
np
<solrize>
i can see that a lot of work went into it
zaquest has joined #lisp
<beach>
Eclector does lots of interesting things, in particular it can read S-expressions wrapped in standard objects that give information about source location. And it is configurable, so that client code can choose how to interpret tokens and such.
pjb has quit [Ping timeout: 272 seconds]
<beach>
And it is a marvel of error recovery. We need all that stuff because Eclector is part of the editor project(s) for editing Common Lisp source code. Eclector is used to parse the buffer contents.
<beach>
And we can't allow it to just call ERROR in the middle of an editing session.
<beach>
It is also well documented and well tested, so a model for the "modules" I want to create. Eclector started life as the "SICL reader", but scymtym has taken it way beyond that initial state.
Oladon has joined #lisp
<solrize>
aha nice yeah that makes sense
<solrize>
being able to connect it up to an editor etc
<beach>
And a debugger worthy of the name.
<solrize>
can it reach into the compiler's type inference ?
<solrize>
the debugger is part of eclector?
<solrize>
or oh i think i see
<beach>
No, it is not. It's a separate project.
<beach>
The editor I am planning will actually run part of a Cleavir-based compiler to analyze the code and give feedback to the user based on such analysis.
<beach>
And I am pretty sure I will be able to run the compiler at typing speed.
<solrize>
yeah that's what i was hoping
<beach>
So no need to hit any particular key to get that information.
<beach>
minion: Please tell solrize about Cleavir.
<minion>
solrize: Cleavir: A project to create an implementation-independent compilation framework for Common Lisp. Currently Cleavir is part of SICL, but that might change in the future
<solrize>
do you have a writeup about cleavir?
<solrize>
well lemme look in docs dir
<beach>
yes, there is a Documentation subdirectory.
<solrize>
yeah looking
<beach>
It is unfortunately a bit out of date.
<beach>
Also, there are two version of Cleavir now.
<beach>
We will merge them in the future.
<solrize>
i don't see a compiler doc
<beach>
SICL/Code/Cleavir/Documentation/
<solrize>
ah ok
<beach>
... should be it.
<beach>
But it evolves a lot, so the documentation is lagging behind.
<beach>
Not that it matter for understanding the basic idea(s).
<solrize>
hmmm some tex fonts missing
<beach>
There is nothing special about Cleavir in terms of compiler technology. We are mostly applying existing techniques, with adaptations for Common Lisp particularities.
<beach>
What is special about it is that it can be configured to different Common Lisp implementations.
Bike has quit [Quit: leaving]
<beach>
So, Cleavir is currently used by Clasp and SICL, but karlosz wrote a Cleavir-based compiler for CLISP as well, demonstrating that it is really independent of the Common Lisp implementation.
<beach>
And, as I said, I plan to use it to analyze Common Lisp code in an editor buffer.
<beach>
solrize: It may look like I am addressing you specifically with this information, but it doesn't hurt to remind other #lisp participants from time to time.
bhartrihari has left #lisp ["Disconnected: Replaced by new connection"]
bhartrihari has joined #lisp
shifty has quit [Ping timeout: 272 seconds]
shifty has joined #lisp
pjb has joined #lisp
<solrize>
nice... i'm trying to install enough tex fonts to typeset the cleavir docs
<solrize>
what is clasp?
<beach>
minion: Please tell solrize about Clasp.
<minion>
solrize: Clasp: An implementation of Common Lisp that interoperates smoothly with C++ and uses LLVM to generate native code
<solrize>
oh interesting i didn't know about that
<solrize>
ok i made the pdf
<solrize>
looking at it
<beach>
All this configuration I am talking about is achieved using generic functions and often auxiliary methods on those generic functions. So we are using the full Common Lisp language. It means that, if you build a Common Lisp implementation from scratch from (say) C or C++, then you need a temporary evaluator written in that language before you can bootstrap a Cleavir-based compiler.
<beach>
That's what Clasp and CLISP are both doing.
<solrize>
it's reasonable to write CL compilers in CL
<solrize>
e.g. start with clisp or something
notzmv has joined #lisp
<beach>
But SICL is unique in that it is written entirely in Common Lisp. And while it is trivial to write a compiler for a traditional file-translating compiler, it is a very different matter to write an entire Common Lisp system in Common Lisp.
<beach>
There are several reasons for that, but mainly, the Common Lisp system is a web of mutual modules.
<solrize>
it's perfectly fine as long as you have something you can bootstrap from
<solrize>
or is there more to it than that, hmm
<beach>
The reader and the compiler can call the evaluator, for instance.
<solrize>
something like this comes up in forth metacompilation
<solrize>
bbiab, incoming phone call. these docs are really good
<beach>
Also, pretty much every Common Lisp system in existence started life as a CLtL1 language, and CLOS was then "bolted on" for ANSI compliance. Typically using "PCL" (Portable Common Loops) to implement CLOS.
<beach>
But that makes the code ugly, and less maintainable. Even the SBCL compiler is written without the use of generic functions and standard classes (apparently. I haven't looked at the details).
<beach>
With SICL, I wanted to take advantage of MOP technology to create most of the system. So the bootstrapping technique is unique, in that it starts by creating the MOP class hierarchy.
akrl has quit [Read error: Connection reset by peer]
dddddd has quit [Ping timeout: 258 seconds]
akrl has joined #lisp
<beach>
seok: Two of us are kind of paid to work on SICL. I am a researcher and SICL is my main research project, so I have my salary. And Bike is hired by drmeister to work on the Cleavir compiler framework, especially in the context of Clasp, of course, but in practice there is a lot of general Cleavir work that must be done for that, like compiler optimizations.
bhartrihari has left #lisp ["Disconnected: Broken pipe"]
bhartrihari has joined #lisp
<solrize>
oh cool i didn't realize there was still any CL research going on anywhere
<beach>
As I often say, 15 or so papers since 2014.
<beach>
Another place where Common Lisp research is done is Epita in Paris, where Didier Verna and Jim Newton work.
<beach>
They have had important papers (and theses etc) in the past few years.
<beach>
But yeah, for a dead language, there is a lot of activity.
<solrize>
there's still a few forth conferences every year
pjb has quit [Ping timeout: 272 seconds]
wxie has joined #lisp
gko has joined #lisp
<beach>
Anyway, enough rants for a while, I think.
shifty has quit [Ping timeout: 256 seconds]
bhartrihari has left #lisp [#lisp]
bhartrihari has joined #lisp
<solrize>
heh
<solrize>
i think i built all the pdfs and can upload a tarball if you want it
<beach>
That's fine. They might already be on metamodular.com somewhere. But thanks for the offer.
<solrize>
np
<beach>
I need to organize the documentation and the papers on metamodular.com so that they are more easily accessible, but I am too busy with bootstrapping to concentrate on that.
saravia has quit [Quit: saravia is afk]
<no-defun-allowed>
Do you have a list of the files in metamodular.com/SICL/ at least?
<beach>
I don't :(
<solrize>
the doc files? i just used "find" to locate all the tex files, then ran the makefiles in the directories where they were
<solrize>
and i had to install a bunch of different tex and metafont packages because debian splinters everything into tiny fragments
<solrize>
but now i have all the pdfs in one place
<no-defun-allowed>
What a weird collector, it only recycles CARs.
Oladon has quit [Quit: Leaving.]
gravicappa has joined #lisp
pjb has quit [Ping timeout: 272 seconds]
andrei-n has joined #lisp
agspathis has joined #lisp
akoana has left #lisp [#lisp]
<ober>
but always O(1)
<phoe>
good morning
<beach>
Hello phoe.
<ober>
morning phoe
pjb has joined #lisp
bhartrihari has left #lisp ["Disconnected: Replaced by new connection"]
bhartrihari has joined #lisp
shifty has joined #lisp
wxie has quit [Ping timeout: 260 seconds]
bhartrihari has left #lisp ["Disconnected: Replaced by new connection"]
bhartrihari has joined #lisp
bhartrihari has left #lisp ["Disconnected: Replaced by new connection"]
bhartrihari has joined #lisp
pjb has quit [Ping timeout: 260 seconds]
pve has joined #lisp
nullman has quit [Ping timeout: 265 seconds]
nullman has joined #lisp
bhartrihari has left #lisp ["Disconnected: Replaced by new connection"]
<beach>
This page: metamodular.com/CLOS-MOP/initialization-of-generic-function-metaobjects.html says that the :method-combination argument is a method-combination metaobject. But it also says that "Unless there is a specific not to the contrary, then during reinitialization, if an initialization argument is not supplied, the previously stored value is left unchanged".
<beach>
So I take that to mean that it has to be supplied during initialization, and it should not be checked during reinitialization. Am I right?
<beach>
Hmm, no wait.
<beach>
It CAN be supplied during reinitialization as well.
<beach>
OK, so it should be type checked during reinitialization if provided. And it should be verified that it *is* provided during initialization.
pjb has joined #lisp
liberliver1 has joined #lisp
heisig has joined #lisp
liberliver has quit [Ping timeout: 264 seconds]
liberliver1 is now known as liberliver
shifty has quit [Ping timeout: 260 seconds]
shifty has joined #lisp
sdumi has quit [Ping timeout: 260 seconds]
MerlinTheWizard has quit [Ping timeout: 260 seconds]
sdumi has joined #lisp
rgherdt has joined #lisp
RukiSama has joined #lisp
toorevitimirp has quit [Remote host closed the connection]
<phoe>
yes, ABCL is surprisingly close to the standard limits
<jmercouris>
OR IS IT?
<_death>
just avoid doing what TRIVIA does.. it "tests" whether a function is unary by calling it with a single argument and expecting an error if it's not unary
<jmercouris>
OPTIMA > TRIVIA
<phoe>
_death: ...wtf
<jmercouris>
I knew it
<jmercouris>
even though Trivia is "fasteR"
<Bike>
that's about what you'd have to do, yeah
<Bike>
and, bonus, it has well defined behavior, unlike arglist things
<jmercouris>
Bike: you mentioned a reader macro to do what I was suggesting yesterday
<Bike>
you could define, like, a [packagename x] macro, which reads packagename, binds *package* to that package, and then reads and returns x
<Bike>
i don't think this is the right way to go about things, but it's possible, i think
<Bike>
_death: why does it even want to know this?
<Bike>
to find structure reader functions...?
<_death>
I guess.. it's been a while since I looked at that code
<jmercouris>
Bike: what is the "right way" in your opinion?
SGASAU has quit [Ping timeout: 260 seconds]
bitmapper has joined #lisp
jesse1010 has joined #lisp
<Bike>
in-package, or put it in a different file, or whatnot
<axion>
jmercouris: Is this for a library or an application?
<Bike>
i haven't worked with parenscript much, tho
<jmercouris>
axion: por que no las dos?
<jmercouris>
axion: it is for both
<axion>
jmercouris: One reason this is not a good idea, is if this is for a library and your users are forced to annotate their source files using it with named-readtables nonsense to switch/restore the standard readtable
<jmercouris>
it is a library for other people using the same application
<jmercouris>
axion: are you familiar with our lord and savior?
<jmercouris>
it is for this source code, which authors of packages will use
<jmercouris>
axion: Oh I see
<jmercouris>
axion: why the username switch?
<axion>
I've had this name for a couple decades and use it ocassionally. No real reason.
<axion>
jmercouris: Every file that is loaded must switch out the standard readtable for yours, and then restore the standard readtable after it's done being used in that file. One way this is done is by your users bringing in the named-readtables dependency and annotating every file they load into their image that uses your custom reader macros.
<jmercouris>
sounds a bit painful
<jmercouris>
maybe a road I do not wish to go down...
<axion>
Yes. It isn't something I want to force on users
<axion>
I don't really write reader macros if I can help it.
bhartrihari has joined #lisp
bhartrihari has left #lisp [#lisp]
bhartrihari has joined #lisp
flazh has joined #lisp
MerlinTheWizard has quit [Ping timeout: 260 seconds]
pjb has joined #lisp
ArthurStrong has joined #lisp
emys has quit [Ping timeout: 240 seconds]
madnificent has joined #lisp
emys has joined #lisp
loli has quit [Quit: WeeChat 2.8]
loli has joined #lisp
__jrjsmrtn__ has joined #lisp
_jrjsmrtn has quit [Ping timeout: 260 seconds]
Hawthorne has joined #lisp
Hawthorne has quit [Remote host closed the connection]
Snaffu has joined #lisp
KingOfCSU has quit [Remote host closed the connection]
bitmapper has quit [Remote host closed the connection]
bitmapper has joined #lisp
efm has joined #lisp
pjb has quit [Ping timeout: 272 seconds]
bitmapper has quit [Ping timeout: 272 seconds]
ljavorsk has joined #lisp
Snaffu has quit [Remote host closed the connection]
ljavorsk has quit [Ping timeout: 256 seconds]
sdumi has quit [Ping timeout: 258 seconds]
ralt has joined #lisp
sdumi has joined #lisp
bhartrihari has left #lisp ["Disconnected: closed"]
bhartrihari has joined #lisp
bebop has joined #lisp
bhartrihari has left #lisp ["Disconnected: Replaced by new connection"]
bhartrihari has joined #lisp
bhartrihari has left #lisp ["Disconnected: Replaced by new connection"]
bhartrihari has joined #lisp
gko has quit [Ping timeout: 256 seconds]
pjb has joined #lisp
emys has quit [Ping timeout: 265 seconds]
Oladon has quit [Quit: Leaving.]
emys has joined #lisp
kpoeck has quit [Remote host closed the connection]
cosimone has quit [Quit: Quit.]
theseb has quit [Quit: Leaving]
emys has quit [Ping timeout: 260 seconds]
emys has joined #lisp
bitmapper has joined #lisp
EvW has joined #lisp
pjb has quit [Ping timeout: 272 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
bhartrihari has left #lisp ["Disconnected: Replaced by new connection"]
bhartrihari has joined #lisp
fmcs has joined #lisp
bebop has quit [Ping timeout: 240 seconds]
Inline has quit [Ping timeout: 260 seconds]
MerlinTheWizard has joined #lisp
bhartrihari has left #lisp ["Disconnected: Replaced by new connection"]
<Josh_2>
So I have a function that can signal a custom condition which isn't handled intentionally, I should export this one right? I have another custom condition but this one is handled by the library itself, should I export that one anyway?
<stylewarning>
Josh_2: The former, yes. Export the condition and any methods to access the condition. They should be readers.
<stylewarning>
Josh_2: If the second condition will never make its way out of the library, don’t export it, but do document it.
<stylewarning>
(And add to its :REPORT that you should never see this condition, otherwise it’s a bug in the library)
<Josh_2>
Okay thanks :)
jw4 has quit [Read error: Connection reset by peer]
<phoe>
the docstring in the README could use some formatting, such as being in a markdown quote instead of an inline code block
<phoe>
but that's a nitpick
* Shinmera
wishes there was a way to add docstrings for restarts
<Josh_2>
alrighty
<Shinmera>
Hmmm, I suppose if I ever get around to the protocol for local definitions in... Definitions, that might be a place to store that.
<phoe>
restarts are dynamic extent though
<Shinmera>
I am aware.
<phoe>
you mean restart names?
<Shinmera>
Same difference from the perspective of documentation.
<phoe>
oh! for restart names that would work, sure
<Shinmera>
So far I've been putting it into relevant functions and conditions, but I've always wanted to have it separate too.
<phoe>
...I guess that for restarts too, but only if the docstrings were stored on the restart objects themselves - having them in a separate hashtable of any sort is nigh impossible because of DX
<phoe>
s/restarts/restart instances/
<phoe>
plus it would be non-standard, since you'd need to define a method on #'documentation with specializers (t (eql 'restart)) or (restart (eql 'restart)) which is foreboden
<Shinmera>
Luckily I don't have to worry about that in Definitions
<phoe>
yes
madage has quit [Remote host closed the connection]
<stylewarning>
Josh_2: how do you want it reviewed? It would have been easier if you made a PR to your own library (:
<holycow>
do you guys use code folding? just curious if there are any recommended packages.
<stylewarning>
holycow: I don’t
<holycow>
k. appreciate the feedback.
<stylewarning>
It might be nice to fold top level forms with a preview
<phoe>
holycow: hide-show-mode in emacs
<Josh_2>
stylewarning: a pr?
<holycow>
aha, let me try that
<stylewarning>
Josh_2: a github pull request
<Josh_2>
oh, no I just wanted someone to look over it and make sure I havent done anything obviously wrong
<stylewarning>
Nothing seems obviously wrong but there are many areas for improvement
<stylewarning>
But mostly miscellaneous
<Josh_2>
like what?
<stylewarning>
For instance, HANDLE-OR can be implemented with a single FIND call
<stylewarning>
CALL-THE-RIGHT-... can be chances to just FUN-FOR-SYM which returns the function to call
orivej_ has quit [Ping timeout: 258 seconds]
<stylewarning>
which means you can further refactor by putting these sym/fun pairs in a DEFVAR allowing runtime extension of new kinds of validators
orivej has joined #lisp
<stylewarning>
chances -> changed*
<Josh_2>
hmm I did think about doing that
<stylewarning>
I’d put tests in a separate file
<Josh_2>
but I'd already written it when I had the "d'oh" moment, so I just added a quick way to extend the functionality with new symbols
<stylewarning>
MAP-PLIST isn’t so efficient with repeated calls to NTH. You should traverse the list just once.
<Josh_2>
But if you think It's a better idea to return a function associated with a keyword then I'll do that instead
<Josh_2>
alrighty
<stylewarning>
HANDLE-SATISFIES: the LIST case I’d do (some #'handle-satisfies func)
<seok>
This for symbol version does not work with 'symbol input
<stylewarning>
You don’t quote it
<stylewarning>
It’s a macro
<stylewarning>
(make-table my-cool-table)
<seok>
Ah
<seok>
then how would i call the macro in a loop?
rogersm has quit [Quit: Leaving...]
mangul has quit [Ping timeout: 256 seconds]
<seok>
I don't think this works when I want to use variables for pair
<axion>
This macro doesn't evaluate it's argument
<seok>
exactly
<axion>
So you cannot evaluate a variable binding
<axion>
You would need a macro for that
<stylewarning>
(defmacro make-lots-of-tables (&rest names) `(progn ,@(loop for name in names collect `(make-table ,name))))
<stylewarning>
(make-lots-of-tables billy joe bob)
<seok>
Yeah.. so I need another macro layer on top of it?
<seok>
Then isn't it simpler to use string?
<axion>
You cannot use a string
<stylewarning>
Symbol v string is inconsequential
<stylewarning>
A string doesn’t get evaluated or make anything easier
<axion>
This macro expects an unevaluated symbol, as it's intended to be used as a definition form at the toplevel
<seok>
No, the version that was already working with strings using intern
vap1 has joined #lisp
<stylewarning>
seok: let me ask this: where are you getting the list of table names?
<stylewarning>
What tables do you need to actually generate?
<seok>
I just have a function on top which can be called with the pair name
<seok>
(defun workone (symbol year month day hour) ......)
<seok>
which calls this macro
<stylewarning>
Why would you want to generate a table inside of a function?
<seok>
then uses the table geerated by the macro
Kevslinger has quit [Quit: Connection closed for inactivity]
<seok>
It is a crawler
<axion>
Macro expansion happens at compile time
<axion>
Before you can call your function
<seok>
Yes it does
<seok>
Why wouldn't I want to generate a table inside my crawler function?
vaporatorius has quit [Ping timeout: 265 seconds]
<stylewarning>
You wouldn’t want to do that because that means you would be generating new, unknown classes at runtime, and that gets out of hand. It’s possible and not difficult to do but I would consider it to be extremely odd
vaporatorius__ has joined #lisp
<seok>
That's why I asked if it was possible to make a class locally only
<seok>
before
<seok>
So the class only exists inside the function
<stylewarning>
But that doesn’t make much sense.
<stylewarning>
What happens if you create an instance of a class and return it from the function?
<stylewarning>
What happens if you pass an instance of such a local class to another function?
<seok>
you can make local variables, what's wrong with local classes?
<seok>
sure you can return the class if you want, what's wrong with that?
<phoe>
he's got a point you know, except that the current Lisp syntax doesn't really make that convenient
<Bike>
it could be lexically named but have indefinite extent, stylewarning. like lexical variables with closures.
<seok>
Oh, lisp does not do this?
<phoe>
there's no LET-CLASS for local classes
<seok>
:(
<Bike>
however i suspect they won't help this particular dao whatever problem.
<phoe>
seok: it is possible with the metaobject protocol
<phoe>
but it's not convenient to create classes that way
<Bike>
yeah that's what i said half an hour ago. you can make classes however but there's no lexical naming of them.
ralt has quit [Quit: Connection closed for inactivity]
<stylewarning>
I can obviously imagine anonymous class objects and Lisp is good enough to deal with them for the most part but I don’t think the thought experiment is helpful
vap1 has quit [Ping timeout: 258 seconds]
<phoe>
especially since you'd also need to dabble with whatever mito stuff you are doing
Oladon has joined #lisp
<phoe>
if one-class-per-table doesn't suit your model then mito is a wrong choice - it explicitly makes an assumption of one-class-per-table, as most ORMs do
<stylewarning>
Common Lisp wasn’t designed in any way to make such a concept useful in CLOS, so I don’t think there’s any point to entertain it unless it’s purely for, well, Saturday entertainment
orivej has quit [Ping timeout: 240 seconds]
<seok>
Ah
lucasb has joined #lisp
orivej has joined #lisp
<axion>
In any case, ORMs are flawed anyway, if relational theory has anything to say.
<seok>
For some reason I thought it would be obvious that such thing was possible in lisp
<seok>
pve: crawling forex data, a table for each pair
<Josh_2>
stylewarning: already on it!
<pve>
seok: I think you should use a single table
<pve>
would it be possible?
vaporatorius__ has quit [Quit: Leaving]
<seok>
No... definitely don't want to do that just for some convenience in this part
<seok>
It would be too messy later
vaporatorius has joined #lisp
vaporatorius has joined #lisp
vaporatorius has quit [Changing host]
<stylewarning>
Josh_2: also I prefer the HANDLE-FOO functions. It makes redefinition easier. Then you can (define-key :foo 'handle-foo)
borodust has quit [Remote host closed the connection]
<stylewarning>
And everything will Just Work even if you redefine HANDLE-FOO at runtime
<stylewarning>
No need to redefine the key even
<Josh_2>
hmm
<Josh_2>
That's a good idea
<Josh_2>
never thought about that
<stylewarning>
It’s a little maintainability/hackability change. Less elegant than just using lambdas of course
<phoe>
lambdas can be a pain in the butt
<phoe>
especially in the debugger, if they are unnamed
<pve>
seok: well in any case you should create your tables in advance, not while the crawler is running
hiroaki has quit [Ping timeout: 272 seconds]
<seok>
yes, make once first then insert
<Josh_2>
phoe: this is very true.
<Josh_2>
I will do what you suggested stylewarning
<stylewarning>
Josh_2: can’t wait for you to write a COMPILE-TEMPLATE ext which converts a template into an efficient open-coded lambda function ;)
<stylewarning>
Absolute overkill but a fun exercise
<Josh_2>
Well I don't have a clue what you mean so you might be waiting a while xD
<pve>
seok: and if you have n tables, then you should have n corresponding (non-local) classes
FreeBirdLjj has joined #lisp
anticrisis has joined #lisp
<seok>
yup
karlosz has joined #lisp
<stylewarning>
Josh_2: imagine if you analyzed the template and looked up all of the functions ahead of time, and returned a “super” lambda function that was specialized for just that template
TwoNotes has joined #lisp
<Josh_2>
converting the template into one big function to validate the list?
_16bitmood has joined #lisp
<seok>
wait, so can I put that macro inside a function and pass a symbol?
<stylewarning>
Josh_2: Yes a function you could reuse
<stylewarning>
So if you were doing a lot of checking with the same template, you wouldn’t have to dig into the template every time. You’d just dig into it once, and make a lambda specific for that template
<Josh_2>
oh, yes thats a good idea
farooqkz__ has quit [Ping timeout: 264 seconds]
Steinberg2010 has joined #lisp
<Josh_2>
considering I will most likely be doing lots of validation with the same templates, as I want to use this with ningle to validate json which ningle converts into lists
Steinberg2010 has quit [Client Quit]
<stylewarning>
Josh_2: you could also do stuff like (define-key :age-of-minor (compile-template '(:between 0 17)))
<Josh_2>
hmm
FreeBirdLjj has quit [Ping timeout: 260 seconds]
<Josh_2>
this is very good idea :)
<Josh_2>
I will look into it now
<Josh_2>
well when I have everything together in It's current form
<stylewarning>
Yeah don’t let me distract
bars0 has quit [Remote host closed the connection]
<pve>
seok: you might want to save yourself some headache and create a source file with the necessary deftable forms, either automatically or manually.
hiroaki has joined #lisp
bars0 has joined #lisp
cage_ has quit [Quit: Leaving]
<Josh_2>
stylewarning: thanks for all the help!
orivej has quit [Ping timeout: 272 seconds]
orivej has joined #lisp
MerlinTheWizard has joined #lisp
efm has quit [Ping timeout: 256 seconds]
efm has joined #lisp
bhartrihari has left #lisp ["Disconnected: Replaced by new connection"]
bhartrihari has joined #lisp
ralt has joined #lisp
FreeBirdLjj has joined #lisp
twelvemonkeys has quit [Ping timeout: 246 seconds]
nightfly has joined #lisp
twelvemonkeys has joined #lisp
Codaraxis has quit [Remote host closed the connection]
FreeBirdLjj has quit [Ping timeout: 256 seconds]
Codaraxis has joined #lisp
TwoNotes has quit [Quit: Leaving]
corpix has quit [Quit: corpix]
_16bitmood has quit [Quit: Leaving]
wlangstroth has joined #lisp
T3ns0r has joined #lisp
<drmeister>
Has anyone heard of foo-bar-baz being called "Kabob style"? I just heard it in a talk.