freenode/#lisp - IRC Chatlog
Search
23:52:38
didi
Is anyone aware of an expression language for defining dates? Like CL-PPCRE accepts a parse tree for defining regular expressions.
0:27:12
pierpa
check out Calendrical Calculations, and use whatever they use (and their software is written in CL, and is available from the publisher website, although with a weird license)
1:36:46
sjl_
defining an after method on initialize-instance is a pretty common idiom. I don't know that I've seen it done on make-instance very much.
1:36:59
skidd0
when I make an instance of a list, i want to auto add that list to a .. list of lists..
1:38:31
skidd0
I have an interactive function that prompts the user for info (like name, tags, about) and then pushes the new list onto a special var *task-lists*
1:40:38
Xach
skidd0: i think i would not do it that way, because it can be nice to make objects without causing a side-effect like that, e.g. when you're just testing things out.
1:43:19
skidd0
but it's worth noting that I always want the task-lists to be added to the list of task-lists
1:44:03
Bike
for testing i've pretty much never regretted being able to make a thing without side effects
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