freenode/#lisp - IRC Chatlog
Search
1:49:15
skidd0
with make-task, i'm thinking that's basically taking the init args and then using them in a make-instance
1:51:26
Zhivago
Isn't this just a matter of creating a constructor function which also adds the thing it constructs to a list somewhere?
1:54:29
White_Flame
but once you have automatic behavior, then you want to make it optional, you need to have side-band ways of passing in options to that automatic behavior
1:55:06
skidd0
and then, i'll have a really complex way to make lists, and have spent a while learning how to do that, and still not have tasks
1:56:36
White_Flame
btw, (defun maker (&rest params) (let ((obj (apply #'raw-maker params))) ...)) is how you pass through parameters
1:57:05
Zhivago
Probably your problem involves 'making a data structure for some particular purpose', and that just happens to involve lists today.
3:01:54
cnx
hi there, somehow i can no longer load swank server due to `Package ASDF does not exist.'
3:27:40
White_Flame
it's always best to install SBCL from source, instead of from your package manager, due to weird issues like this
3:38:39
White_Flame
if you start SBCL from the commandline and type (require :asdf), what do you get?
3:43:29
White_Flame
it shouldn't just "break", so I would suspect something external in the environment
4:01:26
makomo
phoe: did you take a look at the macros i wrote (regarding the FBIND thing we discussed) :D?
4:09:04
White_Flame
cnx: REQUIRE is a deprecated, implementation-specific thing that's usually only used for implementation built-ins
4:10:07
White_Flame
asdf:*central-registry* is the list of directories it looks for .asd files to load
4:10:27
White_Flame
quicklisp also has a couple for the quicklisp distributions as well as local-projects
4:30:28
White_Flame
cnx: because you asked for asdf:*central-registry*, that means that that symbol was defined in the package, aka it loaded
4:30:58
White_Flame
NIL means the value was defined. It would have blown up with an error if neither that package nor symbol existed
4:38:28
cnx
I'm feeling kinda sick now, I guess I'll try to get more sleep and debug this later, thanks White_Flame
5:25:10
minion
There are multiple help modules. Try ``/msg minion help kind'', where kind is one of: "lookups", "helping others", "adding terms", "aliasing terms", "forgetting", "memos", "avoiding memos", "nicknames", "goodies", "eliza", "advice", "apropos", "acronyms".
5:27:46
makomo
minion: memo for Bike: the "const-size" version of once-only implemented using the list version: https://plaster.tymoon.eu/view/850#850. no EVAL! i guess the most general way to go about it then is to always write a version which works with an arbitrary number of forms and then derive the const-size version from it.
5:28:04
makomo
minion: memo for pjb: the "const-size" version of once-only implemented using the list version: https://plaster.tymoon.eu/view/850#850. no EVAL! i guess the most general way to go about it then is to always write a version which works with an arbitrary number of forms and then derive the const-size version from it.
8:15:42
shrdlu68
"The quest for the ideal programming language and the ideal man-machine interface that would make the software crisis melt like snow in the sun had —and still has!— all the characteristics of the search for the Elixir and the Stone." -- Encountered in a Dijkstra essay
8:16:08
minion
pjb, memo from makomo: the "const-size" version of once-only implemented using the list version: https://plaster.tymoon.eu/view/850#850. no EVAL! i guess the most general way to go about it then is to always write a version which works with an arbitrary number of forms and then derive the const-size version from it.
8:17:07
pjb
The quest for the ideal programming language is archieved by lisp, for 1- ideal pl is not an absolute, but relative, 2- lisp let you mutate the language so you may make it the ideal pl for your current program.
8:21:12
beach
Theoretical computer scientists having opinions about programming is kind of like medical doctors having opinions on just about anything technical. Their colleagues deify them, but they don't necessarily know much about the topic.
8:25:55
makomo
i don't want ONCE-ONLY to appear in the expansion. the whole point of ONCE-ONLY is to be used within the macro itself
8:28:02
makomo
it would be great if the author of ONCE-ONLY did it while he was at it, but he did not
8:28:41
makomo
but yes, ideally i guess you would do either that or you would implement the arbitrary list version first, and then derive the constant-size version from it (which i did at the bottom from Bike's solution (which is a reimplemnetation of ONCE-ONLY as well btw))
8:28:56
makomo
the point was to constrain yourself to use just ONCE-ONLY, without imitating its behavior
8:32:01
pjb
You see, this is why I hate alexandria: it makes people freeze its API in their mind. This is open source! Just copy-and-paste the once-only macro and make it into a function!
8:52:19
shrdlu68
White_Flame: Incidentally: https://www.cs.utexas.edu/users/EWD/transcriptions/EWD06xx/EWD667.html
8:52:44
_death
pjb: that coin has two sides.. and you can learn to unfreeze so there's no need to "hate"
8:53:12
White_Flame
shrdlu68: I don't mean "natural-language-ish programming languages" I mean "true natural language understanding"
8:54:37
pjb
parjanya: you can be a high-level, natural programming language programmer, by becoming a CTO, and telling your teams the specs of your program. Magically, the program gets developped, by a bunch of HI, AI, and DC.
8:54:41
parjanya
White_Flame: isn’t there too much ambiguity in natural languages? even among humans we get problems of interpretation
8:55:00
shrdlu68
White_Flame: That's an AI-complete problem, we probably won't be programming by then.
8:56:02
shrdlu68
antoszka: No it's not. Natural languages, while incredibly complex, still have grammar. It's just difficult, not impossible.
8:56:17
White_Flame
shrdlu68: and it's not just grammar, it's understanding of context & implications
8:57:25
White_Flame
I never said true NLU is impossible, just that it'd be the ultimate programming environment, finally including DWIM functionality :)
8:57:26
shrdlu68
Terry Winpgrad's SHRDLU showed there is a way, it's just difficult and no one currently knows of a way to scale SHRDLU.
8:58:04
pjb
parjanya: the thing is that you can also write misleading code, code that is interpreted differently by the human reader and by the compiler,a nd even code that is interpreted differently by different compilers!
8:58:29
shrdlu68
But then again, the world's best minds have supposedly been working on this problem for decades and made virtually no progress, so who am I to say?
9:00:25
parjanya
well, as we have it... we have a variable in us managing to know what we want and knowing how to express it. the computer’s behaviour just follows the code. we can see where the problem is, with some luck. if computers accept natural language, they will have more than one way of interpreting what we say, so we won’t be sure even of its behaviour. I’m not saying it’s impossible, it’s
9:03:19
White_Flame
parjanya: it all comes down to the ability to be able to form, update, and reuse general concepts, not having dictionaries of symbol definitions & strict grammar rules
9:03:56
White_Flame
as well as being able to ask clarifying questions, but that's been obvious for a long long time
9:04:57
parjanya
ah, that remidns me of some Lisp system that manipulated objects in 3d based on commands "put this on top of that" etc
9:32:21
jdz
parjanya: You might want to look at https://en.wikipedia.org/wiki/Attempto_Controlled_English.
9:50:28
littlelisper
https://pastebin.com/kdS0DjJj warning while (requre :mcclim). mcclim works fine, but is there any way to clean the warning
10:53:19
jmercouris
So when you use DEFUN, what exactly happens? we somehow associate a symbol with a lambda?
10:54:42
loke
jmercouris: because when you do (FOO), you are funcalling the value in the function slot of the symbol
10:56:01
jmercouris
Ah, so that is why a function and a variable can both have the same symbol, the symbol has different slots for each?
10:57:08
_death
it's actually quite educational to expand defun and try to understand everything that happens.. for example on sbcl you're led to the global info db
10:57:34
beach
jmercouris: Yes, DEFUN creates an anonymous function and associates the name with it.
10:58:16
beach
jmercouris: There are (at least) two namespaces in Common Lisp, one for functions and one for variables.
10:58:46
beach
jmercouris: When you type (foo x), FOO is looked up in the function namespace, and X in the variable namespace.
10:59:43
jmercouris
Okay, because I just did (describe 'symbol) in SBCL and it doesn't show any slots
11:02:22
jmercouris
So, is it possible to for example, get the anonymous function associated with a symbol, and output it as a list?
11:03:10
jmercouris
Is it possible to get the anonymous function associated with a symbol, and print the anonymous function to the REPL as a list
11:03:38
jmercouris
something like (defun xyz (x) (+ 1 x)) and then later retrieving (lambda (x) (+ 1 x)) and printing it
11:07:00
beach
You can't take a Unix executable and edit the original C function (or Fortran, or ...) either.
11:07:44
jmercouris
I was just thinking since lisp is just a live environment that it might be possible, for something like genetic tree programming
11:08:07
jmercouris
but it seems you would have to maintain lists with the original lambda expressions
11:09:06
beach
jmercouris: Put yourself in the position of a commercial Common Lisp vendor. If every customer could say (edit (fdefinition 'compile)) then they would have no trade secretes.
11:09:27
beach
jmercouris: Also consider that the ANSI committee was largely composed of vendor representatives.
11:10:59
_death
https://www.informatimago.com/develop/lisp/com/informatimago/small-cl-pgms/ibcl/index.html
11:11:22
beach
jmercouris: Also, you need to get used to thinking in terms of protocols. It is not just because there is a function called SYMBOL-FUNCTION that the symbol must have a slot containing the function.
11:12:04
beach
jmercouris: What should tip you off here is that function names can also be of the form (SETF <symbol>).
11:12:06
jmercouris
beach: Yeah, I guess the implementation can be whatever it wants behind this protocol, it's just that in A Gentle Introduction to Symbolic Computation, the author very frequently talks about things in terms of a very specific implementation in mind
11:12:16
jmercouris
so I am never sure whether that is the author just assuming, or if it is part of the specification
11:12:47
beach
jmercouris: He would not be the first one to make such incorrect assumptions. Even the Common Lisp HyperSpec uses "function slot of the symbol" sometimes.
11:13:57
jackdaniel
right, I had to "fix" eql to equal in a few places in ECL's compiler wrt function names
11:14:52
beach
Language like that can easily make people think that every symbol has a slot or a cell for the function.
11:15:15
beach
jmercouris: The Common Lisp HyperSpec is derived from the standard. It essentially *is* the standard.
11:16:52
jackdaniel
for copyright-free version you could check out for instance http://cvberry.com/tech_writings/notes/common_lisp_standard_draft.html
11:18:07
jmercouris
I always just assumed they took the most popular features from the most popular implementations and just merged them together
11:18:53
jackdaniel
CL standard is a result of putting many knowledgeble people in one room and telling them to merge Lisps of the date into one standard
11:18:56
shrdlu68
Someone wrote a paper on the interaction of the committe members, something about communication styles.
11:19:42
_death
if you want to know how it came to be there's http://dreamsongs.com/Files/HOPL2-Uncut.pdf
11:20:35
beach
jmercouris: On the contrary. They spent a lot of time and a lot of energy thinking about what could be done, given that it must be possible to write a high-performance compiler for the language. These are no dopes, as opposed to many other language designers.
11:20:43
_death
shrdlu68: maybe you're thinking about the research into early use of email based on the committee's discussions
11:21:58
jmercouris
especially since many other languages have a single inventor who created the language in what feels like a weekend worth of time
11:22:14
beach
jmercouris: Now, this was the 1990s and compiler technology has made some progress. So you will occasionally find a restriction that was justified at the time, but that could be relaxed nowadays.
11:22:16
jmercouris
for example, if you look at the story about the creation of ruby, it sounds like all the guy had to do was get emacs syntax highlighting to work, and that was his green light
11:22:24
shrdlu68
_death: Yes, it was an analysis of how people attempt to make up for the lack of non-verbal cues in communication, hence inventing symbols like :)
11:23:06
beach
jmercouris: I don't know of Ruby in particular, but yes, there are many languages that have been created by people with no clue, and that's fine. What is NOT fine is that these languages sometimes catch on and become "standard".
11:23:19
shrdlu68
jmercouris: At the time of the paper's writing, I believe those symbols were a new phenomenon.
11:23:35
_death
I think Fahlman (a member of the CL standardization committee) is credited with the invention of the smiley..
11:24:51
jmercouris
_death: I think it is impossible to credit anyone with the invention of the smiley, we don't have a corpus of all text ever created
11:25:16
jmercouris
beach: yes, that is frustrating, especially for those of us who have to work in industry :D
11:25:28
_death
jmercouris: that's because you're thinking at the wrong scale.. back then very few people communicated that way
11:26:11
_death
jmercouris: or are you saying that nobody can be credited with the invention of anything because it could've been invented earlier in history
11:26:42
jmercouris
but it has happened a lot where people "invent" things that have very clearly been already invented
11:26:53
beach
jmercouris: Most people who work in the software industry have even less of a clue than the inventors of the languages they are told to use.
11:27:14
_death
jmercouris: welp, if you find a smiley before Fahlman, you can revise its historiography
11:31:48
shrdlu68
Are we even actively seeking maturity? Seems to me we're like the fast fashion industry.
11:32:48
White_Flame
and there's celebrity to be had among the tech circles, too, by coining new terms from old definitions
11:33:27
shrdlu68
I think we're in one of those systems that were discussed in Yudkowsky's "Inadequate Equilibria"
12:05:11
jmercouris
here is an example "define fish :topic ocean" should split into (list "define" "fish" ":topic" "ocean")
12:05:39
jmercouris
here is a more challenging example: "define fishing rod :topic ocean" should split into (list "define" "fishing rod" ":topic" "ocean")
12:08:23
jmercouris
The approach I am thinking about now is just splitting by spaces, and joining if the next term doesn't start with a ":"
12:09:46
jmercouris
keyword table? there an infinite amount of keywords, I don't want to have to update my tokenizer when a new keyword is invented
12:38:41
shka
what people here are using for numerical stuf in cl? i am looking namely for approximated integrals
13:05:24
jkordani
beach: re: What should tip you off here is that function names can also be of the form (SETF <symbol>).
13:06:37
jkordani
so the idea that a function associated with a symbol "is stored in a slot of the symbol" is actually an implementation specific description of "where to access a function"
13:07:36
beach
If there were a function slot for each symbol, there would then have to be two, one for the function named after the symbol and another for the function named (SETF <symbo>).
13:08:29
beach
It's not that important. I guess some implementations would have two "cells" in each symbol.
13:09:22
beach
So implementations that existed than might have a single function cell in each symbol.
13:09:35
jkordani
well that last sentence still doesn't make sense to me, what is a function named (setf <symbol)
13:11:36
beach
From the glossary: function name n. 1. (in an environment) A symbol or a list (setf symbol) that is the name of a function in that environment. 2. A symbol or a list (setf symbol).
13:11:56
jkordani
in order to use the right setf for a given symbol it too needs to be stored somewhere, and is also a function
13:12:16
jkordani
one association could simply be as a slot in the symbol, or could be some other implementation
13:14:32
beach
As it turns out, in for SICL, I store the functions in a first-class global environment object instead of in the symbols.
13:17:23
beach
No, I create a cell in the environment. When the code is loaded from FASL, or compiled, the code refers directly to the cell in a lexical variable.
13:20:54
White_Flame
well, most implementations probably have the symbol-function as a slot on the symbol object itself
13:21:44
Bike
like i think sbcl stores compiler macros and type definitions in a global table rather than the symbol
13:22:32
White_Flame
given the ratio of fdefined symbols vs non-fdefined ones, and the overhead of the hashtable
13:23:45
White_Flame
yes, I have those desires myself. Just not to embark on a total rewrite myself :)
13:24:38
White_Flame
not of a CL implementation, but I like many others have tons of notes on a lisp-derived language
13:24:49
White_Flame
I've implemented quite a few languages of varying sorts for internal commercial use
13:26:08
Bike
honestly, it kind of surprises me how first class environments aren't in anything important. we all used them when we wrote our first scheme implementation
13:27:26
beach
Bike: I think most suggested implementations take a hash-table lookup hit for each function call, and that is unacceptable.
13:27:48
beach
Bike: Scheme people don't care as much because they are often not into performance as much as Common Lisp people are.
13:28:35
Bike
i've implemented a scheme derivative (not mine) with them, but the language overall was outright hostile to compilation
13:29:28
White_Flame
at some point, probably after I'm retired, I might attempt a JIT/dynarec Lisp implementation
13:39:49
Bike
individual atoms would bond with each other and worse, possibly atoms of an attacker. totally insecure
13:40:23
TRS-80
having bit of issue in Emacs trying to set up CalDAV sync using org-caldav, however I feel like my problem is lisp related, missing parenthesis, backtick, etc... because I had it all working last step, but next incremental step now not working. Pasta incoming.
13:42:39
beach
TRS-80: #lisp is better in that respect, but unfortunately (for you) reserved for Common Lisp.
13:42:45
jackdaniel
IRC is an asynchronous protocol, getting an answer may take time (or questions may be not answered) - either way that's the place to ask such questions
13:43:00
jackdaniel
this is a good essay about asking questions btw: http://catb.org/~esr/faqs/smart-questions.html
13:43:05
warweasle
There is no better example of the iterated 3-tank problem than why common lispers uses emacs.
13:43:16
beach
I once asked a question in some Linux music channel and it took someone a few weeks to answer. :)
13:44:19
warweasle
TRS-80: This is the dark underbelly of the internet. It was one of the first applications to gain traction and is still in use because it is so simple.