Re: [racket-users] managing competing access to filesystem within places

2019-06-13 Thread Matthew Flatt
At Thu, 13 Jun 2019 18:16:50 -0700, Matthew Butterick wrote: > > > On Jun 13, 2019, at 10:04 AM, Matthew Flatt wrote: > > > > I recommend a lock-serving place in Pollen to manage concurrency for > > parallel rendering. Don't let multiple places try to read and/or

Re: [racket-users] Version number issue with snapshot 7.5.0.6

2019-11-04 Thread Matthew Flatt
At Mon, 4 Nov 2019 11:30:49 -0500, David Storrs wrote: > read-compiled-linklet: version mismatch expected: "7.5.0.5" found: > "7.5.0.6" in: > /Applications/snapshot_Racket_v7.5.0.6/collects/racket/compiled/main_rkt.zo > > I'm on OSX 10.11.6 if that matters. I'm not yet able to replicate this

Re: [racket-users] Re: C++ and pointer registration with 3M?

2019-11-01 Thread Matthew Flatt
At Fri, 1 Nov 2019 10:34:50 -0700 (PDT), Thomas Dickerson wrote: > The documentation says: > "The 3m collector needs to know the address of every local or temporary > pointer within a function call at any point when a collection can be > triggered." > > A couple questions: > - Is this "every

Re: [racket-users] windows, file-or-directory-modify-seconds, can't find errno set to ENOENT

2019-11-01 Thread Matthew Flatt
Racket uses the native Windows API for filesystem operations, so it generally creates exceptions with a 'windows value in the `errno` field instead of a 'posix value. The `UNC_stat` function is also implemented in "rktio_fs.c". But you don't seem to be getting a 'windows error, either, and I

Re: [racket-users] Re: C++ and pointer registration with 3M?

2019-11-01 Thread Matthew Flatt
At Fri, 1 Nov 2019 17:15:57 -0400, Thomas Dickerson wrote: > Is it an error to register things which are not GCable, or just unnecessary? Just unnecessary. > Also - are there ever likely to be pointers which could hold memory which > may or may not be GCable depending on the code path? > (e.g. a

Re: [racket-users] What's the best way to do these syntax transforms?

2019-11-08 Thread Matthew Flatt
At Fri, 8 Nov 2019 11:28:46 -0500, Philip McGrath wrote: > On Fri, Nov 8, 2019 at 9:56 AM Jay McCarthy wrote: > > > On Fri, Nov 8, 2019 at 9:51 AM Christopher Lemmer Webber < > > cweb...@dustycloud.org> wrote: > > > >> I have a need to do two things in a #lang: > >> > >> - Most importantly,

Re: [racket-users] Re: How to install an updated version of an installation-wide package?

2019-11-07 Thread Matthew Flatt
It's not technically ok to shadow a package in installation scope with one in user scope, at least not if any package in installation scope depends on the shadowed package. (That's why you have to use `--force` to shadow in `--user` scope.) With that configuration, when the package changes in user

Re: [racket-users] FFI Object Deallocator Not Called

2019-11-07 Thread Matthew Flatt
At Tue, 5 Nov 2019 14:14:00 -0800 (PST), Bryant Curto wrote: > I have an FFI object I created with an allocator/deallocator wrapper pair, > but the deallocation function never appears to get called. > I'm invoking garbage collection explicitly before shutdown with no success. One catch is that

Re: [racket-users] FFI Object Deallocator Not Called

2019-11-07 Thread Matthew Flatt
At Thu, 7 Nov 2019 10:02:11 -0800 (PST), Bryant Curto wrote: > > One catch is that finalization callbacks are run in a separate > > (privileged) thread. > > To clarify, do you mean a Racket thread or an OS thread? In a Racket thread. -- You received this message because you are subscribed to

Re: [racket-users] FFI Object Deallocator Not Called

2019-11-07 Thread Matthew Flatt
At Thu, 07 Nov 2019 20:16:29 +, Sage Gerard wrote: > To add: Is it wise to put (begin (sync (system-idle-evt)) (collect-garbage)) > in a flush callback on the exit handler's plumber? I should have clarified that if you need a finalizer to run when Racket shuts down, then finalization alone

Re: [racket-users] Problem building racket in-place

2019-11-13 Thread Matthew Flatt
At Tue, 12 Nov 2019 22:47:33 +, Reuben Thomas wrote: > Is there > some reason configure can't test `enable_origtree`? Is there some time the > build system is supposed to build in-tree even without --enable-origtree? > If so, could it test `"${prefix}" = "NONE" -o "${enable_origtree}" =

Re: [racket-users] Custom scribble renderers and xref information

2019-11-17 Thread Matthew Flatt
Yes, I think you're arriving at the right conclusions here. If I remember correctly, "external" means "from a different run of `render`", which normally means different documents --- but not if you give multiple documents to `render` at once. Since you want to be able to render blog posts

Re: [racket-users] Problem building racket in-place

