[racket-users] break-thread + thread-wait can't be handled

2017-05-03 Thread Eric Griffis
Hello, I'm having trouble catching "terminate break" exceptions when combining break-thread with thread-wait. MWE 1: (with-handlers ([exn:break:terminate? writeln]) (let ([t (thread (lambda () (thread-wait (current-thread]) (break-thread t 'terminate) (thread-wait t)))

Re: [racket-users] break-thread + thread-wait can't be handled

2017-05-04 Thread Eric Griffis
On Wednesday, May 3, 2017 at 3:04:20 PM UTC-7, Ryan Culpepper wrote: > On 5/3/17 10:41 PM, Eric Griffis wrote: > > Hello, > > > > I'm having trouble catching "terminate break" exceptions when combining > > break-thread with thread-wait. &g

Re: [racket-users] Intro and projects inquiry

2017-10-13 Thread Eric Griffis
On Thu, Oct 12, 2017 at 2:27 PM Andrew Gwozdziewycz wrote: > I love seeing all of these project ideas, but I really don't think > Racket needs a "killer app." I think what it needs is the people > passionate about it building tools in it, and *using* those tools in > the work

Re: [racket-users] Intro and projects inquiry

2017-10-13 Thread Eric Griffis
On Thu, Oct 12, 2017 at 9:31 AM David Storrs wrote: > My suggestion would be that the single largest thing that would make > Racket take off is if it could become a replacement for Javascript. RacketScript Playground does not optimize tail calls. If it turned ES6 strict

Re: [racket-users] Intro and projects inquiry

2017-10-11 Thread Eric Griffis
On Wed, Oct 11, 2017 at 2:58 PM Neil Van Dyke wrote: > > * Being there soon with a Web Assembly and HTML5 plus server full-stack > story, in case developers respond favorably to that. > Web back-ends are my wheelhouse. It sure would make my professional life easier... Not

Re: [racket-users] Intro and projects inquiry

2017-10-11 Thread Eric Griffis
looking for projects I’d start > by looking there. > > — > William J. Bowman > > > On Oct 11, 2017, at 10:12 PM, Eric Griffis <ded...@gmail.com> wrote: > > > > Hello, > > > > My name is Eric and I love Racket. > > > > I am 39 years old and have

[racket-users] Intro and projects inquiry

2017-10-11 Thread Eric Griffis
Hello, My name is Eric and I love Racket. I am 39 years old and have been writing software for 30 years. I studied metaprogramming and taught programming languages as a grad student. My sole academic publication is on semantics and provenance for distributed data science tools. These days, I

Re: [racket-users] Announcing Event-lang

2018-05-22 Thread Eric Griffis
On Mon, May 21, 2018 at 11:21 AM Jay McCarthy wrote: > This is very cute! Can you point to a fun example? I looked through > the repo and it wasn't obvious where some tests and examples were. > > Jay > Here's a variety of small examples. Sometimes, I just want to wait

Re: [racket-users] Announcing Event-lang

2018-05-24 Thread Eric Griffis
t-lang` docs. > > > On May 22, 2018, at 7:29 AM, Eric Griffis <ded...@gmail.com> wrote: > > Here's a variety of small examples. > > > -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this gr

[racket-users] Announcing Event-lang

2018-05-18 Thread Eric Griffis
Hi everyone, I would like to announce the initial release of event-lang, an experimental Racket library that simplifies the creation of complex synchronizable events. https://pkgd.racket-lang.org/pkgn/package/event-lang Event-lang provides a primitive expression lifting form, > (pure 123)

Re: [racket-users] Recommendation for learning syntax?

2018-08-10 Thread Eric Griffis
A few months ago, I was similarly confused. Here's what I remember learning since then. Let's call the character-level syntax of a language *concrete* and any higher-level syntax *abstract*. By these definitions, a *parser* makes concrete syntax abstract, and an *interpreter* translates one piece

Re: [racket-users] redex features? boolean ops and piece-wise

2018-03-15 Thread Eric Griffis
On Wednesday, March 14, 2018 at 3:14:34 PM UTC-7, Robby Findler wrote: > > I usually use metafunctions for that purpose. It might be nice if there > were more such functions built into redex that came with their own renders, > I guess. > > More than once, I've gotten stuck typesetting in Redex

[racket-users] Using pict-convertibles in Scribble docs?

2018-04-15 Thread Eric Griffis
Hello, I'm making composite picts in my Scribble docs and am looking for a clean way to keep references to sub-picts around for helper functions to draw lines between. A struct with the `prop:pict-convertible` property would suffice, but `raco setup` gives an error. Given this struct definition:

Re: [racket-users] struct-copy question

2018-03-17 Thread Eric Griffis
How about a list of identifiers bound to getters or setters? The `extract-struct-info` procedure in Section 5.7 of the Racket Reference appears to give you that. Eric On Fri, Mar 16, 2018 at 2:56 PM Kevin Forchione wrote: > > > > On Mar 16, 2018, at 2:38 PM, Kevin Forchione

Re: [racket-users] struct-copy question

2018-03-19 Thread Eric Griffis
(dump-struct-info point) (GOT (# # # (# # #) (# #f #f) #t)) ``` Eric On Sat, Mar 17, 2018 at 8:15 PM Kevin Forchione <lyss...@gmail.com> wrote: > > > > On Mar 17, 2018, at 9:24 AM, Eric Griffis <ded...@gmail.com> wrote: > > > > How about a list

