libera/#commonlisp - IRC Chatlog
Search
10:56:24
flip214
what's the easiest library to show a 2D-array of float data in an x11 window as a bitmap (with a color palette)?
11:24:08
flip214
I guess https://sharplispers.github.io/clx/Direct-Image-Transfer.html#Direct-Image-Transfer would be a good starting point
11:33:50
jackdaniel
that said what I've meant is to draw directly on a drawable of the same size as the array
11:35:00
jackdaniel
i.e (draw-design *standard-output* (make-patterny <array> (list +red+ +blue+ +pink+)))
11:35:35
jackdaniel
the above assumes that array elements are either 0, 1 or 2 and they have assigned +red+, +blue+ and +pink+ appropriately
11:36:22
jackdaniel
(this draw-design is expected to be invoked in the context of the running application frame)
11:59:45
flip214
"Invalid initialization arguments: :CURRENT-LAYOUT, :REINITIALIZE-FRAMES in call for class #<STANDARD-CLASS COMMON-LISP:STANDARD-CLASS>."
12:07:21
jackdaniel
flip214: here is an example http://turtleware.eu/static/paste/80cf9813-flip214.lisp
12:08:17
flip214
jackdaniel: just did an QL:update-all-dists, so I don't think so. thanks for the example!
12:09:08
jackdaniel
they might be old because asdf did not realize some changes or because mcclim asd definitions are not correct
12:09:40
jackdaniel
because these changes were introduced in the same merge request, so these arguments are valid initialization arguments for the application frame
12:10:44
flip214
jackdaniel: The value 69/68 is not of type (OR (SINGLE-FLOAT 0.0 1.0) (DOUBLE-FLOAT 0.0d0 1.0d0) (RATIONAL 0 1)) [Condition of type TYPE-ERROR]
12:12:13
jackdaniel
replace the last clause in make colors with (colors (make-rgb-color 1.0 1.0 (* i number)))
12:28:00
lotuseater
how do i correctly create a subclass to a built-in class, by providing (:metaclass built-in-class) to DEFCLASS. let's say (defclass safe-vector (vector) () (:metaclass built-in-class))
12:28:40
pjb
That's the point of built-in-classes. If they could be extended by standard methods, they wouldn't be built-in.
12:29:18
pjb
lotuseater: also, note how integer is a built-in-class. What's the meaning of subclassing integers? Make colored integers?
12:30:33
pjb
lotuseater: on the other hand, if you're an implementer, then you can always create more built-in-classes, and possibly deriving one from another, depending on how they're implemented.
12:31:33
pjb
lotuseater: this also mean, that it's possible that some implementation let you do it, at least for some classes, using implementation level APi.
12:32:57
Bike
i don't know if it's disallowed to define a subclass of BUILT-IN-CLASS. defining a subclass of _a_ built in class (vector, number, etc) isn't allowed
12:33:42
jackdaniel
lotuseater: built-in-class is not the standard class so all bets are off regarding how it behaves, what would be a reason to subclass it?
12:34:38
lotuseater
but I was productive up to know and got ecl on raspberry work with quicklisp (as you advised me some days ago using setup.lisp) and compiled ccl, it just needed m4. but it's not obvious to me now how to link ccl for startup correctly
12:35:55
lotuseater
pjb: subclasses of integer could many things be, starting with even or odd integers. ok or using (deftype even-integer () '(and integer (satisfies even-integer-p))) by wrapping #'even-integer-p in an eval-when
12:38:02
jackdaniel
lotuseater: mcclim presentation type system allows you to parametrize cl classes (even built-in ones)
12:41:03
pjb
If we were smalltalk. But even with smalltalk, there are usually optimizations that would break subclassing of integer and similar.
13:07:13
jackdaniel
flip214: if you don't execute new commands then it shouldn't blink. that said - clx-fb backend has double buffering, "native" one has planned feature for that
13:08:08
jackdaniel
(let ((*default-server-path* :clx-fb)) (find-application-frame 'show-array :array the-array :own-process nil))
13:51:15
jmercouris
just making sure I'm not doing something stupid by overriding a package somehwere
14:54:07
jcowan
edgar-rft: Probably no one cares any more, but Guile 3's JIT makes it essentially as fast as Guile 1, so lilypond could be updated. Although it would still run unbearably slowly on a Vax.
15:28:48
beach
Tell me that the phrase "use-package checks for name conflicts between the newly IMPORTED [my emphasis] symbols, and those already accessible in package" is wrong.
15:30:29
beach
The glossary says "import v.t. (a symbol into a package) to make the symbol be present in the package".
15:33:47
beach
Since I am now working on the package system, I am slowly convincing myself that the entire package system could be defined in an external library.
15:34:23
beach
There are some minor interactions with symbols, like changing the home package of those symbols.
15:37:51
beach
Those interactions could be handled by the standard way that we have developed, i.e., the library has a generic function that it calls, and client code has to define a method on it.
15:48:25
Bike
slime-quit-lisp, i think? usually i'd just restart it, and this is assuming C-c C-c isn't working
15:52:22
edgar-rft
jcowan: I's not neccessarily my opinion but the people on the lilypond mailinglist who frequently are running Guile tests say otherwise. As far as I know the main problem is that it's the unneccessary Guile "compile" step that slows everything down. Lilypond passes the Guile results directly to C++ and therefore needs a fast Guile *interpreter*, it throws away the compiled code anyway.
16:13:22
jcowan
use-package imports the exported symbols of the package being used en masse, contra pjb's remark
16:58:22
lisp123
Is there a way to get the full call stack when calling a function? I have one with many nested loops & recursion and debugging is going slow
17:03:58
Bike
if you (declare (optimize debug)) appropriately you will probably get more complete call stacks, e.g. by preventing tail call optimization
17:21:09
pve
lisp123: are you aware that you can do all kinds of cool stuff in the slime debugger? (you probably are, just checking)
19:02:50
dieggsy
is there a manual way of checking a list of arguments against the acceptable parameter list of a function without actually calling it?
19:03:26
dieggsy
basically check if an apply will succeed (based on num args, keywords, etc.) before actually applying it
19:11:36
Bike
dieggsy: no, for several reasons, first of which is that the implementation doesn't actually have to save the lambda list of a function
20:08:06
aeth
dieggsy: there should be a way to do it because swank/slime displays the arguments in the minibuffer in emacs
20:09:02
aeth
and worst case scenario, it's unparsed, but (alexandria:parse-ordinary-lambda-list '(x y &key z))
20:09:08
Bike
which, besides behing extensions, are intended for human use rather than anything programmatic so they can have inaccuracies
20:09:23
Bike
and on high optimization that information can be removed even on implementations that do sometimes save it
20:27:37
Bike
doesn't look like sbcl's introspection distinguishes between a lambda list of () and not having the lambda list
20:39:54
scymtym
Bike: if i remember correctly, SB-INTROSPECT:FUNCTION-LAMBDA-LIST was changed about two months ago to return a second value which indicates exactly that