freenode/#lisp - IRC Chatlog
Search
5:57:59
|3b|
for example http://www.lispworks.com/documentation/HyperSpec/Body/f_cons.htm tells you what CONS does
6:10:39
asarch
I was reading the chapter 2 from "Land of LISP: Learn to Program in Lisp, One Game at a Time!" book and I found the flet command
6:12:01
beach
asarch: Try to use the right terminology. Common Lisp doesn't have any "commands". FLET is a "special operator".
6:12:37
asarch
https://www.amazon.com.mx/gp/product/1593272812/ref=oh_aui_detailpage_o01_s00?ie=UTF8&psc=1#reader_B004AE3P4K
6:14:04
|3b|
ACTION thinks it is an OK simplification if it succeeds at its goal of making it interesting to get started
6:19:23
|3b|
ACTION has the impression it tries to present (lisp) programming as "interesting/fun thing you might want to investigate more on your own" as opposed to "boring/difficult thing that must be pounded into your head by authority figures", which seems like a good goal :)
6:21:56
whoman
the art style is personal, very well done. its inspired realm of racket but i havent seen that
6:23:19
beach
https://www.amazon.co.uk/Land-Lisp-Learn-Program-Game/dp/1593272812/ref=sr_1_1?ie=UTF8&qid=1517120584&sr=8-1&keywords=land+of+lisp
6:24:01
asarch
If a book would cost, for example, $100 USD. How much exactly do you earn from every book?
6:24:46
|3b|
does .mx have some different interpretation of $ ? prices seem odd there in general if interpreted as USD
6:26:59
beach
asarch: That is why I use self publishing instead. The margin is higher, and I can set the price myself (it has to be higher than the printing cost).
6:30:22
asarch
"Programming languages teach you not to want they cannot provide" —Paul Graham, ANSI Common Lisp
6:33:32
asarch
"(defun addn (n) #'(lambda (x) (+ x n))). What does addn look like in C? You just can't write it"
9:08:21
phoe
in-package is a macro and accepts #1=a string designator, not something that evals to #1#
9:08:44
dmiles
just weird that ecolisp used to let itself get away wiuth that.. sinc ei swear i have seen at least one other lisp do that as well
9:11:37
dmiles
(defmacro in-package (name) `(eval-when (:compile-toplevel :load-toplevel :execute) (%in-package ,(string name))))
9:16:08
dmiles
LarKC, CYC which used their own lisp dialects do impl as a function.. and a few years later 2001 when renamed to ECL.. it started doing "SYSTEM"
9:17:14
dmiles
I am using EcoLisp to bootstrap my WAM-CL lisp as back in the old days EcoLisp had not C-ified everyhting yet the way ECL has
9:21:16
dmiles
I think what happens is a developer will convert a .lisp function to .c .. get tired of converting that every build and start improving it from C while erasing the original .lisp
9:22:31
dmiles
so even if you grep the source repostiory the .lisp function is way behind the improvments maintained in C
9:39:14
shrdlu68
I've been messing around with compression, and I'm pleased that I've written something that appears to beat gzip in terms of compression ratio. It's based on a simple binary arithmetic coder.
9:59:31
Folkol_
Sounds good, shrdlu68! Did you try different gzip compression levels? How do they compare in speed?
10:06:37
dmiles
oh i guess there is something here: https://books.google.com/books?id=ciQEHp39pAkC&pg=PA57&lpg=PA57&dq=wam+common+lisp&source=bl&ots=Vyt8Y3nGMe&sig=zk2lk81j_0FPOVdTJtCrvsR1ugU&hl=en&sa=X&ved=0ahUKEwjct76ptPrYAhXFjVQKHWqwANcQ6AEIeDAN#v=onepage&q=wam%20common%20lisp&f=false
10:09:07
stylewarning
I’ve been interested in donating money to a pool to restore and modernize old Lisp projects from the 70s–90s.
10:11:05
stylewarning
For instance, I discovered Yale Haskell, which seems to have CL compatibility. Would love to see it run again.
10:12:27
dmiles
I'd like to see people put such programs together using a common blackboard (to share overlapping datastructures)
10:14:49
dmiles
it allows DAYDREAMER to use SWALEs data which daydreamer was designed for but never got a chance
10:18:21
dmiles
you are correct not even as employees has been allowed to combine any of the above systems :P
10:22:21
dmiles
here is a chanriac like output (to see what i am talking about ... https://docs.google.com/document/d/1rdI_f-2YnX0e2RD6rGAY57YAqzLj2xHsk36m5HT6SoM/edit )
10:25:08
dmiles
"AFAIK they built some huge DB of common knowledge with some reasoning skills" <- very close.. what they built was a Knowledge Representation language that was ideal for how programs would share data
10:25:56
dmiles
(of course along with what you said.. they just dont promote that part of the project.. which btw was the only reason for funding)
10:49:33
dmiles
anyhow that has been my lifes mission for a long time.. to combine those old AI programs into a Inference engine
10:52:46
dmiles
(i used the word "recreation" only so to say that there is not much technological innovation required)
11:48:38
megachombass
well, i want my code to do the same thing, but written in different way: https://codeshare.io/GkwJYA
14:07:05
pjb
megachombass: you know, nowadays, you just cannot copy anything or get help from any programmer without the teacher being able to EASILY and trivially know it.
14:08:09
megachombass
whats wrong with this let syntax (let (vm (make-vm 1000)) (vm2 (make-vm 1000)) fibo1 fibo2 fact1 fact2)
14:08:48
pjb
megachombass: current DNA-research, machine learning and artificial intelligence techniques exist to easily 1- match source code with other source code to determine their common ancestor, whatever the transformation you make on it (notably, renaming, things you can do with replace-regexp, are completely transparent), and 2- identify the AUTHOR of a chunk of code!
14:09:11
megachombass
+, teacher got absolutly no idea what is our coding level, even wonder if he know who i am
14:09:19
pjb
megachombass: basically, if your teacher cares, he will run the program on the code, and he will know, line by line, who wrote it, what git repo it comes from, etc.
14:09:44
_death
you should also know that the lisp community isn't that big, that some professors reside here, and that this channel's log is publicly available
14:09:54
pjb
megachombass: nothing is wrong in the syntax of: (let (vm (make-vm 1000)) (vm2 (make-vm 1000)) fibo1 fibo2 fact1 fact2)
14:11:28
pjb
megachombass: it means: create a variable named VM, bind it to NIL. create a variable named MAKE-VM, bind it to 1000. Call the function vm2, with as argument the result of the call of the function make-vm with as argument 1000. Ignore the result. Evaluate a free variable fibo1. Ignore the result. Evaluate a free variable fibo2. Ignore the result. Evaluate a free variable fact1. Ignore the result. Evaluate a free variable fact
14:12:51
pjb
megachombass: https://books.google.fr/books?id=waUzDwAAQBAJ&pg=PA286&lpg=PA286&dq=identify+code+author&source=bl&ots=xKeviX41nO&sig=mztxKotHQkwV_xbqe3dqug6lzQI&hl=en&sa=X&ved=0ahUKEwjX6oy66_rYAhXKBcAKHQGbDpwQ6AEITTAF#v=onepage&q=identify%20code%20author&f=false
14:15:14
pjb
megachombass: just time to write an essay explaining what you've done, what problem you have, and make a planing indicating how much time you'd need to implement the project.
14:17:06
pjb
megachombass: oh, true, if I was a lisp teacher, obviously I would already be on all the lisp irc channels, the lisp newsgroups, the lisp forums, and they'd be logged.
14:17:26
pjb
megachombass: notice how beach routinely ask people whether their new in #lisp, and check them in his logs…
14:21:07
megachombass
and to avoid banhammer, i will clearly specified (thanks to pjb for his help on this project, without him this wouldnt exist)
14:24:28
pjb
megachombass: but seriously, at this point if you want to save your skin, writing a project report explaining the failure, how it occured, and what you could do to recover and complete the project (whatever time you'd need), is IMO the best option.
16:24:49
phoe
FLET ADD is not really readable for me. The function name ADD sounds like mathematical addition to me.
16:35:27
beach
ebrasca: Your LOOP clauses are not correctly indented. I suggest you use the slime-indentation contribution to get them right.
16:37:36
beach
In my .emacs I have: (slime-setup '(slime-fancy slime-tramp slime-asdf slime-indentation))
16:38:40
beach
In Common Lisp code, there is usually one blank line between each top-level form and no blank lines anywhere else.
16:40:44
beach
ebrasca: Perhaps, but the problem is that you are submitting it for others to read. So then, you should make it such that it is easier for THEM to read, and the best bet is then to follow established conventions.
16:43:11
pjb
ebrasca: basically, if you need to insert a blank line in a function, it means you should refactor it, calling smaller functions.
16:45:30
beach
Then use '() to initialize it. NIL means either the Boolean value false, or some default value. Not the empty list.
16:46:22
beach
ebrasca: '() is the empty list 'nil is the symbol NIL, () is the empty parameter list, and NIL, like I said, is a Boolean or a default value.
16:49:01
beach
On a deeper level, I find it confusing the way your macro introduces variables, such as NAME that then occur without context when the macro is called. It suggests that the macro does not correspond to a very good abstraction.
17:14:12
beach
ebrasca: I guess I can be more specific after you put in comments describing what each function and macro does. That way, I can more easily tell whether they represent good abstractions.
17:20:03
ebrasca
write-metadata write some metadata like file-size , last-write-date to file/directory.
17:24:17
beach
OK, I am looking for a more detailed description. Like the type and role of each parameter, especially those of do-cluster. And I am looking for a kind of contract for it. Obviously it seems like it introduces variables such as NAME, CHECKSUM, etc. How does the body (bodies?) use those variables. What are their values, in each iteration. What is FINALLY, IF-T, IF-NIL and why are they named that way? etc, etc, etc.
17:26:26
beach
I am not looking for a one-liner here in the channel. I am looking for a comment or a docstring, or both, that I can compare with the code.
17:31:14
beach
It seems I have a few more minutes. I have no idea what you mean by "IF-T is for what is diferent in if if it is t"
17:32:54
beach
If that is the case, I am now convinced thet do-cluster is not a good abstraction. Abstractions should be possible to understand by reading the name and the parameters (and the comments to those parameters), not what is inside it.
17:33:51
beach
So, you are basically saying "Hey, macro user, in order to know how to use this macro, you need to read the code for it. In fact, you need to read the code for it just in order to understand why the parameters are named the way they are".