freenode/#lisp - IRC Chatlog
Search
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
18:44:57
phoe_
this function, when given a symbol, extracts a package that this symbol belongs to, and returns that package
18:45:39
phoe_
generic-function-methods - accepts a generic function, returns all of its method objects
20:46:43
emaczen`
I'm using CFFI with opencv and I've defined (defcfun "cvNamedWindow" :int (name :string) (flags :int)), and it will open a window with CCL but not SBCL