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
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
What do you want this for, more precisely?
On Tue, Sep 1, 2020 at 3:35 PM ibar...@radford.edu
> 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
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
> > not
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
I say keep it up, Stephen!
On Thu, Aug 20, 2020 at 5:33 AM Alex Harsanyi
> I am not sure that a template in the style of "dotnet new"
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
> Hi racketeers,
> I have two questions. The first is: is there a way to
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
Thanks Paulo, very interesting and useful as usual!
This version of the featured paper "Hygienic macro expansion" is a little
Or would Matthias be able to provide a freshly compiled version maybe? :)
(I would be truly impressed if the
(λ (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 ...)
Maybe try `struct->vector`, which works on any value iirc (from mobile,
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?
Just in case (not sure how relevant this is to you):
Works pretty well, but there are some caveats: if an object can be reached
outside of the
I use markdown syntax for that:
The function `function` functions like `functions` but for a single
I've seen others use `function' instead.
On Wed, May 27, 2020 at 7:04 PM Jens Axel Søgaard
> Den ons. 27. maj 2020 kl. 19.56 skrev Hendrik Boom >:
>> Is there an
Does it change anything if you use #lang racket/gui instead of #lang racket
On Tue, May 26, 2020 at 10:00 AM Philip Benade
> 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
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
e it whether it is
> supposed to be handled here.
> /Jens Axel
> Den søn. 10. maj 2020 kl. 10.51 skrev Laurent :
>> It's not Mac vs L
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?
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
(define N 10)
Stephen De Gabrielle <
> Awesome - keep them coming.
> You should feature one in each Racket-News!
> On Thu, 7 May 2020 at 10:33, Laurent wrote:
>> Have you ever wanted to extract a block of code out of its contex
Check out `make-check-location` and friends, and maybe `with-check-info*`
You may have to combine with the syntax-information extracted from the
syntax object `stx`.
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
If you insist on using match, you can do it with a loop:
(define (parsel l)
[(list-rest req1 req2 r)
(cons (list req1 req2)
(let loop ([r r])
[(list-rest opt1 opt2 opt3 opt4 r2)
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
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
> On Thu, Apr 30, 2020 at 9:09 AM Ben
Alex, that looks like an interesting workflow. Maybe worth a blog post? ;)
On Thu, Apr 30, 2020 at 12:11 AM Alex Harsanyi
> 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
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
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
There may be some examples on Rosetta code, or at least Racket snippets
could be added:
On Sat, Nov 23, 2019, 00:23 Martin DeMello wrote:
> One helpful thing to do is expand the GUI section of awesome-racket
On Thu, Nov 14, 2019 at 3:11 AM Andrew wrote:
> I have this:
> (define (related? a1 a2)
> (if (equal? a1 a2)
> (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
If I remember correctly, I think you want to add a spacer box at the right
of your message% in the same panel:
so that the message takes only the space it needs and is thus flushed to
On Sun, Oct 13, 2019 at 8:11
There is also the all too often forgotten iterative deepening depth-first
which has the advantages of both, at a very small cost in search time
compared to doing depth-first search with the right
This DB is even better:
On Sun, Sep 8, 2019 at 8:34 AM Laurent wrote:
> Nice :)
> On Sat, Sep 7, 2019 at 2:00 AM Alex Harsanyi
>> In fact, I updated the data frame package to be able to read the CSV file
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? &
There's a small free database here too:
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?
I strongly recommend you take a look at Levin Search (aka Universal
Search), which enumerates and runs programs by dovetailing in a smart way:
This avoids the
At least it's very simple to generate all 'syntactically' valid Turing
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
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
> 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
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
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
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:
>> Next Friday, 19
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
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
Thank you all for the new release!
On Wed, May 15, 2019 at 7:05 PM 'John Clements' via Racket Users <
> - Racket's IO system has been refactored to improve performance
> and simplify internal design.
Is it mild overall performance improvement, or are
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 <
> Yes -
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.
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
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
Not sure how much this would help you, but there's a `text-table`package.
It's fairly simple though.
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
A long time ago I had a need for this too, so I just made one for me:
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
Good point. I wasn't sure that would work---it does.
On Wed, Feb 27, 2019 at 1:28 PM Jens Axel Søgaard
> 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
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
> Here's a suggestion for the docs:
> You received this message because
Not sure what the actual problem is, but may be this excerpt from the docs
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.
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
> To understand the problem, it will be useful to understand the difference
> -- (make-vector 5
; > '(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
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
> On Wednesday, February 6, 2019 at 7:36:40 PM UTC+8, Laurent Orseau wrote:
On Wed, Feb 6, 2019 at 11:25 AM Alex Harsanyi
> (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)))
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
On Mon, Feb 4, 2019 at 9:55 PM Robby Findler
> > 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
On Sun, Feb 3, 2019 at 7:00 PM Robby Findler
> 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
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
>> I can't say concretely what will go wrong I am sorry to say. There are
On Sun, Feb 3, 2019 at 3:40 PM Matthias Felleisen
> 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
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
> [[ 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.
Thanks for the fast fix Matthew!
It should help at least for those who install the nightlies but haven't
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
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
> Could it be changed to also set `(print-as-expression)` appropriately?
> On Fri, Feb 1, 2019 at 11:02 AM Robby Findler
> > Ah, right! I forgot about that setting. Yes, what you describe is
> > exactly what happens.
> > Robb
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
acket or the one you are
> "inside" in the repl if you're in one). Possibly those are different
> for you, Laurent?
> On Fri, Feb 1, 2019 at 9:33 AM Sam Tobin-Hochstadt
> > I see the same behavior in DrRacket as in command l
quickscript-extra, if you've installed it, since it is not in DrRacket's
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
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
r it! We have a fallback if this don't work out. :)
> 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
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?
> On Fri, Feb 1, 2019 at 4:12 AM Laurent wrote:
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,
Thanks for bringing this up.
Indeed the compile option from the quickscript menu should work, but it's
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
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:
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
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
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
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
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
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,
It's because PLaneT is deprecated. The new package repository is located at:
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
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 (韋嘉誠)
> (require) binds at compile time and creates a cycle, but by using
: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)])
Take at look at Racket's `for' loops. They are very flexible.
The guide with examples:
On Sun, Apr 1, 2018 at 10:14 AM,
The quickscript-extra package (a DrRacket plugin) provides such a facility
(the 'bookmarks' script), among many other things:
It's not perfect but should still be helpful. In case it doesn't suit you
needs, quickscript should allow you to
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
This is awesome! Thanks so much for doing this, I'm sure it's going to be
On Sat, Feb 3, 2018 at 7:08 AM, Alex Harsanyi
> Hi Matthias,
> I updated the plot package to cover all the cases I had in mind for plot
> overlays and also updated my
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 <
> Christopher Lemmer Webber writes:
> > Matthew Flatt writes:
> >> At Wed, 10 Jan 2018 10:29:28
On Wed, Jan 10, 2018 at 6:20 AM, Christopher Lemmer Webber <
> 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
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
> /Applications/Racket v6.11/collects/racket/private/submodule.rkt
> On Sun, Dec 17, 2017 at 10:36 AM, Laurent <laurent.ors...@gmail.com>
>> Also, I can't find where module+ is defined. Anyone has a pointer?
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:
Excellent, thanks a lot!
On Sat, Dec 16, 2017 at 8:44 PM, Matthew Flatt wrote:
> (provide proc)
> (define proc (list
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
You received this message because you are subscribed to the Google Groups
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
Does anyone know a good explanation as to why the following code works
depending on whether the apparently-useless line is commented out?
#;(new object%) ; uncommenting this raises an error
(define ns (namespace-anchor->namespace nsa))
A new version of MrEd Designer (package 'mred-designer') is available:
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
> > 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.
Any other comments or suggestions welcome of course.
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:
> The main submodul
There's something like that buried in my bazaar package, maybe it's
sufficient for your needs:
The main submodule prints the examples.
It provides two ways to output tables. The first one 'table->string' is the
simplest one and the
On Tue, Aug 29, 2017 at 11:12 AM, Neil Van Dyke
> (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 - 100 of 169 matches
Mail list logo