[racket-users] Auto-generated AWS SDK

2019-07-09 Thread Frank Pursel
Dear Racketeers,

I've recently been doing some work on Amazon Web Services and came
across Greg Hendershott's AWS package for Racket (thank you,
Greg!). This did nearly everything I'd wanted to do, modulo:

1. I didn't see an easy way to manually supply the
X-Amz-Security-Token when it's not obtained from an EC2 instance
metadata (e.g. obtained via STS's assume role or supplied as an
environment variable)

2. not all the AWS services I'd want to use are supported

In the end, I ended up using the Boto3 library and Python to do what I
needed for expediency, but it got me thinking about a more
comprehensive solution. I don't know that I have bandwidth to do this
myself at the moment, but I wanted to write up some of what I
discovered in hopes that it's useful / interesting to someone on this
list, or as a way of discovering that someone else is already working
on such an implementation :-)

What I discovered when I went looking for how 3rd parties have build
AWS SDK's what I learned is that many newer 3rd party SDKs are not
manually written. Instead they tend to use JSON specs provided by AWS
to automatically generate the SDK
(https://github.com/aws/aws-sdk-js/tree/master/apis). Examples of this
that may be of interest here include:

- Clojure's aws-api https://github.com/cognitect-labs/aws-api &
  https://www.youtube.com/watch?v=ppDtDP0Rntw

- Haskell's amazonka
  http://brendanhay.nz/amazonka-comprehensive-haskell-aws-client &
  https://github.com/brendanhay/amazonka

- Julia https://github.com/JuliaCloud/AWSSDK.jl

I'm told that this is how Amazon generates their SDKs as well as the
CLI interface for the AWS CLI. I was somewhat surprised to find that,
apart from Clojure, I couldn't find examples of this approach being
taken within the broader lisp community, given how well suited lisps
are for generating code from data.

One thing I discovered when looking through the Julia code that I
thought might be interesting to this group was that there is a macro
that creates, compiles, and deploys a Julia function to AWS Lambda,
allowing a kind of scalable parallel compute infrastructure:
https://github.com/samoconnor/AWSLambda.jl#run-a-julia-function-in-the-cloud. 
My
first thought was of some kind of remote places infrastructure for
Racket.

As I said, I probably don't have the bandwidth to tackle this myself,
but I thought that this approach might be interesting (maybe even
enticing) to members of this community. Thank you all for all the
great work you do!

Best,
Frank


-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/da86327a-7e1d-41c6-8e84-bc9cb19b4d22%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] Thinking in scheme / racket

2019-07-09 Thread Daniel Prager
Hi Bob

My pleasure.

(in-value ...) is a very neat facility that I suspect could do with a
couple of examples in the Racket Guide and Reference to highlight its
utility and application.

Dan

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CAFKxZVW1YtJzufh7jyWo5e%2B-2nc4pAiWcLyXiVamMkQc1oqLCg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


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

2019-07-09 Thread Simon Schlee
Classes are really nice and easy for tasks like this, it took me a little 
bit to get used to the class syntax, but now I love them.
I found that it helps to look at real code that uses classes, because the 
documentation quickly goes into quite advanced/special use cases.
You can use them to wrap-up/encapsulate a bunch of smaller gui parts and 
then just expose some methods that handle the updates etc. 

As always, I welcome people sharing alternative ways to write the same 
> code. 
>
Here you go:

#lang racket/gui

(define progress-bar%
  (class horizontal-pane%
(super-new)

(define gauge (new gauge%
   [label #f]
   [parent this]
   [range 100]))

;; initialize to 100% with no auto resize
;; this way the label has the right size
;; so that everything can be seen
;; and it does not "wobble" around while filling up
(define msg (new message%
 [parent this]
 [label "100%"]))

(define/public (set-value val)
  (send gauge set-value val)
  (send msg set-label (string-append (~a val) "%")))

;; set back to 0%
(set-value 0)))


(module+ main
  (define frame (new frame%
 [label "Progress Bar"]
 [width 300]))
  (define progress (new progress-bar% [parent frame]))

  (send frame show #t)
  (for ([i (in-range 1 101)])
(sleep 0.05)
(send progress set-value i)))


-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/0aed70ba-65e0-4d49-a1c4-f1b67faced92%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] Thinking in scheme / racket

2019-07-09 Thread Bob Heffernan
Daniel,

Thank you.
The piece of the puzzle I was missing was in-value.

Your version is much easier to read than mine.  It is also easy to
modify it to get a list of the primes that occur, which is nice.

Regards,
Bob

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/20190709160332.sstmsz72frjh4huw%40bob-cit.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] Re: doing a "show hn" of your racket project

