The above is of course supposed to say that `divides?` needed a few seconds
more than the modulo example even in Typed Racket. Both were of course
typed when running with TR.
On Mon, Aug 24, 2015 at 3:38 PM, Rickard Andersson
rickard.m.anders...@gmail.com wrote:
Yes, that indeed seems to be
It looks to me like the slowdown isn't entirely explained by contract
checking, or perhaps TR isn't generating the contracts I would have
guessed. With the program below, I see this output
cpu time: 1228 real time: 1228 gc time: 133
cpu time: 658 real time: 658 gc time: 18
cpu time: 80 real time:
The difference in performance between the two functions when there are no
contracts (ie, when there are no types anywhere, or when everything is
typed) seems to be just from the extra `zero?` check in `divides?`. Adding
that to your program produced something that runs in about the same time as
My message below is not doing the right test. This is the right test
and it produces the expected result, namely that the TR version runs a
bit faster (presumably because of type-based optimizations that TR
does).
Robby
#lang racket
(module t typed/racket/base
(: divides? : Integer Integer -
With regards to the measurements; as is obvious from this mailchain, I
know about and use the `time` form. It hasn't skewed the results.
Using the optimizing coach in DrRacket has yielded no results, really. I
tried using it and there wasn't any advice on what to do for speedups
(unless that
On Mon, 24 Aug 2015 08:38:46 -0400,
Rickard Andersson wrote:
Yes, that indeed seems to be the problem. However, even after managing
to wrap the types properly, using `divides?` still ended up being a bit
slower. Not dramatically slower, but still noticably and unexpectedly.
As I'm not at
I was very curious about what you were talking about, as I saw wildly
different numbers (in line with what I'd seen before).
However, I did the following test:
| ~/tools/racket/6.1.1/bin/racket typed_divide.rkt
cpu time: 536 real time: 537 gc time: 27
cpu time: 347 real time: 347 gc time: 4
I have tracked it down finally to a very stupid error. Some uses of
@examples or @interaction-eval were not given quoted expressions and this
was the problem. It's actually surprising that it works in DrRacket, which
was very misleading.
Deren
On Sun, Aug 23, 2015 at 10:54 PM, Deren Dohoda
Actually quoting it was the wrong thing to do, as I found out when I
finally looked at the docs.
The docs are not very complicated, if someone could take a look at the
cf-manual.scrbl and see if something obvious is going wrong I'd appreciate
it.
We released my 10 year old son's game that was done in Racket:
www.1k3c.comhttp://www.1k3c.com
I'm still taking a little heat from my wife for using an obscure language
instead of something mainstream that is broadly used in industry, but I have
nothing but good things to say about using
The performance problems were related to the larger scrolling worlds. The H2DP
versions got slower the more clouds were in the maps. As an aside, what drove
the 20-something fps tic rate for H2DP, versus 30 for an every-other-vsync
update?
He is already through Algebra 2, so he gets
I'm trying to receive messages from a place. Receiving the messages with
`place-channel-get` works fine, but using `sync` blocks indefinitely. I want to
use `sync` instead of `place-channel-get` to check multiple channels
simultaneously for messages.
Below is an example that demonstrates the
On Aug 24, 2015, at 12:27 PM, John Carmack jo...@oculus.com wrote:
We “released” my 10 year old son’s game that was done in Racket: www.1k3c.com
I’m still taking a little heat from my wife for using an obscure language
instead of something mainstream that is broadly used in industry, but
2015-08-24 18:27 GMT+02:00 John Carmack jo...@oculus.com:
We “released” my 10 year old son’s game that was done in Racket:
www.1k3c.com
Tell him, he has done a great job.
It has the right game feel. I liked both how the levels progressed slowly
in difficulty
and that there were so many of
On Monday, August 24, 2015 at 12:28:07 PM UTC-4, John Carmack wrote:
We “released” my 10 year old son’s game that was done in Racket:
www.1k3c.com
I’m still taking a little heat from my wife for using an obscure language
instead of something mainstream that is broadly used in industry,
FYI, I think the Mac version is out of date. Dropbox says the mac
installer file is two weeks old, and the windows version is a few
hours old.
On Mon, Aug 24, 2015 at 12:27 PM, John Carmack jo...@oculus.com wrote:
We “released” my 10 year old son’s game that was done in Racket:
www.1k3c.com
On Mon, 24 Aug 2015 11:24:33 -0400,
Rickard Andersson wrote:
With regards to the measurements; as is obvious from this mailchain, I
know about and use the `time` form. It hasn't skewed the results.
Using the optimizing coach in DrRacket has yielded no results, really. I
tried using it and
Or something like this, with the rackjure package:
(require rackjure/threading 2htdp/image)
(~ background-img
(place-image image-1 x y) ; the background-img will be inserted as the
last argument, because that's what ~ does
(place-image image-2 x y) ; the background + image-1 will be
I don't know how much you involve yourself in the actual making of things
(it might be a principle of yours to leave everything practical to your
son and to only help with concepts), but couldn't it be useful to simply
make a macro like a `(place-images* ([imag1 x y] ...))` or the like? Maybe
On 08/08/2015 16:59, Matthew Flatt wrote:
The problem here is the same as in
https://groups.google.com/d/msg/racket-users/H7vilh3KcD4/pGZif3F3dEkJ
Indeed, adding that require line fixes the problem. Thanks!
I still haven't thought about it enough to fine better solution than
putting
Hi,
I noticed that the `divides?` function from math/number-theory seems to be
a huge bottleneck for whatever reason.
This seems strange to me, but I figured I'd write to the list to see if
maybe there are trade-offs made that make sense mostly for big integers or
something.
Example with
I hope someone has solution. It looks very odd to me.
The function divides? is defined in
https://raw.githubusercontent.com/racket/math/master/math-lib/math/private/number-theory/divisibility.rkt
#lang typed/racket/base
(provide divides? coprime? pairwise-coprime? bezout)
;;;
;;; DIVISIBILITY
On Aug 24, 2015, at 11:32 AM, John Carmack jo...@oculus.com wrote:
The idea that you functionally compose images like this:
(place-image image-1 x y
(place-image image-2 x y
(place-image image-3 x y)))
Which draws image1 on top of image2 on top of image 3, which
Hi John,
On 8/24/2015 4:31 PM, John Clements wrote:
On Aug 24, 2015, at 12:35 PM, George Neuner gneun...@comcast.net wrote:
I'm trying to generate some very simple web pages - basically success/failure
status for URLs followed from an email. However, I can't seem to figure out how to
On Monday, August 24, 2015 at 5:43:38 PM UTC, John Carmack wrote:
He didn't have any difficulty applying the functional image model, but when
you have 20 lines of text drawing composed together, it really looks like you
are just drawing things one after another, but backwards.
(define (pipe
Le lundi 24 août 2015 12:28:07 UTC-4, John Carmack a écrit :
We “released” my 10 year old son’s game that was done in Racket:
www.1k3c.com
I’m still taking a little heat from my wife for using an obscure language
instead of something mainstream that is broadly used in industry, but I
I would love it if he found it endlessly fascinating and spent all day
programming on his own, but he does need a bit of a push from mom and dad. He
enjoys it, but given the choice, he would still rather play games than make
them :-)
He reacted very positively to the initial intro to racket
It seems to me that (set-implements? (mutable-set) 'set-add) should return #f,
and in 6.1.1 (and I think 6.2), that's true.
But in the latest snapshots, it produces #t.
It seems like it's implemented as an error message instead of not implemented
at all, and `set-implements?` can't tell the
Hi George,
There is no feature of the Web server that you need.
All you need to do is generate a different HTML page.
For instance, if you are currently generating
htmlbodypYo!/p/body/html
with
`(html (body (p Yo!)))
And you want to add a stylesheet, so that you get the output
htmlheadlink
On Aug 24, 2015, at 3:40 PM, François Beausoleil
francois.beausol...@gmail.com wrote:
Le lundi 24 août 2015 12:28:07 UTC-4, John Carmack a écrit :
...
Hello John,
Thanks for sharing. Played a few levels and had fun :)
I have a 10 year old daughter. Did your son show interest in
Oh wow I thought I had deleted that long ago. Thank you, that was the
problem.
On Aug 24, 2015 4:11 PM, Robby Findler ro...@eecs.northwestern.edu
wrote:
I think you need to remove the local-require in the definition of
to-file in continued-fractions.rkt. This counts as a real require for
On Aug 24, 2015, at 2:32 PM, John Carmack jo...@oculus.com wrote:
The idea that you functionally compose images like this:
(place-image image-1 x y
(place-image image-2 x y
(place-image image-3 x y)))
Which draws image1 on top of image2 on top of image 3, which is
Was it this commit here?
https://github.com/plt/racket/commit/606a94621253391536e9c89c573dc70fd28efbe6
On Aug 24, 2015, at 5:50 PM, Alexander D. Knauth alexan...@knauth.org wrote:
It seems to me that (set-implements? (mutable-set) 'set-add) should return
#f, and in 6.1.1 (and I think 6.2),
I think you need to remove the local-require in the definition of
to-file in continued-fractions.rkt. This counts as a real require for
dependency purposes; it just makes the imports scoped locally.
dynamic-require is the way to get a require that happens only at
runtime (but in this case, if you
Hi Matthew,
Jay beat you to the answer 8-) [though the list apparently bounced my
reply to him]
I do appreciate your detailed explanation. I knew that I did not need
the html module to use response/xexpr in the web-server, but I was
looking for some syntax to add styling to the
On 8/24/2015 4:49 PM, Jay McCarthy wrote:
And if you want to add style attributes on a single element, like the p:
htmlbodyp style=color: puce;Yo!/p/body/html
Then write
`(html (body (p ([style color: puce;]) Yo!)))
Thanks Jay! That's exactly what I needed.
George
--
You received this
36 matches
Mail list logo