freenode/#lisp - IRC Chatlog
Search
12:59:49
LdBeth
If you’re interested in how compiler macro expands, you get the sense that compiler macros work exactly as ordinary macros
13:21:04
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.
13:43:03
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
13:44:44
dtw
I'm using (position-if ...) so I get to build the test function myself. I'm just curious how you interpret the spec.
13:47:08
dtw
This whole question is not meaningful with EQL or such symmetrical test functions but with > or < it's important.
13:50:19
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
13:51:28
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.
13:53:23
pfdietz
And for the set functions (UNION, etc.) it's almost certainly bad form to depend on a particular order.
13:53:56
pfdietz
BTW, this makes me want some sort of categorical notion that links equality functions with hash functions.
13:55:04
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.
13:57:15
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?
14:00:21
Xach
hmm: (401 "Unauthorized" from #<GITHUB-REQUEST :GET to "https://api.github.com/repos/sionescu/fiveam/releases">)
15:49:04
pjb
White_Flame: (mapcaN (lambda (item) (when (funcall filter item) (list (funcall transform item)))) list)
16:02:40
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.
16:02:58
makomo
my first idea is to just insert the data into an in-memory sqlite database and work with that
18:34:40
faheem
The only thing I'm aware of is a library that Tamas Papp wrote. But it's kind of abandoned.
18:35:15
faheem
makomo: Haven't you come across it? It's the topic hit for -> data frame common lisp
18:36:10
faheem
makomo: No, I haven't. It didn't exactly seem developed. Tamas apparently decided that Julia was a better better bet.
18:37:13
faheem
makomo: Did you find anything that seemed at all usable. Something like Pandas seems hopeless, unfortunately.
18:38:13
makomo
at a glance both of these seem kind of usable, but both are underdocumented and not really finished, so, nope :(
18:41:17
faheem
See also -> https://github.com/blindglobe/common-lisp-stat/commit/eaddd8205c840dd0fe34f06c9bd03cbac698e611
18:42:27
faheem
shka_: Oh dear. Everyone writing their own is kind of a guarantee that nothing with ever be complete enough to use.
18:43:40
faheem
shka_: 384 commits is better than some. Of course, it depends on the commits. Do you have tests?
18:45:18
shka_
makomo: no joins, no merges, it leans back on the cl-data-structures though so group by just works
18:46:46
shka_
yeah, it is another lib, has some data structures (not relevant here) and operations that are supposed to work on abstract interfaces
18:49:41
shka_
https://github.com/sirherrbatka/cl-data-structures/blob/ef1ad2064804759d65b0bd6f4520501fa40c4f5c/src/algorithms/meta/meta-tests.lisp#L48
18:50:11
shka_
ok, so there is this abstraction called ranges, and there is abstraction called aggregation functions
18:52:09
makomo
this indexing business is pretty neat. tpapp has a library related to that https://github.com/tpapp/cl-slice
18:52:13
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
18:53:01
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
18:53:33
makomo
faheem: that's pretty much what i want to use dataframes for, and yeah, the two are very related
18:53:40
makomo
see https://pandas.pydata.org/pandas-docs/stable/getting_started/comparison/comparison_with_sql.html
18:54:27
shka_
so my implementation is very basic at the moment, and main focus was on core ideas like mutability and the right API
18:56:14
shka_
faheem: yeah, i did look at it, does not support sparse columns which is deal breaker for me
18:56:41
faheem
shka_: Ok, but overall how does it compare to yours? Less developed or just different?
18:57:03
faheem
You should see if you could take features/ideas from there. All this replication is very inefficient.
18:57:42
Xach
faheem: There's a process that I moderate and most stuff goes in but some stuff does not.
18:59:06
Xach
I don't consider the garbage-ness of a project when looking at a request to add something.
19:00:03
shka_
Medical, claims. Some bright mind figured that ideal way to represent the diagnosis is to store them in 20 seperate columns
19:03:37
faheem
It's definitely a real problem with CL. A dozen libraries for the same thing. None of them usable.
19:04:22
faheem
shka_: Do you have a mailing list or something? Can you shoot me an email when you project is on QL?
19:04:27
shka_
but if you are willing to try it, i will have more input to consider the future development
19:08:23
shka_
anyway, here is the frames library: https://github.com/sirherrbatka/cl-data-frames but you will need also this (which is way to big) https://github.com/sirherrbatka/cl-data-structures and this one (which is pretty small) https://github.com/sirherrbatka/lense
19:09:40
shka_
cl-data-structures is kinda a mess because it has some stuff like statistical estimators that don't have any business being in there
19:12:52
shka_
anyway, i would be thrilled if you guys want to try my stuff out and maybe help me a little
19:13:47
shka_
data-frames work although are rough around the edges, cl-data-structures are genuinely useful as fuck
19:15:56
shka_
i really need to clean up cl-data-structures and modularize it before i put on github
19:16:03
makomo
https://github.com/blindglobe/rho, https://github.com/mirkov/data-table/, https://github.com/tpapp/cl-data-frame, https://github.com/sirherrbatka/cl-data-frames/
19:23:56
shka_
well, it is not painful enough for me to stop and i seem to be the only person with such problems so maybe it is fine
19:27:42
shka_
i know i should, doing this in a productive way would require a lot of time, and i have way to many things on my hands already
19:32:03
faheem
shka_: BTW, did you see this? http://within-parens.blogspot.com/2016/12/rcreational-common-lisp.html
19:39:24
PuercoPop
shka_: Have you seen https://github.com/fiddlerwoaroof/data-lens? How does it compare to lense?
19:40:57
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
19:41:18
shka_
which i don't need, because cl-data-structures ranges and aggregation functions are way more useful
20:27:34
pfdietz
faheem: I am interested in improved curation of the Quicklisp ecosystem. But time is finite.
22:00:05
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?
22:07:34
zulu-inuoe
makomo: I'm not seeing that behaviour. Are you sure the variable wasn't already unbound?
22:14:37
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
22:15:05
makomo
it instead calls SLIME-RE-EVALUATE-DEFVAR which then calls SWANK:RE-EVALUATE-DEFVAR on the CL side which uses MAKUNBOUND
22:15:45
makomo
only after unbinding it does it evaluate the form, which then errors, leaving the symbol unbound
22:18:36
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)