freenode/#lisp - IRC Chatlog
Search
4:57:13
ealfonso8
I'm having a problem building a dependency of my project from quicklisp, it might be a bug. Is there a way to ask quickload to load an older version of a library?
4:57:27
ebrasca
When I try to compile with ecl I get "BINDING-STACK overflow at size 10240. Stack can probably be resized." .
5:25:41
beach
Wow, Alan Kay is a terrible speaker, but he is very smart and he knows many truths that he wants to communicate: https://www.youtube.com/watch?v=N9c7_8Gp7gI
5:26:21
beach
Then I was thinking, how would a web browser be organized in the context of a Lisp OS?
5:26:44
beach
Probably not as a single application, but as a set of "modules" that can be invoked independently from any other program.
5:29:42
beach
It's sad though. We need someone with all that knowledge and intelligence who is much better at communicating things.
5:44:01
beach
Sort of, yes. Lots of good things to think about if you understand his point. But to do that, you either need to be as knowledgeable as he is, or you need to pause the video and go read up on some major subject for every few minutes of the video. I am certainly not as knowledgeable as he is.
6:09:30
beach
Well the term itself just means a value that is significant, so that anything below it is not enough, and anything above it is more than enough.
6:10:38
beach
What he is saying is that we should compare our performance to some threshold that defines a value that is acceptable. We should NOT be happy with any incremental progress, if both before and after the progress we are way below the threshold.
6:59:26
phoe
What would be the idiom for "for a list, return a list that only contains elements of type FOO of that list"?
7:07:23
|3b|
http://www.lispworks.com/documentation/HyperSpec/Issues/iss172_w.htm says they are new to CL, and code shouldn'
8:40:20
beach
This entry: https://dl.acm.org/citation.cfm?id=578775 mentions only Aho and Hopcroft, and not Ullman. Is the entry just wrong? I can even kind of see Ullman's name on the picture of the cover.
9:16:15
ggole
But other sites referencing that ISBN include all three names, so it's very likely just a mistake.
9:41:04
pjb
beach: I don't know about Alan Kay worth as a speaker, I generally like his conferences. But for example at 23:00 he says that we still use tools designed 50 years ago (C++ compile link debug loop in programs emulating terminals emulating punch card), compared to other trades for which we developed nice graphical design tools. And here, I'd say that this is because text is more powerful than image.
9:42:23
pjb
beach: text is more ergonomic, faster and more precise to give order or describe structures than GUI.
9:43:24
pjb
The bandwidth with text is about symetrical (input/output). The bandwidth in GUI is very disymetrical, much faster for input (into the brain), much slower for output, even slower than text.
9:44:21
aeth
pjb: I think that it's about being keyboard-driven when programming, not necessarily having no graphics.
9:45:12
pjb
aeth: granted. It's nice if your command output graphics. It's not often necessary. We have tools to do that, stuff like GraphViz, various UML diagram drawing tools taking textual descriptions, etc.
9:45:52
pjb
Only if you compare pre-canned orders in a menu selection, vs. a non-canned text command, the GUI will win. But it's slower to go to a menu and select the right item, than to type a few character to get the same result, when both commands a pre-canned.
9:46:59
pjb
I still prefer emacs to eclipse… The later is too specialized, and too inconvenient to use.
9:59:29
pjb
Basically, when you have an IDE, a GUI design tool, whatever, what you have is a cow. You can make it produce calves, and you can spend a thousand years trying to make it evolve into planes. When you have a CLI with emacs, you deal at the atomic level, and you can reorder the atoms of your cow and make it into a plane or anything else whenever you want (as long as you know how to make a plane).
9:59:36
flip214
applying "object oriented" thinking to text is also nice -- "select this paragraph", "move this () form", etc.
10:00:19
flip214
as soon as the keyboard commands are muscle-driven (ie. used without actual thinking), you're on.
10:01:42
pjb
For example, emacs doesn't even try to optimize the bindings. For search and replace you have to type M-x replace-string RET … In a GUI you'd just type Command-R
10:06:35
rnmhdn
I want to make a program but I'm so confused what is the proper way to handle something like this in functional programming.
10:07:40
rnmhdn
There is a graph. There is a list in each node. and there are some edges. each edge is a constraint for example it can require it's two sides to be equal.
10:08:45
rnmhdn
or it can require it's two sides to always be null together so if the second element of the right side is null the second element of the other side should be null to but the other elements can be whatever number.
10:10:08
pjb
38:32 "Like the user interface that everybody uses these days, the GUI, that was my invention. I originally designed it for CHILDREN. I originally designed it that way because we have far more important things that we want them to learn. That user interface is not a good user interface for ADULTS. But in fact it's the one that adults wound up using because we made it easy for children to learn."
10:11:07
rnmhdn
A fixed graph structure is given, and the data of some of the nodes is available so if I have 5 nodes. for example the data in 3 of the nodes is available. my program should be able to tell if there is anyway to assign some data to other 2 nodes so that all the constraints given by the edges would be satisfied
10:11:45
|3b|
rnmhdn: in CL, if it isn't obviously recursive, just use an iterative construct. that's what they are there for :)
10:14:37
rnmhdn
but since I've started learning functional programming I see that there is a kinda different way of thinking in functional programming
10:15:24
pjb
rnmhdn: you have two choices. Either you want to solve the constraints globally, like a brain would do it. For this you need a recursive ANN, and there are pitfalls (getting stuck in a local extremum, thus not finding the solution). Or you will perform a systematic search with backtracking, starting from the constrained nodes, and progressing until all nodes are assigned a value.
10:16:27
pjb
"Same thing for the iPad. The iPad is good for 2-yo and 92-yo and nothing in between" :-)
10:18:10
rnmhdn
first thing is I don't know exactly how I should view this problem and how I should start programming it.
10:19:14
rnmhdn
should I try to check the constraints edge by edge or should I check them all in parallel
10:19:38
rnmhdn
I don't know how I should exactly approach this problem and what I should do with the missing nodes exactly
10:19:56
no-defun-allowed
It'd probably be easier to go edge by edge, but you might have multiple solutions in some graphs.
10:20:11
rnmhdn
I don't wanna just start coding and then have to rewrite the whole thing because I have a structural problem in my approach
10:20:42
no-defun-allowed
You'd likely need some backtracking to make sure you test every possible solution, and you may end up with multiple solutions which satisfy all of the constraints.
10:21:46
pjb
rnmhdn: backtracking means that you will need to generate families of results (lazily) and filter out the bad ones.
10:22:42
pjb
rnmhdn: so for example from the graph: (2)----<from>=to>=0L>---->[x] you must return { (2)----<from>=to>=0L>---->[0], (2)----<from>=to>=0L>---->[1], (2)----<from>=to>=0L>---->[2] }
10:25:24
pjb
So if you have (2)----(<= 0 to from)---->[x]<----(< from to)----(1), the above step will return: { (2)----(<= 0 to from)---->[0]<----(< from to)----(1), (2)----(<= 0 to from)---->[1]<----(< from to)----(1), (2)----(<= 0 to from)---->[2]<----(< from to)----(1) }, and the following step, will prune it to:
10:26:04
pjb
{ (2)----(<= 0 to from)---->[2]<----(< from to)----(1) } because the second constraint cannot be fulfilled for the fisrt two tries.
10:30:31
pjb
You generate one, and go on with the rest of the process, until you backtrack (or you never backtrack, having found a solution).
10:31:21
pjb
Well, it's strange that you want to do it functionnaly, using lisp which doesn't have lazy evaluation natively.
10:31:22
rnmhdn
the two way arrow between black node and b means they should be null at the same time
10:32:05
pjb
You're combining 3 or 4 difficulties at the same time. They're not extraordinarily difficult, but you have to know each of those problem and their solution well first, and then you may try to combine them in a lisp program.
10:32:10
rnmhdn
so I have to see if there is any possible solution for the black node that would satisfy all constraints
10:33:39
pjb
for example, I have a constraint solver here: https://github.com/informatimago/lisp/blob/master/common-lisp/cesarum/constraints.lisp
10:37:11
pjb
Once you get your algorithm running correctly, you can check the access pattern, and optimize the data structure used to represent your graph, keeping the same functional abstraction.
10:39:05
pjb
Well, if you want to walk the graph, what can be useful is to use adjacency lists. Ie. from a given node, have the list of edges starting from that node.
10:42:18
pjb
And since you want it functional, you will need (graph-replace-node-label graph node new-label) -> graph ; ie., you will generate a whole new graph just because you updated the label of a node.
10:42:42
pjb
of course, since it's functional, you won't use mutation, so you can actually share structure between the new and the old graph.
10:43:13
pjb
Also, when you use backtracking, it's a good thing, since then you can use again the old graph, to generate another new graph with another value for the node label.
10:44:00
pjb
(mapcar (lambda (possible-label) (graph-replace-node-label graph node possible-label)) (all-possible-labels-for-to-nodes graph node))
10:44:39
pjb
You need also "labels" one edges to store the constraints. (add-edge graph from-node to-node edge-label) -> edge (edge-label edge) -> label
10:48:54
pjb
What people look for in GUI, you can find it in genera and oberon (and MPW, and of course in emacs). It's basically that any text buffer can contain commands, and you can "click" or type C-x C-e with the cursor on that command to execute it. It's a variation of the REPL, basically.
10:52:26
pjb
So, in this talk Alan Kay presents half a dozen big idea. The main one here would be that to educate children, you need to put them in the world they will have to live 20-30 years later. To teach them French, put them in France. To teach them maths, put them in a Math World. To prepare them for their adult life, put them in the world as it will be in the future (which is the whole difficulty). We can try with sci-fi, but
10:52:26
pjb
unfortunately, we're getting more of 1984 and Brave New World, than Have space suit, will travel or Star Trek.
10:56:39
aeth
pjb: Well what everyone's being exposed to now is a lot of just-barely-not-gambling on iPads/etc. so the future is probably more like Las Vegas than 1984 or BNW.
10:57:41
aeth
Not even just the game loot box stuff that you may have heard about. Lots of not-game apps have random reward stuff to increase engagement.
10:57:57
pjb
No, everyone is exposed to the fake news from CNN et al. and siris, alexa and samsung smart tvs. This is pure 1984.
10:58:37
aeth
pjb: You were talking about the software UIs children are exposed to. Children don't care about CNN.
10:59:02
pjb
Everyone is exposed to assisted reproduction, surrogacy motherhood, artificial wombs; this is pure BNW.
11:01:11
verisimilitude
Erik Naggum put it well when he remarked how professionals use the same hardware and software others are expected to use and by noting how math would be if there were some need to dumb it down to train armies of unintelligent math workers.
11:01:59
verisimilitude
A tall person can have stunted growth, but a midget will always be a midget.
11:02:36
pjb
The migrations promoted by the ONU (Marakech pact), have the effect of displacing low IQ white people (they become homeless, and die or at least don't reproduce), by low IQ black people. Ie. this increase the discrimination, the society becoming quickly BNW like.
11:03:22
pjb
For a time, people thought that they could compenate IQ by education, and they realized how wrong they were; education benefit proportionnaly more to more intelligent people!
11:04:36
verisimilitude
So, I've not bothered to prove this yet, but FORMAT seems trivially non-turing-complete.
11:05:23
pjb
verisimilitude: notice for example, that sed(1) is not turing complete, but while true do sed … ; done is turing complete.
11:05:55
pjb
verisimilitude: so it looks like FORMAT is not turing complete, but it also seem very close to be it. And anyways, there's ~/ so you have a hook to CL anyways.
11:06:36
verisimilitude
I am always displeased when I MACROEXPAND something and find that LOOP may as well expand to SPECIAL-LOOP-PACKAGE:SPECIAL-LOOP-KEYWORD-DONT-TOUCH-FUCK-YOU; I'd prefer macros be written to expand to other symbols in CL as much as is possible.
11:08:01
aeth
verisimilitude: I definitely agree with you, though. Seeing the final resulting tagbody/go in the iteration helps sometimes
11:08:14
TMA
pjb: sed(1) is turing complete; you have conditions and conditional branches in sed (as well as unconditional branches), you can loop inside sed as well
11:08:23
verisimilitude
I'd be interested in a FORMAT that always wrote the minimal needed. A trivial example is using PRINC and friends wherever something more complex isn't necessary, rather than always delegating to subfucntions that implement the full model.
11:08:30
pjb
For example (defmacro IF* (test then &optional else) `(if* ,test (lambda () ,then) (lambda () ,else)))
11:10:08
verisimilitude
I'd be interested in giving LOOP a similar treatment; these are a nice starting point for my own implementation of Common Lisp I want to write, since you can simply implement them in terms of everything else in CL.
11:11:53
MichaelRaskin
I think most macros are technically allowed to be expanded to an implemetation-specific special form (with a string parameter, just to be mean)
11:13:21
aeth
well if you were going to implement Lisp in hardware, you might not have a lower (software) level
11:26:11
|3b|
MichaelRaskin: the implementation-specific special form would have to have a valid macroexpansion, but /that/ could just be a call to a function with a string parameter :)
11:27:25
MichaelRaskin
|3b|: I don't think so; cl:loop must have an expansion. but nobody prohibits this expansion being ext:loop-impl (special form)
11:30:31
|3b|
"An implementation is free to implement any macro operator as a special operator, but only if an equivalent definition of the macro is also provided. ", so that would be stretching things a bit
11:36:12
MichaelRaskin
The standard macros should have expansions, but nobody says they should be standard
11:36:57
MichaelRaskin
… and defun has a high chance to be indeed expanded to something interesting.
11:37:40
|3b|
i'd argue that "expands to a special form" should be included in "implement .. as a special operator", but it is poorly phrased there
11:39:04
MichaelRaskin
|3b|: I agree that it would be better if it was explicitly specified that all standard-defined macros used in portable code should expand into portable code
12:06:38
phoe
I love that thing when I need to operate on some body of code, like, wrap every element of that code with a list
12:06:54
phoe
And I just copy it, jump to the REPL, do a quick MAPCAR, copy the result, paste it back into the code.
12:19:03
|3b|
similarly C-- C-x C-e evals last expression and saves result to kill ring so you can paste it elsewhere
12:57:49
pjb
phoe: I don't even go to the REPL, I do that in the lisp buffer in emacs, wrap a pprint around it, and type C-u C-x C-e