2019-07-09 Thread Dexter Lagan
  Thank you sir, I plan on posting more original content when time allows.

Dex

> On Jul 9, 2019, at 4:56 PM, stewart mackenzie  wrote:
> 
> That's some cool bloggery going on there, thanks for sharing.
> 
>> On Fri, 21 Jun 2019, 16:16 Dexter Lagan,  wrote:
>> www.newlisper.com/blog
>> www.eicm.net/blog
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to racket-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/racket-users/CA%2BLh%3Dn08yAqTQA7UT6-ZBSMt6G5Rm4TM%3Dsdd99EyCFMGXZBoRw%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/1F048EC0-94B6-4DB4-A753-E6AFE170F77C%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] Re: doing a "show hn" of your racket project

2019-07-09 Thread stewart mackenzie
That's some cool bloggery going on there, thanks for sharing.

On Fri, 21 Jun 2019, 16:16 Dexter Lagan,  wrote:

> www.newlisper.com/blog
> www.eicm.net/blog
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CA%2BLh%3Dn08yAqTQA7UT6-ZBSMt6G5Rm4TM%3Dsdd99EyCFMGXZBoRw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] What's wrong with my code?

2019-07-09 Thread 曹朝
🤩 Wow! I get it, thanks.

在 2019年7月9日星期二 UTC+8下午10:04:59,Alex Knauth写道:
>
>
> On Jul 7, 2019, at 10:24 AM, 曹朝 > wrote:
>
> This is a simple algorithm for compute the shortest edit distance, it can 
> work with `#lang racket/base`.
> But in Typed Racket, I just got the error message: "insufficient type 
> information to typecheck". I don't know why this code can't pass the type 
> checker.
> Someone can help? Thank you.
>
> #lang typed/racket/base
> (require math/array)
>
> (: shortest-edit-distance (-> String String Integer))
> (define (shortest-edit-distance str0 str1)
> (let* ([l0 : Integer (string-length str0)]
>[l1 : Integer (string-length str1)]
>[table : (Mutable-Array Integer) (array->mutable-array (make-array 
> (vector l0 l1) 0))])
>   (for*/last : Integer ([i0 : Integer (in-range l0)]
> [i1 : Integer (in-range l1)])
> (let* ([c0 : Char (string-ref str0 i0)]
>[c1 : Char (string-ref str1 i1)]
>[base : Integer (cond
>  [(and (= i0 0) (= i1 0)) 0]
>  [(= i0 0) (array-ref table (vector i0 (sub1 
> i1)))]
>  [(= i1 0) (array-ref table (vector (sub1 i0) 
> i1))]
>  [else (min (array-ref table (vector i0 (sub1 
> i1)))
> (array-ref table (vector (sub1 i0) 
> i1))
> (array-ref table (vector (sub1 i0) 
> (sub1 i1])]
>[answer : Integer (if (char=? c0 c1) base (add1 base))])
>
>   (array-set! table (vector i0 i1) answer)
>   answer
>
>
> As Matthias Felleisen said, the `for*/last` form is not yet supported by 
> Typed Racket. The 6 forms for/and, for/first, for/last, for*/and, 
> for*/first, and for/last are documented as "Like the above, except they are 
> not yet supported by the typechecker."
>
> However, many uses of `for/first` can be replaced with `for/or`, and many 
> uses of `for/last` can be replaced with `for/fold`. If you see
>
> (for*/last : type (clause ...)
>   body)
>
> you can replace it with
>
> (for*/fold ([_unused : type #f])
>(clause ...)
>   body)
>
> and get the same result.
>
> There is also another problem with your code that prevents it from 
> type-checking. The `for*/last` form or the `for*/fold` replacement can 
> return #false, and that means you have to replace the result type `Integer` 
> with `(U Integer #f)` for it to type-check. However, that's probably 
> incorrect since an edit-distance should always be defined, so either you 
> need to change how you iterate or handle the #false differently... I'm not 
> sure.
>
> Alex Knauth
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/db57a3c2-3395-4e0f-aac3-789e8e038461%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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

2019-07-09 Thread Travis Hinkelman
It's funny how just knowing that there is an easy solution to a problem 
makes the problem easier to solve. My first thought about returning objects 
(prior to sending initial email) was that I would return all of the objects 
unnamed but then I was confused about how to specify the parents of the 
child objects in the `initialize-progress-bar` function. The code below 
solves my problem. As always, I welcome people sharing alternative ways to 
write the same code. 

#lang racket/gui

(define (initialize-progress-bar)
  (define frame (new frame%
 [label "Progress Bar"]
 [width 300]))

  (define hpane (new horizontal-pane%
 [parent frame]))

  (define gauge (new gauge%
 [label ""]
 [parent hpane]
 [range 100]))

  (define msg (new message%
   [parent hpane]
   [auto-resize #t]
   [label "0%"]))

  (send frame show #t)
  (values gauge msg))

(define (update-progress-bar new-value)
  (send the-gauge set-value new-value)
  (send the-msg set-label (string-append (~a new-value) "%")))

(define-values (the-gauge the-msg) (initialize-progress-bar))
(for ([i (in-range 1 101)])
  (sleep 0.05)
  (update-progress-bar i))




On Tuesday, July 9, 2019 at 1:05:03 AM UTC-7, Laurent wrote:
>
> 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 
> `(initialize-progress-bar)` call, and then pass these values to 
> `update-progress-bar' so that `gauge' and `msg' have the correct values 
> there.
>
> Does that make sense?
>
> On Tue, Jul 9, 2019 at 7:23 AM Travis Hinkelman  > wrote:
>
>> Hi All,
>>
>> I was playing around with creating a progress bar. The basic idea was 
>> straightforward.
>>
>> #lang racket/gui
>>
>> (define frame (new frame%
>>[label "Progress Bar"]
>>[width 300]))
>>
>> (define hpane (new horizontal-pane%
>>[parent frame]))
>>
>> (define gauge (new gauge%
>>[label ""]
>>[parent hpane]
>>[range 100]))
>>
>> (define msg (new message%
>>  [parent hpane]
>>  [auto-resize #t]
>>  [label "0%"]))
>>
>> (send frame show #t)
>>
>> (for ([i (in-range 1 101)])
>>   (sleep 0.05)
>>   (send gauge set-value i)
>>   (send msg set-label (string-append (~a i) "%")))
>>
>>
>> When I tried to take the next step of wrapping this up into a couple of 
>> functions, I was completely lost. I don't know how to initialize a frame 
>> with child elements by calling a function because all of the elements of 
>> the frame only exist in the function and not at the top-level (probably 
>> butchering the jargon here; hopefully it makes sense). I wasn't really sure 
>> where to look to learn more about doing such a thing. Here is some 
>> pseudocode to try to further illustrate my confusion.
>>
>> (define (initialize-progress-bar)
>>   ;; insert code that creates progress bar
>>   ;; i.e., from defining frame to sending frame in code above)
>>
>> (define (update-progress-bar new-value)
>>   (send gauge set-value new-value)
>>   (send msg set-label (string-append (~a new-value) "%")))
>>
>> (initialize-progress-bar)
>> (for ([i (in-range 1 101)])
>>   (sleep 0.05)
>>   (update-progress-bar i))
>>
>> Thanks,
>>
>> Travis
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Racket Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to racket...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/racket-users/61a3ea75-d285-45d1-90d4-de569c441c8d%40googlegroups.com
>>  
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/7adee791-e04e-44b8-8f27-881298865d48%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] What's wrong with my code?

2019-07-09 Thread Alex Knauth

> On Jul 7, 2019, at 10:24 AM, 曹朝  wrote:
> 
> This is a simple algorithm for compute the shortest edit distance, it can 
> work with `#lang racket/base`.
> But in Typed Racket, I just got the error message: "insufficient type 
> information to typecheck". I don't know why this code can't pass the type 
> checker.
> Someone can help? Thank you.
> 
> #lang typed/racket/base
> (require math/array)
> 
> (: shortest-edit-distance (-> String String Integer))
> (define (shortest-edit-distance str0 str1)
> (let* ([l0 : Integer (string-length str0)]
>[l1 : Integer (string-length str1)]
>[table : (Mutable-Array Integer) (array->mutable-array (make-array 
> (vector l0 l1) 0))])
>   (for*/last : Integer ([i0 : Integer (in-range l0)]
> [i1 : Integer (in-range l1)])
> (let* ([c0 : Char (string-ref str0 i0)]
>[c1 : Char (string-ref str1 i1)]
>[base : Integer (cond
>  [(and (= i0 0) (= i1 0)) 0]
>  [(= i0 0) (array-ref table (vector i0 (sub1 
> i1)))]
>  [(= i1 0) (array-ref table (vector (sub1 i0) 
> i1))]
>  [else (min (array-ref table (vector i0 (sub1 
> i1)))
> (array-ref table (vector (sub1 i0) 
> i1))
> (array-ref table (vector (sub1 i0) 
> (sub1 i1])]
>[answer : Integer (if (char=? c0 c1) base (add1 base))])
> 
>   (array-set! table (vector i0 i1) answer)
>   answer

As Matthias Felleisen said, the `for*/last` form is not yet supported by Typed 
Racket. The 6 forms for/and, for/first, for/last, for*/and, for*/first, and 
for/last are documented as "Like the above, except they are not yet supported 
by the typechecker."

However, many uses of `for/first` can be replaced with `for/or`, and many uses 
of `for/last` can be replaced with `for/fold`. If you see

(for*/last : type (clause ...)
  body)

you can replace it with

(for*/fold ([_unused : type #f])
   (clause ...)
  body)

and get the same result.

There is also another problem with your code that prevents it from 
type-checking. The `for*/last` form or the `for*/fold` replacement can return 
#false, and that means you have to replace the result type `Integer` with `(U 
Integer #f)` for it to type-check. However, that's probably incorrect since an 
edit-distance should always be defined, so either you need to change how you 
iterate or handle the #false differently... I'm not sure.

Alex Knauth

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CBA4BD58-538E-42CB-8446-C2A1F1573B40%40knauth.org.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] Thinking in scheme / racket

2019-07-09 Thread Daniel Prager
Hi Bob

Here's how I'd write your function using for*/sum:

(define (count-primes-in-seq/2 f bound)
  (for*/sum ([n (in-range bound)]
 [k (in-value (f n))]
 #:when (and (positive? k) (prime? k)))
1))

Performance is similar to your original.

Dan

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CAFKxZVVj3Z8jdUA69yCuzX%2BLZ3bv__i7d-jW43RfX3QC4FmHcA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] Re: doing a "show hn" of your racket project

2019-07-09 Thread amz3
Another way to promote Racket (and possibly Scheme?) is to publish in 
http://joss.theoj.org/

On Monday, June 24, 2019 at 12:29:41 AM UTC+2, Eric Griffis wrote:
>
> This is the kind of stuff I look for in my Twitter feed. If I knew how 
> to subscribe to updates, I would. 
>
> Eric 
>
>
> On Fri, Jun 21, 2019 at 1:16 AM Dexter Lagan  > wrote: 
> > 
> >   Once my git repos will be presentable, you can be sure I'll show it 
> all to HN. I'm a beyond-full-time Racket programmer and I intend to share 
> most of the non-commercial code I write. I also started two blogs: 
> > 
> > About lisp in general, but contains a lot of Racket-related posts 
> > www.newlisper.com/blog 
> > 
> > and 
> > 
> > A more general, deeply technical blog, will also contain less specific 
> posts about Racket: 
> > www.eicm.net/blog 
> > 
> >   They haven't been published anywhere, and maybe Racketeers can give me 
> some feedback before I make a fool of myself elsewhere. If the content is 
> up to par, feel free to mention it in the newsletter. 
> > 
> > Dex 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/64e09b68-91b3-4751-bc39-0bd9a898b091%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Thinking in scheme / racket

2019-07-09 Thread Bob Heffernan
Dear all,

I recently wanted to count the number of primes in the sequences 2^n+3
and 2^n-3 (and a few more besides) where n is a positive integer.

After a while I realised that I had no real idea how to do this in racket /
scheme.  I think part of my problem is that I really think of the problem in an
imperative way, i.e. "for each n check whether 2^n+3 is prime and if so add one
to a count".

The program at the bottom of my email is what I came up with.  I hope it is
clear.  I think a more idiomatic racket approach would be to use the for
looping construct but I couldn't quite figure out how to make this do what I
wanted.

I can imagine improving the below by modifying the count-primes-in-seq
procedure to take several "formulas" so I can deal with several sequences at
once.  However, the code below is quite slow even just for one sequence so I
imagine that a different approach entirely is what is needed.

So, my question is this: how would you more experienced racketeers write code
for something like this?

I quickly threw together a naive program in Python (a language I'm not too
familiar with either) and it was faster to write and runs quicker.  However, to
be quite honest, I am fonder of racket and would rather just get better at
writing racket code for the little things I need to do.

Any guidance is appreciated.

#lang racket

(require math/number-theory)

(define (count-primes-in-seq formula bound)
  (let loop ([n 0]
 [c 0])
(let ([k (formula n)])
  (cond
[(> n bound)
 c]
[(and (positive? k) (prime? k))
 (loop [+ n 1] [+ c 1])]
[else
  (loop [+ n 1] c)]

(define bound 1000)

; Primes of the form 2^n-3
(count-primes-in-seq
  (λ (n) (- (expt 2 n) 3))
  bound)

; Primes of the form 2^n+3
(count-primes-in-seq
  (λ (n) (+ (expt 2 n) 3))
  bound)


Regards,
Bob Heffernan

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/20190709120859.7vhyvykfhxtqgk5n%40bob-cit.
For more options, visit https://groups.google.com/d/optout.


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
`(initialize-progress-bar)` call, and then pass these values to
`update-progress-bar' so that `gauge' and `msg' have the correct values
there.

Does that make sense?

On Tue, Jul 9, 2019 at 7:23 AM Travis Hinkelman 
wrote:

> Hi All,
>
> I was playing around with creating a progress bar. The basic idea was
> straightforward.
>
> #lang racket/gui
>
> (define frame (new frame%
>[label "Progress Bar"]
>[width 300]))
>
> (define hpane (new horizontal-pane%
>[parent frame]))
>
> (define gauge (new gauge%
>[label ""]
>[parent hpane]
>[range 100]))
>
> (define msg (new message%
>  [parent hpane]
>  [auto-resize #t]
>  [label "0%"]))
>
> (send frame show #t)
>
> (for ([i (in-range 1 101)])
>   (sleep 0.05)
>   (send gauge set-value i)
>   (send msg set-label (string-append (~a i) "%")))
>
>
> When I tried to take the next step of wrapping this up into a couple of
> functions, I was completely lost. I don't know how to initialize a frame
> with child elements by calling a function because all of the elements of
> the frame only exist in the function and not at the top-level (probably
> butchering the jargon here; hopefully it makes sense). I wasn't really sure
> where to look to learn more about doing such a thing. Here is some
> pseudocode to try to further illustrate my confusion.
>
> (define (initialize-progress-bar)
>   ;; insert code that creates progress bar
>   ;; i.e., from defining frame to sending frame in code above)
>
> (define (update-progress-bar new-value)
>   (send gauge set-value new-value)
>   (send msg set-label (string-append (~a new-value) "%")))
>
> (initialize-progress-bar)
> (for ([i (in-range 1 101)])
>   (sleep 0.05)
>   (update-progress-bar i))
>
> Thanks,
>
> Travis
>
> --
> You received this message because you are subscribed to the Google Groups
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to racket-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/racket-users/61a3ea75-d285-45d1-90d4-de569c441c8d%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CABNTSaEaaAaQSneGi2yOR4dv_0hOz_WYbaQ4v19q4%2BuXY_E%3Dhw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.