karswell_ has quit [Remote host closed the connection]
karswell_ has joined #lisp
dialectic has quit [Ping timeout: 258 seconds]
torbo has quit [Remote host closed the connection]
SenasOzys has quit [Ping timeout: 258 seconds]
dddddd has quit [Remote host closed the connection]
dialectic has joined #lisp
Necktwi has joined #lisp
<beach>
Good morning everyone!
devon has quit [Ping timeout: 246 seconds]
Ricchi has quit [Remote host closed the connection]
ggole has joined #lisp
orivej has quit [Ping timeout: 248 seconds]
ebobby has joined #lisp
vlatkoB has joined #lisp
ebobby has quit [Quit: Lost terminal]
SenasOzys has joined #lisp
varjag has joined #lisp
oni-on-ion has joined #lisp
gareppa has joined #lisp
SenasOzys has quit [Ping timeout: 272 seconds]
dale has quit [Quit: dale]
Necktwi has quit [Ping timeout: 244 seconds]
Necktwi has joined #lisp
kdas_ is now known as kushal
v88m has quit [Ping timeout: 258 seconds]
v88m has joined #lisp
bitch has quit [Ping timeout: 245 seconds]
martylake has quit [Remote host closed the connection]
martylake has joined #lisp
varjag has quit [Ping timeout: 272 seconds]
dacoda has joined #lisp
zhlyg has joined #lisp
martylake_ has joined #lisp
martylake has quit [Ping timeout: 272 seconds]
Lycurgus has joined #lisp
keep_learning_M has quit [Quit: This computer has gone to sleep]
scymtym has quit [Ping timeout: 245 seconds]
dacoda has quit [Ping timeout: 252 seconds]
yangby has joined #lisp
yangby has quit [Client Quit]
rozenglass has joined #lisp
gareppa has quit [Quit: Leaving]
oni-on-ion has quit [Remote host closed the connection]
dale has joined #lisp
vaporatorius has joined #lisp
dialectic has quit [Ping timeout: 248 seconds]
scymtym has joined #lisp
<LdBeth>
beach: morning beach
catalinbostan has joined #lisp
dialectic has joined #lisp
Elronnd has quit [Quit: Elronnd]
<White_Flame>
What's the most idiomatic way to combine remove-if-not (filter) and mapcar (transform) in a single pass?
<ck_>
loop when .. collect?
<dialectic>
+1
<White_Flame>
hmm, yeah, my loop-fu is weak
Necktwi has quit [Ping timeout: 246 seconds]
<dialectic>
look before you loop (use iterate)
v0|d has quit [Read error: Connection reset by peer]
<phf>
edgar-rft: thank you for doing the legwork! i also reached out to author, but haven't heard anything back yet
cosimone has joined #lisp
<aeth>
White_Flame: if you don't like loop you can just write your own macro or higher order function on top of it
<aeth>
map-with-filter or something
<White_Flame>
no, I'm using loop
<White_Flame>
I like standard stuff, even if iterate does make it nicer
<aeth>
dialectic: I'd use iterate if it was just loop with parens and extensibility, but it's its own very different thing that I can't expect people to be able to read
<White_Flame>
and I'm sure loop hides faster imperativeness than I want to bother implementing myself
<aeth>
loop-with-parens (I'll call it do-loop) is (far) on my todo list, though.
<dialectic>
I wouldn't call it "very different"
<aeth>
It fills the same niche very differently. It has a learning curve.
<dialectic>
Perhaps. That's a fair criticism. I didn't regret the one day it took to learn it, though. I never use loop anymore.
<aeth>
It is well documented.
<aeth>
You kind of have to be well documented with a macro like that.
<dialectic>
I tried SERIES as well. That one... wasn't as fun.
<LdBeth>
GG
orivej has joined #lisp
<phf>
White_Flame: at least on cmucl (loop when ... collect) expands into a tagbody with setq's and go's, so yeah, not something you might want to write yourself
<aeth>
one macro that would be fun is one that is essentially a miniature computer algebra macro
<dim>
loop/iterate, there's also the “for” macro but I can't seem to be finding the repo again easily
<dialectic>
Someone did that, in lisp, and made a lot of money off of it :P
phf has left #lisp [#lisp]
<aeth>
I mean (sum for i from 1 to 32 by 7) or something
<aeth>
and obviously you can get a lot more elaborate from there
<aeth>
On the surface, SUM would look like LOOP's sum clause, but under the hood it would be using https://en.wikipedia.org/wiki/Summation#Identities because it would have more restrictions on what can be summed
Necktwi has joined #lisp
<dim>
ahah, found it, the for looping macro is at https://shinmera.github.io/for/ and it looked interesting, it's on my “list” of things to try someday
<aeth>
you can't use FOR and ITERATE in the same package without prefixes because ITERATE has this weird thing with symbols and expects to be :USEd, unlike LOOP, which accepts any package. So for:for and iterate:for will collide
<aeth>
interestingly, according to that page, for is basically intended to be used with its package prefix... so as for:for
<aeth>
I guess because conflicts would be common
<dialectic>
are the clauses matched by symbol-name or eq?
<White_Flame>
this is literally what keywords are for. why are the underused in places like this?
<dialectic>
-shrug-
<dialectic>
Possibly because iterate lets you define your own clauses.
<dialectic>
Well, it lets you define drivers... but those are only for FOR clauses. Hm.
v0|d has joined #lisp
<aeth>
White_Flame: that's one of the places where my macro would differ from FOR/ITERATE/SERIES/etc. I like keyword-utilising LOOP because it makes the ALGOL-style keywords stand out as, well, Lisp keywords
<aeth>
White_Flame: But, yes, keywords aren't really used because it's intended to be extensible.
<aeth>
I guess you could keyword the built-ins and expect the extensions to be namespaced, but that could look weird
<aeth>
but that's only for the first part of a clause. If you're doing (:for x :from 1 :to 42) the rest of the clause should have keywords. Then you can implement that as a plist tail and have order not matter and internally use destructuring-bind with &key
<aeth>
even if it's (foobar:for x :from 1 :to 42)
dale has quit [Quit: dale]
hhdave has joined #lisp
<dialectic>
Are there SERIOUS-CONDITIONs that are not ERROR?
<aeth>
inspecting it in SBCL, I get the subclasses: (#<sb-pcl::condition-class sb-di:debug-condition> #<sb-pcl::condition-class sb-sys:interactive-interrupt> #<sb-pcl::condition-class sb-ext:timeout> #<sb-pcl::condition-class common-lisp:storage-condition> #<sb-pcl::condition-class common-lisp:error>)
Necktwi has quit [Quit: leaving]
<aeth>
most of these are internal to SBCL, but that means that your implementation might add others on top of the two specified, and libraries might add others
schweers has joined #lisp
hhdave has quit [Ping timeout: 248 seconds]
makomo has joined #lisp
alca has quit [Quit: bye!]
donotturnoff has joined #lisp
hhdave has joined #lisp
<aeth>
(CCL only has one extra, external-process-creation-failure)
karswell_ has quit [Remote host closed the connection]
orivej has quit [Ping timeout: 246 seconds]
karswell_ has joined #lisp
<aeth>
It's interesting that CCL uses standard-classes and SBCL uses sb-pcl::condition-classes
heisig has joined #lisp
amerlyq has joined #lisp
dialectic has quit [Ping timeout: 258 seconds]
fivo has joined #lisp
cosimone has quit [Quit: WeeChat 2.4]
fivo has quit [Client Quit]
random-nick has joined #lisp
orivej has joined #lisp
rozenglass has quit [Remote host closed the connection]
rozenglass has joined #lisp
martylake has joined #lisp
martylake_ has quit [Ping timeout: 245 seconds]
m00natic has joined #lisp
manualcrank has quit [Quit: WeeChat 1.9.1]
libre-man has quit [Ping timeout: 244 seconds]
notzmv has quit [Ping timeout: 258 seconds]
libre-man has joined #lisp
keep_learning_M has joined #lisp
frgo has quit [Remote host closed the connection]
pillton has quit [Remote host closed the connection]
hhdave_ has joined #lisp
hhdave has quit [Ping timeout: 246 seconds]
hhdave_ is now known as hhdave
kajo has quit [Ping timeout: 276 seconds]
dacoda has joined #lisp
makomo has quit [Ping timeout: 268 seconds]
Lycurgus has quit [Quit: Exeunt]
frgo has joined #lisp
igemnace has quit [Quit: WeeChat 2.5]
cosimone has joined #lisp
karswell_ has quit [Remote host closed the connection]
ebrasca has joined #lisp
karswell_ has joined #lisp
esrse has quit [Ping timeout: 268 seconds]
keep_learning_M has quit [Quit: This computer has gone to sleep]
m00natic has quit [Remote host closed the connection]
cosimone has quit [Quit: WeeChat 2.4]
donotturnoff has quit [Ping timeout: 245 seconds]
scymtym has quit [Ping timeout: 252 seconds]
frgo_ has joined #lisp
frgo has quit [Ping timeout: 248 seconds]
frgo_ has quit [Ping timeout: 268 seconds]
makomo has joined #lisp
<drmeister>
What's the poop with compiler macros and the slime interactive macro expansion. Is it not supposed to expand compiler macros - or is it an implementation dependent detail?
<drmeister>
Hmmm, do you know why? I kinda hoped I could expand compile-macros with it because I've got some gnarly code expansion going on. Reading the slime code I see it talks about compiler-macros but I don't see where it uses their expansions.
oni-on-ion has joined #lisp
frgo has joined #lisp
frgo has quit [Remote host closed the connection]
frgo has joined #lisp
kajo has joined #lisp
<LdBeth>
drmeister: an implementation can choose to not perform compiler macro expandsion
catalinbostan has joined #lisp
anewuser has joined #lisp
<LdBeth>
If you’re interested in how compiler macro expands, you get the sense that compiler macros work exactly as ordinary macros
egp_ has joined #lisp
catalinbostan has quit [Client Quit]
anewuser has quit [Ping timeout: 258 seconds]
keep_learning_M has joined #lisp
Inline has quit [Ping timeout: 252 seconds]
varjag has joined #lisp
<pfdietz>
My complaint with ITER is that it breaks Waters' COVER. The latter is cheating slightly, but usually isn't caught at it. ITER is an exception.
pfdietz has quit [Remote host closed the connection]
wxie has joined #lisp
martylake has quit [Remote host closed the connection]
martylake has joined #lisp
Necktwi has joined #lisp
pfdietz has joined #lisp
<drmeister>
LdBeth: thank you
Inline has joined #lisp
Lord_of_Life has quit [Ping timeout: 258 seconds]
rippa has joined #lisp
<dtw>
If there is a :test key argument for function (e.g. (position item sequence :test ...)) is there a guarantee for a specific order of arguments for the test function? The spec _could_ be interpreted that "item" is given first and "sequence's" element (or value of :key function) is second. It's not totally clear, though. http://www.lispworks.com/documentation/HyperSpec/Body/17_ba.htm
Lord_of_Life has joined #lisp
manualcrank has joined #lisp
<dtw>
I'm using (position-if ...) so I get to build the test function myself. I'm just curious how you interpret the spec.
<dtw>
This whole question is not meaningful with EQL or such symmetrical test functions but with > or < it's important.
<pfdietz>
Look at "satisfy the test" in the glossary of the CLHS
<pfdietz>
"(for a two argument test) to be in a state such that the two-place predicate which is the sequence function's test argument returns true when given a first argument that is the object being considered, and when given a second argument that is the result of calling the sequence function's key argument on an element of the sequence function's sequen
<pfdietz>
ce argument which is being tested for equality; "
<ggole>
Seems as if both the glossary and the page agree that 'the object', eg, the value that is not an element, is the first argument.
<ggole>
Using position-if rather than relying on that would surely be better style though.
<pfdietz>
There is still a question of what's required for SEARCH and MISMATCH.
<pfdietz>
And for the set functions (UNION, etc.) it's almost certainly bad form to depend on a particular order.
<pfdietz>
BTW, this makes me want some sort of categorical notion that links equality functions with hash functions.
martylake has quit [Remote host closed the connection]
<dtw>
pfdietz: Thanks. Indeed it reads there in the glossary. For code-reading human it's probably better to use *-if and *-if-not functions.
fivo has joined #lisp
<ggole>
pfdietz: do you mean x = y implies hash x = hash y (the usual requirement)? Or did you mean some lower level thing to do with ensuring that holds?
<pjb>
White_Flame: note: mapcaN allows you to map 1 -> N (0..*) in a flat list.
linli has joined #lisp
chipolux_ has quit [Ping timeout: 248 seconds]
linli has quit [Remote host closed the connection]
scymtym has joined #lisp
hhdave has quit [Quit: hhdave]
<makomo>
any recommendations for libraries providing dataframe-like functionality? i have some json data that encodes various relations and it would be neat to be easily to do GROUP BYs, JOINs, etc.
<makomo>
my first idea is to just insert the data into an in-memory sqlite database and work with that
Arcaelyx has joined #lisp
iovec has joined #lisp
igemnace has joined #lisp
chipolux has joined #lisp
v0|d has quit [Remote host closed the connection]
interruptinuse has quit [Quit: ZNC - https://znc.in -- bye bye!]
interruptinuse has joined #lisp
w37 has quit [Remote host closed the connection]
catalinbostan has joined #lisp
cosimone has quit [Ping timeout: 252 seconds]
cosimone has joined #lisp
amerlyq has joined #lisp
abhixec has joined #lisp
orivej has joined #lisp
cosimone has quit [Ping timeout: 252 seconds]
cosimone has joined #lisp
cosimone has quit [Quit: WeeChat 2.4]
cosimone has joined #lisp
ggole has quit [Quit: Leaving]
shka_ has joined #lisp
cosimone has quit [Quit: WeeChat 2.4]
cosimone has joined #lisp
karswell_ has quit [Ping timeout: 248 seconds]
keep_learning_M has quit [Quit: This computer has gone to sleep]
amerlyq has quit [Read error: Connection reset by peer]
amerlyq has joined #lisp
slyrus_ has joined #lisp
saravia has quit [Remote host closed the connection]
saravia has joined #lisp
saravia has quit [Remote host closed the connection]
<shka_>
anyway, idea is that aggregation functions work on ANY range so if you just manage to implement the right protocol it simply chew it trough fine
<faheem>
shka_: ok
<shka_>
i have stuff like line-by-line range so you can work with text files this way
<shka_>
and defining aggregation functions is actually easy to it is extendable
<aeth>
For CL GUIs you can use Sketch, but you'd have to write your own way to render graphs/etc. to it. https://github.com/vydd/sketch
<faheem>
aggregation reminds me of SQL.
<shka_>
faheem: same basic idea
<shka_>
anyway, back to data frames
<makomo>
faheem: that's pretty much what i want to use dataframes for, and yeah, the two are very related
<shka_>
PuercoPop: it is not the same stuff, all i really wanted is to have direct equivalent of racket style lenses, this goes for full blown DSL build with monads
<shka_>
which i don't need, because cl-data-structures ranges and aggregation functions are way more useful
<shka_>
(for me)
<shka_>
so obviously, my lens is simply a first class accessor
<shka_>
and here is something way more complex
<shka_>
well, good night everyone
shka_ has quit [Ping timeout: 244 seconds]
notzmv has quit [Ping timeout: 248 seconds]
dale has joined #lisp
vhost- has quit [Ping timeout: 245 seconds]
saravia_ has joined #lisp
saravia has quit [Ping timeout: 246 seconds]
orivej has quit [Ping timeout: 248 seconds]
dacoda has quit [Ping timeout: 264 seconds]
<pfdietz>
faheem: I am interested in improved curation of the Quicklisp ecosystem. But time is finite.
MichaelRaskin has joined #lisp
iovec has quit [Quit: Connection closed for inactivity]
martylake has joined #lisp
cosimone has quit [Quit: WeeChat 2.4]
varjag has quit [Quit: ERC (IRC client for Emacs 26.1)]
donotturnoff has quit [Ping timeout: 244 seconds]
vutral has joined #lisp
hhdave has joined #lisp
vlatkoB has quit [Remote host closed the connection]
FreeBirdLjj has quit [Remote host closed the connection]
Bike has quit [Quit: Bike]
notzmv has joined #lisp
dale has quit [Quit: My computer has gone to sleep]
dale has joined #lisp
zhlyg has quit [Ping timeout: 268 seconds]
hhdave has quit [Quit: hhdave]
Josh_2 has quit [Remote host closed the connection]
Josh_2 has joined #lisp
sjl has quit [Quit: WeeChat 2.3-dev]
sjl has joined #lisp
hhdave has joined #lisp
hhdave has quit [Client Quit]
lawfullazy has joined #lisp
saravia_ has quit [Remote host closed the connection]
Inline has joined #lisp
<makomo>
huh interesting. if there's a bound global dynamic variable *VAR*, doing (defvar *var* (error "hello")) makes it unbound (using SBCL). is this expected?
random-nick has quit [Read error: Connection reset by peer]
linli has joined #lisp
<zulu-inuoe>
makomo: I'm not seeing that behaviour. Are you sure the variable wasn't already unbound?
Bike has joined #lisp
<makomo>
zulu-inuoe: lemme try again in a fresh image
linli has quit [Ping timeout: 244 seconds]
rumbler31 has joined #lisp
<makomo>
zulu-inuoe: do you get an error when executing the form?
<zulu-inuoe>
makomo: Not on the second defvar, since the variable was already created
<makomo>
right
<makomo>
must have been a package mixup then
lucasb has quit [Quit: Connection closed for inactivity]
Josh_2 has quit [Remote host closed the connection]
Josh_2 has joined #lisp
<makomo>
zulu-inuoe: lol it was swank, gah.. there's a special case just for DEFPARAMETER when you're using slime's SLIME-EVAL-DEFUN
<zulu-inuoe>
makomo: Oh? Really? What does it do?
<makomo>
it instead calls SLIME-RE-EVALUATE-DEFVAR which then calls SWANK:RE-EVALUATE-DEFVAR on the CL side which uses MAKUNBOUND
<equwal>
Good morning
<makomo>
only after unbinding it does it evaluate the form, which then errors, leaving the symbol unbound
<zulu-inuoe>
@_@. It does that for `defvar`?
<makomo>
yeah, just defvar :')
<zulu-inuoe>
Oh wow.
<makomo>
so to conclude, it didn't have to do with packages after all
<makomo>
(string-match "^(defvar " form)
<makomo>
slime.el:4081
<makomo>
or just C-h f slime-eval-defun
<makomo>
erm, s/DEFPARAMETER/DEFVAR/ above
<zulu-inuoe>
Yeeep. Still exists in sly, too. Interesting. But I guess I've never called it (I always C-c C-c or C-c C-e)
<makomo>
heh, i frequently do slime-eval-defun (keybinding ,ef in spacemacs)
dale has quit [Quit: My computer has gone to sleep]
rumbler31 has quit [Remote host closed the connection]
dale has joined #lisp
Josh_2 has quit [Remote host closed the connection]
Josh_2 has joined #lisp
dale has quit [Quit: My computer has gone to sleep]
saravia has joined #lisp
saravia has quit [Remote host closed the connection]
Josh_2 has quit [Ping timeout: 258 seconds]
buffergn0me has quit [Ping timeout: 250 seconds]
stacksmith has joined #lisp
libre-man has quit [Ping timeout: 258 seconds]
libre-man has joined #lisp
dialectic has joined #lisp
makomo has quit [Quit: WeeChat 2.4]
wxie has joined #lisp
akoana has joined #lisp
elderK has joined #lisp
igemnace has quit [Quit: WeeChat 2.5]
rumbler31 has joined #lisp
wxie has quit [Quit: wxie]
rumbler31 has quit [Ping timeout: 245 seconds]
smazga has quit [Quit: leaving]
cantstanya has quit [Remote host closed the connection]