Re: [racket-users] Re: Memory usage of (port->lines ...) is extreamly high

2020-09-24 Thread Laurent
Quick comment: of you don't need to load the whole file but want to parse it line by line, use `in-lines` which is memory-efficient. On Thu, Sep 24, 2020, 11:46 Hong Yang wrote: > Update with memory dump log attached. > > 1. With out (set! input empty), call (collect-garbage) doesn't help > 2.

Re: [racket-users] Is this running in DrRacket or as a script?

2020-09-02 Thread Laurent
option" and add "drracket". After this, when you run a module from within DrRacket, it will automatically run the `drracket` submodule, but this submodule will *not* be run from the command line (by default). (I also uncheck the "main" submodule as I use this one only for the co

Re: [racket-users] drracket -- getting the buffer's current filename?

2020-09-01 Thread Laurent
What do you want this for, more precisely? On Tue, Sep 1, 2020 at 3:35 PM ibar...@radford.edu wrote: > When running from inside drracket, `(find-system-path 'run-file)` > understandable returns the DrRacket executable. Is there a way for me to > further find the name of the source-file, in

Re: [racket-users] Re: Application Templates!

2020-08-20 Thread Laurent
My understanding is that Framework is born out of DrRacket, expecting that some of its tools may be useful in other contexts (like, say, keymaps). On Thu, Aug 20, 2020 at 3:11 PM Deren Dohoda wrote: > > I think Racket would benefit by a suite of applications which are small > but > > not

Re: [racket-users] Re: Application Templates!

2020-08-20 Thread Laurent
Stephen's work may still be quite useful, as it provides a set of really minimal (almost?) working examples that explain the specifics of various tools. I say keep it up, Stephen! On Thu, Aug 20, 2020 at 5:33 AM Alex Harsanyi wrote: > I am not sure that a template in the style of "dotnet new"

Re: [racket-users] Scribble and structs

2020-08-12 Thread Laurent
I have no idea about custom-write, but for the duplicate keys, maybe you installed the collection multiple times? Take a look at the output of `raco pkg show` maybe. On Wed, Aug 12, 2020 at 12:08 PM Deren Dohoda wrote: > Hi racketeers, > > I have two questions. The first is: is there a way to

Re: [racket-users] Racket GUI: text aligned to the left of other text

2020-08-12 Thread Laurent
You can also cheat by writing the name with the same color as the background on the next lines (kind of like \vphantom in LaTeX). This has the advantage of aligning based on the length of each name instead of pushing everything to the right of the longest name, while working for any font. A

Re: [racket-users] Racket News - Issue 36

2020-08-04 Thread Laurent
Thanks Paulo, very interesting and useful as usual! This version of the featured paper "Hygienic macro expansion" is a little more readable: https://prl.ccs.neu.edu/img/kffd-tr-1986.pdf Or would Matthias be able to provide a freshly compiled version maybe? :) (I would be truly impressed if the

Re: [racket-users] ask the type of a value

