Change the first few lines of lang/reader.rkt to:

#lang s-exp syntax/module-reader
bf/language
#:read my-read
#:read-syntax my-read-syntax
;; ...

And just install the entire directory as a package using raco pkg
install. This could take a while. If you want to make it faster, just
skip building the examples by adding (define compile-omit-paths
'("examples")) line to info.rkt before installing it:

$ pwd
<SOMEHWERE>/bf

$ git diff info.rkt
diff --git a/info.rkt b/info.rkt
index 5b4c3c1..4d681b9 100644
--- a/info.rkt
+++ b/info.rkt
@@ -10,4 +10,5 @@
 (define blurb
   '("bf: a brainf*ck compiler for Racket.  Includes a tutorial for
building a language in Racket."))
 (define release-notes
-  '((p "Final? release.")))
\ No newline at end of file
+  '((p "Final? release.")))
+(define compile-omit-paths '("examples"))

$ raco pkg install
Linking current directory as a package
raco setup: version: 7.0.0.8
...
raco setup: 2 rendering: <pkgs>/racket-index/scribblings/main/search.scrbl
raco setup: --- installing collections ---
raco setup: --- post-installing collections ---
$

I'm still getting application error after that, but I'm not sure what
went wrong.


On Thu, Aug 9, 2018 at 3:08 PM, Zeta Convex <zeta.con...@gmail.com> wrote:
> I'm following the example from "F*dging up a Racket" at
>
> https://www.hashcollision.org/brainfudge/index.html
>
> I set up a project within ~/.racket/6.12/collects:
>
> .
> ├── bf
> │   ├── hello2.rkt
> │   ├── hello.rkt
> │   ├── lang
> │   │   └── reader.rkt
> │   ├── language.rkt
> │   ├── parser.rkt
> │   └── semantics.rkt
>
>
> I don't have a planet account, so I'm jiggling with the code.
>
> Should I be setting up new collections directly under
> ~/.racket/6.12/collects (because that's what I've done)?
>
> I've got the file reader.rkt as follows:
>
> #lang s-exp syntax/module-reader
> (require "../language.rkt")
> #:read my-read
> #:read-syntax my-read-syntax
>
> (require "../parser.rkt")
>
>
> (define (my-read in)
>   (syntax->datum (my-read-syntax #f in)))
>
> (define (my-read-syntax src in)
>   (parse-expr src in))
>
>
> The file hello2.rkt contains:
>
> #lang bf
> ++++++[>++++++++++++<-]>.
>>++++++++++[>++++++++++<-]>+.
> +++++++..+++.>++++[>+++++++++++<-]>.
> <+++[>----<-]>.<<<<<+++[>+++++<-]>.
>>>.+++.------.--------.>>+.
>
> When I try to run this file, I get the error message:
>
> module: initial import is not a well-formed module path in: (require
> "../language.rkt")
> Module Language: invalid language specification in: (require
> "../language.rkt")
>
> If I comment out reader.rkt:(require "../language.rkt") I get the message:
>
> syntax/module-reader: must specify either a module language, or #:language
>
> So I guess I need to specify a module language, but I don't know how to do
> that.
>
>
>
> --
> 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, send an
> email to racket-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to