Re: [racket-users] struct-copy question

2018-03-21 Thread Eric Griffis
I bump into struct subtleties all the time. For example, my attempts to #:auto always degenerate into custom constructor procedures; This usually involves #:constructor-name and #:omit-define-syntaxes, which might not be a big deal if I had a solid understanding of what these flags actually do. So

Re: [racket-users] Scribble xref links in frog

2018-10-08 Thread Eric Griffis
to update the docs.racket-lang.org URL > > to use https, if that's an easy PR you wanted to do? > > > > On Mon, Oct 8, 2018 at 2:50 PM Eric Griffis wrote: > >> > >> My frog-generated blog is almost ready, but there's one detail stopping > >> the show: >

Re: [racket-users] Scribble xref links in frog

2018-10-08 Thread Eric Griffis
On Mon, Oct 8, 2018 at 1:07 PM Greg Hendershott wrote: > > Is this for .md or .scrbl sources? For .scrbl sources. > If scribble: It's been some years since I worked on this, but at a > quick glance Frog is running Scribble with --redirect-main > http://docs.racket-lang.org/ > > >

Re: [racket-users] Scribble xref links in frog

2018-10-08 Thread Eric Griffis
On Mon, Oct 8, 2018 at 5:40 PM Matthew Flatt wrote: > > --redirect https://docs.racket-lang.org/local-redirect/ This works. Thanks! Eric -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving

[racket-users] Scribble xref links in frog

2018-10-08 Thread Eric Griffis
My frog-generated blog is almost ready, but there's one detail stopping the show: Is there a way to make frog link to docs.racket-lang.org for all scribble cross-references? Exports from the "special" modules (racket/base, racket, ...) already point to docs.racket-lang.org, but cross-referencing

Re: FW: [racket-users] colon keywords

2018-09-23 Thread Eric Griffis
Thanks for the crisp explanation, Jos. This is exactly my concern. Eric On Sun, Sep 23, 2018, 2:38 PM Jos Koot wrote: > Forgot to include the users group. > > -Original Message- > From: Jos Koot [mailto:jos.k...@gmail.com] > Sent: 23 September 2018 21:37 > To: 'Tomasz Rola' >

Re: [racket-users] Re: Functional augmenting

2019-01-08 Thread Eric Griffis
My bad. I confused ordinary with generic. On Tue, Jan 8, 2019, 9:47 AM Eric Griffis Apologies for the backtracking, but I'm still having trouble understanding > before/after/between and ordinary function composition. For non-method > functions, what's the difference? > > Also, I'd

Re: [racket-users] Error location in test submodules

2019-04-02 Thread Eric Griffis
On Tue, Apr 2, 2019 at 1:04 PM Tom Gillespie wrote: > > Are you using emacs racket-mode? I am, almost exclusively. Exception and check failure locations can be a pain, but they work in general. > On Tue, Apr 2, 2019 at 3:41 PM zeRusski wrote: >> >> If I have many test chunks spread around my

[racket-users] [ANN] Algebraic Racket

2019-03-31 Thread Eric Griffis
I am pleased to announce Algebraic Racket, an extension for algebraic structures in untyped Racket. https://github.com/dedbox/racket-algebraic Algebraic structures provide the operational under-pinnings for algebraic data types. What's missing is the static typing constraints. The initial

Re: [racket-users] Re: What is the best way to "raco make" all *.rkt files in a directory tree?

