freenode/lisp - IRC Chatlog
Search
22:03:18
didi
"The scope of the binding of var does not include the list-form, but the result-form is included."
22:05:49
pjb
Because "It is implementation-dependent whether dolist establishes a new binding of var on each iteration or whether it establishes a binding for var once at the beginning and then assigns it on any subsequent iterations."
22:06:37
pjb
So (dolist (x '(1 2 3) x)) results in a warning about an unused variable x (in the body) :-)
22:11:49
vtomole
How do I do file io in quicklisp? When I try to open and close a file outside my local-project directory, I get " There is no applicable method for the generic function #<STANDARD-GENERIC-FUNCTION SB-GRAY::PCL-CLOSE (2)> when called with arguments (NIL)."
22:15:42
vtomole
Looks like an SBCL thing : https://sourceforge.net/p/sbcl/mailman/message/30611811/. I'll look more into it.
22:17:10
Xach
vtomole: i don't really understand the question. quicklisp does not normally get involved in file io.
22:19:03
vtomole
(defun compiler (code output) "Reads code file and compiles each expression into output file" (let ((in (open code :if-does-not-exist nil)) (out (open output :if-does-not-exist :create :direction :output :if-exists :supersede)).......
22:21:41
Xach
vtomole: it seems as though you are calling CLOSE on a thing that is nil, and giving the error.
22:21:55
Xach
vtomole: can you share more of the code through some paste service? like perhaps all the code?
22:26:36
Xach
vtomole: i think it would be worth arranging things so that you can use WITH-OPEN-FILE.
22:27:36
Xach
and :if-exists :error would be fairly normal if you only want to proceed on a file that exists
23:23:13
vtomole
With respect to a shebang script "#!/usr/bin/sbcl --script (ql:quickload :eagle)", I get "Package QL does not exist." When I run it.
23:28:54
vtomole
Make sense. idk how i should approach in that case. I don't want to call sbcl --noinform --eval
0:25:03
drmeister
I started porting maxima to clasp. I had to add core:make-unspecial. Does anyone know anything about maxima - should I anticipate any trouble?
0:30:34
didi
Hum, passing DECLARE forms to my own macros isn't easy. The compiler complains about evaluating them. I see that SBCL has a function just to separate DECLARE forms from body. I will try to piggyback some build-in construct.
2:28:18
didi
Hum. Why is (eql symbol 'declare) from any package? In other words, is the symbol `declare' special?
2:32:10
Bike
both the foo and bar packages USE the cl package, so they have the same symbol from cl.
2:37:20
whoman
"KCL is notable in that it was implemented from scratch, outside of the standard committee, solely on the basis of the specification. It was one of the first Common Lisp implementations ever, and exposed a number of holes and mistakes in the specification that had gone unnoticed."
2:42:15
Bike
e.g. closer2mop defeines a "closer-common-lisp" package that you're supposed to use instead of cl.
2:45:23
didi
Hum. Instead of loading alexandria, one could write a replacement for cl with all the goodies.
2:47:58
rumbler31
whoman: you can probably get pretty good results by defining a union of function pointers.....
2:48:30
rumbler31
that way the compiler might let you more easily pass functions of a variety of signatures to higher order functions. maybe.
2:48:47
whoman
im talking about this again today too, a lot of stuff can be done with C+funptr; even hierarchical object system seems unecessarily complex for most tasks
2:49:09
whoman
organizational nightmare, especially while still designing. flat naming should be enough if we are skillful with our words and letters
3:00:46
stylewarning
Hey all: Can I unsafely turn a byte array into an array of complex double float, unportably without copying in SBCL?
3:53:14
stylewarning
another question: Is there a way to get the raw unfill-pointered array of an array with a fill-pointer?
5:40:01
johnnymacs
I am thinking I would really like to write in common lisp but then I cant take my code and use it in emacs
5:40:15
johnnymacs
like what if I make a cool thing with hash tables and then I have to hand compile it to emacs lisp
5:40:46
beach
Emacs has a Common Lisp package these days. Write it in a subset that will work in both Emacs and Common Lisp.
5:44:26
johnnymacs
I am thinking of a DSL that is meant to pass code freely between scheme lisp and elisp. It would use the lambda calculus for the logic programming and hash tables to manage memory. In scheme you would have to use hash tables to implement an immutable tree
5:47:36
whoman
ahhhh https://yoo2080.wordpress.com/2013/08/16/differences-between-common-lisp-and-emacs-lisp/
6:02:08
pjb
whoman: you would have to add reader macros to all the characters. Some implementations use a-list for the reader macro table. Even if you only had mostly base-char in your sources, this would require several tens of memory accesses to read each character before executing your reader macro. It would not be difficult to implement, but it would be very ugly.
6:10:30
whoman
pjb: what do you mean, for C+CL ? or for a lisp file that compiles to scheme,cl,elisp ? ive seen that file, there were a couple of macros but it was mostly compiler switches for the parts where the langs were different
6:22:07
pjb
whoman: it would be preferable to prefix the code where you want such drastic syntactic changes with a singular reader macro.
6:22:35
pjb
So that you can implement your own lexical and syntactic analysis more classically and cleanly, than going thru the readtable.
6:24:23
whoman
http://lisp-lang.org/ <-- see first example clipping here. keywords are kind of hideous
6:27:59
whoman
one day i realised i dont type direct digital numbers merely as often as i type all the symbols they hide under shiftmodding
6:38:15
pjb
whoman: also, you can trivially write an emacs command so that when you type foo: SPC, it changes it to :foo.
6:52:22
whoman
pjb: oh true! also emacs can display words/stuff that is different than whats in the buffer. forgot about that...
7:44:55
beach
Improved arrow rendering for incorrect indentation in Second Climacs: http://metamodular.com/gutter3.png Notice that it still doesn't know how to indent DEFMETHOD and LOOP, hence the arrows in that picture.
7:56:26
loke
ACTION needs to test it again. Please remind me where is the official repository for second climas?
8:08:59
cess11
Not sure if the maintainers of http://lisp-lang.org/learn/continuous-integration are here but if you are, the link to JSCL seems to be out of date and ought to be replaced with https://github.com/jscl-project/jscl .
8:10:36
loke
OK, I have a few issues. Which one of these do you want me to try to fix? 1) Cursor keys are not mapped. 2) The cursor takes up horizontal space. 3) Graphical artifacts when scrolling. 4) TAB key is not mapped to anything sensible.
8:11:09
beach
loke: My plan was to get enough functionality related to Common Lisp editing working, because I think I am the only one with ideas in that respect, and then leave a lot of the rest to contributors.
8:12:03
loke
beach: I find it to be hhugely distracting. Would you be OK with making it a configurable option?
8:30:43
epony
beach did you write this? http://metamodular.com/Psychology/continuous-improvement.html
8:41:22
bjorkintosh
epony, that's funny. I just discovered the same essay a few minutes ago! and then beach showed me Dweck's video on growth mindset https://www.youtube.com/watch?v=isHM1rEd3GE
8:45:14
epony
that's funnier, I was just processing the knowledge collection here, so it just fits in the work I was previously doing
8:46:21
epony
I think I am in this channel here exactly for the learning and continuous improvements aspects and find it intriguing it relates to Lisp.
8:55:02
loke
Clearly we need a package called “Llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch”