freenode/#lisp - IRC Chatlog
Search
23:23:42
verisimilitude
I see you've been working with CHIP-8, lately, no-defun-allowed; I find that interesting, as I've been working with CHIP-8 as a starting point for some of my works, although this isn't much related to Lisp. Feel free to PM me if you're interested.
0:39:06
no-defun-allowed
i'm looking for something harder to emulate that isn't risc-v or "lol write a ps4 emulator" though
0:39:55
verisimilitude
Oh, so you are interested in seeing what I've been working on that relates to this?
0:43:18
verisimilitude
You mentioned compiling unconditional CHIP-8 segments earlier; do you have a proper mechanism for when such code is modified or what?
0:50:17
no-defun-allowed
in future, i'll add a write barrier which checks for that and removes the compiled code
0:59:24
no-defun-allowed
i don't think i have tested any programs that use self modifying code though
1:03:27
verisimilitude
I strive to write small CHIP-8 games and I want to make use of self-modification, but the awkward memory access instructions get in the way of that, usually, although it's not for lack of looking for opportunities.
1:04:31
verisimilitude
I haven't looked through a large enough selection of such games to know how common it is, though.
1:19:46
verisimilitude
Well, I suppose if it's fine, I'll drone on about what I've been doing with CHIP-8 there.
1:54:49
hectorhonn
how do i use read-from-string to get the "form"? e.g. "(+ 1 2)" should give the list (+ 1 2), not 3. (does that make sense?)
1:56:03
verisimilitude
That's what READ-FROM-STRING does, yes, hectorhonn; you can also give it the usual :start and :end keyword arguments.
1:59:53
verisimilitude
It's very important to set *READ-EVAL* properly if you're going to be using the READ functions in a program.
2:00:22
verisimilitude
Yes; the #. is a reader macro that evaluates the form and acts as if it read in the result, instead.
2:02:04
verisimilitude
This also means you can temporarily bind it, such as with a LET, and it will use the bound value while executing the body of the LET.
2:02:57
hectorhonn
wait, if i setf it to nil in my package, then if another package calls read-from-string without let, which value will it see?
2:03:22
verisimilitude
If you set *READ-EVAL* to NIL, it will remain NIL unless something changes it.
2:05:51
verisimilitude
Assuming *READ-EVAL* here is the same symbol in the COMMON-LISP package, then that will be a global assignment, hectorhonn.
2:07:47
verisimilitude
If you're interested, I can point you towards a forum where you can ask more Lisp questions of any kind; it may be more convenient than IRC, since you can ask a question and then check for answers days or weeks later.
2:12:37
verisimilitude
Imageboards are a rather nice type of forum; you don't need to register an account or anything; in fact, there are no accounts whatsoever.
2:13:49
verisimilitude
In this imageboard, you simply get a random name with a post, unless you write a name explicitly. The idea is you can post in threads, not unlike an IRC channel, and the posts appear in those threads; you can attach images or other files to posts. You can also start your own threads, although I don't recommend it if you're new.
2:15:02
verisimilitude
If you'd like to learn more, I'll continue in a PM, so I don't glut this channel with unnecessary messages.
2:15:47
verisimilitude
Also, I may as well let you know that I'm the fellow behind that particular thread; it's a series of threads that have been going on four almost five years now.
2:28:00
verisimilitude
This issue doesn't matter unless you want the escape character itself to be a distinct event, however.
2:31:19
verisimilitude
From what I've seen, xterm and its ilk have multiple incompatible encodings for the function keys; I've only implemented one of these.
2:34:21
_death
verisimilitude: well, I started using it for some tui library ( see https://adeht.org/casts/tui.html ) but holidays were over and other stuff got my time..
2:37:43
verisimilitude
I have made some recent changes, so you will want to download the latest version and take a look at the updated documentation.
3:19:49
fouric
question: if i'm using symbols for "communication" between code in different packages
3:20:11
fouric
for instance, i have a library that opens a file descriptor and gets input from the keyboard, represented as a list of symbols
3:20:48
fouric
...should i (1) intern the symbols in the package of the called library (2) intern the packages in the keyword package (3) intern the symbols in the common-lisp-user package (4) not use symbols for that or something else?
3:22:15
verisimilitude
Interning in the KEYWORD package isn't suggested unless it's a finite set and using CL-USER for this is poor, since you're not guaranteed its particular contents.
3:22:34
verisimilitude
I'd recommend you avoid using symbols for this, but more detail as to what you're doing would help.
3:23:23
fouric
i have a small library that takes keyup and keydown events and returns chords like ((C M) . s) would be ctrl + meta + s
3:23:50
fouric
...it translates keyup and keydown events into chords, and i need to find a good representation
4:29:55
aeth
A more elaborate version of this could be used for words: '#.`(unsigned-byte ,(if (find :64-bit *features*) 64 32))
9:29:12
ogamita
(block found (nsubst-if nil (lambda (item) (if (eql item 42) (return-from found 42)) nil) '((1 . 2) (3 . 42) 4))) #| --> 42 |#
9:34:54
ogamita
loke: then it's easier to write it yourself, but you may have a look at: http://groups.google.com/group/comp.lang.lisp/msg/0c66e597e08be90d
9:38:28
ogamita
You have more considerations: depth, width of the tree (so can you use a recursive function or should you derecursive it), and you want to collect the finds.
10:02:48
norserob
Hi, I'm trying to write a JSN string to a UNIX domain socket, to control the mpv player. It works fine from the command line, but not from ccl. Here is a small example to pause the mpv player: https://gist.github.com/rfolland/6458fcce83c73c4645cf8793771e1d75