freenode/#lisp - IRC Chatlog
Search
0:33:00
no-defun-allowed
(Also, I probably wouldn't count on TBNL sticking, it's literally To Be Named Later, and it has been named.)
0:33:49
no-defun-allowed
You could use a package-local nickname now, unless you have some weird targets.
0:34:31
no-defun-allowed
Or you could use the package if it really bothers you, since Hunchentoot isn't going to change much soon, but that is still bad form to some people.
0:42:03
aeth
Speaking of packages, I think cl-documents is what I might call my Markdown->HTML library (and main package) since it'll stay strictly in the realm of text files (i.e. documents) rather than binary files (e.g. opticl with image files)
0:43:23
aeth
or maybe cl-document (singular) because then that's also a form of the verb "to document", so it would be a wordplay on its primary purpose, documentation
0:44:11
aeth
I'm half tempted to use trivial- instead of cl- because I suspect that it will grow into something nontrivial over time, so it would be funny to have the trivial- prefix.
3:56:57
tourjin
I opened emacs ctrl+x 3 . and compiled ctrl+c ctrl+c then error occured . left windows shows the errors. but how can I go back to original file?
4:13:23
tourjin
in my file I wrote a defparameter on first line. then I wrote a defun using that parameter . but if I compile it . error says undefined variable: *MYVAR*. is slime different from writing in command line?
4:27:57
pjb
tourjin: C-c C-c only compiles 1 defun. Having stuff in buffers, or even in files doesn't help at all.
4:28:36
tourjin
hm.. ctrl+c ctrl+c just compiles one line or one block where the cursor is . is this normal?
4:33:55
tourjin
how do u memorize the whole keywords? C-c C-c , I can figure it out it's a acronym of compile. what does k stand for?
4:34:49
beach
tourjin: You don't. Your fingers will remember at some point and you no longer have to think about it.
4:35:20
beach
tourjin: And please don't use abbreviations such as "u" for "you". Turn on your abbrev processor.
4:38:06
tourjin
thank you pjb you remind me i have a lot of docs to read. I don't get what s-expressions means. i see . i shoud'nt use 'u'. thank you. by the way it's not abbrev processor. I even don't know how to use abbrev processor in irc. it was me who typed 'u'. :-)
4:38:46
aeth
C-c C-c is for Command: Compile function. C-c C-k is for Command: Kompile file, since C was taken. at least, that's my justification, who knows what the authors thought?
4:45:10
beach
tourjin: If you use a decent program for IRC, such as ERC for Emacs, it will have an abbrev processor, so that you can define abbreviations. For example, you can make "u" expand to "you" automatically every time you type it as a word.
4:51:13
tourjin
i see. probably most of you must use irc in emacs. but I'm really really new to emacs or lisp.
4:54:38
beach
Then I guess you just have to do it the hard way, i.e. type everything out. Oh, the pain that people inflict on themselves by using mediocre tools.
4:56:26
tourjin
I would have'nt thought about irc if it was easy to find informations on lisp. now I get there was full of online documents out there and experts who will give me tips for solutions as much as even I can't comsume. thank you.
5:01:32
aeth
I don't use IRC in Emacs because I prefer having it in a separate program. I think I might be in the minority, though. I don't even use IRC locally, I ssh into a server and have a terminal IRC running in tmux.
5:03:51
beach
aeth: But I am sure it has an abbrev processor, right? I mean, you know to choose your tools.
5:05:45
pjb
aeth: you can use a different emacs instance for erc, if you prefer it in a separate process.
5:06:14
pjb
aeth: this is what I used to do, because of network delays: one emacs to program, one emacs for erc, and one emacs for gnus.
5:18:49
aeth
pjb: I often restart emacs several times a programming session mainly because that's the easiest way to close a bunch of buffers
5:24:00
beach
As far as I am concerned, people are free to inflict pain on themselves by using mediocre tools, but they shouldn't export that pain to others by (say) showing badly indented code or exposing unexpanded abbreviations such as "u".
5:29:05
thijso
I use irssi as my IRC client, mainly for historical reasons... And indeed, I have it running on a separate machine inside a screen
5:35:34
aeth
thijso: I used screen+irssi for a very long time when I switched to Linux a very long time ago, but I evnetually upgraded to tmux+irssi because of the superiority of tmux
5:36:35
pjb
aeth: (defun kill-all-buffers () (interactive) (dolist (buffer (buffer-list)) (kill-buffer buffer)))
5:45:23
thijso
aeth: screen does what I need it to do. I've heard of tmux and have this idea to check it out one of these days. Like for a couple of years, now... ;)
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.