2019-03-11 Thread Eric Griffis
On Mon, Mar 11, 2019 at 12:04 PM Brian Adkins wrote: > > Hmm... maybe the problem was just my lack of shell skills. I think the > following works: > > raco make -j 8 */*.rkt This will only make the rkt files in subdirectories of the current working directory, excluding sub-subdirectories and

[racket-users] scopes across files

2019-06-03 Thread Eric Griffis
Several times now, I've run into one or another form of the following problem: Say I want to build primitives to 1. declare an "interface" as a list of names, and 2. implement and use those names at run time in a limited scope Concretely, I want to run the following code: (interface

[racket-users] Re: scopes across files

2019-06-03 Thread Eric Griffis
go from intersecting to disjoint or sharing only a macro scope. On Mon, Jun 3, 2019, 11:52 AM Eric Griffis wrote: > Several times now, I've run into one or another form of the following > problem: > > Say I want to build primitives to > >1. declare an "interf

Re: [racket-users] scopes across files

2019-06-11 Thread Eric Griffis
On Thu, Jun 6, 2019 at 12:19 AM Fastmail wrote: > > The `implement` macro needs to place its identifiers (say, `say`) inside > the lexical context of the calling site, so that they bind other code > coming in from the calling site (for instance, `(say 'hello)`). Thanks! This was incredibly

Re: [racket-users] Re: doing a "show hn" of your racket project

2019-06-23 Thread Eric Griffis
This is the kind of stuff I look for in my Twitter feed. If I knew how to subscribe to updates, I would. Eric On Fri, Jun 21, 2019 at 1:16 AM Dexter Lagan wrote: > > Once my git repos will be presentable, you can be sure I'll show it all to > HN. I'm a beyond-full-time Racket programmer and

[racket-users] Can phase-1 transformer bindings be overridden locally?

2019-05-03 Thread Eric Griffis
I have a macro that creates transformer bindings at phases 0 and 1: (define-syntax (f stx) (with-syntax ([name (cadr (syntax-e stx))]) #'(begin (define-syntax name (syntax-id-rules () [_ 1])) (begin-for-syntax (define-syntax name (syntax-id-rules () [_ 2])) Normally,

Re: [racket-users] Pattern matching as computation

2019-06-27 Thread Eric Griffis
On Thu, Jun 27, 2019 at 11:56 AM David Storrs wrote: > > Suppose instead I wanted to have a pattern like so (this does not work): > > (match (vector 1 2 3 4) > [(vector a (app + b ..2 x) c) (list a b c x)] > ; => '(1 (2 3) 4 5)) ; NB: does not work We have a few problems here. The pattern

[racket-users] [PSA] Upcoming projects

2019-06-27 Thread Eric Griffis
Hello everyone, Over the next few months, I will be breaking ground on three new projects. == A diagramming library == An Algebraic Racket port of Haskell's diagrams library: https://archives.haskell.org/projects.haskell.org/diagrams/ I love this design. It's like Pict, but the API is

Re: [racket-users] [PSA] Upcoming projects

2019-06-28 Thread Eric Griffis
On Thu, Jun 27, 2019 at 9:12 PM Daniel Prager wrote: > > Hi Eric > > They all sound great. > > I'm particularly interested in the first two, and was very impressed by the > Diagram project gallery, and it would be great to see in Racket. Cool! Thanks for the comments. > Quick question: Why

Re: [racket-users] [PSA] Upcoming projects

2019-06-28 Thread Eric Griffis
> Why implement these projects in Algebraic Racket? Good question -- not so easy to answer cleanly. Here's a smattering. I created Algebraic Racket to make functional meta-programming in Racket more enjoyable. My talk will demonstrate what I mean by that and why it matters in practice. The

Re: [racket-users] Evaluating to get the output with a specific lang

2019-11-10 Thread Eric Griffis
PM Christopher Lemmer Webber < cweb...@dustycloud.org> wrote: > Hi Eric! Thanks very much for the reply. > > Eric Griffis writes: > > >> It appears there must be; when I look at `build-program` in > >> sandbox.rkt it also looks like it's wrapping thing

Re: [racket-users] Evaluating to get the output with a specific lang

2019-11-10 Thread Eric Griffis
On Sun, Nov 10, 2019 at 6:45 AM Christopher Lemmer Webber < cweb...@dustycloud.org> wrote: > > It sounds like what I want is the case of the export. I'll run with this. > I guess a question remaining then is: if I'm doing this kind of dynamic > import of the module, is there a way to require

Re: [racket-users] Re: Inadvertedly requiring racket/unsafe/ops

2019-12-14 Thread Eric Griffis
Unsafe operations are usually defined externally, like in a C extension, where safety is harder to guarantee and module hierarchies are less idiomatic. The "unsafe" moniker is a standard warning that you are responsible for understanding the underlying implementation and calling into it

Re: [racket-users] Remind me?: bidirectional channel-ish thing in two parts

2019-10-25 Thread Eric Griffis
Maybe pipe ports? https://docs.racket-lang.org/reference/pipeports.html Eric On Thu, Oct 24, 2019, 11:28 PM David Storrs wrote: > I saw something in the Reference about bi-directional {pipes | > channels | ???} with a constructor that returned two values, A and B, > where data put onto A

Re: [racket-users] Re: My macro works in the global namespace, but fails inside of a let

2019-10-07 Thread Eric Griffis
Hi Cistian, Both of your examples are hygienic, in the sense that neither actually do anything that violates macro hygiene. When `a_definition` is defined in the module context (i.e., the "global namespace"), it has the same scope as the `a_definition` used inside `my-macro`. (There's more to

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

2020-01-27 Thread Eric Griffis
Hi Sage, This is pretty cool. With a non-OOP option on the table, I might finally get around to working on an IMGUI-like for Racket. Have you thought about a reader extension to compress the notation? The `stateful-cell` function kinda acts like a box and kinda looks like a `syntax` (or

Re: [racket-users] how to reinstall a broken package?

2020-01-23 Thread Eric Griffis
Hi Hendrick, There's always --force. raco pkg remove --force glm This works fine when I know I'm going to reinstall the package before using its dependents. Eric On Thu, Jan 23, 2020 at 6:34 AM Hendrik Boom wrote: > > My installation of OpenGL Mathematics (GLM) for Racket is defective > in

Re: [racket-users] How do I provide a name as both a match expander and contracted function?

2019-12-31 Thread Eric Griffis
Hi Jack, It can be done with make-rename-transformer. (define (foo? obj) (equal? obj foo-impl)) > (define foo-widget list) > > (define/contract (foo-impl _) (-> number? symbol?) 'a-foo) > > (define-match-expander foo > (syntax-parser [(_ widget) #'(? foo? (app foo-widget widget))]) >

[racket-users] Re: Code generation performance

2020-03-14 Thread Eric Griffis
code fast. I guess the next step is to anti-inlinedefine-dvec4-unop and define-dvec4-binop, maybe eliminate some define/contract's, and re-profile. Eric On Friday, March 13, 2020 at 6:20:47 PM UTC-7, Eric Griffis wrote: > > Hello, > > I've got a package that generates (i.e., expands

Re: [racket-users] Re: Code generation performance

2020-03-15 Thread Eric Griffis
On Sat, Mar 14, 2020 at 10:25 PM Hendrik Boom wrote: > > There's a port of glm in the Racket package library. > Is that the same one? If not, is it also that huge? Same repository, different branch. The master branch, which is a couple months old now, implements the matrix and vector types on

[racket-users] Code generation performance

2020-03-13 Thread Eric Griffis
Hello, I've got a package that generates (i.e., expands into) a ridiculous amount of Racket code. I'd like to generate an unbelievable amount of code, but things have already slowed down a lot. At this point, I'm generating 20% of a massive code base and it takes 4 minutes to compile (i.e., raco

Re: [racket-users] Re: Code generation performance

2020-03-18 Thread Eric Griffis
ribly, but it doesn't take much imagination to find a situation where it would, and I have no idea how any of these numbers will scale. Eric On Sat, Mar 14, 2020 at 3:28 PM Eric Griffis wrote: > Alright, I re-discovered Ryan Culpepper's talk, "The Cost of Sugar," from > th

[racket-users] [ANN] Template Macros: A Toolkit for the Practicing Language-Oriented Programmer

2020-03-17 Thread Eric Griffis
Hello, I'm pleased to announce the initial release of *Template Macros*, a Racket library that dramatically simplifies the generation of meta-program code. https://github.com/dedbox/racket-template Template macros infiltrate the spaces under-served by Racket's existing pattern-based and

Re: [racket-users] Contracts on parameters

2020-03-23 Thread Eric Griffis
AFK, but it looks like the contract and function on your define/contract are swapped. Maybe the contract check on the one-arg call sets the parameter and then hilarity ensues? Eric On Mon, Mar 23, 2020, 12:36 PM David Storrs wrote: > (define/contract (foo x) > (-> boolean? any) > 'ok) > >

Re: [racket-users] Scribbling hexadecimal values

2020-09-18 Thread Eric Griffis
Hi Dominik, If you put the hex number in a string, many of the formatting functions in the Scribble manual, section 4.2.1.4 will work: (proc-doc/names name (->* () (integer?) void?) (() ((argument #,(racketvalfont "#x1f" @{ some description })) Eric On Fri, Sep 18, 2020

Re: [racket-users] Rationale for package structure

2021-10-14 Thread Eric Griffis
It's been a while since I created a new package, but as of ~1 year ago, another advantage (or perhaps the same, from a different angle) of the multi-collection format was that it allowed third parties to add modules to the collections I defined. Eric On Sat, Oct 9, 2021, 1:58 PM 'Joel Dueck'