Re: [racket-users] Apple Silicon build errors

2022-01-17 Thread Matthew Flatt
This is a problem with v8.3 and the latest Apple tools. It's fixed for the upcoming v8.4 release (so, in the main branch and in the current snapshot source distributions). In case you want a minimal patch, commit 0a8b68b286 is the repair and might apply cleanly to v8.3. At Mon, 17 Jan 2022

Re: [racket-users] Porting embedded app from BC to CS

2021-12-20 Thread Matthew Flatt
At Mon, 20 Dec 2021 11:57:29 -0800 (PST), "thomas_d...@alumni.brown.edu" wrote: > So what happens from the perspective of embedding C code if an exception > occurs in Racket code it calls? It's not defined. In certain cases, control will escape from the C code, I think, but it depends on how the

Re: [racket-users] Porting embedded app from BC to CS

2021-12-20 Thread Matthew Flatt
At Fri, 5 Nov 2021 08:58:06 -0700 (PDT), "thomas_d...@alumni.brown.edu" wrote: > - What are the preconditions and error-handling setup for calling > `racket_dynamic_require` and/or other `racket_*` functions? There's not really anything you can do to catch exception C-side right now. If you

Re: [racket-users] Core Team: I need you decide what I should do about the spammer.

2021-12-18 Thread Matthew Flatt
The "members" option sounds right to me. Thanks for tracking down a way to improve the situation! At Sat, 18 Dec 2021 19:35:23 +, Sage Gerard wrote: > Core team, > > Sam asked me to issue bans for a troublesome spammer. I've done so, even > just today. I understand I need quorum for larger

Re: [racket-users] How to require untrusted module?

2021-10-23 Thread Matthew Flatt
> Is it possible to safely load untrusted module with dynamic-require? > > пятница, 22 октября 2021 г. в 22:59:57 UTC+5, Robby Findler: > > > On Fri, Oct 22, 2021 at 12:43 PM Matthew Flatt wrote: > > > >> At Thu, 21 Oct 2021 07:37:12 -0700 (PDT), "kalime..

Re: [racket-users] M1 Mac exe SSL error

2021-10-22 Thread Matthew Flatt
At Fri, 22 Oct 2021 17:24:30 -0400, Mike Engelhart wrote: > I wanted to build a binary to send to a colleague to test it (who > isn't a programmer and doesn't have Racket installed) but when I > build it on my intel Macbook Pro and then send it to my M1 iMac That should work. I tried this small

Re: [racket-users] How to require untrusted module?

2021-10-22 Thread Matthew Flatt
At Thu, 21 Oct 2021 07:37:12 -0700 (PDT), "kalime...@gmail.com" wrote: > I've read about protect-out and current-code-inspector, but I still cannot > understand, how to require a module and forbid it to run protected modules. > > Something like (require untrusted-foo) (foo-proc) but to forbid

Re: [racket-users] Having trouble getting documentation to generate

2021-10-08 Thread Matthew Flatt
-lang.org/package/pprint-compact > https://pkgs.racket-lang.org/package/codepoint > https://pkgs.racket-lang.org/package/fmt > https://pkgs.racket-lang.org/package/pareto-frontier > https://pkgs.racket-lang.org/package/majordomo2 > > > > > On Wed, Sep 29, 202

Re: [racket-users] Having trouble getting documentation to generate

2021-09-29 Thread Matthew Flatt
At Wed, 29 Sep 2021 11:20:47 -0400, David Storrs wrote: > On Wed, Sep 29, 2021 at 9:57 AM Matthew Flatt wrote: > > > At Wed, 29 Sep 2021 02:27:53 +, Philip McGrath wrote: > > > I haven't tried `raco setup` to look at its output, but one possible > > > improvem

Re: [racket-users] Having trouble getting documentation to generate

2021-09-29 Thread Matthew Flatt
At Wed, 29 Sep 2021 02:27:53 +, Philip McGrath wrote: > I haven't tried `raco setup` to look at its output, but one possible > improvement would be for whatever code complains about the "invalid `deps' > specification" to always report the invalid file's path. I've pushed that addition. --

[racket-users] Rhombus brainstorming discussion

2021-09-20 Thread Matthew Flatt
For anyone interested in Rhombus, I'd like to make sure you're aware that we recently turned on the discussions feature at the GitHub repo: https://github.com/racket/rhombus-brainstorming/discussions More generally, we've accumulated a large number of ideas and wishes at that repo, mostly in

Re: [racket-users] Re: jest...@gmail.com Trouble installing DrRacket

2021-09-14 Thread Matthew Flatt
At Tue, 14 Sep 2021 01:54:44 -0400, George Neuner wrote: > Is there a list somewhere of which chips have successfully run Racket? > Or a definitive statement of what ISA is targeted? For Racket CS, there's a list here: https://github.com/racket/racket/tree/master/racket/src/ChezScheme Granted,

