lucasb has quit [Quit: Connection closed for inactivity]
beach` has joined #lisp
Jesin has quit [Quit: Leaving]
beach has quit [Ping timeout: 276 seconds]
sjl has joined #lisp
lxpnh98 has quit [Quit: Leaving]
Jesin has joined #lisp
<fiddlerwoaroof>
maven clean instsall
vms14 has joined #lisp
Oladon has joined #lisp
Josh_2 has quit [Ping timeout: 252 seconds]
karlosz has quit [Quit: karlosz]
dgtlcmo has joined #lisp
ArthurStrong has joined #lisp
Hofpfister has joined #lisp
zaquest has quit [Ping timeout: 265 seconds]
Hofpfister has quit [Ping timeout: 268 seconds]
Kevslinger has joined #lisp
q-u-a-n2 has joined #lisp
EvW1 has quit [Ping timeout: 250 seconds]
<White_Flame>
From inside a custom lexing/parsing reader, which is consuming large swathes of the input, how do I indicate up to SLIME where the location of an error is?
<White_Flame>
the keycap set predated it, and was produced by someone else
<White_Flame>
(I'd much rather have onscreen compose tips than a massive keyboard like that)
<White_Flame>
also lol at the space non-bar
<pjb>
dgtlcmo: you should stop worrying about keyboards, and use emacs a little more. The efficiency comes from using emacs efficiently (slime, paredit, abbrev, binding your own keys, etc).
Codaraxis has quit [Read error: Connection reset by peer]
<dgtlcmo>
well, i was scared when i saw a developer at my old job who was an avid emacs user with scards down his wrist from carpal surgery. he even had a kinesis keyboard setup
<White_Flame>
given the amount of non-emacs carpal tunnel out there from desk jockeys of all stripes, I doubt it's emacs-related
<dgtlcmo>
pjb: do you have a particular set of keybindings you use with emacs? what keyboard are you using?
<Shinmera>
What would you do with that? An attempt at a portable TRACE or something?
<luis>
Yes, among other things.
<luis>
It's useful for monkey patching, too. Not that I recommend monkey patching at home.
<scymtym>
Shinmera: this hybrid (deterministic/statistical) profiler uses the encapsulation facility: https://techfak.de/~jmoringe/clamegraph-rewrite-1.ogv (the video doesn't reflect the current state but conveys the basic idea)
<Shinmera>
nice
<Shinmera>
luis: If you make a portability library, let me know so I can add it to the overview.
<luis>
Aye.
ramus has quit [Ping timeout: 250 seconds]
ramus has joined #lisp
Juzzika has joined #lisp
bitmapper has joined #lisp
ebzzry has joined #lisp
amerlyq has joined #lisp
<luis>
SBCL doesn't support tracing flets and labels does it?
<scymtym>
i think ENCAPSULATE would work with the function object, but there is no way to refer to local functions in TRACE
<luis>
scymtym: is there a way to grab the local functions at all?
<Shinmera>
how would you?
<phoe>
upi
<phoe>
I mean uhhh
<phoe>
you'd need to crack the function object to get its references to local functions
<Shinmera>
often the functions might not even be there at all
<scymtym>
i thought something like (labels ((foo ())) (encapsulate #'foo)) could work but ENCAPSULATE seems to assume global functions
<phoe>
e.g. inling and such
<scymtym>
there is also ENCAPSULATE-FUNOBJ (added two weeks ago) which might work, but i haven't looked into it
cosimone has quit [Quit: Terminated!]
rgherdt has joined #lisp
<luis>
phoe: FWIW, Allegro CL supports tracing labels/flet. It seems like it may be only one of the few Lisps that supports that.
<p_l>
in compiled code as well?
milanj has quit [Quit: This computer has gone to sleep]
<phoe>
Has anyone succeeded running the modern ANSI-TEST on CCL?
q[corwin] has quit [Ping timeout: 276 seconds]
Juzzika has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rople has quit [Ping timeout: 265 seconds]
<phoe>
...ooooh. I see now. OK - I've finally managed to run them.
<luis>
p_l: yes.
clothespin has joined #lisp
lucasb has joined #lisp
atgreen__ has quit [Ping timeout: 246 seconds]
anewuser has joined #lisp
jonatack has quit [Ping timeout: 240 seconds]
Bike has joined #lisp
milanj has joined #lisp
amerlyq has quit [Quit: amerlyq]
atgreen__ has joined #lisp
anewuser has quit [Ping timeout: 246 seconds]
matijja has left #lisp ["Killed buffer"]
EvW has joined #lisp
rgherdt has quit [Ping timeout: 268 seconds]
rgherdt has joined #lisp
<lukego>
Hey is anyone else doing Lisp with Nix? I'm open to see tricks and snippets if anybody has them. I've found ql2nix and that seems to work pretty well for making a stable Lisp distro
<Cymew>
Very creative to implement your own distro since you were fed up with existing package managers.
<phoe>
The build overall is supposed to fail, since ANSI-TEST and CCL-TESTS are currently failing.
<phoe>
Cymew: smells like /xkcd standards
enrio has joined #lisp
EvW has joined #lisp
davsebamse has quit [Ping timeout: 240 seconds]
milanj has joined #lisp
bitmapper has joined #lisp
nullman has quit [Ping timeout: 265 seconds]
davsebamse has joined #lisp
nullman has joined #lisp
icov0x29a has joined #lisp
clothespin has quit [Ping timeout: 240 seconds]
jonatack has joined #lisp
jprajzne has quit [Quit: Leaving.]
rgherdt has joined #lisp
shka_ has joined #lisp
clothespin has joined #lisp
edgar-rft has quit [Quit: Leaving]
atgreen__ has quit [Ping timeout: 240 seconds]
mathrick has quit [Ping timeout: 245 seconds]
varjagg has joined #lisp
EvW has quit [Ping timeout: 245 seconds]
rumbler3113 has joined #lisp
<rumbler3113>
alright lispers, coming at you with what is likely a noob question
LiamH has joined #lisp
madage has quit [Remote host closed the connection]
madage has joined #lisp
cosimone has quit [Quit: Terminated!]
sjl_ has joined #lisp
<rumbler3113>
I threw together a freeform datastructure that sorta looks like a parameter list. I was thinking I'd be able to throw in "tags" that have no value into this list, for example '(scan 1 :check "grep this" fix "cat that" :optional)
<rumbler3113>
with the idea that users of the format could throw things in and I'd later be able to check for either assignment to a key or the presence or absence of given tags
<rumbler3113>
I am now coming to realize that I am essentially trying to reimplement destructuring-bind on lambda lists where I am supplying a malformed lambda list
<dlowe>
how would you distinguish between your keys and your tags?
<rumbler3113>
that seems to be the question I haven't answered
<dlowe>
your "tags" could just be keys with T as their value
<rumbler3113>
while it might sound silly, I was hoping to avoid requiring the users to type in the t
<Bike>
...the values?
<rumbler3113>
so I was trying to be loose enough with the input that would allow a user to say something like (there's some special property about this check that I'd like to track" and give them a way of adding say :property1 to the list without needing to say :property1 t
<rumbler3113>
I suppose I could post process the final input and add a t to every unpaired property
<sjl_>
(:a :b :c) which is the unpaired property there?
<sjl_>
is :b the value of :a, or is :a unpaired? etc
<rumbler3113>
:c so I guess I am also expecting that symbols that aren't keys or properties won't be actual values
<rumbler3113>
but I see the point
<sjl_>
I don't know what your use case is, but as a user I find it valuable when things work consistently with the rest of the language, even if it's a tiny bit more typing for me
<sjl_>
being able to say "it's just standard keyword args" is preferable to learning a custom thing, even though I have to type a couple extra chars sometimes
<rumbler3113>
I read just enough of all of this to be dangerous. I'll just postprocess the input when its all done
<rumbler3113>
these are non lisp users and their expectations are what I give them, so I'll just tell them to add the t and I'll clean up the rest
<rumbler3113>
and this does explain a strange bug I ran into years ago....
<rumbler3113>
its almost like I want a combination of rest and key
<rumbler3113>
but I would have to guarantee that all of the loose arguments come before any of the keys
<dlowe>
so it sounds like to me that you don't want your users to get a repl
<dlowe>
so parse the string you get from your user however you want
<dlowe>
but don't let that determine your internal representation
<p_l>
parse it as normal list, iterate on it, and have the code that handles each function know whether it has to consume the next item or not?
nika_ has quit []
mathrick has joined #lisp
dgtlcmo has joined #lisp
<dgtlcmo>
hi
<dgtlcmo>
I'm reading the bash man page and want to vomit
<beach>
dgtlcmo: I think you have the wrong channel.
<dgtlcmo>
Do LISPers use a different shell?
<dgtlcmo>
maybe just e-lisp in Emacs?
<beach>
This channel is dedicated to Common Lisp.
<dgtlcmo>
beach: ok, wrong channel
<dlowe>
Just because someone likes lisp doesn't mean they hate bash, too
<Josh_2>
Yes, no bashing bash :P
<rumbler3113>
so.. is it true that the only correct usage of &rest and &key together is to expect a list of all parameters, but at the point where &rest is processed, the following arguments must be keyword/value pairs?
<rumbler3113>
as in, there will never be things in the &rest list that are not supposed to be keyword/value pairs?
<Bike>
correct.
<Bike>
at least, the number of remaining arguments must be even, and the keys have to be symbols.
EvW has joined #lisp
icov0x29a has quit [Quit: Leaving]
rgherdt has quit [Ping timeout: 276 seconds]
m00natic has quit [Remote host closed the connection]
ggole has quit [Quit: Leaving]
darksam has joined #lisp
Josh_2 has quit [Remote host closed the connection]
tabaqui1 has joined #lisp
fanta1 has quit [Quit: fanta1]
<Xach>
Bike: keys have to be symbols?
<Xach>
That constraint is contrary to my experience, I wonder if it is contrary to the spec!
* Xach
often uses (&rest args &key &allow-other-keys) to define a table-create-and-populate function with string or integer keys
<buffergn0me>
but without the intermediate string?
<sjl_>
not that I know of
<dlowe>
you can make your own hex printer that outputs in hex
sauvin has quit [Ping timeout: 240 seconds]
<fiddlerwoaroof>
rumbler3113: if you insist on making that work, you'll probably want to define some sort of "schema" for your keyword arguments, so you can tell whether or not the next argument is a new keyword argument or the value of the current keyword argument
<fiddlerwoaroof>
Or, you could specify values as something like '(:keyword . value) and argumetns that don't take values as just :keyword
<dlowe>
or just don't allow keywords as values
<phoe>
buffergn0me: all this talk just made me discover a fancy sbcl bug
<phoe>
(describe (formatter "a"))
<sjl_>
huh
<buffergn0me>
phoe: lambda-name should be a symbol?
<Bike>
the name of the function is a strong, "fmt$a"
<Bike>
which is sorta wacky
<Bike>
a string
<Xach>
buffergn0me: hi! do you use lisp and nix together?
<buffergn0me>
Xach: No. Quicklisp problems on Nix?
<Xach>
buffergn0me: no, lukego was looking to chat about it, and i saw from logs you mentioned it. was trying to matchmake a little.
<buffergn0me>
Xach: Ah, ok. I have a couple of months down time from contracts as of today, I was going to install Guix and use CL with that.
EvW has quit [Ping timeout: 250 seconds]
enrio has quit [Quit: Leaving]
gabiruh has quit [Read error: Connection reset by peer]
gabiruh has joined #lisp
atgreen has joined #lisp
EvW has joined #lisp
rgherdt has joined #lisp
lavaflow has quit [Ping timeout: 245 seconds]
bitmapper has quit []
vlatkoB has quit [Remote host closed the connection]
shka_ has quit [Ping timeout: 264 seconds]
icov0x29a has joined #lisp
lavaflow has joined #lisp
icov0x29a has quit [Quit: Leaving]
atgreen has quit [Ping timeout: 265 seconds]
atgreen has joined #lisp
cosimone has quit [Quit: Terminated!]
vap1 has quit [Ping timeout: 268 seconds]
gravicappa has quit [Ping timeout: 240 seconds]
matijja` has joined #lisp
<rumbler3113>
I'm not trying to add more work, I want to leverage existing stuff. I just told my users to add the t and massaged the old data
<rumbler3113>
I was just trying to reason through if this was supported somehow
milanj has quit [Quit: This computer has gone to sleep]
edgar-rft has joined #lisp
Kevslinger has quit [Quit: Connection closed for inactivity]
atgreen has quit [Ping timeout: 240 seconds]
<rumbler3113>
I was inspired by that guerrilla lisp opus to "just get started", didn't have any particular way I expected to scarf the input file
cosimone has joined #lisp
cosimone has quit [Client Quit]
xuxuru has quit [Quit: xuxuru]
lavaflow has quit [Ping timeout: 240 seconds]
kpoeck has joined #lisp
<kpoeck>
phoe: I run the modern ansi-test with ccl (and all other lisps that run on MacOSX)
<kpoeck>
81 out of 21802 total tests failed:
trafaret1 has joined #lisp
<phoe>
kpoeck: yes, I have managed to run them as well. Thank you!
kpoeck has quit [Ping timeout: 260 seconds]
scymtym has quit [Ping timeout: 245 seconds]
milanj has joined #lisp
Lycurgus has joined #lisp
Lycurgus has quit [Quit: Exeunt]
gareppa has joined #lisp
matijja` has quit [Ping timeout: 265 seconds]
atgreen has joined #lisp
gareppa has quit [Remote host closed the connection]
lavaflow has joined #lisp
matijja` has joined #lisp
gareppa has joined #lisp
<mfiano2>
Can I somehow use UPDATE-INSTANCE-FOR-DIFFERENT-CLASS to assign slot values to CURRENT based on a list of initargs in PREVIOUS, when I don't know the slot names for the new class, but do know their initargs?
cosimone has joined #lisp
<mfiano2>
Without digging into the MOP for this trivial task anyway
<mfiano2>
To be specific, I'm not extracting initargs from PREVIOUS. PREVIOUS will have exactly 1 slot which is a list of initargs I want to use to set the slot values of CURRENT
<phoe>
You don't know the slot names for the new class?...
<mfiano2>
Right. They are dynamically generated with a custom metaclass...but that's a topic for another day...ha
<Bike>
how do you have initargs but not slot names?
<Bike>
by "initargs" i assume you mean the keywords
<mfiano2>
Right. I'm writing a DSL where the user specifies the initargs, but I need to delay shared-initialize so I need to create a fake class with these initargs before i change-class
bitmapper has joined #lisp
<Bike>
sounds like you have a lot of specific concerns. hard to say much without knowing the system. But update-instance-for-different-class should basically call shared-initialize and to do that it'll need slot names, i think.
<Bike>
i'd also say that whatever you're doing sounds like you'lll be using mop at some point anyway
<jackdaniel>
phoe: it seems that you use word "modern" with ansi-test as if there were some significant improvements - that is not true. some tests were added and a directory structure has been introduced
<mfiano2>
Yeah I am for sure. It's quite involved what I am doing, and beyond my ability to even try to explain it at the moment. Just something I've been working on for a month and nearly complete. Looks like I'll have to dig into the MOP some more to pull this off.
<jackdaniel>
real improvement would be running tests not with make but from a host lisp implementation, i.e: (load-system 'ansi-tests) (ansi-tests:run :ecl "/usr/bin/ecl")
<Bike>
it's also really easy to get the slot names with mop
<jackdaniel>
with possibility to inspect results
<Bike>
(mapcar #'slot-definition-name (class-slots (class-of current))), i guess?
<phoe>
jackdaniel: that's what I meant. ccl-tests has forked ansi-tests a considerable amount of time ago and there is an issue on its test repository that mentions that their fork hasn't been updated for a while.
<Bike>
aux in a lambda
<mfiano2>
Well i don't yet have the class even defined at the point I would need the slots. I only have what will be the keyword initargs
<jackdaniel>
I find &aux more useful than single toplevel let spanning whole body tbh
<jackdaniel>
but that's a matter of taste I suppose
<Bike>
uh, what? you have an object of the new class, you'd better have it defined
<mfiano2>
I need the slots before that.
<Bike>
update-instance-for-different-class is called by change-class. and to call change-class you need the new class
<Bike>
that's all i mean
<mfiano2>
Right. I have the old class which knows about the new initargs. I do some things on the old class, create the new class, then change-class it to be an instance of the new class. At some point in there, I need to map the initargs in a slot of the old class to new class initargs
<phoe>
is `current` already modified to have the new class assigned to it?
<Bike>
yes
<phoe>
then use the MOP to get the slots of (class-of current) - should be enough
<phoe>
...wait a second though
<phoe>
> i don't yet have the class even defined at the point I would need the slots
<mfiano2>
Well I need to map a list of symbols representing initargs of the new class, to actual slot names of new class
<phoe>
you cannot be inside U-I-F-D-C if you do not have the class defined yet
gareppa has quit [Quit: Leaving]
<mfiano2>
"...create the new class, then change-class..."
<Bike>
the initargs don't necessarily have any relation to the slot names. if there is some relation, it's one you define yourself
<mfiano2>
Ok I just thought of a way to get the slot names that will be in the current class. I'll just build the previous class with the same structure as the new one then.
<mfiano2>
Minus the metaclass and superclasses that is, which is the whole point of this
gareppa has joined #lisp
gareppa has quit [Remote host closed the connection]
gabiruh has quit [Quit: ZNC - 1.6.0 - http://znc.in]
scymtym has joined #lisp
Bike has quit [Quit: Bike]
hiroaki has quit [Ping timeout: 250 seconds]
quazimodo has joined #lisp
atgreen has quit [Ping timeout: 265 seconds]
grabarz has joined #lisp
hiroaki has joined #lisp
amerlyq has quit [Quit: amerlyq]
sjl_ has quit [Ping timeout: 240 seconds]
buffergn0me has quit [Ping timeout: 246 seconds]
sjl has quit [Quit: WeeChat 2.2-dev]
DataLinkDroid2 has quit [Quit: DataLinkDroid2]
Bike has joined #lisp
DataLinkDroid has joined #lisp
v0|d has quit [Remote host closed the connection]
cosimone has quit [Quit: Quit.]
hydrocat has joined #lisp
<hydrocat>
Hello everyone. I am trying to write a text tranformation program but I am not sure about all the things common lisp can do yet. Any recommendation on learning resources ?
<hydrocat>
I've found a book called "Practical common lisp" but I'd like your opinion on it :)
<White_Flame>
that's a very commonly recommended book for learning CL
<hydrocat>
But for example, to read text from a file, I am using read-char. I mean, it can be done but maybe there would be a better way.
<White_Flame>
there's also read-line
<White_Flame>
but at some point you'd want to look at libraries
<DataLinkDroid>
hydrocat: PCL is a decent place to start, especially if (as seems to be the case) you already know something of one or more other languages.
varjagg has quit [Ping timeout: 276 seconds]
<White_Flame>
quicklisp is the library downloader tool
clothespin has quit [Ping timeout: 240 seconds]
matijja` has quit [Remote host closed the connection]
<hydrocat>
okay, then I have a more specific question, more personal if you will. In the process of implementing a lexer, I am unsure wether I should make a token generic class and implement it multiple times or simply use symbols.
Codaraxis has joined #lisp
<hydrocat>
what would be your suggestion ?
rgherdt has quit [Ping timeout: 265 seconds]
<White_Flame>
well, having just implemented a lexer, I made each token a list. (:token "foo") (:punc "(") (:whitespace " ") etc
<White_Flame>
very easy to construct & deconstruct, and Lisp has good support for ad-hoc data in lists
grabarz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<hydrocat>
interesting. why the preference for symbols with : ?
<White_Flame>
each package has its own instance of symbols. So lexer:foo is not the same symbol as parser:foo, or cl-user:foo. Keywords are visible and resolve to the same symbol from any package
<White_Flame>
they're intended for data that's broadly visible and self-contained across systems
shifty has joined #lisp
<hydrocat>
Should we avoid using 'symbols or do they have a meaning too ?
<DataLinkDroid>
hydrocat: symbols beginning with a colon are "keyword" symbols belonging to the keyword package
<aeth>
'symbol will become 'current-package::symbol
<aeth>
So if you wanted to compare them you'd have to do something like get the symbol name and reintern them, or get the symbol-name and do a string=
<White_Flame>
hydrocat: it all depends. I woudln't say to avoid it. But you'll learn the ins & outs with use
<aeth>
keywords are simple, just eql them
<White_Flame>
source code is made of non keywords. in (defun foo () ..), "FOO" is interned in the package that was read in
<aeth>
e.g. LOOP takes symbols from any package so (loop for x in bar do (print x)) and (loop :for x :in bar :do (print x)) both work. Most macros will just take keywords, though, because it makes the implementation simpler and the written code more readable
<White_Flame>
so especially in macros where you're building up source code from symbols, those need to be properly packaged symbols in order to reference the right thing
<hydrocat>
Okay ! I believe I got the concept between keywords and general symbols
<hydrocat>
aeth: But then, wouldn't the loop macro fail in some situations since it is taking symbols from any package ?
<aeth>
hydrocat: the loop macro probably is doing something like this: (eql (intern (symbol-name symbol) some-package) 'some-package:foo) instead of (eql symbol 'foo)