00:02 (quit) bugQ: Ping timeout: 240 seconds 00:18 (join) dnolen 00:20 (quit) dnolen: Client Quit 00:46 (join) mithos28 02:03 (nick) elliottcable -> ec|detached 02:14 (quit) realitygrill: Quit: realitygrill 02:25 (join) sir_lewk 02:26 sir_lewk: is there a proper way to do basically a 'popen'? ("popen, pclose - pipe stream to or from a process") 02:31 (join) littlebobby 02:40 (quit) mithos28: Quit: mithos28 02:57 (quit) littlebobby: Quit: Ex-Chat 03:31 (join) igor_ 03:45 (part) igor_ 03:55 (join) masm 06:53 eli: sir_lewk: ? 07:03 (join) samth_ 07:26 (join) reynir 08:41 (join) racket 08:41 racket: [racket] plt pushed 1 new commit to master: http://bit.ly/lF4wOf 08:41 racket: [racket/master] The format change script should not be run by drdr. - Vincent St-Amour 08:41 (part) racket 08:52 (join) lucian 08:56 (join) MayDaniel 09:12 (join) realitygrill 09:23 (join) racket 09:23 racket: [racket] plt pushed 1 new commit to master: http://bit.ly/mPwwCf 09:23 racket: [racket/master] PPC repairs - Matthew Flatt 09:23 (part) racket 09:33 (join) mithos28 09:49 (quit) mithos28: Quit: mithos28 10:02 (quit) samth_: Ping timeout: 255 seconds 10:05 (quit) MayDaniel: Read error: Connection reset by peer 10:19 (join) mithos28 10:52 (join) anRch 11:28 (join) bugQ 11:35 (quit) bugQ: Ping timeout: 240 seconds 11:39 (join) littlebobby 11:56 (quit) gienah: Quit: leaving 12:02 (join) dnolen 12:03 (quit) dnolen: Client Quit 12:11 sir_lewk: eli: basically I'm wondering about how IPC is generally done 12:14 (quit) mithos28: Quit: mithos28 12:17 offby1: rudybot: doc subprocess 12:17 rudybot: *offby1: http://docs.plt-scheme.org/reference/subprocess.html#(def._((quote._~23~25kernel)._subprocess)) 12:17 offby1: sir_lewk: see that ^^ 12:25 (part) reynir 12:39 (quit) anRch: Quit: anRch 12:53 sir_lewk: excellent, thanks 12:57 (join) lucian_ 12:58 (quit) lucian: Read error: Operation timed out 13:02 (join) gwdean 13:06 (quit) gwdean: Ping timeout: 252 seconds 13:09 (join) mithos28 13:18 (quit) littlebobby: Ping timeout: 240 seconds 13:27 (join) kenjin2201 13:27 (join) jamiltron 13:29 (join) lucian 13:31 (quit) lucian_: Ping timeout: 258 seconds 13:32 (join) kenjin2202 13:36 (part) shofetim: "ERC Version 5.3 (IRC client for Emacs)" 13:36 jamiltron: Hello, I was wondering if someone could help me with an error I am getting in a program that was working a week ago (and seems to still work if I use gambit scheme) but is giving an unusual error today. 13:37 offby1: if it's super-tiny, sure 13:38 jamiltron: The error I am getting is "compile: unbound identifier (and no #%top syntax transformer is bound)" 13:38 offby1: *shrug* 13:38 (join) bugQ 13:38 offby1: is the whole thing small enough to paste to (e.g.) gist.github.com ? 13:38 (quit) mithos28: Quit: mithos28 13:38 jamiltron: Not really 13:39 jamiltron: I have a github repo of it, but its a little long 13:39 offby1: well, I don't know what that error means, off the top of my head. 13:39 bugQ: bremner: no but one would expect type-case to work like cond 13:40 offby1: I can certainly guess what "unbound identifier" means, but then so can you. 13:40 bugQ: (18 hours late) 13:40 jamiltron: I mean its one 330 line program that probably could be cleaned up: https://github.com/jamiltron/forsight/blob/master/forsight.ss 13:40 offby1: jamiltron: why don't you shrink the program as much as possible, while still reproducing the error? That will make it easier for lazy strangers such as myself to help. 13:40 jamiltron: It works in gambit scheme, which makes me think it may be something weird with racket - like how I installed the sicp module. 13:40 jamiltron: Ok let me give it a try 13:41 offby1: jamiltron: I just tried it, and I don't get any error; instead I get what looks like a prompt. 13:41 jamiltron: type in something simple like 2 3 + 13:41 offby1: I saved it to a file named 'forsight', then typed 'racket forsight' 13:41 offby1: ah 13:41 jamiltron: and hit return 13:41 jamiltron: sorry 13:42 offby1: gotcha 13:43 jamiltron: The main error is throwing down in "interpret-f" in the else-clause of ((symbol-f fun-f) ... 13:44 jamiltron: Which is weird, if I comment out the repl stuff and go in and do the fun-f lookup for say "+" it retrieves the symbol for the add function. 13:44 jamiltron: Then if I call the eval on it like is being done in the next line it resolves appropriately 13:45 offby1: my hunch is that it has something to do with your calling "eval" 13:45 offby1: it's not obvious to me that you should need to do that 13:45 jamiltron: Hmmm, you might be right, let me try something. 13:46 offby1: yeah, you're calling (eval 'add-f) 13:46 jamiltron: That gets the procedure add-f, doesn't it? 13:46 offby1: I can't remember the circumstances in which "eval" is actually the right thing, but they're rare. 13:47 offby1: jamiltron: obviously, (eval 'add-f) gets an error :) 13:47 offby1: as you can see 13:47 offby1: now, I can't explain why it worked before. 13:47 jamiltron: If I run (eval 'add-f) in the interpreter (not in the repl) it doesn't error. 13:47 offby1: that doesn't surprise me. 13:47 offby1: even though I'm not certain what you mean by "interpreter" and "repl" 13:48 jamiltron: Oh yeah sorry name overloading :P 13:48 offby1: I predict that if you quit using "eval", your problem will go away. 13:49 jamiltron: No that doesn't seem to do it 13:49 jamiltron: because then it tries to resolve ('add-f ...) 13:49 jamiltron: and add-f is a symbol 13:49 offby1: well, like I say: reduce the problem to a (say) five-line program that reproduces the error; it'll be much easier to chew on 13:49 offby1: I didn't mean to simply delete the token 'eval' from your program. 13:49 offby1: I meant that you should write a replacement. 13:49 jamiltron: And it was working with eval just a week ago 13:50 offby1: That shouldn't be hard, since all you're using it for (at first glance) is consants and your own procedures, the latter of which you're already storing in a dict, indexed by symbol 13:50 offby1: *constatnt 13:50 offby1: GAAH 13:50 offby1: *constants 13:56 (quit) masm: Ping timeout: 240 seconds 13:58 (join) mithos28 14:01 jamiltron: Hmmm, if I keep the whole forth-repl thing and the tokenizing and how functions are defined I can pair it down to about 55 lines. 14:02 jamiltron: https://gist.github.com/1033340 14:03 bugQ: *pare 14:03 bugQ: >_> 14:03 jamiltron: Sure 14:03 jamiltron: that too 14:05 bremner: bugQ: I guess so. I was less familiar with scheme when I started PLAI, so the issue never occured to me. 14:08 bugQ: well it could be worse 14:09 bugQ: it could have required a monad instead :P 14:11 offby1: jamiltron: you might want to read http://docs.racket-lang.org/guide/eval.html#(part._namespaces) 14:12 jamiltron: Right, I've gone through that before but I'll give it another look. 14:13 jamiltron: As far as I know it should still work (in fact, it does when ran outside of my repl-f loop) 14:13 jamiltron: Because the dict-get function is retrieving the quoted form of add-f 14:13 jamiltron: so when I evaluate it I get the procedure it represents. 14:16 offby1: jamiltron: try these tweaks: http://ix.io/1Kf 14:19 jamiltron: Hmmm: forsight.ss:272:48: compile: unbound identifier in module in: ns 14:21 jamiltron: Racket doesn't seem to be using eval how it says it does any longer. 14:22 jamiltron: Using the example from the section on namespaces in the docs throws the same error I am getting 14:22 jamiltron: Or maybe I am incorrect 14:22 jamiltron: Yeah nevermind on that 14:22 jamiltron: I screwed something up 14:24 offby1: you must have failed to include the first two lines of my patch -- the second of them defines "/me nods sagely" 14:24 offby1: heh 14:24 offby1: "ns" 14:25 jamiltron: Yeah sorry I copied in the wrong line there 14:26 offby1: anyway, when I ran my fixed version, it no longer raised that error; instead it printed . Dunno if that's OK or not :) I'd have sorta expected it to print 5 14:26 (join) samth_ 14:26 jamiltron: It will is you type in .s 14:26 jamiltron: or . 14:26 jamiltron: which it does 14:27 offby1: ah 14:27 jamiltron: Forth is stack-based so when you call add it pops off the two top-most operators on pushes the result back onto the data-stack 14:27 jamiltron: I really appreciate the help. 14:27 jamiltron: But I guess I don't really understand the neccessity of this change, or why it was working just a week ago. 14:28 offby1: ok, I pronounce it healthy 14:28 jamiltron: And why it works in another scheme implementation. 14:28 jamiltron: Thanks 14:28 offby1: I can't explain why it used to work in racket. 14:28 offby1: But it's easy to explain why it works in another scheme: that other scheme does things differently :) 14:28 jamiltron: Right 14:29 jamiltron: It was weird because I originally did it in gambit, which was the scheme I originally learned. Then I got tired of doing stuff like rolling my own dictionary and string functions, so I decided to start updating it to Racket 14:29 jamiltron: And it worked fine for a little while. I went on vaction, came back, tried running it before I futher updated it and I started getting that error. 14:30 offby1: clearly, while you were on vacation, brigands broke into your house and redefined racket 14:30 jamiltron: That's usually what happens to all my code that doesn't work 14:30 jamiltron: Or that's what I tell my boss. 14:32 jamiltron: Do you know why it needs that namespace anchor? Why shouldn't ((eval 'add-f ) '(2 3)) work? 14:33 jamiltron: I mean, I can read the docs more, but I guess I still don't see the issue. Granted I'm a little dense but I still thought I had the whole symbol vs. procedure thing down. 14:35 bugQ: wouldn't apply be nicer ? 14:37 jamiltron: I'm not applying a function to a list, I'm taking a symbol for a procedure and calling it on a list. The procedure then determines what elements from the list it needs to operate on, although its usually the first one, or the first two. 14:39 bugQ: ok, but that's still just (apply fun-f (list d-stack)) 14:40 bugQ: I realize that may not be aesthetically appealing 14:41 jamiltron: fun-f is a symbol, so wouldn't it need to be eval-d to get the procedure it represents? 14:41 bugQ: wait ignore me 14:41 bugQ: yeah 14:43 jamiltron: Thanks, I'm just really confused by the need for a namespace anchor. 14:44 offby1: jamiltron: I'd put the procedure fun-f into a dictionary, with 'fun-f as the key. 14:45 jamiltron: So like cons fun-f onto the data stack and then evaluate it? 14:45 bugQ: danger will robinson 14:51 bugQ: I think what offby1 means is to put the procedures themselves in the dictionary instead of their names 14:51 bugQ: but keyed by their names 14:51 offby1 nods sagely 14:52 bugQ: thus eliminating eval 14:53 jamiltron: Hmm, so the basic idea I am going for is that the dictionary holds a key value pair for what user input relates to what function (so in this case - "+" relates to add-f), and then the value of that is the name of the procedure to be executed. 14:54 bugQ: not quite 14:54 bugQ: functions are values too 14:54 bugQ: just put add-f itself in there 14:54 jamiltron: Hmm, isn't there a better way to enscapulate that, or am I missing something? 14:55 jamiltron: So you're saying in my dictionary correspond "+" to be the whole procedure of add-f (the lambda-on-down part of add-f's definition) 14:56 bugQ: when you type add-f it _refers_ to the procedure 14:57 bugQ: so if you have an entry that looks like "+" -> add_f, it will point to the procedure, neither its name nor a simile of it 14:57 bugQ: so whatever name you bind it to later will work just like add_f 14:57 bugQ: sorry add-f 14:58 bugQ: e.g. (fun-f d-stack) 14:58 jamiltron: I do have any entry that is ("+" add-f) 14:59 bugQ: then that's the problem, you shouldn't even be evaluating it 14:59 offby1: jamiltron: this should give you the idea of what I'm talking about: http://ix.io/1Kg 14:59 bugQ: it's just like how functions work in C 14:59 jamiltron: Right, but when I get the value from the dictionary using the key it gives it back to me as a symbol. 15:00 bugQ: oh right, because you constructed as a quoted list 15:02 jamiltron: Wait... so if I use list instead of quoting it should bind the procedure instead of the name - right? 15:03 jamiltron: the list keyword in place of the quote, that is 15:03 bugQ: indeed 15:03 jamiltron: And reorganize my code so that the forth procedures come first :P 15:04 ohwow: Hm, I want to make something like a GUI designer 15:04 ohwow: like Glade or smth 15:04 ohwow: what's the good place to start? 15:04 ohwow: I know some racket, but I am clueless about this specific task 15:10 (join) littlebobby 15:12 (join) ShereKahn 15:13 (quit) ShereKahn: Client Quit 15:13 (quit) mithos28: Quit: mithos28 15:20 (quit) kenjin2202: Read error: Connection reset by peer 15:20 (quit) kenjin2201: Read error: Connection reset by peer 15:25 (quit) jamiltron: Quit: jamiltron 15:28 bremner: maybe http://docs.racket-lang.org/guide/More_Libraries.html?q=gui#(part._graphics) 15:33 (join) masm 15:42 bugQ: what are the appropriate uses of assignment transformers ? 15:42 bugQ: and are they necessary ? 15:46 (join) mithos28 15:47 (quit) masm: Ping timeout: 276 seconds 15:48 bugQ is just a little annoyed that set! can't return anything 15:48 (join) masm 15:49 bremner: write a function? 15:51 (quit) mithos28: Client Quit 15:52 rapacity: could always write a macro set!* maybe that returns a value 15:54 rapacity: rudybot: (define-syntax-rule (set!* id val) (let ([tmp val]) (set! id tmp) tmp)) 15:54 rudybot: rapacity: your sandbox is ready 15:54 rudybot: rapacity: Done. 15:54 rapacity: rudybot: (define x 10) (set!* x 90) 15:54 rudybot: rapacity: (define (add-complex z1 z2) 15:55 (join) mithos28 15:56 bugQ: that one of course assumes that accessing the var gives the same result without side effects 15:58 bugQ: it's just sometimes nice to know I won't launch the missle because I set the sprinkler timer for Tuesday 16:03 (quit) littlebobby: Ping timeout: 255 seconds 16:07 (quit) masm: Ping timeout: 276 seconds 16:09 (join) masm 16:13 (quit) masm: Ping timeout: 255 seconds 16:14 (quit) mithos28: Quit: mithos28 16:25 (join) littlebobby 16:34 (quit) littlebobby: Ping timeout: 264 seconds 16:36 (quit) bugQ: Ping timeout: 244 seconds 16:38 (join) littlebobby 16:40 (join) mithos28 16:44 (quit) samth_: Ping timeout: 255 seconds 16:47 (join) masm 17:04 (quit) masm: Ping timeout: 252 seconds 17:09 (join) masm 17:27 (join) realitygrill_ 17:29 (quit) realitygrill: Ping timeout: 240 seconds 17:29 (nick) realitygrill_ -> realitygrill 17:35 (nick) samth_away -> samth 17:41 (quit) mithos28: Quit: mithos28 17:43 samth: ohwow: there's a gui designer on planet 17:51 offby1: rapacity: I think you need to wrap those two forms in a (begin), otherwise rudybot doesn't realize it's scheme code 17:52 offby1: rudybot: (begin (define x 10) (set!* x 90)) 17:52 rudybot: *offby1: error: reference to an identifier before its definition: set!* in module: 'program 17:52 offby1: well, you know. 17:52 offby1: rudybot: (define-syntax-rule (set!* id val) (let ([tmp val]) (set! id tmp) tmp)) 17:52 rudybot: *offby1: Done. 17:52 offby1: rudybot: (begin (define x 10) (set!* x 90)) 17:52 rudybot: *offby1: ; Value: 90 18:02 offby1: What problem do impersonators solve? 18:02 offby1: rudybot: x 18:02 rudybot: *offby1: ; Value: 90 18:07 (join) mithos28 18:09 (quit) mithos28: Client Quit 18:13 (join) mceier 18:25 samth: offby1: do you mean, as opposed to chaperones? 18:25 samth: or do you mean, what problem do chaperones and impersonators solve? 18:28 offby1: the latter. 18:28 offby1: both are new to me. 18:29 offby1: My number 1 complaint about documentation is always: it doesn't tell me the problem which the documented technology solves. Lacking that, I can never make any sense out of the documentation, no matter how thorough it is. 18:29 offby1: So I read the docs without really understanding, and I say "that sounds vaguely interesting. I cannot imagine how it could possibly be useful", and promptly forget it. 18:34 (quit) lucian: Remote host closed the connection 19:09 samth: offby1: the answer is "how do you implement contracts" 19:09 samth: or more specifically, "how do you implement contracts for mutable data" 19:09 offby1: hm. 19:10 offby1: I confess that that doesn't enlighten me, but that's probably because I haven't thought about it 19:10 offby1: I do wish more documentation had _motivating_ examples. 19:10 samth: mostly we write those in papers 19:11 offby1: that's not useful for the guy who's just reading the docs. 19:11 samth: which isn't a good answer, but it's true 19:11 samth: and the chaperones paper hasn't appeared yet 19:11 offby1: it might suffice to simply include a link to the paper (once it appears, of course) 19:11 samth: that happens in some places in the docs 19:11 samth: but not enough 19:12 samth: if you give me a couple minutes, i'll explain the rationale at more length 19:12 samth: but the short piece is -- think about creating a contract on a mutable vector. how should it behave? 19:12 (join) mithos28 19:12 offby1: why not just write the rationale down and include it in the docs? More effective than explaining it to me directly 19:13 offby1: given that I've already decided that it's beer-thirty here 19:13 samth: i wouldn't write it well enough for that 19:13 offby1: don't let the perfect be the enemy of the good! 19:13 offby1: for example: I just uploaded a rather awful PLaneT package. 19:13 offby1: It's surely better than nothing, but just as surely not very good. 19:14 samth: the quality of the documentation is more important to preserve, i think 19:14 offby1: but it can always be improved, yes? 19:15 offby1: so upload something less-than-ideal-but-better-than-nothing now, and improve it later. 19:15 offby1: *shrug* 19:16 samth: that's true, but currently the documentation is written in a uniform style, with uniform high quality 19:16 samth: whereas planet, no so much :) 19:16 offby1: heh 19:16 offby1: maybe there needs to be a canonical place for "not really polished but perhaps helpful" documentation. 19:17 samth: i'd like to use a wiki for that 19:17 samth: which is why i put that wiki page up 19:17 samth: on which you should add a link to your planet package, btw 19:17 offby1: oho! 19:17 offby1: gimme the link again 19:17 offby1: it was on github, yes? 19:19 samth: yeah, just the github wiki 19:20 samth: https://github.com/plt/racket/wiki/HTTP-over-SSL 19:22 offby1: ok, just added a ref to it 19:25 samth: cool 19:50 (quit) mithos28: Quit: mithos28 20:04 (join) mithos28 20:05 (quit) masm: Ping timeout: 240 seconds 20:18 eli: sir_lewk: If you use `process' etc, they read from the usual `current-input-port', and write to `current-output-port' and `current-error-port', so the plumbing work is done by the library. 20:19 eli: samth: Using that wiki is a bad idea. 20:20 samth: eli: provide me a better one, and i'll move all my content 20:20 eli: samth: I knew you'd flame about it, so I'd leave it at that. If it becomes a problem I'll make it read-only or something. 20:40 (join) gienah 20:41 (quit) mithos28: Quit: mithos28 21:02 (quit) mceier: Quit: leaving 21:02 (nick) samth -> samth_away 21:22 (join) neilv 21:40 neilv: does everyone like the way drracket does paren-matching with the gray background? 21:42 littlebobby: It can be a little bit distracting, but I haven't been using drracket for too long. maybe that's the reason. just started reading littleschemer (after my initial interest in sicp broke off a little) 21:49 (join) samth_ 22:07 (join) mithos28 22:14 (join) jonrafkind 22:22 (quit) mithos28: Quit: mithos28 22:45 (join) ckrailo 22:45 (quit) ckrailo: Client Quit 23:03 (join) realitygrill_ 23:04 (quit) realitygrill: Ping timeout: 240 seconds 23:04 (nick) realitygrill_ -> realitygrill 23:07 (quit) neilv: Ping timeout: 250 seconds 23:35 (quit) samth_: Ping timeout: 255 seconds