Re: [racket-users] scribble racketresultblock and racketinput

2016-03-08 Thread Neil Van Dyke
Thanks, Matthew. Maybe some examples in the docs of the preferred way to use `racketinput` with single- and multi-line results would be good. For a long time, I've been doing both of the following, and I could always see that they were wrong: (racketinput (+ 1 2)

Re: [racket-users] html->xexp and parsing Stack Overflow

2016-03-08 Thread Neil Van Dyke
phil jones wrote on 03/08/2016 06:52 PM: So the best way to query something created from your html->xexp function would be to use http://docs.racket-lang.org/sxml/sxpath.html rather than xml/path? Yes, I usually use a mix of SXPath and `sxml-match`.

Re: [racket-users] html->xexp and parsing Stack Overflow

2016-03-08 Thread phil jones
Yes. That certainly seems helpful, thanks. So the best way to query something created from your html->xexp function would be to use http://docs.racket-lang.org/sxml/sxpath.html rather than xml/path? many thanks again. regards Phil On 8 March 2016 at 20:42, Neil Van Dyke

Re: [racket-users] html->xexp and parsing Stack Overflow

2016-03-08 Thread Neil Van Dyke
Phil, can you let me know whether this new document clears up everything? http://www.neilvandyke.org/racket/sxml-intro/ Neil V. -- 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,

[racket-users] html->xexp and parsing Stack Overflow

2016-03-08 Thread phil jones
Hi everyone, I'm trying to write a little program to extract some data from a web-page. But when I hit Stack Overflow with it, I'm getting some strange errors (I documented them here : http://stackoverflow.com/questions/35879617/some-xexpressions-in-racket-dont-pass-xexpr ) Now I stumbled

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

2016-03-08 Thread Robby Findler
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. So you would need to pass no "expected" arguments to test-->> in order for the test case to pass. Robby #lang racket (require

[racket-users] Re: Implicit "self" place channel

2016-03-08 Thread Brian Adkins
On Tuesday, March 8, 2016 at 5:10:45 PM UTC-5, Brian Adkins wrote: > I'm toying around with porting a small Elixir program to Racket. The > following gist has both programs: > > https://gist.github.com/lojic/66c00514dab54b84c56e > > One thing that's quite awkward in my Racket version is the

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

2016-03-08 Thread WarGrey Gyoudmon Ju
Hi, Brina. This is my README of how I use RackUnit in my project. http://gyoudmon.org/~wargrey:wisemon/readme_rkt.html#%28elem._%28chunk._~3ctestsuite~3a._building._the._baby._digimon~3e~3a1%29%29 (test-suite

[racket-users] Implicit "self" place channel

2016-03-08 Thread Brian Adkins
I'm toying around with porting a small Elixir program to Racket. The following gist has both programs: https://gist.github.com/lojic/66c00514dab54b84c56e One thing that's quite awkward in my Racket version is the need for the extra place channels (ch1, ch2). So, for example, the size

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

2016-03-08 Thread Brian Adkins
Not exactly. I'm looking for a way to run a function before *each*, of possibly many, test-cases. The test-suite #:before only runs once before running all the test-cases. Although my gist: https://gist.github.com/lojic/db7016fb95b1c05e4ade only has a few test-cases, if there were many, the

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

2016-03-08 Thread Matthias Felleisen
Are you looking for something like this: #lang racket (require rackunit rackunit/text-ui) (define my-database #f) (define my-first-test-suite (test-suite "An example suite" #:before (lambda () (set! my-database '(a b c)) (displayln `(Before ,my-database))) #:after (lambda ()

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

2016-03-08 Thread Robby Findler
One reason to want that kind of functionality is to maintain good source location information on test failures (which helper functions don't). Robby On Tuesday, March 8, 2016, Brian Adkins wrote: > Jay: > > Here's a gist:

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

2016-03-08 Thread Brian Adkins
Jay: Here's a gist: https://gist.github.com/lojic/db7016fb95b1c05e4ade without.rkt is how I coded it up and with.rkt is how I'd like to be able to code it. I agree that it's trivial to add, but for something as common as "setup" and "teardown" for unit testing, there may be an advantage to

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

2016-03-08 Thread Anton Podkopaev
Dear colleagues, I'm working on a semantics using Redex. I've got a strange message from "test-->>" function --- "got nothing". It is strange, because a term, which I run "test-->>" on, definitely can be reduced. For example, I can see lots of its productions in "traces" or "stepper". My

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

2016-03-08 Thread Jay McCarthy
Hi Brian, Can you explain what you want to write? Just imagine that the feature was already there... what do you want? I think of Rackunit as a way of writing checks, so if I wanted to do what you're talking about, then I'd define the macro/function that you don't want to. In other words, with

[racket-users] Setup/teardown for unit testing

2016-03-08 Thread Brian Adkins
Does RackUnit provide a facility similar to the setup & teardown functions of other unit testing frameworks? In other words, I'd like to execute some code before each test w/o coding each test to call a setup function or having to create my own macro given how common this is. As far as I can

Re: [racket-users] DrR: meta-q just worked!

2016-03-08 Thread Robby Findler
On Sat, Mar 5, 2016 at 8:14 AM, Jens Axel Søgaard wrote: > Is there a way to set the paragraph width to 80 (it seems to be set to 60)? I've added support for that (a new preference is in the drracket preferences dialog). I'm still hopeful that someone else will look into