Re: [racket-users] Vector or array type for math vector?

2016-09-16 Thread WarGrey Gyoudmon Ju
No, Racket's vector is an array from Java's perspective(int [] for
instance), not a custom data structure,
Array is not a builtin datatype in Racket.

If working with math-lib, you already have linear algebra supported.
the array in math/array is a custom data structure with vector in heart.

On Fri, Sep 16, 2016 at 9:39 AM, Lawrence Bottorff 
wrote:

> I'm trying out some of the math capabilities of Racket and I'm guessing
> the linear algebra concept of a vector is actually an Array type in Racket,
> not a Vector. Is this correct? Racket's Vector is a data (as with Java's
> Vector) structure, right?
>
> --
> 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.
> 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.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Re: (sixth RacketCon) General Q

2016-09-16 Thread Vincent St-Amour
Hi Greg,

Yes, we are planning to live stream RacketCon. Details will be on the
web page once the stream is set up.

We'll have people monitoring the #racket IRC channel on freenode
throughout the day. If you (or anyone) has any questions at any point,
they will relay them to the speaker.

Finally, we'll also be recording the talks for posterity. If you miss
anything, you'll be able to catch up on it later.

Vincent




On Fri, 16 Sep 2016 04:06:27 -0500,
Greg Trzeciak wrote:
> 
> As unfortunately I won't be attending RacketCon I would like to know if there 
> is any live streaming planned for the event?
> Also if it is possible I would like to ask related questions to be addressed 
> on Q (if streamed/recorded). 
> 
> What are future plans toward portability of Racket (ie:Racket on 
> Android/JS/JVM/CLR(DLR) etc.)? and if there is any ongoing work in this 
> direction? What are the main obstacles before it is possible? What's the 
> feasibility of full portability? What's the expected priority and timeline of 
> such plans?
> 
> Thank you
> 
> Greg

-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] Re: (sixth RacketCon) General Q

2016-09-16 Thread Jay McCarthy
On Fri, Sep 16, 2016 at 5:06 AM, Greg Trzeciak  wrote:
> What are future plans toward portability of Racket (ie:Racket on 
> Android/JS/JVM/CLR(DLR) etc.)? and if there is any ongoing work in this 
> direction? What are the main obstacles before it is possible? What's the 
> feasibility of full portability? What's the expected priority and timeline of 
> such plans?

Full screen OpenGL Android apps with touch and sound is available now.

Jay

-- 
Jay McCarthy
Associate Professor
PLT @ CS @ UMass Lowell
http://jeapostrophe.github.io

   "Wherefore, be not weary in well-doing,
  for ye are laying the foundation of a great work.
And out of small things proceedeth that which is great."
  - D 64:33

-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] Re: Trying to understand racket/gui and racket/draw

2016-09-16 Thread Robby Findler
You could draw into a bitmap and then have on-paint draw that bitmap, too.

Robby

On Fri, Sep 16, 2016 at 2:53 AM, Jens Axel Søgaard
 wrote:
