00:07 (join) nejucomo 00:08 (join) RacketCommitBot 00:08 RacketCommitBot: [racket] plt pushed 1 new commit to master: http://git.io/kP1Mkw 00:08 RacketCommitBot: racket/master 7235382 Jay McCarthy: Fixing typos in various places 00:08 (part) RacketCommitBot 00:12 (part) sw2wolf: "ERC Version 5.3 (IRC client for Emacs)" 00:17 (quit) JStoker: Excess Flood 00:17 shriphani: Hi. I declared my struct as #:transparent. Yet I get this: given value instantiates a different structure type with the same name. Can someone explain how to make this disappear? 00:18 (join) RacketCommitBot 00:18 RacketCommitBot: [racket] plt pushed 1 new commit to master: http://git.io/y4Y8EQ 00:18 RacketCommitBot: racket/master ce7b9f7 Jay McCarthy: Deal with bad metadata more gracefully... 00:18 (part) RacketCommitBot 00:24 asumu: shriphani: you probably want #:prefab, not #:transparent. 00:24 asumu: #:transparent just means anyone can inspect its fields. 00:25 asumu: They're still generative (i.e., different from all other struct types). 00:29 (quit) gatlin: Ping timeout: 264 seconds 00:29 (quit) shriphani: Remote host closed the connection 00:44 (join) RacketCommitBot 00:44 RacketCommitBot: [racket] plt pushed 1 new commit to master: http://git.io/WTGjOA 00:44 RacketCommitBot: racket/master bd1a63a Matthew Flatt: racket/pretty: fix `print' mode for fxvectors and flvectors... 00:44 (part) RacketCommitBot 00:45 (quit) francisl: Quit: francisl 00:46 (join) JStoker 00:47 (join) ambrosebs 00:48 lewis1711: docs.racket-lang.org/reference/eval.html#(def._((lib._racket/private/misc..rkt)._read-eval-print-loop)) I'm having difficulty with this one (surprise :( ), is #%top-interaction some global you modify? right now if I launch it nothing good happens 00:51 lewis1711: http://pastebin.com/a66nkmy2 line 11 drops me into a thoroughly useless loop, where I can't type anything without "stdin::65: #%top-interaction: unbound identifier;" 00:53 (quit) jao: Ping timeout: 245 seconds 00:56 mithos28: lewis1711: #%top-interaction is a macro hack for the repl 00:57 mithos28: how the repl works is that it reads a form from the port 00:57 (join) gatlin 00:57 mithos28: extracts the lexical context, and makes an identifier with that lexical context and #%top-interaction as the symbol 00:58 mithos28: then creates the form '(#%top-interaction . original-form) 00:58 mithos28: so you want to bind #%top-interaction in the namespace of the repl to something useful 00:59 lewis1711: ohh 00:59 mithos28: like maybe #%top-interaction from racket 00:59 mithos28: which just returns the original form 01:00 lewis1711: so #%top-interaction should be of type namespace ? 01:00 mithos28: no 01:00 lewis1711: :/ 01:00 mithos28: what namespace do you want your repl to be in? 01:00 mithos28: I should have read your program first 01:01 lewis1711: actuall I didn't even know racket had namespaces I thought they had modules instead 01:01 (join) RacketCommitBot 01:01 RacketCommitBot: [racket] plt pushed 4 new commits to master: http://git.io/BiG_iw 01:01 RacketCommitBot: racket/master d935bc0 Neil Toronto: Split "mpfr.rkt" into "gmp.rkt" and "mpfr.rkt"... 01:01 RacketCommitBot: racket/master 897ebea Neil Toronto: Remove now-extraneous use of `flvector->list' in examples 01:01 RacketCommitBot: racket/master 6ca52be Neil Toronto: Stopped exporting `slice-indexes-array' 01:01 (part) RacketCommitBot 01:02 (quit) kofno: Remote host closed the connection 01:02 mithos28: modules are implemented in terms of namespaces 01:02 mithos28: namespaces are much more primitive 01:02 lewis1711: I guess I want a namespace that has everything but the kitchen sink 01:02 lewis1711: I plan to assign the repl loop thing to a keypress 01:02 lewis1711: so I can debug 01:02 lewis1711: query things in the middle of the game as I code, etc 01:02 mithos28: ah ok, one sec so I can look at the docs 01:03 lewis1711: I assume such magic is within rackets grasp 01:04 mithos28: so you want (parameterize ((current-namespace (make-base-namespace))) (hello-world)) 01:05 mithos28: that only gets you racket/base not all of racket 01:05 mithos28: but lets get that working first 01:06 lewis1711: ok, I'll try it 01:08 lewis1711: `wait, what? is that the definition for #%top-interaction? 01:08 mithos28: no, you want to replace your call to hello world with that expression 01:10 lewis1711: right! 01:10 mithos28: does it work? 01:13 lewis1711: mithos28: yes! (sorry for the delay) 01:14 lewis1711: so how would one add other namespaces? like say a required module? 01:15 mithos28: so move (make-base-namespace) out into a variable, say ns 01:15 (quit) PCChris: Ping timeout: 260 seconds 01:16 mithos28: actually you don't need that 01:16 mithos28: inside the parameterize call (namespace-require quoted-raw-require-spec) 01:16 mithos28: 'racket is a valid argument 01:17 (quit) jeapostr1phe: Ping timeout: 264 seconds 01:17 mithos28: or "relative-file.rkt" 01:18 lewis1711: what is "quoted-raw-require-spec"? 01:18 mithos28: the argument 01:18 lewis1711: oh just the arg 01:20 lewis1711: oh I have this wrong 01:21 lewis1711: (parameterize 01:21 lewis1711: ((current-namespace (namespace-require 'racket))) 01:21 lewis1711: (hello-world)) 01:21 mithos28: sorry, I was not exact 01:22 mithos28: the binding of current-namespace stays the same 01:22 mithos28: you put the the namespace-require in the same part as hello world 01:23 lewis1711: (parameterize ((current-namespace ns) (name-space-require 'racket)) ? 01:23 mithos28: namespace-require and you still want the hello world there 01:24 mithos28: you can have multiple forms in the body of a parameterize 01:24 lewis1711: sorry I literally have no idea what I am doing here, reading what parameterize does lol 01:24 mithos28: Think of it sorta like let 01:24 mithos28: for 'globals' like the current-output-port 01:26 lewis1711: I sort of see 01:26 lewis1711: I am executing a function in this particular namespace 01:26 lewis1711: (parameterize ((current-namespace (make-base-namespace))) (namespace-require 'racket) (hello-world)) 01:26 mithos28: looks right 01:26 lewis1711: "racket: standard-module-name-resolver: collection not foun" 01:27 lewis1711: so all we're doing is passing the hello world procedure multiple name spaces? 01:27 lewis1711: first racket/base, then racket? 01:28 mithos28: no you are making a new namespace, setting the currentnamespace to the one you just created, modifying it, and then calling hello world with it 01:29 mithos28: can you post your code again? 01:29 lewis1711: sure 01:30 lewis1711: http://pastebin.com/0si95T1c 01:32 mithos28: It works for me when I comment out your tcod stuff 01:32 (join) kofno 01:33 lewis1711: hmmm, I think it has something to do with the fact they're wrapped C functions, the error message mentions mzc 01:33 mithos28: iff you comment them out, does it work? 01:34 lewis1711: http://pastebin.com/XmRM229q 01:34 lewis1711: I assume so, hang on 01:35 lewis1711: no :/ 01:35 mithos28: interesting 01:35 lewis1711: I am not running this through dr racket because for some reason opening up an SDL window kills drracket 01:35 lewis1711: I am doing raco exe Guest25827 05:24 (quit) ambrosebs: Ping timeout: 264 seconds 05:24 (join) em 05:28 (join) ambrosebs 05:32 (join) francisl 05:32 (quit) francisl: Client Quit 05:34 (join) bitonic 05:36 (quit) mceier: Ping timeout: 260 seconds 05:36 (quit) Nisstyre-laptop: Quit: Leaving 05:59 (quit) hkBst_: Remote host closed the connection 05:59 (join) hkBst_ 05:59 (quit) hkBst_: Changing host 05:59 (join) hkBst_ 06:10 (join) MayDaniel 06:20 (join) masm 06:42 (join) masm1 06:42 (quit) masm: Ping timeout: 264 seconds 06:54 (join) sw2wolf 07:17 (join) kofno 07:20 (quit) sw2wolf: Quit: Leaving 07:21 (join) mceier 07:22 (quit) hkBst_: Ping timeout: 264 seconds 07:31 (quit) kofno: Remote host closed the connection 07:33 (join) nathanpc 07:34 (join) kofno 07:37 (join) hkBst_ 07:37 (quit) hkBst_: Changing host 07:37 (join) hkBst_ 07:44 ambrosebs: Is there a way to scope `x` in the `define` in the this Typed Racket snippet? 07:44 ambrosebs: (: my-val (All (x) (Listof x))) 07:44 ambrosebs: (define my-val ((inst cons x (Listof x)) 1 '())) 07:45 ambrosebs: I want a polymorphic value I guess. 07:45 ambrosebs: (rather than just a polymorphic function) 07:47 (quit) MayDaniel: Read error: Connection reset by peer 07:55 (quit) kofno: Read error: Connection reset by peer 07:55 (join) kofno 08:19 (join) soegaard 08:32 (join) mizu_no_oto 08:36 (join) Aune 08:41 (join) jao 08:41 (quit) jao: Changing host 08:41 (join) jao 08:50 (join) mye 09:02 samth: ambrosebs: (list 1) obviously wouldn't have that type, right? 09:03 (quit) mizu_no_oto: Quit: Computer has gone to sleep. 09:07 ambrosebs: samth: I guess not, it's just a stupid example demonstrating the issue. 09:07 ambrosebs: I've got a weird case where I want to scope a type variable in Typed Clojure 09:07 samth: ambrosebs: `x` is scoped in the body of polymorphic functions 09:07 samth: i'd have to think more about polymorphic values 09:07 ambrosebs: samth: right, and I've copied that in TC also. 09:09 (join) amgarching 09:12 (quit) amgarching: Read error: Operation timed out 09:13 ambrosebs: samth: hmm. When would you "unwrap" the Poly of a polymorphic value? 09:13 (join) PCChris 09:14 samth: ambrosebs: in TR, you'd have to explicitly instantiate it 09:15 ambrosebs: samth: Right, that makes sense. But when checking a `define` with a polymorphic value type, how do you know when to "scope" the type variables? 09:16 (quit) bitonic: Ping timeout: 244 seconds 09:16 ambrosebs: With polymorphic functions, we scope it when checking a lambda. 09:16 samth: i think you could scope them the same as for functions, ie the whole RHS 09:16 samth: but i'd have to think about it more to be sure 09:16 ambrosebs: It seems slightly tricky, since you don't want to scope it "too early" if you have a polymorphic function. 09:16 (join) gatlin 09:17 (join) mye_ 09:19 (quit) mye: Ping timeout: 248 seconds 09:19 (join) mye 09:21 (quit) mye_: Ping timeout: 260 seconds 09:27 kspaans: Anyone know of an existing library that will disassemble machine code? ARM specifically 09:27 kspaans: I want to play with return-oriented programming, and need to be able to describe a sequence of instructions as well as disassemble existing binaries. 09:27 kspaans: I figured the fasted way to get started right now it to use objdump as a frontend and work with the mnemonic output, but I was hoping that perhaps I wouldn't have to hand lex the mnemonics. :P 09:27 kspaans: Hmm, I can see that https://github.com/samth/disassemble relies on nasm, so maybe my objdump idea is reasonable. :) 09:28 samth: yes, the state of tools for binary analysis is pretty poor 09:28 (quit) SamB: Ping timeout: 246 seconds 09:29 kspaans: samth: hmm, should I investigate using the C FFI for linking with existing tools? 09:29 (join) jeapostrophe 09:29 (quit) jeapostrophe: Changing host 09:29 (join) jeapostrophe 09:29 samth: kspaans: if you're using a tool that's a library, then yes 09:29 (join) SamB 09:29 samth: kspaans: if you're just using objdump, i'd just exec it 09:30 kspaans nods 09:30 kspaans: thanks samth 09:32 (join) hash_table 09:36 (quit) jrslepak: Quit: What happened to Systems A through E? 09:37 (join) amgarching 09:37 (quit) hash_table: Ping timeout: 256 seconds 09:42 (quit) myx: Ping timeout: 260 seconds 09:47 (join) bitonic 09:48 (quit) amgarching: Ping timeout: 246 seconds 09:55 (join) francisl 09:58 (quit) bitonic: Remote host closed the connection 09:58 (join) bitonic 10:03 (join) mizu_no_oto 10:05 (quit) bitonic: Ping timeout: 244 seconds 10:06 (join) jrslepak 10:07 (quit) mceier: Quit: leaving 10:11 (quit) PCChris: Quit: Leaving 10:14 (join) cabernal 10:15 (quit) cabernal: Client Quit 10:26 (join) bitonic 10:26 lewis1711: how can I open an external window without drracket crashing? I am keeping an external terminal open and running racket scripts from there, but it's totally messing with my coding zen 10:27 lewis1711: I have wrapped C code that opens an SDL window 10:28 greghendershott: racket-lang.org seems to be unresponsive right now (folks here had mentioned same, yesterday) 10:29 lewis1711: yeah I noticed that. it comes and goes 10:31 (quit) bitonic: Ping timeout: 260 seconds 10:34 (quit) jrslepak: Quit: What happened to Systems A through E? 10:38 (join) bitonic 10:48 samth: greghendershott: should be back up 10:48 samth: lewis1711: that really shouldn't happen 10:48 samth: sounds like a bug 10:48 (join) jrslepak 10:48 (join) hkBst__ 10:48 (quit) hkBst_: Read error: Connection reset by peer 10:49 greghendershott: samth: Yes, thanks. 10:49 lewis1711: samth: yeah to be clear it only happens from dr. racket. "racket works" fine 10:50 samth: drracket should *not* crash when opening an external window 10:50 lewis1711: it's an SDL lib. bug report? 10:51 (quit) gatlin: Ping timeout: 264 seconds 10:51 (join) hash_table 10:52 (quit) bitonic: Ping timeout: 256 seconds 10:54 (join) hkBst 10:54 (quit) hkBst__: Remote host closed the connection 10:54 (join) vu3rdd 10:54 (quit) vu3rdd: Changing host 10:54 (join) vu3rdd 10:56 (join) gatlin 10:57 fasta: Is there some nice way to indent some lines? 10:58 fasta: In some Haskell libraries there are values of type Doc which can then subsequently be rendered. 10:58 fasta: I am thinking of something like that. 10:58 (join) dzhus 11:02 (quit) hkBst: Ping timeout: 246 seconds 11:04 (join) hkBst 11:06 (join) bitonic 11:11 (join) carleastlund 11:13 (join) spiderweb 11:17 samth: fasta: are you thinking of a pretty-printer? 11:18 fasta: samth: yes, and I have already read the racket docs for that (chapter 12) 11:18 (quit) jeapostrophe: Ping timeout: 255 seconds 11:18 fasta: samth: it doesn't really seem to have something which is just as usable as the Haskell libraries that I know. 11:18 samth: fasta: you might be interested in http://planet.racket-lang.org/package-source/dherman/pprint.plt/4/4/planet-docs/pprint/index.html 11:18 rudybot: http://tinyurl.com/b2sw8mm 11:19 samth: i think that's pretty similar to what haskell has 11:19 fasta: samth: yes, that's exactly what I need. 11:19 fasta: samth: thanks 11:19 fasta: samth: is there also something to get the last line of a string? 11:19 samth: i'd use regexp-split 11:19 samth: and `last` 11:20 fasta: samth: thanks 11:21 fasta: One thing, I find the restriction that the auto doc feature only works when there are no errors very limiting. 11:21 fasta: It would be nice if this restriction could be lifted based on certain reasonable assumptions. 11:21 (quit) hkBst: Remote host closed the connection 11:22 stamourv: fasta: F1 works even in the presence of errors. 11:22 stamourv: It's not as nice as the auto-docs, though. 11:22 (join) hkBst 11:22 (quit) hkBst: Changing host 11:22 (join) hkBst 11:22 stamourv: The reason, though, is that auto-docs needs info from the compiler to know which functions your program is actually using. 11:23 stamourv: There are about 5 different `map' functions, some of which work differently. 11:24 stamourv: So to show you the right docs, DrRacket needs to know which one you mean. 11:29 (quit) noelw: Quit: noelw 11:31 (quit) hkBst: Remote host closed the connection 11:32 (join) hkBst 11:37 (join) PCChris 11:37 (quit) hkBst: Ping timeout: 260 seconds 11:38 (join) hkBst 11:38 (quit) hkBst: Changing host 11:38 (join) hkBst 11:40 lewis1711: I did not know about f1 11:43 (quit) hkBst: Ping timeout: 250 seconds 11:43 (join) hkBst_ 11:43 (quit) hkBst_: Client Quit 11:44 (quit) cdidd: Ping timeout: 264 seconds 11:48 (join) anRch 11:48 (quit) soegaard: Quit: soegaard 11:49 (quit) mye: Quit: mye 11:55 (join) PCChris_ 11:58 (quit) PCChris: Ping timeout: 246 seconds 11:59 (quit) spiderweb: Ping timeout: 255 seconds 12:01 (quit) PCChris_: Ping timeout: 260 seconds 12:02 (quit) tilde`: Quit: brb 12:03 (quit) mizu_no_oto: Quit: ["Textual IRC Client: www.textualapp.com"] 12:06 (join) mizu_no_oto 12:06 (join) mceier 12:06 (join) mithos28 12:07 (quit) bniels: Quit: WeeChat 0.3.8 12:08 (quit) mithos28: Client Quit 12:11 (join) mithos28 12:13 (join) jeapostrophe 12:13 (quit) jeapostrophe: Changing host 12:13 (join) jeapostrophe 12:17 (join) PCChris 12:38 (join) dyoo 12:39 (quit) anRch: Quit: anRch 12:43 (quit) francisl: Quit: francisl 12:45 (join) soegaard 12:50 (join) mye 12:53 (quit) vu3rdd: Remote host closed the connection 12:58 fasta: How can I make M-; do the same as in Emacs? 13:01 (quit) ambrosebs: Ping timeout: 264 seconds 13:02 (join) francisl 13:03 (join) tilde` 13:05 (join) jonrafkind 13:09 (quit) PCChris: Ping timeout: 244 seconds 13:16 (quit) dyoo: Quit: dyoo 13:24 (join) dyoo 13:27 dyoo: fasta: following up: did you already get an answer to your question? Key extensions to DrRacket: http://docs.racket-lang.org/drracket/Keyboard_Shortcuts.html#(part._defining-shortcuts) 13:27 (quit) mithos28: Quit: mithos28 13:27 dyoo: I'm not sure what M-; does though; can you describe? 13:28 fasta: dyoo: I had read that Alt was taken up by the menu already. 13:29 fasta: dyoo: M is alt. So, M-; is Alt + ; It comments the selected text or uncomments it if it was commented. 13:30 stamourv: fasta: There's an option to free up Alt. IIRC, it's something like "disable keybindings in menu". 13:30 fasta: samth: yes, under 'general' according to stackoverflow (I had already looked). 13:31 fasta: stamourv: except I couldn't find it there. 13:31 dyoo: If you're on a Mac, also turn on "Treat Command as Meta", and then that will free the key up for you to customize 13:31 fasta: samth: sorry. 13:31 fasta: I am on Linux 13:31 fasta: (latest version of Racket) 13:32 dyoo: So I think the answer is: you may need to write a keybinding-lang program to do it, as the behavior that you want isn't built-in. The examples in 3.3.9 should help you get started; it shows how to insert text at the current point in the editor. 13:32 stamourv: fasta: It's in editing/general. 13:32 fasta: stamourv: thanks 13:33 fasta: dyoo: in Emacs I can easily see which set of commands is already available. 13:33 fasta: dyoo: e.g. I see that some strings are being used with command names. 13:34 fasta: dyoo: why can't I just use a (lambda () (do-stuff))? 13:34 fasta: I think the only thing people want to see in that part of the documentation is how to denote every keycombination possible. 13:34 fasta: E.g. how do you denote tab, etc. 13:34 fasta: How do you denote function keys. 13:35 fasta: Really, really basic things. Instead time has been spent to show how something fairly complicated can be achieved. 13:36 fasta: I do like quite some of the examples in more common documentation, though. 13:36 dyoo: with regards to denoting function keys: see http://docs.racket-lang.org/gui/keymap_.html#(meth._(((lib._mred/main..rkt)._keymap~25)._map-function)) 13:36 fasta: It would however be even better if clicking on the examples would place it on the REPL. 13:37 fasta: Syntax wise I would have selected something compatible with Emacs. 13:37 fasta: There is no reason to invent a new notation when an old one already functions perfectly. 13:38 fasta: I think that's really a design failure on whoever made the call to invent a new syntax. 13:38 dyoo: I'm not exactly sure what "keybindings" is doing; without seeing what it is doing for us, I can't make any useful techincal arguments for or against. :) 13:39 dyoo: (and currently very busy at the moment; can't look at it right now.) 13:39 fasta: Of course, it's probably possible to implement a macro which translates from emacs notation to normal notation, but that only makes thigns slower. 13:39 fasta: That's ok. 13:41 (join) shriphani 13:42 shriphani: Hi everyone. I have a question about net and net/url. I get a tcp error while connecting to a site and I want to catch the resulting exception and continue. Is there some sample code on how to do this? Thanks. 13:43 dyoo: shriphani: exception handling example: http://docs.racket-lang.org/guide/exns.html 13:43 dyoo: Essentially, wrap your call to get-pure-port or post-pure-port with a with-handlers. 13:44 dyoo: I believe the kind of exceptions you can get out of network code are exn:fail:network instances http://docs.racket-lang.org/reference/exns.html#(def._((lib._racket/private/base..rkt)._exn~3afail~3anetwork)) 13:45 shriphani: ah thanks! 13:45 dyoo: but in a pinch, you can just do something like: (with-handlers ([exn:fail? (lambda (exn) )]) ) 13:46 dyoo: where exn:fail is near the top of the exception hierarchy 13:48 (quit) Aune: Quit: Hath Deprated 13:49 (join) RacketCommitBot 13:49 RacketCommitBot: [racket] plt pushed 117 new commits to master: http://git.io/ykIzjg 13:49 RacketCommitBot: racket/master 898024e Ryan Culpepper: fix contract mistakes 13:49 RacketCommitBot: racket/master 1c9caf7 Ryan Culpepper: make file runnable on non-win32 13:49 RacketCommitBot: racket/master b9d3e2b Matthew Flatt: raco pkg install: change inference of package sources... 13:49 (part) RacketCommitBot 13:53 (join) k0001 13:56 soegaard: eli: ping 13:57 eli: soegaard: Yeah, I just saw that. 13:58 soegaard: sorry about that. 13:58 eli: I will try to undo it in the next few minutes. 13:58 soegaard: thanks! 14:03 soegaard: I think it has something to do with a53848d310dcb6bfed46f40b9ddd9f3799adc2a8 which I was trying to move. 14:05 (quit) mizu_no_oto: Quit: ["Textual IRC Client: www.textualapp.com"] 14:10 fasta: I think your selection with keyboard implementation is completely broken. 14:11 fasta: Put some text in a drracket buffer and use SHIFT-arrow up and arrow down to select text. 14:11 fasta: It should be obvious that it is completely broken. If it is not, I can explain more carefully. 14:13 fasta: Ah, it's slight more complex. First you need to do C-s to search for something and while it is in that mode, selection is completely broken. 14:13 fasta: Perhaps by design, but then it seems a bad design. 14:17 (join) Netfeed 14:22 (join) netrino 14:22 (quit) bitonic: Ping timeout: 252 seconds 14:37 (join) masm 14:40 (quit) masm1: Ping timeout: 244 seconds 14:51 (join) nejucomo 14:51 nejucomo: I haven't been able to get make-evaluator or make-module-evaluator to work. 14:52 nejucomo: I have a file which begins #! /usr/bin/env racket \n #lang s-exp my-lang 14:52 nejucomo: -and I'm passing a path to that to make-evaluator or make-module-evaluator. 14:52 nejucomo: Sometimes it does not have read access to my-land and sometimes it says "#lang" is not allowed. 14:54 nejucomo: When I try (make-module-evaluator script-path #:language 'my-lang) I get the permissions error. 14:54 nejucomo: -but the docs implied that anything in #:language would implicitly be in #:allow-read. 14:55 nejucomo rereads closer. 14:57 nejucomo: Hm. If I explicitly put the module in #:language also in #:allow-read it works... 14:58 nejucomo: Ok, the next hurdle is that if I run these my-lang scripts from the commandline, they print each value evaluated... 14:58 nejucomo: -but if I use make-module-evaluator, I get back an evaluator and I don't see a way to access those values. 14:58 dyoo: looking at irc history; give me a moment. 14:59 dyoo: fasta: you may want to submit a bug report on selection behavior: http://bugs.racket-lang.org. Let's make sure this is, at the very least, recorded so someone can take a look at this. 15:00 (quit) sanctus: Remote host closed the connection 15:00 dyoo: nejucomo: so these my-lang scripts: are they supposed to evaluate silently without printing toplevel expressions? 15:02 dyoo: nejucomo: can you capture the content in a string port? Let me see if I can cook up a small example… 15:05 nejucomo: dyoo: Actually these my-lang scripts should not be executable; instead they should be "my-lang modules", so they should define some functions, for example, and I want to call those functions from a test-driver. 15:06 nejucomo: If I have (mod foo racket (define (f x) (+ 1 x))) then can I have a reference which lives outside a sandbox which refers to f inside a sandbox, and then call f? 15:07 nejucomo: I don't see how to accomplish that, at first glance, given the evaluator interface (which takes syntax instead of values). 15:07 dyoo: nejucomo: let me try it out... 15:07 nejucomo: Me too. ;-) 15:09 nejucomo: Ah yes, it is possible. 15:09 nejucomo: Ok, maybe I'll start writing more experiments in the repl instead of asking questions. ;-) 15:09 nejucomo: btw- is there readline support for the repl? 15:09 dyoo: nejucomo: you got it? ok. 15:09 dyoo: nejucomo: with regard to readline support, yeah, there should be 15:09 nejucomo: Yeah, thanks for responding though. 15:09 dyoo: here you go: http://docs.racket-lang.org/readline/index.html?q=readline#(mod-path._readline) 15:10 stamourv: nejucomo: I also recommend xrepl. 15:11 dyoo: For xrepl reference: http://docs.racket-lang.org/xrepl/index.html 15:12 (quit) shriphani: Ping timeout: 260 seconds 15:13 (join) k0001_ 15:14 nejucomo examines xrepl. 15:16 (quit) k0001: Ping timeout: 256 seconds 15:20 (quit) dyoo: Quit: dyoo 15:21 (join) shriphani 15:25 greghendershott: Is anyone familiar enough with Scribble to advise me how crazy it would be to attempt to add a new renderer for it? Such as emitting GitHub flavored Markdown? 15:27 (quit) dzhus: Ping timeout: 246 seconds 15:27 samth: greghendershott: that would be truly awesome! 15:27 samth: you could probably hack the text renderer to do that 15:28 greghendershott: I'm not sure GHFMD can support intra-doc links, which would be a shame, but otherwise it might be a nice complement to HTML. 15:29 samth: greghendershott: https://github.com/plt/racket/blob/master/collects/scribble/text-render.rkt 15:29 rudybot: http://tinyurl.com/c4wh76f 15:29 samth: it might be that GHFM would be better than the current text rendering 15:29 greghendershott: samth: I'll take a look at the text renderer. I may have looked at it a year ago but got scared. Maybe it would look less scary to me today. 15:30 greghendershott: Oh. That doesn't look very scary. 15:30 greghendershott: Hmm OK I'll see what I can do. Thanks. 15:33 (quit) k0001_: Ping timeout: 264 seconds 15:37 (join) bitonic 15:40 (join) mizu_no_oto 15:43 (join) PCChris 15:48 (quit) shriphani: Ping timeout: 260 seconds 15:54 (join) dyoo 16:01 (quit) kofno: Remote host closed the connection 16:02 (join) RacketCommitBot 16:02 RacketCommitBot: [racket] plt pushed 1 new commit to master: http://git.io/DPdOeQ 16:02 RacketCommitBot: racket/master 46dc3ef Carl Eastlund: Made Ryan responsible for unstable/cat. 16:02 (part) RacketCommitBot 16:02 nejucomo: In my toy-language, I'd like a #%module-begin to expand into an expression that results in a single value... 16:02 nejucomo: -then I'd like to access that value from outside a sandbox. 16:03 nejucomo: I guess I could translate that to (define module-contents ) 16:04 carleastlund: nejucomo, I think that's your best bet. 16:04 nejucomo: Ok, thanks. 16:07 nejucomo: Another language design question: I want special symbols which are only legal in a few places. 16:07 nejucomo: It should be a syntax error if they appear elsewhere. How should I implement this? 16:10 jonrafkind: define-syntax an identifier and then use syntax-parameterize to make it do something in certain contexts 16:10 jonrafkind: http://docs.racket-lang.org/reference/stxparam.html?q=syntax-parameterize#(form._((lib._racket/stxparam..rkt)._syntax-parameterize)) 16:10 jonrafkind: basically you define the plain identifier to be an error when used outside the proper context, then inside the context you redefine it to be what you want 16:11 jonrafkind: in leiu of an example i suppose eli's blogpost about syntax-parameterize is best 16:11 (join) RacketCommitBot 16:11 RacketCommitBot: [racket] plt pushed 2 new commits to master: http://git.io/9YTQEw 16:11 RacketCommitBot: racket/master 3f2d466 Asumu Takikawa: Fix call/comp's type 16:11 RacketCommitBot: racket/master 04e8e33 Asumu Takikawa: Provide a more informative internal error 16:11 (part) RacketCommitBot 16:12 jonrafkind: http://blog.racket-lang.org/2008/02/dirty-looking-hygiene.html 16:12 jonrafkind: oh actually you should use define-syntax-parameter not define-syntax 16:15 nejucomo: jonrafkind: Ah, but I want a single symbol to appear as a "keyword" in one syntax expander, but as a special sigil in #%app. 16:16 nejucomo: -or rather, I think I can define it as a syntax identifier instead of the #%app hack, but I also want it to appear as a keyword in some other forms. 16:16 (quit) hash_table: Ping timeout: 252 seconds 16:16 nejucomo looks up syntax-parameterize. 16:17 nejucomo: An example: (lambda ! (foo) bar) -and- (! f blah) 16:17 jonrafkind: what does (! f blah) do 16:17 jonrafkind: is this like force/delay? 16:17 nejucomo: It's a mutation or io. 16:18 nejucomo: ;-) 16:18 nejucomo: I'm trying to write a scheme like that forces syntactic declarations for all side effects. 16:18 jonrafkind: well if you just want to use an identifier as a keyword in a macro you can put it in the literal list when you syntax-case it or whatever 16:25 (quit) PCChris: Ping timeout: 260 seconds 16:26 nejucomo: Ok. But I want (f !) to be a syntax error. 16:26 nejucomo: Or bare ! 16:26 jonrafkind: you can define ! with make-set!-transformer to do that 16:27 nejucomo: So "! may only appear in the head of a syntax list or when it is a keyword in some other syntax definition." 16:27 jonrafkind: (define-syntax ! (make-set!-transformer ...)) 16:27 nejucomo: Oh... I thought make-set!-transformer was just for (set! x y) 16:27 nejucomo rereads make-set!-transformer. 16:27 jonrafkind: it also allows you to expand plain references to the identifier 16:28 jonrafkind: so there are 3 forms (id ...), id, and (set! id ...) 16:28 jonrafkind: a normal transformer only handles the first form. make-set!-transformer allows you to handle all 3 16:28 nejucomo: Oh, perfect. 16:29 jonrafkind: hm actually that doesn't appear to be true.. (define-syntax (foo stx) #'0) works as (+ foo 4). actually I did not know that.. 16:29 nejucomo: Hm. I will experiment more. 16:29 jonrafkind: ok so you probably dont need make-set!-transformer 16:32 (join) kofno 16:35 nejucomo: In the last example you posted, what is stx during the transformation? 16:35 jonrafkind: just `foo' 16:37 (join) Nisstyre-laptop 16:40 (quit) kofno: Ping timeout: 244 seconds 16:48 carleastlund: Whoa, when did that happen? That's great! Thanks for finding that, jonrafkind. 16:49 jonrafkind: i was about to ask on the list too.. but i didnt want to look like a noob 16:49 jonrafkind: you do it! 16:52 carleastlund: Currently looking through email archives to find any mention of it. 16:53 jonrafkind: and then git-bisect :p 16:57 carleastlund: Yeah, not too fond of "git bisect" when each step requires essentially a full "make && make install". 16:57 jonrafkind: well make plain-install is good enough 16:58 carleastlund: Sure. Still not super-fast. 17:00 carleastlund: It looks like this may have been the case for a long time. I have an email from 2007 implying it worked this way back then. 17:01 jonrafkind: ah 17:01 jonrafkind: i dont see it mentioned in the docs 17:01 jonrafkind: in fact the expander isn't really detailed in the docs I guess 17:03 (quit) dyoo: Quit: dyoo 17:03 carleastlund: The documentation I found seemed detailed enough, and supported the current behavior. 17:03 carleastlund: Although it takes a close reading. 17:05 jonrafkind: ok the docs mostly talk about how it looks up bindings and phase stuff, but it doesnt mention exactly how a macro is invoked 17:05 jonrafkind: i mean it never says "if the identifier appears in a pair, the entire pair is passed to the macro transformer" 17:06 bartbes: carleastlund: may I ask why that's not "make all install"? 17:06 carleastlund: bartbes: Does make install re-compile from C? I thought it only rebuilt collections. 17:06 bartbes: it's why I've added "all" 17:07 bartbes: I don't really know anything about the way racket compiles 17:07 carleastlund: Oh, "all". I guess I never knew the name for that target. 17:07 bartbes: but "make" is the same as "make ", and everyone uses "all" for that 17:07 carleastlund: "everyone" is not the same as "Matthew Flatt" 17:08 carleastlund: All I know is that the build instructions in src/README have "make" and "make install" as separate steps. I've never asked why. 17:08 bartbes: I suppose adding a sanity clause doesn't help? 17:08 bartbes: :P 17:08 jonrafkind: dont question authority! 17:08 carleastlund: Why, is it Christmas? 17:08 bartbes: probably because make install is typically executed as root 17:09 carleastlund: Anyway, it looks like the default target is, in fact, "all" for Racket, so "make all install" should do the trick. Whaddya know, sometimes common sense does pay off!" 17:11 (join) dreamz93 17:14 (part) dreamz93 17:14 (quit) francisl: Ping timeout: 252 seconds 17:15 (join) dyoo 17:19 nejucomo: Is there an easy way to debug syntax translations? 17:19 jonrafkind: carleastlund, your question is passive-aggressive :p it should really say 'the docs should be updated' 17:19 jonrafkind: nejucomo, theres the macro stepper 17:19 jonrafkind: and printf 17:20 carleastlund: That email started out one way, changed several times, I eventually gave up and just sent what was in the buffer. Feel free to add on your own sentiments. :) 17:20 nejucomo searches for macro stepper. 17:21 jonrafkind: the path of destiny has been set, ill see where it goes 17:23 (join) hash_table 17:28 carleastlund: jonrafkind, though I don't see how it's passive-aggressive. If you think it really is, that's fine, but you might have asked me privately before saying that in a public forum. It's not a problem, though, forget it. I mean, I would have expected more consideration from you, but it's no trouble. Don't worry about it. 17:29 jonrafkind: :/ 17:29 carleastlund: :p 17:32 (join) parcha 17:32 (join) ianjneu 17:37 (quit) hash_table: Ping timeout: 265 seconds 17:38 (quit) jrslepak: Quit: What happened to Systems A through E? 17:39 (join) anRch 17:42 (quit) mizu_no_oto: Ping timeout: 265 seconds 17:44 (join) vhsmaia 17:46 nejucomo: I read over parameters in the evaluation model doc, but find them quite confusing. 17:46 nejucomo: What do they provide which keyword arguments do not? 17:46 nejucomo: Are they like dynamically scoped variables? 17:46 (quit) vhsmaia: Remote host closed the connection 17:47 carleastlund: parameters are dynamically scoped values, just like dynamically scoped variables except they're not associated with a name binding. 17:47 carleastlund: And they have nothing to do with arguments, keyword or otherwise, they're a different sense of the word "parameter" than that. 17:48 (join) vhsmaia 17:49 nejucomo: I don't understand the distinction between "dynamically scoped values" and "dynamically scoped variables". How are they not associated with a name binding? 17:50 nejucomo: Do you mean there's some way to create a parameter that returns a box with no "canonical name", which can then be managed by other code? 17:50 nejucomo: I'm trying to figure out how to debug syntax translations in a file that has #lang s-exp my-lang 17:50 stamourv: rudybot: ((lambda (x) (x)) (make-parameter 'look-ma-no-name!)) 17:51 rudybot: stamourv: your typed/racket sandbox is ready 17:51 rudybot: stamourv: ; Value: look-ma-no-name! 17:51 rudybot: stamourv: ; stdout: "- : Symbol\n" 17:51 stamourv: nejucomo: ^ 17:51 nejucomo: Right now I'm trying this: (define src-stx (call-with-input-file "./script.my-lang" (lambda (p) (call-with-parameterization ([read-accept-lang #t]) (read-language p))))) 17:51 (quit) vhsmaia: Remote host closed the connection 17:51 stamourv: nejucomo: Replace `call-with-parameterization' with `parameterize'. 17:51 nejucomo: Thanks. 17:52 nejucomo: Hrm. Now: 17:52 nejucomo: -> src-stx 17:52 nejucomo: # 17:52 nejucomo: -> (syntax? src-stx) 17:52 nejucomo: #f 17:52 nejucomo reads more on the reader interface. 17:53 nejucomo: I feel like there's probably a much more concise way to say: "Please open the macro debugger for this file." 17:53 carleastlund: You mean other than pressing the macro debugger button? Are you trying to do this from a command-line or something? 17:54 nejucomo: Yeah, I'm using the text xrepl. 17:54 nejucomo: -but I tried (expand-module/step "./script.my-lang) and got an error. 17:54 nejucomo tries again. 17:54 carleastlund: What error did you get? 17:54 (quit) dyoo: Quit: dyoo 17:54 nejucomo: Oh, right. When I do that, it looks like it has already attempted macro expansions. 17:55 nejucomo: To be clear, I'm trying to debug the expansions in my-lang/main when I load another module which has #lang s-exp my-lang. 17:55 carleastlund: Oh, you may want to look at: http://docs.racket-lang.org/syntax/module-helpers.html 17:55 nejucomo: Ok. 17:56 carleastlund: Specifically, the function get-module-code. 17:59 (join) PCChris 17:59 nejucomo pokes around with drracket. 17:59 nejucomo: It's too bad there's not a "language macro stepper" button. 17:59 (quit) lewis1711: Ping timeout: 252 seconds 18:00 carleastlund: huh? 18:01 nejucomo: get-module-code also raises the same exception that seems to be due to a bug in the *language module* not the test script. 18:02 nejucomo: I'd like to see the read result of the test script, then step through the macro translations defined in the language module. 18:02 nejucomo: So far everything I've tried has raised an exception, instead of giving me back a parse result or syntax object. 18:02 carleastlund: You can do both of those, but they're separate actions. 18:02 nejucomo: Maybe I'm fundamentally misunderstanding something. 18:03 nejucomo: Ok, so how can I read the script file? I have been unable to do that. 18:03 carleastlund: For the former, use get-module-code with a #:compile argument that _doesn't_ try to expand its argument. "values" or "identity" are the easiest option. 18:03 nejucomo: Thanks! 18:03 carleastlund: For the latter, use the macro stepper on the language file directly. I mean, if it won't expand, why even look at the test script? 18:04 nejucomo: Is there a shorthand to refer to the value of the last evaluation in xrepl? 18:04 nejucomo: The test script is an input to the macro module. In order to test it, I need something for it to expand, right? 18:04 nejucomo tries opening the language module with the macro stepper. 18:05 carleastlund: Modules don't have inputs. Functions have inputs. 18:05 nejucomo: Yeah, when I run the macro expander on the language module, it succeeds and shows what I suspect (in terms of define-syntax templates). 18:06 nejucomo: Now, how do I apply those templates to the test script which causes the error? 18:06 nejucomo: There are other test scripts which do not have this error behavior which expand and evaluate as I expect. 18:06 samth: carleastlund: you should have just removed that file -- the `cat` library was removed 18:07 nejucomo: Ok, the translations defined in the language module and the test script source code are inputs to the expander... 18:07 carleastlund: samth: Ryan has already explained that to me, but since I wasn't responsible for that file, I didn't look any further than the DrDr summary. 18:07 nejucomo: That's what I meant when I said "the test script was an input" to the language module. 18:07 carleastlund: nejucomo: I'm confused, then. What error are you getting when you try to macro-step through the test script? 18:08 carleastlund: And what does the macro stepper do / not do before that comes up? Does the macro stepper window not even open? Or does it open with no contents? Or what do you see? 18:08 nejucomo: Well, before the very first step it says "expand: unbound identifier in module in: success". 18:08 nejucomo: The test script has 'success in it. 18:08 nejucomo: So I suspect my language macros are unexpanding when I don't realize it. 18:09 nejucomo: Sorry, I meant expanding an extra step when I do not expect it. 18:09 nejucomo experiments with expand/step on the syntax object returned from get-module-code with #:compile identity. 18:10 carleastlund: So it's contents are "#lang my-lang\n'success\n", with suitable substitute for "my-lang"? 18:10 carleastlund: its, not it's 18:11 nejucomo: It's contents are more complex, but I'm going to create a new one with the bare minimum. 18:11 carleastlund: Wait, what do you mean by "before the very first step"? So there actually is a step? What code does it show in that step? 18:12 nejucomo: The contents are: #! /usr/bin/env racket\n#lang s-exp my-lang\n['test-result 'success] 18:12 nejucomo: -almost. 18:12 nejucomo tests that case. 18:13 carleastlund: Oh, wait. I bet macro hiding is biting you. You either need to manually un-hide the relevant macros from your language, or turn macro hiding off entirely. 18:13 carleastlund: Though turning it off entirely will expose huge amounts of irrelevant stuff. 18:14 nejucomo: Ok, that minimal case also triggers the same exception. 18:14 carleastlund: But regardless of macro hiding, the first step should at least show you the contents of the module after reading and before any expansion. Does it not even do that? Is there no code at all? I'm confused about that. 18:16 nejucomo: Ah, that helps a lot! 18:16 (join) shriphani 18:16 shriphani: hi does anyone have any experience working with racket-lapack on os x ? 18:16 nejucomo: With the default hiding, it did *not* show the test module contents, it just showed an error. 18:19 nejucomo: I turned off all macro hiding and I'm stepping through everything. 18:19 nejucomo: This is exactly what I was looking for (for now, as a way to learn racket transformers). Thanks for the help! 18:21 nejucomo: Aha... I got it now. 18:21 nejucomo: Seeing the steps is incredibly helpful for me. 18:22 (quit) PCChris: Ping timeout: 244 seconds 18:22 (join) RacketCommitBot 18:22 RacketCommitBot: [racket] plt pushed 1 new commit to master: http://git.io/1b5w7Q 18:22 RacketCommitBot: racket/master 5802b42 Asumu Takikawa: Support path/object reasoning for promises 18:22 (part) RacketCommitBot 18:22 (quit) JStoker: Excess Flood 18:22 nejucomo: Actually, I don't quite understand the bug... 18:23 nejucomo: I have a custom #%app which is defined with syntax-rules... 18:24 (join) dyoo 18:24 nejucomo: (define app-impl (syntax-rules () [(app-impl target args ...) (if (pred? target) ((get-proc target) args ...) (error "not a valid app target"))])) 18:24 (quit) jeapostrophe: Ping timeout: 252 seconds 18:25 nejucomo: -and it seems like (quote success) ... 18:25 nejucomo: Wait, I expect (quote success) to trigger the (error) case because it shouldn't match pred? 18:25 nejucomo: -but instead I see "success" is not a valid identifier... 18:25 nejucomo: Hrm. 18:25 nejucomo: Anyway, I think the right approach is not to override #%app. 18:26 nejucomo: In a syntax-rules template, all identifiers which are not part of the pattern are lexically scoped references, right? 18:27 nejucomo: Wait, quote is a syntax definition, right? 18:27 nejucomo examines the macro expansion debugger some more. 18:28 (join) JStoker 18:29 nejucomo: If my module exports #%app does that transformer also apply to macro invocations? 18:29 nejucomo: Sorry, I'm quite talkative... Lots of coffee. ;-) 18:30 (join) mizu_no_oto 18:31 asumu: nejucomo: #%app is only for procedure applications, I think. 18:31 nejucomo: rudybot: (procedure? quote) 18:31 rudybot: nejucomo: your sandbox is ready 18:31 rudybot: nejucomo: error: #:1:12: quote: bad syntax in: quote 18:34 (quit) JStoker: Excess Flood 18:36 (join) PCChris 18:37 nejucomo: It looks like my (app-impl quote success) is called... 18:37 nejucomo: So I need a way to determine if the application target is bound to a syntax transformer... 18:38 nejucomo: -or a way to specify that app-impl should only apply to runtime values. 18:38 (join) jrslepak 18:38 nejucomo: The former strategy seems more general, because then I could have macros in my language. 18:40 (join) JStoker 18:41 (quit) jonrafkind: Ping timeout: 260 seconds 18:41 (quit) soegaard: Quit: soegaard 18:45 (join) lewis1711 18:47 (join) RacketCommitBot 18:47 RacketCommitBot: [racket] plt pushed 1 new commit to master: http://git.io/H-UcVA 18:47 RacketCommitBot: racket/master 7beb132 Danny Yoo: Removes red-black from syntax-color/private; refactored into PLaneT2 as 'data-red-black' package. 18:47 (part) RacketCommitBot 18:50 asumu: nejucomo: #%app is only for procedures, not for macros. 18:50 asumu: e.g., 18:50 asumu: rudybot: (require (only-in racket/base [#%app -#%app])) 18:50 rudybot: asumu: Done. 18:51 asumu: rudybot: (define-syntax-rule (#%app e ...) (begin (-#%app displayln (quote e)) ... (-#%app e ...))) 18:51 rudybot: asumu: Done. 18:51 asumu: rudybot: (module* test (+ 1 2) (if #t 1 2)) 18:51 rudybot: asumu: error: #:1:0: module*: illegal use (not in a module top-level) in: (module* test (+ 1 2) (if #t 1 2)) 18:52 asumu: Hmm. Ok it's hard to demo in rudybot. 18:52 asumu: Point is, if you put that in a DrRacket buffer you'll see that there's no printing for the macro invocation. 18:53 asumu: Hmm, actually that's not quite right. `if` isn't a macro there. 18:54 asumu: (try it with `or` instead) 18:54 (join) cdidd 18:55 carleastlund: nejucomo: Wait, did you use 'success in your language without exporting a binding for quote? 18:55 carleastlund: Because if so, the expander will definitely try to use #%app, not having any other way to resolve quote. 18:55 nejucomo: carleastlund: No, I have exported quote. 18:56 nejucomo: In fact it was working earlier before I redefined #%module-begin. 18:56 carleastlund: What does your #%module-begin do? 18:59 carleastlund: Anyway, you shouldn't have to figure out if a target is bound to a syntax transformer, Racket does that for you before using #%app. What you then need to do is figure out why Racket is using #%app at all; it's either not detecting that quote is bound, or it's being explicitly added somewhere it shouldn't. 18:59 nejucomo: I have an idea... 18:59 nejucomo makes a half-baked commit and pushes to a repository... 19:00 nejucomo: Here's the current module source: https://bitbucket.org/nejucomo/sappho-on-racket/src/f84558d6232ca34e59dc2712b93a49b1673de1fa/lib/sappho/main.rkt?at=default 19:00 rudybot: http://tinyurl.com/dy7vomr 19:01 carleastlund: What is the character after the lambda in the expansion of module-begin-impl? 19:02 nejucomo: codepoint 0x22f2 "element of with long horizontal stroke". 19:02 nejucomo: It's a keyword of the lambda macro. 19:03 carleastlund: Also, what are you expecting the body of that lambda to do? Or is it just "stuff" and you're wrapping it in lambda so it won't run, just expand for now? 19:03 nejucomo: I want the semantics that when you load a module in this language you get a lambda. 19:03 carleastlund: Oh, never mind, you have your own lambda. 19:03 nejucomo: Yeah. 19:03 carleastlund: I thought it was Racket lambda and was confused. :) 19:03 nejucomo: Sorry. 19:04 carleastlund: Not a problem, just jumping to conclusions over here without reading on. :) 19:04 nejucomo: Do I need to put explicit #%app everywhere in checked-apply's template? 19:04 carleastlund: No, you shouldn't (almost) ever have to do that. 19:05 carleastlund: I'm not even sure I need the "(almost)". 19:05 nejucomo: Do I need #%module-begin in module-begin-impl in that case? 19:05 carleastlund: Yes, that you need. 19:06 nejucomo: There are some test inputs inside https://bitbucket.org/nejucomo/sappho-on-racket/src/f84558d6232ca34e59dc2712b93a49b1673de1fa/tests/positives?at=default 19:06 rudybot: http://tinyurl.com/ccgk4bz 19:07 nejucomo: The strange thing is that call-identity-lambda.sappho was working before I introduced my own module-begin. 19:07 nejucomo: -and it uses quote. 19:07 nejucomo: So I strongly suspect bugs in my transformers. 19:08 nejucomo: I'm brand new to racket so there's a lot of "change this and see if it runs" experiments. 19:12 lewis1711: http://pastebin.com/mpGSetQQ why can't I write 28 as a procedure? I really don't get it :/ 19:12 nejucomo: I'm still not sure where the unbound identifier comes from. 19:14 (quit) tilde`: Read error: Connection reset by peer 19:14 (quit) anRch: Quit: anRch 19:14 (join) tilde` 19:17 (join) spiderweb 19:19 carleastlund: The unbound identifier comes in where #%app is added in step 81, if you turn off all macro hiding. 19:20 nejucomo checks. 19:20 carleastlund: I'm having trouble, though; the macro stepper doesn't want to show me the binding (or lack thereof) for quote. Seeing if I can work around it; I've already told Ryan there might be a macro stepper bug. 19:20 (join) jeapostrophe 19:20 (quit) jeapostrophe: Changing host 19:20 (join) jeapostrophe 19:20 nejucomo: Where do you see the macro step number? 19:21 nejucomo: Oh, I'm on 5.2.1 btw. 19:22 carleastlund: Go to the menu: Stepper -> Extra Options, and turn on Extra Navigation. 19:22 nejucomo: Eventually I see: (let-values:70 (((target:71) quote)) ... 19:22 nejucomo: -in the stepper, which sure looks like quote is the "target" in the checked-apply template. 19:22 nejucomo: Thanks. 19:22 carleastlund: And I found the problem, when you expand 'system-test to a macro pattern, it turns into (list quote system-test). Which thus binds and shadows the name quote. 19:23 nejucomo: Oh yeah, step 81 -> 82 makes that clearer. 19:23 nejucomo: Ah, thanks! 19:23 nejucomo: That's what I get for trying to customize the pattern matching syntax. 19:23 nejucomo: I think I'll remove that for now and just pass full racket patterns through. 19:24 carleastlund: I got the macro stepper to show binding of quote by changing 'system-test and 'success to (quote system-test) and (quote success), I guess Ryan is being too clever for his own good when source uses the reader abbreviation. 19:25 nejucomo: When I turn off all macro hiding, I eventually see (let:41 ((system-test unsafe-car15:56)) (let:42 ((quote unsafe-car11:49)) ... 19:26 nejucomo: Does system-test appear before quote because of continuation-passing-style? 19:27 carleastlund: Those are just rebindings of already-computed values, the order doesn't make any computational difference. 19:27 (quit) netrino: Quit: Ave! 19:27 nejucomo: I see. 19:28 nejucomo: Thanks a lot for helping me with this! 19:30 (join) RacketCommitBot 19:30 RacketCommitBot: [racket] plt pushed 10 new commits to master: http://git.io/cIF2Hg 19:30 RacketCommitBot: racket/master d544e9f Vincent St-Amour: Fix source location information for `do:' and `let:'. 19:30 RacketCommitBot: racket/master e4af200 Vincent St-Amour: Hide OC control panel if an error occurs during expansion. 19:30 RacketCommitBot: racket/master 6d231da Vincent St-Amour: Typo. 19:30 (part) RacketCommitBot 19:30 (quit) PCChris: Ping timeout: 244 seconds 19:32 (join) PCChris 19:32 nejucomo: Hm, now I have an error related to #%top-interaction, but that's not specified in the syntax model expansion step document. 19:36 (quit) bitonic: Ping timeout: 252 seconds 19:41 (join) myx 19:41 carleastlund: nejucomo, #%top-interaction isn't part of the expansion model. It's added by the REPL. 19:42 nejucomo: I see. 19:43 nejucomo: Hm. I want to access the (provide)'d values that live inside a sandbox from outside a sandbox. 19:43 nejucomo: I thought I did a test earlier and that worked... 19:45 carleastlund: You want to get the namespace used by the sandbox and use dynamic-require inside that namespace, then. 19:45 (quit) ianjneu: Remote host closed the connection 19:46 nejucomo: Ok, thanks. 19:52 (quit) jrslepak: Quit: What happened to Systems A through E? 20:00 (quit) shriphani: Ping timeout: 252 seconds 20:01 nejucomo: Hm. I don't see how to access a module or a namespace from a sandbox, and dynamic-require takes a module. 20:01 nejucomo: Maybe I don't want a sandbox at all. I just want to dynamically load modules then get at their provided symbols... 20:05 (quit) masm: Ping timeout: 260 seconds 20:06 nejucomo: Right, just dynamic-require is good enough for now. 20:07 (join) masm 20:08 (join) jrslepak 20:12 (quit) masm: Ping timeout: 260 seconds 20:13 (quit) dyoo: Quit: dyoo 20:14 (join) masm 20:17 (quit) mizu_no_oto: Quit: Computer has gone to sleep. 20:19 (join) mizu_no_oto 20:21 nejucomo: Hm. I don't see equality comparison in the user guide. 20:21 (quit) masm: Ping timeout: 255 seconds 20:26 (quit) mizu_no_oto: Quit: Computer has gone to sleep. 20:28 (quit) jao: Ping timeout: 246 seconds 20:32 carleastlund: What do you mean by equality comparison? 20:35 (join) masm 20:38 lewis1711: rudybot: (eqv? equal? eq?) 20:38 rudybot: lewis1711: your sandbox is ready 20:38 rudybot: lewis1711: ; Value: #f 20:38 (join) sw2wolf 20:40 carleastlund: rudybot: (eq? eq? eq?) 20:40 rudybot: carleastlund: your sandbox is ready 20:40 rudybot: carleastlund: ; Value: #t 20:40 carleastlund: At least that's sane ;-) 20:40 lewis1711: yo dawg I heard you like equality... 20:41 carleastlund: ...so I put three equality operators in RnRS so you can compare while you compare while you compare. 20:41 lewis1711: and let's not forget = 20:43 carleastlund: and string=? and char=? ... 20:43 carleastlund: anyway, gotta run, later racketeers 20:43 (quit) carleastlund: Quit: carleastlund 20:51 (quit) masm: Ping timeout: 252 seconds 20:54 (join) masm 20:55 (join) mizu_no_oto 20:58 (join) RacketCommitBot 20:58 RacketCommitBot: [racket] plt pushed 1 new commit to master: http://git.io/VOoJIA 20:58 RacketCommitBot: racket/master d30e7c6 Robby Findler: clarify that flat-contract is essentially useless now 20:58 (part) RacketCommitBot 21:04 (quit) mizu_no_oto: Quit: Computer has gone to sleep. 21:14 (quit) nejucomo: Ping timeout: 276 seconds 21:15 (quit) gatlin: Ping timeout: 246 seconds 21:17 (join) PCChris_ 21:18 (quit) PCChris: Ping timeout: 244 seconds 21:23 (join) k0001 21:39 (join) RacketCommitBot 21:39 RacketCommitBot: [racket] plt pushed 1 new commit to master: http://git.io/GTe6eQ 21:39 RacketCommitBot: racket/master c0a412e Nadeem Abdul Hamid: fix close parens behavior in interactions and comments 21:39 (part) RacketCommitBot 21:41 (join) RacketCommitBot 21:41 RacketCommitBot: [racket] plt pushed 1 new commit to master: http://git.io/UbxAhA 21:41 RacketCommitBot: racket/master 40964d7 Jay McCarthy: Nicer indentation and fixing a typo in db reading 21:41 (part) RacketCommitBot 21:43 (join) gatlin 21:51 (quit) k0001: Ping timeout: 256 seconds 21:52 (quit) jrslepak: Quit: What happened to Systems A through E? 21:52 (join) jonrafkind 21:53 (part) sw2wolf: "ERC Version 5.3 (IRC client for Emacs)" 21:54 (join) ewemoa 21:59 (part) lewis1711 22:06 (quit) masm: Quit: Leaving. 22:07 (join) RacketCommitBot 22:07 RacketCommitBot: [racket] plt pushed 1 new commit to master: http://git.io/oDO7pw 22:07 RacketCommitBot: racket/master 6b3b59e Robby Findler: more "this function is useless" notes in old contract functions 22:07 (part) RacketCommitBot 22:10 (quit) spiderweb: Quit: ERC Version 5.3 (IRC client for Emacs) 22:11 (join) mizu_no_oto 22:12 (quit) mizu_no_oto: Client Quit 22:27 (join) lewis1711 22:27 lewis1711: I remember you guys telling me that drracket launched external processes in a peculiar way - which meant if your program crashes dr racket crashes, but it was needed to do the cool things like drawing images in the repl 22:28 lewis1711: can anyone elaborate? 22:30 (join) Kaylin 22:32 (join) offby1 22:32 (quit) offby1: Changing host 22:32 (join) offby1 22:35 (join) kofno 22:36 (quit) PCChris_: Quit: Leaving 22:48 (quit) Shviller: Ping timeout: 245 seconds 22:49 (join) Shviller 22:49 (quit) mye: Ping timeout: 244 seconds 22:51 (join) francisl 22:51 (quit) nathanpc: Quit: Computer has gone to sleep. 22:54 (quit) Kaylin: Quit: Leaving. 22:55 Shambles_: lewis1711: I don't really know the answer for that, but nobody else is replying. I don't believe launching external programs is necessary to draw images in the REPL in general. 22:57 Shambles_: lewis1711: What you describe sounds like it could be explained by IPC (interprocess communication). Basically a chunk of RAM that two or more processes can read and write. At least with some arrangements it doesn't make sense to keep on if one process dies. If you /need/ that process to do work then it can't proceed, and there's a decent chance the shared RAM is corrupt. 22:58 bremner: I thought the point was that DrRacket didn't typically launch external processes but ran the IDE and the user programs on the same VM/Jit 23:00 Shambles_: That doesn't seem unreasonable (avoids wasting RAM running multiple VM's when multiple threads would do), but doesn't seem to explain the "if one program exits, the other does too" unless the "exiting" was due to something catastrophic like memory corruption from some unmanaged code. 23:02 lewis1711: well if I launch dr. racket from the commandline, and some rapped C code needs a file bar.txt in the same directory as foo.rkt, it will crash because it can't find bar.txt... unless I launch dr. racket from that folder 23:03 Shambles_: lewis1711: That would be accounted for by "some unmanaged code in our address space @#$%ed up, god only knows the state of RAM, so it's better to die than risk security holes and (file) data corruption". 23:03 Shambles_: lewis1711: It's common in any interpreted/byte-compiled language that allows unmanaged extensions. 23:04 lewis1711: yeah it actually sort of makes sense 23:04 lewis1711: I guess usually in interpreted languages, I *always* launch the repl from the folder I amworking in 23:04 lewis1711: where as drracket I always launch from /usr/bin or wherever 23:06 Shambles_: lewis1711: The fix is probably to make the C code more robust, or consider if it really really needs to be C code. Stuff that "really has to be C" is usually used to hook into the OS or window system. Other "you can excuse it" situations would be really spiffy and/or performant libraries that don't exist in . 23:07 lewis1711: spiffy libraries indeed :) without getting religious, I generally avoid writing in stuff like C 23:07 lewis1711: there's a function in there to hardcode the path to "foo", that will probably work 23:07 (join) jrslepak 23:08 Shambles_: lewis1711: From a non-religious standpoint, anything written in the interpreted/byte-compiled language will be easier to debug than anything written in assembler/C/C++/other-unmanaged-languages. 23:09 Shambles_: When the extension screws up, you just know it screwed up. When something in the host language screws up, you usually know why. 23:10 lewis1711: this C lib is usually "nice" enough to trip asserts, where you can dig into source and discover what variables names like "xdstptr" mean :) 23:11 Shambles_: Sounds more friendly than most then. It's rare for C or C++ to be written in a debugging-friendly style. 23:12 lewis1711: also - woohoo. the program starts by droppingto a repl. from there I can run (main-loop), and play the game, or press escape to drop into the repl again, and there I can query the state of the player, world map, or whatever. this is going to be super handy for debugging 23:12 (join) k0001 23:14 Shambles_: REPL's are mighty nice indeed. Now please bring on the live evaluation (just be sure it's 'safe'... none of that running file deleting stuff) and time machine debugging. :P 23:15 lewis1711: the code to do it is a bunch of black magic I barely understand, truth be told. someone here wrote most of it while I had a nervous breakdown trying to understand the docs. what's live evaluation? 23:16 Shambles_: Live evaluation is where you get to see values passing through chains of calls as you edit your code. Light Table was the first IDE to propose it, but is still sort of unstable (alpha just released). Live Scratchpad seems pretty stable and does it. 23:17 Shambles_: http://vimeo.com/40281991 should show it in action 23:18 Shambles_: Racket's macro debugger bears some resemblance to time machine debuggers. I was really impressed with it, given C++ caused me to develop a extreme hatred of template metaprogramming. Other people are upset the Racket macro debugger doesn't do everything they want. Guess it's all relative. 23:21 lewis1711: you learned enough C++ to be able to do template metaprogramming? my condolences 23:22 Shambles_: If you enjoy new and more pleasant ways to kill bugs you might enjoy this: http://vimeo.com/36579366 23:23 Shambles_: It's one of the more spectacular demos of ideas. 23:23 Shambles_: I'm not sure I'd say I learned how to do template metaprogramming so much as I learned what happens when C++ code gets riddled with template metaprogramming and somebody has to debug it. 23:24 (join) mithos28 23:25 lewis1711: that light table looks pretty nifty - is the apocalisp upon us? 23:25 Shambles_: The results did not please me, and I basically decided anything that put distance between "what it looks like it does" in the source and "what it actually does" was pure evil. I now think metaprogramming can be allowed to live, so long as it comes with pleasant debugging support, rather than spewing nonsense that has no apparent relation to what was written, and is a abuse of something only intended to swap out types. 23:26 lewis1711: I really need to figure out how rackets macro expander works. 23:27 Shambles_: I found the macro debugger to be useful there. You'll get different opinions on how to learn it, and what to actually use once you do. 23:28 Shambles_: The "what to actually use" involving the ~4 (maybe more) macro systems in Racket. 23:29 lewis1711: yeah starting out with racket macros has been some of the most confusing stuff I've done for a while 23:29 Shambles_: What the macro debugger does is show you, step by step, macro expansion, while keeping the code nicely formatted. You can go forward and backward 'through time', and it keeps an association between the expanded code and the macro to blame for it. 23:30 (join) ambrosebs 23:31 Shambles_: What I got out of it was "use syntax-parse for everything, read the docs, read examples, run it through the macro debugger". A lot of people prefer using multiple systems depending on what they need to do. Personally I find it hard to keep all the different ways in my head, and syntax parse is the most powerful, and catches some use-errors automatically. 23:31 lewis1711: I've kept to syntax-rules pretty much, except some black magic stuff for purposefully capturing a single variable 23:32 Shambles_: I suppose there's a place for it, but I don't really "get it". It basically does what C preprocessor macros do, just without the error-prone-ness. Handy for typing less I guess, but seems like a function could do it better. 23:32 lewis1711: the docs are comprehensive, but I am always very aware they are written by people smarter than me for people smarter than me. 23:34 Shambles_: syntax-case is what I consider 'useful' macros, in that it can "do some work, including side effects, at compile time". syntax-parse adds error-checking on top of that. 23:34 (join) nejucomo 23:35 (quit) k0001: Quit: Lost terminal 23:35 (join) Kaylin 23:36 Shambles_: The 4th option is something similar to defmacro in Common Lisp, I think. I haven't messed with it much. 23:37 lewis1711: yeah I looked it up in the docs and it said something like "here there be dragons" 23:37 Shambles_: Schemers seem to discourage it's use since it doesn't enforce hygiene, so you can screw up by accidentally capturing a variable. 23:38 Shambles_: I'm not a big fan of accident prone constructs that have equally powerful, less accident prone, alternatives, so I didn't pay it much mind. 23:39 Shambles_: Especially for metaprogramming. Seriously, C++ templates are not my friend. 23:40 lewis1711: LOL. after time, the nightmares will stop and you should be able to re-integrate into society 23:41 Shambles_: I think it's still out there, waiting for me. :P There's this common fallacy in programming language design, that it's okay to introduce questionable elements because "if you don't like it, you don't have to use it". This is a fallacy because it doesn't prevent /other/ people from using it, just because you don't like it. 23:41 Shambles_: Which becomes an issue if you ever want to modify or fix a program someone else wrote, which seems to be rather common. 23:43 Shambles_: Similarly, it's "perfectly possible" to write readable APL code. Unfortunately, APL culture does not encourage this, and any libraries you use will be 'ugly'. Before you know it, ugly will seep in to your code from around the edges. Moral being it's best if the language tries to remain somewhat human-readable. 23:45 Shambles_: I actually have a more popular programming language in mind, that has nothing to do with Lisp, but might net me a flamefest if I mention it by name. :P 23:45 mithos28: Java? 23:45 Shambles_: Name starts with a P. It's not quite as ugly as APL. 23:46 mithos28: Pizza? 23:46 offby1: Porfirio Diaz 23:46 Shambles_: Having grown up with C, which I actually still sort of like, I don't really find Java all that ugly. 23:46 lewis1711: tbh I'd rather a commented perl one liner than an uncommented "clear" ALGOL style thing. 23:47 lewis1711: that takes up 5-10 lines 23:47 offby1: Shambles_: I grew up with C, which I still kinda like, and Java strikes me as quite ugly indeed. 23:47 mithos28: Java is ugly because it is verbose for no good reason 23:47 Shambles_: I more find Java curious, in that it manages to be as verbose as a low level language like C, while being as inefficient as a high level language like Python. It seems to exist in this strange no-mans land of "not especially good at anything", but hoo boy, is it popular. I think the main reason for that was having a useful standard library. 23:48 offby1: Shambles_: I thought it was pretty snappy, at least with a modern JVM 23:48 lewis1711: but I think the LISP culture is very against brevity. at least, that's the impression I get. all the names in racket/scheme are very long and verbose. string-append, read-eval-print-loop, etc.. 23:49 lewis1711: I'd be happy if java replaced C as the vulgar latin of computing. though I do have a weird fondness for C 23:49 offby1: lewis1711: try arc 23:49 mithos28: offby1: Is arc even used outside of ycombinator? 23:49 lewis1711: offby1: I'm not sure how much i mean it as a criticism. 23:49 offby1: mithos28: I don't think it's used (much) _inside_ ycombinator. 23:49 offby1: (Except for news.ycombinator.com) 23:50 mithos28: that is the only thing that I know that uses it 23:50 lewis1711: I do do stuff like rename (vector-map + ...) as (v+ ...) though 23:50 Shambles_: Old JVM's used to have interface issues. As in, it'd actually drop keystrokes and flicker. Those days seem to be over. Most of the problem now is the insane memory use, which I blame on "garbage collection is k-rad, because it's uber-fast so long as you never actually free anything (until the system is about to die)". Living in swap leads to slowness, which leads to hatred, which leads to the dark side. 23:51 mithos28: Shambles_: Are you writing desktop or mobile software? 23:51 mithos28: otherwise just get a nice beefy server 23:52 Shambles_: lewis1711: I don't really agree with the brevity bit. I have, in the past, been quite interested in programming language design. I've read examples from various camps that show 'their language' compared to various Lisp dialects. Lisp code tends to be shorter or approximately the same (sometimes longer, but not by much; e.g. VB6 and Python code come pretty close). 23:53 Shambles_: lewis1711: The reason the names are long is the only thing that gives Lisp code any readability is good naming and indentation. Otherwise it'd just be a bunch of parentheses vomit, some meaningless symbols (see your average C code), and numbers. 23:54 lewis1711: I suppose you're right 23:55 lewis1711: I don't see why we can't do ++ though instead of "sequence-append" 23:55 Shambles_: This is, as opposed to, having a fair amount of syntax (most languages), which generally cannot be modified (no macros), and possibly mandatory proper indentation (e.g. of-side-rule, as in Python). 23:55 mithos28: lewis1711: you can 23:55 mithos28: (require (rename-in racket/sequence (sequence-append ++))) 23:55 (join) mye 23:55 Shambles_: Yeah, you can. Just define a function or, if you're efficiency minded, a macro that turns that into sequence-append. You can even write stuff that looks like C (or APL...) if you write a reader macro. 23:56 lewis1711: I can :) but then I'd post my code here or at the mailing list and you guys couldn't read it LOL 23:56 mithos28: Shambles_: or as I suggested just do an import rename 23:56 Shambles_: Oh people would figure it out. They'd just probably rage at you. :P 23:56 mithos28: lewis1711: If you pasted the whole module it would be fine 23:56 Shambles_: Because really, WTF is "++". 23:57 lewis1711: it's a pretty standard symbol for append. used in math 23:57 mithos28: Well the issue is that you are typesetting it wrong 23:57 Shambles_: It's like naming a function "yubchub". Unless you're an ewok, it has no meaning. 23:57 mithos28: there should be no space between the + symbols 23:57 lewis1711: yeah, but I think for the purposes of ease of input it's the best 23:58 mithos28: its mappend 23:58 Shambles_: I honestly have never seen "++" for append, ever. I have seen "+" in many languages, "&" in a few. I can think of one that uses "." (yes, really... AutoHotKey). Usually "++" is pre-increment or post-increment depending on where it's located. 23:58 lewis1711: I've seen people get upset at the "λ" thing racket has. I use it though 23:58 lewis1711: Shambles_: haskell, ML 23:58 offby1: Shambles_: "." means "append" in Perl 23:58 Shambles_: And at least in C and C++ it's a extraordinarily good way to get yourself into trouble. Sequence points are /so/ much fun. 23:59 Shambles_: Ah... I tend to... not use Perl. I only investigated it lightly at one point. I have my reasons. I know it's popular. 23:59 offby1: most people hate it :)