Re: [racket-users] Re: jest...@gmail.com Trouble installing DrRacket

2021-09-13 Thread Matthew Flatt
Just to clarify: Racket runs on a number of ARM variants when running Linux and other Unix-like operating systems, but we have not yet ported to Windows on ARM. Matthew At Mon, 13 Sep 2021 11:21:57 -0700 (PDT), Nathan Philippon wrote: > I think you're right, thanks. > > On Monday, September 13,

Re: [racket-users] 'compiled' binary still depending on libs?

2021-08-30 Thread Matthew Flatt
Some libraries have extra run-time files that they refer to with `define-runtime-path` and similar. I think "gregor" is in that category, where it needs files like "timezone.xml". Embedding DLLs can't embed those extra files. The intent is that you use `raco distribute` to package an executable

Re: [racket-users] Obtaining the path of the application program?

2021-08-26 Thread Matthew Flatt
The analog to the first argument to main in C is (find-system-path 'run-file) I think that's probably what you want. Something closer to `get-current-source` but adapting to a run-time file is (variable-reference->module-source (#%variable-reference)) Here, `(#%variable-reference)` is

Re: [racket-users] Re: Re-entrant parameterize modification isolation when using shift/reset

2021-07-31 Thread Matthew Flatt
At Fri, 30 Jul 2021 12:56:37 -0700 (PDT), Greg Rosenblatt wrote: > Is the `parameter * thread * parameterization -> box` part implemented as > something like a global weak-hash, or is it built directly into the stack > representation? A parameter holds a key and a thread cell, where the thread

Re: [racket-users] Re: Re-entrant parameterize modification isolation when using shift/reset

2021-07-30 Thread Matthew Flatt
At Sun, 25 Jul 2021 10:35:00 -0700 (PDT), Greg Rosenblatt wrote: > I was surprised that subsequent re-entries can observe modifications from > the earlier ones, since my mental model of dynamic parameters was that > their values were retrieved from a fresh dynamic calling context, whose >

Re: [racket-users] The history of hygiene for definition contexts

2021-07-28 Thread Matthew Flatt
At Wed, 28 Jul 2021 02:31:12 -0500, Alexis King wrote: > So, my question: when was hygiene for internal definitions first worked > out, and did it make it into any papers, specifications, or documentation? > Hopefully someone (probably Matthew) can provide some insight. As far as I know, "Macros

Re: [racket-users] Can I get the behavior of `overment` followed by `augride` with a single class?

2021-07-19 Thread Matthew Flatt
I agree that this doesn't look possible within a single class, but I don't see any problem with the pattern (aside from being awkward to write). As far as I can tell, it would make sense for `class` to support new a case that fuses your `overment` plus `augride` steps. Internally, that would

Re: [racket-users] build error on the package server for a package whose source is a simple URL (not a Git repo)

2021-07-01 Thread Matthew Flatt
The checksum doesn't go in an "info.rkt" file, but in a "download.tar.gz.CHECKSUM" file. More info is here: https://docs.racket-lang.org/pkg/Package_Concepts.html#%28part._concept~3asource%29 Hope that helps, Matthew At Thu, 1 Jul 2021 13:14:36 -0700 (PDT), "je...@lisp.sh" wrote: > I'm not

Re: [racket-users] Speeding up the conversion of flvectors to string

2021-06-27 Thread Matthew Flatt
At Sun, 27 Jun 2021 21:36:09 +0300, Bogdan Popa wrote: > While I think the complexity piece is important, I feel like it's worth > pointing out just how much more expensive the allocation -- and its > ramifications, like the resulting GC pressure and CPU cache misses -- is > than one might think.

Re: [racket-users] Tilde expansion requirement breaks XDG compliance

2021-06-25 Thread Matthew Flatt
Thanks! I've pushed a change based on your explanation. I was able to confirm that it made the `XDG_CONFIG_HOME` environment take effect when it previously did not, at least. At Fri, 25 Jun 2021 15:44:53 -0700 (PDT), pastel raschke wrote: > Racket seems to insist on using ~/.racket as its special

Re: [racket-users] invalid memory error from parameter with contracted guard

2021-06-24 Thread Matthew Flatt
hu, 24 Jun 2021 09:55:39 -0400, David Storrs wrote: > Great! You're the best, Matt. What was the issue, if it's simple enough to > explain? > > On Wed, Jun 23, 2021, 11:53 PM Matthew Flatt wrote: > > > Hi David, > > > > Thanks for the report! This is fixed

Re: [racket-users] invalid memory error from parameter with contracted guard

2021-06-23 Thread Matthew Flatt
Hi David, Thanks for the report! This is fixed for the next release and in the current snapshots. The repair was commit cb959879de21406571fb0127ded88c54e171c0eb See also https://github.com/racket/racket/issues/3865 Matthew At Wed, 23 Jun 2021 22:30:53 -0400, David Storrs wrote: > I'm

Re: [racket-users] Why would writing to a pipe fail?

2021-06-22 Thread Matthew Flatt
At Fri, 18 Jun 2021 05:29:14 -0400, George Neuner wrote: > My point was that the docs for write-bytes-avail et al specifically > mention "flush" of data, and in a way that implies (to me) that there is > expected to be something else underlying the buffer to "flush" to, e.g., > storage media,

Re: [racket-users] Why would writing to a pipe fail?

2021-06-17 Thread Matthew Flatt
At Wed, 16 Jun 2021 17:33:56 -0400, George Neuner wrote: > On 6/16/2021 3:45 PM, Matthew Flatt wrote: > > At Wed, 16 Jun 2021 14:25:40 -0400, George Neuner wrote: > > > It looks like the problem > > > is that "flush" is not defined ... > > > > Yes

Re: [racket-users] Why would writing to a pipe fail?

2021-06-16 Thread Matthew Flatt
At Wed, 16 Jun 2021 14:25:40 -0400, George Neuner wrote: > It looks like the problem > is that "flush" is not defined ... Yes, "returns without blocking after writing as many bytes as it can immediately flush" is vague, and more or less intentionally so. The intent it really "writes as much as

Re: [racket-users] Racket v8.1 [cs] -- Memory leaks with IDE in Win10

2021-06-15 Thread Matthew Flatt
Hi, and thanks for the report! That sounds like a bug that has been fixed for the next release, especially if you opened any HTML page (such as documentation) from DrRacket. For more information on a previous report and the repair: https://github.com/racket/racket/issues/3832 Snapshot

Re: [racket-users] Re: config.rktd

2021-06-06 Thread Matthew Flatt
At Fri, 4 Jun 2021 14:29:29 -0700 (PDT), Don Green wrote: > Now that I have learned of: config.rktd, > I think I'd rather use it, if it can be used to set > current-library-collection paths. > Should I just add to the config.rktd hash list: > (current-library-collection paths . > '(# > # #))

Re: [racket-users] This v 8.1 collection path looks incorrect...

2021-06-06 Thread Matthew Flatt
At Fri, 4 Jun 2021 14:46:00 -0700 (PDT), Don Green wrote: > > (current-library-collection-paths) > '(# > # #) > > I suspect the above is incorrect because I think the 8.1 path should be to > dir: /pkgs rather than /collects. Like this: > # Just to clarify, "collects" is as intended there.

Re: [racket-users] Regarding collections ...

2021-06-06 Thread Matthew Flatt
At Fri, 4 Jun 2021 14:15:11 -0700 (PDT), Don Green wrote: > Sounds like ideally I should begin creating my own pkg(s) that are > outside a collection path, and link it by specifying a > current-library-collection-links parameter. Yes, you should use packages. You normally shouldn't need to set

Re: [racket-users] Regarding collections ...

2021-06-04 Thread Matthew Flatt
At Thu, 3 Jun 2021 20:26:59 -0700 (PDT), Don Green wrote: > Using DrRacket in linux: > When I run DrRacket from a terminal, > > (current-library-collection-paths) returns the expected paths, 3 of them. > > However, when I open one of my .ss files which is associated with drracket, > > the file

Re: [racket-users] Cross-VM method for sending any input port to C runtime?

2021-05-23 Thread Matthew Flatt
At Sun, 23 May 2021 14:57:42 +, Sage Gerard wrote: > Is there a cross-VM way to pass an arbitrary input port to the C > runtime (e.g. via open-input-bytes), such that the C runtime can read > bytes on its own? No, not unless you know that the port's implementation is sufficiently constrained.

Re: [racket-users] how to convert encoded path to something build-path can use?

2021-05-21 Thread Matthew Flatt
Yes, the format changed in that commit. The `decode-link-path` function is not meant to be public, although it could be exposed. But for an approach that works now and with older versions, the API you want is `links` from `setup/link`, possibly like this: (links #:file (find-links-file)

Re: [racket-users] eq? behavior changed on Racket CS?

2021-05-20 Thread Matthew Flatt
Yes, this is an expected difference. The Racket documentation still only promises `eq?` for characters with scalar values in the range 0 to 255, but Chez Scheme characters are always `eq?` when they are `eqv?`. At Thu, 20 May 2021 19:17:04 -0400, Stephen Chang wrote: > Hi everyone, Has eq?

Re: [racket-users] DrRacket run button needs several clicks to work...

2021-05-19 Thread Matthew Flatt
Hi Don, This problem in v8.0 has been fixed in v8.1. Matthew At Wed, 19 May 2021 09:44:46 -0700 (PDT), Don Green wrote: > After upgrading to racket v.8.0, the DrRacket 'run' button does not work > consistently with one click. > Previously, a single click of the 'run' button performed it's

Re: [racket-users] I want a package at installation scope but also to keep my install clean

2021-05-18 Thread Matthew Flatt
Yes, this approach can work. I don't think the existing Racket tools will help much with persisting a configuration across versions, though, so you'd probably have to script that. One potential drawback of your approach is that executables, documentation, etc., associated with the extra package

Re: [racket-users] Re: preview of a cross-compilation tool

2021-05-15 Thread Matthew Flatt
At Sat, 15 May 2021 05:18:22 -0700 (PDT), "kamist...@gmail.com" wrote: > Yes it didn't find the libiconv-2.dll in the distribution "lib" sub-folder, > only after I added that to my path. Oh, right... I had forgotten already that the current release does *not* cross-build correctly, even for a BC

Re: [racket-users] Re: preview of a cross-compilation tool

2021-05-15 Thread Matthew Flatt
At Sat, 15 May 2021 03:10:55 -0700 (PDT), "kamist...@gmail.com" wrote: > I ran raco-cross > (installed on racket cs 8.0 [does this cause trouble for racket cs < 8.2 or > is it fine because host and target are both bc?]) Yes, it's fine because the target is BC (and a host BC is set up as

[racket-users] preview of a cross-compilation tool

2021-05-13 Thread Matthew Flatt
While `raco exe` in v8.1 very nearly supports cross-builds of Racket executables[*], it's not easy to pass the right flags and set up the needed target-platform distributions. The `raco cross` command provided by the new "raco-cross" package wraps Racket tools to simplify all of that management.

Re: [racket-users] Re-defined constant when dynamically evaluating module forms

2021-05-12 Thread Matthew Flatt
I think the problem here is that you're re-defining a module. The `lifted/4` binding is probably a generated one in the module, and redeclaring the module would require changing `lifted/4` --- and probably other bindings that you would recognize, but `lifted/4` happens to be hit first. To avoid

Re: [racket-users] copy-file does not preserve file attributes on linux version of Racket...

2021-05-11 Thread Matthew Flatt
At Mon, 10 May 2021 17:16:53 -0700 (PDT), Don Green wrote: > From Racket doc: "File permissions are transferred from src to dest; on > Windows, the modification time of src is also transferred to dest." > > Is the above line meant to imply that a unix/linux version of Racket will > NOT preserve

Re: [racket-users] Re: custom byte encoders?

2021-04-23 Thread Matthew Flatt
A new custom port sounds like the right idea. The `reencode-input-port` and ``reencode-output-port` implementations in "collects/racket/port.rkt" are tied to byte converters, but they should be the right idea and could be generalized to other conversion functions. You might have to copy them for

Re: [racket-users] parts as the top-level unit in books

2021-04-21 Thread Matthew Flatt
You can use 'grouper as a style property for a `part` that is meant to be a *part*. https://docs.racket-lang.org/scribble/core.html?q=part#%28def._%28%28lib._scribble%2Fcore..rkt%29._part%29%29 At Wed, 21 Apr 2021 07:56:33 -0700 (PDT), Shriram Krishnamurthi wrote: > The Scribble Book format > >

Re: [racket-users] Cannot attach submodule to namespace

2021-04-16 Thread Matthew Flatt
make it sound like attaching is > sufficient. > > > On 4/16/21 1:51 PM, Matthew Flatt wrote: > > The name `'restricted` is allowed as a shorthand in `require` because > > `require` knows what module it's in. The `namespace-attach-module` > > function does not try

Re: [racket-users] Cannot attach submodule to namespace

2021-04-16 Thread Matthew Flatt
The name `'restricted` is allowed as a shorthand in `require` because `require` knows what module it's in. The `namespace-attach-module` function does not try to infer a module context from the namespace argument; it uses the namespace argument only for its registry. So, you need to use the full

Re: [racket-users] Wheel / touchpad / trackpoint accuracy/speed scrolling fix for DrRacket

2021-04-16 Thread Matthew Flatt
le:4 > amt:-19 > > WHEEL_DELTA_S:30 > wheel-scale:4 > amt:-22 > > > Amt is never above WHEEL_DELTA, which triggers only the first branch of the > cond. The amt value is used with no adjustment, hense the precise behaviour. > > Dex > > On Thursday, Apr

Re: [racket-users] Wheel / touchpad / trackpoint accuracy/speed scrolling fix for DrRacket

2021-04-15 Thread Matthew Flatt
Thanks for this summary! But I remain puzzled... As I understand it, `wheel-scale` ends up being 4 on your machine. So removing the multiplication by `wheel-scale` means that `amt` is 1/4 of what it used to be. But `amt` is effectively always divided by `WHEEL_DELTA`, which you've also divided by

Re: [racket-users] Something is going slightly wrong visually with the Linux version

2021-04-13 Thread Matthew Flatt
My guess (will investigate) is that I broke things with this commit: https://github.com/racket/draw/commit/a6558bdc18438e784c23d452ffd877dac867a7fd At Tue, 13 Apr 2021 13:41:45 -0500, Robby Findler wrote: > This looks to me like racket believes the OS is in dark mode but it really > isn't.

Re: [racket-users] Re: Executable file size and raco demod

2021-04-10 Thread Matthew Flatt
At Sat, 10 Apr 2021 17:26:21 +, Dexter Lagan wrote: > By default it’s set to ‘one. But for an editor, this line changes it to 'integer: https://github.com/racket/gui/blob/master/gui-lib/mred/private/wxme/editor-canvas.rkt#L237 Or, at least, it should --- and it does in my installation,

Re: [racket-users] Re: Executable file size and raco demod

2021-04-10 Thread Matthew Flatt
At Sat, 10 Apr 2021 03:52:47 -0700 (PDT), Dexter Lagan wrote: > DrRacket feels I see that you did say DrRacket, so I remain puzzled. Are you seeing a value other than 'integer when `gen-wheels` is called in a stock v8.0? Matthew -- You received this message because you are subscribed to the

Re: [racket-users] Re: Executable file size and raco demod

2021-04-10 Thread Matthew Flatt
> [else > >> (case wheel-steps-mode > >>[(one) > >> (do-key w msg up lParam #f #f void 1.0) > >> (loop (- amt AUG_WHEEL_DELTA))] > >>[(integer) > >> (define steps (qu

Re: [racket-users] Re: Executable file size and raco demod

2021-04-07 Thread Matthew Flatt
At Wed, 7 Apr 2021 14:08:00 -0700 (PDT), Dexter Lagan wrote: > One last thing, I noticed that a small window appears top-left corner of > the screen before the full DrRacket window opens since 8.0.0.1x : That window's full title turns out to be "Recompiling quickscripts...". It's shown and

Re: [racket-users] Re: Executable file size and raco demod

2021-04-06 Thread Matthew Flatt
At Mon, 5 Apr 2021 14:29:22 -0700 (PDT), Dexter Lagan wrote: > I installed the latest build, and it does start. Generated executable is > 80MB vs 32MB for 7.9 BC, about 10MB more than 8.0 release. That difference is again related to the compilation paths, but this time the likely result is

Re: [racket-users] Re: Executable file size and raco demod

2021-04-05 Thread Matthew Flatt
:42:46 AM UTC+2 Dexter Lagan wrote: > > > Hi Matthew, > > > > It is indeed the one from Utah. I’ll give the other one a try and report > > back. Thanks for looking into this! > > > > Dex > > > > > > > > On Sunday, April 4, 2021 at 8:32:00 PM UTC

Re: [racket-users] Re: Executable file size and raco demod

2021-04-04 Thread Matthew Flatt
Hi Dex, Are you using a snapshot build from the Utah site --- as opposed to a snapshot for Northwestern or some other build? I see that the Utah site's compiled code is twice as big as the Northwestern site's compiled code. It looks like the build process for Racket at Utah (via Visual Studio)

Re: [racket-users] 8.0.0.13 on Windows

2021-04-04 Thread Matthew Flatt
Thanks for the report! This bug has been fixed for the next build. At Sun, 04 Apr 2021 13:40:45 +0200, "Bruce O'Neel" wrote: > > Hi, > > When I download the minimial tar file and then run  > > raco pkg install --deps search-auto -i main-distribution > > everything seems fine, but

Re: [racket-users] Synchronizable conjunction of events?

2021-03-15 Thread Matthew Flatt
At Mon, 15 Mar 2021 13:38:46 -0700 (PDT), Greg Rosenblatt wrote: > Is there a corresponding event for a logical conjunction (I was looking for > something like `all-evt` or `every-evt`), which requires that all of its > members be ready for synchronization at the same time? No. (Although

Re: [racket-users] racket-launcher-names and easing the user experience

2021-03-01 Thread Matthew Flatt
The path for executables in user-scope installation is always like that. As far as I know, think there's not a great answer for where to put user-scope executables, especially across platforms. One more option to consider: add a `raco` command. That avoids the PATH issue by changing the PATH

Re: [racket-users] Retrieve name of defined variable in a syntax form in the expr of define form

2021-02-27 Thread Matthew Flatt
If you're just interested in the symbolic name "x", as opposed to the binding identifier, then see `syntax-local-name` or `syntax-local-infer-name`. If you want the binding identifier, though, that's not available. Matthew At Sat, 27 Feb 2021 20:52:23 +0100, Jos Koot wrote: > Hi > > Consider:

Re: [racket-users] Racket v8.0 (!)

2021-02-19 Thread Matthew Flatt
At Wed, 17 Feb 2021 17:31:04 -0500, Hendrik Boom wrote: > It looks as if there's no Racket on Chez for 32-bit Linux, though there does > seem to be one on Windows. I've added 32-bit i386 Linux CS to the set of snapshots at Utah: https://www.cs.utah.edu/plt/snapshots/

Re: [racket-users] file/gzip trouble reading

2021-02-16 Thread Matthew Flatt
At Tue, 16 Feb 2021 16:03:29 -0500, Ben Greenman wrote: > Sadly, I've already compressed a few files using > `call-with-output-string` ... is there an easy way to decompress those > / undo the UTF-8 encoding? Unfortunately, the underlying `get-output-string` conversion is lossy, because bytes

Re: [racket-users] file/gzip trouble reading

2021-02-16 Thread Matthew Flatt
At Tue, 16 Feb 2021 15:44:54 -0500, Ben Greenman wrote: > But in my compressed string, the second > byte is #o357 for some reason. I'm not sure how that could have > happened ... some kind of encoding issue with string ports? Yes. You want `call-with-output-bytes` on the compress size and

Re: [racket-users] Error while compiling Racket BC

2021-02-05 Thread Matthew Flatt
At Sat, 6 Feb 2021 01:03:54 + (UTC), "Killian Zhuo (KDr2)" wrote: > Hi, I use `--enable-racket=` because that I found that without it I can't > build > Racket CS: > I ran  > ``` ./configure --enable-cs --enable-bc --enable-csdefault > make make install``` True --- that won't work. The Git

Re: [racket-users] Error while compiling Racket BC

2021-02-05 Thread Matthew Flatt
Maybe I missed some context, but why are you using `--enable-racket`? Normally, with a Git checkout, you'd just use `make cs` and/or `make bc` in the root directory. Using `--enable-racket` is mostly for cross compilation. At Fri, 5 Feb 2021 17:57:31 -0600, Shu-Hung You wrote: > The snapshot

Re: [racket-users] Binding a submodule into a sandbox

2021-01-30 Thread Matthew Flatt
I think the main problem is that `make-evaluator` is a function, which means that it doesn't know what module it's called in. So, relative paths like 'sub or (submod "." 'sub) don't work. You could use `quote-module-path` from `syntax/location` like this: #lang racket (require racket/sandbox

Re: [racket-users] synchronization with ffi/unsafe/os-thread

2021-01-26 Thread Matthew Flatt
At Tue, 26 Jan 2021 14:49:22 +0100, Ryan Culpepper wrote: > Thanks for the pointer! Those sound useful, but in the spirit of maximum > caution, is there a guarantee that the write to the box from the new OS > thread will be visible to the original Racket OS thread when the poller > tries to read

Re: [racket-users] synchronization with ffi/unsafe/os-thread

2021-01-26 Thread Matthew Flatt
At Tue, 26 Jan 2021 10:25:42 +0100, Ryan Culpepper wrote: > This "works", but is it reliably safe to use place-channel-put from an OS > thread? No. It's not intended to work from an arbitrary OS thread, and because `place-channel-put` touches the thread scheduler to enter atomic mode, I can

[racket-users] Racket compiler and runtime status report

2021-01-24 Thread Matthew Flatt
In anticipation of the v8.0 release with Racket CS as the default, here's this year's update on Racket's compiler and runtime system: https://blog.racket-lang.org/2021/01/racket-status.html Matthew -- You received this message because you are subscribed to the Google Groups "Racket Users"

Re: [racket-users] scheme_eval_string equivalent for racket-cs

2020-12-17 Thread Matthew Flatt
That will work if your namespace has `open-input-bytes`, etc. It might be better to use `racket_dynamic_require` to specifically get the functions from `racket/base`, applying each with `racket_apply`. A better strategy might be to have a function that combines all of these pieces in an embedded

Re: [racket-users] Using current-process-memory with 'cumulative argument

2020-12-15 Thread Matthew Flatt
At Tue, 15 Dec 2020 17:00:42 -0800 (PST), Alex Harsanyi wrote: > I am trying to use `(current-process-memory 'cumulative)` to determine the > total memory used by an application, including the memory that was > reclaimed by the garbage collector. I would expect the results from the > call to

Re: [racket-users] Threading question

2020-12-15 Thread Matthew Flatt
It sounds like you're running into a problem specifically with things like the file dialog. Everything in Racket runs in a thread. When your program starts, it runs in the "main" thread. Normally, a Racket thread that can run will run, no matter what other Racket threads are doing. When a

Re: [racket-users] Racket GUI editor: how read and process keyboard input

2020-12-06 Thread Matthew Flatt
Although key events from `racket/gui` cannot report the press of Caps Lock as an independent event, each key event reports whether Caps Lock is currently on, which I think is relevant here. For example, using (define mainTextArea (new (class text% (define/override

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

2020-12-05 Thread Matthew Flatt
-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

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

2020-12-01 Thread Matthew Flatt
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

Re: [racket-users] snappier place startup time

2020-11-24 Thread Matthew Flatt
base. > > >> > > >> #lang racket/base > > >> > > >> (require syntax/location) > > >> (require racket/place) > > >> > > >> > > >> > > >> (module test racket/base > > >> (pro

Re: [racket-users] snappier place startup time

2020-11-24 Thread Matthew Flatt
The bottleneck for place startup is loading modules into the new place, including modules like `racket/base`. For example, (place-wait (dynamic-place 'racket 'void)) takes around 200ms on my machine, while (place-wait (dynamic-place 'racket/base 'void)) takes around 30ms and

Re: [racket-users] Questions

2020-11-23 Thread Matthew Flatt
At Mon, 23 Nov 2020 00:14:56 -0600, Nate Griswold wrote: > Hello. I have a few questions: > > 1) Why do the docs say that racket_eval and racket_apply eval and apply in > the “initial” or “original” racket thread? I have verified that the thread > id returned from pthread_self when using

Re: [racket-users] read-line-evt question

2020-11-18 Thread Matthew Flatt
At Wed, 18 Nov 2020 12:59:46 -0500, George Neuner wrote: > > On 11/18/2020 9:43 AM, Javier Vivanco wrote: > > > > I have a question about a read-line-evt 's behaviour. > > Is this normal this ? > > > (sync (read-line-evt (current-input-port)) > > 1234 > > "" > > > > I want to use a timeout in

Re: [racket-users] Creating threads that prevent main thread from exiting

2020-11-16 Thread Matthew Flatt
Probably the right choice is to install a flush handler with the current plumber: (define (thread/wait proc) (define t (thread proc)) (plumber-add-flush! (current-plumber) (lambda (h) (thread-wait t))) t) That adds a `thread-wait` in the same sense as flushing a

Re: [racket-users] Namespaces and modules

2020-11-12 Thread Matthew Flatt
At Thu, 12 Nov 2020 23:35:11 +0100, Dominik Pantůček wrote: > If I however try to achieve the same goal using module form within my > module, it always fails: > > (module sandbox racket/base > (provide #%app #%datum test) > (define (test) (displayln 'test))) > (parameterize

Re: [racket-users] Ubuntu PPA also updated to v7.9

2020-11-10 Thread Matthew Flatt
The above looks like the location where my user packages are installed (as > > in, the packages from raco pkg install). > > > > $ ls ~/.config/racket > > ls: cannot access '/home/evdubs/.config/racket': No such file or directory > > > > Evan > > On Monday,

Re: [racket-users] Ubuntu PPA also updated to v7.9

2020-11-09 Thread Matthew Flatt
At Mon, 9 Nov 2020 18:08:51 -0800 (PST), evdubs wrote: > So I ran: > $ raco pkg config --set catalogs https://pkgs.racket-lang.org > and now I am able to migrate packages. Thank you, Matthew. Maybe this is > related to my installation being from the PPA. Maybe, but I wonder whether it might

Re: [racket-users] Ubuntu PPA also updated to v7.9

2020-11-09 Thread Matthew Flatt
> raco pkg migrate: cannot find package on catalogs > package: gregor > raco pkg migrate: cannot find package on catalogs > package: binaryio > raco pkg migrate: cannot find package on catalogs > package: binaryio > > Evan > On Monday, November 9, 2020 at 3:32:0

Re: [racket-users] Ubuntu PPA also updated to v7.9

2020-11-09 Thread Matthew Flatt
At Mon, 9 Nov 2020 16:28:32 -0800 (PST), evdubs wrote: > Looking at https://download.racket-lang.org/releases/7.9/catalog/, an > uncaught exception is being thrown. This error is being returned by other > versions, too (7.8 and 7.7 at least). When that URL is used as a catalog by `raco pkg`, it

Re: [racket-users] Suspending/resuming threads with custodians/benefactors

2020-11-07 Thread Matthew Flatt
for the first problem, you've found a bug in the Racket CS thread scheduler (i.e., Racket BC behaves correctly in this case). Suspending a thread that is sleeping didn't prevent the thread from being woken up on its previous schedule. I've pushed a repair as commit 7a12b4ac93. After fixing that

Re: [racket-users] Racket BC versus CS unsafe flonums

2020-11-07 Thread Matthew Flatt
At Sat, 7 Nov 2020 16:42:43 +0100, Dominik Pantůček wrote: > My current understanding is that the best performance you get from > unsafe operations while using safe operations as hints for the flonum > unboxing algorithm, right? I'm not sure I understand what you mean, but I don't think unsafe

Re: [racket-users] Racket BC versus CS unsafe flonums

2020-11-07 Thread Matthew Flatt
At Fri, 6 Nov 2020 12:45:46 -0700, Matthew Flatt wrote: > I will investigate faster option. A primitive without conversion could > make the safe `flvector-set!` slightly faster, too, by avoiding a > redundant check. Long story short, I added flvectors to the Chez Scheme level as of

Re: [racket-users] Racket BC versus CS unsafe flonums

2020-11-06 Thread Matthew Flatt
At Fri, 6 Nov 2020 20:14:51 +0100, Dominik Pantůček wrote: > I assume that CS' unsafe-flvector-set! is actually pretty safe when it > comes to flonum-convertible numbers. It might be a bit faster because it > lacks the contract, but definitely it is not a "low level" variant. Hm, right --- it's

Re: [racket-users] Developing Scribble as a user when Scribble is installed system-wide

2020-11-05 Thread Matthew Flatt
At Thu, 05 Nov 2020 13:01:36 -0500, Christopher Lemmer Webber wrote: > I'm guessing it's probably due to these error messages: > > $ raco pkg update --scope user --clone scribble-lib > Inferred package name from given `--clone' path > package: scribble-lib > given path: scribble-lib > raco

Re: [racket-users] benchmarks game

2020-10-25 Thread Matthew Flatt
Hi, Can you say more about which version of Racket you're running and on what platform? Thanks! Matthew At Sun, 25 Oct 2020 03:47:39 -0700 (PDT), Raoul Schorer wrote: > > Hi, > > I got interested into The Computer Language Benchmarks Game. > > The binary-trees benchmark is different between

Re: [racket-users] Using Chez Scheme libraries with Racket CS?

2020-10-09 Thread Matthew Flatt
At Thu, 8 Oct 2020 22:38:04 -0700 (PDT), primer wrote: > I'm new to Racket and have not yet played with Racket CS. My question is > whether the Chez Scheme libraries are available. For example, is it > possible to do something like (require chezscheme) and then use > (fork-thread ...) to

Re: [racket-users] Manually create cpointer value in racket?

2020-10-07 Thread Matthew Flatt
Probably you want to use `cast`. If you have an integer `addr` that corresponds to an address, then (cast addr _uintptr _pointer) casts it to a C pointer. Matthew At Wed, 7 Oct 2020 10:28:42 -0500, Nathaniel Griswold wrote: > Related to a question I asked earlier, but this time at the racket

Re: [racket-users] Security: #%top-interaction in setup/infotab?

2020-10-07 Thread Matthew Flatt
At Wed, 23 Sep 2020 18:04:01 +, Sage Gerard wrote: > Is there a security reason behind omitting #%top-interaction from > `setup/infotab`? No, I don't think there is any security issue here. Adding `#%top-interaction` seems fine. Matthew -- You received this message because you are

Re: [racket-users] #:kind (list ... ) in defthing and defproc

2020-10-07 Thread Matthew Flatt
A recent commit added a contract on `defthing` and `defproc` to enforce the documented constraint that `#:kind` should be a string. But the implementation is happy with content in the sense of `content?`. Since it's easy to adjust the contract and documentation to restore this capability, I'll do

Re: [racket-users] How to redirect only some library documentation in Scribble

2020-10-07 Thread Matthew Flatt
At Tue, 29 Sep 2020 17:51:42 -0700, "William J. Bowman" wrote: > I'm writing a large Scribble document which links to package > documentation. I link to normal Racket documentation, and currently > redirect those to the main racket-lang documentation using > --redirect-main

Re: [racket-users] question about places and main thread gc

2020-10-01 Thread Matthew Flatt
hread a > new racket place or is it not a place at all? > > Thanks! > > > On Oct 1, 2020, at 8:21 AM, Matthew Flatt wrote: > > > > You're right that the main place is tied to the OS thread that is used > > to start Racket, so you can't move the place over by a

Re: [racket-users] question about places and main thread gc

2020-10-01 Thread Matthew Flatt
o, is there any > > way to get the place descriptor for the current place or the main place? I > > didn't see any in the docs. I guess i should just start reading the racket > > source at this point. > > > > Also maybe i'm missing a simpler solution. A

Re: [racket-users] [racket users] describe variant issue?

2020-09-17 Thread Matthew Flatt
A PR to improve `struct->vector` for CS would be welcome. There relevant code is here: https://github.com/racket/racket/blob/master/racket/src/cs/rumble/struct.ss#L1221 As you'll see, the synthesized name is currently whatever comes out of Chez Scheme's `inspect/object` interface. It could

Re: [racket-users] Writing make-sized-byte-string alternative on CS

2020-09-15 Thread Matthew Flatt
You use `make-bytes` and `memcpy`, instead of writing a new loop. (The non-copying part of `make-sized-byte-string` is what CS can't support.) Matthew At Tue, 15 Sep 2020 21:12:22 +, Sage Gerard wrote: > The docs for >

  1   2   3   4   5   6   7   8   9   10   >