At Sun, 20 Jan 2013 15:25:12 +0800, Limbo Peng wrote:
> As the profiler shows, the most time-consuming part lies in the for-loop of
> procedure "qf-connect!", and after a few experiments, I figure it out: it is
> the "in-indexed" procedure that makes it slow. I replaced "in-indexed" with
> sep
12 hours ago, Matthias Felleisen wrote:
>
> Eli's testing library is in some state of development. Some dev
> people are using it.
Yes, "some state" is a good description... I had a bunch of revisions
that mainly make it easy to create new arrows for different kinds of
testing.
Three hours ag
On Sun, Jan 20, 2013 at 6:50 PM, Robert Hume wrote:
> I'm really stuck trying to figure this out. Any pointers are useful!
> Here's the problem:
>
> f(n) = n if n<4
> and
> f(n) = f(n - 1) + 2f(n - 2) + 3f(n - 3) + 4f(n - 4) if n>= 4
>
> Here's my solution so far -- any one know what I'm doing wr
Hi Matthias,
On 01/20, Matthias Felleisen wrote:
> I can confirm a serious speed-up with the explicit vector-ref inside the for
> loop instead of the for-loop lookup with (in-vector ...). I get from 20s to
> 12s on my reasonably new (small) macair.
>
> When you look at the expansion, you see
Hi Danny,
On 01/20, Danny Yoo wrote:
> Oh! I'm sorry. I didn't even look at that part of Peng's email, and
> missed the comment on a faster algorithm. I had no idea what
> "quick-find" or "quick-union" were.
"quick-find" is a naive implementation of the union-find algorithm, which is
presen
Good point! I missed that.
Cheers, Harry
On Sun, Jan 20, 2013 at 8:39 PM, Stephen Bloch wrote:
>
> On Jan 20, 2013, at 7:55 PM, Harry Spier wrote:
>
>> Example 1: gives correct answer
>> (define shish-c (new onion% [sh (new onion% [sh (new lamb% [sh (new
>> skewer%)])])]))
>> (send shish-c onl
On 2013-01-20 17:26:33 -0500, Matthias Felleisen wrote:
> (What is that? Link doesn't work.)
Here is a working link:
http://www.pltgames.com/
It's a programming competition held every month in which the contestants
submit an implementation of a programming language that fits some theme.
IOW, a
On Jan 20, 2013, at 8:50 PM, Robert Hume wrote:
> I'm really stuck trying to figure this out. Any pointers are useful! Here's
> the problem:
>
> f(n) = n if n<4
> and
> f(n) = f(n - 1) + 2f(n - 2) + 3f(n - 3) + 4f(n - 4) if n>= 4
>
> Here's my solution so far -- any one know what I'm doin
For one thing, the question you are asking in the code,
(> i 4) ;; i.e., i > 4
is not the same question you ask in your equations,
n < 4
so, for starters, it would seem you need the two questions to be in agreement.
Best,
jmj
--
Sent from my Android phone with K-9 Mail.
Robert
I'm really stuck trying to figure this out. Any pointers are useful!
Here's the problem:
f(n) = n if n<4
and
f(n) = f(n - 1) + 2f(n - 2) + 3f(n - 3) + 4f(n - 4) if n>= 4
Here's my solution so far -- any one know what I'm doing wrong?
(define (f n)
(define (f-iter result i)
(if (> i 4)
On Jan 20, 2013, at 7:55 PM, Harry Spier wrote:
> Example 1: gives correct answer
> (define shish-c (new onion% [sh (new onion% [sh (new lamb% [sh (new
> skewer%)])])]))
> (send shish-c only-onions? )
>
> Example 2: gives incorrect answer
> (define shish-c (new onion% [sh (new onion% [sh (new
On Sun, Jan 20, 2013 at 5:23 PM, Matthias Felleisen
wrote:
>
> I thought Limbo Peng wanted to measure the transliteration of some Go
> algorithm. Wasn't there a remark somewhere that said "there is a faster
> algorithm based on union-find"?
Oh! I'm sorry. I didn't even look at that part of P
On Sun, Jan 20, 2013 at 6:25 PM, Matthias Felleisen
wrote:
>
> Normal OOPLs suffer from a lack of expressiveness.
> OO programmers make up for this lack with programming
> patterns. If you don't have first-class functions,
> simulate them with the command pattern. If you don't
> have functions but
I thought Limbo Peng wanted to measure the transliteration of some Go
algorithm. Wasn't there a remark somewhere that said "there is a faster
algorithm based on union-find"?
On Jan 20, 2013, at 7:11 PM, Danny Yoo wrote:
>> As the profiler shows, the most time-consuming part lies in the for-l
> As the profiler shows, the most time-consuming part lies in the for-loop of
> procedure "qf-connect!", and after a few experiments, I figure it out: it is
> the "in-indexed" procedure that makes it slow. I replaced "in-indexed" with
> separate calls to "in-range" and "in-vector" - the running
On Jan 19, 2013, at 9:43 PM, Harry Spier wrote:
> Does the Visitor pattern give something that collecting the methods in
> the main class or using a mixin doesn't? Or do the class features of
> Racket, particularly mixins make the Visitor Pattern superfluous?
Yes.
Normal OOPLs suffer from a
I can confirm a serious speed-up with the explicit vector-ref inside the for
loop instead of the for-loop lookup with (in-vector ...). I get from 20s to 12s
on my reasonably new (small) macair.
When you look at the expansion, you see the expected two-argument for-loop
function with two argume
On Jan 20, 2013, at 6:35 AM, Tim Brown wrote:
> Or are you starting a "design recipe" yourself with the "GOAL", "STEP
> 1"...?
>
> The reason I ask is this: before I received your answer this evening, I
> was going to re-attack the problem; either by taking the opportunity to
> look at
On Jan 20, 2013, at 6:35 AM, Tim Brown wrote:
> Below, you use define-syntax-rule.
Your example didn't seem to call for more.
And define-syntax-rule is just a syntactic
extension :-) for defining simplistic syntax
extensions. Syntax objects are all under the
hood.
But you are correct. When
Recall that last. Always measure at the command line . I'm seeing
FlVector at 30% faster.
#lang typed/racket
(provide main)
(require racket/unsafe/ops
racket/fixnum
racket/flonum)
(define-type NF Nonnegative-Fixnum)
(: matrix* :
FlVector FlVector Index Index Index
-> FlVector
Modification of the above to use FlVector did not show a difference.
On Sun, Jan 20, 2013 at 2:35 PM, Jens Axel Søgaard wrote:
> 2013/1/20 Berthold Bäuml :
> >> Ah! The Numpy example uses floats and not doubles.
> >
> > On my machine Numpy says it is using float64, hence, double.
> > big1.dtype
2013/1/20 Berthold Bäuml :
>> Ah! The Numpy example uses floats and not doubles.
>
> On my machine Numpy says it is using float64, hence, double.
> big1.dtype.name -> float64
Sorry for the confusion. I am used to the Racket documentation
were float means single precision, so I misinterpreted the
On 01/20/2013 11:14 AM, Jens Axel Søgaard wrote:
2013/1/20 Berthold Bäuml :
With the ffi-binding example from Jens (thank you!) I get for the 1000x1000
multiply 450ms -- only 2x slower than Mathematica or Numpy. So integrating
such a binding in math/matrix looks promising.
Huh? I am surprised
On 20.01.2013, at 19:14, Jens Axel Søgaard wrote:
> 2013/1/20 Berthold Bäuml :
>
>> With the ffi-binding example from Jens (thank you!) I get for the 1000x1000
>> multiply 450ms -- only 2x slower than Mathematica or Numpy. So integrating
>> such a binding in math/matrix looks promising.
>
> Hu
2013/1/20 Berthold Bäuml :
> With the ffi-binding example from Jens (thank you!) I get for the 1000x1000
> multiply 450ms -- only 2x slower than Mathematica or Numpy. So integrating
> such a binding in math/matrix looks promising.
Huh? I am surprised it is twice as slow.
Ah! The Numpy example us
On Jan 20, 2013, at 12:48 PM, Berthold Bäuml wrote:
> Nevertheless, my original motivation for the little test was to get an
> impression of what performance could be achieved in purely Typed Racket for
> numerical algorithms. Would it in principle be possible to come close to pure
> C-code pe
On 20.01.2013, at 18:09, Neil Toronto wrote:
> On 01/20/2013 07:09 AM, Jens Axel Søgaard wrote:
>> Hi Berthold,
>>
>> 2013/1/20 Berthold Bäuml :
>>> I tried a little test with mildly large Flonum matrices using math/matrix
>>> in Typed
>>> Racket. Two 1000x1000 dimensional matrices should be m
On Jan 20, 2013, at 6:37 AM, Tim Brown wrote:
>> On 01/19/2013 06:31 PM, Matthias Felleisen wrote:
> [quoting depth out by one]
>>> On Jan 18, 2013, at 12:36 PM, Tim Brown wrote:
>>> Here is one way to justify this answer. You really may wish to
>>> make define/test orthogonal to which testing f
On 01/20/2013 07:09 AM, Jens Axel Søgaard wrote:
Hi Berthold,
2013/1/20 Berthold Bäuml :
I tried a little test with mildly large Flonum matrices using math/matrix in
Typed
Racket. Two 1000x1000 dimensional matrices should be multiplied with (array-
strictness #t). Running this in DrRacket resu
On 2013-01-18 16:24:29 -0800, Brandon Mick wrote:
>new to racket. im trying to find out what would ii get as a value if I
>replace the s with “hello”
>its easier to do this with numbers where you would define s and give it a
>number, but it won't work here.
I think I may be misun
(cond
[(<= (string-length s) 5) 10]
[(string=? s “hello”) 50]
[(string=? (substring s 1 4) “ell”) 25]
[else 130])
new to racket. im trying to find out what would ii get as a value if I replace
the s with “hello”
its easier to do this with numbers where you would define s and give it a
On Sun, 20 Jan 2013 15:09:42 +0100, Jens Axel Søgaard
wrote:
Note: Disable "Populate "compiled" directories (for faster loading)"
to run it in DrRacket. To disable: Choose the language menu.
Choose the menu item "Choose language". Click the button
"advanced". The
I'm not sure of the ramifications of a change like that to
current-load/use-compiled, but here are two thoughts that don't require
that change:
- use 'raco make' to recompile the files (instead of the racket script you
have there)
- set up your directories as collections using 'raco link' and the
Hi!
Each time I install a new version of Racket I have a problem with the
old .zo files compiled with the old version.
I have the following program in my personal root racket folder that I
use to compile all the files in all the subfolders:
;---
#lang racket/base
(require compiler/compiler)
Dear Neil,
first I want to thank you for the great work the math package is. We hope to
use it heavily in our "Racket in Robotics" environment we are currently
developing.
I tried a little test with mildly large Flonum matrices using math/matrix in
Typed Racket. Two 1000x1000 dimensional matri
On 01/19/2013 06:31 PM, Matthias Felleisen wrote:
[quoting depth out by one]
On Jan 18, 2013, at 12:36 PM, Tim Brown wrote:
Here is one way to justify this answer. You really may wish to
make define/test orthogonal to which testing framework you use:
-- rackunit
-- test engine
-- the Eli
Matthias,
Thank you very much for your response.
First, in the interests of full disclosure; I found a bug in my code --
there was a missing #` from one of my templates, which I found through
luck rather than judgement. It'd be easy to claim that "all them
parentheses in Racket just confuse me",
37 matches
Mail list logo