Thanks everyone for the perspectives and techniques you've offered so far.
I've found a flaw in my gensym technique, even at the command line. If I
run "raco make badlang.rkt", "raco make badlibrary.rkt", and "raco make
client.rkt", the last command has an error. That's because the gensym is
If anyone else here is looking for it, the first release of my Gradescope
autograding support for Racket is here:
https://github.com/shriram/gradescope-racket
It's still a work in progress but sufficient to get off the ground (e.g.,
if I fix nothing it'll still get me through my summer needs).
At Sat, 23 May 2020 18:51:23 +0200, Dominik Pantůček wrote:
> But that is just where the issue is showing up. The real question is how
> the counter gets decremented twice (given that fsemaphores should be
> futures-safe).
I found a configuration that triggered the bug often enough on my
machine.
As I mentioned in my previous post, the "unit" that can succeed or fail is
the "test case", and this will work:
#lang racket
(require rackunit)
(define-test-suite hw
(test-case "one" (check-equal? 1 1))
(test-case "two" (check-equal? 1 (/ 1 0)))
(test-case "three" (check-equal? 1 2)))
On Saturday, May 23, 2020 at 10:25:07 PM UTC+8, sk wrote:
>
> Thank you, Alex, this seems to have just the right set of information. I'm
> curious why you use `foldts-test-suite` instead of `fold-test-results`,
> whose documentation says "Hence it should be used in preference to
>
On Sat, May 23, 2020 at 5:04 PM Simon Schlee wrote:
> I also would find it interesting to have something functor like, in the
> sense of being able to create parameterized module instances.
> My guess is that constructs like that are difficult to optimize and the
> separation between runtime and
On 5/22/2020 11:11 PM, rocketnia wrote:
I've been thinking about making libraries that would generate
submodules when they're used. However, submodules exist in a flat
namespace, I'm a bit afraid of conflicts if I choose the same name as
some other library does, and I don't really want users
I think pollen uses racket's compiled directories to store some of its own
cached/generated code, maybe a similar technique could be helpful for you.
Do you want to create submodules for arbitrary modules or only for modules
using a certain library or language?
When its the latter I think its a
On 23. 05. 20 19:24, Matthew Flatt wrote:
> I'm not sure this is the problem that you're seeing, but I see a
> problem with the example. It boils down to the fact that futures do not
> provide concurrency.
>
> That may sound like a surprising claim, because the whole point of
> futures is to
I'm not sure this is the problem that you're seeing, but I see a
problem with the example. It boils down to the fact that futures do not
provide concurrency.
That may sound like a surprising claim, because the whole point of
futures is to run multiple things at a time. But futures merely offer
Hello again with futures!
I started working on futures-based workers and got quickly stuck with a
dead-lock I think does not originate in my code (although it is two
semaphores, 8 futures, so I'll refrain from strong opinions here).
I implemented a very simple futures-friendly queue using
I'll try with 3m. I am a bit skeptical here - as the resulting
program.exe is about 150M when properly build and apparently has to
include a lots of native DLLs. But reading the documentation (again)
makes me think that generally it should work.
Technically the byte-code should be
Thinking about this a little more, I don't think all the pieces are in
place for CS. At least, I don't remember setting up all the pieces...
The extra piece needed for Racket CS is a Chez Scheme cross-compiler
that runs on Linux but produces machine code for Windows. That can be
done --- and it
Have you already tried using `raco exe` on Linux (i.e., using Racket
for Linux) but generating Windows executables?
https://docs.racket-lang.org/raco/cross-system.html
Note that the "tarball" distributions at places like
https://download.racket-lang.org/releases/7.7/
can be handy for
Thanks to a helpful reply from Matthias I came across this posting
https://github.com/racket/rackunit/pull/107#issuecomment-480808330
which pointed out "The *test* forms are the things that wrap evaluation,
catch errors and continue, etc."
If I rewrite the above as
(define-test-suite hw
Hello Racketeers,
although I am developing Racket applications on Linux, our customers are
usually running Windows. The good thing about Racket (and racket/gui
especially) is that it requires virtually no OS-specific code for many -
even non-trivial - tasks. However it is not that straightforward
The documentation
https://docs.racket-lang.org/rackunit/internals.html?q=run-test-case#%28def._%28%28lib._rackunit%2Fmain..rkt%29._foldts-test-suite%29%29
says that `folds-test-suite` can be implemented in terms of
`fold-test-results` as follows:
(define
Sorry to be thinking out loud here…
I thought the reason Alex might be using `foldts-test-suite` instead of
`fold-test-results` is because the latter automatically runs each test but
the former leaves that in programmatic control. I thought this would enable
me to catch exceptions, thus (using
For those reading this later: there's a bunch of useful information in Alex
Harsanyi's blog post and corresponding code:
https://alex-hhh.github.io/2019/11/custom-rackunit-test-runner.html
https://github.com/alex-hhh/ActivityLog2/blob/master/test/custom-test-runner.rkt
Shriram
--
You received
Thank you, Alex, this seems to have just the right set of information. I'm
curious why you use `foldts-test-suite` instead of `fold-test-results`,
whose documentation says "Hence it should be used in preference to
foldts-test-suite
> On May 23, 2020, at 08:53, Shriram Krishnamurthi wrote:
>
> Alex, thanks for that information. I'm going to go investigate that next.
Related to that, I just remembered the existence of rackunit/text-ui and
rackunit/gui, which implement two different reporters for RackUnit test
Thank you all!
*Alexis*, thanks for the explanation.
*Alex*, thanks for that information. I'm going to go investigate that next.
*Dave*, the documentation style is fine, it's sometimes easier to read the
doc right next to the implementation. (-:
However, I'm not quite sure how even your
> On May 22, 2020, at 18:47, Shriram Krishnamurthi wrote:
>
> As an aside, I'm not entirely sure what `test-log!` is there for. Presumably
> it's to record in the log "tests" run by operations that are not part of
> rackunit? I'm curious how people have used it.
Other people have answered
Hi Shriram,
I have a module, handy/test-more (https://pkgs.racket-lang.org/package/handy),
that I think does everything you want; the downside is that the
documentation is thorough but it's in the form of essay-style comment
sections instead of Scribble. Breaking that out into actual Scribble is
24 matches
Mail list logo