14:07:01stylewarningshka: good LAPACK bindings are hard to do portably, require one to know how to load foreign libraries—system provided, possibly written in Fortran
14:07:33shkabut it surely is easier than trying to implement everything from scratch
14:08:35stylewarningIt would be a difficult endeavor to rewrite LAPACK, yes. But if you used pure Lisp, you avoid tons of issues that you only get by binding with LAPACK
14:08:49Xachsuch as the irritatingly good performance?
14:11:07stylewarningYou can get within a single digit number of orders of magnitude (<5) from a portable BLAS/LAPACK
14:13:36Haragwas having issues with my slime menu in ubuntu 17.04 and emacs 25 in a fresh install, thought it was my .emacs loading something that messes it up but turns out that ubuntu uses /usr/bin/emacs25 and when you use that menus go for ball of .... change it to /usr/bin/emacs and slime menus work fine... heres to an hour waisted
14:15:47stylewarningI went through the exercise of writing a portable but fast linear algebra library. All of BLAS (essentially) + a good number of LAPACK essentials. But it was exceedingly hard and weeks and weeks of full-time paid work
14:16:26stylewarningAnd the further I got in, the harder it was
14:26:29stylewarningShinmera: those macros are at least understandable compared to https://github.com/matlisp/matlisp/blob/master/src/base/coordinate-accessor.lisp
14:34:33JuanDaughertycoloring within the lines of CLOS may be beyond the capabilities of the average bear
14:38:31stylewarningAnyway, definitely not looking to put down that library and that person's hard work, but it is a good example of a different point on this spectrum of library quality and construction
15:14:59beachI wonder whether that was a list of things JuanDaugherty avoids: 1. disputations. 2. me. 3. other nasty stuffs. That would imply that I am some nasty stuff.
15:15:33ShinmeraMaking a wrong statement, ignoring questions about it, and then calling people questioning small minded sure is quite the stunt.
18:06:14phoe_I just deleted CL-YESQL from ~/quicklisp/local-projects because it is now available in Quicklisp. How can I tell Quicklisp, or ASDF, that it should fetch the project from Quicklisp instead of looking for it in local-projects, without restarting the Lisp image?
18:06:50flip214phoe_: IIRC quicklisp will see automatically that the ASD is gone, and re-fetch as necessary.
19:03:58White_Flameit apparently has a very fast bignum library, and it tends to be compilable on many odd varieties of systems starting from just a C compiler
19:04:00phoe_Things CLISP is good for. Strong sides.
19:04:41phoe_And also, it is an interpreted implementation, by default. So it does not have any compilation overhead, which is good for scripts. This, and its portability like White_Flame mentioned.
19:09:58White_Flamedavide89v: the preferred development environment is Emacs + SLIME (connector between emacs & a running lisp), which provides a lot of really good interactivity
19:11:42miniondavide89v: please look at pcl: pcl-book: "Practical Common Lisp", an introduction to Common Lisp by Peter Seibel, available at http://www.gigamonkeys.com/book/ and in dead-tree form from Apress (as of 11 April 2005).
19:21:00flip214davide89v: depending on how much effort you already spent with vim, you could also try vim+slimv. that's similar (albeit not as good) to emacs+slime.
20:03:18phoe_I saw pure PS that generates a page-sized Mandelbrot fractal
20:04:18White_Flamerpg: I've written an entire suite of recursive traversal/search stuff, and there ends up being so much variation that I can see why alexandria doesn't include it
20:05:19White_Flame(and I think 1 level deeper than that)
20:05:33White_Flamethe "deepness" depends on if it'll traverse through arrays, hashtables, object slots, etc
20:05:42phoe_(traverse foo as tree of conses for bar if (eq (car bar) 'x) replace bar with (list 1 2 3 4))
20:05:50rpgThe test first has to decide what kind of tree nodes are interesting (e.g., symbols), and then do the real test, and doing that while in subst-if seems to work nicely
20:06:00White_Flamealso variations that support dotted lists
20:06:17rpgoh, yes, and the test always fails (so no substitution need be done)
20:06:54phoe_(traverse foo as 3D array of structs foo-struct for bar if (foo-struct-baz bar) do (setf (foo-struct-baz bar) 42))
20:59:56aethphoe_: If you judge languages by ability to self-implode just (declaim (optimize (speed 3) (safety 0))) and you will have a language almost as powerful as C... not quite, GC still prevents a lot.
21:00:09aeth(In most if not all CL implementations.)
21:00:55phoe_aeth: I know, I know. Except I can't (declaim (optimize (safety 3))) in C, even if I wished.
21:01:39aethSafe Cs exist, but afaik they'll cost you lots of money.
21:01:45phoe_oleo: there's no portable way of doing this, and it's always dangerous because you never know when GC is going to *need* to kick in, e.g. when you run out of heap.
21:01:47Bikei think you could just as well use handler-case for stream-error and not do a goto, but then you have both handler-bind and handler-case, so meh
21:02:00aethIt's not like aircraft use Rust. They use safe Cs.
21:02:30phoe_aeth: I kind of wish Rust actually takes the throne named "safe C".
21:02:58Bikeaircraft also have a nice process where "user error" is expanded into "okay, what can we do to make users not do this in the future" which is pretty alien to programming
21:03:58aethphoe_: I'd much rather have a non-GCed CL-like Lisp if I had to write code for C's niche. I don't need high-level syntax in a not-very-high-level language. Syntax gets in the way.
21:04:46phoe_aeth: have you seen https://github.com/carp-lang/Carp ?
21:05:23aethEvery language wants to look like math, but (1) math is a 2D language with rich symbols and (2) math is kind of ambiguous (e.g. what is tau or k or p or u? depends)
21:07:07phoe_When I call a DEFUN, how does an implementation know if the function is redefined with another version?
21:07:43phoe_If I C-c C-c a DEFUN form a few times, there is no remark from the implementation that I'm redefining something, but if I change a thing in the form and then hit C-c C-c, SLIME tells me there's a warning because I'm redefining a function.
21:07:59White_Flameit also records from where you defined it
21:12:12phoe_I bet that if there's a stop-the-world GC, then all threads must be stopped nonetheless - if non-GC code accesses GCable data, which I bet is possible
21:12:14aethI am not sure about all of the details of D, it's further down my list because it's fairly obscure.
21:12:41White_Flamephoe_: if all memory accesses use read barriers, then you can let them run concurrently
21:14:22Bikethe spec wouldn't have to be changed, since it only defines like two things remotely related to memory anyway, and none of them are a garbage collector
21:15:45White_Flamelisp is already a meta language! :)
21:15:49whomanidk how "meta" was associated with "off topic"
21:15:53aethTo talk about #lisp, #'lisp would make sense
21:15:57whomanWhite_Flame, well about D and other langs =)
21:15:58phoe_aeth: what would a (declaim (gc 0)) mean in practice? that all variables now need to be stack-allocated?
21:16:23aethphoe_: yeah, basically dynamic extent either works or it errors rather than compile afaik
21:16:24phoe_(I bet it's an easy question to answer if it took D several years to get it right)
21:16:36whomani have never seen the term "meta" used to hint or imply off topic things. also whats going on seems quite on-topic. i fail to see the logic.
21:16:44phoe_so you can allocate nothing unless it's dynamic extent
21:16:49aethphoe_: Right now you have to disassemble, profile, etc., to find allocations
21:18:53Bikeaeth: that's more like, "we don't use heap allocation, so you might as well just turn off gc" isn't it
21:19:24aethphoe_: You need to make sure that most of the standard is usable no-gc and many popular libraries, and you'd probably need to extend structs to make them less painful
21:19:27Bikephoe_: dunno. finding the full set of operators that allocates. deciding whether something that /can/ allocate actuallyw ill. probably.
21:27:24aethWell if you define the lambda separately and then (declare (dynamic-extent my-lambda)) it might work properly in the map?
21:28:14aethIt could probably be hidden by a macro if it works
21:30:54aethI suspect that #'+ uses a special optimization in map, though. I can't write by hand code as efficient as produced by (map 'foo #'+ foo-1 foo-2) in SBCL's disassembly
21:31:16aethAt least where foo is e.g. a vec sized 3 of single-floats
21:34:52White_Flameif you used a literal lambda expression in there, I presume it would attempt to inline it as well
21:50:31aeth(deftype foo () `(simple-array single-float (2))) (defun test (u v) (declare (foo u v)) (map 'foo #'+ u v)) (defun test-2 (u v) (declare (foo u v)) (map 'foo (lambda (x y) (+ x y 2)) u v))
21:50:35aethNow e.g. (let ((u (make-array 2 :element-type 'single-float :initial-element 2f0)) (v (make-array 2 :element-type 'single-float :initial-element 42f0))) (list (test u v) (test-2 u v)))
21:53:53aethIt looks like test-2, even when optimizing for speed, does inline the function (if that's what "; #<FUNCTION (LAMBDA" is in the comments of the disassembly?)
21:55:06aethI suspect test-2 isn't that much more efficient than this: (defun test-3 (u v l) (declare (foo u v) (function l)) (map 'foo l u v)) when you do e.g. (test-3 u v (lambda (x y) (- x y 10)))
21:59:25aethHmm, so I guess one issue is that curry is in alexandria and not the core language. If curry was built into SBCL, couldn't it special case things like this? (map 'foo (curry #'+ 2) v)
21:59:31shka_beach had nice talk at ELS about this
21:59:34aethAnd then mapping simple arithmetic would be solved, concisely too
22:02:14pjbaeth: (shadow 'map) (defun map (&rest args) (apply (function cl:map) args)) (define-compiler-macro map (…) …) and you can special case map curry yourself!
22:18:56Bikefor any call to map you can usually resolve the result type at compile time. and if it's a fixed (map ...) call rather than apply, you can expand into a loop in place.
22:20:17shka_well, that's really great stuff but i need to sleep