2019-11-16 Thread Matthew Flatt
At Sat, 16 Nov 2019 18:32:00 +, Reuben Thomas wrote: > On Sat, 16 Nov 2019 at 15:06, Matthew Flatt wrote: > > > > > The checked-in `configure` scripts are generated by "make-configure" in > > "racket/src/ac", and that script doesn't re

Re: [racket-users] symlink to raco changes its behavior?

2019-11-16 Thread Matthew Flatt
This is a holdover from `setup-plt` times. The `raco` executable treats command line arguments without `-l` differently depending on whether the name of the executable is `raco` (which was a may of improving things with `raco` while maintaining compatibility for `setup-plt`). So, it's expected at

Re: [racket-users] Custom scribble renderers and xref information

2019-11-17 Thread Matthew Flatt
At Sun, 17 Nov 2019 12:12:15 -0600, Alexis King wrote: > I do have two related followup questions, though. First, how does > `raco setup` know what the dependencies are in the first place, so it > knows what it needs to rerender? I’ve noticed it seems to do things > in at least two

Re: [racket-users] Re: raco distribute and runtime paths, conditioned on whether a package was installed at compile time

2019-11-12 Thread Matthew Flatt
At Sun, 10 Nov 2019 15:26:58 -0500, Jon Zeppieri wrote: > That is, the tzdata package defines, in an info.rkt file, a key named > `tzdata-zoneinfo-module-path`. I use that to determine if the package > is installed, and, if so, I create a runtime path for it and add that > path to the head of a

Re: [racket-users] Problem building racket in-place

2019-11-12 Thread Matthew Flatt
At Thu, 7 Nov 2019 23:14:52 +, "'Reuben Thomas' via Racket Users" wrote: > I have a CONFIG_SITE environment variable which contains the following line: > > test "$prefix" = NONE && prefix="$HOME_LOCAL" > > (HOME_LOCAL is set to $HOME/.local) > > Things then go wrong because

Re: [racket-users] Re: raco distribute and runtime paths, conditioned on whether a package was installed at compile time

2019-11-12 Thread Matthew Flatt
At Tue, 12 Nov 2019 21:29:44 -0500, Jon Zeppieri wrote: > I like the idea of installing the data to a "share" directory. I see > that the `info.rkt` file for a collection has a `copy-shared-files` > key. In my case, both the `tzinfo` package and the `tzdata` package > contribute to the `tzinfo`

Re: [racket-users] Re: raco distribute and runtime paths, conditioned on whether a package was installed at compile time

2019-11-12 Thread Matthew Flatt
At Tue, 12 Nov 2019 19:46:01 -0700, Matthew Flatt wrote: > Although you can find the files using `find-share-dir` and/or > `find-user-share-dir`, adding a 'share mode to `define-runtime-path` > would make it possible for `raco distribute` to find and carry along a > directory/fi

Re: [racket-users] Problem building racket in-place

