Re: [racket-users] IO in racket is painful
On 07/21/2017 12:49 PM, Matthias Felleisen wrote: On Jul 21, 2017, at 1:56 AM, Sorawee Porncharoenwase <sorawee_porncharoenw...@brown.edu> 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. After the competition is over, it's over. No one is going to care about maintainability or good coding practice if it makes coding slower. Which is why I think programming competitions are a direct attempt to undermine computer science and computer-science education. Having said that, if you want to use Racket for competitions, you and Mark Engelberg should get together and produce a high-utility IO library. We can then include it in the distribution. Just as a counterpoint, I have this kind of ad-hoc parse-this-produce-that problem all the time in the "real" world. When the logic of the problem is sufficiently complex I'll swallow the overhead of doing it in Racket, or I'll use Perl to transform the input into something I can read in Racket. It would be nice to have an I/O library that made it easy, but I don't have any specific thoughts about how to do that. I don't think computer science education should ignore this kind of problem though. It's very important to teach students how to solve problems methodically with a design recipe, how to collaborate with others, and how to reason about their programs. But it's also important that programmers (and also or even especially those who don't program for a living) be comfortable with using the machine to solve or automate the solution to one-off problems that would otherwise require a lot of manual fiddling with data. Being fluent with this kind of programing gives people the confidence they need to solve smaller problems or explore potential solutions to large problems in an unstructured manner before tackling the methodical, "right" solution. -- Brian Mastenbrook br...@mastenbrook.net https://brian.mastenbrook.net/ -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [racket-users] RacketCon Code of Conduct
On 06/17/2017 01:50 PM, Matthias Felleisen wrote: A code of conduct is a totally stupid idea for RacketCon. Racketeers were raised properly by their parents and are well behaved. I really hate attending conferences that need to impose a code. I think you might be reading something in to this request that's not meant by those who are asking for it. You are right to be proud of the Racket community today and I don't think anyone here is implying otherwise. Having a code of conduct does not mean that us Racketeers are not well behaved or that we need to impose a code to keep us in line. What it does is outline what we consider to be bad behavior, defines some of the possible consequences, and makes it clear who is responsible for handling violations. The point of doing this is to make sure that any possible violations of the expected behavior aren't fatal to the environment that the Racket developers have worked hard to create. If you don't specify this, it's not at all clear what to do in the event of a violation and some (many?) people may decide it's not worth the risk of dealing with unspecified consequences. This should sound familiar. We all use a programming environment that does this despite being good programmers who were taught properly by our professors, because programs are complex and sometimes we make mistakes. Humans are a lot more complex than programs, and having been raised with the virtues of humility and open-mindedness by our parents, we should all be willing to admit the possibility of errors in the human domain too. In both cases the goal isn't to be punitive or restrictive but to make sure that the environment is protected. If it turns out that the safety mechanisms were unnecessary, then RacketCon will be the type of conference that doesn't need to have a code but has one anyway. Isn't that better than the alternative? -- Brian Mastenbrook br...@mastenbrook.net https://brian.mastenbrook.net/ -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [racket-users] Macro-generating macros
On Sep 3, 2015, at 11:44, Konrad Hinsen <konrad.hin...@fastmail.net> wrote: > Hi everyone, > > Here's another plea for help from the macro experts. I am trying to > write a macro whose expansion contains another macro, more precisely a > let-syntax form. My full example is attached below. In the first part, > I use a let-syntax directly. In the second part, I use a macro that > generates exactly the form that I wrote by hand in the first part - > but then the let-syntax seems to be ignored. > > The macro stepper isn't of much help here. It shows the expansion > of (defn (foo2 ...)) into essentially what I wrote by hand for foo1, > and then declares the expansion finished. > > Can anyone tell me (1) why this doesn't work and (2) how to fix it? It's a capture problem. In the first case, you're just binding the name "send" locally and all is well. In the second case, you're trying to introduce a binding for "send" that you didn't get from the input form. You're also getting a confusing error because "send" is already bound; try using a name that's not already defined and you should get an unbound identifier. You can fix this in one of two ways. Your `def' macro could take the name of the `send' macro it binds as a parameter, which gets a little ugly. Alternatively, you can use a syntax parameter, which is probably the ideal solution here. (require (for-syntax syntax/parse)) (require racket/stxparam) (define-syntax-parameter send (lambda (stx) (raise-syntax-error 'send "send used out of context"))) (define-syntax (def stx) (syntax-parse stx [(_ (fn-name:id arg:id ...) body ... ) #'(define (fn-name arg ...) (syntax-parameterize ([send (λ (stx) (syntax-parse stx [(send obj:expr method:id x:expr (... ...)) #'(method obj x (... ...))]))]) body ...))])) (def (foo2 x y) (send x + y)) (foo2 2 3) -- Brian Mastenbrook br...@mastenbrook.net http://brian.mastenbrook.net/ -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [racket-users] Racket v6.2
On Jun 19, 2015, at 10:19 PM, Ryan Culpepper ry...@ccs.neu.edu wrote: Racket version 6.2 is now available from http://racket-lang.org/ Congratulations and many thanks to the maintainers on the release! Is there anything I can do to help get the Racket distributions for Windows and OS X code signed so they can be run without scary warning dialogs in the default OS configuration? I'm more than willing to sponsor the cost of any necessary certificates or developer programs. Failing that, has there been any thought to putting the releases up on GitHub or some other host that offers HTTPS downloads? -- You received this message because you are subscribed to the Google Groups Racket Users group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [racket-users] Racket v6.2
Is there anything I can do to help get the Racket distributions for Windows and OS X code signed so they can be run without scary warning dialogs in the default OS configuration? I'm more than willing to sponsor the cost of any necessary certificates or developer programs. Failing that, has there been any thought to putting the releases up on GitHub or some other host that offers HTTPS downloads? Correction: the OS X distribution is code signed; there seems to be a problem with an unreleased version of OS X accepting the signature. -- You received this message because you are subscribed to the Google Groups Racket Users group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.