libera/#commonlisp - IRC Chatlog
Search
23:28:15
nij-
bike Sorry, I remembered part of that conversation. But I thought it wasn't clear; or maybe I misunderstood.
23:33:58
bike
i'll say it again: all existing lisp implementations operate in terms of just one global environment. the environment can't be swapped out.
23:36:13
nij-
Yes, that's right. I'm thinking about bocl though.. how it should handle envs in the first place.
23:59:09
nij-
Ah! If a CL implementation want to provide first class global env, besides providing clostrum, another thing it could do is to expose a special operator for it!!
0:01:16
nij-
standard: "The set of special operator names is fixed in Common Lisp; no way is provided for the user to define a special operator. " The set of special operator names is fixed in Common Lisp; no way is provided for the user to define a special operator.
0:01:29
nij-
Oops Double post. I meant - http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/sec_3-1-2-1-2-1.html#clspecialops
0:02:05
nij-
So the standard bans the implementation from giving the user option to define new special ops.. I wonder if the implementation can provide more special ops though.
0:32:38
bike
i don't know how useful a special operator like that would be though, compared to just having an eval function with an environment parameter
0:33:17
bike
kernel has a similar special operator called $remote-eval or something, and part of the idea was to use it to e.g. evaluate code in a standard environment a la with-standard-io-syntax, but i don't know how practically useful that is
1:33:00
nij-
Does it mean "some" rather than "any" in "interned adj. Trad. 1. (of a symbol) accessible in any package." ? https://novaspec.org/cl/26_1_Glossary#interned
1:35:47
nij-
Sorry for my bad grammar. English isn't my native. But this reads to me like it saying the symbol is accessible in *every* package.
1:38:22
gilberth
Consider a questions: "Is FOO accessible in any package?" "Yes, it is accessible from CL-USER, but not from FANCY-PACKAGE."
1:53:35
gilberth
I was more referring to to my ears a sentence like "I have any apples, I should make an apple pie." sounds wrong while "I have some apples." sounds right.
1:55:03
gilberth
I believe negation implies "any". "I don't have any apples, so I cannot make an apple pie." sounds ok. While "I don't have some apples." sounds odd. Maybe someone better at English than me could clarify.
2:59:12
nij-
I remember seeing "any" used in an affirmative English sentence. But it doesn't show up quite often nowadays, at least in verbal english.
3:03:31
paulapatience
One example where any strongly suggests all would be: My code works with any compiler.
3:25:25
nij-
Oh yes - "the same symbol can be interned in more than one package." Sorry this is a stupid question.
3:26:50
gilberth
You would need to "import" a symbol to make it interned in some other package than its home package.
3:31:58
gilberth
Because that are different things. Begins with that to refer to symbols in used packages (without a package qualifier) would only work if that symbol is exported. And the used package can also change.
3:32:40
gilberth
And of course when you use a package you use all symbol exported symbols from that package.
3:33:04
gilberth
You might however want to only import one specific symbol from another package. Or a few.
7:10:53
younder
beach: All implementation's I have looked at use a copy-on-write approach to multi-threading. Has this been addressed in the updated spec?
7:26:46
beach
So if you do (defun foo ...) in one thread, the function foo will not be defined in a different thread?
7:29:55
beach
And, the only "updated spec" I know of is WSCL, and I think multiple threads would be way too hard for WSCL, at least initially.
7:30:43
beach
younder: DEFUN does a (setf (fdefinition ...)) which writes to the global environment, so if it is then first copied, the function won't be seen in other threads.
7:33:12
beach
Besides, no current Common Lisp implementation has an object representing the global environment, so to write-protect it that way would mean write-protecting almost the entire system.
7:34:48
younder
We must be talking past each other. How do you deal with a dynamic variable (usually global) in a thread. You just read the global one. It is fine if all threads do is read them. But what happens on write? You make a thread local copy and write to that. This can all be made to work as long as you check if there is a thread local copy first and on fail fallback on reading the global (top process) one.
7:35:57
beach
I believe that in all current Common Lisp implementations with threads, the global bindings is shared between all the threads.
7:36:50
beach
And if you are not talking about the global value, and instead you are referring to a thread-local binding of it, then you are not using the global environment.
7:37:32
beach
If the variable is locally bound, then writing to it does not affect the global environment.
7:38:08
beach
How the dynamic environment is represented is outside the scope of any specification anyway, let alone WSCL.