Re: [racket-users] Why are these @defthing blocks typeset incorrectly?

2020-09-24 Thread Sage Gerard
I opted for the read-syntax based solution. For those reading, it's convenient to use `replace-context` from `syntax/strip-context` to donate lexical info. The form of the transformer I used is: @(define-syntax (reformat stx) (replace-context stx (read-syntax #f (open-input-string

[racket-users] Why are these @defthing blocks typeset incorrectly?

2020-09-23 Thread Sage Gerard
I attached an image showing the rendered output of https://github.com/zyrolasting/xiden/blob/master/docs/reference/settings.scrbl#L48 I create an application to `(defthing)` as a datum due to circumstances in the surrounding code. The hacky part being `get-contract-datum`, which tries to

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

2020-09-23 Thread Sage Gerard
Is there a security reason behind omitting #%top-interaction from `setup/infotab`? ~slg -- 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

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

2020-09-15 Thread Sage Gerard
> Matthew > > At Tue, 15 Sep 2020 21:12:22 +, Sage Gerard wrote: > > > The docs for > > [make-sized-byte-string](https://docs.racket-lang.org/foreign/foreign_pointer-f > > uncs.html?q=free#%28def.%28%28quote.~23~25foreign%29._make-sized-byte-string% >

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

2020-09-15 Thread Sage Gerard
The docs for [make-sized-byte-string](https://docs.racket-lang.org/foreign/foreign_pointer-funcs.html?q=free#%28def._%28%28quote._~23~25foreign%29._make-sized-byte-string%29%29) indicate that CS does not support this operation. I'm guessing I just need to fall back to building a loop using

[racket-users] -i as an identifier

2020-09-10 Thread Sage Gerard
It looks like -i cannot be used as an identifier because it evaluates to the complex number 0-1i. So in the v7.8 REPL, (define -i "foo") fails. I noticed this when trying to map CLI flag strings to identifiers. -i was the only one in the set to fall over. In the Reading Numbers section of the

Re: [racket-users] Making expanded bindings visible in top-level

2020-09-07 Thread Sage Gerard
%top-interaction, you should > be able to use #%info-domain in the REPL. > > On Sun, Sep 6, 2020 at 5:53 PM Sage Gerard wrote: > >> I'm writing a variant of >> [setup/infotab](https://github.com/racket/racket/blob/master/racket/collects/setup/infotab.rkt) >> to allow

[racket-users] Making expanded bindings visible in top-level

2020-09-06 Thread Sage Gerard
I'm writing a variant of [setup/infotab](https://github.com/racket/racket/blob/master/racket/collects/setup/infotab.rkt) to allow `#%top-interaction' plus some other bindings of my choice. But when I create a evaluator in the context of such a module, `#%info-domain' and `#%info-lookup' are

Re: [racket-users] Can OpenSSL be upgraded for the next Racket release?

2020-08-18 Thread Sage Gerard
Thank you for this. This is such a helpful change! Original Message On Aug 18, 2020, 7:42 PM, Matthew Flatt wrote: > Yes --- done. > > Matthew > > At Mon, 17 Aug 2020 17:46:49 +0100, Andre Garzia wrote: >> Hi Folks, >> >> The OpenSSL DLLs being shipped with Racket (in version

Re: [racket-users] Why am I not fully releasing this SSL listener?

2020-07-24 Thread Sage Gerard
yer. > > Ryan > > On Fri, Jul 24, 2020 at 6:19 PM Sage Gerard wrote: > >> I'm trying to understand how I am failing to shut down an ssl-listener on >> v7.7.0.5. >> >> https://gist.github.com/zyrolasting/bc5477bfa60d7185d0f53a5142545f88 shows >> my use of s

[racket-users] Why am I not fully releasing this SSL listener?

2020-07-24 Thread Sage Gerard
I'm trying to understand how I am failing to shut down an ssl-listener on v7.7.0.5. https://gist.github.com/zyrolasting/bc5477bfa60d7185d0f53a5142545f88 shows my use of ssl-* procedures to transmit data using test.pem. The problem is that I cannot run the test submodule twice in a row because

[racket-users] New package: place-controllers

2020-07-03 Thread Sage Gerard
Here's a way to encapsulate places in a generator-like procedure: [https://docs.racket-lang.org/place-controller/index.html](https://docs.racket-lang.org/place-controller/index.html?q=place%20con) I ended up writing this to support a parallel build model, such that a single (apply sync (p1)

[racket-users] New package: mind-map

2020-06-17 Thread Sage Gerard
I take notes using short indented lines, so I wrote a #lang using Pythonic indentation rules to interpret my notes as nodes in a mind map. Source for the interested: https://github.com/zyrolasting/mind-map With thanks to Hadi Moshayedi for racket-graphviz. I use that to render the maps. Time

Re: [racket-users] Why does this counter behave differently in different runtimes?

2020-06-17 Thread Sage Gerard
> (provide) >> (print-as-expression '#t) >> (void))) >> >> It seems perhaps an optimization has gone awry. The bug appears to be quite >> old: I can reproduce it as far back as 6.1.1. (I didn’t test any versions >> earlier than that.) Unsurprisingly, the issue does not

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

2020-05-19 Thread Sage Gerard
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`. In that sense, I expect that a `replace-resolver` of the form below

Re: [racket-users] Re: Requesting feedback on CSS3 parser and tokenizer

2020-05-12 Thread Sage Gerard
.odt format files. Not sure, though. > Don't have my .odt manual at hand. > And in .epub files. > > -- hendrik > > > Alex. > > On Wednesday, May 13, 2020 at 6:37:22 AM UTC+8, Sage Gerard wrote: > > > > > I'm working to release a CSS3 tokenizer and parser to

[racket-users] Requesting feedback on CSS3 parser and tokenizer

2020-05-12 Thread Sage Gerard
I'm working to release a CSS3 tokenizer and parser to the catalog tomorrow. https://github.com/zyrolasting/css3-syntax The current state lacks tests, so any logic errors should keep me busy for a little longer. I'm here to ask for bug reports and feedback in the issue tracker since I had my

Re: [racket-users] Re: Should I stop sending packages to the catalog?

2020-05-01 Thread Sage Gerard
As long as I don't have to keep reorganizing my code to accommodate the tooling, then it's a night and day improvement. Would you mind terribly if I worked with you? I was mulling over this myself in the dev list, but I am happy to aid any existing effort. Original Message On

Re: [racket-users] Should I stop sending packages to the catalog?

2020-04-30 Thread Sage Gerard
-------- > > Jay McCarthy > Associate Professor @ CS @ UMass Lowell > http://jeapostrophe.github.io > Vincit qui se vincit. > > On Wed, Apr 29, 2020 at 12:47 PM Sage Gerard s...@sagegerard.com wrote: > > > April 9th

[racket-users] Should I stop sending packages to the catalog?

2020-04-29 Thread Sage Gerard
April 9th in the #general Slack channel taught me that there was no clean way to release a breaking change in a package. I'm open to working on version pinning support in raco pkg provided that a maintainer can walk me through some code. In the meantime, as much as I appreciate the efforts made

Re: [racket-users] Rhombus project plan

2020-04-29 Thread Sage Gerard
Apologies if this is a tired question, and please link me to any answer I missed. If Racket is a component of the overall system, does that imply that it can "reach out" from it's new home in the ecosystem and use all of the new features available beyond Phase 4? ~slg ‐‐‐ Original

[racket-users] Reporting odd linklet error blocking my project

2020-04-23 Thread Sage Gerard
Reposting here. I'm experiencing what I believe is a blocker that is preventing me from building updates for my website. I am not at all sure how the private contract libs got into the shown state, but I left as many details as I knew to share. Any assistance appreciated.

Re: [racket-users] Unfinished S-Expressions in scribbled code blocks

2020-04-12 Thread Sage Gerard
Does scribble/examples offer what you need? Original Message On Apr 12, 2020, 4:23 AM, Dominik Pantůček wrote: > Hello fellow Racketeers, > > I've started a small side project and as a part of that I want to write > some articles interspersed with code. Scribble was a natural

[racket-users] How to Create a Pollen Markup Alternative in 61 Lines

2020-02-29 Thread Sage Gerard
This is a fun workshop-style post as per the subject line. https://sagegerard.com/making-powerful-racket-markup.html It took a while to figure out how to mix #langs without hitting the filesystem, let alone distill it to a post. If convenient, please play with this for a bit and see if you

[racket-users] Creating Living Builds in Racket

2020-02-20 Thread Sage Gerard
I'm excited about this one: I put out an experimental release of unlike-assets/reactive and would love some feedback/shares. https://sagegerard.com/unlike-assets-reactive-demo.html TL;DR: That article is about making living builds in Racket, meaning an expression like (u/a "file.txt" number?)

Re: [racket-users] Starting syntax highlighter project

2020-02-19 Thread Sage Gerard
ing_Check_Syntax_Programmatically.html#%28def._%28%28lib._drracket%2Fcheck-syntax..rkt%29._annotations-mixin%29%29) > shows how we can extract such information. > > - > > On Wed, Feb 19, 2020 at 5:19 PM Sage Gerard wrote: > >> Thank you for the reference, Martin. After lo

Re: [racket-users] Starting syntax highlighter project

2020-02-19 Thread Sage Gerard
tyle files? For the latter route this haskell package > is a good source of inspiration: > https://hackage.haskell.org/package/skylighting > > martin > > On Tue, Feb 18, 2020 at 10:27 AM Sage Gerard wrote: > >> Hi folks, >> >> I'm starting a syntax highlight

[racket-users] Starting syntax highlighter project

2020-02-18 Thread Sage Gerard
Hi folks, I'm starting a syntax highlighter project here: https://github.com/zyrolasting/syntax-highlighting There seems to be a precedent for using an existing highlighter from another ecosystem. I understand the pragmatism behind that, but a syntax highlighter seems to me a missing battery

Re: [racket-users] plan to build a continuous integration system in racket

2020-02-17 Thread Sage Gerard
Yes, I understood that. Speaking for myself I'd want to see what other people are doing to inform my own designs. My suggestion was in that spirit. Original Message On Feb 17, 2020, 5:12 PM, Paulo Matos wrote: > On Thursday, 13 February 2020 14:35:42 UTC+1, Sage Gerard wr

Re: [racket-users] Questions on a very simple class

2020-02-15 Thread Sage Gerard
1. If the intention is to create a class, then I'd use the class form. https://docs.racket-lang.org/reference/createclass.html#%28form._%28%28lib._racket%2Fprivate%2Fclass-internal..rkt%29._class%2A%29%29 Not that there's anything overtly wrong with using a closure, but common validation tasks

Re: [racket-users] plan to build a continuous integration system in racket

2020-02-13 Thread Sage Gerard
Some core devs are already looking into building a new CI/CD for use in the project. Maybe it would be worth taking a look at the Racket Slack and ask if you can participate in the #ci channel. Re: web dev, maybe one of my posts can help, but it's more of a supplement to a guide you already

Re: [racket-users] Announcing something Kinda FRP-y

2020-01-27 Thread Sage Gerard
tions. Extending the reader to abbreviate > `(stateful-cell 1)` and `(stateful-cell (λ _ (+ (x) (y` to, say, > #?1 and #?(+ (x) (y)), respectively, could be a fun project. > > Eric > > On Sun, Jan 26, 2020 at 3:30 PM Sage Gerard wrote: >> >> Announcing a n

[racket-users] Announcing something Kinda FRP-y

2020-01-26 Thread Sage Gerard
Announcing a new package: kinda-ferpy. Here's a [write-up](https://sagegerard.com/kinda-ferpy-intro.html). It implements the spreadsheet metaphor in an expressive way, based on MaiaVictor's excellent [PureState library](https://github.com/MaiaVictor/PureState). It's not a complete functional

Re: [racket-users] Showing off Goblins' time-traveling-debugging support in Terminal Phase

2020-01-26 Thread Sage Gerard
Nice, I'll actually be competing with a flavor of MaiaVictor's library for reactive models. Time travel is a great add! Original Message On Jan 26, 2020, 3:07 PM, Christopher Lemmer Webber wrote: > Not the most interesting part of Spritely Goblins (that is in the >

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

2020-01-13 Thread Sage Gerard
I'd take this thread as evidence that outdated information is easier to discover than Rhombus. How many mentions of "Racket2" currently ranking in search engines have added mentions of Rhombus? Maybe it's not a big problem right now, but could it get harder to manage? Original Message

Re: [racket-users] telnet postcard.sfconservancy.org 2333

2019-12-19 Thread Sage Gerard
Super cool, and a catchy way to send it out! Original Message On Dec 19, 2019, 11:56 AM, Christopher Lemmer Webber wrote: > If you enter the subject of this email into a terminal, you'll see a > cool, live Racket "greetings card" for my friends at Software Freedom >

Re: [racket-users] xml library clarification - "" symbol parsing

2019-11-22 Thread Sage Gerard
I'm interested in this quote: > [...] creating a huge problems with even simple XML parsing. (I am basically > battling XML lib all day already to do most simple tasks) I think that when you asked about why the xml collection behaves the way it does, the conversation turned away from your

[racket-users] Vulkan integration: Contributors Update

2019-11-15 Thread Sage Gerard
New update on the Vulkan collection: https://sagegerard.com/racket-vulkan-contributors-update.html High points: - A CLI is now available to control code generators and Vulkan specifications. You can now generate Racket bindings that don't need a code dependency on the collection, and can keep

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

2019-11-07 Thread Sage Gerard
To add: Is it wise to put (begin (sync (system-idle-evt)) (collect-garbage)) in a flush callback on the exit handler's plumber? ~slg ‐‐‐ Original Message ‐‐‐ On Thursday, November 7, 2019 1:02 PM, Bryant Curto wrote: > Thank you Matthew for your response! > >>One catch is that

[racket-users] How should I track versions for racket-vulkan?

2019-11-01 Thread Sage Gerard
Re: racket-vulkan, I'd like to have a version number that conveys which version of the Vulkan specification I'm tracking, as well as the version of the utilities I write surrounding it. Per the docs for (valid-version?) and package metadata, it does not look like I can do this well. I'm not

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

2019-10-30 Thread Sage Gerard
threads involves coping the C stack, which often annoys C/C++ > libraries. > > Will the callback definitely be invoked in the same OS-level thread as > calls to Vulkan functions? If not, then specify `#:async-apply (lambda > (thunk) (thunk))` alongside `#:atomic? #t` t

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

2019-10-27 Thread Sage Gerard
, 2019, 1:56 AM, Sage Gerard wrote: > Hi Ryan, and thank you for the detailed and informative reply! > > I gathered that I should trust Racket's handling of values across the foreign > boundary more, > and used what I learned from your email to get past one error. Sadly, I > la

Re: [racket-users] eq? of quoted expressions

2019-10-25 Thread Sage Gerard
Typo: Meant (let ([l (quote (a))]) (eq? l l)) ~slg ‐‐‐ Original Message ‐‐‐ On Friday, October 25, 2019 12:28 PM, Sage Gerard wrote: > By https://docs.racket-lang.org/reference/symbols.html, Two interned symbols > are eq? to each other. > > But in the other example, you a

Re: [racket-users] eq? of quoted expressions

2019-10-25 Thread Sage Gerard
By https://docs.racket-lang.org/reference/symbols.html, Two interned symbols are eq? to each other. But in the other example, you are comparing two lists each containing a single symbol. A new list is created in each expression, and eq? is comparing the object references and not the content.

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

2019-10-24 Thread Sage Gerard
try/vulkan/specs/1.1-extensions/man/html/vkGetInstanceProcAddr.html ~slg ‐‐‐ Original Message ‐‐‐ On Thursday, October 24, 2019 8:54 PM, Ryan Culpepper wrote: > On 10/25/19 12:45 AM, Sage Gerard wrote: > > > I am porting some C++ code to Racket that uses a function pointer. >

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

2019-10-24 Thread Sage Gerard
I am porting some C++ code to Racket that uses a function pointer. C++ origin: See 294 through 306: https://github.com/Erkaman/vulkan_minimal_compute/blob/master/src/main.cpp#L294 Racket destination: https://github.com/zyrolasting/racket-vulkan/blob/master/examples/mandelbrot.rkt#L240 How do I

Re: [racket-users] What's "#"?

2019-10-23 Thread Sage Gerard
‐‐‐ Original Message ‐‐‐ On Wednesday, October 23, 2019 11:04 AM, Sage Gerard wrote: > Alright, thanks. I have a couple of leads on what happened, but since the > implementation details are private I'm unsure of the best troubleshooting > technique in this context. > > For

Re: [racket-users] What's "#"?

2019-10-23 Thread Sage Gerard
58 AM, Sam Tobin-Hochstadt wrote: > `#` is how a representation of one of the internal AST > types for the compiler is printed. When you see it, it definitely > means some memory got corrupted. > > Sam > > On Tue, Oct 22, 2019 at 4:52 PM Sage Gerard wrote: >> >> Her

[racket-users] What's "#"?

2019-10-22 Thread Sage Gerard
Here's a Vulkan app that prints the properties of the first physical device on the system: https://github.com/zyrolasting/racket-vulkan/blob/master/examples/mandelbrot.rkt#L39 If you comment out the call to `vkGetPhysicalDeviceProperties`, the main module works. I create a Vulkan instance,

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

2019-10-22 Thread Sage Gerard
a pointer to a `_VkInstance` happens on the C side. Taking it from the top: At Mon, 21 Oct 2019 19:07:40 +0000, Sage Gerard wrote: (define _VkInstance (_cpointer 'VkInstance_T)) So far, so good.`VkInstance` is defined in Vulkan to be a pointer to unspecified memory, so this makes sense. T

Re: [racket-users] Re: I Need Help Bringing Vulkan to Racket

2019-10-21 Thread Sage Gerard
Yes, see https://github.com/zyrolasting/racket-vulkan/blob/master/examples/minimal.rkt ~slg Original Message On Oct 21, 2019, 6:17 PM, Hendrik Boom wrote: > On Mon, Oct 21, 2019 at 07:42:39PM +0000, Sage Gerard wrote: >> Thanks Paulo, I will follow up off-list. >

Re: [racket-users] Re: I Need Help Bringing Vulkan to Racket

2019-10-21 Thread Sage Gerard
a non-trivial application and getting more people involved. ~slg ‐‐‐ Original Message ‐‐‐ On Monday, October 21, 2019 11:18 AM, Paulo Matos wrote: > On Wednesday, 9 October 2019 22:56:48 UTC+2, Sage Gerard wrote: > >> I'm resuming work on a very early-stage project that g

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

2019-10-21 Thread Sage Gerard
e this example work? If I can just understand that, I can bring that back to the prior example. ~slg ‐‐‐ Original Message ‐‐‐ On Sunday, October 20, 2019 7:24 PM, Matthew Flatt mfl...@cs.utah.edu wrote: > At Sun, 20 Oct 2019 23:07:58 +, Sage Gerard wr

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

2019-10-20 Thread Sage Gerard
> #:c-id vkEnumerateInstanceLayerProperties) > (define (vkEnumerateInstanceLayerProperties) > (define len (vkEnumerateInstanceLayerProperties/private 0 #f)) > (define props (malloc _VkLayerProperties len)) > (define new-len (vkEnumerateInstanceLayerProperties/private len props)) > (values new-len props)

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

2019-10-19 Thread Sage Gerard
Consider the following C++ that calls a function once to learn how much it should allocate for a vector, and again to populate said vector. uint32_t count; vkEnumerateInstanceLayerProperties(, NULL); std::vector properties(count); vkEnumerateInstanceLayerProperties(, properties.data());

[racket-users] Vulkan integration ready for first round of testing

2019-10-18 Thread Sage Gerard
I think I'm ready to do my first rounds writing/supporting Vulkan applications. It would not surprise me if some design gaps pop up, but I think we're in a good spot. Source code: https://github.com/zyrolasting/racket-vulkan/ Write up: https://sagegerard.com/racket-vulkan-before-testing.html

[racket-users] Seeking feedback on Vulkan integration progress

2019-10-17 Thread Sage Gerard
I finished generating C enums, bitsets, function pointers, structs, unions and handle declarations from the Vulkan API registry. I wrote an article on the topic with a link to the current output module [1]. I tried using dynamic-ffi but hit an issue re: header selection that I expect will be

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

2019-10-16 Thread Sage Gerard
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 simple (displayln) stops producing output. What's happening?

Re: [racket-users] I Need Help Bringing Vulkan to Racket

2019-10-14 Thread Sage Gerard
or @ CS @ UMass Lowell > http://jeapostrophe.github.io > Vincit qui se vincit. > > On Thu, Oct 10, 2019 at 5:56 AM Sage Gerard wrote: > >> I'm resuming work on a very early-stage project that generates FFI bindings >> for Vulkan in Racket [1]. VkTk is the closest relative

[racket-users] polyglot update + new search-upwards package

2019-10-11 Thread Sage Gerard
Giving away some more code. - polyglot is now version 1.0. Includes a new functional workflow where Markdown+Racket pages can replace themselves entirely [1]. The public API now includes the means to evaluate Racket modules stored in tagged x-expressions (Thanks to Paulo Matos for the

Re: [racket-users] How do I typeset mixed-code for docs.racket-lang.org?

2019-10-09 Thread Sage Gerard
ed/tree/nested-minted/nested.scrbl > > > > William J. Bowman > > On Tue, Oct 08, 2019 at 05:06:40P

[racket-users] I Need Help Bringing Vulkan to Racket

2019-10-09 Thread Sage Gerard
I'm resuming work on a very early-stage project that generates FFI bindings for Vulkan in Racket [1]. VkTk is the closest relative project I have found for reference [2]. Last time I was on the project I was focused on generating bindings from the API registry. That has not changed. I

[racket-users] How do I typeset mixed-code for docs.racket-lang.org?

2019-10-08 Thread Sage Gerard
One of my projects allows for embedding Racket modules within elements, within a Markdown page. ## Hello World