freenode/#lisp - IRC Chatlog
Search
12:12:06
Xach
phoe: if i were doing it, i would make an object that was adjacent to the gif that produced rendered frames for a given image number.
12:55:57
dim
it used to be that you could export excel files to DBF format, which is better than CSV (anything would be better than CSV), and cl-db3 could then be used
15:25:16
Bike
wrote a lot of stupid programs, then progressively made them less stupid, until today when i have only kinda-dumb programs.
15:26:17
flip214
what's the trick to make READ-LINE return a BASE-STRING? I've tried :external-format and :element-type on OPEN, but without success.
15:29:06
flip214
phoe: I guess you want to point me to that part: > The primary value, line, is the line that is read, represented as a string
15:32:34
Natblida
beach, I understand the way programs work but I don't know the semantics of any language very much. In other words I don't know any language. A little bit of c and python, not something I'm proud of though.
15:33:27
minion
Natblida: look at gentle: "Common Lisp: A Gentle Introduction to Symbolic Computation" is a smoother introduction to lisp programming. http://www.cs.cmu.edu/~dst/LispBook/
15:34:08
minion
Natblida: please look at PCL: pcl-book: "Practical Common Lisp", an introduction to Common Lisp by Peter Seibel, available at http://www.gigamonkeys.com/book/ and in dead-tree form from Apress (as of 11 April 2005).
15:34:09
jackdaniel
Natblida: if you feel more like doing things (instead of learning the basics), you could jump into PCL
15:34:57
flip214
I quite liked reading SICP, and doing the exercises in Common Lisp instead... although that's one more hoop to jump through
15:34:59
beach
Natblida: Most people here recommend you use one of the major free Common Lisp implementations, and that you install and use SLIME with GNU Emacs.
15:37:10
Natblida
The thing with me is I've tried in the past on many programming courses online, like Harvard's CS50 which uses "C". But I get hooked up on the fine details, like how it actually works on a hardware level, things like that. That's a bad way to learn something I think.
15:38:09
beach
Natblida: I recommend you read assembly output from the compiler. I learn a lot that way.
15:38:20
flip214
Natblida: perhaps learning from the bottom up would help you, then, as these parts would already be clear and you wouldn't get distracted that much?!
15:38:59
flip214
CPU, then logic gates, transistors, FETs, ... if you go _really_ down the architectural ladder.
15:40:26
Natblida
beach, Thank you. I just wanna know what your process has been so far. Like how you started, how, etc.
15:40:39
larsen
Natblida: my (general) advice is to pick a project and complete it. this way: you have to learn a set of techniques that are likely to empower you doing different, possibly more complex/bigger things. you end up having a significant codebase that you can review while you learn more of the language (something that often doesn't happen with abstract exercises)
15:41:37
pjb
iqubic: it's definitely a good idea to learn how to write a small program in assembler.
15:42:33
pjb
iqubic: some processors are more fun to program than others, but it doesn't matter: you'll write only one application in assembler, for a life-long lesson.
15:43:00
pjb
iqubic: first/rest/endp means list. car/cdr/null means any kind of structured based on conses.
15:43:23
pjb
because it's the basic building bloc for lists and other kind of structures based on conses
15:44:30
pjb
you can make anything with them. trees, vectors, arrays, structures, objects, whatever.
15:45:31
pjb
iqubic: in lisp, there are 3 kinds of lists: proper-lists, dotted-lists, and circular-lists.
15:47:24
White_Flame
iqubic: cons cells are just 2-tuples. when you treat them like that, "first" and "rest" dont' fit the usage anymore
15:53:27
pjb
iqubic: cons cells don't matter. What matter is the functional abstractions you write above them!
15:54:25
pjb
(defun point (x y) (cons x y)) (defun x (pt) (car pt)) (defun y (pt) (car pt)) (defun rat (num denum) (cons num denum)) (defun num (rat) (car rat)) (defun denum (rat) (cdr rat))
15:55:24
pjb
(defun pt+ (p1 p2) (point (+ (x p1) (x p2)) (+ (y p1) (y p2)))) (defun rat+ (r1 r2) (rat (+ (* (num r1) (denum r2)) (* (num r2) (denum r1))) (* (denum r1) (denum r2))))
15:57:30
pjb
(list (pt+ (point 1 0) (point 0 2)) (rat+ (rat 2 3) (rat 4 5))) #| --> ((1 . 2) (22 . 15)) |#
16:42:59
pjb
(let ((array (make-array '(4 3) :initial-contents '((1 2 3) (4 5 6) (7 8 9) (10 11 12))))) (let ((v (make-array (reduce (function *) (array-dimensions array)) :displaced-to array))) (map-into v (function -) v)) array) #| --> #2A((-1 -2 -3) (-4 -5 -6) (-7 -8 -9) (-10 -11 -12)) |#
16:45:04
Bike
if you don't know the rank you can just use array-total-size and row-major-aref anyway.
17:45:00
some-user
how can i log and ignore condition in around method? (handler-case (call-next-method) (bla () (log))) interrupts chain of around methods
17:46:27
some-user
also Fare do you know if there is a video recording of recent icfp talk about gerbil scheme?
17:50:01
some-user
Bike: ohh, you're right that doesn't make sense i have to handle exception in the method itself and not in :around method of that method
17:51:02
some-user
i thought that one could push error handling in around method(of foo methods e.g) and when something happens in the foo then around method will handle it
17:52:43
some-user
just wanted to add unobtrusive logging of exceptions i don't need to *handle*(returning nil from "foo" is fine)
17:55:27
some-user
pjb: but why? if i have handler-case in innermost around method than why it's not enough?
17:56:10
pjb
Because if there's a non-local exit before you call the next method, then the chain of around methods will be broken.
17:56:55
pjb
you will have to write all your methods as: (defmethod m (…) (handler-case … …) (call-next-method) (handler-case … …)) to be sure that the chain is not broken.
17:58:35
some-user
pjb: so that's impossible to have one around method for exception logging without inserting any exception handling logic in concerte methods and at same time have other around methods working?
18:00:02
some-user
Bike: executing past the point of their (call-next-method), one sec let me write a gist to clarify
18:06:31
Bike
no, right. so, first the b :around is called. that calls the a :around, which calls the b primary.
18:07:45
Bike
if you want the a :around to retain some control, you need to do unwind-protect or otherwise like what pjb said.
18:08:15
Bike
It's nothing particular to :around, it's just that you signaled something, and then handled it farther outside than you wanted.
18:09:57
some-user
yeah, for some reason i thought that primary method is executed by b :around not a :around
18:15:19
some-user
does anyone know if there is a recoding of https://icfp17.sigplan.org/track/scheme-2017#program ?
18:28:51
specbot
Standard Method Combination: http://www.lispworks.com/reference/HyperSpec/Body/07_ffb.htm
19:54:34
francogrex
i remember that some people were "working" still on paul dietz's ansi tests (refining etc). do you know whether it's true or had i imagined it?
20:07:21
phoe
A question about STATIC-VECTORS. What is the idiomatic way of copying a Lisp vector of uint8 into a static vector?
0:03:52
incal
I'm trying to get started with SDL2 and CL with SBCL, after loading the components with quicklisp it says I should run an example like this, (sdl2-examples:basic-test), however the debugger says "debugger invoked on a BORDEAUX-THREADS::BORDEAUX-MP-CONDITION:
0:03:52
incal
There is no thread support in this instance." - I Googled it and it doesn't seem to be too closely connected to SDL (?)
0:08:06
incal
no, I got it from the repos. There is pack I don't have tho that sounds interesting, cl-clx-sbcl, "X11 CL client lib for SBCL"