freenode/lisp - IRC Chatlog
Search
4:55:52
krwq
shaftoe: i knew about chdir but this seems to be changing state which never works well with threads
4:57:34
shaftoe
how often would you change into different working dirs in different threads in the lifetime of a program?
4:59:45
krwq
i saw a lisp library for git (some ffi to c) but it is using native compontents which i want to avoid
5:01:17
krwq
yes i'm just shelling to git - do not know better way yet - i was considering parsing git files but decided to leave it as last optiob
5:07:16
krwq
this is pretty nice, thanks! but still - i know that when you create a process it is possible to do it on all platforms
5:07:42
shaftoe
i just looked at the cost of the "hobbyist" version of lispworks... $750 USD... if it were $50-99 that'd be more realistic
5:10:55
shaftoe
i wanted to check out their multiplatform UI library: http://www.lispworks.com/products/capi.html
5:11:19
akkad
shaftoe: email them for a free time trial. very useful in deciding if you want to buy it
5:23:06
shortCircuit__
I had a question. in https://github.com/arrdem/sad/blob/master/test/lisp.bnf this bnf . how are + * and other functions defined ..
5:27:18
Bike
or do you mean that the grammar disallows functions with asterisks in their name and so on?
5:28:53
shortCircuit__
yes the first one.. the grammar doesn't actuaaly have those symols .. I want to understand how this grammar works ...
5:31:06
shortCircuit__
:P so is there a link to a proper grammar for the lisp syntax .. I am trying to write a simple language with assignement, function and a pipe operator .. but I have no clue how to do it . looking for codes :P
5:31:44
Bike
well common lisp, the subject of this channel, doesn't fit a context free grammar anyway.
5:32:38
Bike
But this has the basics. An expression is an atom or a (possibly dotted) parenthesized list of expressions. And that's about it.
5:36:59
shortCircuit__
that I understand .. so there is already some table that has this + setf defined . and then a lisp program is parsed and then whereever a (string ... ) occurs the string is looked up in the heap and then in the symbol table ?
5:56:03
beach
IRC is a great communication tool, but it can be frustrating at times. Luckily, #lisp is populated with smart and knowledgeable people, so it is a fantastic source of information.
5:58:32
dingusman
Cool, great to hear. I've gotten very interested in lisps lately. Working through practical common lisp
6:01:11
dingusman
I'm liking it a lot. I've been trying to find resources to demonstrate practical macros. Most of the examples I've found online are silly toy examples. I think PCL does a good job
6:02:39
beach
oleo: I don't have time to work on McCLIM myself at the moment. Right now, jackdaniel is maintaining it. If you need more information, ask in #clim.
6:03:21
beach
dingusman: There is an entire book dedicated to Common Lisp macros. It is called "On Lisp" and the author is Paul Graham.
6:08:00
dingusman
krwq: I might've misrepresented my experience a bit. Before I started PCL I had been reading a lot about racket. It's probably tougher to find good racket macro examples than common lisp
6:09:04
dingusman
beach: thanks for the recommendation. didn't know On Lisp was focused on macros. shouldn't suprise me after reading his essays viaweb
6:13:06
beach
Well, Paul Graham is a strange one. He has also written "ANSI Common Lisp" which is more of an introduction. But he really doesn't like Common Lisp very much. His books don't use the object-oriented aspects of it at all, and he designed a new language called "Arc" as an alternative to Common Lisp. It never became popular, though. And the coding style in his books is a bit off compared to accepted conventions.
6:15:22
beach
I don't know. I meant the language, not any particular implementation. Languages are not proprietary.
6:20:44
dingusman
There's at least a community-managed fork on github. Apparently it's built on racket, didn't know that
6:22:42
aeth
Yes, this is the living Arc, for some definition of living. https://github.com/arclanguage/anarki
6:22:56
aeth
At least, if you don't work for Y Combinator and thus don't have access to their Arc and the Hacker News code
6:24:05
beach
dingusman: Anyway, I just mentioned Arc in the context of Paul Graham. Despite the name, #lisp is dedicated to Common Lisp.
6:26:42
aeth
To compare the relative health and activity of the communities, there are possibly up to 6 Common Lisp game engines that are more active than Anarki.
6:27:25
aeth
And I wouldn't be surprised if the combined output of #lispgames is several times larger than that of the Arc community.
6:37:22
aeth
It doesn't look like there is any notable usage of Arc outside of Hacker News. https://github.com/trending/arc?since=daily
6:38:11
aeth
Compare with this where you see some large web and graphics projects (which seems to match my experience with what is popular in CL): https://github.com/trending/common-lisp?since=daily
8:20:29
jackdaniel
quantity doesn't always come with quality, so comparing raw numbers says nothing. If they do, I'd be programming in Java, not CL.
8:29:36
beach
I wrote a new view class for Second Climacs, and forgot to check for empty strings, so my X server crashed again. But it's OK, I needed to update my software anyway, which, as we all know, still requires me to restart all applications and the operating system, because we still use software technology from 50 years ago.
8:43:08
beach
Visiting a file with 11k lines in Fundamental mode takes around one second. And this is without any kind of optimization on my part. And of course, I always have DEBUG 3, SAFETY 3, and SPEED 0.
8:45:11
beach
It is reading the file one character at a time, and calling the generic function INSERT-ITEM for each character read.
9:08:53
akr[m]
Hello, I'm looking for some example in Lisp (be it a blog post or a section of a book) which showcases some interesting usage of some combination of metaprogramming and the ability to modify programs while they are running
9:09:54
beach
We don't usually modify programs when they are running. Stuff like that is typically done only during development.
9:11:06
jackdaniel
but during development mutating application while it runs is a standard technique
9:11:21
akr[m]
Fair enough, but this doesn't have to be something you would want actually do in production
9:12:01
jackdaniel
well, having ability to do that may be great or debugging, but some security measurements would be necessary if you plan to enable swank on production
9:13:54
jackdaniel
akr[m]: you may try to pick something from the resources mentioned on reddit: https://www.reddit.com/r/Common_Lisp/
9:14:52
akr[m]
As an example of the kind of thing I'm looking for, I was wondering how feasible it would be to have a program which would modify parts of its own code using a genetic algorithm in response to external stimuli (i.e. user input)
9:15:22
beach
akr[m]: Also, the concept of a "program" is not well defined in Common Lisp. Basically, a program is just a collection of functions that are called in some pre-defined way. So whenever you define a new function or redefine an existing one, you are basically modifying a running program.
9:15:56
jackdaniel
it's not something what programmers would do every day, but that's definetely possible. You'd have to declare function as notinline and evaluate new function definitions compilation
9:19:24
beach
akr[m]: Definitely feasible. Here is an example: (defun f (x) (setf (fdefinition 'f) (compile nil `(lambda (x) (+ x ,x)))) x)
9:22:54
beach
I am going to work on Fundamental mode in Second Climacs for a while to make sure it works, and to do some performance tests. And I will clean up the build process and document it so that others can try it out. Common Lisp mode needs to be restructured, and I don't feel like doing that at the moment.
9:23:27
akr[m]
beach: interesting, although I have to admit that I don't know what it does from looking at it
9:24:18
minion
akr[m]: look at pcl: pcl-book: "Practical Common Lisp", an introduction to Common Lisp by Peter Seibel, available at http://www.gigamonkeys.com/book/ and in dead-tree form from Apress (as of 11 April 2005).
10:02:41
shaftoe
practical common lisp is fantastic... only thing it's missing is mentioning quicklisp (which didnt exist at the time)
14:42:08
marvin2
hi. can someone recommend me a pastebin that does not have ads for people viewing my code?
15:10:49
JuanDaugherty
is the position on sbcl that it just provides AMOP and generic CLOS support without a specific CLOS as most implementations do or did I miss a presentation of the latter someplace? I believe it would have been PCL in cmucl
15:12:56
beach
For example, I think Xof did a complete rewrite of the generic-function cache, using the original paper for inspiration.
15:13:13
JuanDaugherty
yes i know, but it all seems to have merged into the general implementation, also found it weird that in the manual it talks about the object system as being external to spec
15:13:52
JuanDaugherty
i'm used to implementations presenting the object system as thing on it's own rather than an aspect
15:15:39
JuanDaugherty
i can deal with either but obviously would want to start with the latter if it were available
15:16:34
JuanDaugherty
thanks for responding, at this point i gather there isn't anything other than the original/current cmucl pcl docs
15:17:17
JuanDaugherty
i think i'm good with the current 1.3 docs and a decent project example if there's no purposive document
15:19:08
JuanDaugherty
(as distinct from what I said i found, as expository prose on use of the object system at the user, rather than protocol author level)
15:20:12
JuanDaugherty
protocol/object system. It may be I just never fully absorbed although i knew at some level
15:21:16
JuanDaugherty
cl-http and maybe one or two other code sets are only ones I actually worked with
15:22:52
JuanDaugherty
i observe the default of pcl or whatever and that's what seems to be missing in current sbcl docs, the basis of the query/observation
15:26:23
beach
My native language is Swedish, but I rarely use it anymore. In total I speak 5 languages.
15:26:26
JuanDaugherty
anyway i'm a native speaker of English and I do often get complaints on my language use, so it's not just you
15:30:28
beach
SBCL started off as CMUCL, and CMUCL started off as a different dialect (not Common Lisp) of Lisp. Then it became an implementation of CLtL1 (which does not have an object system). Only later was PCL added. You can still see this history in many places of SBCL. For example, the compiler is written without the use of generic functions and such.
15:45:24
beach
The thing with PCL, and thus with SBCL CLOS (and presumably with the CLOS implementation of most current implementations of Common Lisp) is that it was written at a time when processors looked very different from the way they look today.
15:45:25
beach
In particular, there was no big difference between a memory access and a register access in terms of performance. For a modern processor, the PCL generic dispatch technique uses way too many memory accesses.
15:45:50
JuanDaugherty
i see. I have relatively little exposure to immigration but now see that is what one would expect if one immerses in an expatriated culture
15:47:02
JuanDaugherty
also apologies if I've asked this before, didn't search logs but have a sense of deja vu
15:48:38
JuanDaugherty
western new york, it's mostly a reaction to the stupidity for which americans are so justly famous
15:48:38
beach
The excessive number of memory accesses for the PCL dispatch technique is the reason I came up with a technique for SICL that is better adapted to modern processors: http://metamodular.com/generic-dispatch.pdf
15:50:14
beach
pjb: But now I am very excited about my progress on Second Climacs, so it shall have to wait.
15:57:04
beach
JuanDaugherty: Xof just arrived. You can ask him more about SBCL CLOS if you need to.
15:59:09
afidegnum
hello, please can anyone help me understand this about Macros? https://ghostbin.com/paste/v355s when do we use quote and comma? if i understand well, Quote is equivalent to EVAL in some languages, right?
16:02:16
beach
afidegnum: The simplest way to see the backquote facility is to consider it to be a quote, EXCEPT that if some nested stuff is preceded by a comma, than that stuff is evaluated.
16:04:17
beach
afidegnum: So in your paste, the result is a list (* x y) where x is the value of the parameter VALUE and y is either 1, 60, 3600 etc., according to the value of the parameter UNIT, which is presumably one of the symbols s, m, h, d, ms, or us.
16:05:38
beach
Anything inside a backquoted form that is not preceded by a comma is never evaluated.
16:07:06
afidegnum
while reading notes on letoverlambda, there is a preceding function, sleep unit, (sleep-units% 2 'm)