00:01 (join) mye_ 00:07 (quit) cdidd: Ping timeout: 252 seconds 00:12 (quit) jeapostrophe: Ping timeout: 272 seconds 00:20 cky: eli: Re earlier convo: http://www.youtube.com/watch?v=9bZkp7q19f0 00:21 cky: eli: When I suggested to dyoo that he perform it in his presentation, he was very disturbed by the idea. :-P 00:31 mye: what is the correct terminology for "toplevel definitions", ie. the defintions in a module that are not nested. I always thought toplevel meant the repl 00:32 mye: is there even a distinction? I managed to confuse myself about this again 00:33 (join) jesyspa 00:34 (quit) mithos28: Quit: mithos28 00:34 mye: toplevel defines are shared between several requires of the module right? (i.e. the module is "cached") 00:35 (join) mithos28 00:39 mye: I guess it's time to reread http://docs.racket-lang.org/reference/syntax-model.html :-/ 00:43 (quit) mye_: Quit: mye_ 00:45 (quit) mithos28: Quit: mithos28 00:50 asumu: mye: I think people will often informally call those top-level definitions. 00:50 asumu: Even if they are technically module top-level. 00:50 asumu: Or module-level rather. 00:54 (join) mithos28 01:04 (quit) mithos28: Quit: mithos28 01:04 (join) mithos28 01:08 (quit) mceier: Quit: leaving 01:13 asumu: Yay, I fixed stchang and my snappy FFI binding. C is weird. 01:15 (quit) ssbr_: Ping timeout: 245 seconds 01:27 (quit) hash_table: Ping timeout: 246 seconds 01:41 (quit) jesyspa: Quit: leaving 01:45 (join) jesyspa 01:52 (join) hash_table 01:53 eli: cky: :) 02:00 (quit) hash_table: Ping timeout: 245 seconds 02:09 (join) em 02:14 (join) mceier 02:23 (join) vkz 02:30 (join) gciolli 02:33 (join) hkBst 02:38 (quit) hkBst: Ping timeout: 245 seconds 02:41 (join) hkBst 02:44 (quit) jackhammer2022: Quit: Textual IRC Client: http://www.textualapp.com/ 02:56 (quit) mithos28: Quit: mithos28 03:00 (join) mithos28 03:00 (quit) mithos28: Client Quit 03:11 (quit) em: Ping timeout: 240 seconds 03:39 (quit) hkBst: Remote host closed the connection 03:40 (join) hkBst 04:02 (join) em 04:18 (quit) gciolli: Quit: Leaving. 04:23 (quit) hkBst: Read error: Connection reset by peer 04:23 (join) bitonic 04:24 (join) hkBst 04:29 (join) masm 04:55 (quit) hkBst: Read error: Connection reset by peer 04:55 (join) hkBst 04:58 (quit) vkz: Quit: vkz 05:02 (join) mye_ 05:07 (join) cdidd 05:18 (join) soegaard_ 05:35 (quit) mye_: Quit: mye_ 05:37 (quit) cdidd: Remote host closed the connection 05:40 (quit) bitonic: Ping timeout: 260 seconds 05:48 (quit) hkBst: Ping timeout: 245 seconds 05:49 (join) hkBst 05:55 (join) noelw 06:00 (quit) noelw: Ping timeout: 245 seconds 06:30 (join) RacketCommitBot 06:30 RacketCommitBot: [racket] plt pushed 2 new commits to master: http://git.io/G-nH6Q 06:30 RacketCommitBot: [racket/master] fix JIT bug in struct pred/get/set corner case - Matthew Flatt 06:30 RacketCommitBot: [racket/master] JIT-inline structure allocation - Matthew Flatt 06:30 (part) RacketCommitBot 06:32 mye: uhmm stupid question ahead: how do I connect an input port to an output port? 06:33 mye: I knew it, copy-port does that 06:33 mye: secrect sauce! 06:34 mye: *secret 06:38 mye: ahem, actually I want to connect an output port to an input port... 06:38 mye: there's no function for that? 06:46 (quit) hkBst: Ping timeout: 246 seconds 06:46 (join) hkBst 07:16 (join) bitonic 07:24 (join) vkz 07:38 (join) noelw 07:57 (quit) Demosthenes: Ping timeout: 252 seconds 07:59 (join) Demosthenes 08:03 (join) mizu_no_oto 08:05 (quit) Demosthenes: Ping timeout: 260 seconds 08:06 (join) Demosthenes 08:06 (join) vkz_ 08:08 (join) jao 08:08 (quit) jao: Changing host 08:08 (join) jao 08:09 (quit) vkz: Ping timeout: 256 seconds 08:09 (nick) vkz_ -> vkz 08:09 (quit) bitonic: Ping timeout: 245 seconds 08:12 (join) carleastlund 08:21 (join) jeapostrophe 08:21 (quit) jeapostrophe: Changing host 08:21 (join) jeapostrophe 08:23 (join) noelw_ 08:24 (quit) noelw: Ping timeout: 245 seconds 08:24 (nick) noelw_ -> noelw 08:25 (join) RacketCommitBot 08:25 RacketCommitBot: [racket] plt pushed 1 new commit to master: http://git.io/0XKFqQ 08:25 RacketCommitBot: [racket/master] avoid compiler warning - Matthew Flatt 08:25 (part) RacketCommitBot 08:27 (quit) Demosthenes: Ping timeout: 260 seconds 08:29 (join) Demosthenes 08:31 (join) dnolen 08:37 (quit) Demosthenes: Ping timeout: 276 seconds 08:38 (join) Demosthenes 08:42 (join) RacketCommitBot 08:42 RacketCommitBot: [racket] plt pushed 1 new commit to master: http://git.io/5OUgcQ 08:42 RacketCommitBot: [racket/master] show a dialog box saying that aspell/ispell cannot be - Robby Findler 08:42 (part) RacketCommitBot 08:59 (join) hash_table 09:00 (quit) mizu_no_oto: Quit: Computer has gone to sleep. 09:14 (quit) hkBst: Remote host closed the connection 09:15 (join) xhyang` 09:15 (join) hkBst 09:16 (part) xhyang`: "ERC Version 5.3 (IRC client for Emacs)" 09:18 (quit) soegaard_: Quit: soegaard_ 09:19 (join) uselpa 09:20 (join) Netfeed 09:20 (part) Netfeed: "WeeChat 0.3.0" 09:26 (join) ssbr_ 09:27 (quit) uselpa: Remote host closed the connection 09:28 (join) bitonic 09:30 (join) noelw 09:30 (quit) hkBst: Ping timeout: 240 seconds 09:30 (join) soegaard 09:33 (join) hkBst 09:33 (quit) bitonic: Ping timeout: 246 seconds 09:35 (quit) jeapostrophe: Read error: Operation timed out 09:40 (join) momo-reina 09:43 (join) mizu_no_oto 09:43 (join) bitonic 09:44 (join) uselpa 09:48 (quit) hash_table: Ping timeout: 260 seconds 09:49 (join) neilv 09:49 (quit) bitonic: Read error: Operation timed out 09:51 (quit) hkBst: Ping timeout: 246 seconds 09:52 (join) hkBst 09:53 (quit) momo-reina: Remote host closed the connection 10:02 (nick) Shozan -> SHODAN 10:07 (quit) uselpa: Remote host closed the connection 10:33 (join) bitonic 10:37 (join) gciolli 10:45 (join) hash_table 10:49 (quit) dnolen: Ping timeout: 246 seconds 10:50 (join) jon7 10:57 (quit) mceier: Quit: leaving 11:03 (join) preyalone 11:03 preyalone: How do I define a main function in Racket? 11:03 preyalone: Surprisingly hard to Google. 11:03 jrslepak: you don't 11:04 asumu: preyalone: (define (main) ...) 11:04 jrslepak: oh, really? 11:04 asumu: Well, the --main flag to racket will call the function bound as main. 11:04 jrslepak: ah ok 11:04 asumu: You could also use a main submodule. 11:04 preyalone: I see a command line option in racket: -m | --main args automatically calls the main function with the relevant arguments. 11:04 jrslepak: what happens to top-level code if you do that? 11:04 preyalone: So I need to define (main) so that it accepts an argument vector. 11:05 jrslepak: you mean command line args? 11:06 mizu_no_oto: I remember people mentioning contracts at racketcon a few days ago. Out of curiosity, could you check something like the monad or functor laws via contracts? If not, is there a quick check like library that would let you do that? 11:08 jrslepak: you could check that things you actually do at runtime aren't examples of violations of those laws 11:08 preyalone: mizu_no_oto: I ported QuickCheck to Chicken Scheme (https://github.com/mcandre/cluckcheck). It shouldn't be that hard to port to Racket. 11:08 preyalone: jrslepak: Yes. I would like to, for instance, grab the equivalent of C's argv[0], the script name, if possible. 11:09 jrslepak: one of the "Start Quickly" examples on the racket-lang.org frontpage demonstrates how to access them 11:09 (quit) hkBst: Quit: Konversation terminated! 11:09 jrslepak: it's the dice example 11:10 jrslepak: `command-line' syntax lets you bind names to command line arguments 11:10 preyalone: jrslepak: exact url? 11:10 jrslepak: I'm ... not sure how to link directly to one of the examples 11:11 preyalone: ah, i see 11:11 preyalone: I tried (current-command-line-arguments), but it omits the .rkt filename. 11:11 jrslepak: oh hmm 11:12 preyalone: I'm trying to find Racket code that emulates Python's if __name__=="__main__": main() 11:12 jrslepak: what does that do in Python? 11:13 preyalone: In scripting languages like Python, Ruby, and Perl, you can bundle an API library and a CLI program using the library, in a single piece of source code. 11:14 preyalone: That Python snippet detects whether the script is being loaded as a singleton on the command line, e.g. "python myscript.py" 11:14 preyalone: The other case is that the script is being loaded as a module by another Python script: import myscript... 11:15 preyalone: With this little bit of Python magic, I can write an API and CLI in one file without having to write a separate "cli.py" or such file. 11:16 jrslepak: so I guess in Racket, the equivalent would be determining whether a module is being loaded as the actual program or by some other module? 11:16 preyalone: Yes. 11:17 jrslepak does not know the module system well enough for this 11:17 preyalone: I thought racket -m would do the trick, calling (main) a la Java, but -m really expects a separate main.rkt file. 11:17 preyalone: So I'll have to explore for special Racket tricks to do this. 11:19 preyalone: I've managed to do this in Chicken (https://github.com/mcandre/scriptname/blob/master/scriptname.scm). 11:21 stamourv: preyalone: Have you tried using a `main' submodule? 11:21 stamourv: e.g. `(module+ main ...)' 11:21 preyalone: stamourv: Could you provide a short pastebin for what that would look like? 11:22 preyalone: I'm not sure how to use submodules yet. 11:22 stamourv: Well, it's basically what I wrote above. You put the code you want to run where I put the `...'. 11:22 mye: (module+ main (display "hello, world")) 11:23 preyalone: okay.. 11:23 stamourv: Inside the submodule, you have access to everything in the enclosing file. 11:23 preyalone: "module+: allowed only in a module body" 11:23 preyalone: How do I wrap this inside a module declaration? 11:24 stamourv: Use `#lang racket' at the top of the file. 11:24 stamourv: (Or the #lang language you want.) 11:25 (join) jeapostrophe 11:25 (quit) jeapostrophe: Changing host 11:25 (join) jeapostrophe 11:26 preyalone: stamourv: Hmm. Could you pastebin a Hello World example, including the command to run it? 11:26 preyalone: I've got a basic Hello World, but it only runs when I shebang and ./ it. If I call "racket -r hello.rkt" manually, nothing happens. 11:26 preyalone: How would you run Racket programs from the command line in Windows? 11:27 stamourv: I don't use Windows, but I guess that "racket.exe hello.rkt" would work. 11:27 stamourv: (or whatever the name of the racket executable is) 11:27 preyalone: https://gist.github.com/3893090 11:27 stamourv: You don't need "-r". 11:28 (quit) snorble_: *.net *.split 11:28 preyalone: stamourv: Thanks. 11:30 stamourv: "-r" uses `load', which is a bad idea, and doesn't work with modules. 11:30 preyalone: Okay, I'm getting an "unbound identifier" error in the code. https://gist.github.com/3893090 11:31 stamourv: `module+' defines submodules, use `define' for variables and functions. 11:31 preyalone: Not sure if idiomatic, but this works: https://gist.github.com/3893090 11:32 preyalone: How would I A) load scriptedmain and B) reference the meaning-of-life function in the module? 11:32 stamourv: You don't need the `meaning-of-life' submodule. 11:32 stamourv: The `main' submodule can access definitions from the enclosing module. 11:33 preyalone: updated: https://gist.github.com/3893090 11:33 stamourv: You just need to define `meaning-of-life', either at the module top-level, or inside the `main' submodule. Either would work. 11:33 (quit) jrslepak: Quit: What happened to Systems A through E? 11:33 stamourv: If you define it inside the `main' submodule, it won't be visible outside of it. 11:33 preyalone: How would I load the code from another Racket program and call the meaning-of-life function? 11:33 stamourv: Yep, that version looks good. 11:34 stamourv: You can use `provide' to export identifiers and `require' to import a module's exports. 11:34 preyalone: thanks! could you give a little more detail? 11:34 stamourv: http://doc.racket-lang.org/guide/modules.html 11:34 stamourv: rudybot: doc provide 11:34 rudybot: stamourv: your sandbox is ready 11:34 rudybot: stamourv: http://docs.racket-lang.org/reference/require.html#(form._((lib._racket%2Fprivate%2Fbase..rkt)._provide)) 11:34 stamourv: rudybot: doc require 11:34 rudybot: stamourv: http://docs.racket-lang.org/reference/require.html#(form._((lib._racket%2Fprivate%2Fbase..rkt)._require)) 11:35 stamourv: Each module contains definitions. If you want some of these definitions to be visible in other modules, you need to `provide' these definitions, and the other module need to `require' your module. 11:37 preyalone: stamourv: thanks for the doc link. not bad. 11:37 preyalone: i'm getting an "unknown module" error. https://gist.github.com/3893090 11:38 preyalone: ah, if i use (require "scriptedmain.rkt"), everything works! 11:38 stamourv: Yep. 11:38 stamourv: Symbol syntax is for "collects", or libraries. 11:39 stamourv: Like `racket/match', or `xml'. 11:41 (quit) noelw: Quit: noelw 11:42 preyalone: I'm a little bit confused by all the #lang options. I wish Racket offered a more standard environment, perhaps defaulting to #lang racket. 11:42 (join) asd_ 11:42 asd_: ok 11:43 (nick) asd_ -> Guest38252 11:43 (quit) mizu_no_oto: Quit: ["Textual IRC Client: www.textualapp.com"] 11:45 (quit) preyalone: Quit: Page closed 11:45 (join) Aune 11:45 (join) aune_ 11:46 (part) Aune 11:47 (quit) aune_: Client Quit 11:47 (join) Aune 11:50 (join) vkz 11:51 (quit) jeapostrophe: Ping timeout: 252 seconds 12:00 (join) jeapostrophe 12:00 (quit) jeapostrophe: Changing host 12:00 (join) jeapostrophe 12:03 asumu: BTW: "main" functions work fine with modules and the racket executable. 12:03 asumu: Contents of "foo.rkt": #lang racket (provide main) (define (main) (printf "hello~n")) 12:03 asumu: racket -tm foo.rkt 12:04 asumu: (note that you need the -t) 12:04 (join) RacketCommitBot 12:04 RacketCommitBot: [racket] plt pushed 1 new commit to master: http://git.io/dA0cLQ 12:04 RacketCommitBot: [racket/master] Don't provide for/vector: helpers. - Vincent St-Amour 12:04 (part) RacketCommitBot 12:08 (join) mceier 12:08 (join) uselpa 12:18 (join) cdidd 12:21 (join) MayDaniel 12:22 (quit) uselpa: Remote host closed the connection 12:22 (join) mithos28 12:24 (join) anRch 12:30 (quit) ssbr_: Ping timeout: 245 seconds 12:33 (join) jrslepak 12:34 (join) h11r 12:41 (quit) vkz: Ping timeout: 272 seconds 12:41 (join) vkz 12:42 h11r: Hi. I've got a quick question: Is it a good or a bad idea to use custodians to automatically close system pipes when calling and piping shell commands together with subprocess bzw. process/ports? The idea is to make a new custodian, remember the old current one and replace it with the new one. Then do the shell stuff and afterwards clean up by swapping back the custodian and calling custodian-shutdown-all on the new one? 12:43 mithos28: are you using parameterize on the custodians? 12:44 h11r: I was planning to use custodians. 12:44 mithos28: were going going to use parameterize to do the swaping? 12:44 mithos28: were you going* 12:45 h11r: you mean the 'current-custodian' parameter? 12:45 mithos28: It seems like a fine way to handle the exceptional cases, but I would still think you would want to do the closing manually for the cases where nothing goes wrong 12:46 mithos28: (parameterize ((current-custodian (new-custodian))) …) 12:46 mithos28: I'm not sure if new-custodian is the right syntax though 12:47 h11r: oh. No, i wasn't aware of this possibility. But that might be a good idea. In the short test I did i simply called (current-custodian ). 12:48 (join) vkz_ 12:48 h11r: you have to call (make-custodian) but that isn't the point though :) 12:48 mithos28: If you are not using parameterize, I'm not sure what you are gaining from this 12:48 mithos28: I assume you want automatic cleanup 12:50 (quit) vkz: Ping timeout: 252 seconds 12:50 (nick) vkz_ -> vkz 12:51 h11r: yes, exactly. The problem is that, if I get the documentation right, the calls to subprocess create up to 3 system pipes per call that have to be closed manually. Therefore the idea to use custodians since they close file-type ports when they are collected. 12:51 mithos28: Which of those ports are you using? 12:51 h11r: But parameterize should do exactly what I was doing manually. 12:53 samth: h11r: this tutorial: http://docs.racket-lang.org/more/#%28part._.Terminating_.Connections%29 has a good intro to custodians 12:53 h11r: mithos28: I don't know yet :D 12:55 h11r: samth: I'll going to read it before asking further questions. Thanks. 12:58 (quit) anRch: Quit: anRch 13:02 (join) nilyaK 13:04 h11r: mithos28: The solution with parameterize seems not to work. http://pastebin.com/6u09csdc 13:05 (quit) bitonic: Ping timeout: 244 seconds 13:06 (quit) jon7: Ping timeout: 246 seconds 13:07 (join) nathanpc 13:08 (quit) mithos28: Quit: mithos28 13:13 (join) mithos28 13:14 h11r: Oh man, I didn't say nothing. It works if you actually call custodian-shutdown-all on the new custodian. Sorry! Maybe I should stop trying those things for today ... 13:14 mithos28: And custodian-shutdown-all should be called when the new custodian is garbage collected 13:16 mithos28: I believe, you should test that 13:17 h11r: mithos28: Yes, I recognized it. And thanks for your help. 13:18 h11r: samth: The tutorial seems to be just what I looked for. So thank you very much, too. 13:19 h11r: So I'll read and play a little with the custodian mechanic before bothering you any further. 13:19 h11r: Bye. 13:22 nathanpc: Does anyone have a simple TCP Socket example? 13:22 nathanpc: I was looking at the documentation but I could find one. http://docs.racket-lang.org/reference/tcp.html 13:23 mithos28: the third example on racket-lang.org 13:23 mithos28: its an echo server 13:24 nathanpc: hmm 13:24 (quit) h11r: Ping timeout: 276 seconds 13:24 (join) mizu_no_oto 13:24 nathanpc: oh 13:24 nathanpc: thanks very much mithos28 13:24 nathanpc: I'm starting with Racket (coming from Javascript) 13:25 nathanpc: and I wanted to have some fun with a Lisp dialect 13:25 asumu: nathanpc: good choice :) 13:25 nathanpc: so I choose Racket because I could use it on my Raspberry Pi (which is still on an aircraft coming to Brazil) :) 13:25 nathanpc: hehe 13:26 nathanpc: I was working with Node.js before 13:27 nathanpc: I was going to get into Lisp, but when I was searching I found that Racket is extremely more powerful than Lisp, so here I am :) 13:27 stamourv: nathanpc: Welcome! :) 13:27 nathanpc: and since I love to build sockets stuff to learn about a new language, I decided that a extremely simple chat server/client is a good way to start 13:27 nathanpc: thanks stamourv 13:27 stamourv: If you have any questions, let us know! 13:28 asumu: nathanpc: BTW, that reminds me. samth started writing detailed explanations of front page examples. Here is the echo server: https://github.com/samth/racket-examples/blob/master/echo.scrbl 13:28 nathanpc: ok :) 13:28 stamourv: And rudybot here is always happy to help. 13:28 stamourv: rudybot: You're happy to help, right? 13:28 rudybot: stamourv: dynamic binding is as dangerous (and occasionally useful, I admit) as unhygienic macros. I got no problem with providing it as an option, but I'm not happy with it being the default. 13:28 nathanpc: oh nice 13:28 stamourv: rudybot: (+ 2 3 4) 13:28 rudybot: stamourv: ; Value: 9 13:29 stamourv: rudybot: doc + 13:29 rudybot: stamourv: http://docs.racket-lang.org/reference/generic-numbers.html#(def._((quote._~23~25kernel)._%2B)) 13:29 nathanpc: wow nice 13:29 stamourv: rudybot: source 13:29 rudybot: stamourv: git clone git://github.com/offby1/rudybot.git 13:29 ianjneu: rudybot: sauce 13:29 rudybot: ianjneu: ido-mode is awesome sauce 13:29 nathanpc: what I'm loving about Racket is how simple and yet powerful it is, and how I can do a lot more with fewer lines 13:29 jrslepak_neu: rudybot: rudybot 13:29 rudybot: jrslepak_neu: apropos jordan 13:29 jrslepak_neu: k 13:33 (join) RacketCommitBot 13:33 RacketCommitBot: [racket] plt pushed 1 new commit to master: http://git.io/QcJlKg 13:33 RacketCommitBot: [racket/master] adjust background compilation log messages so they only appear - Robby Findler 13:33 (part) RacketCommitBot 13:35 (quit) mithos28: Quit: mithos28 13:36 asumu: BTW: I've already mentioned this, but if you're building a PLaneT package, mcfly-tools is awesome. 13:36 neilv: whew. i was afraid i was the only one using it 13:37 asumu: neilv: https://github.com/stchang/snappy/blob/master/main.rkt 13:37 (join) ssbr_ 13:37 neilv: cool 13:38 neilv: you preferred not to put the documentation in with the implementing code? 13:39 asumu: I haven't tried doing it that way yet, so I'm not sure. 13:40 neilv: i find it helps out as libraries grow in size. but the drawback is that it increases the bulk of text in your code files 13:42 neilv: recent example use of inline documentation: http://planet.racket-lang.org/package-source/neil/vlc.plt/1/4/vlc.rkt 13:43 neilv: if i used "@"-syntax, would be easier to distinguish "doc" forms from code, but i haven't figured out how to format "@"-syntax easily 13:47 (quit) nilyaK: Quit: Leaving. 13:53 (quit) jeapostrophe: Ping timeout: 252 seconds 13:56 (join) uselpa 13:59 (join) snorble_ 13:59 (quit) uselpa: Remote host closed the connection 14:02 asumu: http://www.reddit.com/r/Racket/ <-- I changed the name of the subreddit a bit 14:03 (join) Blkt 14:04 neilv: asumu: if you can edit the sidebar of that subreddit, might want to take the "Dev" email list out. the distinction between the lists is confusing 14:05 (join) nilyaK 14:06 asumu: Fair enough. Probably most people who go on reddit was users. 14:07 asumu: And done. 14:10 (join) anRch 14:15 (quit) mye: Ping timeout: 265 seconds 14:25 (quit) acarrico: Ping timeout: 246 seconds 14:25 (join) RacketCommitBot 14:25 RacketCommitBot: [racket] plt pushed 1 new commit to master: http://git.io/XTlxIw 14:25 RacketCommitBot: [racket/master] adjust logger to use a name instead of an environment variable - Robby Findler 14:25 (part) RacketCommitBot 14:30 (join) nilyaK1 14:32 (quit) nilyaK: Ping timeout: 244 seconds 14:32 (nick) nilyaK1 -> nilyaK 14:41 (join) acarrico 14:45 (join) t-rex 14:45 (quit) t-rex: Client Quit 14:46 (join) t-rex 14:47 (nick) t-rex -> Guest48778 15:02 (join) masm1 15:02 (join) jeapostrophe 15:02 (quit) jeapostrophe: Changing host 15:02 (join) jeapostrophe 15:03 (quit) masm: Ping timeout: 246 seconds 15:04 (join) RacketCommitBot 15:04 RacketCommitBot: [racket] plt pushed 1 new commit to master: http://git.io/YJstFw 15:04 RacketCommitBot: [racket/master] Minor pickinesses. - Eli Barzilay 15:04 (part) RacketCommitBot 15:05 (quit) carleastlund: Quit: carleastlund 15:10 Cryovat: I was looking at asumu's slides 15:10 Cryovat: "Anything is only a *require* away" is a pretty good tagline 15:11 asumu: Cryovat: thanks 15:12 asumu: I considered several others, but in the end wanted something that implied everything is a library. 15:14 stamourv: Even languages! ;) 15:14 Cryovat: I can't wait until this makes it into TR 15:15 Cryovat: It feels like you're marrying the best things from Scheme with the best things from Haskell :) 15:17 stamourv: Why stop at Haskell? We're also taking cool stuff from Clojure, Scala, etc. ;) 15:17 Cryovat: It keeps blowing my mind how these advanced features can be implemented as libraries 15:17 (quit) anRch: Quit: anRch 15:18 stamourv: To me, that's really what makes Racket special: it can be anything you want. 15:19 (join) mithos28 15:20 Cryovat: I'm very glad you branched off from Scheme 15:21 Cryovat: R7RS is looking interesting, but it doesn't feel like it has the same momentum 15:24 (quit) mizu_no_oto: Quit: ["Textual IRC Client: www.textualapp.com"] 15:29 (quit) mithos28: Quit: mithos28 15:33 (join) carleastlund 15:34 (join) vkz 15:44 (quit) ssbr_: Ping timeout: 252 seconds 15:44 (join) gridaphobe 15:47 (quit) masm1: Ping timeout: 260 seconds 15:53 nathanpc: What's the best way to handle a thread globally on the code? Because I want to be able to kill the thread if a response from the client isn't the one the server is waiting for. 15:55 stamourv: nathanpc: Have you looked at custodians? 15:55 stamourv: rudybot: doc make-custodian 15:55 rudybot: stamourv: http://docs.racket-lang.org/reference/custodians.html#(def._((quote._~23~25kernel)._make-custodian)) 15:55 nathanpc: hmm no 16:02 (join) masm 16:03 Guest48778: besides the racket guide, are there any racket books? 16:04 ianjneu: Realm of Racket is soon to hit the bookshelves 16:05 asumu: You might consider HtDP to be a Racket book, though it's more of a "how to program" 16:05 ianjneu: and it's not about racket idioms, but rather more beginner level stuff that's in most any functional language. 16:06 Cryovat: What kind of book is RoR? 16:06 Cryovat: Is it like Land of Lisp? 16:06 asumu: That's my understanding. I don't work on it though. 16:06 (join) ltbarcly 16:08 Guest48778: The docs and the guide are excellent, but i wish there were more examples 16:08 Guest48778: exercises even 16:08 nathanpc: me too 16:08 nathanpc: :) 16:08 nathanpc: I'm having a hard time with the docs 16:08 asumu: Guest48778: at the Hackathon we worked on adding examples to several sections. I agree we need even more though. 16:09 nathanpc: let me try to understand something here... 16:09 nathanpc: I'm opening a TCP listener using (tcp-listen) 16:10 nathanpc: when I do that, that call automatically makes a new custodian correct? 16:10 Cryovat: Guest48778: Have you seen a book called Real World Haskell? 16:10 Cryovat: I think it's probably the best functional programming book I've seen 16:10 Guest48778: no 16:11 Cryovat: I wish there was a Racket equivalent 16:11 Cryovat: What makes is great is that it assumes the reader is familiar with an imperative language already 16:11 asumu: nathanpc: I don't think it makes a new custodian. I think it associates the socket with the current custodian. 16:11 Cryovat: And leads you to reimplementing a bunch of the base library to get a feel for things 16:12 nathanpc: hmm 16:12 Cryovat: Before jumping on to "real" programming tasks 16:12 asumu: nathanpc: i.e, if you tell the current custodian to shut everything down, it will shut down that port too 16:12 nathanpc: asumu: So if I call (make-custodian (tcp-listen...)) it will make a new one? 16:13 asumu: nathanpc: I think you want something like (parameterize ([current-custodian (make-custodian)]) (tcp-listen ...) ...) 16:13 Guest48778: Cryovat: now i feel compelled to start working through the Haskell book 16:13 nathanpc: hmm 16:14 asumu: nathanpc: within the parameterize, it will set the current custodian to a new one. The tcp-listen associates to that. Then any shutdowns within the parameterize will shut down the TCP (and any other ports) but not stuff outside. 16:14 Cryovat: Guest48778: Don't stray away from Racket D: 16:14 nathanpc: ahh nice 16:14 nathanpc: this custodian stuff is finally making sense to me 16:14 nathanpc: and as far as I can see they are incredibly powerful 16:15 asumu: nathanpc: of course, you don't have to use parameterize. You can just set the current-custodian: (define new-custodian (make-custodian)) (current-custodian new-custodian) 16:15 nathanpc: ahh, that syntax is better 16:15 asumu: They are quite powerful. DrRacket and other Racket systems apps use them extensively to manage resources. 16:16 Cryovat: I was wondering 16:17 Cryovat: Would it be hard to make a "try-Racket-in-the-browser" page? 16:17 stamourv: nathanpc: Careful, though. `parameterize' reset the current custodian to its old value when you get out of parameterize, whereas setting the parameter directly doesn't. 16:18 nathanpc: hmm 16:18 nathanpc: ok 16:18 stamourv: Cryovat: There's wescheme.org 16:18 neilv: Cryovat: is pretty easy if the racket evaluation is done server side, but you really should just install drracket and use that 16:18 stamourv: (doesn't support full Racket, yet!) 16:18 (quit) hash_table: Ping timeout: 240 seconds 16:19 Cryovat: I was thinking of something like http://tryruby.org 16:19 stamourv: Hacking rudybot to get commands from a web page shouldn't be too hard, I guess. 16:20 neilv: you won't get the full racket experience if you are just messing around in a browser 16:20 asumu: Cryovat: I bet it could be easily done with the sandbox, Racket webserver, and https://github.com/chrisdone/jquery-console 16:21 asumu: It would be a nice thing to have, for people who like trying things on the web. 16:21 Cryovat: Yeah 16:21 Cryovat: It's a good way to sell things 16:21 neilv: if people can't be bothered to download an app, maybe they should come back when they're a bit more ready :) 16:22 neilv: if racket is sold too hard, then it becomes like java, where you can't google a question without finding page after page of people who have no idea what they're talking about 16:22 carleastlund: whereas, neilv, if racket isn't sold hard enough, everybody's busy learning about java instead 16:23 Cryovat: Yeah 16:23 Cryovat: And a browser based page like that is a nice way to give people a feel of the language 16:23 Cryovat: You could play a bit in the lunch break at work, for instance 16:24 Cryovat: See the link on Hacker News, spend twenty minutes tinkering with it and making a mental note of giving it a more thorough look when you get home 16:33 neilv: people browsing reddit, hacker news, etc., during work hours is a big thing, you have a point. you think a significant number of people would use and get a good experience from a web-based repl, when they otherwise wouldn't install drracket? 16:34 (quit) Blkt: Ping timeout: 255 seconds 16:38 samth: neilv: a web-based repl is *much* lower-investment 16:40 Cryovat: A web-based repl with directions is a much lower barrier of entry than downloading 50 megs, running an installer and opening a tutorial article 16:40 Cryovat: As for how many converts it would bring? No idea 16:41 neilv: samth: i think it depends on the person. 10+ years ago, lots of us got very used to typing "apt-get install APPNAME" whenever we heard of an app. nowadays, people are very accustomed to installing apps for phones, and internet pipes at the office should make for fast downloads 16:42 (join) mizu_no_oto 16:42 samth: neilv: (a) windows/mac don't have apt 16:42 samth: (b) i find rudybot useful in this channel, and i certainly already have racket installed 16:43 neilv: no doubt, there are many people who will spend some time with a web-based thing before they'll install an app. how much yield you get for the amount of effort to give a good experience on the web is the question 16:43 neilv: if someone wants to do it, i should've shut up a few messages ago :) 16:43 samth: this is the model we should go for, I think: http://cljbin.com/ 16:44 (quit) Araq: Ping timeout: 246 seconds 16:45 (join) Araq_bnc 16:45 (nick) Araq_bnc -> Araq 16:45 samth: in fact, that site is by #racket's own gf3 :) 16:45 gf3: Oh hai! 16:45 gf3: BTW http://twatlr.com is Racket 16:47 gf3: Has anyone built a nice URL resolver? 16:47 Cryovat: cljbin looks really nice 16:48 gf3: Cryovat: Thanks 16:48 samth: and it's only about 1k of clojure code 16:49 samth: much of which should be stealable from rudybot 16:49 (join) bitonic 16:50 gf3: Here's an example with some output and a fork → http://cljbin.com/paste/4f4de5ebe4b06eb04cc275f7 16:50 gf3: samth: I'd be happy to help 16:50 Cryovat: The background is really efficient 16:50 neilv: gf3: i have an old library that resolves urls. there is a heavily-changed unreleased version that also does reverse-resolution. "http://www.neilvandyke.org/racket-uri/#%28part._.Resolving_.Relative_.U.R.I%29" 16:50 rudybot: http://tinyurl.com/957cb8y 16:50 Cryovat: It makes it feel really calm and pleasant 16:51 samth: gf3: thanks 16:51 samth: i know that cky expressed interest in building something like that as well 16:54 gf3: neilv: Interesting, thank you 16:55 neilv: gf3: i wrote it in 2004 in portable scheme. i will probably rewrite it from scratch, using modern racket-isms. but in the interim, it might get you by 17:04 samth: well, i created https://github.com/samth/rktbin as a fork of gf3's code 17:04 samth: we'll see if i do something with it 17:06 (join) bitonic` 17:06 Cryovat: I volunteer to test/play with the result 17:07 gf3: samth: Are you planning to rewrite it all in Racket? 17:07 (quit) mizu_no_oto: Ping timeout: 246 seconds 17:07 samth: yeah, probably 17:08 chandler: I volunteer to kibitz and to complain when it's not working. :-) 17:08 (join) hash_table 17:08 samth: that way i won't have to learn how to run clojure, just read it :P 17:08 (quit) bitonic: Ping timeout: 260 seconds 17:08 gf3: samth: Haha 17:08 gf3: samth: Probably not worth a fork then; I doubt there's anything in there that's reusable 17:08 samth: gf3: all the client-side code, though 17:09 gf3: samth: It's basically only this → https://github.com/samth/rktbin/blob/master/resources/public/js/main.js 17:10 gf3: samth: All the CSS uses a clojure pre-processor → https://github.com/samth/rktbin/blob/master/src/cljbin/css/cljbin.clj 17:10 (nick) bitonic` -> bitonic 17:11 (quit) jrslepak: Ping timeout: 246 seconds 17:13 (quit) gciolli: Quit: Leaving. 17:13 (quit) MayDaniel: Read error: Connection reset by peer 17:14 (join) jrslepak 17:28 neilv: if anyone is on a computer that has multiple displays and is running x, could they email the output of the "xrandr" command to neil@neilvandyke.org ? 17:30 neilv: for the bootable rackout image, i'm working on heuristics for how to use multiple displays it detects. something better than http://i.imgur.com/RpHaL.jpg 17:31 chandler: neilv: sent 17:31 neilv: thanks 17:34 (quit) vkz: Quit: vkz 17:38 chandler: Let me know if you need any other output or info... that's a ThinkPad T420 with a monitor connected via DisplayPort to HDMI dongle 17:39 (join) none___ 17:40 neilv: chandler: thanks. this is exactly the the worst-case scenario i had in mind :) 17:44 nathanpc: nice neilv 17:44 (join) didi 17:45 nathanpc: btw, how to know if a custodian was shutdown? 17:45 nathanpc: and how to remake the custodian if it was shutdown? 17:45 nathanpc: (sorry, but I'm trying to learn how to use custodians) 17:46 (join) RacketCommitBot 17:46 RacketCommitBot: [racket] plt pushed 8 new commits to release: http://git.io/twQa0w 17:46 RacketCommitBot: [racket/release] Only recommend dropping exactness in truly inexact contexts. - Vincent St-Amour 17:46 RacketCommitBot: [racket/release] raco setup: improve description of `--doc-pdf' - Matthew Flatt 17:46 RacketCommitBot: [racket/release] slideshow/pict repair - Matthew Flatt 17:46 (part) RacketCommitBot 17:47 (quit) jesyspa: Quit: leaving 17:48 didi: When calling a procedure that returns multiple values, for example (values 4 2), I have to obligatory make room for those two values or is there a way to only use the first one (4)? 17:52 Cryovat: It sounds a bit strange to do so 17:53 Cryovat: And personally I think it'd be better to put the second value somewhere 17:53 Cryovat: Just so that it's explicit to the reader that you're discarding it 17:54 (quit) carleastlund: Quit: carleastlund 17:55 samth: neilv: https://gist.github.com/06700e7998fa3ac0e81a 17:59 neilv: samth: thanks. this breaks my parser 18:01 neilv: didi: the syntax forms that receive multiple values strongly encourage you to acknowledge each value that is returned. this arguably reduces bugs. similar to how you can't normally call a procedure with fewer than the required number of arguments 18:02 didi: neilv: I see. 18:03 didi: Cryovat, neilv: Thanks. 18:05 Cryovat: This made me think a bit 18:06 Cryovat: It doesn't seem like let-values lets you use wildcards for unwanted values 18:06 Cryovat: But that kind of feature would probably be a bad idea 18:06 (quit) jeapostrophe: Ping timeout: 255 seconds 18:08 (quit) none___: Ping timeout: 245 seconds 18:08 neilv: using define-syntax, you could implement your own version of let-values that supported such a wildcard (lisp people might call it a "rest argument"), if you wanted to 18:09 neilv: one of the things i found i was doing when i was first learning scheme was to imagine all these general purpose syntactic shortcuts i would like, and implement them 18:09 neilv: later, i found i wasn't really using those shortcuts, since my style was different than i expected it to be, and the situations were then different 18:10 Cryovat: Sounds like good macro practice though 18:10 neilv: it's great practice, yes 18:12 Cryovat: I have a theory that the code style changes a bit once you get used to the functional mindset 18:12 Cryovat: As in, less recursion, more combinators and point-free code 18:12 asumu: stchang: http://planet.racket-lang.org/display.ss?package=snappy.plt&owner=plt 18:13 didi: That's a good point. Although I was originally thinking about something like (+ ((lambda () (values 4 2))) 3) => 7 18:14 stchang: cool thanks 18:16 neilv: didi: i once implemented an alternate application syntax that would've yielded 9 rather than 7 for that 18:17 neilv: http://www.neilvandyke.org/weblog/2009/04/#2009-04-06 18:21 jrslepak: anyone know why I get this error from online expansion while trying to edit the Racket docs? -- make-directory: cannot make directory path: /Users/jrslepak/github/racket/collects/scribblings/compiled/drracket system error: Permission denied; errno=13 18:23 didi: neilv: Cool. 18:23 gf3: Is there a Racket equivalent of Clojure's if-let ? 18:23 gf3: http://clojuredocs.org/clojure_core/clojure.core/if-let 18:27 Cryovat: That's... weird 18:28 (join) bitonic 18:28 didi: Hehe, I find the first example a little weird. 18:29 didi: Why returning a string when `0' seems appropriate when there is no even number? 18:29 Cryovat: It's a pretty bad example 18:30 gf3: didi, Cryovat: The example is a bit contrived 18:30 (quit) masm: Ping timeout: 272 seconds 18:30 (quit) gridaphobe: Read error: Operation timed out 18:30 (join) jesyspa 18:30 Cryovat: I guess by test, they mean that the expression produces a non-null/empty/false result? 18:31 (quit) jrslepak: Quit: What happened to Systems A through E? 18:32 didi: Cryovat: I'm guessing Clojere have generalized boolean? 18:32 didi: s/Clojere/Clojure 18:37 Cryovat: It has both a boolean type and null 18:37 Cryovat: Due to running on top of the JVM 18:46 gf3: How does one know what type of exception is thrown? 18:50 (join) masm 18:53 (quit) bitonic: Ping timeout: 252 seconds 18:56 (join) gridaphobe 19:01 didi: gf3: What do you mean by "type"? You use predicates. 19:02 gf3: didi: For example: exn:fail:contract:divide-by-zero? 19:02 neilv: gf3: if you are just seeing the error message, you probably have to add a "with-handlers" to catch "exn:fail?" and then write the exception object as debugging output, then go change the "exn:fail?" to the appropriate predicate 19:04 gf3: neilv: Ahh, thanks 19:11 gf3: neilv: Boom! exn:fail:network 19:11 (join) otterdam 19:13 (join) jeapostrophe 19:13 (quit) jeapostrophe: Changing host 19:13 (join) jeapostrophe 19:17 (quit) gridaphobe: Ping timeout: 256 seconds 19:19 (quit) jeapostrophe: Ping timeout: 265 seconds 19:21 (join) gridaphobe 19:25 (join) bitonic 19:25 (quit) nathanpc: Disconnected by services 19:25 (join) Nathan 19:26 (nick) Nathan -> Guest74962 19:30 (quit) neilv: Quit: Leaving 19:31 (quit) bitonic: Ping timeout: 246 seconds 19:43 (join) mizu_no_oto 19:58 (quit) ltbarcly: Ping timeout: 246 seconds 19:59 (join) Fare 20:03 (quit) gridaphobe: Ping timeout: 246 seconds 20:11 (join) dnolen 20:26 nathanpc: Why I can't use (define ..) inside an if/else? 20:27 offby1: nathanpc: I think you can, if it's the first thing in the "arm". 20:27 offby1: but the real answer to your question is: I dunno :) 20:27 nathanpc: no problem 20:27 offby1: rudybot: (if #t "it's true!" (define x 3) (format "x is ~a" x)) 20:27 rudybot: *offby1: Should I supply font to set-default-font in -*-blabalabla-*-*-rabel-rabel-* format? 20:27 nathanpc: I tried that, but it didn't worked 20:27 offby1: *sigh* 20:27 offby1: rudybot: eval (if #t "it's true!" (define x 3) (format "x is ~a" x)) 20:27 rudybot: *offby1: your sandbox is ready 20:27 rudybot: *offby1: error: #:1:0: if: bad syntax (has 4 parts after keyword) in: (if #t "it's true!" (define x 3) (format "x is ~a" x)) 20:27 offby1: that's why :) 20:28 offby1: 'cuz they don't let you :) 20:30 nathanpc: hmm 20:30 nathanpc: rudybot: eval (if (< 10 20) ((define t "test") (display t)) (display "false")) 20:30 rudybot: nathanpc: your sandbox is ready 20:30 rudybot: nathanpc: error: #:1:15: define: not allowed in an expression context in: (define t "test") 20:30 nathanpc: see 20:30 nathanpc: that's the error I'm getting 20:30 offby1: sure 20:30 offby1: try this 20:30 offby1: rudybot: eval (if #t "it's true!" (begin (define x 3) (format "x is ~a" x))) 20:30 rudybot: *offby1: error: #:1:27: define: not allowed in an expression context in: (define x 3) 20:31 offby1: oops 20:31 offby1 rubs chin 20:31 nathanpc: haha no problem :) 20:31 offby1: rudybot: eval (if #t "it's true!" (let ([x 3]) (format "x is ~a" x))) 20:31 rudybot: *offby1: ; Value: "it's true!" 20:31 nathanpc: oh 20:31 offby1: rudybot: eval (if #t (let ([z 9])(format "it's true! z really is ~a" z)) (let ([x 3]) (format "x is ~a" x))) 20:31 rudybot: *offby1: ; Value: "it's true! z really is 9" 20:32 offby1: so there's a workaround. But it doesn't answer your question. 20:32 nathanpc: hmm 20:33 offby1: I would hope that the racket docs explain this somewhere; hopefully in the section that introduces "define". 20:33 offby1: Haven't read 'em in a while though. 20:33 offby1: rudybot: doc define 20:33 rudybot: *offby1: http://docs.racket-lang.org/reference/define.html#(form._((lib._racket%2Fprivate%2Fbase..rkt)._define)) 20:33 nathanpc: hmm 20:34 nathanpc: I'm going to ask this on the mailing list to see if people know why it throws this error 20:34 offby1: yep 20:37 (join) gridaphobe 20:46 asumu: nathanpc: cond is better than if because it lets you use defins 20:46 asumu: *defines 20:46 nathanpc: ahh 20:46 offby1: ooh 20:46 nathanpc: thanks asumu :) 20:46 asumu: rudybot: (cond [(< 10 20) (define t "test") t] [else 3]) 20:46 rudybot: asumu: your sandbox is ready 20:46 rudybot: asumu: ; Value: "test" 20:46 nathanpc: going to take a look at cond 20:46 asumu: for example 20:46 (join) RacketCommitBot 20:46 RacketCommitBot: [racket] plt pushed 1 new commit to master: http://git.io/E7NsnA 20:46 RacketCommitBot: [racket/master] minor GCs: reduce constant factor on total memory use - Matthew Flatt 20:46 (part) RacketCommitBot 20:47 asumu: Also see `match` 20:47 offby1: rudybot: eval (cond (#t (define z 9) (format "it's true! z really is ~a" z)) (#t (define x 3))) 20:47 rudybot: *offby1: error: #:1:0: begin (possibly implicit): no expression after a sequence of internal definitions in: ((define x 3)) 20:47 offby1: rudybot: eval (cond (#t (define z 9) (format "it's true! z really is ~a" z)) (#t (define x 3) (format "x is ~a" x))) 20:47 rudybot: *offby1: ; Value: "it's true! z really is 9" 20:47 offby1: asumu: w00t 20:56 nathanpc: How to change the indentation in DrRacket? 1 space isn't good, I would like to have it on 4 spaces. 21:06 (join) jeapostrophe 21:06 (quit) jeapostrophe: Changing host 21:06 (join) jeapostrophe 21:06 (quit) acarrico: Ping timeout: 260 seconds 21:19 (join) ltbarcly 21:20 (join) acarrico 21:22 ltbarcly: hi, I'm new to racket and scheme, and am thinking about porting over some CL code I have been working on for awhile 21:22 (join) jrslepak 21:23 ltbarcly: one question I'm having trouble figuring out from the docs, although there are hints: does racket let threads run in parallel? 21:24 ltbarcly: I see that you can use future objects, but it's not clear that threads can run concurrently, other than the docs saying you should run SCHEME_USE_FUEL from time to time to allow other threads to be run, which makes me think there must be an interpreter lock in there somewhere 21:28 (quit) mizu_no_oto: Quit: Computer has gone to sleep. 21:28 (quit) Aune: Quit: L?mnar 21:29 ltbarcly: nm, I found it in the docs 21:30 didi: ltbarcly: This was discussed a little while around here. 21:30 (quit) gridaphobe: Ping timeout: 260 seconds 21:31 (quit) jesyspa: Quit: leaving 21:31 ltbarcly: I'm guessing that this is due to a limitation in the vm? I was hoping to port a dsl to racket, but unfortunately the dsl would not map happily into futures 21:33 didi: ltbarcly: Unfortunately, I know nothing about Racket's underlying implementation. :^( But CL and Racket are indeed different languages. 21:33 didi: Although there is nothing on CL's language that talks about threads. 21:34 ltbarcly: I agree, CL only supports threads as an extension 21:34 didi: More like an implementation thing, I guess. 21:34 nathanpc: How to change the indentation in DrRacket? 1 space isn't good, I would like to have it on 4 spaces. 21:35 didi takes nathanpc on the side and talks about the wonders of Emacs 21:35 didi: ;^) 21:35 nathanpc: hshs 21:35 nathanpc: hah* 21:35 nathanpc: I'm a Chocolat, and Vim, user ;) 21:36 didi: nathanpc: That's not incurable. 21:36 nathanpc: I hate how you need to use all those keyboard shortcuts instead of commands 21:37 ltbarcly: emacs is a terrible editor, but unfortunately it is also the best editor 21:37 didi: Hehe. I feel you. Having >20 fingers helps. 21:37 didi: ltbarcly: Nah. Emacs is awesome all the way. 21:37 ltbarcly: have you done much elisp? 21:38 didi: ltbarcly: A certain amount, yes. But Emacs is not elisp. 21:38 ltbarcly: ahh, don't say that in #emacs :) 21:38 didi: ltbarcly: They would agree. 21:38 nathanpc: haha 21:38 nathanpc: you'll start an epic flame war there 21:38 ltbarcly: if you don't write elisp, emacs is just an editor with emacs key bindings, right? 21:39 didi: ltbarcly: Nope. 21:39 didi: Emacs is org-mode, gnus, geiser... 21:39 nathanpc: didi: I can take another look at Emacs if you help me to setup it for Racket. :) 21:39 SamB_MacG5: you can also use others' elisp 21:39 didi: nathanpc: geiser dude. 21:39 ltbarcly: I see what you mean, but of course all of those are written in elisp 21:39 SamB_MacG5: well, sometimes ;-) 21:39 didi: nathanpc: And paredit. 21:39 nathanpc: I have Emacs installed here on my Mac and on my Linux box 21:40 ltbarcly: so, am i right to say that futures become serialized as soon as they have to deal with side effects? 21:40 ltbarcly: IO for example 21:41 ltbarcly: the docs are very shady and just say they become serialized if they try to do something 'too complicated' whatever that means 21:42 asumu: ltbarcly: you can run paralell computations in Racket via places or futures. 21:42 asumu: My guess is that you want places for what you're doing. 21:43 asumu: *parallel 21:43 asumu: see http://docs.racket-lang.org/guide/performance.html#(part._effective-futures) and the next section 21:44 ltbarcly: places seems isomorphic to forking + a nice IPC library 21:45 ltbarcly: which is handy I guess, but very different than proper system threads 21:45 ltbarcly: it's particularly hard to write a nice, extensible vm that also handles threads nicely 21:46 nathanpc: oh, racket.vim works great! 21:46 nathanpc: just need some tweaks to highlight stuff like (display) 21:46 nathanpc: but the rest does pretty well 21:47 ltbarcly: I think of all the interpreted languages, only ruby does an ok job at system threads, but even then it is iffy, python has a global lock and perl doesn't really have threads at all, and it seems racket is somewhere in between 21:47 didi: ltbarcly: May I point out that threads are not for parallel computation? 21:48 ltbarcly: well, maybe in racket 21:49 didi: ltbarcly: Maybe historically. 21:49 ltbarcly: but I strongly suspect that is more an apology for the vm not being able to do it than a real assertion 21:49 ltbarcly: at one point threads didn't mean parallel because few systems had more than one cpu 21:50 didi: ltbarcly: In Python, for example, if you want to do parallel computation you spawn new processes. 21:50 ltbarcly: that's purely because of a limitation in the vm 21:50 didi: ltbarcly: That's a little debatable. 21:50 didi: ltbarcly: Not the limitation, but the reason. 21:51 ltbarcly: the reason they have an interpreter lock is that it makes reference counting GC much faster (finer grained locking has more overhead and causes huge cache-line issues due to one cpu wanting to update memory that another has cached to do reference count updates), and because it makes writing C extensions much easier 21:52 didi: ltbarcly: 21:52 rudybot: http://tinyurl.com/96tfeby 21:52 ltbarcly: but other implementations of python, Jython for example, don't have this restriction and run threads normally 21:52 jrslepak: ltbarcly: I think didi is trying to tell you that the "threads are for concurrency, not parallelism" predates that VM by quite a bit 21:53 ltbarcly: guido doesn't believe in threads for whatever reason 21:53 didi: (add1 jrslepak) 21:53 ltbarcly: but again I think that is more being defensive about the VM limitations than a real argument 21:53 ltbarcly: anyway, I'm not trying to start a flame war 21:54 didi hugs ltbarcly 21:54 ltbarcly: but it seems like "threads are for concurrency" is really not something that should be enforced 21:54 nathanpc: good night 21:55 ltbarcly: especially since the rest of the world has long since decided that threads are in fact for parallelism 21:55 didi: nathanpc: Sleep tight. 21:55 nathanpc: I'll dream with Vim :P 21:55 didi: Hehe. Whatever floats your boat. 21:55 jrslepak wonders how dreaming with vim works 22:00 (part) ltbarcly: "PING 1350352804" 22:07 (quit) didi: Remote host closed the connection 22:13 (join) didi 22:19 (join) jackhammer2022 22:52 (join) mizu_no_oto 22:57 (quit) mizu_no_oto: Client Quit 22:57 (quit) masm: Quit: Leaving. 23:07 (quit) Fare: Ping timeout: 246 seconds 23:08 (join) mithos28 23:12 (part) mithos28 23:12 (join) mithos28 23:12 (part) mithos28 23:12 (join) mithos28 23:20 SamB_MacG5: Hmm, I want to do a sort of survey about ⟨ and ⟩ ... 23:25 SamB_MacG5: If anyone can find a browser that fails to render a glyph in http://jsbin.com/okizeb/2/edit please tell me -- though most likely they'll fail in pairs ... 23:26 (quit) Shviller: Ping timeout: 245 seconds 23:27 (join) Shviller 23:30 (quit) jao: Ping timeout: 245 seconds 23:33 SamB_MacG5: (Well, really, I'm more interested in failure to render http://jsbin.com/okizeb/2 -- but I thought it might be helpful to see the other link too...) 23:34 SamB_MacG5 notes that CPython still has concurrency-only threads, for the most part 23:35 SamB_MacG5: (Of course, this has long been seen as a bad thing ;-) 23:35 mithos28: SamB_MacG5: Thats not true, its that there is a global lock on the python interpreter 23:35 SamB_MacG5: mithos28: well, I mean, if *Python* code is running, none of the other threads can run 23:36 mithos28: Yes they can, they just can't run python code 23:39 SamB_MacG5: yeah, realized I misspoke and was about to clarify when my client more-or-less froze up 23:40 SamB_MacG5: anyway, my first thought on reading about Racket threads was "oh, racket has a GIL?" 23:41 mithos28: Its different because racket threads are not native threads 23:41 SamB_MacG5: yes, that is a bit different 23:42 SamB_MacG5 thinks of fibres, but realizes that that's probably not a good analogy because fibres sound quite dangerous ... 23:43 SamB_MacG5: you know, they wouldn't have to be native threads just to support parallelism 23:44 SamB_MacG5: I mean, sure you'd need *some* native threads 23:44 mithos28: right that would be n*m multiplexing 23:44 asumu: They're so-called green threads. 23:44 mithos28: much more complicated 23:44 mithos28: haskell does that 23:44 SamB_MacG5: ITYM GHC 23:44 SamB_MacG5: and yeah, that's what I was thinking of 23:45 mithos28: Sorry the haskell platform does that 23:45 asumu: Our field is pretty bad about not using confusing names that mean 10 different things. 23:45 SamB_MacG5: it's not flawless -- tight allocation-free loops can still avoid being preempted ... 23:46 SamB_MacG5: I haven't really used Haskell much since the platform thing happened. (Not that I have anything against it, particularly...) 23:47 SamB_MacG5: (Though I do tend to be low on diskspace, which would probably lead me not to use the platform...) 23:48 didi: SamB_MacG5: What is the size of the platform? 23:49 SamB_MacG5: not quite sure, but I expect it has things in that I wouldn't actually use 23:50 didi: I see. It is a preference then. 23:51 SamB_MacG5: well, I'd prefer to have a larger disk in the Debian box I tend to use for that sort of thing 23:52 (quit) jeapostrophe: Ping timeout: 265 seconds