jackdaniel changed the topic of #commonlisp to: Common Lisp, the #1=(programmable . #1#) programming language | Wiki: <https://www.cliki.net> | IRC Logs: <https://irclog.tymoon.eu/libera/%23commonlisp> | Cookbook: <https://lispcookbook.github.io/cl-cookbook> | Pastebin: <https://plaster.tymoon.eu/>
yitzi has joined #commonlisp
Everything has quit [Quit: leaving]
jon_atack has quit [Ping timeout: 260 seconds]
slyrus has joined #commonlisp
Ruby2 has quit [Quit: ZNC - https://znc.in]
slyrus has quit [Ping timeout: 276 seconds]
Ruby has joined #commonlisp
brokkoli_originl has joined #commonlisp
brokkoli_origin has quit [Ping timeout: 252 seconds]
chops_ has quit [Ping timeout: 252 seconds]
slyrus has joined #commonlisp
eddof13 has quit [Quit: eddof13]
rtypo has quit [Ping timeout: 248 seconds]
rkazak has joined #commonlisp
slyrus has quit [Ping timeout: 265 seconds]
rkazak has quit [Ping timeout: 252 seconds]
chops_ has joined #commonlisp
chops_ has quit [Changing host]
chops_ has joined #commonlisp
fugata has joined #commonlisp
jonatack has joined #commonlisp
chops_ has quit [Ping timeout: 276 seconds]
slyrus has joined #commonlisp
rkazak has joined #commonlisp
chops_ has joined #commonlisp
chops_ has quit [Changing host]
chops_ has joined #commonlisp
slyrus has quit [Ping timeout: 244 seconds]
molson has joined #commonlisp
chops_ has quit [Ping timeout: 276 seconds]
molson__ has quit [Ping timeout: 260 seconds]
chops_ has joined #commonlisp
chops_ has joined #commonlisp
chops_ has quit [Changing host]
jon_atack has joined #commonlisp
jonatack has quit [Ping timeout: 244 seconds]
slyrus has joined #commonlisp
chops_ has quit [Ping timeout: 260 seconds]
slyrus has quit [Ping timeout: 265 seconds]
rkazak has quit [Ping timeout: 265 seconds]
chops_ has joined #commonlisp
chops_ has quit [Changing host]
chops_ has joined #commonlisp
chops_ has quit [Ping timeout: 276 seconds]
slyrus has joined #commonlisp
slyrus has quit [Ping timeout: 265 seconds]
chops_ has joined #commonlisp
chops_ has joined #commonlisp
chops_ has quit [Changing host]
eddof13 has joined #commonlisp
eddof13 has quit [Client Quit]
chops_ has quit [Ping timeout: 252 seconds]
rkazak has joined #commonlisp
mwnaylor has quit [Remote host closed the connection]
chops_ has joined #commonlisp
chops_ has quit [Changing host]
chops_ has joined #commonlisp
mwnaylor has joined #commonlisp
triffid has quit [Remote host closed the connection]
pfdietz has quit [Quit: Client closed]
slyrus has joined #commonlisp
rkazak has quit [Ping timeout: 260 seconds]
random-nick has quit [Ping timeout: 248 seconds]
bjorkintosh has joined #commonlisp
bjorkintosh has joined #commonlisp
brokkoli_originl has quit [Ping timeout: 265 seconds]
rkazak has joined #commonlisp
shawnw has quit [Ping timeout: 272 seconds]
brokkoli_origin has joined #commonlisp
chops_ has quit [Ping timeout: 248 seconds]
chops_ has joined #commonlisp
chops_ has quit [Changing host]
chops_ has joined #commonlisp
chops_ has quit [Ping timeout: 248 seconds]
rkazak has quit [Ping timeout: 265 seconds]
slyrus has quit [Ping timeout: 252 seconds]
rkazak has joined #commonlisp
chops_ has joined #commonlisp
chops_ has quit [Changing host]
chops_ has joined #commonlisp
dinomug has quit [Remote host closed the connection]
shmorg83 has joined #commonlisp
slyrus has joined #commonlisp
slyrus has quit [Ping timeout: 252 seconds]
chops_ has quit [Ping timeout: 252 seconds]
rkazak has quit [Ping timeout: 248 seconds]
chops_ has joined #commonlisp
chops_ has quit [Changing host]
chops_ has joined #commonlisp
rkazak has joined #commonlisp
dostoevsky has quit [Remote host closed the connection]
Pixel_Outlaw has quit [Remote host closed the connection]
rkazak has quit [Ping timeout: 252 seconds]
unlucy has quit [Ping timeout: 260 seconds]
unlucy has joined #commonlisp
delyan_ has quit [Ping timeout: 264 seconds]
delyan_ has joined #commonlisp
slyrus has joined #commonlisp
slyrus has quit [Ping timeout: 252 seconds]
slyrus has joined #commonlisp
shmorg83 has quit [Ping timeout: 252 seconds]
rkazak has joined #commonlisp
mari-estel has joined #commonlisp
slyrus has quit [Ping timeout: 260 seconds]
vardhan has joined #commonlisp
slyrus has joined #commonlisp
chops_ has quit [Ping timeout: 276 seconds]
shawnw has joined #commonlisp
slyrus has quit [Ping timeout: 252 seconds]
rkazak has quit [Ping timeout: 265 seconds]
chops_ has joined #commonlisp
chops_ has quit [Changing host]
chops_ has joined #commonlisp
decweb has quit [Ping timeout: 248 seconds]
triffid has joined #commonlisp
slyrus has joined #commonlisp
slyrus has quit [Ping timeout: 276 seconds]
khrbtxyz has quit [Ping timeout: 252 seconds]
trocado has quit [Ping timeout: 252 seconds]
slyrus has joined #commonlisp
slyrus has quit [Ping timeout: 265 seconds]
rkazak has joined #commonlisp
khrbtxyz has joined #commonlisp
wacki has joined #commonlisp
slyrus has joined #commonlisp
chops_ has quit [Ping timeout: 248 seconds]
rkazak has quit [Ping timeout: 260 seconds]
slyrus has quit [Ping timeout: 265 seconds]
mishoo has joined #commonlisp
chops_ has joined #commonlisp
chops_ has quit [Changing host]
chops_ has joined #commonlisp
wacki has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mari37343 has joined #commonlisp
mari-estel has quit [Ping timeout: 265 seconds]
amb007 has quit [Ping timeout: 252 seconds]
slyrus has joined #commonlisp
slyrus has quit [Ping timeout: 252 seconds]
dostoevsky has joined #commonlisp
rkazak has joined #commonlisp
rkazak has quit [Ping timeout: 265 seconds]
amb007 has joined #commonlisp
shawnw has quit [Ping timeout: 252 seconds]
crumbles has quit [Quit: ZNC - https://znc.in]
crumbles has joined #commonlisp
alternateved has joined #commonlisp
rkazak has joined #commonlisp
shka has joined #commonlisp
pve has joined #commonlisp
slyrus has joined #commonlisp
slyrus has quit [Ping timeout: 265 seconds]
amb007 has quit [Ping timeout: 265 seconds]
amb007 has joined #commonlisp
slyrus has joined #commonlisp
slyrus has quit [Ping timeout: 244 seconds]
chops_ has quit [Ping timeout: 252 seconds]
triffid has quit [Remote host closed the connection]
triffid has joined #commonlisp
rkazak has quit [Ping timeout: 244 seconds]
amb007 has quit [Ping timeout: 265 seconds]
amb007 has joined #commonlisp
bendersteed has joined #commonlisp
chops_ has joined #commonlisp
chops_ has quit [Changing host]
chops_ has joined #commonlisp
trocado has joined #commonlisp
mari37343 has quit []
vardhan_ has joined #commonlisp
vardhan has quit [Ping timeout: 244 seconds]
<jackdaniel> that kind of supports my point: incompatible reinventions -- non-adoption, defensive programming need -- nuisance without real use
amb007 has quit [Ping timeout: 265 seconds]
vardhan__ has joined #commonlisp
amb007 has joined #commonlisp
thuna` has joined #commonlisp
vardhan_ has quit [Ping timeout: 272 seconds]
AverageJoe has joined #commonlisp
rkazak has joined #commonlisp
mgl_ has joined #commonlisp
kiyafirs has joined #commonlisp
AverageJoe has quit [Quit: Client closed]
GalaxyNova has joined #commonlisp
King_julian has joined #commonlisp
pkal has quit [Read error: Connection reset by peer]
pkal has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
slyrus has joined #commonlisp
rkazak has quit [Ping timeout: 265 seconds]
King_julian has quit [Ping timeout: 252 seconds]
kamafam has quit [Ping timeout: 252 seconds]
dino_tutter has joined #commonlisp
chops_ has quit [Ping timeout: 276 seconds]
kamafam has joined #commonlisp
rkazak has joined #commonlisp
kamafam has quit [Ping timeout: 248 seconds]
chops_ has joined #commonlisp
chops_ has quit [Changing host]
chops_ has joined #commonlisp
bendersteed has quit [Quit: bendersteed]
rkazak has quit [Ping timeout: 276 seconds]
GalaxyNova has quit [Ping timeout: 248 seconds]
rkazak has joined #commonlisp
gorignak has quit [Read error: Connection reset by peer]
gorignak has joined #commonlisp
rkazak has quit [Ping timeout: 252 seconds]
chomwitt has joined #commonlisp
slyrus has quit [Ping timeout: 265 seconds]
ebrasca has quit [Read error: Connection reset by peer]
rkazak has joined #commonlisp
mishoo has quit [Ping timeout: 244 seconds]
rkazak has quit [Ping timeout: 252 seconds]
edgar-rft` has joined #commonlisp
slyrus has joined #commonlisp
edgar-rft_ has quit [Ping timeout: 245 seconds]
cage has joined #commonlisp
cage has quit [Excess Flood]
slyrus has quit [Ping timeout: 252 seconds]
rkazak has joined #commonlisp
cage has joined #commonlisp
rtypo has joined #commonlisp
vardhan__ has quit [Remote host closed the connection]
vardhan__ has joined #commonlisp
rtypo has quit [Read error: Connection reset by peer]
rtypo has joined #commonlisp
chops_ has quit [Ping timeout: 248 seconds]
yaneko has joined #commonlisp
chomwitt has quit [Ping timeout: 265 seconds]
chops_ has joined #commonlisp
chops_ has quit [Changing host]
chops_ has joined #commonlisp
rkazak has quit [Ping timeout: 252 seconds]
slyrus has joined #commonlisp
vardhan__ has quit [Remote host closed the connection]
varjag has joined #commonlisp
pabs3 has quit [Read error: Connection reset by peer]
pabs3 has joined #commonlisp
rkazak has joined #commonlisp
mgl_ has quit []
yitzi has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
mgl has joined #commonlisp
mange has quit [Quit: Zzz...]
rkazak has quit [Ping timeout: 265 seconds]
fugata has left #commonlisp [#commonlisp]
mwnaylor has quit [Ping timeout: 260 seconds]
chops_ has quit [Ping timeout: 248 seconds]
cage has quit [Remote host closed the connection]
fugata has joined #commonlisp
aadcg has joined #commonlisp
chops_ has joined #commonlisp
chops_ has quit [Changing host]
chops_ has joined #commonlisp
slyrus has quit [Ping timeout: 244 seconds]
rkazak has joined #commonlisp
amb007 has quit [Ping timeout: 244 seconds]
slyrus has joined #commonlisp
amb007 has joined #commonlisp
slyrus has quit [Ping timeout: 252 seconds]
rkazak has quit [Ping timeout: 252 seconds]
King_julian has joined #commonlisp
slyrus has joined #commonlisp
yaneko has quit [Quit: The Lounge - https://thelounge.chat]
slyrus has quit [Ping timeout: 265 seconds]
rkazak has joined #commonlisp
yaneko has joined #commonlisp
yaneko has quit [Client Quit]
<jackdaniel> it is always fun to read the source code and /deduce/ the bug, and then successfully construct a test case
yaneko has joined #commonlisp
yaneko has quit [Client Quit]
yaneko has joined #commonlisp
mi6x3m has joined #commonlisp
decweb has joined #commonlisp
<mi6x3m> hey, could anyone help me locate a package called "type-i" that https://github.com/guicho271828/trivia needs?
<ixelp> GitHub - guicho271828/trivia: Pattern Matcher Compatible with Optima
<mi6x3m> it's here https://github.com/guicho271828/trivia/blob/master/trivia.balland2006.asd#L6 and I have no idea where to search
<ixelp> trivia/trivia.balland2006.asd at master · guicho271828/trivia · GitHub
<beach> A package or a system?
<mi6x3m> it's a system, I found it https://github.com/guicho271828/type-i, for whatever reason it was not indexed by my search engine
<ixelp> GitHub - guicho271828/type-i: Type Inference Utility on unary type-checking predicates
yaneko has quit [Quit: The Lounge - https://thelounge.chat]
slyrus has joined #commonlisp
yaneko has joined #commonlisp
slyrus has quit [Ping timeout: 265 seconds]
yaneko has quit [Quit: The Lounge - https://thelounge.chat]
rkazak has quit [Ping timeout: 248 seconds]
chops_ has quit [Ping timeout: 276 seconds]
kiyafirs has quit [Ping timeout: 252 seconds]
mi6x3m has quit [Remote host closed the connection]
chops_ has joined #commonlisp
chops_ has quit [Changing host]
chops_ has joined #commonlisp
slyrus has joined #commonlisp
aadcg has quit [Ping timeout: 252 seconds]
rkazak has joined #commonlisp
bjorkintosh has quit [Ping timeout: 260 seconds]
fugata is now known as contrapunctus
contrapunctus is now known as fugata
pfdietz has joined #commonlisp
rkazak has quit [Ping timeout: 276 seconds]
chomwitt has joined #commonlisp
josrr has joined #commonlisp
JuanDaugherty has joined #commonlisp
chops_ has quit [Ping timeout: 276 seconds]
rkazak has joined #commonlisp
King_julian has quit [Ping timeout: 265 seconds]
slyrus has quit [Ping timeout: 248 seconds]
chops_ has joined #commonlisp
chops_ has quit [Changing host]
chops_ has joined #commonlisp
rkazak has quit [Ping timeout: 265 seconds]
slyrus has joined #commonlisp
msv has quit [Remote host closed the connection]
msv has joined #commonlisp
slyrus has quit [Ping timeout: 276 seconds]
manwithluck has quit [Ping timeout: 252 seconds]
bjorkintosh has joined #commonlisp
bjorkintosh has joined #commonlisp
manwithluck has joined #commonlisp
pranav has joined #commonlisp
aadcg has joined #commonlisp
bjorkintosh has quit [Ping timeout: 276 seconds]
aadcg has quit [Ping timeout: 272 seconds]
<thuna`> Is there any utility to having an array dimension be zero? I'm not talking about zero-rank arrays but e.g. arrays of dimensions (4 0 2)
<thuna`> ,(make-array '(4 0 2))
<ixelp> => #3A(() () () ())
<bike> not particularly. i'm sure someone can come up with something goofy but it's basically pub trivia.
rkazak has joined #commonlisp
<thuna`> You can't even call AREF on that array, it seems
varjag has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.3)]
<phoe> you have no valid indices to call AREF with, so, nope
bjorkintosh has joined #commonlisp
bjorkintosh has joined #commonlisp
slyrus has joined #commonlisp
<phoe> they're the degenerate case of array sizes being unsigned integers in the general sense - zero or more
<phoe> an array that contains 4*0*2 elements contains zero elements, even if it still has some meaningful information like its rank or dimensions or UAET
rkazak has quit [Ping timeout: 252 seconds]
eddof13 has joined #commonlisp
rkazak has joined #commonlisp
mi6x3m has joined #commonlisp
<mi6x3m> hey, does anyone know of a utility function / lib that can provide good formatting for the semantic equivalent of (assert (equal list1 list2))
<beach> What kind of formatting are you referring to? Source code indentation? Something else?
<beach> And what is this semantic equivalent you are referring to?
<mi6x3m> So this is a unit test for a piece of code, and I want to get structural info (1 2) is not equal to (1 2 3) maybe
<mi6x3m> (it's a test without a specific framework)
pfdietz has quit [Ping timeout: 240 seconds]
wobbol has quit [Ping timeout: 276 seconds]
<beach> What is wrong with (unless (equal list1 list2) (error "Structural info ~s is not equal to ~s" list1 list2))?
<bike> i mean, most such formatting is going to come from a testing framework... but if you use the extended form of assert you might get a better message from the implementation. i think sbcl does that if you give it the actual places and stuff.
<beach> Or that.
<mi6x3m> oh, yeah, the extended assert
<mi6x3m> thanks
rkazak has quit [Ping timeout: 260 seconds]
slyrus has quit [Ping timeout: 272 seconds]
mishoo has joined #commonlisp
random-nick has joined #commonlisp
kamafam has joined #commonlisp
kamafam has quit [Read error: Connection reset by peer]
rkazak has joined #commonlisp
chops_ has quit [Ping timeout: 276 seconds]
thuna` has quit [Ping timeout: 244 seconds]
slyrus has joined #commonlisp
slyrus has quit [Ping timeout: 252 seconds]
chops_ has joined #commonlisp
chops_ has joined #commonlisp
chops_ has quit [Changing host]
rkazak has quit [Ping timeout: 244 seconds]
chops_ has quit [Ping timeout: 276 seconds]
slyrus has joined #commonlisp
mi6x3m has quit [Ping timeout: 260 seconds]
mgl has quit [Ping timeout: 265 seconds]
eddof13 has quit [Quit: eddof13]
chops_ has joined #commonlisp
chops_ has joined #commonlisp
slyrus has quit [Remote host closed the connection]
JuanDaugherty has quit [Quit: JuanDaugherty]
slyrus has joined #commonlisp
mesaoptimizer is now known as mesaoptimizer0
rkazak has joined #commonlisp
gorignak has quit [Quit: quit]
notzmv has joined #commonlisp
eddof13 has joined #commonlisp
wacki has joined #commonlisp
rkazak has quit [Ping timeout: 248 seconds]
eddof13 has quit [Quit: eddof13]
eddof13 has joined #commonlisp
slyrus has quit [Ping timeout: 265 seconds]
rkazak has joined #commonlisp
olnw has quit [Ping timeout: 240 seconds]
olnw has joined #commonlisp
chops_ has quit [Ping timeout: 248 seconds]
mishoo has quit [Ping timeout: 244 seconds]
slyrus has joined #commonlisp
rkazak has quit [Ping timeout: 252 seconds]
chops_ has joined #commonlisp
chops_ has quit [Changing host]
chops_ has joined #commonlisp
chops_ has quit [Ping timeout: 276 seconds]
slyrus has quit [Ping timeout: 266 seconds]
Lord_of_Life_ has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 248 seconds]
robin has quit [Ping timeout: 276 seconds]
Lord_of_Life_ is now known as Lord_of_Life
chops_ has joined #commonlisp
chops_ has quit [Changing host]
chops_ has joined #commonlisp
robin has joined #commonlisp
olnw has quit [Quit: ZNC - https://znc.in]
rkazak has joined #commonlisp
rkazak has quit [Ping timeout: 265 seconds]
shawnw has joined #commonlisp
slyrus has joined #commonlisp
mesaoptimizer0 is now known as mesaoptimizer
rkazak has joined #commonlisp
rahmanlar has quit [Remote host closed the connection]
rahmanlar has joined #commonlisp
rkazak has quit [Ping timeout: 248 seconds]
amb007 has quit [Ping timeout: 265 seconds]
amb007 has joined #commonlisp
rkazak has joined #commonlisp
rkazak has quit [Ping timeout: 265 seconds]
amb007 has quit [Ping timeout: 265 seconds]
yitzi has joined #commonlisp
rkazak has joined #commonlisp
rkazak has quit [Ping timeout: 265 seconds]
kevingal has joined #commonlisp
amb007 has joined #commonlisp
rkazak has joined #commonlisp
mesaoptimizer is now known as mesaoptimizer0
slyrus has quit [Ping timeout: 265 seconds]
elderK has joined #commonlisp
yaneko has joined #commonlisp
cage has joined #commonlisp
cage has quit [Excess Flood]
cage has joined #commonlisp
slyrus has joined #commonlisp
chops_ has quit [Ping timeout: 272 seconds]
slyrus has quit [Ping timeout: 244 seconds]
slyrus has joined #commonlisp
slyrus has quit [Ping timeout: 244 seconds]
rkazak has quit [Ping timeout: 265 seconds]
chops_ has joined #commonlisp
chops_ has quit [Changing host]
chops_ has joined #commonlisp
Ruby has quit [Ping timeout: 252 seconds]
Ruby2 has joined #commonlisp
slyrus has joined #commonlisp
<fengshaun> is there an icalendar library for common lisp? I can't find one that supports parsing ical files
<elderK> Hey guys, I've got some design and organization questions. I've been working on a small project lately, when I've been able. It's a pattern amtching library, like optima or trivia but much simpler. The goal is just to see if I can implement something like them.
yaneko has quit [Quit: The Lounge - https://thelounge.chat]
<elderK> My first question mostly revolves around packages and name conflicts: Coming from C++, I'm used to being able to overload basically anything and methods having class scope. For instance, if I have two classes (pattern-expander and pattern-macro-expander), each of them can have their own expand method, even though the signatures of those methods are very different.
haoms has joined #commonlisp
<elderK> I see the following three ways to avoid a name conflict here: 1) Make them have the same signature, even though a pattern-expander and pattern-macro-expander may not need to use the same arguments. 2) Have pattern-expander and pattern-macro-expander live in different packages and make use them via package local nicknames. 3) Don't give the methods the same name. Instead of expand, have
<elderK> expand-pattern and expand-pattern-macro.
<elderK> I was wondering which approach is the best in this case. How common is it for classes and associated generics to exist in different packages, solely to avoid name conflicts?
<elderK> As for packages, I was even toying with trying to emulate the scoping that C allows but I imagine this is mostly due to familiarity. That is, I shouldn't write C in CL :P Package-per-file is appealing to me because then I can effectively emulate "file-scope stuff" as in C. But then, that brings a lot of overhead (more defpackage forms, either system-per-directory or package-inferred.)
trocado has quit [Remote host closed the connection]
<elderK> I'll throw another question here, too: When does it make sense to use dynamic variables to pass state to some function rather than passing that state to a function via parameters? In my case, one of my functions takes a fair number of parameters, around 6 or 7. It'd be great if I could cut that down but they do tend to change quite often so, it seems I really do need them.
<elderK> From my perspective, I prefer the parameters because it's easier to test what I write with them. Testing with dynamic variables takes more effort because I have establish those bindings in a let before calling the function I want to test. I also like how the parameters are explicit. That is, I know what state the function needs right from its definition.
<elderK> Thanks in advance for any advice :)
<White_Flame> is there something foiling DEFMETHOD? that would seem to be the obvious first approach
<White_Flame> especially if their signatures are very distinguished
shmorg83 has joined #commonlisp
rkazak has joined #commonlisp
trocado has joined #commonlisp
mesaoptimizer has joined #commonlisp
<White_Flame> and yeah, dynamic bindings are thread-local context, equivalent to passing in implicit parameters. I tend to make (with-* ...) scope macros to establish them for me, and it makes for easier testing syntactically
<elderK> White_Flame: Foiling as in, being a pain? The generics have the same name but different parameter lists, which is why I have an issue. I'd prefer not to give longer names for the generic because you know, convenience. But it seems heavy-handed to put each class / generics in their own package just to avoid collision.
<White_Flame> I tend to switch to dynamic bindings if the parameter doesn't change a lot between consecutive calls
<White_Flame> ah, right, I keep forgetting about that
mwnaylor has joined #commonlisp
wacki has quit [Quit: Textual IRC Client: www.textualapp.com]
cage has quit [Quit: rcirc on GNU Emacs 29.4]
wacki has joined #commonlisp
NotThatRPG has joined #commonlisp
<elderK> Thanks White_Flame :) My intuition is use DVs as you say: Only for stuff that basically remains constant across the entire call chain.
<White_Flame> or something that multiple call chains will use, like *CURRENT-DATABASE-CONNECTION* sort of stuff
rkazak has quit [Ping timeout: 248 seconds]
<elderK> Or perhaps, to add some extra state easily without changing signatures. For instance, one pattern-expander class might implement variable binding in patterns and another might refer to those bindings. I could support that by passing new parameters around but it would be easier just to use dynamic variables since the "current pattern bindings" are used by only two kinds of expanders.
wobbol has joined #commonlisp
<White_Flame> or maybe you can build up some structures or lists that contain some of the parameterized config?
<elderK> You mean what I'd call a "context parameter." I thought of that, too: Instead of say, seven paremters, I pass an object that contains those paramters. The problem is, some parts of that object would change often which would mean I'd have to change whatever "field" I'm messing with but allocate a new context object so that prior version are untouched.
<elderK> Like say, I have a pattern-context object that contains a bindings alist: When I add to that alist, I need to allocate a new context object.
<White_Flame> how many parameters are we talking about here? and what's the domain?
<elderK> That would be cleaner, in terms of passing information around but would produce a lot of garbage.
<elderK> Moment.
mesaoptimizer0 has quit [Quit: nyaa~]
<elderK> I've been working on a pattern matcher thing. The idea is that you can easily define new patterns. A pattern expander is basically just a function that takes some state, such as the raw form of some pattern and translates it to be some code that will be executed to check if the item we're matching against satisfies the pattern.
<elderK> The parameters for say, pattern-expander-expand are as follows: bindings (pattern variables bound to particular parts of an expression), lexical-environment (the environment the top-level macro is being expanded in, so we can use constantp), expander (the actual expander that's expanding the pattern. Needed for specialization), next (a function that is called to generate the future. I.e. When
<elderK> we have generated code for this pattern, we call next to generate the code for the next parts of the pattern), pattern-environment (a pattern environment is just a fancy hash table mapping strings to pattern-expander instances) and subpatterns (if we have a pattern list (list a b c), a b and c would be subpatterns.)
<elderK> A pattern macro is basically a pattern that expands to another pattern, rather than a pattern that expands to code to check if something matches a pattern. A pattern macro doesn't require anywhere near as much state to be expanded.
chops_ has quit [Ping timeout: 252 seconds]
<elderK> All expand-pattern-macro needs is basically expander and subpatterns. expander because it lets us specialize and subpatterns so we can manipulate the raw pattern's forms. Instead of returning code, it just returns a new pattern to be translated which might itself be another pattern macro.
ajf has quit [Remote host closed the connection]
<elderK> White_Flame: Hopefully that helps :
<White_Flame> if the main question is about parameters on compiling the pattern, then you don't have to worry about cost at all
<White_Flame> it's only the actual match that you'd want to avoid allocations
<White_Flame> and if that's codegen, then you don't have to worry about syntactic clunkiness there
<elderK> Clunkiness being how big the parameter list is?
<White_Flame> right
<White_Flame> if no human ever has to interact with those raw calls
<elderK> Right but it annoys me from an aesthetic perspective :P I also try to keep lines <= 80. It is hard to do with descriptive names, which is why overloading becomes importnat.
<elderK> I'd also like to learn the convention for breaking parameter lists across lines. I tend to use three two styles, depending on the situation.
<White_Flame> use hit the enter key and let emacs indent them
<White_Flame> s/use/just/
<elderK> I use Vim with SlimV.
<elderK> I tried Emacs, even took a week to set it up nice but evil doesn't seem work properly with sly or slime, in certain cases.
<elderK> :( So that put me off.
<White_Flame> also depending on your syntactic style, you might be able to have a large body with nested closures to wrangle visibility of all these many parameters as they change
<White_Flame> but if this relies on method dispatch, maybe not
chops_ has joined #commonlisp
chops_ has quit [Changing host]
chops_ has joined #commonlisp
<elderK> Aye, my thoughts too: No generic-flet :(
<elderK> I could have a bind macro to you know, curry functions in a nice way but that would only get me so far.
<elderK> I have more questions too but I have to take a break: I need to review a colleague's MR.
<elderK> Thank you for your advice, White_Flame. Keep it coming :) I'll be back soon :D
slyrus has quit [Ping timeout: 244 seconds]
Ruby has joined #commonlisp
Ruby2 has quit [Ping timeout: 244 seconds]
shmorg83 has quit [Ping timeout: 248 seconds]
rkazak has joined #commonlisp
haoms has left #commonlisp [#commonlisp]
slyrus has joined #commonlisp
chomwitt has quit [Quit: WeeChat 3.8]
rkazak has quit [Ping timeout: 265 seconds]
slyrus has quit [Ping timeout: 260 seconds]
josrr has quit [Remote host closed the connection]
rkazak has joined #commonlisp
amb007 has quit [Ping timeout: 265 seconds]
pve has quit [Quit: leaving]
slyrus has joined #commonlisp
chops_ has quit [Ping timeout: 248 seconds]
slyrus has quit [Ping timeout: 248 seconds]
screwlisp has joined #commonlisp
chops_ has joined #commonlisp
chops_ has quit [Changing host]
chops_ has joined #commonlisp
chops_ has quit [Ping timeout: 248 seconds]
rkazak has quit [Ping timeout: 265 seconds]
amb007 has joined #commonlisp
shka has quit [Quit: Konversation terminated!]
rkazak has joined #commonlisp
aadcg has joined #commonlisp
chops_ has joined #commonlisp
chops_ has quit [Changing host]
chops_ has joined #commonlisp
<aadcg> please allow me to spread the news about Nyxt, a web browser written in CL
<ixelp> Nyxt browser: release-4.0.0-pre-release-1.org
slyrus has joined #commonlisp
<bjorkintosh> nice one aadcg
chops_ has quit [Ping timeout: 276 seconds]
bjorkintosh has quit [Remote host closed the connection]
bjorkintosh has joined #commonlisp
bjorkintosh has joined #commonlisp
bjorkintosh has quit [Changing host]
mwnaylor has quit [Ping timeout: 248 seconds]
rkazak has quit [Ping timeout: 272 seconds]
notzmv has quit [Ping timeout: 265 seconds]
wacki has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
chops_ has joined #commonlisp
chops_ has quit [Changing host]
chops_ has joined #commonlisp
aadcg has left #commonlisp [Killed buffer]
Pixel_Outlaw has joined #commonlisp
alternateved has quit [Remote host closed the connection]
rkazak has joined #commonlisp
eddof13 has quit [Quit: eddof13]
eddof13 has joined #commonlisp
drewjose has left #commonlisp [bye]
amb007 has quit [Ping timeout: 265 seconds]
dino_tutter has quit [Ping timeout: 265 seconds]
amb007 has joined #commonlisp
rkazak has quit [Ping timeout: 248 seconds]
mwnaylor has joined #commonlisp
drbdf has joined #commonlisp
drbdf has quit [Ping timeout: 252 seconds]
chum-cha has joined #commonlisp
shmorg83 has joined #commonlisp
rkazak has joined #commonlisp
chops_ has quit [Ping timeout: 252 seconds]
chops_ has joined #commonlisp
chops_ has quit [Changing host]
chops_ has joined #commonlisp