freenode/#lisp - IRC Chatlog
Search
21:25:07
dmiles
though what i am saying is that when you mix data with your programming language you get an exponential number of features for free
21:28:06
dmiles
and the nice thing happens that stylewarning says in his video about somone complaining about his code: "I cant look at your code and see that it is doing anything"
22:30:08
alandipert
is the 'lambda macro in ZetaLisp' referred to in http://www.nhplace.com/kent/Papers/Technical-Issues.html a compiler macro in modern parlance?
22:38:59
fdund
hi, does anybody know approx. how much an allegro CL license will cost for a SaaS app?
23:21:03
fiddlerwoaroof
On the other hand, allegrocache probably is easier to use: for pricing information, you'd have to talk to Franz's sales team
23:22:05
fiddlerwoaroof
I think they charge a percentage of the sale price for apps you distribute, but I don't know how this transfers to SaaS
2:40:42
dalkire
is anyone familiar with socket programming using usocket? i'm trying to connect to a server, but i'm having some difficulties and i don't exactly know how to go about debugging.
2:41:54
dalkire
(setf *socket* (usocket:socket-connect "freechess.org" 5000 :protocol :datagram :timeout 5))
2:42:46
dalkire
i'd like to inspect the usocket:datagram-usocket i get back, but i get an error trying (slot-value *socket* 'connected-p)
5:14:47
JJBby
I am just getting started on learning programing and Lisp seems very interesting any good reads on why to try list?
5:16:20
beach
If so, and if you already know some other programming language, then most people here recommend PCL.
5:16:28
minion
JJBby: direct your attention towards 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).
5:18:23
JJBby
beach, i think i was looking more for something explaining lisp and its uses. or an overview of lisp
5:18:41
parjanya
he seems to be just starting programming at all, and asks why Lisp would be a good one to start with
5:19:50
beach
JJBby: Otherwise, Common Lisp is a general-purpose programming language that supports multiple paradigms, so you can use it for basically anything.
5:20:46
parjanya
it’s quite a broad question, JJBby :) most languages do things more or less the same, they differ in small details; lisp is quite different overall, and people tend to say that lisp teaches one to think about programming in a better way
5:21:43
parjanya
I would start reading the Practical Common Lisp and see how that feels... try it, nothing anyone says will replace you trying
7:06:08
waynecolvin
do CL floating point numbers need to be binary, rather than BCD or something else? what if a system doesn't have a FPU?
7:07:58
beach
You can still implement the operations in software, even if it is binary. I haven't thought much of your question. But it looks pretty tied to binary.
7:11:24
eviltofu
In CLOS, can we specify a slot and limit its type to a class? (defclass tag () (value :initarg :value)) I want value to be symbol only.
7:11:39
beach
waynecolvin: Maybe not. I suggest you read the Common Lisp HyperSpec page for decode-float and see what you conclude.
7:12:48
beach
eviltofu: The implementation may not check it for you though. SBCL does if you have a high enough DEBUG setting.
7:15:57
eviltofu
"The consequences of attempting to store in a slot a value that does not satisfy the type of the slot are undefined."
7:19:40
beach
It is typical for a language definition to have unspecified behavior. You must either choose an implementation (and a DEBUG setting) that you know will verify it for you, or else, you check it yourself in a :BEFORE method on the setter.
7:21:14
beach
(defmethod (setf thing) :before (new-value (object my-object)) (check-type object symbol))
7:22:22
beach
eviltofu: If you are new to Common Lisp, you should know that it is much less common to use type declarations than it is in other languages.
7:23:31
beach
eviltofu: In fact, many people think that providing type information early on in a project is detrimental to productivity, because you are forced to specify too early what types you want.
7:36:48
beach
I don't use any myself, because using ASSERT is enough, and the type of tests that the typical testing framework allows is often not what I want.
7:39:27
beach
Perhaps the proliferation of testing frameworks is an indication that it is hard to write one that satisfies the needs of all projects.
7:41:46
beach
For example, when I implement a data structure, I often write a second, trivial and slow, implementation of it. Then I generate random operations on both of them and use ASSERT to check that they behave the same way.
7:48:10
eviltofu
Sorry, I misunderstood. I thought you meant assert alone in the code was enough. You are still writing tests but using assert instead of a test frame work.
7:55:14
shaftoe
im writing some code, and there's a bunch of validations i want to perform before executing a function... but i don't want a whole bunch of nested if tests
7:56:40
beach
You could put the tests in a separate function. Or you can use a :BEFORE method. But I can't see how you can avoid executing every validation.
9:09:26
waynecolvin
shaftoe : is this lame? (defun try-test (expr) (if (eval expr) nil t)) ~> (assoc-if #try-test '( (test-1 . 'fail-report-1) ... ))