Re: [racket-users] bf "module: initial import is not a well-formed module path"

2018-08-09 Thread Shu-Hung You
On Thu, Aug 9, 2018 at 3:42 PM, Zeta Convex  wrote:
>
>
> On Thursday, 9 August 2018 21:34:16 UTC+1, Shu-Hung You wrote:
>>
>> 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
>> ;; ...
>>
> Ah yes, that did it! Thanks!
>
>> And just install the entire directory as a package using raco pkg
>> install.
>
>
> I just installed it into my collects directory rather than using raco.
>
> I  typed my stuff in using his tutorial, rather than anything from planet.
>

Just a little clarification: installing the 'bf' directory locally
using the raco command does not involve interacting with the planet
system. All it does is recording the path in the local database and
compile every file in the directory. For example, I have a bunch of
local packages and downloaded packages installed:

$ raco pkg show
Installation-wide:
 Package Checksum  Source
 csv-reading 217c1ee293ee2...  catalog...eading
 custom-load 4e70205c29ab0...  catalog...m-load
 ...
 raco-find-collection00f0d3dbad025...  catalog...ection
 redex   3e069f3c6721e...  clone...th=redex
 rsvgc326fe1567908...  catalog...master
 scribble-abbrevsf207f11814f7e...  catalog...bbrevs
 scribble-math   063604d4a2b38...  catalog...th.git
 slideshow-repl  93246109d2dc4...  catalog...master
 soft-contract link...-contract


>>
>> I'm still getting application error after that, but I'm not sure what
>> went wrong.
>>
>
> Actually, everything is now working fine for me. Thanks for your help.
>
> --
> 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.


Re: [racket-users] bf "module: initial import is not a well-formed module path"

2018-08-09 Thread Zeta Convex


On Thursday, 9 August 2018 21:34:16 UTC+1, Shu-Hung You wrote:
>
> 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 
> ;; ... 
>
> Ah yes, that did it! Thanks!

And just install the entire directory as a package using raco pkg 
> install. 


I just installed it into my collects directory rather than using raco. 

I  typed my stuff in using his tutorial, rather than anything from planet.


> I'm still getting application error after that, but I'm not sure what 
> went wrong. 
>
>
Actually, everything is now working fine for me. Thanks for your help.

-- 
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.


Re: [racket-users] bf "module: initial import is not a well-formed module path"

2018-08-09 Thread Shu-Hung You
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
/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: /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  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.


[racket-users] bf "module: initial import is not a well-formed module path"

2018-08-09 Thread Zeta Convex
 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.