freenode/#lisp - IRC Chatlog
Search
20:22:04
dmiles
for a shop to run well oiled it usualy takes two non-programmer people to document and interface to the community per programmer
20:26:03
dmiles
i had a programming job where one day a week i had to be interviewed by someone who wrote documentation and translated what i did to english, we had annother person who would get on a mailing list and fight for the design him and i agreed on. i am sure they wished i was all three people.
20:29:10
dmiles
however in the end, there other two people became the only two experts anyone ever heard of
20:30:50
warweasle
dmiles: That reminds me of an incident I had a few years ago. I had done pretty much all the work a part of a project, and I had another programmer who insisted it would not work because it wasn't object oriented. She said "I've worked on billion dollar projects..." I wish I had said: "I work on thousand dollar projects."
20:33:22
warweasle
dmiles: I've heard that "perfect" is the enemy of "done" but I think that "done" is the enemy of "profit".
20:35:14
dmiles
warweasle: admittedly since we adopting the comprimise bettween perfection and getting it done.. we tend to take on much bigger and complex projects (so they might still seem to take a longer time.
20:37:29
warweasle
dmiles: I found the system from "Thinking Forth" works best for me. I create a dictionary of Nouns and Verbs. (Functions and data structures). Then I create a library of functions and tools to solve similar problems to what I am eventually going to solve.
20:43:31
dmiles
planning things out ahead of time exposes a problem i had (I dont know if i still have, i wont tempt fate to find out either).. When i was very young i'd make text adventure games.. I'd get out graph paper and design the dungions and mazes first. all the neat riddles.. then all was left was boring grunt work i didnt feel like doing
20:44:18
dmiles
So now i realize i have to do the design *durring* in order to have the mental orgasms to keep the work going
20:44:55
warweasle
dmiles: What's fun is doing it backwards..."RunTheProgram()" -> "Step01() && Step02() && ..." -> "TurnServoMotor(degrees);"
20:45:31
warweasle
dmiles: I think that's using the computer to help write the code. You can't keep it all in your head.
20:46:00
parjanya
hah, that reminds me of a friend who wrote his entire programs before testing anything... he gave up programming quite quickly
20:47:10
warweasle
parjanya: There are two ways to write bug free code: 1) Test until there are no obvious bugs or 2) Make it so simple there are obviously no bugs.
20:51:47
warweasle
dmiles: One time I used flex and bison to do a large portion of my project. They hated the code it produced...but other than that there were no issues.
20:52:21
aeth
parjanya: That can sometimes work, even in CL. "Okay, now let's see what the compiler tells me I need to fix." followed by "Okay, now let's see what the runtime errors are."
20:55:46
White_Flame
regarding the text adventure stuff, that's where data-driven programming is nice
20:56:02
dmiles
the approach i use to avoid ever having to feel like i am doing "testing" is to use test driven development.. For every functionality i need i start a loop that continually (brutally) calls on what i need to happen but in a differnt window .. as i am typing the code out.. that test window is griping at me
20:57:51
White_Flame
literal data structures to define your world, then code which defers to the data
20:58:58
dmiles
(Like in prolog, we write in our Noun/Verb language, sometimes going in and explaining (in code) what we meant with our noun/verbs)
21:03:03
White_Flame
magic keys for when to perform tests on which game item, etc, and you can do your game logic right in the literal data without any hoops, just a few extra tests in the data processor
21:03:32
dmiles
So in other words "nested lists of strings & magic enums" and then making sure the interpreter you are writting supports all the features that you have been backfilling
21:04:06
White_Flame
I would consider it more of a world description graph than a programming language.
21:04:37
White_Flame
while there's not much of a techincal difference there, the view on it keeps it well contained and avoids general purpose programming feature sprawl
21:08:37
dmiles
i think lisp is the only other language that i can do that comfortably in. Though i used to try to do that still in several other languages. It just becomes crazy with all the extra typing
21:13:34
dmiles
White_Flame: indeed, now i am burried in these data statements https://github.com/TeamSPoon/prologmud/blob/master/prolog/prologmud/mud_builtin.pfc.pl#L600-L873
21:13:35
emaczen
given a C pointer ptr what would be the equivalent CFFI call to pass &ptr as an argument to a function?
21:15:41
White_Flame
dmiles: I'm sure you could either generate or infer all that from within prolog, from much simpler & more straightforward representations
21:17:23
dmiles
White_Flame: well that is what Prolog uses to generate the program .. the program is redesigned from that file
21:17:55
|3b|
more like void**, though you could replace :pointer with (:pointer type) if you wanted... cffi will currently completely ignore it either way as far as i know though :)
21:18:30
|3b|
as far as cffi cares, P is a pointer to a pointer-sized chunk of foreign memory. any further interpretation happens on access
21:19:39
|3b|
(and even knowing it is pointer-sized only really applies to the allocation, it doesn't keep it around to range check your accesses)
21:20:14
dmiles
stuff like "completelyAssertedCollection(tRegion)." means the program should forward chain (pre-create) the world map
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.