
are there macro forms of IO that don’t take thunks? (iow, use expr ...
) just feels klunky

also, I’m trying to do @mflatt’s suggestion of using input-port-append
to prepend a #lang
line … Will location info be for the concatenation or for each port being used? IE, will error info be off-by-one?

Hrm… actually:
UNKNOWN::0: read: #lang not enabled in the current context

… that must be from C? I can’t find it in the racket source

@zenspider #lang not enabled in the current context
usually means you want with-module-reading-parameterization

looking… I used (read-accept-reader #t)
and feel like I’m going down a rabbit hole

same rabbit hole:
dynamic-require: name is not provided
name: 'read
module: #<resolved-module-path:(submod "/Users/ryan/Work/git/zenspider/schemers/br/basic/main.rkt" reader)>
the only dynamic-require I use anywhere is for the colorer, which shouldn’t be invoked at this point

also, syntax/modred
vs syntax/module-reader
? :confused:

ok. Stole some code from https://github.com/AlexKnauth/postfix-dot-notation/blob/master/postfix-dot-notation/lang/reader.rkt and have it reading in correctly. Don’t understand why read
is the wrong approach but read-syntax
works just fine

can somebody help me with this last bit? I clearly don’t understand something in the glue of racket’s #lang
handling:
https://gist.github.com/6c4e50cdea9925f706ac1ff0019e3105
outputs:
code:
(module basic-mod basic/expander
(b-program
(b-line ...lots of stuff...)))
define:
run:
dynamic-require: unknown module
module name: #<resolved-module-path:'basic-mod>
context...:
/Users/ryan/Work/git/zenspider/schemers/br/basic/basic: [running body]

The module is declared in ns
, but ns
isn’t the current namespace when dynamic-require
looks for a module.

but if I declare the module in current-namespace then it blows up because module
and #%app
aren’t defined

I recommend using dynamic-wind
with ns
: (parameterize ([current-namespace ns])
(dynamic-require ''basic-mod #f))

and not using make-resolved-module-path
?

that was it…

how could I have figured that out??

@zenspider what led you to use make-resolved-module-path
originally? was that described in Beautiful Racket?

Using woot
in place of ''basic-mod
(uncommenting out the two earlier lines that set it up) is a fine idea. Usually the goal is to use a path instead of a symbol, though.

@samth I think I earlier recommended using current-module-declare-name
, which needs a resolved module path

wow! Process Racket REPL abort trap: 6
go me!

should my reader be doing a gensym for the module name? If I add multiple basic files on the cmdline the second one blows up because it’s the same name

@mflatt thank you… that was 2 hours in the making and I wouldn’t have come up with that diagnosis or that 2 line block of code

is there a way to tell that I’m running in the repl vs not?

right now I’m testing (current-command-line-arguments)
being empty, but that isn’t right

The REPL wraps forms in #%top-interaction
, so you could customize that form to set a parameter that you inspect

@notjack … idgi… how would it know that it is in the repl? by being used? that implies I won’t know until it’s eval’d something and displayed it?

Racket wraps all REPL expressions in #%top-interaction
for you. So you define your lang’s #%top-interaction
to be a macro that sets a parameter like (current-eval-is-repl?)
to true, then you can dynamically do something different in the repl.

The #lang racket
language doesn’t do this so it would only work in a custom language where you redefined #%top-interaction

ok. make-resolved-module-path
with gensym
seems to be a happy combo

here’s my latest version: https://gist.github.com/zenspider/6c4e50cdea9925f706ac1ff0019e3105

I’m now trying to take it one step further and get it so I can shebang the basic files and run them directly

@notjack can I suggest that you do development on your fork, rather than in racket/rackunit
?

I ask mostly because commits to racket/rackunit
send a bunch of people mail

@samth is it possible to change the mail settings? working on the fork is slightly irritating

Sadly there’s no option to only send mail for master

is it github mail or travis mail?

it’s github mail

@notjack I think if you worked in a branch it wouldn’t send email

@zenspider that’s not correct, sadly — @notjack is working on a branch

I am working in branches - checking https://help.github.com/articles/about-notification-emails/ for more details

at least… that’s how we work on some of our projects and we don’t get inundated by my crazy commit storms

@notjack it’s a hook, that sends mail to a mailing list

it’s not notification email

ohhh, so it’s not coming directly from github?

wait what list

github has an “email” service, and that’s set up to email <mailto:committers@racket-lang.org\|committers@racket-lang.org>
which is basically all the people who got email before we moved the canonical repo to github

ah. gotcha


perhaps we should just get rid of it, but for the moment it’s easier to just keep it

@notjack yes

final version… https://gist.github.com/zenspider/6c4e50cdea9925f706ac1ff0019e3105 … is something like run-with-lang
of general use?

@samth I’ll work on the fork, sorry about the noise

@notjack thanks

shame it can’t distinguish master from non-master though

This is in reality not a great system since it’s really reliant on the not-true idea that there’s a general “committers” set for all of Racket

was it created pre-package-split?

no it was created to emulate the old behavior when we split the old repository

because the old repo of course had a single set of committers

gotcha

@samth the incomplete PRs I’ve got open already would be difficult to move, is it alright if I just do new dev on the fork?

yes that’s certainly fine