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/> | News: ELS'22 this Monday (2022-03-21), see https://european-lisp-symposium.org
karlosz has quit [Quit: karlosz]
random-nick has quit [Ping timeout: 252 seconds]
pranavats has left #commonlisp [Error from remote client]
beach has quit [Ping timeout: 248 seconds]
aulapatiencep has joined #commonlisp
hashfuncd0e has quit [Ping timeout: 240 seconds]
pranavats has joined #commonlisp
akoana has quit [Quit: leaving]
aulapatiencep has quit [Remote host closed the connection]
aartaka has joined #commonlisp
lisp123 has joined #commonlisp
<lisp123> after some lisp code is loaded into an image
<lisp123> does it make a difference if it was from a compiled file .fasl or a normal .lisp?
<lisp123> sbcl
<Bike> sbcl compiles basically everything, so it'll be about the same either way
<Bike> some other implementations do not, so the fasl will have compiled code rather than interpreted code, and will hopefully be more efficient
<lisp123> thats what I thought - thanks for confirming
<lisp123> was wondering if once code was loaded in the 'lisp' it made any difference -> but I guess interpreted code still needs to re-interpreted in other systems
Bike has quit [Quit: Lost terminal]
Bike6 has joined #commonlisp
Bike6 is now known as Bike
euandreh has quit [Quit: WeeChat 3.5]
<Nilby> lisp123: but of course things like eval-when can change that. consider: https://plaster.tymoon.eu/view/3143#3143
<lisp123> Nilby: I see
<Nilby> lisp123: all of load, compile-file, then again load the fasl will be different
<Nilby> thankfully most code doesn't do that
<lisp123> yep
<Bike> the language defines that for the most part, compiled and interpreted code have the same semantics. eval-when is one of the exceptions.
Lord_Nightmare has quit [Quit: ZNC - http://znc.in]
aartaka has quit [Ping timeout: 248 seconds]
<lisp123> Yep
Lord_Nightmare has joined #commonlisp
aartaka has joined #commonlisp
Guest743 has quit [Quit: Connection closed]
sander has quit [Quit: So long! :)]
ahc has joined #commonlisp
sander has joined #commonlisp
aartaka has quit [Ping timeout: 248 seconds]
WBarends has quit [Ping timeout: 240 seconds]
leeb has joined #commonlisp
aartaka has joined #commonlisp
aartaka has quit [Ping timeout: 260 seconds]
beach has joined #commonlisp
aartaka has joined #commonlisp
terrorjack has quit [Quit: The Lounge - https://thelounge.chat]
terrorjack has joined #commonlisp
ahc has quit [Quit: Client closed]
aartaka has quit [Ping timeout: 240 seconds]
<beach> Good morning everyone!
yauhsien has joined #commonlisp
aartaka has joined #commonlisp
aartaka has quit [Ping timeout: 240 seconds]
aartaka has joined #commonlisp
aartaka has quit [Ping timeout: 248 seconds]
Bike has quit [Quit: Connection closed]
saturn2 has quit [Ping timeout: 246 seconds]
slowButPresent has quit [Quit: ERC 5.4 (IRC client for GNU Emacs 28.1)]
clone_of_saturn has joined #commonlisp
aartaka has joined #commonlisp
clone_of_saturn is now known as saturn2
yauhsien has quit [Ping timeout: 260 seconds]
z4kz has quit [Quit: WeeChat 3.5]
zak1 has joined #commonlisp
zak1 is now known as z4kz
aartaka has quit [Ping timeout: 248 seconds]
Josh_2 has quit [Remote host closed the connection]
Josh_2 has joined #commonlisp
aartaka has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
aartaka has quit [Ping timeout: 252 seconds]
aartaka has joined #commonlisp
Mandus has quit [Ping timeout: 246 seconds]
Mandus has joined #commonlisp
aartaka has quit [Ping timeout: 260 seconds]
Mandus has quit [Ping timeout: 248 seconds]
Mandus has joined #commonlisp
aartaka has joined #commonlisp
trev has joined #commonlisp
schjetne has quit [Ping timeout: 240 seconds]
aartaka has quit [Ping timeout: 252 seconds]
bilegeek has joined #commonlisp
Josh_2 has quit [Remote host closed the connection]
Josh_2 has joined #commonlisp
aartaka has joined #commonlisp
aeth has quit [Ping timeout: 260 seconds]
aeth has joined #commonlisp
aartaka has quit [Ping timeout: 248 seconds]
aartaka has joined #commonlisp
aartaka has quit [Ping timeout: 240 seconds]
aartaka has joined #commonlisp
elderK has joined #commonlisp
schjetne has joined #commonlisp
Guest84 has joined #commonlisp
Guest84 has quit [Remote host closed the connection]
Guest84 has joined #commonlisp
pfd has quit [Ping timeout: 252 seconds]
Guest84 has quit [Remote host closed the connection]
Guest84 has joined #commonlisp
Guest84 has quit [Remote host closed the connection]
aeth has quit [Ping timeout: 240 seconds]
aeth has joined #commonlisp
problemkatze has joined #commonlisp
trev has quit [Quit: trev]
problemkatze has quit [Ping timeout: 248 seconds]
problemkatze has joined #commonlisp
problemkatze has quit [Ping timeout: 240 seconds]
problemkatze has joined #commonlisp
rotateq has joined #commonlisp
xaotuk has joined #commonlisp
problemkatze has quit [Ping timeout: 240 seconds]
problemkatze has joined #commonlisp
xaotuk has quit [Ping timeout: 248 seconds]
problemkatze has left #commonlisp [#commonlisp]
yauhsien has joined #commonlisp
trev has joined #commonlisp
xaotuk has joined #commonlisp
elderK has quit [Quit: Connection closed for inactivity]
yauhsien has quit [Remote host closed the connection]
yauhsien has joined #commonlisp
yauhsien has quit [Ping timeout: 240 seconds]
bilegeek has quit [Quit: Leaving]
cognemo_ has quit [Quit: ZNC 1.8.2 - https://znc.in]
cognemo has joined #commonlisp
frgo has joined #commonlisp
WBarends has joined #commonlisp
problemkatze has joined #commonlisp
problemkatze has quit [Client Quit]
jmdaemon has quit [Ping timeout: 240 seconds]
shka has joined #commonlisp
Arthur_ has quit [Ping timeout: 240 seconds]
kpoeck has joined #commonlisp
random-nick has joined #commonlisp
kpoeck has quit [Quit: Client closed]
causal has quit [Quit: WeeChat 3.5]
tyson2 has joined #commonlisp
orestarod has joined #commonlisp
pillton has quit [Quit: ERC 5.4 (IRC client for GNU Emacs 28.1)]
VGaranja has joined #commonlisp
lisp123 has quit [Remote host closed the connection]
Lord_of_Life_ has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 240 seconds]
Lord_of_Life_ is now known as Lord_of_Life
random-nick has quit [Ping timeout: 252 seconds]
Josh_2 has quit [Remote host closed the connection]
Josh_2 has joined #commonlisp
pfd has joined #commonlisp
Oddity has quit [Ping timeout: 248 seconds]
random-nick has joined #commonlisp
aartaka has quit [Ping timeout: 252 seconds]
aartaka has joined #commonlisp
Sankalp- has joined #commonlisp
Sankalp has quit [Ping timeout: 240 seconds]
Sankalp- is now known as Sankalp
Bike has joined #commonlisp
aartaka has quit [Ping timeout: 240 seconds]
aartaka has joined #commonlisp
xaotuk has quit [Ping timeout: 252 seconds]
xaotuk has joined #commonlisp
utis has quit [Ping timeout: 256 seconds]
xaotuk has quit [Ping timeout: 240 seconds]
utis has joined #commonlisp
slowButPresent has joined #commonlisp
<rotateq> I had a CLOS question in mind recently, but then I realized it was again easier than I thought. :) Just how to use FIND-METHOD correctly if a parameter in the lambda list is specialised with eql.
Arthur has joined #commonlisp
Arthur has quit [Changing host]
Arthur has joined #commonlisp
waleee has quit [Ping timeout: 260 seconds]
Guest74 has joined #commonlisp
Josh_2 has quit [Remote host closed the connection]
Josh_2 has joined #commonlisp
Josh_2 has quit [Remote host closed the connection]
Josh_2 has joined #commonlisp
WBarends has quit [Ping timeout: 260 seconds]
utis has quit [Ping timeout: 248 seconds]
<mfiano> Hello all
<mfiano> I am working with a function that calls externals OS processes and returns a string as the result. This string consists of substrings delimited by tab characters and terminated by newline characters. What would be a decent way to produce a list of lists from this string, where each inner list represents the string cells of each column for a row, and the outer list contains these lists of rows?
utis has joined #commonlisp
cage has joined #commonlisp
<_death> fare-csv?
<mfiano> I can think of a few ways, but I'm looking for ideas anyway
<mfiano> I never thought to use a csv parser, in part because I didn't know they supported other delimiters.
<_death> this specimen seems like it's of a family of formats are usually known as tsv (tab-separated values), analogous to csv
<mfiano> Ok I will see what I can find as to not reinvent the wheel
<mfiano> (The command I am calling has a switch that removes the first line of column names and transforms arbitrary numbers of whitespace to single tabs)
<mfiano> It's meant for easier machine readability, though I do have the option of not using that switch if it makes it easier for Lisp
<mfiano> I'm reviving a few thousand line shell script I wrote about 6 months ago, but it outgrew my least favorite host language and is very hard to maintain.
<Guest74> there are some data table libraries out there, but afair they parse to their own format.
<mfiano> My plan is to parse this data (and other output) into standard-objects, because it can benefit greatly be inheritance and generic dispatch.
<mfiano> s/be/by/
<mfiano> I'm using a nice wrapper over uiop:run-program that has nice conditions to handle in the event of a failure, instead of all the garbage-in/garbage-out bugs in my original shell script.
<Guest74> after seeing what was inside of the csv libraries, I just basically use read-line and split-sequence.
<Guest74> shin seems to have a well thought out wrapper.
<mfiano> link?
<mfiano> I'll compare it to what I am using currently.
<Guest74> i wrap sbcl's run-program because I don't like its synchronous nature.
<mfiano> uiop:launch-program is uiop:run-program for asynchronous nature
<Guest74> I can't remember the name of his library.  I reading some other library that uses it, and can't remember that one either.  I really hate this covid.
<Guest74> ah simple-inferiors i believe.  but it doesn't seem to do much error handling.
<Guest74> then again, I usually leave the error handling to the specific project.
<mfiano> Yeah I asked him about it. It also doesn't handle pipelining, which the current library I'm using does.
kpoeck has joined #commonlisp
<Guest74> I thought of pipelining, but then I didn't quite see the benefit.
<mfiano> Anyway, to answer my original question, I'm just using read-line and uiop:split-string
<mfiano> Works good for the first parsing pass.
<Guest74> I haven't found a need for anything more to just get the data in.
<Nilby> sorry i know it doesn't help, but this is how i do it: (view-table (read-table (!! "program") :style +tsv+ :guess-types t))
<Guest74> though because of AoC I've got it set up to allow transforming the data
aartaka has quit [Ping timeout: 240 seconds]
<Guest74> where's your package prefixes Nilby?
aartaka has joined #commonlisp
fitzsim has joined #commonlisp
aartaka has quit [Ping timeout: 248 seconds]
aartaka has joined #commonlisp
<Nilby> package prefixes portend people perchance perturbing package pieces
<Guest74> well you were certainly right about the not helping part!
* Nilby will henceforth again try to refrain from similar useless commentary
<Guest74> it is your fate to fail in your mission.
<Guest74> So, what's the package/system you use Nilby?  I'm always looking for a good table.
tyson2 has quit [Remote host closed the connection]
<Nilby> they are a massive tangled profusion of packges of bespoke and ramshackle nature, unfortunately entrenched in their own enclave
<Nilby> that stupid line to read and view a table probably has like 100 package dependencies
jmes has quit [Remote host closed the connection]
yauhsien has joined #commonlisp
<Guest74> You got me beat.  maybe I need more abstractions?
<Nilby> it's mostly not abstractions. unfortunately one can find such weird lisp software hives like this through history. mostly they don't get the critical mass or quality, to be widely used
leeb has quit [Ping timeout: 240 seconds]
<Guest74> i think they usually don't get exposed .
<Guest74> Where's your stuff live?
ebrasca has joined #commonlisp
aartaka has quit [Ping timeout: 248 seconds]
aartaka has joined #commonlisp
Guest74 has quit [Quit: Connection closed]
trev has quit [Remote host closed the connection]
Devon has quit [Read error: Connection reset by peer]
Bike has quit [Quit: Connection closed]
yauhsien has quit [Remote host closed the connection]
yauhsien has joined #commonlisp
<mfiano> Has anyone any reference apart from AMOP on how to add additional slot options to a class via a metaclass? I would like to add a :encoder and :decoder slot option, that decides on how slot values are serialized and deserialized when parsing/unparsing.
yauhsien has quit [Remote host closed the connection]
yauhsien has joined #commonlisp
Inline has quit [Remote host closed the connection]
Inline has joined #commonlisp
yauhsien has quit [Ping timeout: 240 seconds]
kpoeck has quit [Ping timeout: 252 seconds]
Bike has joined #commonlisp
aartaka has quit [Ping timeout: 260 seconds]
aartaka has joined #commonlisp
dra has joined #commonlisp
<mfiano> In reading the MOP a bit, I found the way to do this is to create specialized instances of direct-slot-definition-class and effective-slot-definition-class, and define methods for them that return those classes. However, I am a bit confused in that these generic functions have a single argument to specialize, the class to add these new slot definitions to. I therefor am unsure how to add _two_
<mfiano> new slot definitions to a class.
<mfiano> Can anyone help me out here?
<Bike> i am not sure what you mean. neither of those generic functions add slots to any classes. they just indicate what the classes of slot definitions should be.
<mfiano> I would like a class to have two new additional slot options, such as the slot specification (foo :reader foo :initarg :foo :encoder #'some-encoder :decoder #'some-decoder)
<Bike> mop effective-slot-definition-class
<Bike> okay. i mean, you can put both of those in your slot definition class.
<mfiano> Ok, do I have to subclass both standard-direct-slot-definition and standard-effective-slot-definition classes with the same body?
<Bike> you can have (defclass my-slot-definition (standard-slot-definition) ((%encoder ...) (%decoder ...))) and then have your my-direct-slot-definition and my-effective-slot-definition be subclasses of that
<mfiano> Ok so multiple superclasses for my-direct-slot-definitio?
<Bike> Sure. organizing this is just like organizing any other classes
<mfiano> I am unsure where to put the supers standard-direct-slot-definition and standard-effective-slot-definition
<mfiano> Ok, I'm starting to see.
<Bike> I don't think the order of superclasses will really matter
<Bike> unless you're doing something much more exotic than you are, you should probably have your direct slot def class inherit from standard-dsd, and your effective from standard-esd, and you can have them both inherit from the class with the %encoder and %decoder slots to save some typing
<mfiano> I will admit, I never used the MOP before to extend slot definitions, just trivial metaclasses. This is new and fun to learn.
dra has quit [Quit: Leaving]
dra has joined #commonlisp
<mfiano> Bike: Is this what you were talking about? https://gist.github.com/mfiano/b824a68c58d72501afd5fca6005e66e8
<Bike> yeah, i think that's about right
jmdaemon has joined #commonlisp
<mfiano> I am getting an error
<Bike> iirc you'll have to specialize computer-effective-slot-definition or something
<mfiano> When I instantiate FOO
<Bike> mop compute-effective-slot-definition
<mfiano> err when I define the FOO class
<mfiano> #<STANDARD-CLASS SNAPZ::ZFS-PROPERTY-CLASS> and
<mfiano> #<STANDARD-CLASS COMMON-LISP:STANDARD-CLASS> are incompatible.
<mfiano> even though I validate them as compatible. What did I do wrong?
<Bike> did you compile-file this? it might have tried to define the class before the method was loaded.
<mfiano> Yeah I loaded the whole file with slime-load-file which is about the same.
<mfiano> Restarted image and redefined FOO afterwards with the same incompatibility error
aartaka has quit [Ping timeout: 248 seconds]
<Bike> oh wait, sorry
<Bike> you didn't specify a metaclass for FOO, so it's standard-class
<Bike> but it's a subclass of a zfs-property-class, ergo, a problem
<mfiano> Oh I have to repeat that for every subclass of a custom metaclass class?
<Bike> You need to specify the metaclass, yes. since the metaclass can influence how inheritances work, it's necessarily prior
<mfiano> Hmm anyway to inherit the metaclass of a parent?
aartaka has joined #commonlisp
<Bike> No, because of what I just said
<mfiano> I see
<mfiano> Ok I'm not seeing my new slot definitions in the class-of foo
jmd_ has joined #commonlisp
<Bike> (class-of (find-class 'foo)) will be zfs-property-class, which is not a zfs-property-class
<Bike> try (class-slots (find-class 'foo)), you should see zfs-property-effective-slot-definitions
<Bike> however they will not have the information you want until you define a compute-effective-slot-definition method
jmdaemon has quit [Ping timeout: 252 seconds]
<mfiano> I only see %A
<Bike> okay, but i mean what is the class of the %a slot definition?
<Bike> there shouldn't be any other slots, since foo doesn't have any other slots
<mfiano> Oh I see. Yes that is the correct class, but the meta slots are unbound. I have more to learn it seems with regard to compute-*-slot-definition
<mfiano> Wow lots of boilerplate here for a simple task. I have to learn how to do this so I can abstract it away for similar things to do for other classes.
<Bike> Yeah it's a bit involved
<Bike> I think the only missing piece you need is compute-effective-slot-definition
<mfiano> Thanks, reading about that now
<Bike> what that function does is take all the direct slot definitions from the class precedence list, and combine them together into an effective slot definition
<Bike> This is necessary because there's no obvious way to combine inherited slot information; even the standard slot options inherit in all kinds of different ways http://www.lispworks.com/documentation/lw70/CLHS/Body/07_ec.htm
<Bike> it's been a while, but iirc your method should do call-next-method and then set the metadata slots in the result appropriately
<mfiano> I see. So once I do all of this, what is the correct way to query the encoder/decoder functions of one of my leaf class instances?
<Bike> You get at the slot definition (e.g. through class-slots) and then use your ENCODER and DECODER accessors
<Bike> let me see if i can't get an example for you
<mfiano> Ok thanks
<Bike> https://github.com/yitzchak/common-lisp-jupyter/blob/master/src/widgets/traits.lisp#L33-L73 here's some code in cl jupyter that defines a new slot class
<mfiano> Ah nice
tyson2 has joined #commonlisp
<Bike> in this case, the inheritance rules are simple: the most recent wins. your encoder and decoder might work the same way
<Bike> also, iirc, you might have problems specifying them in the way you do. i don't think the slot definition initargs are evaluated, so the direct slots will just have the list (FUNCTION IDENTITY) instead of an actual function
<mfiano> Hmm interesting
treflip has joined #commonlisp
<mfiano> I'm not quite sure what they are doing there with #'some etc
<mfiano> I'm not sure what to set the value of the slot to
<Bike> i think i ran into this in my initial version of this cl jupyter code (it has since been totally rewritten by yitzi) which had observer functions, and i just had it take symbols instead. so you'd write :observer foo instead of :observer #'foo
<mfiano> I will go read the MOP on that GF some more
<Bike> well, basically, imagine you have a class foo that defines (%a :encoder #'x), and then a class bar that defines (%a :encoder #'y), and then say bar inherits from foo
<Bike> what should be the encoder of %a in bar?
<Bike> this cl jupyter code just takes the most specific (so in this case it would be #'y)
<mfiano> Well in my case there won't ever be subclasses of a zfs-property class, but I would expect the deepest subclass to win in almost all cases.
<Bike> the GF receives the direct slots in class precedence order, so using SOME like this is kosher
<Bike> given that TRAIT-TYPE will just return nil if none was specified
<mfiano> Seems it is evaluated
<Bike> ah, no
<Bike> if it was, you'd be seeing #<FUNCTION IDENTITY>
<mfiano> Ah true
<mfiano> So if I wanted it to behave like any other initarg value, how would I accomplish that?
kpoeck has joined #commonlisp
<mfiano> I might want to pass a form that evaluates to a function...
<Bike> well, the others have funny behavior as well. like if you have an :initarg, it's not evaluated right off, it's saved and then evaluated each time you instantiate an instance
<Bike> I don't think you can change the behavior of the defclass macro to make it be evaluated like you want, unfortunately
<Arthur> I ended up hacking together some c2mop:compute-effective-slot-definition stuff when encountering the #'fn non-evaluated slot inits over in https://github.com/arthev/spiclum/blob/master/src/prevalence-class.lisp, maybe there are better ways
<Bike> you can ofc define your own defclass macro, but that can be sort of a pain in its own way
<mfiano> Can I use the mop to get a single class slot, or do I have to use #'find or whatnot?
<Bike> What do you mean by a single class slot
<Bike> if you mean you want to get a particular slot definition from a class, you do need to use find or something yeah
<Bike> (find slot-name (class-slots whatever) :key #'slot-definition-name)
<mfiano> instead of #'c2mop:class-slots <class> -> list, something like #'foo:class-slot <class> <slot-name> -> #<esd>
<Bike> yeah, nope
<mfiano> Ok fair enough
<mfiano> Ok everything is working as I'd expect. Thanks for your help!
<Bike> happy to be of assistance
<mfiano> THe MOP always impresses me at its flexibility at the cost of boilerplate. It's to CLOS as macros are to code. Not much you can't do with CL with those two powers combined :)
waleee has joined #commonlisp
Bike has quit [Quit: Connection closed]
Bike has joined #commonlisp
causal has joined #commonlisp
aartaka has quit [Ping timeout: 252 seconds]
Arthur is now known as cl-arthur
attila_lendvai has joined #commonlisp
ec has joined #commonlisp
trev has joined #commonlisp
cage has quit [Quit: rcirc on GNU Emacs 27.1]
cl-arthur has quit [Ping timeout: 240 seconds]
Arthur has joined #commonlisp
<trev> does anyone know a plugin for emacs where you can basically hover over keywords or functions and see docs for them?
<trev> like an LSP sort of thing
<rotateq> trev: Do you know slime and clhs yet?
<trev> i have sly
<rotateq> Okay and the clhs is the official documentation for the ANSI standard.
<trev> i see, i can install that with quicklisp
<trev> quickload*
<mfiano> Anyone know if alexandria or some utility library has a shorthand for (setf (slot-value instance slot-name) (call-some-func (slot-value instance slot-name))) ?
<mfiano> That is more concisely update the value of a slot in terms of its original value?
<Bike> maybe you want a modify macro?
<mfiano> I really dislike symbol macros, and WITH-SLOTS seems overkill here
<Bike> clhs define-modify-macro
<Bike> then you can do (call-some-funcf (slot-value instance slot-name))
<mfiano> Ah ok, I'll check that out
<Bike> (sort of like incf)
<rotateq> mfiano: Heh, symbol macros can be very useful and expressive. :)
<mfiano> They can, but in this case it won't work anyway as slot-name is not known at compile time.
<mfiano> THey can also be a source of serious performance issues if you are evaluating an expensive accessor effective method each read of the symbol.
schjetne has quit [Ping timeout: 252 seconds]
<rotateq> Sure, should be used appropriately.
schjetne has joined #commonlisp
schjetne has quit [Ping timeout: 240 seconds]
trev has quit [Quit: trev]
treflip has quit [Quit: zzzzzzz]
<Bike> now that i'm thinking about it, maybe it would be nice if alexandria or something had a macro like atomic-update but without the atomicity
<Bike> so (incf place) = (update place #'+ 1), etc
Oddity has joined #commonlisp
Inline has quit [Quit: Leaving]
<_death> that's kinda like PG's _f macro in On Lisp.. I don't think it's so nice.. instead I prefer to name the operation, like INCF
Josh_2 has quit [Remote host closed the connection]
schjetne has joined #commonlisp
Josh_2 has joined #commonlisp
waleee has quit [Ping timeout: 248 seconds]
<Alfr> Bike, not in the library, but here: (defun %update (thing fun &rest args) (apply fun thing args)) (define-modify-macro update (fun &rest args) %update)
splatt990 has quit [Quit: Gateway shutdown]
tyson2 has quit [Remote host closed the connection]
dlowe_ has joined #commonlisp
dlowe_ has quit [Changing host]
dlowe_ has joined #commonlisp
waleee has joined #commonlisp
<mfiano> Hmm, maybe this encoder/decoder idea wasn't very well thought out.
<mfiano> Not that I think I'd need to do type-checking considering the stringified source data is coming from the correct application I am parsing into lisp objects, but it makes me wonder if I should anyway.
<mfiano> Like one slot is fed any of "none"i, "available", "unavailable", and encoded as any of :none, :available, :unavailable. But if my program logic is wrong and tries creating an instance with bad data, I have no way to type check.
Guest74 has joined #commonlisp
<mfiano> s/"i/"/
<mfiano> Perhaps encoder and decoder metaobject slot values should be compound forms.
<mfiano> Though not sure if it makes sense to type check decoding if it is symmetric with the input.
* mfiano thinks
<mfiano> I'm also not sure if it even makes sense to specify an :encoder _and_ :decoder slot. The decoder just puts it into the original form it was encoded from. That logic can be derived with a closure or object representing the transcoding method.
analogsalad has joined #commonlisp
<Guest74> with simple things I just wrap the enc/dec up with the definition in a macro.
<mfiano> My plan was to build a CST, producing an AST afterwards to do type-checking/generation phases on. I think I need to sketch out the pipeline better...it might be overly complex like all my compiler theory implementations are :/
analog_salad has joined #commonlisp
analogsalad has quit [Ping timeout: 260 seconds]
<Guest74> I like to make my systems as simple as possible.
<Guest74>   somehow my text adventure engine requires a sentient AI.
analog_salad_ has joined #commonlisp
analog_salad has quit [Ping timeout: 240 seconds]
attila_lendvai has quit [Ping timeout: 248 seconds]
VGaranja has quit [Quit: Leaving]
xaotuk has joined #commonlisp
euandreh has joined #commonlisp
shka has quit [Ping timeout: 248 seconds]
<dlowe_> pay an army of humans to be on the backend
analog_salad_ has quit [Quit: bye]
schjetne has quit [Ping timeout: 248 seconds]
<Guest74> did JSOWN:PARSE change the way it works? my web api stuff stopped working.
tyson2 has joined #commonlisp
jmd_ has quit [Ping timeout: 248 seconds]
xaotuk has quit [Ping timeout: 248 seconds]
kpoeck has quit [Quit: kpoeck]
schjetne has joined #commonlisp
<Guest74> ugh, I hate when you can't interrupt a slime repl.  This is why I shouldn't have my editor in the same process, let alone my window manager.
Guest74 has quit [Quit: Connection closed]
random-nick has quit [Ping timeout: 240 seconds]
xaotuk has joined #commonlisp
schjetne has quit [Ping timeout: 240 seconds]
JoshYoshi has joined #commonlisp
Josh_2 has quit [Ping timeout: 260 seconds]
JoshYoshi has quit [Remote host closed the connection]
JoshYoshi has joined #commonlisp
JoshYoshi has quit [Remote host closed the connection]
xaotuk has quit [Ping timeout: 252 seconds]
orestarod has quit [Ping timeout: 248 seconds]
Devon has joined #commonlisp
splatt990 has joined #commonlisp
akoana has joined #commonlisp
igemnace has joined #commonlisp
lisp123 has joined #commonlisp
lisp123 has quit [Ping timeout: 240 seconds]
Arthur has quit [Ping timeout: 260 seconds]
paulapatience has joined #commonlisp
hashfuncd0e has joined #commonlisp
dra_ has joined #commonlisp
dra has quit [Ping timeout: 240 seconds]
dra_ has quit [Ping timeout: 240 seconds]