freenode/lisp - IRC Chatlog
Search
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
17:12:13
slark
Bike: he used a crazy example i cant undestand at all something like (defun (setf f) (param) body)
17:13:45
Shinmera
The latter having the effect that if you then use (setf (name ..) bla) it'll invoke that function with bla and .. as arguments.
17:40:24
Grue`
what could that mean? "fatal error encountered in SBCL pid 24554(tid 0x7fffe7daf700): blockables unblocked" happens when calling GraphicsMagick's MagickReadImage through CFFI
17:43:09
Fare
Alastair Bridgewater had some hints on how to fix SBCL signal handling so you can dynamically modify it, but he never implemented it nor did anyone else
17:43:36
Shinmera
Recompiling magick without the signal handlers would probably be easier and work better.
17:44:20
Shinmera
Fare: Sure. I just don't think it's a feasible approach for Grue` at the moment :)