
I’m not sure to whom to write about this, so I’ll just post this here: on the Racket snapshots page (https://www.cs.utah.edu/plt/snapshots/) , shouldn’t it say “ARM64” instead of “ARM6”? The same presumably applies to the in-progress 7.8 download page

Not necessarily, actually. There’s concepts in ARM processors of ARMv6 and ARMv7 (at least), where the instruction sets aren’t compatible - i.e. they’re different compilation targets. Whether that is relevant here or not, I’m not sure.

(I might have the slightly wrong - I find the myriad ARM variants a bit confusing myself)

or is that really ARM6? (I’m looking for the AArch64 snapshots. Perhaps I’m misreading things; maybe AArch64 isn’t yet available as a snapshot, and “ARM6” really is, well, “ARM6”.)

@jcoo092 that’s for sure!

(sorry for the huge delay in my messages — I had closed my laptop lid while connected to a really bad network…)

Honestly, I’m not sure precisely which ARM version it is targeted towards. So far, I haven’t tried to poke my nose into that area with Racket. Hopefully someone who knows what they’re talking about (unlike me) comes along soon and gives a definitive answer.

Either way, :+1::skin-tone–2: for trying to point out a possible error

@racket741 has joined the channel

maybe Racket is targeting the Apple Newton? Always possible, but would be awfully surprising. (Just to give you an idea of how olde ARM6 is.)

cross-compiling Racket on Raspbian, intended for the Newton

Gotta write software for those PDAs somehow

Adding a “v” to make it “ARMv6" would indeed be a better label. I think it’s v6 because that matches the original (current?) Raspbian configuration, where the Pi 1 has a v6 processor.

Can I suggest just ‘Raspberry Pi OS’ ; • it’s a well known and documented platform so if you are using another ARM-based system you probably already know if it will be compatible. • Raspbian got renamed when it got upgraded and moved to Debian buster in May. • Of course this may change when the 64bit version of Rpi OS comes out of beta.

Yes, when the dust settles on various build changes, I’ll look into updating the Utah snapshot from an ancient Raspbian distribution to a current Raspberry Pi OS.

@mflatt thanks for clarifying

@acorso522 has joined the channel

I’ve had success running Ubuntu 20.04 LTS 64-bit on the Raspberry Pi 4 recently. Don’t think I’ll ever go back to Raspbian.

Feels like a real Linux desktop.

@st8l3ss why did you go s with Ubuntu instead of the 64bit beta? https://www.raspberrypi.org/forums/viewtopic.php?t=275370\|https://www.raspberrypi.org/forums/viewtopic.php?t=275370

because Ubuntu 20.04 is LTS not beta

I do a lot of things in Docker containers

so I pull Docker images and run them on my Pi 4

[SOLVED, but looking for a more elegant and less hacky solution] i want to evaluate a custom language, i’m basing off this <https://groups.google.com/forum/#!topic/racket-users/1NvXO6dpMd4|How to eval a custom language from inside a module? - Google groups> but i don’t understand all of the nuances, i’m going to reply to this thread with the code to show what does work right now, because i can evaluate the custom language but only on the repl of the file where my custom eval is.
the problem is, it cannot open the module the expander is in, because the path gets resolved at runtime. the thread above says something about something similar that but i dont exactly understand how to fix it for my problem

#lang racket
(require racket/runtime-path)
(require "reader.rkt" "expander.rkt")
(provide eval-str
eval-quoted)
(define-runtime-path expander-path "expander.rkt")
(define-namespace-anchor here)
(define ns (namespace-anchor->namespace here))
(parameterize ([current-namespace ns])
(namespace-attach-module ns expander-path))
(define eval-str
(let ([has-required? #f])
(λ (code-str)
(define code-datum (read (open-input-string code-str)))
(begin0
(parameterize [(current-namespace ns)]
(eval code-datum))
(unless has-required?
(set! has-required? #t)
(parameterize [(current-namespace ns)]
(eval '(require 'tag2-lang-mod))))))))
(define (eval-quoted quoted)
(parameterize [(current-namespace ns)]
(eval quoted)))

Do you have an expander in “expander.rkt”?

yes

ik that is the problem, it’s resolved at runtime

i just dont understand how to fix it the module the codes evaluates to ends up being (module tag2-mod-lang "expander.rkt" ...)

tag2-lang\eval.rkt:22:10: open-input-file: cannot open module file
module path: C:\documents\scripts\racket\eh-searcher\expander.rkt
path: C:\documents\scripts\racket\eh-searcher\expander.rkt
system error: no such file or directory; rkt_err=3

i want to fix it without changing the reader if possible, otherwise i suppose i have to use unquote along with the path resolved already of the expander
EDIT: this doesn’t work, a fully resolved path isn’t recognized as a module path.
EDIT2: also i didnt edit the reader i just modified the eval function (define eval-str
(let ([has-required? #f])
(λ (code-str)
(define code-datum (read (open-input-string code-str)))
(define fixed-code-datum (append (take code-datum 2)
(list (path->string expander-path))
(drop code-datum 3)))
(begin0
(parameterize [(current-namespace ns)]
(eval fixed-code-datum))
(unless has-required?
(set! has-required? #t)
(parameterize [(current-namespace ns)]
(eval '(require 'tag2-lang-mod))))))))

I think I am missing something, but shouldn’t (eval code-datum) be (eval (my-expand code-datum)), where my-expand
is the expander you have defined in “expander.rkt” ?

but the read
function from "parser.rkt"
returns a datum with the form (module tag2-mod-lang "expander.rkt" ...)
so when it gets evaluated it, the expander applies itself to that module body

Okay. So the question in a nutshell is, how to get (eval '(module foo "bar.rkt" ...))
to work?

ok so the way the language is set up is that in expander there is a list called queries

(define-values (add-query! queries)
(let ([queries '()])
(values (λ (query)
(set! queries (list* query queries)))
(λ ()
queries))))
(define (last-query)
(define qs (queries))
(if (empty? qs)
#f
(first qs)))

the unless part in the eval-str is for a dirty trick

once i evaluate the module inside the namespace, i require
it so the codes executes it, only once is needed then i just can evaluate without the require

as i said it works on the repl of the file the eval is in, that is eval.rkt

Instead of:
(parameterize [(current-namespace ns)]
(eval '(require 'tag2-lang-mod))))))
maybe you can use namespace-require
?
(parameterize [(current-namespace ns)]
(namespace-requrie 'tag2-lang-mod))

I am wondering, whether you should try
(define-runtime-path expander-path "expander.rkt")
in the expander, and then use (module tag2-mod-lang <insert expander-path here> ...)

sorry for not answering my internet was down for the former it didn’t work, for the latter already tried it here https://racket.slack.com/archives/C06V96CKX/p1595447337169400?thread_ts=1595446882.168000&cid=C06V96CKX

but i found a solution, although not too elegant and most likely a hack

#lang racket
(require racket/runtime-path)
(require "reader.rkt" "expander.rkt")
(provide eval-str
eval-quoted)
(define-runtime-module-path expander-path "expander.rkt")
(define-runtime-path this-folder ".")
(define-namespace-anchor here)
(define host-ns (namespace-anchor->namespace here))
(define ns (make-base-empty-namespace))
(parameterize ([current-namespace ns])
(namespace-attach-module host-ns expander-path)
(namespace-require 'racket)
(namespace-require expander-path))
(define eval-str
(let ([has-required? #f])
(λ (code-str)
(define code-datum (read (open-input-string code-str)))
(define code code-datum)
(begin0
(parameterize [(current-namespace ns)
(current-directory this-folder)]
(eval code))
(unless has-required?
(set! has-required? #t)
(parameterize [(current-namespace ns)
(current-directory this-folder)]
(eval '(require 'tag2-lang-mod))))
))))
(define (eval-quoted quoted)
(parameterize [(current-namespace ns)
(current-directory this-folder)]
(eval quoted)))

that is the final eval.rkt
, I changed many things so i dont know how all of them combined make it work, but the key for it to work was changing the current-directory
to the one the eval.rkt
belonged to, which is the same as reader.rkt

problem seems, that the namespace is very polluted… it has racket
and expander.rkt
which i believe maybe shouldnt. also while the language i made doesn’t rely on current-directory
i still don’t like it as a solution, since i might make something it uses it in the future… although setting that to another identifier and then passing it could be a workaround for this workaround

i did find a solution https://racket.slack.com/archives/C06V96CKX/p1595446882168000