freenode/lisp - IRC Chatlog
Search
5:47:53
jackdaniel
Fare: did you see the PR on asdf repository? about adding init-name buildarg to create-image for ecl
6:26:43
Fare
jackdaniel, I have a weird bug trying to upgrade asdf from your 3.1.8.5 to my 3.3.0 (tentative): the upgrade borks on #:FIND-COMPONENT being undefined (mind the uninterned symbol)
6:27:27
Fare
I don't understand what would unintern FIND-COMPONENT specifically. But the gf is defined in component and the methods in find-component
6:30:06
Fare
oh, I see it's listed as redefined in asdf/upgrade, which causes it to be fmakunbound. But not uninterned.
7:42:14
z3t0
hi all I am trying to learn common lisp by reading Practical Common Lisp but am stuck at the very end of chapter 3
7:42:30
z3t0
https://gist.github.com/z3t0/608f84bf9c0e1ec86845a0b6ece23529 is my code so far, and i have checked with code from other people using the same book to make sure the code is okay
7:44:43
z3t0
Yes it is, I've checked with online code samples and the code from the book so that cant be the issue
7:45:53
z3t0
For some reason i get a Rating is undefined which doesnt make sense because im using it as a keyword
7:46:25
z3t0
oh my bad accidentally left that out of the paste, it is in the actual file though (sorry for that)
7:48:22
Shinmera
the function is make-comparisons-list (plural), but in the text he calls it make-comparison-list
7:51:19
Shinmera
Note that you can also just call make-comparison-list yourself in the REPL to verify that it outputs the correct list of clauses.
7:51:22
z3t0
I just copy pasted someone elses version of this chapter and it works fine there so i will carefully go and find what the differnece must be
7:59:21
jackdaniel
(defun foo (a &rest args &key a b c) …) ; (defmacro bar ((a &rest b) (c &rest d) &body e) …)
8:06:22
whoman
using where/make-comparison-list/make-comparison-expr from your gist, i get the result '(LAMBDA (CD))' from macroexpand-1 .
8:09:01
z3t0
try changing (defun make-comparison-list (&rest fields) => (defun make-comparsion-list (fields))
8:15:10
z3t0
im stepping through select with a debugger, if you want to check https://gist.github.com/z3t0/8017a18309890cb2b2fda0323b8446a4 is the database
10:55:48
flip214
currently they're started in the function-entry output line, but that means that longer pieces of data
10:57:31
pjb
In some implementations, there are implementation dependent options to TRACE, that would let you write your own thing.
12:54:51
dlowe
we will ensure your dimensions are rectilinear and equal-sided. You really want to be there.
12:56:02
Posterdati^2
and I'm using mks, not that foolish american system... :) with lb, feet, oz and mph
13:04:52
flip214
shka: well, that's just the frontend for swank, anyway... I'm using slimv, but use the same swank backend.
15:12:47
ptdel
hey guys, I'm just getting into CL, coming from Python. I had a question that might just be a matter of preference. In Python I typically try to make things classes and put all the stuff i work with into those classes to be operated on by class methods. Should I still be trying to use the CLOS with all of my data (say classes that represent JSON objects) to make classes and methods to accomplish things, or
15:12:53
ptdel
should i change my thinking to be centered around getting things done with top-level functions?
15:14:59
ptdel
right now sort of teaching myself by making an api wrapper that signs and sends json over http.
15:15:33
ptdel
I think I've been approaching classes the wrong way, making a defclass and defmethod for each one
15:16:25
beach
You can create a function for constructing a class instance, but it is more common to use MAKE-INSTANCE directly.
15:16:30
Shinmera
ptdel: If you want to look at API wrappers, there's already a bunch out there that can give you an idea on how to go about it.
15:17:00
ptdel
Shinmera: I am looking at turtl and something called cl-amazonproduct which are two CL api's for AWS services. they have been really helpful
15:17:18
beach
ptdel: Think of a class (as viewed by client code) as something abstract that takes a bunch of :INITARGs to create.
15:18:03
Shinmera
ptdel: What I do is map each API endpoint to a function that returns an instance of a class that represents the output of the API call.
15:18:33
Shinmera
I then add generic functions that you can use with these classes to perform the operations the API provides in a more comfortable manner.
15:19:18
ptdel
ah ok, that is sort of what i am trying to do i think. i have some functions for formatting request data and urlencoding things, and then i have classes representing that API calls and their parameters that can be made
15:19:34
ptdel
but i am just making escaped json from the classes right away and passing them to the functions
15:21:12
Shinmera
ptdel: Another approach is to have "raw" API mappers that simply return parsed JSON, and a separate high-level interface that operates on the API with CLOS.
15:21:32
Shinmera
ptdel: That's what I did in Humbler, for example. https://github.com/Shinmera/humbler
15:23:40
Shinmera
ptdel: An example of the former strategy is Chirp https://github.com/Shinmera/chirp
15:25:50
ptdel
that is totally fine. I've done lots of C and Python, so I can pick up most advanced concepts just getting used to the non-algol look of things
15:26:13
ptdel
didn't want to start with things like syntactic sugar, wanted to start with things like asdf and the lisp ecosystem :)
15:27:16
Shinmera
Been a while since I wrote that stuff (2014, jeez) so it'll take me a bit to get back into it, though.
15:30:09
Shinmera
Encouraging comments. :/ https://github.com/Shinmera/humbler/blob/master/deferring.lisp#L28