

@jimmysnielsen has joined the channel


am I missing something obvious — why does TR insist that my default value for hash-ref
be #f
or a thunk?

@pnwamk because it’s hard to give another less-specific type

you could give a type that’s (U Boolean String Number Symbol Input-Port)
or something like that

I don’t follow

so, this wouldn’t work? (All (K V D) (-> (HashTable K V) K D (U V D)))

Because if I instantiate D with (-> String)
then it doesn’t ever return that, and does potentially return String

ugh — well I don’t want to wrap my symbol in a thunk! =p

we could change the #f
case to use an intersection type bounded by some big union

with a negation type we could express it, right?

one case for not a procedure, one for a procedure?

yes

all the better!

@samth Thanks! It’s interesting to see other people approaching the same problem. I couldn’t find many before I started rash, but in the last month I’ve found several projects that are to some degree trying to do something similar.


By a high schooler I know.

> In Ergonomica, as with similar functional programming languages, the only statement in the language is the if/elif/else
statement. Then, immediately, the next section title: > with
statement what

documentation is hard.

@notjack can you add instructions on how to run your code?

@stamourv Thanks also. I’ve seen that one before.

Actually the coolest shell project I’ve found (other than Rash, of course….) is Xonsh. It is a python-superset shell that is actually fairly stable and usable. I’m not sure how I didn’t find it before I started Rash.

yes, though I might not have time until later this week

I’ll make sure to add them before merging

Is there just some simple call to docker-compose
?

docker-compose build
== download and run all installers, producing images with racket successfully installed

docker-compose up
== run all tests, exit 0 on all successful exit nonzero on fail or error (including OOMEs)

docker-compose run <service-in-docker-compose.yml>
== run that service, exiting with 0 on success or 1 on failure

every “foo-test” service in the compose yml runs the same test.sh
script - different test services just run using different base images (and thus different installers)

ex: docker-compose run racket-x86-minimal-test
will run the tests in a container whose racket
and raco
binaries were installed by building the racket-x86-minimal
image

seems like I need to install non-packaged versions of docker and docker-compose

xonsh always did look interesting

You need a recent version of docker installed. Docker for Mac and Docker for Windows are the current best ways to get docker onto those systems

Yeah, I use linux, but that doesn’t mean I get a .deb for docker-compose

:disappointed:

also, what’s the best way to try another test without re-running all the previous tests?

I think there’s a Docker for Linux thing. Installing packages might not be the recommended way to do stuff

yeah, turns out there’s a docker-provided .deb for docker itself, but not for compose

I have it all running now, though

You can use docker-compose run <service> <command>
to override the command that would normally be run

So I think docker-compose run racket-x86-test raco test -p some-package
would do what you want, for example

That runs just those tests instead of running the test.sh
script from the CMD instruction

ok great

this is all very nice, thanks a ton!

Glad to help, I love this sort of stuff :)

@mflatt @jeapostrophe Are raco test -l
and racket -l
intentionally setting current-load-relative-directory
differently?

To see the difference, try raco test -l tests/htdp-lang/test-htdp
and the same with racket -l
(the latter will fail with an unknown path)

By the way, would you happen to know why the db tests consume over a gigabyte of memory?

no, I was going to look into that

Unlike racket
, raco test
sets the current directory to the file’s directory for testing, as documented. I don’t think either will have current-load-relative-directory
set after the module declaration is loaded. Probably the directory-changing behavior in raco test
should have been specific to the --drdr
flag, though, since it seems to have been added as part of the --drdr
addition.

@mflatt thanks, I had missed that in the docs

@tianjun.cpp has joined the channel