2019-11-16 Thread Matthew Flatt
At Fri, 15 Nov 2019 21:33:17 +, "'Reuben Thomas' via Racket Users" wrote: > I've looked into it and I can't work out what start/*.ac are used. Ah, right again. That explains why I didn't update "start/configure.ac" to use "path.m4". It's because "start/configure.ac" isn't supposed to exist.

Re: [racket-users] Scribble: how to wrap a flow in a style?

2019-12-04 Thread Matthew Flatt
I'm not sure I follow completely, but I think the problem is the compound-paragraph parsing that is triggered by the lack of space between the two `para` calls: @foo{@para[#:style "foo"]{Bar.} @para{Bar.}} If you change it to @foo{@para[#:style "foo"]{Bar.} @para{Bar.}} then the

Re: [racket-users] Vector lenght and indices contracts

2019-12-04 Thread Matthew Flatt
I think it makes sense to refine the contract to guarantee a fixnum result for `vector-length`. This fact is currently documented in `unsafe-vetcor-length`, because that's the layer where it has seemed sensible to talk about fixnums in the past, but that's not where anyone would think to look.

Re: [racket-users] Vector length and indices contracts

2019-12-04 Thread Matthew Flatt
At Wed, 4 Dec 2019 22:24:10 +0100, Dominik Pantůček wrote: > What about all the vector-ref, -set! and basically all indices > contracts? That should probably be the same. I'm less enthusiastic about that change. It turns out that a non-fixnum argument won't work for `vector-ref`, but the stronger

Re: [racket-users] Scribble output without navigation

2019-12-08 Thread Matthew Flatt
At Sun, 8 Dec 2019 23:18:45 +, "'Reuben Thomas' via Racket Users" wrote: > On Sun, 8 Dec 2019 at 17:07, Matthew Flatt wrote: > > > > > There's now a 'no-toc+aux style property to completely get rid of that div. > > > > That's good, thanks; but I see

Re: [racket-users] Racket 7.5 DMG file does not open on OSX 10.11

2019-12-10 Thread Matthew Flatt
I’ve changed the distribution build to use HFS+ going forward. > On Dec 10, 2019, at 6:28 PM, James Platt wrote: > > >> On Dec 6, 2019, at 9:56 PM, Darth Vadør wrote: >> >> If it isn't too much trouble, I at least would really appreciate this. >> One reason I think this is important is

Re: [racket-users] Racket 7.5 DMG file does not open on OSX 10.11

2019-12-11 Thread Matthew Flatt
e version on the downloads page seems to still be APFS. Will it rebuild > at some point? > > On Tue, Dec 10, 2019 at 8:46 PM Matthew Flatt wrote: > > > I’ve changed the distribution build to use HFS+ going forward. > > > > > On Dec 10, 2019, at 6:28 PM, James Platt

Re: [racket-users] Sharing a udp socket between threads via parameters

2019-12-05 Thread Matthew Flatt
At Thu, 5 Dec 2019 14:26:17 -0500, David Storrs wrote: > My understanding is that parameters are copied between threads, but I'm not > sure how this interacts with things like file ports, network connections, > etc. Would the following code be problematic? > > > (define conn (make-parameter)) >

Re: [racket-users] Scribble output without navigation

2019-12-06 Thread Matthew Flatt
Do 'no-toc and 'no-sidebar style properties on the main part help? Or does that still leave navigation elements that you want removed? At Fri, 6 Dec 2019 10:31:56 -0500, Sam Tobin-Hochstadt wrote: > Is there a reason that not showing it is a problem, relative to not > having it in the HTML? The

Re: [racket-users] Scribble output without navigation

2019-12-08 Thread Matthew Flatt
At Sat, 7 Dec 2019 21:33:30 +, Reuben Thomas wrote: > On Fri, 6 Dec 2019 at 15:43, Matthew Flatt wrote: > > > Do 'no-toc and 'no-sidebar style properties on the main part help? Or > > does that still leave navigation elements that you want removed? > > > > That

Re: [racket-users] Re: Racket 7.5 does not run on Cent OS cloud computers

2019-12-16 Thread Matthew Flatt
> On Monday, 9 December 2019 23:00:37 UTC+1, edu500ac wrote: > > > > A couple of years ago, I was unable to run Racket on my webpage. I > > complained on this forum, and the developers fixed the issue. Things worked > > fine until version 7.3, when the old problem reappeared. Here is what > >

Re: [racket-users] How do I represent a convenient two-step allocation using ffi/unsafe?

2019-10-20 Thread Matthew Flatt
At Sun, 20 Oct 2019 23:07:58 +, Sage Gerard wrote: > So if I take the `vkEnumerateInstanceLayerProperties/private` you showed me > and change the (_ptr io _uint32_t) to (_cpointer _uint32_t), will it have any > other noticeable usability differences for someone thinking like a C >

Re: [racket-users] Help me understand FFI callouts in this context?

2019-10-29 Thread Matthew Flatt
I haven't been able to get Vulkan going on my machines, so I can't run your code enough to offer reliable advice. Still, I wonder whether making the callback atomic has any effect. To make the callback atomic: * Change the definition of `_PFN_vkDebugReportCallbackEXT` to add `#:atomic? #t`

Re: [racket-users] How do I represent a convenient two-step allocation using ffi/unsafe?

2019-10-22 Thread Matthew Flatt
The short answer is: `(_ptr io _VkInstance)` does not mean that a pointer to a `_VkInstance` happens on the Racket side. It means that a `_VkInstance` (not a pointer to a `_VkInstance`) happens on the Racket side, and a pointer to a `_VkInstance` happens on the C side. Taking it from the top: At

Re: [racket-users] broken download link

2019-10-22 Thread Matthew Flatt
Sorry, this was my mistake (edited the wrong configuration and broke download.racket-lang.org for several minutes), but it should be ok now. At 22 Oct 2019 17:36:05 -0400, "'John Clements' via Racket Users" wrote: > hmm, I don’t see that. Perhaps it’s already been fixed? If this persists for >

Re: [racket-users] regexp-match + REPL leads to confusing output

2019-10-16 Thread Matthew Flatt
At Wed, 16 Oct 2019 21:25:35 +, Sage Gerard wrote: > I'd like to understand the reader better, and this seems relevant to > it. In this REPL session I do not escape \S with a second \ in the > first interaction. After I introduce the slash later, the REPL never > really "recovers." Even a

Re: [racket-users] How do I represent a convenient two-step allocation using ffi/unsafe?

2019-10-20 Thread Matthew Flatt
I don't think `ffi/unsafe` can generate that kind of wrapper for you. I'd write something like this: (define-vulkan vkEnumerateInstanceLayerProperties/private (_fun (o0 : (_ptr io _uint32_t)) _pointer -> (r : _VkResult) -> (begin (check-vkResult r

Re: [racket-users] fcontrol and dynamic-wind

2019-11-30 Thread Matthew Flatt
You're trying to implement `amb` where a client can mix `amb` and `dynamic-wind` and get sensible behavior, right? The `dynamic-wind` operation certainly interferes with building new control forms. Racket threads and other control forms that need to interact a certain way with `dynamic-wind` end

Re: [racket-users] reading scribble include-section code

2019-11-30 Thread Matthew Flatt
At Fri, 29 Nov 2019 11:58:00 -0500, Hendrik Boom wrote: > I was reading Scribble's include-section code from > https://github.com/racket/scribble/blob/master/scribble-lib/scribble/base.rkt > and I can't figure out how this makes a section: [...] > > Could it be that *any* file read starting with

Re: [racket-users] fcontrol and dynamic-wind

2019-11-30 Thread Matthew Flatt
At Sat, 30 Nov 2019 20:38:26 -0600, Alexis King wrote: > I’m not even sure if continuation operations are safe > in atomic mode. They are, as long as any invoked `dynamic-wind` thunks are safe in atomic mode. (After all, `unsafe-abort-current-continuation/no-wind` and

Re: [racket-users] Scribble: how to wrap a flow in a style?

2019-12-02 Thread Matthew Flatt
Does this get closer? @(define foo-style (make-style "foo" (list (body-id "div" At Mon, 2 Dec 2019 22:41:04 +, "'Reuben Thomas' via Racket Users" wrote: > I'm trying to get LaTeX output that wraps an environment around several > paragraphs (while containing @para elements) and HTML

Re: [racket-users] Scribble: how to wrap a flow in a style?

2019-12-02 Thread Matthew Flatt
At Mon, 2 Dec 2019 22:55:34 +, Reuben Thomas wrote: > On Mon, 2 Dec 2019 at 22:47, Matthew Flatt wrote: > > > Does this get closer? > > > > @(define foo-style (make-style "foo" (list (body-id "div" > > > > Thanks for the sug

Re: [racket-users] Building Racket 7.5 CS on MacOS Catalina

2019-11-25 Thread Matthew Flatt
Hi Bruce, Thanks for the report! It looks like this failure is due to a Racket CS I/O bug that has been fixed for the next version (by commit 3c2efafbf5). If you really need things to work for v7.5, I can suggest a workaround. But if you were just trying it out to see, then we should have this

Re: [racket-users] Building Racket 7.5 CS on MacOS Catalina

2019-11-25 Thread Matthew Flatt
Yes, the snapshot should work. At Mon, 25 Nov 2019 16:31:33 +0100, "Bruce O'Neel" wrote: > > > Hi, > > Thanks!  So if I were to grab the 7.5.0.7 version off of one of the snapshot > sites it should work? > > cheers > > bruce > > > > > Hi Bruce, > > > > Thanks

Re: [racket-users] Reason why char=? accepts only one argument?

2019-11-25 Thread Matthew Flatt
At Sun, 24 Nov 2019 14:30:23 -0800 (PST), Jonathan Simpson wrote: > > > The documentation for char=? leaves the impression that it takes a minimum > of two arguments: > > > https://docs.racket-lang.org/reference/characters.html?q=expand#%28def._%28%28q >

Re: [racket-users] Problem building racket in-place

2019-11-14 Thread Matthew Flatt
At Wed, 13 Nov 2019 21:58:24 +, "'Reuben Thomas' via Racket Users" wrote: > While looking into implementing this, I discovered that `racket/src/start/ > configure.ac`, which seems to have been introduced with the introduction of > CS, is not generated from racket/src/ac/*.m4, while all the

Re: [racket-users] Re: Confusion with udp-receive!

2019-09-25 Thread Matthew Flatt
At Wed, 25 Sep 2019 12:49:36 -0400, David Storrs wrote: > 1) Is it possible that there is a bug in the underlying C code? It's always possible. But if I understand the original problem, it seems unlikely that a bug manages to exactly reconstruct a port number that has been replaced in a UDP

Re: [racket-users] Mysterious issue with pict/code

2019-10-07 Thread Matthew Flatt
1d8e9cd202c > 9 > > > > On Sat, Oct 5, 2019 at 6:42 PM Matthew Flatt wrote: > > > Thanks for the report and simplification! I've pushed a repair. > > > > At Sat, 5 Oct 2019 15:33:31 -0400, Sam Tobin-Hochstadt wrote: > > > This definitely seems like a bu

Re: [racket-users] Mysterious issue with pict/code

2019-10-05 Thread Matthew Flatt
Thanks for the report and simplification! I've pushed a repair. At Sat, 5 Oct 2019 15:33:31 -0400, Sam Tobin-Hochstadt wrote: > This definitely seems like a bug. Here's a smaller program that shows it: > > #lang racket > (begin-for-syntax > (dynamic-require 'pict/code #f)) > > Sam > > On

Re: [racket-users] file-position in Win32 not working beyond 1 GB

2019-12-22 Thread Matthew Flatt
At Sat, 21 Dec 2019 00:22:19 -0500, George Neuner wrote: > Is Racket really writing billions of zeroes rather than creating a > sparse file?  It seems to me that this file should only create 2 actual > data blocks, and (modulo JIT) the program should finish almost > instantly.  What am I

Re: [racket-users] file-position in Win32 not working beyond 1 GB

2019-12-22 Thread Matthew Flatt
At Sun, 22 Dec 2019 20:28:41 +0300, Dmitry Pavlov wrote: > > > Thanks! It really is a bug in `scheme_get_long_long_val`, where the > > extraction can read past the end of a bignum on a 32-bit platform. > > > > Repair pushed. > Great, thank you! > Given that I do not normally build Racket, should

Re: [racket-users] file-position in Win32 not working beyond 1 GB

2019-12-22 Thread Matthew Flatt
At Sat, 21 Dec 2019 11:06:33 +0300, Dmitry Pavlov wrote: > The error pops out not on the first or second positioning exceeding 1 GB. In > fact, it happens on different moments in different runs. Thanks! It really is a bug in `scheme_get_long_long_val`, where the extraction can read past the end

Re: [racket-users] file-position in Win32 not working beyond 1 GB

2019-12-20 Thread Matthew Flatt
The Racket-imposed limit should be 64 bits (more than enough) on all platforms. I can try to replicate the problem later today, but more information on the error message would be helpful. At Fri, 20 Dec 2019 17:39:37 +0300, Dmitry Pavlov wrote: > Hello, > > On a fresh 32-bit Racket 7.5 install

Re: [racket-users] file-position in Win32 not working beyond 1 GB

2019-12-20 Thread Matthew Flatt
At Fri, 20 Dec 2019 23:39:30 +0300, Dmitry Pavlov wrote: > > The Racket-imposed limit should be 64 bits (more than enough) on all > > platforms. I can try to replicate the problem later today, but more > > information on the error message would be helpful. > > I do not have access to that Windows

Re: [racket-users] how to adapt BC code for Racket CS?

2020-02-23 Thread Matthew Flatt
[Replying to three messages] At Sat, 22 Feb 2020 08:05:28 -0800, Matthew Butterick wrote: > 1) As a package maintainer with zero exposure to Chez Scheme, how do I start > to optimize for Racket CS? Are there certain patterns and idioms from BC that > should be systematically eradicated? No.

Re: [racket-users] download catalog down?

2020-02-27 Thread Matthew Flatt
Gillespie wrote: > Hi Matthew, > Thanks, this would seem to suggest that something in the settings > for raco is misconfigured on my system. Does that make sense? Thanks! > Tom > > On Thu, Feb 27, 2020 at 3:00 PM Matthew Flatt wrote: > > > > That path is

Re: [racket-users] how to adapt BC code for Racket CS?

2020-02-25 Thread Matthew Flatt
At Tue, 25 Feb 2020 06:48:53 -0800, Matthew Butterick wrote: > What can you say about places & parallelism under CS vs. BC? This is > one area that I find CS to reliably underperform BC (by about a > factor of 2). Place creation seems slower under CS. More > interestingly however, the utilization

Re: [racket-users] bad response from server

2020-03-02 Thread Matthew Flatt
A snapshot catalog only lasts for a limited time, and v7.4.0.1 was a very long time ago in snapshot terms. So, the short answer is to upgrade to a new snapshot --- or switch to a release, which doesn't time out. At Mon, 2 Mar 2020 14:46:25 -0500, Hendrik Boom wrote: > When trying to u[dat

Re: [racket-users] download catalog down?

2020-02-27 Thread Matthew Flatt
That path isn't served, but something like https://download.racket-lang.org/releases/7.6/catalog/pkg/racket-lib or https://download.racket-lang.org/releases/7.6/catalog/pkgs should work (and does work for me). At Thu, 27 Feb 2020 14:22:55 -0800, Tom Gillespie wrote: > Hi, > I (and

Re: [racket-users] Porting Racket to IRIX

2020-01-26 Thread Matthew Flatt
And you have enough memory, and there's no system-imposed memory limit --- as reported by `ulimit -a` in bash, for example? (Maybe a dumb question, but the last IRIX machine I used, decades ago, would not have had enough memory to build modern Racket.) At Sun, 26 Jan 2020 05:48:15 -0800 (PST),

Re: [racket-users] Porting Racket to IRIX

2020-01-26 Thread Matthew Flatt
At Sat, 25 Jan 2020 12:36:57 -0800 (PST), Eric Dodd wrote: > getenv: contract violation > expected: string-environment-variable-name? > given: #f > context...: > > /usr/people/edodd/local/share/racket/collects/racket/private/misc.rkt:202:2: > getenv >

Re: [racket-users] subprocess failure (Windows-specific ?)

2020-02-08 Thread Matthew Flatt
At Sat, 8 Feb 2020 17:46:06 +0100, Bertrand Augereau wrote: > You're right, but wouldn't using the posix_spawn family have better > semantics, better performance, and would allow to unify between POSIX and > Windows behaviours nicely ? :) It's the usual problem: posix_spawn() doesn't quite

Re: [racket-users] subprocess failure (Windows-specific ?)

2020-02-08 Thread Matthew Flatt
At Sat, 8 Feb 2020 17:08:18 +0100, Bertrand Augereau wrote: > > I'm not sure I completely understand the problem. You're correct that > > there's no way to tell whether the value is an exit code from the program > > or an error from the operating system ... but there also is no way to tell > >

Re: [racket-users] What's the point of make-continuation-mark-key?

2020-01-11 Thread Matthew Flatt
It would be reasonable to generalize `chaperone-continuation-mark-key` to apply in cases where `chaperone-struct` could work, with similar sorts of evidence that chaperoning is allowed provided by a caller of `chaperone-continuation-mark-key`. I guess we just didn't think about it that way when

Re: [racket-users] Re: Racket2 and syntax

2020-01-13 Thread Matthew Flatt
The project name is "Rhombus". The language name is TBD. https://groups.google.com/forum/#!msg/racket-users/-x_M5wIhtWk/V47eL30HCgAJ At Mon, 13 Jan 2020 07:38:55 -0800 (PST), John Cowan wrote: > > > On Sunday, July 14, 2019 at 10:30:04 PM UTC-4, Matthew Flatt wrote: >

Re: [racket-users] Surprising behavior in The Printer

2020-01-14 Thread Matthew Flatt
The short answer is that you're right: creating new values at custom-print time creates trouble for graph detection and `print` quoting. Those operations perform a pass to make decisions about graphs and quoting based on `eq?` identity, and then they make another pass to actually print. I'll

Re: [racket-users] file-position in Win32 not working beyond 1 GB

2020-01-01 Thread Matthew Flatt
At Fri, 27 Dec 2019 14:01:33 +0300, Dmitry Pavlov wrote: > Because on my good ol' Windows XP machine, the Utah i386 nigtly build, while > installing successfully, resulted in a Racket executable that the system > refused to run, saying that it is not a correct executable. (The message was >

Re: [racket-users] counterintuitive behavior of namespace-require

2020-01-06 Thread Matthew Flatt
The problem is that `namespace-require` has to first resolve the `racket` module path, and the module name resolver uses the current namespace as determined by `current-namespace` --- which means that the resolver loads the `racket` module into the wrong namespace. I doubt that we can change that

Re: [racket-users] "invalid memory reference" issue

2020-03-05 Thread Matthew Flatt
I've pushed a repair for the development version of Racket CS. The problem was related to computing a hash code of an object (i.e., an instance of a class). If you need a workaround to keep using the released version of Racket CS, it may involve supplying explicit equality and hash-code functions

Re: [racket-users] Re: Organizing tests in project

2020-04-15 Thread Matthew Flatt
The machine that formerly ran pkg-build died, so pkg-builds stopped for a week or two. I moved eventually moved it to a new machine. Since I had to start over with a v7.6 installer and the current catalog, all packages were re-built and re-tested. At Wed, 15 Apr 2020 12:14:31 -0700, Siddhartha

Re: [racket-users] How can I write a macro that recognizes arbitrary other macros?

2020-04-16 Thread Matthew Flatt
The main trick in this case is to recognize `define-values` (which is what `define` expands to) instead of `define`. That's because `define-values` propagates syntax arming to its identifiers and right-hand side, which means that your macro is allowed to pull it apart. You'll also need to use an

Re: [racket-users] scribble include

2020-04-07 Thread Matthew Flatt
Use `for-syntax` to import into the transformer environment: #lang scribble/base @(require (for-syntax racket/base (only-in scribble/reader make-at-reader))) @(require racket/include) foo @(include/reader "si1.inc" (make-at-reader)) bar

Re: [racket-users] Error loading libreadline dll when using readline package

2020-04-09 Thread Matthew Flatt
I think you probably have the "readline-gpl" package installed. That's where the "libreadline-5.dll" comes from in "private/readline-lib.rkt": (define readline-library (ffi-lib "libreadline" '("5" "6" "4" ""))) Even if "7" were added to that list, `ffi-lib` assumes a versioning convention that

Re: [racket-users] Examples of sending HTML email w/ Racket?

2020-04-09 Thread Matthew Flatt
At Wed, 8 Apr 2020 21:28:11 -0400, George Neuner wrote: > There's nothing in Racket for MIME that I'm aware of There's a `net/mime` library. I'm replying with an attachment so you can see what it generates, since my email client uses that library. Matthew -- You received this message because

Re: [racket-users] Examples of sending HTML email w/ Racket?

2020-04-09 Thread Matthew Flatt
At Thu, 9 Apr 2020 07:09:21 -0700 (PDT), Brian Adkins wrote: > I looked at the net/mime library, but, as the title of the doc page > suggests, it seemed to only be about decoding, not creating: > > https://docs.racket-lang.org/net/mime.html?q=net%2Fmime Ah, right. I think I've made this mistake

Re: [racket-users] How to compile static racket binaries

2020-04-02 Thread Matthew Flatt
Those ".so"s are OS-supplied dynamic libraries, and I think there's no way to link to them statically. Of course, the resulting executable will only work on a sufficiently compatible variant of Linux. Are you seeing a specific problem when moving the executable among machines? If so, what are the

Re: [racket-users] Embedding Racket CS

2020-03-27 Thread Matthew Flatt
At Fri, 27 Mar 2020 15:48:13 -0700 (PDT), zeRusski wrote: > How I might go about embedding Racket CS The current development version (as reflected by snapshot builds) now has support and documentation for that: https://www.cs.utah.edu/plt/snapshots/current/doc/inside/cs-embedding.html Of

Re: [racket-users] Embedding Racket CS

2020-03-29 Thread Matthew Flatt
At Sun, 29 Mar 2020 13:13:08 -0700 (PDT), zeRusski wrote: > First, CS snapshots in Utah and NW mirrors offer no libracketcs.a so I went > ahead and attempted to build CS from the github master. Sadly its `raco` > tool is unaware of the `ctool` subcommand, so I'm guessing snapshots are > built

Re: [racket-users] How to compile static racket binaries

2020-04-02 Thread Matthew Flatt
At Thu, 2 Apr 2020 06:28:00 -0700 (PDT), Tristram Oaten wrote: > I've compiled it on ubuntu 19:10, and am running into this problem on > ubuntu:latest (18.04), due to the different versions of libc. Ah, I didn't realize that the C library version had changed in recent Linux distributions. (It

Re: [racket-users] Rhombus project plan

2020-04-29 Thread Matthew Flatt
At Wed, 29 Apr 2020 12:46:50 -0400, David Storrs wrote: > In related news, a question for the list: Once I have a handle on this, I > would like to write a "How to Contribute to Racket Documentation" guide. > Where would be the right place for this? Should it be an expansion to an > existing

Re: [racket-users] Questions about working on DrRacket and gui

2020-05-01 Thread Matthew Flatt
At Fri, 1 May 2020 16:59:22 +0200, Dexter Lagan wrote: > I'd like to download DrRacket's source and profile it, say to improve > scrolling performance or track this post-startup lock-up : Does the start-time delay happen if you just type a number and hit return, as opposed to typing an

Re: [racket-users] Futures + threads SIGSEGV

2020-05-02 Thread Matthew Flatt
I wasn't able to produce a crash on my first try, but the Nth try worked, so this is very helpful! I'm investigating, too... At Sat, 2 May 2020 08:26:10 -0400, Sam Tobin-Hochstadt wrote: > I successfully reproduced this on the first try, which is good. Here's > my debugging advice (I'm also

Re: [racket-users] Rhombus project plan

2020-04-29 Thread Matthew Flatt
At Wed, 29 Apr 2020 11:14:47 +0200, Dexter Lagan wrote: > To the point: what would make Racket2 the ultimate tool (for me): > Performance. Faster startup times, shorter execution times in general. > Optionally, a ‘lite’ version of Racket that compiles directly to no-deps > binaries, bypassing

Re: [racket-users] JIT and futures on aarch64

2020-05-16 Thread Matthew Flatt
At Sat, 16 May 2020 17:21:28 +0200, Dominik Pantůček wrote: > after pushing futures on x86 and x86_64 to their limits (and helping > fixing two bugs), I turned my focus on ARM. Apparently everything should > work with 32bit arm without any hurdles (I am going to test that later > today), Futures

Re: [racket-users] Re: Strange behaviour of ptr-ref + ptr-add(?)

2020-05-10 Thread Matthew Flatt
Although `_double*` isn't currently meant to be handled there --- there's no `ptr-ref/_double` specialization --- you're right that the problem is in the `ptr-ref/double` and similar specializations in CS. I've pushed a repair. Thanks for the report, Laurent! At Sun, 10 May 2020 13:57:50 +0200,

Re: [racket-users] How to run multiple Racket installations?

2020-05-08 Thread Matthew Flatt
At Fri, 8 May 2020 01:55:17 -0700 (PDT), zeRusski wrote: > First, does that even work? I noticed that both of them install packages > into ~/Library/Racket/development/ for me. Are both builds so compatible I > don't need to worry about packages stepping on each others toes i.e. > compiled with

Re: [racket-users] Another futures-related bug hunt

2020-05-08 Thread Matthew Flatt
At Fri, 8 May 2020 09:34:32 +0200, Dominik Pantůček wrote: > Apart from obvious strace (after freeze) and gdb (before/after freeze) > debugging to find possible sources of this bug, is there even a remote > possibility of getting any clue how can this happen based on the > information gathered

Re: [racket-users] Another futures-related bug hunt

2020-05-09 Thread Matthew Flatt
At Sat, 9 May 2020 07:18:01 +0200, Dominik Pantůček wrote: > would this be enough to open an issue for that? > > (gdb) info threads >Id Target IdFrame > * 1Thread 0x77c1b300 (LWP 19075) "tut22.rkt" > mark_backpointers

[racket-users] [CfP] DLS 2020 - Dynamic Languages Symposium, submission deadline July 9th

2020-05-18 Thread Matthew Flatt
to the first day of your conference. The official publication date affects the deadline for any patent filings related to published work. Program Committee - Alexandre Bergel, U Chile Shigeru Chiba, U Tokyo Stéphane Ducasse, Inria Tim Felgentreff, HPI Matthew Flatt, U Utah (chair

Re: [racket-users] Scribble citations for art history dissertation (AJA style)

2020-03-19 Thread Matthew Flatt
At Thu, 19 Mar 2020 12:38:39 -0400, Christopher Lemmer Webber wrote: > I will spend the rest of the day looking at what scriblib's bibliography > stuff does in further detail and think about how to accomplish what we > need. It could be that what I do is build a quicker proof of concept > that

Re: [racket-users] Scribble citations for art history dissertation (AJA style)

2020-03-19 Thread Matthew Flatt
At Thu, 19 Mar 2020 11:46:44 -0400, Christopher Lemmer Webber wrote: > What I thought was the more "Racket'y way" would be to store it as > abstract data that then could be rendered to the appropriate style > (that's what BibTeX and everything else does). Well, perhaps the Rackety way is to store

Re: [racket-users] questions about top-level-bind-scope in root-expand-context

2020-03-21 Thread Matthew Flatt
At Sat, 21 Mar 2020 00:00:07 -0700 (PDT), Yongming Shen wrote: > First, in the source file expander/expand/bind-top.rkt, there is a comment > that says "When compiling `(define-values (x) ...)` at the top level, > we'd like to bind `x` so that a reference in the "..." will point back to > the

Re: [racket-users] questions about top-level-bind-scope in root-expand-context

2020-03-23 Thread Matthew Flatt
At Mon, 23 Mar 2020 01:45:40 -0700 (PDT), Yongming Shen wrote: > I tried the example you gave for my first question and it resulted in an > error. Oops --- you're right. I lost track of what we try to make work at the top level. > I think this is because `(define-values (x) ...)` expands `...`

Re: [racket-users] How do I properly set current-module-name-resolver for a process?

2020-05-19 Thread Matthew Flatt
At Tue, 19 May 2020 20:10:01 +, Sage Gerard wrote: > I'm trying to figure out how to set current-module-name-resolver in > advance of all other code for a process. I'm guessing this would > require a custom launcher that does (for example) `racket -l > foo/replace-resolver bar.rkt`. That can

Re: [racket-users] Cross-building Racket applications for 64bit Windows on Linux

2020-05-23 Thread Matthew Flatt
(which is a different question than trying to run BC on wine), then we can start thinking about how to fill in the last NxM pieces for CS. At Sat, 23 May 2020 10:25:31 -0600, Matthew Flatt wrote: > Have you already tried using `raco exe` on Linux (i.e., using Racket > for Linux) but generating W

Re: [racket-users] Hunting a possible fsemaphore-post/wait bug

2020-05-23 Thread Matthew Flatt
I'm not sure this is the problem that you're seeing, but I see a problem with the example. It boils down to the fact that futures do not provide concurrency. That may sound like a surprising claim, because the whole point of futures is to run multiple things at a time. But futures merely offer

Re: [racket-users] Cross-building Racket applications for 64bit Windows on Linux

2020-05-23 Thread Matthew Flatt
Have you already tried using `raco exe` on Linux (i.e., using Racket for Linux) but generating Windows executables? https://docs.racket-lang.org/raco/cross-system.html Note that the "tarball" distributions at places like https://download.racket-lang.org/releases/7.7/ can be handy for

Re: [racket-users] Hunting a possible fsemaphore-post/wait bug

2020-05-23 Thread Matthew Flatt
At Sat, 23 May 2020 18:51:23 +0200, Dominik Pantůček wrote: > But that is just where the issue is showing up. The real question is how > the counter gets decremented twice (given that fsemaphores should be > futures-safe). I found a configuration that triggered the bug often enough on my machine.

Re: [racket-users] Detecting whether failure-result is used by dict-ref using chaperones?

2020-05-21 Thread Matthew Flatt
Stepping back a little, a chaperone constructor for a datatype often needs some inside information and cooperation from the dataype implementation. For example, `chaperone-hash` has the property that you want --- the filter applied to a `hash-ref` result doesn't get used if a failure thunk

Re: [racket-users] Create C functions for embedded Racket CS

2020-09-03 Thread Matthew Flatt
At Wed, 2 Sep 2020 14:05:11 -0700 (PDT), dotoscat wrote: > There are a function such scheme_make_prim_w_arity > _arity%29> > for the CS version? The idea is to use Racket > as a scripting language for a C program.

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 >

<    3   4   5   6   7   8   9   10   >