freenode/lisp - IRC Chatlog
Search
3:10:20
equwal
Looks pretty neat, definitely better than w3m which I use for most of my non-firefox browing.
3:10:24
iqubic
DO you run Linux? I run linux and I'm not sure I want to go through the pain of getting it to work.
3:10:44
equwal
I'll just start it up and review it now I guess, I'm used to compiling stuff from source at this point.
3:24:18
figurelisp
why do people call javascript same as lisp? in what sense they are talking about and is that true?
3:26:29
mange
I don't think anyone would say that Javascript is the same as Lisp, but people often want to claim that it's very "Scheme-y". I think the biggest thing that lets people claim that is first-class functions.
3:28:26
drewc
figurelisp: because people from C++ and Java think Lisp is functional, and think ECMAscript is as well.
3:29:55
equwal
brettgilio: Arch probably has 1.4.9 pre-compiled in their testing repo, and if so you shouldn't use that repo on stable. You will eventually break stuff doing that. Instead, you compile from source.
3:30:05
beach
figurelisp: Lots of people would like to think that their language is some Lisp dialect. But since "Lisp" is not well defined (as opposed to Common Lisp), it is meaningless and can't be checked or refuted. Luckily, this channel is dedicated to Common Lisp, so we don't have debates like that.
3:32:00
beach
equwal: Like I said, Lisp is not well defined, so it is not obvious to some people. But since this channel is about Common Lisp, we don't have to decide one way or the other.
3:34:23
equwal
If it was a genuine question then the answer is no, it isn't a lisp, but it does have some vaguely functional things like lambdas.
3:35:36
drewc
figurelisp: from that link: 'JavaScript also isn’t Lisp as people who write Lisp use the word. Agree or disagree, the “Lisp Community” has coalesced around Common Lisp. Anything that doesn’t harken back to MacLisp is considered not-Lisp by experts. You know, Scheme looks a lot like a Lisp-1 to everyone else, but hard-core Lispers will tell you that Scheme isn’t Lisp and that the only thing it has in common with Lisp is CONS'
3:37:28
equwal
Can we find any specific source who claims that Scheme isn't a lisp? At the very least, its inventors definitely considered it a lisp.
3:37:49
drewc
FWIW, I now write primarily in a scheme dialect, and I do not call it Lisp, it's scheme! :)
5:48:44
aeth
*The* point of Lisp is that you use macros on top of s-expressions. Common Lisp is the common Lisp, replacing all of the historic Lisps except Emacs Lisp. Any new approach (including Scheme, which changed a lot in r4rs, r5rs, etc.) has its own channel, and Emacs Lisp has its own channel. The only useful thing to talk about here is practical Common Lisp problems. Very few people want to talk about language families.
5:49:18
aeth
There is a ##lisp for the Lisp family. It's a pretty dead channel. Even #scheme is pretty quiet and mostly used by people implementing Schemes, doing academic Scheme exercises, or trying to write portable Scheme libraries.
5:51:07
aeth
Common Lisp is the subject here not for deep philosophical reasons but because Common Lisp is a useful thing to talk about and much more useful than "is X a Lisp?", which probably belongs in ##lisp or #lispcafe
5:55:46
JuanDaugherty
that seems to imply some kind of questionable altruism as opposed to that common lisp just needs a dedicated channel
5:56:51
aeth
JuanDaugherty: What I mean is: Does Common Lisp deserve "#lisp"? It does because it's far more active than Lisp-family discussions would be on an IRC channel.
6:01:19
JuanDaugherty
well it's effectively squatted it aggressively so it's a moot discussion at this point. The most you can do is try to fluff up ##lisp or go to another network
6:12:55
JuanDaugherty
it was already a thing, if not that much of one, when I learned smalltalk in '85
6:15:24
JuanDaugherty
yeah wiki says 88 for irc, i'm pretty sure golden hill was selling something they called CL before that
6:19:46
JuanDaugherty
surprised because you'd think that much functionality in one box (cl-containers) would get more play
6:24:29
shka1
it is not all that feature rich, but since i made it myself i find it conceptually optimal
6:26:19
JuanDaugherty
i see the virtue of it, LIL is just containers, cl-containers has stuff, the stuff I thought was useful
6:27:35
shka1
cl-containers has OK code, it's just it does not feel like it belongs to the XXI century
6:28:48
JuanDaugherty
i can't think of any computing culture where old stuff is more useful, accepted, tolerated, etc, than common lisp
6:31:20
shka1
anyway, what I really want to do with my project is to construct set of reasonable interfaces that can act as bridge
6:37:08
shka1
like this https://github.com/sirherrbatka/cl-data-structures/blob/d3566faf0e4f640ff88f490ead0d6c0ccd49c742/src/dicts/hamt/range-test.lisp#L49
6:44:50
JuanDaugherty
i do see why now, other reasons occurred and the main thing I wanted to know, that it works you answered, ty
7:06:20
beach
What's the relation? I mean Firefox is not a Common Lisp program as far as I know, and I suppose IPC means inter-process communication, and that's quite general.
7:10:16
ym
I want to get current page URL and some meta-data from firefox without StumpWM kludges, but seems like the most convenient way is to get hands dirty with JS or to use Emacs's w3, so never mind.
8:47:17
dim
thanks Norvig for PAIP now being available on GitHub, it makes linking to references from the book much easier ;-)
9:46:26
zigpaw
I wonder if there is a library that would allow easy pattern matching for function parameters in CL based on some of the parameters properties? like fnc1 (arg1 is list with length 1) <body1> ; fnc (arg1 is list with length 2) <body2>, etc...
9:50:59
TMA
zigpaw: DESTRUCTURING-BIND might be a basis for your own library, if you don't find one to your liking
9:54:18
shka
not lambda lists, but mix of MOP, compiler macros and optima should allow you to do everything in this area
10:50:03
jmercouris
e.g. (defun fish () (defun salmon () (print "I'm a salmon")) (funcall #'salmon))
10:51:39
jmercouris
and these functions defined in an flet, do they share the lexical context of the enclosing defun, for example?
10:52:51
splittist
If I understand what you mean, yes. flet and labels differ in terms of recursivity, in the way let and let* do
10:55:15
splittist
"labels is equivalent to flet except that the scope of the defined function names for labels encompasses the function definitions themselves as well as the body."
11:37:52
jdz
zigpaw: you might be interested in https://european-lisp-symposium.org/static/2016/newton.pdf
12:31:05
beach
jmercouris: Let me also add that nesting DEFUNs probably doesn't mean what you think it might.
12:31:58
beach
And it means that you redefine the inner function in the global environment every time you call the outer function.
12:34:45
beach
jmercouris: Consider the following exercise: start with doing (defun foo (x) (defun bar (y) (+ x y))) at the REPL.
12:37:20
shka
beach: i think that jmercouris meant to say that defun does not evaluate it's arguments, including &body
12:39:36
beach
But the reason for this behavior has nothing to do with the fact that DEFUN is a macro.
12:40:21
beach
It has to do with the fact that the DEFUN form has side effects in the global environment, so when it is executed in the body of another DEFUN, those side effects happen each time the outer DEFUN is invoked.
12:42:06
beach
OK, now you are confused again. Packages are no longer involved after READ has done its job.
12:43:16
beach
It's a bit more complicated because of what the Common Lisp HyperSpec has to say about top-level forms and the file compiler.
12:46:34
beach
jmercouris: The name FOO is turned into a symbol by READ, and that symbol has a package as reported by SYMBOL-PACKAGE. But all DEFUN does is to define a function in the global environment that has that symbol as its name.
12:47:28
beach
Packages do not contain functions or variables or anything other than symbols. A package is a slightly complex mapping from names of symbols (i.e. strings) to symbols.
12:52:10
beach
OK, changing the topic here. I realize that not everyone is a compiler expert here, so that I can't ask for help with Cleavir.
12:52:12
beach
But, we need to visualize intermediate code (HIR) which is a huge graph even for very modest-size functions. So it would be great if someone would write such a tool using (say) McCLIM. We need to be able so hide parts of the graph, select levels of detail, etc. Any takers?
12:53:26
beach
Yes, we are currently using GraphViz, but it is not interactive and can't be programmed to hide or expose detail.
12:54:45
beach
It must be programmable so that it understands the contents of nodes and so that the level of detail can be chosen for each node.
12:55:21
beach
The GraphViz layout algorithm is published work, and it is not too bad for modest-size graphs. And if part of the HIR graph is hidden, that algorithm would work fine I think.
12:55:48
shka
so interactive graphviz with set of protocol generic functions that can control the visible structure
12:56:31
lieven
beach: doesn't CLIM come with a graph formatter? I seem to recall the Lispworks version did.
12:57:16
jmercouris
that way, you don't have to do any of the graph programming yourself, or any of the myriad of graph operations, just add and remove nodes
12:57:34
jmercouris
neo4j comes with very good visualization suites, and it would be useful to have a graph database driver for neo4j in CL anyway
12:58:15
jmercouris
if you are interested in this approach, and in neo4j, I am extremely experienced with it
12:59:02
jmercouris
I would have suggested a different tool, but since you said it has to be dynamic, that is the best I can think of
12:59:29
jmercouris
if you are willing to sacrifice dynamically adding and removing nodes, Gephi is pretty nice
13:00:07
beach
Yeah, the graphs can be pretty big and they have both control flow and data flow information, so they can be quite messy. And it is impossible to choose a priori what part of the graph to look at. Hence the interactivity.
13:00:33
jmercouris
Oh I see, you don't mean dynamically adding or removing nodes from the graph, but dynamically querying the graph
13:01:09
beach
Right, I don't need to modify the graph. Just modify the visibility of groups of nodes and individual nodes.
13:01:22
jmercouris
I would suggest, output to a GML file https://gephi.org/users/supported-graph-formats/gml-format/ and then analyze it with any one of many programs
13:01:42
jmercouris
GML is a very easy to use format, and you can have any number of data types within it
13:04:42
beach
Well, there is the issue of choosing "data types" for different aspects of the graph of course, but that should not be too hard.
13:13:12
beach
Watching a Cytoscape tutorial, I see that it allows the user to modify the graph interactively, including the layout. That doesn't look like stuff we want.
13:24:48
beach
It makes me tired just to think about going through the documentation and tutorials of all those applications.
13:28:59
beach
jmercouris: Our graphs will contain nested functions represented by one ENTER node and one or more RETURN nodes. One thing that I would like to do is to turn such functions into a single blob and examine the details of one at a time. What Gephi functionality allows that?
13:29:49
Bike
doing that with basic blocks would be nice too. of course i imagine we'd have to annotate subgraphs ourselves, but that's no problem
13:31:11
jmercouris
so if you tag each of those blobs with some Identifier that is the same, you may have their gravity increase and they will overlap each other
13:31:13
beach
I would like to click on the enter node and have the nested function turn into a single blob.
13:32:56
beach
Like Bike says, we can easily stick different "labels" in the nodes, so that each nested function has nodes with different "labels".
13:33:36
schweers
I have a quick question on CALL-NEXT-METHOD. If I have a method which calls a helper function several times (the helper function is called from several methods, but never from anywhere else). Is this helper function allowed to use CALL-NEXT-METHOD?
13:33:51
beach
jmercouris: Two or more clicks would be fine. I just don't want to manually select the nodes to collapse.
13:35:05
beach
schweers: CALL-NEXT-METHOD will be lexically defined, so you need to pass it as an argument to your helper function, as in (helper ... #'call-next-method).
13:35:31
jmercouris
beach: I need to think about this a little bit more, because I assume you also want to view data from all of these nodes at once, right?
13:36:38
beach
jmercouris: I see. Well, most of the time, the data will be used locally, so it should be hidden as well. But there are cases when data will be shared, as when a nested function refers to a variable in its parent function.
13:38:39
jmercouris
you could grab the ID or whatever unique attribute for the node by clicking on it, and then write a query to fetch the data from that node, and the nearby nodes in the data laboratory