2020-08-03 Thread Laurent
and yet: > (for-each (λ (x) (printf "~a: ~a\n" (~v x #:min-width 28) (struct->vector x))) `(hello "hello" 43110 #f #(h e l l o) #"hello" (h e l l o) ,(new frame% [label ""]))) hello : #(struct:symbol ...) "hello" : #(struct:string ...)

Re: [racket-users] ask the type of a value

2020-08-03 Thread Laurent
Maybe try `struct->vector`, which works on any value iirc (from mobile, can't test) On Mon, Aug 3, 2020, 15:19 Hendrik Boom wrote: > In plain, untyped Racket: > > It is possible to ask if a value is a symbol with symbol? > It is possible to ask if a value is a string with string? > etc. > > Is

Re: [racket-users] “If you could have a wish granted, what would you like to see next in Racket?”

2020-07-23 Thread Laurent
Just in case (not sure how relevant this is to you): https://docs.racket-lang.org/reference/Sandboxed_Evaluation.html?q=with-limits#%28form._%28%28lib._racket%2Fsandbox..rkt%29._with-limits%29%29 Works pretty well, but there are some caveats: if an object can be reached outside of the

Re: [racket-users] coding style query

2020-05-27 Thread Laurent
I use markdown syntax for that: The function `function` functions like `functions` but for a single function `proc`. I've seen others use `function' instead. On Wed, May 27, 2020 at 7:04 PM Jens Axel Søgaard wrote: > Den ons. 27. maj 2020 kl. 19.56 skrev Hendrik Boom >: > >> Is there an

Re: [racket-users] GUI executable creating an annoying command line window

2020-05-26 Thread Laurent
Does it change anything if you use #lang racket/gui instead of #lang racket (require racket/gui)? On Tue, May 26, 2020 at 10:00 AM Philip Benade wrote: > Hi All > > I have been trying to create a simple GUI with the racket/gui library. For > the most part it works but alongside my GUI it also

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

2020-05-10 Thread Laurent
ons in CS. > > I've pushed a repair. > > Thanks for the report, Laurent! > > At Sun, 10 May 2020 13:57:50 +0200, Jens Axel Søgaard wrote: > > I can confirm that the bug is present in the latest snapshot of Racket CS > > on macOS. > > > > FWIW _double* is

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

2020-05-10 Thread Laurent
e it whether it is > supposed to be handled here. > > https://github.com/racket/racket/blob/920c899ba866ce59a0387862286521e3cc1dabfb/racket/src/schemify/ptr-ref-set.rkt#L46 > > /Jens Axel > > Den søn. 10. maj 2020 kl. 10.51 skrev Laurent : > >> Correction: >> It's not Mac vs L

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

2020-05-10 Thread Laurent
Correction: It's not Mac vs Linux, it's Racket BC (works) vs CS (doesn't work) On Sun, May 10, 2020 at 9:49 AM Laurent wrote: > Hi all, > > We're trying to figure out why the last case below doesn't work on > Linux, but works on MacOS. Does anyone have an explanation? > T

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

2020-05-10 Thread Laurent
Hi all, We're trying to figure out why the last case below doesn't work on Linux, but works on MacOS. Does anyone have an explanation? The docs suggest that _double* shouldn't be different from _double for _reading_ values. More precisely, #lang racket (require ffi/unsafe) (define N 10)

Re: [racket-users] Quickscript of the day: Extract to function

2020-05-10 Thread Laurent
Stephen De Gabrielle < spdegabrie...@gmail.com> wrote: > Awesome - keep them coming. > > You should feature one in each Racket-News! > > Stephen > > On Thu, 7 May 2020 at 10:33, Laurent wrote: > >> Have you ever wanted to extract a block of code out of its contex

Re: [racket-users] A convenient assertion macro - with one caveat

2020-05-07 Thread Laurent
Check out `make-check-location` and friends, and maybe `with-check-info*` https://docs.racket-lang.org/rackunit/api.html?q=define-check#%28def._%28%28lib._rackunit%2Fmain..rkt%29._make-check-location%29%29 You may have to combine with the syntax-information extracted from the syntax object `stx`.

[racket-users] Quickscript of the day: Extract to function

2020-05-07 Thread Laurent
Have you ever wanted to extract a block of code out of its context and wrap it in a function? Have you ever *not* done it because of the cognitive load(*) of figuring out the function arguments and the return values? Well, now it's as easy as Ctrl-Shift-X and Ctrl-Shift-Y. Using check-syntax,

Re: [racket-users] Matching groups of optional elements

2020-05-05 Thread Laurent
If you insist on using match, you can do it with a loop: #lang racket (define (parsel l) (match l [(list-rest req1 req2 r) (cons (list req1 req2) (let loop ([r r]) (match r ['() '()] [(list-rest opt1 opt2 opt3 opt4 r2)

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

2020-05-01 Thread Laurent
For your second point, you can never really know what other work depends on your package. You could display a message in the new package or in the readme for example, but that's likely not going to work well for various reasons. (but see my last comment) However, what Jay is saying I believe

Re: [racket-users] Rhombus project plan

2020-04-30 Thread Laurent
Also, if I remember correctly, the timings given in the said (excellent) tutorial are very conservative or outdated. If you have a multicore machine, it will speed up the process by up to a factor 8. On Thu, Apr 30, 2020, 15:42 Sam Tobin-Hochstadt wrote: > On Thu, Apr 30, 2020 at 9:09 AM Ben

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

2020-04-30 Thread Laurent
Alex, that looks like an interesting workflow. Maybe worth a blog post? ;) On Thu, Apr 30, 2020 at 12:11 AM Alex Harsanyi wrote: > > You could both send packages to the package catalog and instruct your > users to use a different package source if they wish to use old versions. > I don't see

Re: [racket-users] Reflecting on context arity

2020-03-28 Thread Laurent
Follow up on Ben's idea: Take n as an optional argument, init value #f. On first application of f on the first values, continue n-map with n=received number of values. Once arrived at the empty lists you know how many values you should have. At each iteration, you can even check that the number of

Re: [racket-users] Limiting consecutive identical elements with match

2019-12-04 Thread Laurent
I don't know what the exact specs are, but what should be the return values for '(a a a b b c) and '(a a b b b c) ? (I can't test right now but I suspect the match approach might miss one) On Wed, Dec 4, 2019, 23:56 Matthew Butterick wrote: > > On Dec 4, 2019, at 3:26 PM, 'Joel Dueck' via

Re: [racket-users] Re: GUI (get-directory)

2019-11-23 Thread Laurent
There may be some examples on Rosetta code, or at least Racket snippets could be added: https://rosettacode.org/wiki/Category:GUI On Sat, Nov 23, 2019, 00:23 Martin DeMello wrote: > One helpful thing to do is expand the GUI section of awesome-racket > https://github.com/avelino/awesome-racket >

Re: [racket-users] Determining if 2 lists share a common element

2019-11-14 Thread Laurent
On Thu, Nov 14, 2019 at 3:11 AM Andrew wrote: > I have this: > > (define (related? a1 a2) > (if (equal? a1 a2) > true > (related? (member (rest ("proc that calls list" a1)) (rest ("proc > that calls list" a2))) > (member a1 ("proc that calls list" a2)) > I can't make

Re: [racket-users] horizontal alignment in a message% or equivalent

2019-10-13 Thread Laurent
If I remember correctly, I think you want to add a spacer box at the right of your message% in the same panel: https://docs.racket-lang.org/gui/grow-box-spacer-pane_.html?q=message%25 so that the message takes only the space it needs and is thus flushed to the left. On Sun, Oct 13, 2019 at 8:11

Re: [racket-users] continuations for search

2019-09-12 Thread Laurent
Hendrik, There is also the all too often forgotten iterative deepening depth-first search algorithm: https://en.wikipedia.org/wiki/Iterative_deepening_depth-first_search which has the advantages of both, at a very small cost in search time compared to doing depth-first search with the right

Re: [racket-users] [OT] Cities and GPS

2019-09-08 Thread Laurent
This DB is even better: http://download.geonames.org/export/ On Sun, Sep 8, 2019 at 8:34 AM Laurent wrote: > Nice :) > > > On Sat, Sep 7, 2019 at 2:00 AM Alex Harsanyi > wrote: > >> In fact, I updated the data frame package to be able to read the CSV file >

Re: [racket-users] [OT] Cities and GPS

2019-09-08 Thread Laurent
uot; "lng" "population")]) >> (->numeric df series)) >> >> (define ((is-city? name) v) >> (equal? (vector-ref v 0) name)) >> >> (df-select* df "city" "country" "lat" "lng" #:filter (is-city? &

Re: [racket-users] [OT] Cities and GPS

2019-09-06 Thread Laurent
There's a small free database here too: https://simplemaps.com/data/world-cities I started writing a simple query system for it this morning (csv->rktd, then just list of assoc operations). On Fri, Sep 6, 2019 at 1:35 PM Sage Gerard wrote: > Would geonames help? > http://www.geonames.org/ > >

Re: [racket-users] Re: Listing All Programs

2019-09-05 Thread Laurent
Adam, I strongly recommend you take a look at Levin Search (aka Universal Search), which enumerates and runs programs by dovetailing in a smart way: http://people.idsia.ch/~juergen/mljssalevin/node4.html http://www.scholarpedia.org/article/Universal_search#Universal_search This avoids the

Re: [racket-users] Listing All Programs

2019-09-05 Thread Laurent
however.) At least it's very simple to generate all 'syntactically' valid Turing machines ;) On Thu, Sep 5, 2019 at 2:56 PM David Van Horn wrote: > But whether a program is syntactically valid is not an easy thing to > decide in a language like racket... > > On Thu, Sep 5, 2019, 9:4

Re: [racket-users] Pict combiners in list form?

2019-09-05 Thread Laurent
Or as a simple hack you can redefine `apply' as a one letter binding like `~'. On Thu, Sep 5, 2019 at 12:52 PM Robby Findler wrote: > Although this is a bit tedious and I write that too much too ... maybe > they should call "flatten" on their arguments or just accept a list of > picts? > >

Re: [racket-users] Listing All Programs

2019-09-05 Thread Laurent
Probably only those that output Chaitin's constant ;) But otherwise I would guess "syntactically valid", in which case it would be easier to consider only lambdas with only one argument. Though if you want to also use all of Racket's primitives (that is, including I/O), then good luck. My

Re: [racket-users] images in racket files

2019-07-19 Thread Laurent
Looks like your best bet is to save the pict as a bitmap in a separate file, then load it in your module and export this value. >From the top of my head: where the pic is produced: (send (pict->bitmap my-pict) save-bitmap "path-to/the-bitmap-file.png" 'png) (or maybe: right click on the snip then

Re: [racket-users] Re: Impromptu racket meetup in London Friday, 19 July at 12pm-3pm

2019-07-16 Thread Laurent
Good idea. I might come between 12pm and 1pm. On Fri, Jul 12, 2019 at 8:36 PM zeRusski wrote: > argh, wish you'd go with after work hours or the weekend. Sorry, won't be > able to make it. > > On Friday, 12 July 2019 09:20:58 UTC-6, Stephen De Gabrielle wrote: >> >> Hi, >> >> Next Friday, 19

Re: [racket-users] returning GUI elements in function?

2019-07-09 Thread Laurent
There are several ways to solve this (including deriving classes), but the simplest for you right now is probably to have `initialize-progress-bar' return the gui widgets (in particular `gauge' and `msg'), assign the values to `the-gauge' and `the-msg' (say) from the return values of

Re: [racket-users] anyone using single-flonums?

2019-05-30 Thread Laurent
If no one is really relying on them as of today, then I would strongly support allowing Matthew to break things and move fast. If anyone has a real need for such a data structure it can still probably be implemented later as a third-party library, possibly extended to user-specified-precision

Re: [racket-users] Racket v7.3

2019-05-16 Thread Laurent
Thank you all for the new release! On Wed, May 15, 2019 at 7:05 PM 'John Clements' via Racket Users < racket-users@googlegroups.com> wrote: > - Racket's IO system has been refactored to improve performance > and simplify internal design. > Is it mild overall performance improvement, or are

Re: [racket-users] Re: Online IDE’s for Racket ?

2019-05-01 Thread Laurent
Rollapp looks interesting, but when I want to sign in with my gmail account it requires to get information about all my linked email addresses. That really seems unnecessary to me, so I didn't try it. On Fri, Apr 26, 2019 at 9:59 PM Stephen De Gabrielle < spdegabrie...@gmail.com> wrote: > Yes -

Re: [racket-users] finding the package that a function is defined in

2019-04-28 Thread Laurent
For DrRacket there's a quickscript in the quickscript-extra package, called "provided-by" (not sure which of "by" or "from" is the appropriate English form here...). It searches all(?) installed libraries for you and reports the packages that export the identifier under the keyboard cursor.

Re: [racket-users] color-maps for the plot package

2019-03-20 Thread Laurent
This is a fantastic idea, Alex. (While I'm at it, thanks for all your other projects related to the GUI, they are really cool.) I'm *very* much in favour of all your points, (1) to (4). I've had uses of different colors scheme for academic papers, and the default palette doesn't work well for

Re: [racket-users] printing decimals

2019-03-15 Thread Laurent
You're probably looking for `real->decimal-string`. Also take a look at ~r instead of ~a, as the former is only for numbers. On Fri, Mar 15, 2019 at 5:57 PM wrote: > Hi all, > > I've been looking through the docs for a way to print decimals to a > defined precision. > > I can get close to what

Re: [racket-users] Pretty display of tabular data?

2019-03-13 Thread Laurent
Not sure how much this would help you, but there's a `text-table`package. It's fairly simple though. Docs: https://docs.racket-lang.org/text-table/index.html On Wed, Mar 13, 2019 at 6:19 PM Matt Jadud wrote: > Hi all, > > I have a tabular data type that I'd like (I think) to be able to render

Re: [racket-users] tree-layout, many many thanks

2019-02-27 Thread Laurent
A long time ago I had a need for this too, so I just made one for me: https://github.com/Metaxal/bazaar/blob/master/slideshow/slideshow-tree.rkt The behaviour is a bit different from pict/tree-layout. There's an example usage in the drracket submodule at the end of the file that produces: [image:

Re: [racket-users] Cannot use case+else inside match+else

2019-02-27 Thread Laurent
Good point. I wasn't sure that would work---it does. On Wed, Feb 27, 2019 at 1:28 PM Jens Axel Søgaard wrote: > I suppose you could (re)require it again. > > ons. 27. feb. 2019 kl. 14.19 skrev Laurent : > >> Wait, that means that in an interactive session, if you ever hap

Re: [racket-users] Cannot use case+else inside match+else

2019-02-27 Thread Laurent
Wait, that means that in an interactive session, if you ever happen to redefine `else', you can't use `case' anymore? On Tue, Feb 26, 2019 at 5:03 AM Ben Greenman wrote: > Here's a suggestion for the docs: > > https://github.com/racket/racket/pull/2505 > > -- > You received this message because

Re: [racket-users] Strange behavior from regexp-match*

2019-02-10 Thread Laurent
Not sure what the actual problem is, but may be this excerpt from the docs is relevant: The internal size of a regexp value is limited to 32 kilobytes; this limit roughly corresponds to a source string with 32,000 literal characters or 5,000 operators. Source:

Re: [racket-users] Re: nested for loops and suggested alternatives

2019-02-10 Thread Laurent
perhaps more importantly: -- (build-vector 5 (lambda (_) (make-vector 5 0))) -- (make-vector 5 (build-vector 5 (lambda (_) 0))) On Sun, Feb 10, 2019 at 3:16 PM Gustavo Massaccesi wrote: > To understand the problem, it will be useful to understand the difference > between > > -- (make-vector 5

Re: [racket-users] Re: read-from-string(-all)

2019-02-07 Thread Laurent
; > '(123 456) > > > > although I am not sure it is a good idea to call read on strings > received from the user... > > > > Alex. > > On Wednesday, February 6, 2019 at 6:49:57 PM UTC+8, Laurent Orseau wrote: > >> > >> read-from-string and read-from-str

Re: [racket-users] Re: read-from-string(-all)

2019-02-06 Thread Laurent
Oh nice, I didn't know we could do that one! Point taken :) I suppose (hope?) you can still use sandboxing with memory limits for this? On Wed, Feb 6, 2019 at 11:52 AM Alex Harsanyi wrote: > > > On Wednesday, February 6, 2019 at 7:36:40 PM UTC+8, Laurent Orseau wrote: >> >>

Re: [racket-users] Re: read-from-string(-all)

2019-02-06 Thread Laurent
On Wed, Feb 6, 2019 at 11:25 AM Alex Harsanyi wrote: > (read-from-string "123") is equivalent to `(call-with-input-string "123" > read)` while read-from-string-all can be replaced by: > > (define (read-all in) > (let loop ([result '()]) > (let ((v (read in))) > (if

[racket-users] read-from-string(-all)

2019-02-06 Thread Laurent
read-from-string and read-from-string-all are convenient functions, but they belong to the mzlib/string library, which is deprecated. I can't find an existing replacement in racket/string or racket/base. Is there one with a different name? -- You received this message because you are subscribed

Re: [racket-users] Quickscript error on first startup of Racket 7.2

2019-02-04 Thread Laurent
On Mon, Feb 4, 2019 at 9:55 PM Robby Findler wrote: > > Possibly. I'm not sure what would be the best option yet, I'll think > about it but I welcome suggestions. > > I think the main thing should be to avoid any uncaught exceptions (if > they happen while quickscript starts up, it will get

Re: [racket-users] Quickscript error on first startup of Racket 7.2

2019-02-04 Thread Laurent
On Sun, Feb 3, 2019 at 7:00 PM Robby Findler wrote: > > > On Sun, Feb 3, 2019 at 11:50 AM Laurent wrote: > >> I've pushed a repair. It should be integrated with the next racket >> nightly release I suppose. >> >> The fix is to check the compiled v

Re: [racket-users] Quickscript error on first startup of Racket 7.2

2019-02-03 Thread Laurent
file"). Have you done something like this before? On Fri, Feb 1, 2019 at 1:37 PM Laurent wrote: > Okay then, I'll work on a fix tomorrow. > > On Fri, Feb 1, 2019 at 1:23 PM Robby Findler > wrote: > >> I can't say concretely what will go wrong I am sorry to say. There are &

[racket-users] Re: From Guido to Matthias (was: Python's append vs Racket's append and helping novices understand the implications)

2019-02-03 Thread Laurent
Ouch!! :-D On Sun, Feb 3, 2019 at 3:40 PM Matthias Felleisen wrote: > > > On Feb 3, 2019, at 10:12 AM, Laurent wrote: > > When was that and what was the outcome of this meeting? > > > > Nothing. It was a waste of my time. — Matthias > > -- You received this m

[racket-users] From Guido to Matthias (was: Python's append vs Racket's append and helping novices understand the implications)

2019-02-03 Thread Laurent
Now you just peaked my curiosity! When was that and what was the outcome of this meeting? On Sat, Feb 2, 2019 at 11:00 PM Matthias Felleisen wrote: > > [[ p.s. For my very first Python program (a couple of days before meeting > with GvR), I used Python’s append and was annoyed beyond belief.

Re: [racket-users] drracket migrate: package is currently installed in a wider scope

2019-02-01 Thread Laurent
Thanks for the fast fix Matthew! It should help at least for those who install the nightlies but haven't upgraded yet. On Fri, Feb 1, 2019 at 4:46 PM Matthew Flatt wrote: > At Fri, 1 Feb 2019 15:45:02 +0000, Laurent wrote: > > Okay, I think the problem is that DrRacket's dependency

Re: [racket-users] ~v in drracket vs commandline

2019-02-01 Thread Laurent
But I should add that that's not a big deal to me now, since at least now I know how to work around it. On Fri, Feb 1, 2019 at 4:06 PM Laurent wrote: > Or better yet, maybe replace the choice between print and write to a > boolean choice on the initial value of 'print-as-expr

Re: [racket-users] ~v in drracket vs commandline

2019-02-01 Thread Laurent
: > Could it be changed to also set `(print-as-expression)` appropriately? > > Sam > > On Fri, Feb 1, 2019 at 11:02 AM Robby Findler > wrote: > > > > Ah, right! I forgot about that setting. Yes, what you describe is > > exactly what happens. > > > > Robb

Re: [racket-users] ~v in drracket vs commandline

2019-02-01 Thread Laurent
and command line. On Fri, Feb 1, 2019 at 3:48 PM Laurent wrote: > I'm in #lang racket for DrRacket, and I assume it's the same for the > command line when merely starting "$ racket" > > > On Fri, Feb 1, 2019 at 3:39 PM Robby Findler > wrote: > >> This

Re: [racket-users] ~v in drracket vs commandline

2019-02-01 Thread Laurent
acket or the one you are > "inside" in the repl if you're in one). Possibly those are different > for you, Laurent? > > Robby > > On Fri, Feb 1, 2019 at 9:33 AM Sam Tobin-Hochstadt > wrote: > > > > I see the same behavior in DrRacket as in command l

Re: [racket-users] drracket migrate: package is currently installed in a wider scope

2019-02-01 Thread Laurent
to remove quickscript-extra, if you've installed it, since it is not in DrRacket's dependencies.) Glad you like it in any case :) On Fri, Feb 1, 2019 at 2:47 PM andrew blinn wrote: > Hi Laurent! > > I may be misattributing the error. I did indeed already have quickscript > insta

[racket-users] ~v in drracket vs commandline

2019-02-01 Thread Laurent
I'm seeing a difference that I can't explain. In the interactions below, look for the leading quote in the output string on the commandline, and its absence in DrRacket. The same problem happens when running a module containing the same code, so it's not a top-level issue. Is there another

Re: [racket-users] Quickscript error on first startup of Racket 7.2

2019-02-01 Thread Laurent
r it! We have a fallback if this don't work out. :) > > Robby > > On Fri, Feb 1, 2019 at 7:01 AM Laurent wrote: > >> On Fri, Feb 1, 2019 at 11:30 AM Robby Findler < >> ro...@eecs.northwestern.edu> wrote: >> >>> My feeling is that our compil

Re: [racket-users] Quickscript error on first startup of Racket 7.2

2019-02-01 Thread Laurent
y anyway, just requiring a little more time. Copying the same scripts in different folders will very likely mean divergence of source at some point and likely frustration for the user. Or am I missing something? > > Robby > > On Fri, Feb 1, 2019 at 4:12 AM Laurent wrote: > >&

Re: [racket-users] drracket migrate: package is currently installed in a wider scope

2019-02-01 Thread Laurent
Hi Andrew, I don't quite understand what role quickscript being part of the main distribution plays here. Can you give some more details about your issue? Just in case, the only change is that quickscript is by default a dependency of DrRacket, which just means that if you didn't have it before,

Re: [racket-users] Quickscript error on first startup of Racket 7.2

2019-02-01 Thread Laurent
Thanks for bringing this up. Indeed the compile option from the quickscript menu should work, but it's not ideal. I'm not a big fan of the copy option. (To me that sounds like asking for trouble, but I may be wrong.) A nicer solution may be to simply check if the scripts are compiled with the

Re: [racket-users] updated Racket-on-Chez status

2019-01-31 Thread Laurent
Just wanted to say thank you for the update and for the honest report. I look forward to using Racket CS, and to seeing how easily new features can be incorporated :) On Tue, Jan 29, 2019 at 2:49 PM Matthew Flatt wrote: > Here's a new status report on Racket CS: > >

Re: [racket-users] Are the terms "function" and "procedure" synonymous in Racket?

2019-01-14 Thread Laurent
I'm not entirely sure where I got that from, but to me a procedure is a ("impure") function with possible side effects (printing, mutating a global variable, sending emails, etc.). By contrast, in any given context, a function is (again, to me) synonymous with "pure function"(*) and can be called

Re: [racket-users] Re: Why enter/run a submodule in the REPL?

2018-12-13 Thread Laurent
Personally, I use a 'drracket' submodule so that this submodule isn't executed from the command line, but gets executed from within DrRacket. This is particularly useful to avoid outputting graphical objects (such as plots) that can't be displayed on the command line. After pressing Run in

Re: [racket-users] Destructuring a list in (for ...)

2018-11-23 Thread Laurent
Maybe you could have something like (in-match ...) ? On Fri, Nov 23, 2018 at 4:54 PM Alexis King wrote: > The trouble, sadly, is that this grammar is ambiguous. In > > (for ([(x y) s]) > ) > > should (x y) be parsed as a single match pattern or as two binders for a > two-valued

Re: [racket-users] colon keywords

2018-09-24 Thread Laurent
On Sun, Sep 23, 2018 at 6:41 PM Neil Van Dyke wrote: > Laurent wrote on 9/19/18 8:29 AM: > > I don't mind `#:`, but I'd prefer to write `[#:foo 5]` rather than > > `#:foo [foo 5]`, that is, I don't like the repetition of the name (I > > first came to Racket precisely to

Re: FW: [racket-users] colon keywords

2018-09-24 Thread Laurent
Same here, I've grown happy with the #:keyword notation because it is a reader thing, not a symbol. The other nice option would be like Python and others to make procedure implicitly take dictionaries to allow choosing at each call site between position-based and name-based argument passing for

Re: [racket-users] colon keywords

2018-09-19 Thread Laurent
I don't mind `#:`, but I'd prefer to write `[#:foo 5]` rather than `#:foo [foo 5]`, that is, I don't like the repetition of the name (I first came to Racket precisely to avoid repeating code). When I expressed that a few years ago, I was told it would be unlikely to change in the future though,

Re: [racket-users] Cannot create an account on PLaneT

2018-09-08 Thread Laurent
It's because PLaneT is deprecated. The new package repository is located at: http://pkgs.racket-lang.org/ HTH, Laurent On Sat, Sep 8, 2018 at 4:26 PM Sage Gerard wrote: > Hey all, > > I cannot seem to create an account on PLaneT. No confirmation emails (even > in Spam). Tried

Re: [racket-users] Module dependencies

2018-05-28 Thread Laurent
You could also have a third file, test-a-and-b.rkt, that requires both a.rkt and b.rkt and includes the test that depend on both files. On Mon, May 28, 2018 at 10:08 AM Claes Wallin (韋嘉誠) wrote: > (require) binds at compile time and creates a cycle, but by using >

Re: [racket-users] Re: Simple loop control

2018-04-02 Thread Laurent
:33 AM, 若草春男 <whbug...@gmail.com> wrote: > Thank you, Laurent. > > I mind the performance of in-range, but it seems to be no problem. > > #lang racket > > (time (for ([i (in-range 1)]) > (for ([j (in-range 1000)]) > (void > >

Re: [racket-users] Simple loop control

2018-04-01 Thread Laurent
Take at look at Racket's `for' loops. They are very flexible. The reference: http://docs.racket-lang.org/reference/for.html?q=for#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._for%29%29 The guide with examples: http://docs.racket-lang.org/guide/for.html On Sun, Apr 1, 2018 at 10:14 AM,

Re: [racket-users] bookmarks?

2018-03-31 Thread Laurent
The quickscript-extra package (a DrRacket plugin) provides such a facility (the 'bookmarks' script), among many other things: https://pkgs.racket-lang.org/package/quickscript-extra It's not perfect but should still be helpful. In case it doesn't suit you needs, quickscript should allow you to

Re: [racket-users] (number->string -nan.0) == "+nan.0" ?

2018-02-06 Thread Laurent
Not sure there should be a -nan.0 to start with. NaN is an absorbing value that shouldn't have a sign. I suspect it's because the + is a convenience to trigger the number reader, and then an appeal to symmetry and analogy to +inf.0 led to -nan.0? On Mon, Feb 5, 2018 at 11:46 PM, Ben Greenman

Re: [racket-users] Adding interactive overlays to racket plots

2018-02-03 Thread Laurent
This is awesome! Thanks so much for doing this, I'm sure it's going to be very handy. On Sat, Feb 3, 2018 at 7:08 AM, Alex Harsanyi wrote: > > Hi Matthias, > > I updated the plot package to cover all the cases I had in mind for plot > overlays and also updated my

Re: [racket-users] Read-only "editor" text with min-width of its content

2018-01-11 Thread Laurent
Maybe you can use snips% inside a single editor%? Snips can be text or pictures or other things. On Wed, Jan 10, 2018 at 9:58 PM, Christopher Lemmer Webber < cweb...@dustycloud.org> wrote: > Christopher Lemmer Webber writes: > > > Matthew Flatt writes: > > > >> At Wed, 10 Jan 2018 10:29:28

Re: [racket-users] Read-only "editor" text with min-width of its content

2018-01-10 Thread Laurent
On Wed, Jan 10, 2018 at 6:20 AM, Christopher Lemmer Webber < cweb...@dustycloud.org> wrote: > So now I've got some text that renders okay, it line wraps, etc etc. > The problem is, I want to add a panel with a bunch of these, and I want > each of these "rich text" things to be exactly the height

Re: [racket-users] Re: Lessons learned from writing a Conway's Game of Life implementation in big-bang

2018-01-06 Thread Laurent
On Fri, Jan 5, 2018 at 5:42 PM, Hendrik Boom wrote: > Long ago in the 60's, on an old PDP-11 running an early Unix, I > implemented a Live using quad-trees for storage after I noticed by > drawing on a lengthy printout that at each level of the quadtree, only > about half

Re: [racket-users] Retrieving some data from a module without evaluating it

2017-12-18 Thread Laurent
vate/submodule.rkt > > /Applications/Racket v6.11/collects/racket/private/submodule.rkt > > > Stephen > > > On Sun, Dec 17, 2017 at 10:36 AM, Laurent <laurent.ors...@gmail.com> > wrote: > >> Also, I can't find where module+ is defined. Anyone has a pointer? >> >

Re: [racket-users] Retrieving some data from a module without evaluating it

2017-12-17 Thread Laurent
Also, I can't find where module+ is defined. Anyone has a pointer? On Sun, Dec 17, 2017 at 9:34 AM, Laurent <laurent.ors...@gmail.com> wrote: > Excellent, thanks a lot! > > On Sat, Dec 16, 2017 at 8:44 PM, Matthew Flatt <mfl...@cs.utah.edu> wrote: > >> [...] >

Re: [racket-users] Retrieving some data from a module without evaluating it

2017-12-17 Thread Laurent
Excellent, thanks a lot! On Sat, Dec 16, 2017 at 8:44 PM, Matthew Flatt wrote: > [...] > (set! submodule-content >(cons (syntax-local-introduce > #`(begin > (provide proc) > (define proc (list

[racket-users] Retrieving some data from a module without evaluating it

2017-12-16 Thread Laurent
layed with 'dynamic-require' and submodules with some limited success but couldn't achieve the goal above. Any idea? (Also, I have several files like 'my-file.rkt' that the user can choose from.) Thanks, Laurent -- You received this message because you are subscribed to the Google Groups "Rac

Re: [racket-users] namespace-anchor->namespace and eval

2017-10-05 Thread Laurent
lift-expression` (as used by `new`) and `expand` (as used > by errortrace, which is used by DrRacket). > > At Sun, 1 Oct 2017 16:05:16 +0100, Laurent wrote: > > Hi, > > > > Does anyone know a good explanation as to why the following code works > > depending on whet

[racket-users] namespace-anchor->namespace and eval

2017-10-01 Thread Laurent
Hi, Does anyone know a good explanation as to why the following code works depending on whether the apparently-useless line is commented out? #lang racket #;(new object%) ; uncommenting this raises an error (define-namespace-anchor nsa) (define ns (namespace-anchor->namespace nsa)) (eval '(new

[racket-users] [ANN] MrEd Designer update

2017-09-30 Thread Laurent
A new version of MrEd Designer (package 'mred-designer') is available: https://pkgd.racket-lang.org/pkgn/package/mred-designer MrEd Designer is WYSIWYG program to create GUI applications for Racket. The changes are relatively minor in quantity, but I've made a number of small improvements to the

Re: [racket-users] tabular text display

2017-09-23 Thread Laurent
> > Awesome! You’ve saved me hours. > > One simple thing: could you add the tags “tabular” and maybe also “format” > or “text”? I’m afraid that in its current form, I wouldn’t have found this > package when searching for it. > Done! Any other comments or suggestions welcome of course. -- You

Re: [racket-users] tabular text display

2017-09-23 Thread Laurent
example. On Fri, Sep 22, 2017 at 9:50 AM, Laurent <laurent.ors...@gmail.com> wrote: > There's something like that buried in my bazaar package, maybe it's > sufficient for your needs: > https://github.com/Metaxal/bazaar/blob/master/text-table.rkt > > The main submodul

Re: [racket-users] tabular text display

2017-09-22 Thread Laurent
There's something like that buried in my bazaar package, maybe it's sufficient for your needs: https://github.com/Metaxal/bazaar/blob/master/text-table.rkt The main submodule prints the examples. It provides two ways to output tables. The first one 'table->string' is the simplest one and the

Re: [racket-users] Re: Library function naming

2017-08-29 Thread Laurent
On Tue, Aug 29, 2017 at 11:12 AM, Neil Van Dyke wrote: > > (Someday, I will have time to release a package that changes how > `define-struct`/`struct` identifiers are generated, to use `.` or `:`. To > at least have the appearance of being more idiomatic, to hint at the >

  1   2   >