freenode/#lisp - IRC Chatlog
Search
9:08:46
Shinmera
Is it a new ASDF "feature" to complain with an unrecoverable error when a system tries to modify the standard readtable?
9:09:04
Shinmera
This only seems to happen if the readtable modification happens as part of a system loaded through defsystem-depends-on
9:30:21
scymtym
Shinmera: i think the error is signaled by SBCL. try (with-standard-io-syntax (set-dispatch-macro-character #\# #\z (lambda (&rest args) nil))) in the repl. maybe ASDF now restores *READTABLE* to the standard readtable before loading a system or something like that?
9:32:38
scymtym
afaik, there is this "syntax control" branch in the ASDF repository which controls the readtable more strictly. i didn't think that made it into master, though
9:32:42
jackdaniel
https://gitlab.common-lisp.net/asdf/asdf/blob/syntax-control/doc/syntax-control.md
9:36:25
Shinmera
scymtym: It seems it is signalled by SBCL, but I don't understand why it only happens with ASDF 3.3
9:37:15
Shinmera
Furthermore it only happens for defsystem-depends-on. If I first load the dependency manually it works fine.
9:38:06
scymtym
Shinmera: no idea, sorry. maybe ask fare directly or ask on asdf-devel as jackdaniel suggested
9:38:54
scymtym
beach: are funcallable instances involved? it may be the "slyrus bug" unless you already upgraded after that
9:44:52
beach
I guess it doesn't matter. I'll just download the newest version and see whether I still get those errors. If I do, it's my computer. But it occurred to me that, since no other software on my computer seems to have any problems, it might be SBCL.
9:45:13
scymtym
probably 9a20c2c0b04a4b73fd34ac81358082c796a66f68 on Sep 20 which was first included in 1.4.0
9:47:53
beach
Thank you so much! You just saved me the trouble of buying a new computer, installing all the software, etc, et.
9:51:43
scymtym
beach: your welcome. please note though, that i made sure to always say "may" or "probably" :P
9:52:32
beach
Sure. Nothing bad is going to happen to me anyway. I just installed the newest version of SBCL. I'll let you know if the problem happens again.
12:35:23
knobo
the trouble I had some days ago with slime-tramp, was because roswell uses roswell-slime-contribs, not slime-contribs..
13:14:39
jmercouris
In case anyone is wondering what the issue is, I have no idea, but using the kivy available via pip 1.91 did not work, I had to install from source
13:20:59
jmercouris
dlowe: don't worry, I'll get to lisp later today, using CFFI, :D also kind of blasphemous
14:08:56
Shinmera
https://github.com/Shinmera/3d-vectors/blob/master/3d-vectors.asd#L23 https://github.com/Shinmera/3d-vectors/blob/master/3d-vectors-test.asd#L17
14:09:54
Shinmera
Xach: Are you working on running tests automatically as part of the Quicklisp dist or something?
14:10:39
Xach
Shinmera: yes. the model I'm trying now is "run some code, and if there is an error, save and report the transcript"
14:11:01
Xach
So I'm wondering how easy it is for failing tests to signal errors, and if that results in a meaningful transcript
14:11:29
Shinmera
Depends on the testing framework, I suppose. Some of them capture all errors, others don't.
14:11:32
Xach
But the underlying mechanism is purely arbitrary code, so tests can be pretty small and arbitrary and cross-system.
14:12:17
Xach
Prompted by some recent trouble with a couple systems that compiled independently fine, but had fatal runtime problems working together.
14:15:38
Xach
The idea being that in addition to "does it compile" there would be "do all test 'scripts' run without signaling an error"
14:16:36
Xach
And with the intent to make it easy to run by anyone else, too -- not tightly integrated into the quicklisp build stuff
14:16:53
Xach
so I can meaningfully say "check out the latest X and Y and run test script Z to see the problem"
14:17:22
Shinmera
An integration test suite would definitely be a good thing to have, since that's often missing.
14:18:55
Shinmera
3d-vectors uses Parachute, which offers multiple "report types". Another one would signal errors.
14:19:30
Shinmera
Most other frameworks offer only one or the other way, with the usual tendency being towards capturing all errors and just reporting, from what I've seen.
14:20:08
Xach
Can you suggest a way to get an error if there's a test failure? It doesn't have to be pretty
14:20:43
Shinmera
(ql:quickload :3d-vectors-test) (parachute:test :3d-vectors :report 'parachute:interactive)
14:21:18
jackdaniel
asarch: no, clisp is ANSI Common Lisp, GNU Common Lisp is Common Lisp the Language 2
14:24:05
beach
asarch: Neither CLISP nor GCL are very popular choices here, so if you want help to be readily available, it is better to choose something more people use.
14:24:07
Shinmera
Xach: I really wish ASDF offered some kind of way to add options to asdf:test-system so that things like that could be configured from there.
14:25:23
Xach
Shinmera: I wonder about signaling a condition, which would have no effect by default, but for which I could add a handler. but then the question is "which condition?"
14:28:17
Xach
Heh, you could use a simple-condition and stuff arbitrary data into the format-arguments.
15:11:44
phoe_
Xach: I have one question. CL-LZMA has a very small test suite that verifies that the foreign library was imported successfully and works. Is there any article on how that test suite should be invoked?
16:17:04
sjl
Shinmera: I didn't have time to figure out the buffering thing for the jam, but I still intend to do it at some point
16:17:34
sjl
Shinmera: I decided to try making something simpler first, to try to get my head around all the moving parts in Harmony, so I tried making a sine generator source
16:55:20
sjl_
Shinmera: I was also confused about a couple of things. Like the CHANNELS argument to MAKE-CHANNEL.
17:00:07
Shinmera
sjl: Okey, so, for your example you probably don't want to use a source as the superclass, since sources run a source->buffer translation step after the raw data is decoded.
17:00:39
Shinmera
sjl: The reason why sources have a channels argument is because they handle the translation from a single sound sample array to one buffer per channel.
17:01:25
Shinmera
sjl: But since you only have one channel and your data is already floats, the decoding step is unnecessary and you could instead directly write into a buffer.
17:02:39
Shinmera
sjl: I guess the confusing part is the name "source". A source, in libmixed terms, is a segment that decodes a single array of encoded audio data into one or more buffers of floats.
17:03:37
Shinmera
But in this case it doesn't make much sense to do so, since a segment works just as well.
17:05:35
sjl
I guess that answers my other question: what to do with the buffer make-channel created, which I don't think I need
17:05:46
Shinmera
Well, it doesn't really decode either, it's more of a "destructuring" or "normalising"
17:06:23
Shinmera
I don't think anyone really uses this yet, and if so at the point where the name change would screw things up.
17:07:05
Shinmera
cl-mixed has an example for a custom segment with the logic implemented in lisp: https://github.com/Shirakumo/cl-mixed/blob/master/test.lisp#L127
17:09:03
sjl
so in my case, it would be implemented something like (setf (pos source) (* time-per-sample position))
17:09:03
Shinmera
The SEEK function handles the logic for translating seconds to sample index though, so all you need to implement is seek-to-sample that resets the input to a specified sample index (if applicable)
17:09:24
Shinmera
Well in your case, since a sine wave is inaudibly contiguous, you could just not do anything.
17:10:36
Shinmera
Anyway, I feel really horrid at explaining this all in roundabout ways and feel like if I implemented a simple 'source' to demonstrate how things should work would make things much clearer.
17:11:57
sjl
and even if I primarily want to use the top layer (harmony)I need to understand the next one at least
17:12:49
Shinmera
FWIW here's how libmixed implements the sine source: https://github.com/Shirakumo/libmixed/blob/master/src/segments/generator.c
17:13:31
Shinmera
the essence is just this https://github.com/Shirakumo/libmixed/blob/master/src/segments/generator.c#L56
17:14:08
Shinmera
But yeah. I'll throw together some examples tomorrow to hopefully clear things up.
17:14:18
sjl
yeah, I've done something like that with portaudio https://github.com/sjl/cl-chip8/blob/master/src/emulator.lisp#L331-L430
18:03:52
Xach
I guess I need to make it really easty to run outside of quicklisp dist construction like, right away.
18:15:14
akem
what slime contribs do ppl usually include? I have the slime-fancy one by default, but I noticed that this doens't include slime-cl-indent
18:25:01
Xach
Ah yes, there are problems with bare $0 and the path, now I remember. But it should work for the documented case anyway.
19:18:12
cgay
ob lisp: I was surprised today to rediscover that z must be positive (loop from x downto y by z ...) since it seems natural to say "by -1" there.
19:19:45
cgay
Sure. I can see that once you have decided to have "downto" in the language you could arrive at that decision legitimately. :)
19:19:50
z3t0
I can get the basic-window example to run as per the instructions, but cannot get it to run if I try copy pasting the example code into my own
19:30:18
lambdice
do you know if the result of type-of is consistent over all the implementation of common lisp ?
19:32:01
lambdice
Shinmera: in fact i am having fun with a little tool for serializing different object, vector, hash-table etc
19:35:30
pjb
lambdice: there are constraints on the types and their subtype relationships, but some subtypes may be equal to their supertype, or the implementation may have additionnal types in the middle. Testing (subtypep (type-of x) some-type) or (typep x some-type) will give more consistent results.
19:39:22
pjb
Yes, but float has 4 subtypes: short-float single-float double-float and long-float. Some implementations have the four subtypes distinct. In some other implementations, short-float = single-float and double-float=long-float. There are constraints on what subtype may be equal to what other.
19:40:09
pjb
Another example, the type character has two distinct subtypes base-char and extended-char. But in some implementation base-char = character, and extended-char = nil.
19:40:37
Shinmera
I think it's even allowed for type-of to return something other than symbols and conses as long as you can do typep and subtypep with the returned type.
19:42:08
pjb
Also, when you consider type-of, implementations may be moreor less specific. eg. (type-of 1) returns BIT or (INTEGER 1 1)…
19:44:24
Shinmera
lambdice: My point is also that the type returned might not even be readably printable.
19:45:21
pjb
clhs 4.2.3 says Type specifiers can be symbols, classes, or lists. so I guess Shinmera is right, #<class foo> could be the result of (type-of (make-instance 'foo)) Perhaps it may occur when the class is anonymous.
19:45:51
lambdice
Shinmera: indeed, pjb point on testing the type with subtypep on something more general
19:45:53
pjb
clhs 4.2.3 says also: A class object can be used as a type specifier. When used this way, it denotes the set of all members of that class.
19:49:13
pjb
But you need to add the variants, such when base-char = character, or short-float=single-float, etc.
20:15:10
rumbler31
so i've wondered, while the graph of types is nice, what do people really use it for?
20:25:07
pjb
rumbler31: to know that you can call the function (defun f (x y) (+ x y)) with as arguments any pair of numbers, including fixnums. Or complexes.
20:44:20
jasom
Xach: I seem to recall someone saying that it wasn't quite a lattice due to certain array type rules?