freenode/lisp - IRC Chatlog
Search
1:41:00
reepca
So I'm in the situation of having a SLIME REPL I want to keep alive during a loop. So far I'm using code exactly like https://github.com/cbaggers/swank.live/blob/master/swank.live.lisp but have noticed that certain features of SLIME don't work during that, for example the parameter lists in the minibuffer. Any idea how I can make those work as well? They're awfully convenient...
1:50:36
reepca
I'm not sure how well that would work with manipulating global variables - that's currently how I control what my program does while it's running. Is there any reason I should be worried about that?
2:38:47
krwq
does anyone know if there is some portable way to escape argument when using uiop:run-program?
3:06:26
krwq
akkad, if you know that input is ascii then you can do it, if you do not define your encoding (or in other words - how to map from byte to character) you can't do it in any portable way
3:08:35
krwq
it's not CL thing, it's a general thing for any language. some languages will try to read BOM or assume encoding but that usually works only in countries which use letters similar to english
3:12:30
krwq
akkad: take a look at alexandria:read-stream-content-into-string 's implementation this should be fairly close to what you want
3:13:26
krwq
akkad: although as i told you - if you do not have enconding this will be working heuristically
3:24:45
Bike
i don't know what compressed json is though. google suggests it could be gzipped, in which case you don't want it in a string.
3:28:49
akkad
e.g. gzip-stream:with-open-gzip-file works fine with (loop for l = (read-line in nil nil)
3:56:22
krwq
does anyone know a way to start a process and set a working directory for that process?
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)