Search
Thursday, 14th of December 2017, 1:37:21 UTC
2:36:25
attila_lendvai
** NICK Guest28583
3:29:42
beach
Good morning everyone!
7:10:20
poorbean
hi I'm new in lisp, but python in mit is very bad to me. C beginning book is better, but I don't know which book is good? Thanks
7:11:22
beach
Wrong channel. This channel is dedicated to Common Lisp.
7:15:20
poorbean
Hi beach can you help me, I'm Chinese. But I don't know the good book in begin when someone to competition?
7:15:38
Shinmera
I wonder why it happens so often that scheme people tumble in here when there's literally a channel called #scheme.
7:16:11
beach
poorbean: Like I said, this channel is dedicated to Common Lisp. If you want help with Common Lisp books, this is the right place to ask.
7:16:26
beach
poorbean: But if you want advice about Scheme books, you are better off asking in #scheme.
7:16:28
hajovonta
poorbean: scheme is different than Common Lisp
7:16:56
hajovonta
it's another lisp dialect
7:17:52
hajovonta
how would you explain it to a beginner?
7:19:07
beach
What Scheme is? A programming language that is not Common Lisp.
7:21:31
jackdaniel
well, many people include scheme in Lisp language family.
7:21:56
Zhivago
It should rather be that Common Lisp is in the Scheme family, sort of.
7:22:20
Zhivago
Since that's where it got its lexical scoping from.
7:22:27
jackdaniel
yes, that's why definite answer, that it is not lisp is not entirely fair
7:22:43
Zhivago
I think the claim was that it is not Common Lisp.
7:22:57
jackdaniel
it is not common lisp of course
7:23:01
jackdaniel
maybe I did read it wrong
7:23:04
beach
jackdaniel: I was merely pointing out that whether this or that language is "a Lisp" is not something that is widely agreed upon.
7:23:09
Zhivago
Personally, I'd rather common lisp staked out #commonlisp or something.
7:23:58
beach
Sorry, my fault. Let's drop it.
7:24:43
Zhivago
It's not like lisp is so incredibly popular that we need to be so exclusive. :)
7:38:38
Fare
poorbean, Scheme books for beginners include How to Design Programs, The Little Schemer.
8:35:50
ambisinistrous
** NICK nalkri
10:43:15
minion
why Lisp: The first chapter of Practical Common Lisp: http://www.gigamonkeys.com/book/introduction-why-lisp.html
10:43:16
minion
Younder, memo from flip214: speak slowly and carry a megawatt-laser.
10:43:57
Younder
Gotcha, You can add memo's
10:46:47
Younder
I take it from flip214 that I need to speak perfectly conceptually clear. And I rely on the spell checker because a simple comma can label me as an idiot,'
10:47:59
Younder
I take it from flip214 that I need to speak perfectly conceptually clear. And if I rely on the spell checker because of a simple comma can label you can still me as an idiot.
10:48:19
Younder
Editing is indeed great :)
10:52:39
Younder
Naw, with geniuses like you who needs a purpose, all you need is an itch.
10:55:22
Younder
A X-mas present to Xach, from old bann'able and subsequently unemployable younder.
11:12:11
myrkraverk
In SBCL, what does "illegal terminating character after a colon: #\" mean?
11:12:28
myrkraverk
The colon in question is inside " "s, so I really don't understand the error message.
11:13:09
Shinmera
Are you sure it's actually in string quotes
11:13:42
myrkraverk
I can double check, and/or replace the "
11:14:01
Shinmera
Because the error means the comma is not actually inside a string.
11:14:35
myrkraverk
Ok, maybe there's some utf-8 corruption here; and or not ascii "
11:14:45
Younder
Multiple "" like you forgot one earlier?
11:15:39
myrkraverk
Yeah, just thought of that; checking now.
11:16:00
Shinmera
Syntax highlighting should catch these kinds of things
11:16:32
myrkraverk
I'm on remote, for this task; ssh and no syntax highlight.
11:17:10
Younder
myrkraverk, I recommend vim and syntastic.
11:17:22
myrkraverk
Call me lazy, but I just use nano.
11:17:31
Shinmera
Well you reap what you sow.
11:20:42
Younder
Whatever, on a remote terminal, vim with syntasic is just about the best you can get.
11:21:16
Younder
But you can use EMACS as well
11:22:04
Younder
'emacs -nw' gives you the text interface
11:24:40
Shinmera
Or, y'know, as I already said, just use tramp in your local emacs.
11:25:51
Younder
Yes, but then X over SSH has to be enabled. (which I don't recommend)
11:26:27
hajovonta
tramp doesn't require X
11:26:42
Shinmera
Tramp is basically just an mode for emacs that copies the file in the back through SSH when you save/load.
11:28:21
jackdaniel
make file access great again
11:28:28
jackdaniel
or something like that
11:33:51
myrkraverk
Can I convert from (vector character <number>) to simple-string ?
11:34:09
myrkraverk
I don't know what the <number> means. And google doesn't seem to be much help.
11:34:24
solene
hello, is it possible to "validate" read-char using a #\Space ?
11:34:44
solene
I'm displaying text in a terminal and I would like to continue scrolling using #\Space
11:35:30
jackdaniel
first you need to turn off line buffering in your terminal
11:36:49
myrkraverk
My first attempt with coerce was unsuccessful.
11:37:30
jackdaniel
myrkraverk: <number> means how many elements vector has
11:37:36
solene
jackdaniel, is it possible from common lisp or does it require some C code ?
11:37:45
Younder
A 'terminal' is just a DEV VT 200 or so emulator
11:38:03
jackdaniel
solene: I bet it is possible - in worst case with cffi
11:38:15
jackdaniel
but I don't know how exactly, you have to look around
11:38:32
myrkraverk
When I do (coerce 'simple-string foo) ; where foo is (vector character 40) why do I get: SIMPLE-BASE-STRING can't be converted to type (VECTOR CHARACTER 40) ?
11:38:47
myrkraverk
Oh, maybe I'm using coerce wrong.
11:39:22
jackdaniel
(coerce #(#\a #\b #\c) 'string) ; works for me
11:39:39
jackdaniel
but it is simple-vector
11:40:01
jackdaniel
also, simple-base-string has base-char elements, while there is no guarantee, that character is a base-char
11:40:31
myrkraverk
The function I'm trying to feed this accepts simple-string and simple-base-string.
11:40:44
myrkraverk
And C strings; but I'd rather avoid that headache.
11:41:51
myrkraverk
Now I just get "The value VECTOR is not of type BASE-CHAR"
11:41:59
myrkraverk
Some with simple-string
11:42:40
myrkraverk
VECTOR is not of type CHARACTER
11:42:49
Younder
BASE-CHAR is configurable. Are you isning SBCL?
11:45:11
Younder
you might wanna look at: https://github.com/sbcl/sbcl/blob/master/src/code/reader.lisp
11:46:40
Younder
Rember all functions are over loadable in runtime. But be careful.
11:46:59
myrkraverk
I hope I can work around this without messing with SBCL's internals.
11:47:27
myrkraverk
Such as custom looping through the vector to create a simple-string, or something.
11:49:06
Shinmera
(replace (make-string (length s)) s)
11:50:38
pjb
jackdaniel: cffi = requires some C code.
11:51:11
pjb
solene: what about using RET instead of SPC? Just use (read-line).
11:52:21
pjb
solene: if you insist on SPC, have a look at implementation specific features such as #+clisp ext:with-keyboard, or at cl-charms (ncurses).
11:52:32
solene
pjb, I would like to be able to use both, I use get-char now and it works well with RET (it's also possible to type others characters in my software)
11:52:55
solene
I think I'm going with a little of C code, I already have an external C library so most of the work is already there
11:54:04
pjb
You may also use termios, with cffi, but I'd be weary of changing the characteristics of the file descriptor under CL streams.
12:24:27
jackdaniel
pjb: cffi = calling foreign code, that's all. You don't have to touch C to use functions using this calling convention
12:55:39
hajovonta
can I somehow check if a stream is open or is already closed ?
12:56:05
jdz
hajovonta: closed on which end?
12:56:52
jdz
One way is to try to read or write, and handle the errors.
12:57:05
hajovonta
yeah, that's what I'm doing now
13:04:48
pjb
jackdaniel: cffi has all the disadvantage of the C code compiled with the C compilers requiring cffi.
13:05:30
specbot
http://www.lispworks.com/reference/HyperSpec/Body/f_open_s.htm
13:22:44
beach
Nope! You will have to send him email.
13:33:20
jdz
Email is a better first thing to try, though.
Thursday, 14th of December 2017, 13:37:21 UTC