[racket-users] Re: I want to find the width of this image, why it says unbound identifier?

2020-12-05 Thread George Neuner
On Sat, 5 Dec 2020 19:26:30 -0800 (PST), Yi Chen
 wrote:

> #lang slideshow
> (define cat )
> (image-width (cat))

There is no function "image-width" in slideshow.  

see: https://docs.racket-lang.org/search/index.html?q=image-width
To use "image-width" you must require one of these library modules:
 - htdp/image
 - 2htdp/image
 - quadwriter


Additionally your syntax is wrong: it should be "(image-width cat)".
With the parentheses, "(cat)" is a call of a function named "cat" -
however "cat" is not a function but simply an image.

Hope this helps,
George

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/va2psf5vv4ilbd52ihgrmo8dojoosuglkf%404ax.com.


Re: [racket-users] Big Sur and M1 build, *nix compiling

2020-12-05 Thread Matthew Flatt
Racket now builds and runs on M1 Macs using a Git repo checkout. If all
goes well, snapshots will appear tomorrow at the Utah snapshot site
linked at

 https://snapshot.racket-lang.org/

Meanwhile, I've uploaded an image here (link will last a few days):

https://www.cs.utah.edu/plt/snapshots/20201205-10ea287/installers/racket-7.9.0.10-aarch64-macosx-cs.dmg


Yes, the M1 MacBook Pro is pretty fast --- about x1.5 as fast as a 2018
i7 MacBook Pro for tasks that aren't primarily about loading files:

   i7   M1
  racket -n   0.08s0.07s
  racket -l racket0.27s0.25s
  racket -cl racket/base  2.50s1.60s
  shootout mandelbrot.rkt 1.40s0.94s
  racket -l drracket ... -e '(exit)'  4.42s2.79s
  make base in fresh Git clone[1]  7m02s5m02s
  raco setup[2]   21m08s   14m48s

[1] After `make pb-fetch` to avoid network time
[2] After `make`, `raco setup --clean`, and `rm -r racket/docs`

Since we had an AArch64 backend for Chez Scheme, porting Racket CS was
mostly straightforward. Racket BS also works, but there's no AArch64
JIT in BC, so it can be slow. Some work was needed to conform to W^X
requirements (i.e., can't make memory both executable and writable at
the same time), but unlike other W^X environments that I've tried to
use, the OS provides good support for code-generating programs.
Building third-party libraries like Cairo went better than expected. I
spent most of my porting time and effort being confused about aspects
of code signing, but it seems reasonable enough in the end.

Matthew

At Tue, 1 Dec 2020 20:51:46 -0700, Matthew Flatt wrote:
> There is some information here:
> 
>  https://github.com/racket/racket/issues/3513
> 
> Mostly, though, it's "stay tuned" for at least a few more days.
> 
> 
> At Tue, 1 Dec 2020 16:11:18 -0800 (PST), Tom Sturgeon wrote:
> > 
> > 
> > Racket 7.9 seg faults when starting DrRacket for the built versions.
> > 
> > The operating system is macos Big Sur on the Apple M1.
> > 
> > I tried downloading the source and rebuilding, but I get an error during 
> > the make phase.
> > 
> > Library/Developer/CommandLineTools/usr/bin/make cstartup_./racketcgc -cu 
> > ./src/startup-select.rkt echo "Bad startup choice, probably an error 
> > running startup-select.rkt" Bad startup choice, probably an error running 
> > startup-select.rkt exit 1
> 
> -- 
> 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.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/racket-users/20201201205146.2f5%40sirmail.smtp
> s.cs.utah.edu.

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/20201205124642.190%40sirmail.smtps.cs.utah.edu.