Re: [racket-users] Unicode subscripts in code and scribble

2016-03-09 Thread Robby Findler
I think any extension is one that all would want (although I am not sure) and so maybe pull requests is a good way to extend it? There is the issue of conflicting imports at the latex level tho, so maybe it should be specifiable at the document level. Robby On Wednesday, March 9, 2016, Vincent S

Re: [racket-users] Unicode subscripts in code and scribble

2016-03-09 Thread Vincent St-Amour
Should that table be user-extensible? Vincent On Wed, 09 Mar 2016 17:11:47 -0600, Robby Findler wrote: > > I think that maybe you're thinking of something fancier than what's > there. It just takes some (small) set of well-known unicode and has > corresponding latex commands. Then, in the latex

Re: [racket-users] Unit order matters in `define-values/invoke-unit/infer`

2016-03-09 Thread Robby Findler
No, I believe that's correct behavior. You probably want to use init-depend so you get a better error, like this: (define-unit y@ (import x^) (export y^) (init-depend x^) (define y x)) Also, I see that that the init-depend failure doesn't have good source location reporting. Robby On W

[racket-users] Unit order matters in `define-values/invoke-unit/infer`

2016-03-09 Thread Phil Nguyen
The program below complains that `x` is used before initialization. But if I change the linking order to `x@` before `y@`, it works fine. Is this an intended behavior or a bug? This is Racket v6.4.0.7 #lang racket (define-signature x^ (x)) (define-signature y^ (y)) (define-unit x@ (import)

Re: [racket-users] Unicode subscripts in code and scribble

2016-03-09 Thread Robby Findler
I think that maybe you're thinking of something fancier than what's there. It just takes some (small) set of well-known unicode and has corresponding latex commands. Then, in the latex backend for scribble, it looks up latex in that table and drops it in, if it finds it. Robby On Wed, Mar 9, 2016

Re: [racket-users] Unicode subscripts in code and scribble

