freenode/#lisp - IRC Chatlog
Search
3:21:41
jasom
Zhivago: not quite; the working group added a *lot* of features that didn't exist already
3:22:13
aeth
You can define languages that compile to CL and CL is almost an acceptable multi-language environment, sort of like Racket's philosophy.
3:22:52
jasom
CLOS was strongly based upon flavours and common loops, but was a new thing. I don't know that any existing lisp used lexical bindings before they were introduced, but could be wrong about that one
3:23:22
Zhivago
I'm not saying that it was purely a compatibility layer, but that that's the direction that CL was introduced from.
3:24:24
aeth
One key thing that CL is missing is additional read-time, compile-time, macro-expansion-time, etc., power.
3:26:05
aeth
The current trend in programming languages is catching mistakes before the program has even run.
3:27:14
aeth
Someone would have to do a lot of work determining the minmium number of additions necessary at the implementation level (where everything else can be added by libraries)
3:28:13
aeth
What elements of pattern matching cannot be efficiently implemented in a portable CL library?
3:32:00
aeth
On the one hand, you have channels like this. On the other hand, you have #emacs where the topic is anything but Emacs.
3:35:00
whyNOP
rofl that's what i was thinking...except the rule is Emacs comes first, and all other chatter should be dropped in favour. it's a good system. sorry to be off-topic btw if that's a hard rule. i just wanted to observe this.
4:21:26
vtomole
What is the algorithm to parse sexprs? Some type of recursive decent? I don't know how to handle nested parentheses.
4:26:21
Petit_Dejeuner
You make a recursive call each time you get an open paren and return a sexpr each time you hit a closing paren.
4:32:27
beach
jasom: Not sure whether you are talking about lexical scope when you say "lexical binding", but Maclisp used lexical scope in the compiler (but not in the interpreter). And the use of lexical scope in Common Lisp was inspired by Scheme, that came before Common Lisp.
5:07:46
jmercouris
let's say I have a defclass, how can I use some of the args I define, in a later variable
5:08:13
jmercouris
for example given: https://pastebin.com/DvirDDsk, how could I reuse history-active-node in another argument
5:18:21
beach
jmercouris: Just use the accessor. The :accessor slot option automatically defines a method.
5:20:14
jmercouris
I have a a slot in a defclass, I want to use the value of the first slot, in a later slot
5:20:17
beach
"how can I use some of the args I define" does not make sense, because you are not defining any args.
5:20:25
pjb
jmercouris: consider a method of the initialize-instance or the shared-initialize generic functions.
5:20:47
beach
"how can I reuse history-active-node in another argument" does not make sense either, since they are not arguments.
5:22:45
jmercouris
so much re-architecture work to do as I learn more about lisp, I keep looking back at my code and shaking my head lol
5:25:54
loke
ACTION went to look for a new refrigerator recently, and the power consumption was written as kWh/year
5:26:58
beach
I often hear that this or that power plant produces so and so many Mega-Watt.... each day.
5:27:28
jmercouris
I was getting a segfault unless I put my variable into a parent let, any idea why that is?
5:27:29
pjb
jmercouris: but really, you should consider using the initialize-instance generic function, instead of some random generic function of yours.
5:28:03
beach
jmercouris: You should not get a segment fault, or you are using a low safety value, or a bad implementation, or both.
5:28:19
pjb
jmercouris: Unless you have to initialize a graph of instances. In that case you may need your own method to create the instances and hook them together.
5:28:43
jmercouris
I'll read more about clos and make things tidy, but I'm still learning and it's nice to have some code to refactor
5:31:04
jmercouris
iqubic: well, it's not exctly the epitome of stable, and it doesn't compile either, you can only load it
5:31:52
beach
jmercouris: If you had indented it correctly, it would have been easier to see the problem.
5:32:36
beach
jmercouris: It looks to me like you are using the variable ROOT in defining the variable MODE. You can't do that with a LET. It has to be a LET*.
5:32:47
iqubic
jmercouris: I was referring to the browser. Do you have to run the browser through a repl?
5:35:37
beach
jmercouris: I agree with pjb in that it is a very bad idea to use foreign code while trying to learn about Common Lisp.
5:36:33
beach
jmercouris: I am just telling you why it may be hard to help you. So you might find yourself on your own in many situations.
5:37:02
jmercouris
I appreciate the heads up, I am trying as much as possible to disentangle the two in the code
5:37:19
loke
ACTION has a couple of CFFI-using libraries on QL. The goal is to make them stable and fool-proof so that external users of the library will never have a problem. That is very hard.
5:37:47
loke
Getting it to work is easy. Making sure that it's stable in the face of all kinds of errors is another ballgame. I can't even imagine wrapping a GUI library.
5:37:48
pjb
jmercouris: one way is to separate the UI from the core, running them in different processes, communicating thru pipes or sockets.
5:38:41
jmercouris
iqubic: https://github.com/nEXT-Browser/nEXT/tree/master/next#002 version 0.01 is done, and workign on finishing 0.02
5:39:06
pjb
jmercouris: Then the lisp side is in pure lisp, and the other side can be in whatever, java, C++, we don't care if it crashes…
5:39:40
pjb
If it crashes, the socket is closed, and you can just relaunch the UI and re-open a new socket.
5:40:37
jmercouris
beach: also, the indentation from emacs gets ruined in pastebin for some reason, I just looked and is indented right on my screen
5:41:24
jmercouris
pjb: I'll have to think about that, maybe I can use threads at the least, to be clear QT crashing doesn't result in a complete failure of my program, the REPL still works...
5:42:10
loke
jmercouris: For some value of “work”. The problem si that ytou've placed the runtime in an inconsistent state and anything could happen.
5:46:30
loke
jmercouris: It's almost impossible to recover frm a SEGV. There are thousands of different things that could have happened that triggered it. Most of which involves corrupt data in memory. Even if you keep running after the SEGV the corrupt data is still there, waiting to surface.
5:47:37
jmercouris
loke: not exactly, it depends on whether that corrupt memory is a part of same thread, and your kernels' memory model
5:48:45
jmercouris
there's a lot of factors here, I don't think it's fair to say that SEGV means corrupt data waiting to surface
5:49:13
loke
jmercouris: How would you know? Once the SGV happened you have to assume that the state is corrupt.
5:50:25
Zhivago
You can recover by causing the address that faulted to be on an appropriately permissioned page and returning.
5:50:57
loke
Zhivago: Of course. I almost typed exactly that in my previous statement, but I figured it wasn't important.
5:52:05
jmercouris
I would disagree with that, we're making many assumptions about how the OS operates here
5:52:45
loke
jmercouris: You are the one making the assumptions... Mine (and others?) position is that you can't make any assumptions at all, hence you have to distrust the entire process.
5:52:47
jmercouris
what if the different processes are on different machines? what if it is a distributed system?
6:34:58
jmercouris
how can I know that what I am looking at on github https://github.com/oconnore/queues is the same thing?
6:35:23
jmercouris
specifically this line; #<system queues.simple-queue / queues-20170124-git / quicklisp 2017-04-03>
11:47:40
michipili
Hello there! I am new to common lisp and just tried quicklisp. I am not sure how to convince quicklisp package installer to look for 3rd party (binary object) library in special locations.
11:48:29
Xach
michipili: but in my experience, it is easiest to try to put those libraries in standard system locations
11:49:31
michipili
My lisp system is sbcl intstalled over macports and resides in /opt/local/bin/sbcl, yet the quicklisp system does not find libraries under /opt/local/lib
11:50:09
antoszka
michipili: I don't know about macports, but had good success running sbcl (and others) with quicklisp from brew.
11:50:59
antoszka
Though I only have a linux pc at hand at the moment, so can't look at my stuff immediately ;)
11:51:23
Xach
michipili: hmm, I don't know how that needs to be configured, sorry. for search purposes, it is not really a quicklisp issue - it is lower than that. it has to do with how the shared library loader (usually via cffi) searches, which also uses the underlying system configuration.
11:52:43
michipili
@Xach Well, I'm totally new to lisp and the corresponding environment so the tiniest bit of information is still helpful :)
11:54:36
Xach
michipili: you could try (push #p"/opt/local/lib/" cffi:*foreign-library-directories*)
12:01:06
Xach
There is also an environment variable you can set before starting lisp, or within lisp
13:25:23
rumbler31
michipili: coming from a lisp user on osx that also uses macports, try the push method Xach mentioned first. One way to do that is to quickload cffi first, then issue the above command, then quickload all other libraries. On OSX usually the shared objects have their dependencies embedded as full hardcoded paths, so for macports shared objects I believe this should be enough. The story changes on windows
13:27:47
rumbler31
Generally, modifiying DYLD_LIBRARY_PATH environment variable is considered bad practice for reasons that are complicated to explain, which is what you would ostensibly do to tell osx where to find shared libraries that it normally can not. If you go this route, then later use a gui like emacs to fire everything up, opening cocoa apps from finder does not import the login shell environment variables, so when emacs load
13:27:47
rumbler31
s lisp all of the dlopen calls for macports dependencies (ie the path in DYLD_LIBRARY_PATH) will fail
13:28:20
rumbler31
you have to open terminal and issue open /Applications/Emacs.app which will open the cocoa emacs app but inherit the environment properly