> As Alex writes the operating system (the system GUI) might erase parts of a
> window at
> any time. Therefore you need to do all your drawing from within on-paint.
>
> http://stackoverflow.com/q/16084690/23567
>
> /Jens Axel
>
>
> 2016-09-16 7:09 GMT+02:00 Alex Harsanyi :
>>
>> According to the documentation for the canvas<%> interface you cannot rely
>> on the canvas not being cleared
>> (http://docs.racket-lang.org/gui/canvas___.html?q=canvas%3C%25%3E):
>>
>> Even when the canvas’s style suppresses explicit clearing of the canvas, a
>> canvas may be erased by the windowing system due to window-moving and
>> -resizing operations. For a transparent canvas, “erased” means that the
>> canvas’s parent window shows through.
>>
>> I suspect the window system clears the canvas when the frame is resized.
>>
>> Alex.
>>
>>
>> On Friday, September 16, 2016 at 9:06:01 AM UTC+8, David K. Storrs wrote:
>> > How do I draw into a canvas and have the results persist past the next
>> > call to paint-callback?
>> >
>> >
>> > Given the code below I was expecting to see:
>> >
>> > 1) A window opens with a diagonal green line on it
>> >
>> > 2) A vertical blue line appears, crossing with the green line
>> >
>> > 3) The window goes fullscreen, still showing the green and blue lines
>> >
>> >
>> >
>> > Instead what I get is:
>> >
>> > 1) A window appears with vertical blue line
>> >
>> > 2) The blue line disappears and is replaced by a diagonal green line
>> >
>> > 3) The window goes fullscreen.  Only the green line is shown.
>> >
>> >
>> > I'm guessing that what's happening is that the window opens, completes
>> > going through the script (and therefore calling the section of code that
>> > displays the blue line), then the on-paint event is triggered and erases 
>> > the
>> > canvas's dc before calling the paint callback.
>> >
>> >
>> > I tried removing the paint-callback on the theory that the default one
>> > probably just told the dc to render its content.  That made no change 
>> > except
>> > that (unsurprisingly) the green line is not painted -- the blue line is, 
>> > but
>> > promptly disappears.
>> >
>> >
>> > Assuming I'm right about what's going on, how do I draw into a dc and
>> > have the changes persist?
>> >
>> >
>> >
>> > #lang racket
>> > (require racket/gui)
>> >
>> >
>> > (define-values (w h) (get-display-size))
>> > (displayln (format "Display size (pixels): ~a x ~a" w h))  ;; 1440 x 877
>> > (define frame (new frame%
>> >(label "Example")
>> >(width w)
>> >(height h)
>> >))
>> > (define canvas
>> >   (new canvas%
>> >(parent frame)
>> >(style '(border hscroll vscroll resize-corner))
>> >(paint-callback (lambda (canvas dc)
>> >  (send dc set-pen (send the-pen-list
>> > find-or-create-pen "green" 1 'solid))
>> >  (send dc draw-line 0 0 1430 867)
>> >
>> >
>> > (define dc (send canvas get-dc))
>> >
>> > (send frame show #t)
>> > (send dc set-pen (send the-pen-list find-or-create-pen "blue" 1 'solid))
>> > (send dc draw-line 700 0 700 877)
>> > (send frame fullscreen #t)
>>
>> --
>> 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.
>> For more options, visit https://groups.google.com/d/optout.
>
>
>
>
> --
> --
> Jens Axel Søgaard
>
> --
> 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.
> 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.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Re: (sixth RacketCon) General Q

2016-09-16 Thread Greg Trzeciak
As unfortunately I won't be attending RacketCon I would like to know if there 
is any live streaming planned for the event?
Also if it is possible I would like to ask related questions to be addressed on 
Q (if streamed/recorded). 

What are future plans toward portability of Racket (ie:Racket on 
Android/JS/JVM/CLR(DLR) etc.)? and if there is any ongoing work in this 
direction? What are the main obstacles before it is possible? What's the 
feasibility of full portability? What's the expected priority and timeline of 
such plans?

Thank you

Greg

-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] Re: Trying to understand racket/gui and racket/draw

2016-09-16 Thread Jens Axel Søgaard
As Alex writes the operating system (the system GUI) might erase parts of a
window at
any time. Therefore you need to do all your drawing from within on-paint.

http://stackoverflow.com/q/16084690/23567

/Jens Axel


2016-09-16 7:09 GMT+02:00 Alex Harsanyi :

> According to the documentation for the canvas<%> interface you cannot rely
> on the canvas not being cleared (http://docs.racket-lang.org/
> gui/canvas___.html?q=canvas%3C%25%3E):
>
> Even when the canvas’s style suppresses explicit clearing of the canvas, a
> canvas may be erased by the windowing system due to window-moving and
> -resizing operations. For a transparent canvas, “erased” means that the
> canvas’s parent window shows through.
>
> I suspect the window system clears the canvas when the frame is resized.
>
> Alex.
>
>
> On Friday, September 16, 2016 at 9:06:01 AM UTC+8, David K. Storrs wrote:
> > How do I draw into a canvas and have the results persist past the next
> call to paint-callback?
> >
> >
> > Given the code below I was expecting to see:
> >
> > 1) A window opens with a diagonal green line on it
> >
> > 2) A vertical blue line appears, crossing with the green line
> >
> > 3) The window goes fullscreen, still showing the green and blue lines
> >
> >
> >
> > Instead what I get is:
> >
> > 1) A window appears with vertical blue line
> >
> > 2) The blue line disappears and is replaced by a diagonal green line
> >
> > 3) The window goes fullscreen.  Only the green line is shown.
> >
> >
> > I'm guessing that what's happening is that the window opens, completes
> going through the script (and therefore calling the section of code that
> displays the blue line), then the on-paint event is triggered and erases
> the canvas's dc before calling the paint callback.
> >
> >
> > I tried removing the paint-callback on the theory that the default one
> probably just told the dc to render its content.  That made no change
> except that (unsurprisingly) the green line is not painted -- the blue line
> is, but promptly disappears.
> >
> >
> > Assuming I'm right about what's going on, how do I draw into a dc and
> have the changes persist?
> >
> >
> >
> > #lang racket
> > (require racket/gui)
> >
> >
> > (define-values (w h) (get-display-size))
> > (displayln (format "Display size (pixels): ~a x ~a" w h))  ;; 1440 x 877
> > (define frame (new frame%
> >(label "Example")
> >(width w)
> >(height h)
> >))
> > (define canvas
> >   (new canvas%
> >(parent frame)
> >(style '(border hscroll vscroll resize-corner))
> >(paint-callback (lambda (canvas dc)
> >  (send dc set-pen (send the-pen-list
> find-or-create-pen "green" 1 'solid))
> >  (send dc draw-line 0 0 1430 867)
> >
> >
> > (define dc (send canvas get-dc))
> >
> > (send frame show #t)
> > (send dc set-pen (send the-pen-list find-or-create-pen "blue" 1 'solid))
> > (send dc draw-line 700 0 700 877)
> > (send frame fullscreen #t)
>
> --
> 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.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
-- 
Jens Axel Søgaard

-- 
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.
For more options, visit https://groups.google.com/d/optout.