Re: [racket-users] IO in racket is painful

2017-07-21 Thread Gustavo Massaccesi
IIRC the previous discussion, one way to fix this problem is to make a package that can parse strings easily using a C like format, like the expected in the contests. Something like #lang racket (require compatibility/scanf) (let-values ([(x y) (scanf "%d %d" (read-line))]) (display (+ x y)))

Re: [racket-users] IO in racket is painful

2017-07-21 Thread Brian Mastenbrook
On 07/21/2017 12:49 PM, Matthias Felleisen wrote: On Jul 21, 2017, at 1:56 AM, Sorawee Porncharoenwase wrote: Sorry for reviving an old thread. As someone who did a lot of programming competition in the past, I can totally see why IO in Racket is difficult. As mark.engelberg said, the goal

[racket-users] (seventh RacketCon): Do You Have Your Ticket?

2017-07-21 Thread Vincent St-Amour
Racketeers, (seventh RacketCon) is getting closer! To whet your appetite, you can find details about some of the talks we're looking forward to on the RacketCon website [1]. Also don't forget to register [2] and take advantage of our group rate [3] at the very nice Hotel Deca [4]. If you would

Re: [racket-users] IO in racket is painful

2017-07-21 Thread Neil Van Dyke
Racket's underlying I/O seems sophisticated to me, and contest-friendly parsing conveniences can be layered atop that. IIRC, a long time ago, Olin Shivers made some parsing stuff for Scheme, which you might want to steal or at least look at. I'm not sure where it all went, or who else was inv

[racket-users] [ANN] New package: disposable

2017-07-21 Thread Jack Firth
I recently published `disposable`, an experimental package for safely handling external resources. Features: - representation of a "disposable", a producer of values with external resources that must be disposed - safe handling of disposables for multiple usage patterns, including: - for a se

Re: [racket-users] A bug in the Typed Racket system?

2017-07-21 Thread Sourav Datta
On Friday, July 21, 2017 at 9:06:16 PM UTC+5:30, Ben Greenman wrote: > Type inference is failing you again. Yes, well, that seems to be a common theme whenever I hover around the these type of areas which are uncommon but works perfectly fine in untyped Racket. > > > If you instantiate `foo/s`

Re: [racket-users] IO in racket is painful

2017-07-21 Thread Matthias Felleisen
> On Jul 21, 2017, at 1:56 AM, Sorawee Porncharoenwase > wrote: > > Sorry for reviving an old thread. As someone who did a lot of programming > competition in the past, I can totally see why IO in Racket is difficult. As > mark.engelberg said, the goal is to solve as many problems as possible

Re: [racket-users] A bug in the Typed Racket system?

2017-07-21 Thread Ben Greenman
Type inference is failing you again. If you instantiate `foo/s`, you get the type you expect: #lang typed/racket (struct (a) Foo ([val : (-> a a)])) (: foo/s (All (a b) (-> (-> a b) (-> (Foo a) (Foo b) (Foo b) (defi

Re: [racket-users] Putting everything in a single monolithic source file

2017-07-21 Thread WarGrey Gyoudmon Ju
If the code is written in Typed Racket, the compilation time will drive you mad since every one-byte-modification forces the entire project being typed-checked... On Fri, Jul 21, 2017 at 5:07 PM, Erich Rast wrote: > I'm using mostly racket-mode in emacs for development and even with helm > and p

[racket-users] Olin Shivers's loop is supposed to be around somewhere

2017-07-21 Thread Sanjeev Sharma
anyone have a working implemntation? Just a little while ago I read something to the effect that Shivers thought error handling would be a huge mess but there's a Racket implementation that does a lot of error handling cheaply. -- You received this message because you are subscribed to the G

[racket-users] A bug in the Typed Racket system?

2017-07-21 Thread Sourav Datta
Consider this program, #lang typed/racket (struct (a) Foo ([val : (-> a)])) (: foo/s (All (a b) (-> (-> a b) (-> (Foo a) (Foo b) (Foo b) (define (foo/s f) (λ ([f1 : (Foo a)] [f2 : (Foo b)]) f2)) (define

[racket-users] Putting everything in a single monolithic source file

2017-07-21 Thread Erich Rast
I'm using mostly racket-mode in emacs for development and even with helm and projectile mode greping info from the source directory is cumbersome. So I was thinking about putting my entire project into one source file with lots of explicit (module ...) declarations. This doesn't break modularity, I