[racket-users] Making sequences with missing values

2021-03-07 Thread Raoul Schorer
Hi, I'd like missing values (NAs) *a la R* in sequences, such as a `bit-vector` with a 3rd NA value (therefore taking 2 bits/element and not 1). I'd like that for integers, flonums, etc. too. I'm trying to make a (struct seq/na (mask data)) with prop:sequence, separating the NA mask from the

Re: [racket-users] benchmarks game

2020-10-26 Thread Raoul Schorer
on the benchmark website? Thanks! Le lundi 26 octobre 2020 à 02:21:10 UTC+1, Matthew Flatt a écrit : > 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

[racket-users] benchmarks game

2020-10-25 Thread Raoul Schorer
Hi, I got interested into The Computer Language Benchmarks Game. The binary-trees benchmark is different between the BC (parallel) and CS (single threaded) versions. On trying to execute the parallel version on RacketCS with the expected commands (`raco make binarytrees`, and then `racket

[racket-users] ask a pict its colour?

2020-04-18 Thread Raoul Schorer
Hi, Using the 'pict' library, I could not find predicates regarding color in the doc. Is there something like (get-color (filled-rectangle 30 30)) --> "black" somewhere? If not, how can I make a reliable color predicate? Thanks, Raoul -- You received this message because you are subscribed

[racket-users] printing and reading source code

2020-04-14 Thread Raoul Schorer
Hi, The printer and reader doc states that the default printer can write *core* types to be re-read later. I am making a kind of "3d IDE" for a custom language using the pict3d lib. I would like to re-use the pict3d types, and prototype with an interpreter that consumes a valid racket

[racket-users] Re: expanding to typed/racket using #lang turnstile

2019-10-31 Thread Raoul Schorer
anks again! Le mardi 29 octobre 2019 18:07:21 UTC+1, Raoul Schorer a écrit : > Hi, > > I am attempting to expand to typed/racket from a custom language through > #lang turnstile. Unfortunately, the macro stepper isn't helping me much as > to how I should do that. > So far

[racket-users] expanding to typed/racket using #lang turnstile

2019-10-29 Thread Raoul Schorer
Hi, I am attempting to expand to typed/racket from a custom language through #lang turnstile. Unfortunately, the macro stepper isn't helping me much as to how I should do that. So far, this minimal example: #lang turnstile (require (only-in (prefix-in tr: typed/racket)

[racket-users] function dispatch in typed racket

2019-10-14 Thread Raoul Schorer
Hi, I am trying to write an APL compiler (a typed J implementation) with a typed racket backend. APLs have first-class functions that apply to both scalars and arrays, so there are 2 cases for functions of 2 arguments: - the *array -- array* case - the *scalar -- scalar* case *Scalar --

[racket-users] Best path to a typed/racket compilation target?

2019-10-07 Thread Raoul Schorer
Hi, There are multiple potential ways to compile to typed/racket from a custom language. A few I am aware of: - roll-your-own macros compiling to typed code (my current solution) - typed-expander - turnstile package Maybe there are others that I don't know of, but how you would do it as an

[racket-users] Is there a trick to know which types to specify when importing untyped racket into typed racket?

2019-10-06 Thread Raoul Schorer
Hi, I would very much like to import the package multimethod into a typed module. Unfortunately, the symbols exported by this module are non-trivial macros (at least to me). So I would

Re: [racket-users] Re: embedding a DSL into racket code

2019-09-28 Thread Raoul Schorer
eq))) > > to > > (define-syntax (j s) > #`(interpret-syntax-fragment/j () () #,(datum->syntax s (lex/j > (open-input-string (cadr (syntax->datum s)))) #,(hasheq > > > On Sat, Sep 28, 2019 at 11:03 AM Raoul Schorer > wrote: > >> >> I suspect th

[racket-users] Re: embedding a DSL into racket code

2019-09-28 Thread Raoul Schorer
ating a > reader with custom string literal syntax, in case the language you're > embedding also has string literals: > https://docs.racket-lang.org/udelim/index.html > > > On Saturday, September 28, 2019 at 6:07:57 AM UTC-4, Raoul Schorer wrote: >> >> So, I was

[racket-users] Re: embedding a DSL into racket code

2019-09-28 Thread Raoul Schorer
fe-list->array:75 (#%app:76 vector:77 (quote 1)) (#%app:78 list:79 (quote 3 (define-values:80 (a) (#%app:81 unsafe-list->array:75 (#%app:82 vector:83 (quote 1)) (#%app:84 list:85 (quote:86 4 (#%provide) (#%app:87 void))) Le samedi 28 septembre

[racket-users] embedding a DSL into racket code

2019-09-28 Thread Raoul Schorer
Hi, I have written a #lang, which works ok when it is in its own file. Now, I'd like to make it embedded through a macro such as '(my-lang ...)' What I would like is essentially expand that: #lang racket ... standard racket source ... (my-lang ...) ... standard racket source ... to that: #lang

[racket-users] Gui editable grid/table

2019-07-19 Thread Raoul Schorer
Hi, I am trying to make a gui editable table. Is that possible in racket/gui? It seems list-box% is not editable by default. Apparently, one can't stick editors as list-box% choices either. Can you please help? Thanks! Raoul -- You received this message because you are subscribed to the

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

2019-07-15 Thread Raoul Schorer
I'm far out of my depth, but... Doesn't REBOL syntax fit all criteria given in the RacketCon talk? That's a genuine question. Reading about it, I was under the impression that it was basically lisp with alternate syntax. -- You received this message because you are subscribed to the Google

[racket-users] recursion schemes

2019-07-14 Thread Raoul Schorer
Hi, I recently became interested in recursion schemes, and I noticed that almost all implementations are in typed languages. I understand the advantage of having an implementation using recursion at the type level, but why is it that there are so few material in untyped languages? For

[racket-users] How to implement "APL" bitstrings in racket?

2019-05-29 Thread Raoul Schorer
Hi, I would like to know how you would implement bitstrings "à la APL", meaning bitstrings/bitvectors of arbitrary dimensions with packed representation and possibilities for implicit parallelism. I am under the impression that this essentially means adding a bit type to the numeric tower,

Re: [racket-users] How to setup the #%module-begin form with the type-expander lib or #lang typed/racket ?

2019-04-15 Thread Raoul Schorer
Le lundi 15 avril 2019 19:49:56 UTC+2, Matthew Butterick a écrit : > > > > On Apr 12, 2019, at 6:00 PM, Raoul Schorer > wrote: > > Is there a way to achieve expansion to typed/racket from my custom > language, please? > > > With the caveat that I'm probably

[racket-users] How to setup the #%module-begin form with the type-expander lib or #lang typed/racket ?

2019-04-12 Thread Raoul Schorer
Hi, I'd like to expand to typed/racket syntax from my custom language (which for now contains only 0 and 1). Ultimately, I am trying to compile programs from the J language, which cannot be parsed and has no BNF. J parsing and execution is interleaved, and I am trying to circumvent that by

[racket-users] Is it necessary to print after expansion?

2019-04-07 Thread Raoul Schorer
Hi all, I am trying to write my first language based upon Beautiful Racket (which is amazing, BTW!). Almost everything works, but when I expand a syntax fragment, I need to add a print function to make the result display (display, displayln, writeln, etc.). I followed the "funstacker"

[racket-users] What are good references for implementing interpreters in Racket (or Scheme/LISP)?

2018-02-23 Thread Raoul Schorer
Hi, I am trying to write an interpreter for J in Racket as a hobby project. Would you guys know of good references on writing interpreters? Some nice things I found: - craftinginterpreters.com - beautifulracket.com - Racket J

Re: [racket-users] Plot array

2017-04-22 Thread Raoul Schorer
Le samedi 22 avril 2017 21:18:01 UTC+2, Konrad Hinsen a écrit : > On 22/04/17 19:43, Raoul Schorer wrote: > > > Is there an easy way to plot a 2d or 3d arrays in racket? I am working on > > some array programming problem, and it would be nice to visualize the > > solut

[racket-users] Plot array

2017-04-22 Thread Raoul Schorer
Hi! Is there an easy way to plot a 2d or 3d arrays in racket? I am working on some array programming problem, and it would be nice to visualize the solution. Thanks! -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this