freenode/#lisp - IRC Chatlog
Search
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
20:54:25
jackdaniel
emaczen`: one thing is that you must call this function from your main thread (starting one)
20:58:48
jmercouris
any more recent performance benchmarks than these: http://www.cliki.net/Performance%20Benchmarks?
21:00:40
jackdaniel
jmercouris: https://common-lisp.net/project/ecl/static/files/misc/benchmarks/2016-05-bench-all.html
21:28:17
Josh_2
So I have this code http://paste.lisp.org/display/358158 and It currently enters the debugger and lets me choose my restart (division-by-zero-1 ..) however it is written like the example at the top of PCL page 240. I'm a lot confused about this.
21:32:57
jmercouris
like for example a defmacro that expands to a particular code on OSX and a different one on Linux
21:36:36
basket
jmercouris: You want the #+ read macro, you would use it like #+linux (foo) and foo would be evaluated iff :linux is in *features*, otherwise it's as if it were commented out
21:39:03
_death
Josh_2: there are several issues.. you define a DIVISION-BY-ZERO-1 condition, but never signal it.. when the division by zero will occur, a DIVISION-BY-ZERO error will be signaled by lisp.. you use the same name for a restart, which is just confusing; a better name would be, say, RETURN-NIL.. in N-RANDOM, you set up a handler in each iteration, which is unnecessary, you can have it once outside the loop.. you handle DIVISION-BY-ZERO-1
21:39:03
_death
conditions, which are, again, not signaled anywhere.. your handler function takes no arguments, but it should take one - the condition object