??
> (string2value "-1234")
- : Integer
-28766
> (string2value "abcd")
- : Integer
54562
>
Is this your desired behavior?
> On Feb 12, 2020, at 16:43, Alain De Vos wrote:
>
> I came to the following result as conversion function :
>
> #lang typed/racket
> (: string2value (-> String
Many thanks! These look good.
John Clements
> On Jan 26, 2020, at 05:15, Darren Newton wrote:
>
> For learning JavaScript these two resources are very good:
>
> Eloquent JavaScript https://eloquentjavascript.net/
> You Don't Know JS https://github.com/getify/You-Dont-Know-JS
>
> The tutorial
I’m grading code, and one of my students keeps leaving out spaces in weird
places:
(cond
[(< x 3)(+ x 1)]
[else (f(g 9))])
I took a quick look in the style guide, and it doesn’t seem to have much to say
about this. Here’s what it has:
6.8 Spaces
Don’t pollute your code with spaces at the
> 3. Use `unsafe-require/typed`
> 4. Use the third argument to `index-of?`
>
> Sam
>
> On Sun, Dec 15, 2019 at 9:28 PM 'John Clements' via Racket Users
> wrote:
>>
>> It looks like my quick attempt at importing index-of into TR is running into
>> a problem
It looks like my quick attempt at importing index-of into TR is running into a
problem. Here’s the program I ran:
#lang typed/racket
(require/typed racket/list
[index-of (All (T) ((Listof T) T -> (U False Natural)))])
(index-of '(n s e w) 'n) ;; returns... #f?
In
The problem here is that the piano notes are not all the same duration.
Specifically, your chord (chord 60 64 67) is a bit longer:
(rs-frames (chord 60 64 67)) -> 161634 frames
(rs-frames (piano-tone 72)) -> 144000 frames
There are a lot of ways of solving this, including clipping the two
> On Dec 3, 2019, at 2:29 PM, James Platt wrote:
>
>
> On Nov 27, 2019, at 12:42 PM, Darth Vadør wrote:
>
>> I am having the same problem, and I am pretty sure that this is because the
>> new DMG uses the novel APFS format, which is not readable by our old HFS
>> computers.
>> As far as
>
> What would be the magic xattr command?
>
> Thanks.
>
> bruce
>
> 27 November 2019 20:26 "'John Clements' via Racket Users"
> wrote:
> This is 100% workaround rather than a fix, but have you considered using the
> minimal racket tarball:
>
> https:/
This is 100% workaround rather than a fix, but have you considered using the
minimal racket tarball:
https://download.racket-lang.org/releases/7.5/installers/racket-minimal-7.5-x86_64-macosx.tgz
…and then manually blessing the binaries using xattr and then installing the
rest of the system
Racket version 7.5 is now available from
https://racket-lang.org/
* Almost all of Racket version 7.5 is distributed under a new,
less-restrictive license: either the Apache 2.0 license or the MIT
license. See
It looks to me like you’re looking for “raco pkg update —clone” or “raco pkg
update —link”, but I may be mistaken.
Specifically, running
raco pkg update —clone drracket
in, say, your home directory should clone the package that includes the
drracket collection (and possibly others that are
Forgive me if I’m missing something important, but I see messages like this all
the time when I’m using two installations of racket simultaneously on one
machine. It suggests to me that you need to recompile using a raco make, or
just delete the compiled files. Again, apologies if I’m
hmm, I don’t see that. Perhaps it’s already been fixed? If this persists for
you, maybe you can show the output of
curl -v -o “/tmp/index.html” “https://download.racket-lang.org/“
?
> On Oct 22, 2019, at 2:28 PM, calvin tolman wrote:
>
> fyi:
>
> this url is broken:
Nice! Many thanks for sharing this.
John
> On Sep 21, 2019, at 2:06 AM, Alex Harsanyi wrote:
>
> A few days ago I posted about adding maps to the DrRacket REPL -- while a
> nice demo, this is not why I implemented the `map-snip%` object. The reason
> I implemented it is because I wanted to
Oh! and in fact, you already bundled it as a pkg:
https://pkgs.racket-lang.org/package/typed-racket-stream
Thanks!
John
> On Sep 7, 2019, at 2:23 PM, Alex Knauth wrote:
>
>
>> On Sep 6, 2019, at 1:04 PM, 'John Clements' via Racket Users
>> wrote:
>>
>&
Perhaps I just don’t know how to search the racket docs correctly, but IIUC
there’s no support for Streams in the current TR implementation? I just want to
use stream-cons, empty-stream, stream-first, and stream-rest. I guess the easy
workaround is just to use thunks to roll my own stream, but
The gen:stream documentation has this example:
(define-struct list-stream (v)
#:methods gen:stream
[(define (stream-empty? stream)
(empty? (list-stream-v stream)))
(define (stream-first stream)
(first (list-stream-v stream)))
(define (stream-rest stream)
Seriously! Magnificent!
Want to play with this code, show it to students and co-workers.
John
> On Aug 25, 2019, at 14:52, Zachary Romero wrote:
>
> Hello,
>
> Here is a little tessellation design I made along with some helper functions
> to generate them:
In that case, perhaps you can watch the calls to dlopen with strace? See
https://stackoverflow.com/questions/5103443/how-to-check-what-shared-libraries-are-loaded-at-run-time-for-a-given-process
for something that might be helpful.
John
> On Aug 20, 2019, at 11:30, James Platt wrote:
>
>
agreed, very cool. Tempted to mess with projections.
John
> On Jul 31, 2019, at 10:45, Stephen De Gabrielle
> wrote:
>
> Very nice! Thank you so much!
>
> Looks like an opportunity for some remixing :o
>
> S.
>
> On Wed, 31 Jul 2019 at 01:58, Alex Harsanyi wrote:
> Here is a map of the
Are you referring to section 6.3, which defines modules as individual
s-expressions?
It appears to me that this code would work fine if specified in the style shown
earlier in section 6.1, where each module appears in its own file, begins with
a #lang declaration, and the one referred to the
I’m not looking at the code here, but I believe the issue here is that the
handin-server receives user code in a serialized-could-contain-images-format
that can’t be decoded properly without importing the gui libraries.
It seems not implausible to me that you could special-case all-text
Perhaps you need to configure your lib-search-dir setting?
https://docs.racket-lang.org/raco/config-file.html?q=lib-search-dir#%28idx._%28gentag._65._%28lib._scribblings%2Fraco%2Fraco..scrbl%29%29%29
John
> On Aug 19, 2019, at 15:42, James Platt wrote:
>
> I'm having an issue where I can't
What distribution and platform do you have selected? The “variant” menu will
only appear for certain choices of distribution and platform.
John
> On Aug 9, 2019, at 12:04, 'Joel Dueck' via Racket Users
> wrote:
>
> On Win10 / Firefox the "variant" selector does not appear for me, I'm not
>
That’s a really nice example of the uses of abstraction in non-programming
domains. Thanks!
John
> On Jul 30, 2019, at 19:04, Daniel Prager wrote:
>
> Here's a photo of the original quilt from Red Pepper Quilts (not my work):
>
>
>
> More images, including details, here:
>
Version 7.3.0.900 is now available for testing from
https://pre-release.racket-lang.org/
(Note that this is not available from the usual download site.)
If all goes well, we will turn this version into a v7.4 release
within a couple of weeks.
This release is the first
I think the idea is that you can right-click on the image in the documentation
using your browser and save it, then use the Insert Image menu in DrRacket to
open the image you just saved. Does this make sense?
John
> On Jun 28, 2019, at 11:26, Bryan Pierce wrote:
>
> Hello everyone!!
>
>
It may be that ‘raco’ is not in your path. An alternative is to use the
“Package Manager” that’s built into DrRacket, under “File>Package Manager…” to
install libraries such as iracket.
> On Jun 23, 2019, at 09:10, Arie Schlesinger
> wrote:
>
> Hi,
> I am trying to install racket for jupyter
I’m responding to my own message, because (thanks to Andy Keep) I’ve now
discovered a big chunk of the answer.
Specifically, it looks Jeremy Siek’s compilers class includes a textbook
written by him and Ryan Newton whose preface appears to answer all of my
questions; specifically, that they
--
Racket version 7.3 is now available from
https://racket-lang.org/
Racket-on-Chez continues to improve. Snapshot builds are currently
available at pre.racket-lang.org, and we expect that Racket-on-Chez
will be included as a
Hmm… While I certainly agree that functional languages are good at manipulating
program representations, this job (manipulating programs) is more or less *the
one thing* that Racket does better than any other language. So… I guess I’d be
more likely to use Racket to manipulate Haskell programs
> On May 11, 2019, at 07:15, Josh Rubin wrote:
>
> Some people in their 60's do crossword puzzles to keep their mind sharp. I
> want to return to compiler hacking. I have experience with the ideas and code
> from many old compilers - MIT MacLisp and Rabbit (the grandfather of all
>
In dealing with students, it’s a constant frustration to me that students don’t
realize that clicking the ‘run’ button triggers both compilation and running.
Also, in my own work, I sometimes forget to compile things at the command line,
and then wonder why my programs are taking forever to
Well, I see two things going on here.
First, this example is an interesting one, because there’s no stack trace to
display; the (/ 1 n) is the only “frame” left on the “stack”, because the call
to sub2 has already returned, and the body of “reciprocal” is in tail position
with respect to the
There’s a paper at the most recent ICFP from Simon Peyton Jones (et al., I’m
guessing) on make languages, IIRC.
John
> On Apr 16, 2019, at 2:09 PM, Greg Hendershott
> wrote:
>
> I have a shallow understanding of GNU Make, which is only somewhat
> less-shallow as a result of recently
I haven’t checked, but my recollection is that this is/was a pointer to the
dearly departed winooski. I believe that we will get this running again, we
appear to have the replacement machine at least partly provisioned, but I
wouldn’t expect it to be up in the next day or two.
John
> On Apr
I’m glad to hear it! I think that it may not fail in nice ways for deeply
nested s-expressions, but that not be an issue for you. I do think that there
should be a nicer way than using a text%.
John
> On Apr 4, 2019, at 11:14 AM, Stephen Foster wrote:
>
> Thanks, John. Actually, when you
Oog… I don’t really think dynamic-require is the right tool here at all.
Setting the current-output-port seems vastly more reasonable.
John
> On Apr 1, 2019, at 12:19, Chansey wrote:
>
> More elegant way is combining with-output-to-file with dynamic-require
>
> (with-output-to-file FILE
>
Yep, excellent idea. I’ve added the ’tabular’ tag to csv-writing.
John
> On Mar 15, 2019, at 3:24 AM, jackhfi...@gmail.com wrote:
>
> I think we should all work towards making our existing code in this area more
> discoverable, so we can get a better sense of what libraries for working with
>
I would suggest maybe just using racket here:
#lang racket
(require setup/parallel-build)
(define racket-files
(for/list ([file (in-directory "/tmp")]
#:when (regexp-match #px"\\.rkt$" file))
file))
(parallel-compile-files racket-files
#:worker-count
I was doing some very low-key monte carlo testing today, and I wanted to
whether it would magically get faster if I used TR. The short answer is … well,
wait on that. Here’s my program; it’s supposed to check the likelihood that
three randomly chosen numbers in the interval 0-1 could be the
I wanted to format binary search trees for a data structures exam. I spent
literally hours trawling through old source code to see how I’d done it before…
graphviz? tikzpicture? … before giving up and doing what I should have done in
the first place, looking in the racket docs. Tree-layout does
I may be missing something obvious, here, but why are you using the name “else”
to bind the result in the match clause? I usually use the name “other”, which
might solve your problem.
John
> On Feb 25, 2019, at 4:32 PM, Shu-Hung You
> wrote:
>
> When using a case expression with an else
When I paste that code into a file called `foo`, it runs fine. Transcript:
hardy:/tmp clements> cat foo
#lang typed/racket
(require typed/racket/base)
(: fn (-> String Symbol))
(define (fn str) 'foo)
hardy:/tmp clements> racket foo
hardy:/tmp clements>
I can’t honestly guess what the problem
Has anyone explored the idea of a “big-step stepper”? It wouldn’t be a
“stepper” at all, of course, just a big tree, but you could imagine a learning
tool that allows you to explore the evaluation of a term by unfolding parts of
its big-step tree. Generating the raw data for this tree would be
I’m not that surprised :).
My guess is that our json reader could be sped up quite a bit. This looks like
the heart of the read-json implementation:
(define (read-json* who i jsnull)
;; Follows the specification (eg, at json.org) -- no extensions.
;;
(define (err fmt . args)
Github Classroom is trying to do this, but they’re not doing it well. I’ve used
it several times, and managed to make it work, but the experience has been very
me-programming-heavy, and not so great for the students. I think gradescope may
have just merged with a company that’s trying to
I’m pleased to announce that I had a good reason to extend the glpk package to
provide an interface to glpk’s mixed integer programming package; this means
that if you can express your problem as a sequence of linear constraints on a
set of variables where some of them need to be integers, you
Looks like… this is still the case? Specifically, reloading
pkgs.racket-lang.org still shows that all packages are missing documentation. I
thought I’d seen a message suggesting that this was resolved, but it appears I
was mistaken.
John
> On Feb 16, 2019, at 8:08 PM, David Storrs wrote:
>
I struggled with whether to send that message… I saw the name, “random access
lists”, thought, “hmm, I wonder what that would like”, and clicked on the link.
I wound up reading a bit about whether I should use (first impresssion)
superficial or in-depth contracts, and ran out of steam pretty
Good to know; I also use define-runtime-path with abandon, and was not aware of
possible consequences of casting too wide a net.
Thanks!
John
> On Feb 10, 2019, at 09:49, Philip McGrath wrote:
>
> I think this is probably a consequence of the quirk of `define-runtime-path`
> with
The pointer to RaLists would be much more enticing if we could convince David
Van Horn to begin his documentation with a couple of small examples….
John
> On Feb 13, 2019, at 14:35, Stephen De Gabrielle
> wrote:
>
> Thanks
>
> I should note that anyone with a GitHub account can edit
>
Okay, so this is Racket Users vs. Facebook (I’m asking this question in both
places). I think racket-users will win, personally. Sorry for the fairly OT
topic.
Here’s the question: Do any of you that run classes with multiple
instructors/TAs/etc. use some kind of issue tracker to manage course
Yes, this should appear in the web page. FWIW, raco commands come with a
standard “—help” flag:
raco molis-hai --help
raco molis-hai [ ... ]
where is one of
-b , --bits : Number of bits of entropy
-n , --passwords : Number of passwords generated
-o , --model-order : Order of the
> On Feb 8, 2019, at 15:01, George Neuner wrote:
>
> On Fri, 8 Feb 2019 08:37:33 -0500, Matthias Felleisen
> wrote:
>
>>
>>> On Feb 6, 2019, at 3:19 PM, George Neuner wrote:
>
>>>
>>> The idea that a compiler should be structured as multiple passes each
>>> doing just one clearly
Also, if you use duckduckgo as your default search engine, it looks like you
can prepend !archive or !wayback (turns out !a goes to amazon, sigh).
John
> On Feb 2, 2019, at 14:08, Neil Van Dyke wrote:
>
> Justin Zamora wrote on 2/2/19 3:39 PM:
>> Thanks! I always forget about archive.org!
>
Truly excellent news! Can’t wait to hear about it at the next RacketCon.
John
> On Jan 31, 2019, at 14:46, Christopher Lemmer Webber
> wrote:
>
> I've mentioned that my goal has been to advance the
> federated/decentralized social web in Racket on here before. Here's
> some news:
>
>
>
First off, many thanks for bringing to my attention the fact that Ryan has
started racket-izing SQL! And thanks, Ryan, for racket-izing SQL! Maybe I can
stop stapling together all of those long horrible strings now.
Next, to answer your question, I believe that eval is not necessary here, and
You probably already know this, but this is basically a case of parallel
evolution. The sxml tools come ultimately from Oleg Kiselyov, and I believe
he’s the one who formulated the data definition. Many people have worked with
him on this, including many people on this mailing list. I think
For what it’s worth, I’m firmly in the “let’s wait and see” camp. I’m not
worried about losing archives…I think I personally have just about all of the
messages that have been posted to the google group, and I don’t think I’m
alone. So: for the moment, I’m not that concerned.
John
> On Jan
As I think I mentioned to some of you earlier, I’ve been having real trouble
holding together a handin server for a class of 100 students all writing typed
racket code. In order to dig deeper, I set up a test machine and a repeatable
test harness, and I discovered some things that really
Interesting problem; your screenshot shows header text that should not appear
in the window, which suggests to me that you copied and pasted the text from
somewhere else into a buffer where the language level was already set. It looks
to me like you should do the following:
1) Delete the first
Well, that sounds pretty fantastic. Looks like it’s time to take another look
at Rash!
John
> On Jan 15, 2019, at 1:40 PM, William G Hatch wrote:
>
> On Tue, Jan 15, 2019 at 04:11:39PM -0500, 'John Clements' via Racket Users
> wrote:
>> Does rash have autocompletion of pat
Does rash have autocompletion of paths, yet? That’s my one super-super wishlist
item.
> On Jan 15, 2019, at 6:17 AM, 'Paulo Matos' via Racket Users
> wrote:
>
> I am surprised nobody mentioned Rash. I have been using it for all my
> shell scripting needs and it's awesome.
>
>
I think the use of defthing here is not really correct; I would argue that if
you’re going to use a defthing, you should go ahead and provide the definition
of the thing. Otherwise, just put in a reference to the name, so that the user
can click through to see the definition. I think that this
I’ve been having problems with but-not/e, and I’ve been bouncing between
strange things, but this one really looks ilke a bug. Unless it’s not.
John
#lang racket
(require data/enumerate
data/enumerate/lib)
(define (even-mod-10? x) (= 0 (modulo x 10)))
(define tens/e
(map/e (λ (x)
I’m having a great deal of fun working through The Little Typer. I’ve run into
a problem that I’m sure has a simple solution, but I don’t know what it is. To
understand my question, let me first give a simple example.
Here’s a dependent type that’s uninhabited when n is zero:
#lang pie
(claim
cf. Relevant tweet from Patrick Walton (I worked with Patrick on Rust at
Mozilla):
https://twitter.com/pcwalton/status/1073755208558100480
> On Dec 15, 2018, at 13:52, George Neuner wrote:
>
>
> This hit the news yesterday: SQLite contained a remote code execution bug.
> According to the
In answer to at least one of your questions, top-level “begin”s are “spliced”
into their context to produce top-level bindings. So, for instance,
#lang racket
(begin
(define a 3)
(define b 4))
(+ b a)
… evaluates to 7
I think this is not the only issue you’re going to run into, but it’s
Sounds fascinating. As an instructor for first-quarter CS+X, I’ve been looking
at alternatives to sound as a setting. I’m interested in the
Fisler/Krishnamurthi/Politz/Lerner Big Data curriculum, but yours also sounds
good!
John
> On Dec 6, 2018, at 5:16 AM, Matt Jadud wrote:
>
> Hi all,
>
LGTM, but I should note that I already accepted Philip’s earlier suggestion. If
you want to make further changes, go for it!
John
> On Nov 30, 2018, at 06:25, Greg Hendershott wrote:
>
> On Fri, Nov 30, 2018 at 5:58 AM Robby Findler
> wrote:
>> What about using the function
>>
>> (lambda
I claim that it’s not quite as simple as that. For instance, consider this
program:
#lang typed/racket
;; this one type-checks as a Number:
(ann
(let ()
(define num (string->number "aoeu"))
(unless num
(error "Not a number"))
(* num 2))
Number)
;; this one doesn't type-check
%29._true~3f%29%29
>
> I think that `not-false?` is easier to understand, but `true?` is more
> idiomatic.
>
> Gustavo
>
>
>
>
> On Thu, Nov 29, 2018 at 3:11 PM 'John Clements' via Racket Users
> wrote:
> This stack overflow post
>
> https://stackover
This stack overflow post
https://stackoverflow.com/questions/53543191/what-is-the-different-between-filter-and-filter-map/53545115#53545115
… is written by someone confused by the documentation for `filter-map`. I went
and read the documentation, and *I* was confused for about 30 seconds. I
I was complaining about the performance of the handin server under load last
weekend, and I figured I should try to actually measure the behavior of the
server under load. I’ve observed something somewhat surprising, and I have some
ideas, though I thought I’d ask here before doing something
Another random thought; has anyone thought of pushing this out to the student
computer, by supplying students with a hopefully-opaque executable that runs
the tests on a student program and then outputs a digitally signed test result?
John
> On Oct 23, 2018, at 21:50, Greg Hendershott wrote:
I’m currently supporting about 100 users in a PL class using the handin server
and writing their programs in Typed Racket. This load is really wrecking my
VPS. I upgraded to a larger VPS, and I’m still getting many users timing out.
The problem is that although this is an 8-core machine, racket
For many months, now, my github notifications of repository commits have been
marked like this one, with “this service has been marked for deprecation.” Is
there another way to get these e-mails, or are we just resigned to allowing
this to disappear?
Apologies if (as seems likely) I’ve missed
See answers to (some) questions below:
> On Oct 14, 2018, at 4:43 PM, theindigame...@gmail.com wrote:
>
> (I originally posted this to Reddit)
>
> I know Haskell reasonably well (but no Lisps), but I want to learn Racket to
> know more about
>
> macro systems and language-oriented
Do we have an existing doc redirect mechanism? I’ve just spent five minutes
looking at docs for defproc and the “Indexing” section, and didn’t find
anything. Doesn’t mean it’s not there, but I did have a look. Then again, this
thread is a living testament to my inability to find things in
D’oh! It’s just called subset?
Sorry,
John
> On Oct 4, 2018, at 11:16 AM, 'John Clements' via Racket Users
> wrote:
>
> It seems strange to me that we have (AFAICT) set-union, set-subtract, and
> set-member?, but not set-subset?. Would it make sense for me to propose a
It seems strange to me that we have (AFAICT) set-union, set-subtract, and
set-member?, but not set-subset?. Would it make sense for me to propose a pull
request for this? (it would just be (set-empty? (set-subtract b a)), I realize…)
John
--
You received this message because you are
The new OS X will feature a “dark mode”. I suspect that lots of Mac owners will
be clamoring for DrRacket “dark mode” real soon now. Ars Technica has a nice
review of the OS, including a whole bunch about the new dark mode:
This is not a bug report; I can investigate further if this is not already a
known issue.
I’ve found in the last few days that network problems can halt OS X DrRacket
much more completely than I believe they used to. To give a specific example,
if I run a program that tries to communicate
I believe that Ben is assuming that you’re not using
(define collection ‘multi)
in your top-level info.rkt file. If you *are* using multi-collection style, I
believe you have some changes to make.
If you’re not using the ‘multi style, you should totally ignore this email.
John
> On Aug 1,
ed by a new
> language feature, but I can’t immediately come up with one. Perhaps
> others have better ideas than I do in that department.
>
>> On Aug 2, 2018, at 12:24, 'John Clements' via Racket Users
>> wrote:
>>
>> I hate to turn a little question into a
ers to provide address mapping for
> the emulator, I need to design a big and complex interface to do so", but
> instead, you just go like "I'll do that later and let the user provide its
> own code for now".
>
> Just my two cents about how I use parameters :)
>
> On Fr
I hate to turn a little question into a big one, but… are parameters the right
choice, here? It seems to me that optional parameters would be more suitable.
Unfortunately, I’ve been on the other side of this fence, too: parameters are
vastly more convenient for implementors than adding optional
Honestly, reading that snippet … suggests to me that make-parser might not
actually be useful without all of the other internal ssax functions, and that
perhaps make-parser really shouldn’t be exported, after all :). Is it possible
to formulate productive uses of make-parser that don’t require
> On May 16, 2018, at 11:17 AM, N. Raghavendra wrote:
>
> At 2018-05-16T13:49:52-04:00, John Clements wrote:
>
>> It seems like make-parser should probably be provide’d. I’ve pushed a
>> change to make ssax:make-parser a top-level provide.
>
> Thank you very much. In
It seems like make-parser should probably be provide’d. I’ve pushed a change to
make ssax:make-parser a top-level provide. Would you (N. Raghavendra) be
interested in taking the raw pseudo-documentation currently provided for
ssax:make-parser and reformatting it into something useful, perhaps
Interestingly, it looks like this change is a deliberate one, made by Ryan
Culpepper back in 2011. Here’s the relevant commit:
commit 738bf41d106f4ecd9111bbefabfd78bec8dc2202
Author: Ryan Culpepper
Date: Tue Nov 22 02:46:32 2011 -0700
bypass ssax/ssax module
> On May 13, 2018, at 11:42 PM, Neil Van Dyke wrote:
>
> John, thank you for your past work on the SXML stuff. Two comments:
>
>> enforcing the “file://“ prefix.
>
> Sounds like the following doesn't matter in this case, but another way to
> support both a given URL or
> On May 13, 2018, at 21:55, N. Raghavendra wrote:
>
> At 2018-05-14T00:33:45-04:00, John Clements wrote:
>
>> It turns out that the “sxml:document” function looks for local files
>> *without* a file: prefix. So, you can just call
>>
>> (sxml:docmuent “/tmp/test.xml”)
Well, I’m the maintainer of this package, but not it’s author, and I have an
answer for you, but … you’re going to be surprised. It’s pretty gross.
It turns out that the “sxml:document” function looks for local files *without*
a file: prefix. So, you can just call
(sxml:docmuent
Well, that was easy! As usual, can’t believe I didn’t know that was there.
Many thanks to all,
John
> On May 7, 2018, at 5:00 PM, Daniel Prager wrote:
>
> ~r works nicely:
>
> > (~r 1.237472387 #:precision 2)
> "1.24"
--
You received this message because you
Okay, how many times have I written the function that accepts 1.237472387 and
returns “1.24” ? What do you folks use? I see that SRFI 54 covers this use
case, and a lot of others besides. Is this the most commonly used package for
formatting numbers?
John
--
You received this message
Yes! You should!
Many thanks for your work,
John Clements
> On Apr 30, 2018, at 12:28 PM, Graham Dean wrote:
>
>
> I’ve been looking to use Racket in a Jupyter notebook and I came across Ryan
> Culpepper’s iracket (https://github.com/rmculpepper/iracket).
>
>
YAY!
I can *never* remember this flag.
Many thanks,
John
> On Apr 25, 2018, at 9:32 AM, Matthew Flatt wrote:
>
> Branch: refs/heads/master
> Home: https://github.com/racket/racket
> Commit: bc55560f8dcef2780c2b64a95c2fc89513e3f447
>
>
I did a mini-experiment today, and was surprised.
Specifically, my guess was that changing the language of a file from
#lang typed/racket
to
#lang typed/racket/base
and adding the newly-necessary requires:
(require racket/match
racket/list
racket/math)
… would result in
101 - 200 of 484 matches
Mail list logo