freenode/#lisp - IRC Chatlog
Search
15:22:14
neirac
I'm trying to use clack it was working fine in ccl but I changed to sbcl and trying to load it gives me: Retry compiling #<IRONCLAD-SOURCE-FILE "ironclad" "src" "common">.
15:25:35
p_l
hjudt: just also make sure that access to lisp-side structures is synchronized properly
15:27:14
scymtym
neirac: some ironclad versions and sbcl versions don't work together. unfortunately, the easiest solution is upgrading both to the newest released versions
15:27:19
hjudt
p_l: thanks, i will look into this and see what i can achieve, though i am not sure i have enough experience to fix it. nevertheless it is worth a try.
18:00:35
neirac
anyone using https://github.com/joaotavora/snooze ? I'm just getting 500 don't know why
21:11:02
borei
can somebody gimme heads-up, im trying to pull property from the plist but getting nil.
21:13:51
pjb
borei: (eval "(get-properties metrics '(|tags|))") #| --> "(get-properties metrics '(|tags|))" |# ;doesn't seem to work.
21:22:20
neirac
I'm stuck trying to use https://github.com/joaotavora/snooze every route I create ends with 500 internal error. https://pastebin.com/CmEY7x7H
21:30:31
Xach
neirac: here's a fun thing you can do: (map 'vector (lambda (x y) (cons x y)) names prices) can be changed to (map 'vector 'cons names prices)
21:32:19
sjl_
Does anyone have any experience using RESTART-CASE's :test along with HANDLER-BIND? I can't understand how I'm supposed to used the two together.
21:33:07
sjl_
So in bar, I want to offer a restart IGNORE-BORKED if there's an error of type BORK inside foo, but not for any other error (e.g. division by zero)
21:33:44
sjl_
Using :test borkp there works great, and I can see in the debugger that I only get the restart offered to me when the error is from the bork. I don't get it if I pass 0. Perfect.
21:34:11
sjl_
But then when I try to use handler-bind to invoke that restart programatically, it says there's no IGNORE-BORKED restart active.
21:34:33
sjl_
If I remove the :test from restart case, I *can* invoke the restart with the handler-bind, but then I also get it offered to me when it's not applicable
21:36:53
Bike
i wonder if using invoke-restart like that means the knowledge of what condition is in play is lost
21:37:57
sjl_
This happens in both SBCL and CCL so it must be something I just haven't wrapped my head around
21:38:31
sjl_
I mean, I care about it as another data point that it's not an implementation bug, heh
21:40:01
Bike
so you could workaround with (invoke-restart (find-restart 'ignore-borked c)), let's see if that works
21:43:04
sjl_
which can be > a non-nil symbol (denoting the most recently established active restart whose name is that symbol)
21:43:43
Bike
I mean the implementation would have to do funny things, keeping track of a "current condition" or something
21:43:58
dim
ACTION has spent some time on the pgloader documentation, it's getting near where I wanted it to be: https://pgloader.readthedocs.io/en/latest/index.html
21:44:47
scymtym
sjl_: could this be the problem (from the RESTART-CASE page): "If the restartable-form is a list whose car is any of the symbols signal, error, cerror, or warn (or is a macro form which macroexpands into such a list), then with-condition-restarts is used implicitly to associate the indicated restarts with the condition to be signaled. "
21:45:08
dim
IOW: hey, here's the kind of project you can implement all by yourself when using CL, here's how much user experience improvements you can actually code because everything is suddenly made easy by the language ;-)
21:46:03
Bike
(defun invoke-restart-with-condition (restart condition &rest args) (apply #'invoke-restart (find-restart restart condition) args))
21:46:19
specbot
Associating a Restart with a Condition: http://www.lispworks.com/reference/HyperSpec/Body/09_adbd.htm
21:47:31
sjl_
Yeah. I can just wrap up the invoke-restart in a helper function like people often do, using the long form of find-restart
22:13:08
kdridi
I'm looking for a serie of exercize that can make a lisp beginner an advanced programmer
22:14:10
kdridi
I tried many ways like website like project euler, hacker rank and so on but their execize are not adapted to lisp languages
22:16:29
sjl_
I've done a bunch of Project Euler, Advent of Code, and Rosalind in Common Lisp. CL works fine for all of them (and I've found it especially good for Euler)
22:21:30
nirved
neirac: in your case in defroute name is a symbol, while return-cheapest expects a string
22:21:41
kdridi
hum... for example, I'm looking for "exercises" that's ask to to create macro and do metaprogrammation
22:22:20
sjl_
Someone should write a Learn Common Lisp the Hard Way that's just a long workbook of exercises in gradually-increasing difficulty, exploring various parts of the language.
22:27:33
sjl_
1449 bought the one like that I did for Vimscript (even though it's also completely free online)
22:57:08
neirac
nirved I don't understand the last thing you said return-cheapest I'm passing name I'm assuming that's a string http://localhost:9006/prices/meat -> "meat" is the parameter to return-cheapest, that's my assumption.
23:00:33
nirved
neirac: please note, that the list of products returned by the site can be incomplete, and the cheapest one might be missing (not yet loaded by the page)
23:01:26
nirved
neirac: you might be better by calling the api directly instead of parsing html - it returns json
23:03:08
neirac
nirved oh, never realized that one, I just was creating web-scrapper. I did not check an api existed. you check the html ?
23:04:28
nirved
neirac: if you open the network log in a browser, and then select the desired ordering in the page, you'd get the api request somewhere at the end
23:42:25
drmeister
What's the relationship between quicklisp and ASDF - does quicklisp always compile it's own version of ASDF or can it use one from the system?
23:44:26
jasom
drmeister: it will compile and load its own unless 1: ASDF is already present and new enough, 2: (require 'asdf) works and is new enough