freenode/#lisp - IRC Chatlog
Search
7:53:55
jackdaniel
rumbler31: if you are still interested: https://gitlab.com/embeddable-common-lisp/ecl/commit/3043dac56b097d95b7a66fea7f71d40de8101453 (and commits around that)
7:54:52
p_l
Shinmera: combination of a) finding a solution to significant part of what you wanted to fix b) general awe in amount of projects, finished or not, you make
7:55:06
dim
Shinmera: how easy is it with deploy to support “--self-upgrade” option, by which I mean give the program a path to fresh sources (with a bug fix) and have it load the new sources at startup (monkey patching itself)?
7:56:46
Shinmera
dim: I've been thinking about a library to handle upgrades, but I can't say when I'll get to it. Might be years.
7:57:06
dim
the difficulty that I had with that is ASDF wanting to reload all dependencies from sources, where the ones in the binary are actually fine
7:57:12
Shinmera
p_l: I see. All I can say is that I have a lot of free time to use and nothing better to do.
7:58:31
Shinmera
dim: What you can do in the interim is compute the action plan to load your system ahead of time, which will give you the order in which to load FASLs. That way you don't need to use ASDF at all.
8:00:18
Shinmera
What I'm saying is: if you know the order in which to load FASLs, all your --self-upgrade option needs to do is, well, load the fasls from a directory in that order.
8:00:19
dim
it took me so much efforts to get to a point where my users can `git clone` and `make` and just use pgloader that I'm very worried about changing the build process
8:00:57
dim
they know nothing about CL, don't have a nother SBCL/CCL installation, don't have any fasl file, nothing
8:01:34
dim
so either they install SBCL, some other bits and then can `git clone` and `make`, or I would like that the integrated compiler within pgloader could be used to monkey patch the binary at startup
8:01:43
Shinmera
But you just said that with --self-upgrade you'd give a path to sources to use for patching
8:03:35
dim
I see, just for upgrading... but what's the binary compat' of FASL from a platform to another?
8:03:36
Shinmera
Either way, the point is: you can compute the load order ahead of time, and then use that to load your sources without ASDF.
8:04:50
Shinmera
Adding a step to check for fasls and otherwise use compile-file first wouldn't be that big of a deal either.
8:06:27
dim
you can see my earlier failed attempts at https://github.com/dimitri/pgloader/blob/master/src/hooks.lisp
8:11:21
Shinmera
Here's a quick idea of what I'm talking about: https://plaster.tymoon.eu/view/672#672
8:11:50
Shinmera
If you wrangle the pathnames a bit you can get a nice and clean list of source files that are necessary to load to get your system going.
8:12:05
Shinmera
You can then save this list in your binary, and use it to load from a directory at startup.
8:24:16
Shinmera
It's a frequent source of frustration, since it makes it hard to analyse the files without executing code.
9:13:52
forb291
:) ok :) I am trying to use it directly from an sbcl repl without going through the install. Is it possible? Currently, just doing (ql:quickload :pgloader) stops in trying to find the mysql libraries. But I only want it to load some csv into postgres
9:14:31
dim
I didn't work on alternative dependencies yes, so you need the full set of supported drivers at the moment
9:15:54
forb291
hmm it doesnt. maybe I will cpy it to local-projects and install the libs myself. I wonder is it easy to map the lisp api from the command line documentation?
9:17:08
dim
the lisp API isn't a straight map, but https://github.com/dimitri/pgloader/blob/master/src/api.lisp should get you started
9:20:09
forb291
ok, I ll get to it. Thanks a lot for the project. Btw, I tried to find a donation link, but I couldn't. Is there any?
9:26:15
schweers
does anyone know if using return-from to escape deep recursion (a few hundred calls deep) is particularly bad for performance?
9:29:05
beach
schweers: I doubt it. It probably removes all stack frames with no unwind-protect by just adjusting the stack and frame pointers. That's how I would implement it anyway.
9:30:30
schweers
I was wondering if the presence of return-from might make function calls particularly expensive
9:32:22
beach
Having said that, I don't actually know what SBCL does; only how I would do it myself. I also know that the SBCL maintainers are smart people, so I am guessing that they would have come up with solutions at least as good as mine.
9:35:20
minion
lisppaste: lisppaste is an IRC bot that runs under the nickname "lisppaste" and can be used (only for the #lisp IRC channel!) at http://paste.lisp.org/new/lisp - or http://paste.lisp.org/ for other destinations
9:36:57
schweers
the code is not very pretty and you can ignore time-into *augmenting-path-time*, its for debugging
9:37:54
schweers
out-edges is pretty much constant-time (well, it depends on how many edges a node has, which is typically only a few)
9:41:09
schweers
if the input is large (I‘m testing it on ~68k vertices) a call to AUGMENTING-PATH usually takes minutes
9:41:46
schweers
for some reason directly profiling did not occur to me, no. Don‘t know what made me not do that.
9:47:27
scymtym
not very important, but (time (with-profiling () …)) can eliminate a few things from the profile
9:47:32
scymtym
unless the type of the LEVELS array is known somehow, accessing its elements and then doing arithmetic with them is expensive
9:48:51
schweers
scymtym: expensive enough to explain why it takes more than a weekend to run on 68k vertices?
9:49:55
beach
schweers: That kind of execution time means some super-linear behavior. It could be intrinsic in your algorithm. I don't fully understand it.
9:50:05
scymtym
i can't say anything in terms of your code, but the difference can certainly be an order of magnitude
9:51:23
schweers
I’ll try to isolate a call to augmenting-path so it will be called once instead of really often in order to do some statistics on it after lunch
9:51:46
schweers
beach: yes, but the algorithm only follows edges which descend costs to a set of destination edges
9:54:02
schweers
normally the algorithm is quadratic to nodes, but I use a variant which should be faster
9:55:49
scymtym
the way PATH is updated with the return value of the recursive call makes the code hard to understand
9:57:19
schweers
scymtym: I know, its not exactly the most beautiful code I‘ve ever written. Its a port from C++ code
10:00:33
forb291
dim it works perfectly, after installing the freetds file. Since the options I need to feed to pgloader are scattered in different places, I used cl-emb to make a command text with my source, target, options, etc, and then feed it to run-commands api. I dont know if I need a true api, since this is very flexible. anyway thanks again for the info
10:02:49
forb291
the only thing I will try is modularize the loading of dependencies, so they are not all needed to load pgloader
11:03:41
Josh_2
When talking about condition handling, non-local transfer of control means control being moved outside of the current function?
11:20:00
jdz
Josh_2: in case of condition handling non-local transfer of control is when the control is explicitly transferred out of the handling construct.
11:49:27
schweers
does sbcl use :type specifiers in DEFCLASS in its type inferencer? or do I have to manually specify the types of slots again in code that uses them?
11:59:34
jdz
schweers: what exactly are you trying to accomplish, considering that classes can be redefined at any time?
11:59:38
schweers
I know, and now that I think of it, it‘s somewhat obvious to me that this would at least be difficult
12:00:54
schweers
I have a class which contains --- among other things --- a simple-array of fixnums. I was naively hoping that using an accessor on an object of this class would let the compiler know what kind of value to expect. But now that I think of it, it might not be possible.
12:01:23
schweers
anyway, as soon as I add (the (simple-array fixnum) (accessor-use obj)) the compiler is happy
15:03:35
beach
schweers: SBCL uses the type information if you have the right OPTIMIZE settings, or at least it did that in the past.
15:04:34
beach
Again, the default settings are unfortunate, in my opinion, because most people just leave them that way, and then they are missing out on beter debugging behavior.
15:04:42
schweers
beach: for some reason it didn‘t for me, on the contrary: it warned me that it didn‘t have enough type information. But now that I’ve added some hints the warnings disappeared :)
16:05:04
Josh_2
How do I define a condition that needs no slots for an argument passed to a function?
16:11:52
_rumbler31
beach: can you go into a little more detail on that? I.e. what are the default settings (or what don't they provide), and what do the settings need to be, and how should they be applied?
16:12:48
beach
_rumbler31: I don't know that much. I just know that I have (declaim (optimize (speed 0) (debug 3) (safety 3))) in my .sbclrc.
16:13:26
beach
_rumbler31: And that means I catch things that people using the default settings can't, and I get more information in my backtraces.
16:14:34
beach
_rumbler31: But mainly, I am surprised that people don't do this, and instead spend a lot of time trying to find difficult bugs with the default settings. And that has made want the default setting to be different.
16:16:56
beach
But showing more detail in backtraces is very valuable. As I recall, there is also more detail about the precise location (in source code) of an error.
16:25:18
Josh_2
I read the papers _death suggested to me on the condition system in CL, and I understand how it works, but not how to actually use it...
16:26:53
beach
I mean, a simple use is just to signal an error when your program detects a situation it can not handle.
18:41:46
vsync
what does this mean? "| foo-bar | type-slot, converting FOO to BAR |" on http://www.cliki.net/naming+conventions