freenode/lisp - IRC Chatlog
Search
6:14:46
thijso
Is there a (semi-)convention for marking function names internal/external/exported and such? I've seen, for example #make-thread in bordeaux-threads, but that's mainly to distinguish it from other make-threads, I think?
6:16:28
Shinmera
The % is typically for functions that are closely tied to some other context and are thus "extremely internal"
6:16:38
thijso
Shinmera: yeah, obviously, but it's more a style thing I had in my mind. But there isn't really, probably
6:17:36
thijso
Well, I basically have something now where I have an internal function that logically should have the same name as an external one
6:17:52
pjb
thijso: you write the name of exported functions explicitely in the :export list of the package. This is the convention.
6:26:24
jeosol
If I have an image saved from a previous run, and restart sbcl with the core file. I create a new module (defsystem) and tried to load it in and was getting errors. I am able to load the new system elsewhere through (e.g., fresh sbcl)
6:32:09
pjb
jeosol: so what? This morning, I got some raisin I saved, out of the fridge, and a firefly was eaten by a bird in the street.
6:35:05
pjb
jeosol: try again with: (handler-case (asdf:oos 'asdf:load-op :your-system) (error (err) (prin1 (class-name (class-of err))) (terpri) (princ err) (terpri)))
6:35:57
pjb
If you don't take the very specific information from this very specific error into account you won't be able to solve your problem.
6:36:47
thijso
I think what pjb is getting at is that it helps if you actually tell us exactly *what* errors you're getting, jeosol
6:38:49
pjb
So: (handler-case (ql:quickload :your-system) (error (err) (prin1 (class-name (class-of err))) (terpri) (princ err) (terpri)))
6:57:52
jeosol
Yeah, the system itself, not sure why. I just rebuilt the whole thing again and resaved the image.
7:00:33
pjb
there should be a file named something.asd stored in one directory where quicklisp will search it. For example, in ~/quicklisp/local-projects/
7:01:11
pjb
The name of the file doesn't need to be related to the name of the system, but it may help humans to retrieve things. So name it: your-system.asd
9:56:23
no-defun-allowed
Tried to cffi to alsa, I can't keep my timing straight apparently, and it sounds terrible.
9:58:01
no-defun-allowed
I mean that it's fast enough, but I can't write out bytes at the right time or something that I'm not sure about since I've never tried "realtime" sound production.
9:58:31
Shinmera
alsa is pretty lenient. You just give it a buffer and tell it how many samples it has.
9:59:24
no-defun-allowed
I mean (yet again), I can't figure out how long to wait before putting out the next buffer I think? Harmony looks much better, since I don't have to think about that at all.
10:00:43
Shinmera
Been years and I still haven't gotten around to rewriting libmixed to work on ring buffers.
10:00:48
no-defun-allowed
If I don't (in ALSA), won't I generate too much into the future and miss any more events that my synthesiser takes?
10:01:45
Shinmera
https://www.alsa-project.org/alsa-doc/alsa-lib/group___p_c_m.html#gabc748a500743713eafa960c7d104ca6f
10:03:58
Shinmera
Ideally Harmony should do the more sophisticated thing but it was working fine enough (so far)
10:12:06
no-defun-allowed
Preferably without my goddamn 61-key MIDI keyboard in the way. Thanks for another good library I didn't know about until now.
10:47:08
Lycurgus
https://trac.common-lisp.net/bordeaux-threads/wiki/ApiDocumentation that's the documentation?
10:48:12
no-defun-allowed
Plenty of Lisp things come from Bordeaux, but that factoid is usually shadowed by the somewhat larger wine output.
10:48:48
MaiAtusmi
I wrote a code in prolog and I need to do the same in lisp but I can't understand the logic...
10:50:49
no-defun-allowed
Bordeaux is a town in France -- oh, yeah, that's that, but that's not the same as bordeaux-fft.
10:52:00
no-defun-allowed
"FFT" refers to the Fast Fourier Transform, which maps a sample into an approximation of its frequency components.
10:52:33
MaiAtusmi
The job is to create a regular expression controller to check if it's a regular expression
10:54:21
jmercouris
MaiAtusmi: I can continue to help you on this channel, it'll be much easier than the messages on Reddit
10:54:48
jmercouris
I'm sure someone knows how to use finite automata, yes, anyone with a CS degree should, and I believe most of us here do have one
10:56:01
jmercouris
I think the goal is to check if the regular expression is a valid and logical expression
10:56:42
jmercouris
I basically had said to the user that they should make a function called is-valid-transition or something like that with a list of acceptable state transitions and then iterate through all of the chars in the regex string checking to see if all transitions are valid
10:58:34
jmercouris
Lycurgus: that's the only documentation I've ever seen, there is also some stuff in the Lisp Cookbook
11:03:13
beach
MaiAtusmi: All that stuff is very well documented. I suggest you go read the relevant documents.
11:04:37
jmercouris
Also, I'm afraid that this is no longer really a Lisp question, so I can't help you, this is more of a core computer science concepts thing, which I don't think you understand. First you must understand the concepts before the implementation
11:11:12
no-defun-allowed
I think it's more of a CS theory problem than a Lisp problem until you start implementing it, but I don't know anything about DFA and regular expressions (bar cl-ppcre) so I can't say.
11:11:47
jmercouris
it comes from the kind of people who think ed is a good editor, and mastering awk is a fantastic idea
11:19:33
pjb
MaiAtusmi: basically, each node in the regexp parse tree corresponds to some subgraph of your final NFA/DFA. It's rather trivial to build it. Then you can use NFA/DFA theory to normalize and simplify it.
13:22:39
beach
So what I want to do with the FFT is to generate assembly code by executing a Common Lisp program. The optimal number of operations is obtained when the radix is √n for a problem of size n.
13:22:46
beach
But that is messy, because in order for good code to be generated, the radix must be a constant. So I was thinking of generating a special version of FFT for each power of 2, up to some limit, of course. Then the radix is known statically for each case.
13:22:52
beach
I also want to use special floating-point instructions that can do several operations in parallel, hence the assembly.
13:22:54
beach
If shuffling is required, I already have a publication with the world's fastest shuffle algorithm. :)
13:36:20
scymtym
and just as important: https://www.pvk.ca/Blog/LowLevel/napa-fft2-implementation-notes.html
15:09:22
minion
The URL https://gitlab.common-lisp.net/users/sign_in?secret=60ec7dbd will be valid until 15:15 UTC.
15:20:41
minion
The URL https://gitlab.common-lisp.net/users/sign_in?secret=edcbb93f will be valid until 15:30 UTC.