2016-03-09 Thread Leif Andersen
> Scribble has a big table mapping unicode to latex commands. Maybe it needs another entry? Woah, does that actually work? I was under the impression there were unicode characters that could combine other unicode characters. (Although I'd love to be wrong about this. :) ) ~Leif Andersen On Wed

Re: [racket-users] Unicode subscripts in code and scribble

2016-03-09 Thread Robby Findler
Scribble has a big table mapping unicode to latex commands. Maybe it needs another entry? Robby On Wed, Mar 9, 2016 at 4:07 PM, David Van Horn wrote: > Yes, the problem then is the code font doesn't support that character > so it doesn't show up. > > David > > > On Wed, Mar 9, 2016 at 5:05 PM,

Re: [racket-users] Unicode subscripts in code and scribble

2016-03-09 Thread David Van Horn
Yes, the problem then is the code font doesn't support that character so it doesn't show up. David On Wed, Mar 9, 2016 at 5:05 PM, Leif Andersen wrote: > Have you tried running the outputted tex file in xetex rather than pdflatex? > > ~Leif Andersen > > > On Wed, Mar 9, 2016 at 5:03 PM, David V

Re: [racket-users] Unicode subscripts in code and scribble

2016-03-09 Thread Leif Andersen
Have you tried running the outputted tex file in xetex rather than pdflatex? ~Leif Andersen On Wed, Mar 9, 2016 at 5:03 PM, David Van Horn wrote: > I have some source code I'm trying to typeset in a racketblock that > uses subscript characters like ₀. This breaks when it gets to latex. > Is th

[racket-users] Unicode subscripts in code and scribble

2016-03-09 Thread David Van Horn
I have some source code I'm trying to typeset in a racketblock that uses subscript characters like ₀. This breaks when it gets to latex. Is there some workaround to generate latex friendly output? Thanks, David -- You received this message because you are subscribed to the Google Groups "Racke

[racket-users] submodules in definitions and interactions window.

2016-03-09 Thread Jos Koot
The following does not work in the definitions window of DrRacket: #lang racket (module a racket (display "hello")) (module b racket (require 'a)) (module c racket (require 'b)) (require 'c) But when putting it in the interactions-window (without the #lang line), it works. After reading the d

Re: [racket-users] Setup/teardown for unit testing

2016-03-09 Thread Matthias Felleisen
On Mar 9, 2016, at 11:06 AM, Sam Tobin-Hochstadt wrote: > I think having a built-in way to do something like this would be a > good thing, rather than having everyone write their own abstraction > for this. One way we've avoided divergence in the Racket community > despite Racket's flexibility i

Re: [racket-users] Setup/teardown for unit testing

2016-03-09 Thread Ryan Culpepper
I think it would be more (Racket-)idiomatic to make account a parameter (as in make-parameter) and have something that can update the parameter around a test case. Here is my preferred extension, by example: (define account (make-parameter #f)) (define (call/open-bank proc) (parameterize ((a

Re: [racket-users] Racket 6.4 very slow

2016-03-09 Thread Robby Findler
On Sat, Mar 5, 2016 at 8:09 AM, Matthew Flatt wrote: > If you start DrRacket fresh or create a new tab and paste > > (define (total n) > (for/sum ([x (in-range (+ 1 n))]) x)) > (time (total 10)) > > into the interactions window, then it runs at non-debugging speed. > After cl

Re: [racket-users] Setup/teardown for unit testing

2016-03-09 Thread Brian Adkins
If you're going to add something, please don't do #1 :) That's how it's done in Ruby, but it's an OO, stateful platform, so it fits. The only other way I've seen recently is the Elixir version ( http://elixir-lang.org/docs/stable/ex_unit/ExUnit.Case.html

Re: [racket-users] Webserver returns page on ajax get request, but not ajax post

2016-03-09 Thread Marc Kaufmann
Hm, OK. I will try to reproduce it and check that it was not due to something else (I give that a higher chance than dispatch not working correctly), but I am in crunch mode for some deadlines, so I may not get around to it until the weekend. I may misremember the URL that jQuery created. On Wed,

Re: [racket-users] Webserver returns page on ajax get request, but not ajax post

2016-03-09 Thread Jay McCarthy
Hi Marc, If that's correct, then I think there is a problem. Here's a little example that shows how `dispatch-rules` should work with `request`s struct that have GET queries: #lang racket/base (require web-server/dispatch web-server/http net/url racket/list rac

Re: [racket-users] Webserver returns page on ajax get request, but not ajax post

2016-03-09 Thread Marc Kaufmann
Oh, in this case the reason for wanting other separators, namely the ? used automatically by jQuery's ajax functions. When I use $.get (from jQuery), it adds whatever data I want to send automatically by appending a bunch of ?data1=value1 and so on. That's the only reason for wanting to split the U

Re: [racket-users] Setup/teardown for unit testing

2016-03-09 Thread Brian Adkins
I think you're right. Coming from a Ruby perspective, the lack of a setup facility seemed like a glaring omission at first glance, but I do strongly favor orthogonality and dislike bloat - thanks for the macro example. > On Mar 9, 2016, at 10:53 AM, Jay McCarthy wrote: > > I looked at the gist

Re: [racket-users] Setup/teardown for unit testing

2016-03-09 Thread Sam Tobin-Hochstadt
I think having a built-in way to do something like this would be a good thing, rather than having everyone write their own abstraction for this. One way we've avoided divergence in the Racket community despite Racket's flexibility is by building in the right abstractions in core libraries. But I sh

Re: [racket-users] Webserver returns page on ajax get request, but not ajax post

2016-03-09 Thread Jay McCarthy
On Sat, Feb 27, 2016 at 5:38 PM, Marc Kaufmann wrote: > As we are on it, is there a way to have `dispatch-rules work on url's with > regular expressions, so that it would work on ajax1, ajax2, etc, or would I > have to create my own bi-directional match-expander for that? (I haven't > tried to fi

Re: [racket-users] Standard web server interface?

2016-03-09 Thread Jay McCarthy
I agree with Sam. The Racket way to do something like this is to have standard types and function signatures. Roughly that means using the web-server/http structures for requests and responses and modeling servers as `request -> response`. A few of the internals of the Web server also have `request

Re: [racket-users] Setup/teardown for unit testing

2016-03-09 Thread Jay McCarthy
I looked at the gist you posted. I don't think it is plausible for us to add something like that to the test code, because you're imagining splicing the test body after the before exprs (because in your example, the before binds an identifier.) I really think you just want a slightly different tes

Re: [racket-users] [Redex] "Got nothing"

2016-03-09 Thread Anton Podkopaev
Dear Robby, Thank you. Yes, the cycles were a problem. BR, Anton Podkopaev podkopaev.net On Wed, Mar 9, 2016 at 1:50 AM, Robby Findler wrote: > It is possible you're using the #:cycles-ok argument, as in the > program below? If so, that means that the reduction graph has no > irreducible terms