libera/#lisp - IRC Chatlog
Search
21:41:57
pjb
jcowan: as an example of this, check how ASDF displays the dots while compiling systems.
23:42:14
HM0880
Hello, can I use my existing GitLab account to sign into https://gitlab.common-lisp.net/, or do I need to make a Common-Lisp GitLab account?
23:58:04
White_Flame
so no, it wouldn't have anything to do with the accounts registered on the one that gitlab.com is running
0:06:10
aeth
doesn't really say much about Gitlab's confidence in gitlab.com that you can sign in with other sites (even Github!) but not with Gitlab
0:08:02
HM0880
My question was unclear: https://gitlab.common-lisp.net/users/sign_in does not accept my existing Gitlab credentials.
0:08:40
HM0880
https://common-lisp.net/project-intro has an email for a CL admin, but that email looked like it was intended for joining a project; I just want to report an issue.
0:10:43
edgar-rft
HM0880: in case of doubt there's a #common-lisp.net channel where you can ask the admins themselves
8:09:40
rendar
reading the book Structure and Interpretation of Computer Programs says that the language it convers is Scheme and not Lisp, is this normal?
8:14:39
jackdaniel
I've noticed a glitch in the matrix, it may be that they do something to the r eality ,)
8:15:36
jackdaniel
Lisp is often used in a sense "languages that descend from LISP 1.5", in this sense scheme does not qualify. that said scheme is considered a lisp dialect regardless by many (if not most) people
8:31:23
wasamasa
there is this weird split between people who believe lisp means a family of lisp languages and that lisp means CL and CL-like languages
8:52:45
pjb
rendar: that's correct. scheme is more pedagogical a programming language than Common Lisp. That's why it's often used in books and lectures.
8:53:13
pjb
rendar: but as a programmer you must be used to switching to different languages, and even to write programs that work as-is in several languages!!!
8:54:37
jackdaniel
sicp is a book about writing programs, scheme is used as a language to illustrate various concepts
8:54:51
pjb
rendar: see for example: https://github.com/informatimago/happy/blob/master/happy.source or Have a look at (intersection common-lisp emacs-lisp scheme) http://www.informatimago.com/develop/lisp/com/informatimago/small-cl-pgms/intersection-r5rs-common-lisp-emacs-lisp/
8:55:11
pjb
rendar: it's a common misconception. sicp is not a book about lisp or scheme. It's a book about programming!
8:55:34
pjb
rendar: people have been doing the exercises in sicp in all kinds of languages, from CL to C++.
9:04:11
rendar
can we say that a symbol is a string, and that the environment is an hash table mapping that string, to that internal structure?
9:06:24
rendar
well, that every Lisp have an internal representation of a symbol is a no brainer thing, its obvious, what i want to get is that internal structure is the 'value' whose symbol name (the 'key') points to, with an hash table
9:07:49
pjb
rendar: but quite often the name doesn't matter at all. You can (make-symbol "") #| --> #:|| |# and this can be useful (eg. in macros).
9:08:03
jackdaniel
yes, the symbol name is a string, and you may use hash tables to implement most mappings if you assume that there are no packages (i.e symbol names are unique)
9:08:22
pjb
rendar: we often use gensym in macros, to get different symbol names, but this is only useful when you debug the macro, to not be confused by different symbols having the same name.
9:09:19
pjb
rendar: note that usually you don't want the value stored in the symbol whose name is given.
9:10:31
pjb
rendar: basically, the system could throw away all the symbol names at runtime, and keep working.
9:10:55
pjb
(unless, of course, you do some reading at run-time, which often occurs of course; but it's independent).
9:13:51
rendar
as i am writing a little lisp interp, i had these doubts because i'm implementing the parser which will return a tree of nested python tuples, .e.g `('+', 2, ('+', 4, 5))` then the evaluator will evaluate that tree.. as you can see symbols are strings here, which the Env mapper will map to something valuable, e.g. '+' will be mapped to op.add()
9:13:53
pjb
rendar: but the name could very well not be stored directly. Instead of a hash-table, you could use a tree, so you could still map names to symbols, but to find out the name of a symbol, it would be a more complicated procedure. This would save a lot of memory (reduce '+ (list-external-symbols "CL") :key (compose length symbol-name)) #| --> 11271 |#
9:14:41
rendar
now, instead of plain strings, i have used an object Symbol, just to differentiate it better, so i had this python tuple: `(Symbol('+'), 2, 3)` for `(+ 2 3)`
9:15:13
rendar
but Symbol('+') is just a "typedef" for string, it is NOT the internal representation of a symbol
9:15:59
rendar
because Symbol('+') will be the *key* for an hashtable, and the value will be something like SymbolInternal() object which will contain function, values and so on
9:16:10
jackdaniel
mind that even if a symbol is defined as a structure with pointers, it does not mean that you are operating on these values; i.e you may have bindings in your lexical or dynamic environment for both variables and functions
9:17:24
pjb
rendar: yes. symbols, characters, strings, integers, floats, conses, vectors, arrays, structures, etc.
9:25:55
rendar
now, how in lisp is called the structured POINTED by symbol name? e.g. .. in `(setf x 2)` somewhere internally there will be an hash table pointing str->something, e.g. 'x' (key) -> something (value)
9:26:56
pjb
packages are more than just a hash-table, since they manages the use of other packages, the shadowing of symbols, and an export list.
9:27:46
pjb
The s-expression is read with *package* bound to the current package. By default, it's the package named "COMMON-LISP-USER".
9:30:01
pjb
rendar: now, other lisps may have no package. eg. emacs lisp instead only uses obarray. They're like the underlying structure of a hash-table.
9:31:34
pjb
here is an implementation of a package system and a lisp reader: https://gitlab.com/com-informatimago/com-informatimago/-/tree/master/common-lisp/lisp-reader
9:32:13
rendar
what i mean is that with `(setf x 2)` there will be a struct somewhere where that 2 is stored.. how we can call that structure? SymbolInternal..?