freenode/lisp - IRC Chatlog
Search
17:57:24
BusFactor1
Waves can take an arbitrary number of wave definitions, so I think I can make chords that way
17:59:05
BusFactor1
For now yeah, if someone came up with a platform agnostic play-sound function it would be portable.
18:00:25
BusFactor1
I don't want to depend on any external libraries. I'm trying to write stuff that's simple to package up to put into the App store and I haven't gotten to that part yet.
18:48:45
dim
beach: it looks like there's a whole set of additional packages I might want to install on-top of that, like maybe clouseau and climacs and clim-examples and maybe more, right?
18:53:10
dim
Connection failure to X2816.0 server private/tmp/com.apple.launchd.xDUYWf1Ys9/org.macosforge.xquartz display 0: Protocol version mismatch
19:01:08
beach
dim: Yes, Clouseau and Climacs are very useful. So is the CLIM debugger if you are going to run everything standalone. The CLIM debugger resembles the SLIME debugger.
19:09:03
BusFactor1
Eturia, my little 'lisp machine' is back online: http://busfactor1.ca/bin/eturia/
19:09:28
beach
dim: I am going to spend time with my (admittedly small) family the rest of the evening. I'll be back tomorrow morning (UTC+1). Good luck.
19:10:38
TruePika
I'm running Flight Simulator on my main system, and just came up the idea (again) to automate that ATC game in bsdgames IIRC
19:11:27
TruePika
anyone here have experience with capturing "screen" data (say, through screen(1)) in CL?
19:12:10
TruePika
e.g. able to access the character array as an array of stuff like codepoint, color, etc.
19:14:12
TruePika
with IIRC 192MB RAM, though that is unlikely to have much of an impact on compiliation time
19:15:15
TruePika
well, that's not useful; (ql:system-apropos :screen) ==> #<SYSTEM cl-glfw-opengl-rend_screen_coordinates / cl-glfw-20150302-git / quicklisp 2016-06-28>
19:20:22
TruePika
ACTION is in 2 IRC channels trying to come up with a backbone architecture for a program, meanwhile his airplane is just hovering in the air since FSX is paused >_>
19:35:08
raydeejay
is there anything similar to this thing http://paste.lisp.org/+7ADV that I perpetrated?
19:37:12
TruePika
okay, now I have an idea of how to interact with `screen`...now the big question is how to actually establish the required streams
20:03:07
pjb
TruePika: you interact with screen by typing the screen escape character followed by a screen command, as documented in man screen.
20:04:29
pjb
But anyways in general, the way to automate a terminal program, is to hook to it as a terminal.
20:05:33
pjb
Now, of course, you could run and drive screen with expect, and then write an expect script to create screen virtual terminals switch to them and run and interact with programs in screen virtual terminals. If that's what you want…
20:07:00
pjb
TruePika: Have a look at FlightGear. It has already an automatic ATC (and also, user driven ATC workstations).
20:07:53
pjb
Why stop at the terminal level? Hook a webcam in front of your screen, and do AI optical recognition. Or directly hook into the internals of atc.
20:10:00
TruePika
this isn't related to any flight simulators, except for my inspiration for restarting my project to automate it
20:10:58
pjb
Flight Gear is a flight simulator, but since it's realistic, they also have ATCs, and humans to direct traffic, and automatic atc controller because there are not so many human having fun with atc.
20:11:56
pjb
TruePika: then really consider using a camera and optical recognition, so that you can write your atc controller without being specific to atc(6).
20:13:32
pjb
One of the first lesson of robotics, is to direly avoid coding specific parameters. Control routines shall adapt to any hardware configuration.
20:13:59
pjb
Similarly, you will want to solve the air traffic control problem, it doesn't matter how the interface looks, or what are the particular of the system you hook to.
20:14:53
pjb
Yes. Then crack it open and add the hooks you need internally. It'll be easier to do that than to drive it from the terminal.
20:15:01
TruePika
(if I wanted to make a bot for general ATC, I'd hook into Flight Simulator via official APIs anyway)
20:15:59
TruePika
...you _are_ aware there is an official, public API for interacting with FSX, right?
20:22:07
TruePika
pjb: Just did some research, at this time, it isn't really worth it for me to switch away from FSX (especially considering system specs)
20:26:21
pjb
Really, take the sources of atc, add a socket interface where you send the strips and where you receive he commands, and you'll be set in one hour.
20:27:59
pjb
The you can: atc --listen-port 4009 # in a terminal, and control-atc --atc-port 4009 # in another
20:28:39
TruePika
it doesn't help that I've written _very_ little network code, but I'm trying (for now, at least)
20:29:16
pjb
TruePika: my point here is that it will be much easier to do that to passably successfully drive a program from its terminal interactive I/O with expect.
20:30:01
pjb
expect(1) is a last ressort tool, to be used only when no other solution can be implemented.
21:30:26
himmAllRight17
lol, I'm working on something and I want to check with people that it makes sense
21:35:22
edgar-rft
himmAllRight17: sorry, but I don't know if it makes sense that you're working on something
21:42:00
aeth
Does #'= behave specially for floats or should floats (almost) never use #'=, like the advice in most languages? The hyperspec doesn't mention it on the = page, so I'm thinking it's the latter, but (1) most implementations might do something that's not in the spec and (2) it might be described in some totally different part of the spec.
21:46:50
Bike
= is numerical equality, which excludes using epsilons or worrying about ulps or anything, basically
21:53:36
|3b|
and 'never use =' isn't really good advice, better "understand what = means for floats"
21:54:26
TruePika
pjb: got atc to wait for a connection now, and requires the DWORD 0x13371157 (Leet List) to proceed...so I'm making progress
22:01:59
TruePika
pjb: I'm testing with socat, which is even stupider than telnet (since there aren't automatic client responses)
22:05:17
TruePika
trying to figure out the simplist way to replace stdin access; I can issue actual keystrokes through the socket that way
22:06:50
aeth
It looks like in SBCL on x86-64 for a simple (= x y) with x, y declared as single-float, there is only one COMISS instruction in the disassembly, which http://ref.x86asm.net/coder64.html says is "Compare Scalar Ordered Single-FP Values and Set EFLAGS", which I think means SBCL can't be doing anything fancy there.
22:07:40
aeth
Interestingly, I think that also means, there's something fancy there for treating 0.0 and -0.0 the same unless COMISS does that.
22:46:11
dim
> Error: Error #<SILENT-EXIT-ERROR #x302000E4982D> While executing: (:INTERNAL MAIN), in process listener(1).
22:48:46
dim
trying to debug pgloader for a user, where it fails fast at startup time without any error message
23:06:30
TruePika
my favorite is in Railroad Tycoon 3, where if you have over 2GB of video memory, the game interprets it as a negative amount and forces the lowest texture quality
0:43:48
rumbler31
drmeister: Do you consider drakma heavy from the user side, or from implementing support for it in clasp?
0:45:04
rumbler31
drmeister: I used drakma to consume multipart http and re-stitch the parts to the full data. Is that what you're dealing with?
0:57:36
trumps_weewee
what's wrong with it? i know something's wrong with it, but i'm tired of trying to figure it out
0:57:54
Moosef
Xach: yeah maybe that question is just me being lazy. A better version/second attempt would be what from the book have you found most helpful?
1:03:25
Moosef
Xach: Cool, I will come back when I have read enough to ask more specific questions. I am really enjoying it so far. Kind of stumbling my way through the General Problem Solver chapter at the moment. It is a humbling experience but I like it.
1:26:04
BusFactor1
How does one get hunchentoot to automatically load an index.html in a directory that's under it's document root?
1:26:38
BusFactor1
I'm pointing it a directories under the root I specified and it doesn't find anything.
1:32:32
Xach
I haven't read the manual in a long time, but I don't remember anything about index.html handling.
1:32:51
Xach
If I had the same question, I'd read the manual again, and if that didn't show anything useful, I'd write a handler.
2:43:50
TruePika
ACTION was confused because there was e.g. READ-CHAR-NO-HANG but no READ-BYTE-NO-HANG
2:46:01
TruePika
ACTION doesn't want to try to rewrite the C side of stuff to use fprintf or sprintf
3:10:20
TruePika
Looks like I might have figured out how to open the socket on the Lisp side of things :D
3:14:34
TruePika
Is there a nice way to ensure that streams stored in an instance get closed when the instance is destroyed?
3:20:43
pillton
I have sometimes used (with-all-my-streams (streams ...) (run ... (make-instance 'foobar :stream (elt streams 0)))).
4:31:47
drmeister
Hey folks - I'm trying to fix broken bootstrapping code and some of it mystifies me.
4:32:08
drmeister
(macroexpand '(setf (class-id class) name)) -> (LET* ((G11279 CLASS)) (MULTIPLE-VALUE-BIND (G11280) NAME (FUNCALL #'(SETF CLASS-ID) G11280 G11279)))
4:37:10
drmeister
Bike: so (macroexpand '(setf (class-id class) name)) should give me the correct expansion for the SETF?
4:37:44
drmeister
Because right after I print the macroexpansion I print #'(setf class-id) and it is #:UNBOUND
4:47:13
drmeister
This is all happening within a (with-early-accessors (+the-standard-class+) ...) macro that sets up a macrolet that defines an accessor for class-id.
4:47:59
drmeister
(get-setf-expansion '(class-id class)) -> ((G11279) (CLASS) (G11280) (FUNCALL #'(SETF CLASS-ID) G11280 G11279) (CLASS-ID G11279))
4:49:37
drmeister
I've added some stuff to with-compilation-unit to track problems with function definitions.
4:50:07
drmeister
This has somehow broken Clasp's bootstrapping - it's a delicate thing to level up from a C++ interpreter to a simple compiler to a full Common Lisp with CLOS.
4:51:20
drmeister
I'm doing macroexpansion on the (setf (class-id class) name) that is causing the problem.
4:51:36
drmeister
The weird thing is that the working version? It shouldn't work according to what I see.
4:51:51
drmeister
(get-setf-expansion '(class-id class)) -> ((G11279) (CLASS) (G11280) (FUNCALL #'(SETF CLASS-ID) G11280 G11279) (CLASS-ID G11279))
4:53:27
drmeister
It's happening inside of a macrolet - can I just evaluate the form? I can check that after evaluation if the value changed.
4:55:05
BusFactor1
I can't believe it's taken me this long to try and find a replacement for python's SimpleHTTPServer in CL still with no success...
4:55:52
BusFactor1
Wookie seems broken, hunchentoot doesn't handle index.html's without writing handlers, s-http-server just doesn't work, woo doesn't come with a file/directory handler...
4:56:15
Bike
so macroexpand is expanding like that because it doesn't know what the hell class-id is
4:58:55
Bike
(macrolet ((class-id (object) (backquote-append ...)) (hack (form &environment e) `',(macroexpand-1 form e))) (hack (setf (class-id class) name)))
5:02:33
Bike
macrolet expands in the global environment by default, but you can pass it an environment object
5:04:08
drmeister
So: (macrolet ((class-id (object) (backquote-append (LIST 'INSTANCE-REF) (LIST OBJECT) (LIST 3) 'NIL)) (hack (form &environment e) `',(macroexpand-1 form e))) (hack (setf (class-id class) name)))
5:06:20
drmeister
And if I put this in the code inside the macrolet that sets up all of these accessors:
5:06:21
drmeister
(debug-boot " (macroexpand-1 '(class-id class)) -> ~a~%" (macrolet ((hack (form &environment e) `',(macroexpand-1 form e))) (hack (setf (class-id class) name))))
5:08:43
drmeister
(macroexpand-1 '(class-id class) ENV) -> (LET* ((G11093 CLASS)) (MULTIPLE-VALUE-BIND (G11094) NAME (INSTANCE-SET G11093 3 G11094)))
5:12:20
drmeister
(macroexpand-1 '(class-id class) ENV) -> (LET* ((G5142 CLASS)) (MULTIPLE-VALUE-BIND (G5143) NAME (FUNCALL #'(SETF INSTANCE-REF) G5143 G5142 3)))
5:13:41
drmeister
Well, this makes a bit more sense. Because in trying to fix the bootstrapping process I decided to try and cut out reloading setf.lsp again.
5:14:13
drmeister
So if the behavior of SETF isn't completely defined - then this sort of thing might happen.
5:17:48
drmeister
So: (debug-boot " (get-setf-expansion '(class-id class) ENV) -> ~a~%" (macrolet ((hack (form &environment e) `',(get-setf-expansion form e))) (hack '(class-id class))))
5:17:57
Bike
"Within the body of macrolet, global setf expander definitions of the names defined by the macrolet do not apply; rather, setf expands the macro form and recursively process the resulting form. "
5:20:01
Bike
if you like, you can do (defmacro cmacroexpand-1 (form &environment e) `',(macroexpand-1 form e)) and skip the macrolet
5:22:21
Bike
get-setf-expansion takes an environment argument the same way macroexpand does, and by default uses the global environment, same way as macroexpand
5:22:58
drmeister
I want to find out where and why the broken bootstrapping code is different from the working code
5:23:54
drmeister
In particular, the broken code fails on: (with-early-accessors (+the-standard-class+) (setf (class-id class) name))
5:27:17
drmeister
I'm going to back up - and go back to the original bootstrapping sequence for bclasp.