[racket-users] RacketCon Live Stream

2019-07-12 Thread Jay McCarthy
RacketCon is tomorrow!

https://con.racket-lang.org/

There will be a live stream!

https://youtu.be/xSjk2PdQm5k

See you at 0930 Mountain Time!

Jay

--
Jay McCarthy
Associate Professor @ CS @ UMass Lowell
http://jeapostrophe.github.io
Vincit qui se vincit.

-- 
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/CAJYbDak0B0jMDUdC3GwrwzewmDfQ3ycwNos%3DSJJiNnwDZ6HDOQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Re: Impromptu racket meetup in London Friday, 19 July at 12pm-3pm

2019-07-12 Thread zeRusski
argh, wish you'd go with after work hours or the weekend. Sorry, won't be 
able to make it.

On Friday, 12 July 2019 09:20:58 UTC-6, Stephen De Gabrielle wrote:
>
> Hi,
>
> Next Friday, 19 July at 12pm-3pm there will be an impromptu Racket meetup 
> at the cafe at the British Library 'The Last Word'. 
> https://goo.gl/maps/M62e4b9JK7c1oaA69 
>
> No agenda. All welcome. Spread the word!
>
> I'll be drinking tea, eating cake(I hope), and will be easily identified 
> as a the man with racket logo on his laptop. Updates on this thread.
>
> Stephen
>
>

-- 
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/08648123-28e8-46ff-9bf8-20f0cb11d1dd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] How to make a snip appear?

2019-07-12 Thread Kshitij Sachan
I've been trying to render an OpenGL context using a gl-bitmap and then 
displaying that in a snip (to enable user input). I extended the image snip 
class and overrode the basic methods to draw, get-extent, etc. 

When I try to display my snip, I see nothing, but when I highlight over the 
snip with my cursor I can see the shape underneath! It's clearly rendering, 
and I can render the gl-bitmap by itself fine when it is not connected to a 
snip. What could possibly be making my snip appear white?

My two hypotheses are:
1) I didn't set up the snip-class% correctly. I have no clue what the 
purpose of this is (the documentation is challenging to follow here), and I 
don't know what argument to provide to `(set-classname "(lib ...)")` (what 
should replace the ...?)
2) I didn't override one of the relevant functions such as set-unmodified?

Here is my code (MakeGLSupport and drawAFrame are both calls to extern "C" 
functions I'm accessing using the FFI. They setup the triangles in OpenGL 
and render those triangles, respectively):

#lang racket

(require racket/gui/base
 ffi/unsafe
 ffi/unsafe/define)

;; ffi code
(define my-ffi (ffi-lib 
"/Users/kshitijsachan/Documents/geopipe/builddir/lib/Debug/libgldraw"))
(define-ffi-definer define-gltest my-ffi)
;; type def
(define _GLTest-pointer (_cpointer 'GLTest))
;; functions
(define-gltest makeGLTest (_fun _int _int -> _GLTest-pointer))
(define-gltest drawAFrame (_fun _GLTest-pointer -> _void))

;; global variables
(define screen-width 100)
(define screen-height 100)

;; gl code
(define gl-config (new gl-config%))
(send gl-config set-double-buffered #f)
(send gl-config set-legacy? #f)
(define gl-bitmap (make-gl-bitmap screen-width screen-height gl-config))
(define gl-dc (new bitmap-dc% [bitmap gl-bitmap]))
(define gl-context (send gl-dc get-gl-context))
(define opengl-snip (make-object image-snip% gl-bitmap))

;; bitmap
(define my-bitmap (make-bitmap screen-width screen-height #t))
(define my-dc (new bitmap-dc% [bitmap my-bitmap]))
(send my-dc set-brush "red" 'solid)
(send my-dc set-pen "black" 3 'solid)
(send my-dc draw-ellipse 1 1 98 98)

;; snip-class (THIS IS WHAT I HAVE A QUESTION ON)
(define scroll-snip-class%
   (class snip-class%
 (inherit set-classname)
 
 (super-new)
 (set-classname "(lib test-snip)")
 ;; not sure if necessary
 (define/override (read f)
   (define width-b (box 0.0))
   (define height-b (box 0.0))
   (send f get width-b)
   (send f get height-b)
   (new scroll-snip% [snip-width (unbox width-b)] [snip-height (unbox 
height-b)]))
 ))

(define scroll-snip-class (new scroll-snip-class%))

;; custom image-snip (THIS IS ALSO WHAT I HAVE A QUESTION ON)
(define scroll-snip%
  (class image-snip%
;; set up fields
(init bit)
(define snip-bitmap bit)
(init-field [snip-width screen-width] [snip-height screen-height])

;; make image-snip
(super-make-object snip-bitmap)

;; add ability to handle events
(inherit/super set-flags get-admin set-snipclass)
(set-snipclass scroll-snip-class)
(set-flags (list 'handles-events))

;; override methods
(define/override (get-extent dc x y w h descent space lspace rspace)
  (define (maybe-set-box! b v) (when b (set-box! b v)))
  (maybe-set-box! w snip-width)
  (maybe-set-box! h snip-height)
  (maybe-set-box! descent 1.0)
  (maybe-set-box! space 1.0)
  (maybe-set-box! lspace 1.0)
  (maybe-set-box! rspace 1.0))

;; there seems to be a problem when copying (snip looks white but can 
be seen when highlighted)
(define/override (copy)
  (new scroll-snip% [bit snip-bitmap]))

(define/override (draw dc x y left top right bottom dx dy draw-caret)
  (send gl-context call-as-current
  (lambda () (drawAFrame (makeGLTest screen-width screen-height)) 
gl-bitmap))
  (super draw dc x y left top right bottom dx dy draw-caret)
  )

(define/override (on-char dc x y editorx editory event)
  (cond
[(equal? (send event get-key-code) 'up)
 (define admin (get-admin))
 (set! snip-width (+ snip-width 15))
 (set! snip-height (+ snip-height 15))
 (when admin
   (send admin resized this #t))]
[(equal? (send event get-key-code) 'down)
 (define admin (get-admin))
 (set! snip-width (- snip-width 20))
 (set! snip-height (- snip-height 20))
 (when admin
   (send admin resized this #t))]))
))

(new scroll-snip% [bit gl-bitmap])

Any help would be appreciated! I've been stuck on this for quite a while :)

-- 
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 

Re: [racket-users] Re: Impromptu racket meetup in London Friday, 19 July at 12pm-3pm

2019-07-12 Thread Tim Jervis
I am planning to be there from 12 to 1.

I also have a Racket sticker on my laptop. In fact, absent the glasses, we 
basically look the same.

Looking forward to meeting you!

Tim

> On 12 Jul 2019, at 16:32, Stephen De Gabrielle  
> wrote:
> 
> 
> 
> 
> On 12 Jul 2019, at 16:20, Stephen De Gabrielle  > wrote:
> 
>> Hi,
>> 
>> Next Friday, 19 July at 12pm-3pm there will be an impromptu Racket meetup at 
>> the cafe at the British Library 'The Last Word'. 
>> https://goo.gl/maps/M62e4b9JK7c1oaA69 
>>  
>> 
>> No agenda. All welcome. Spread the word!
>> 
>> I'll be drinking tea, eating cake(I hope), and will be easily identified as 
>> a the man with racket logo on his laptop. Updates on this thread.
>> 
>> Stephen
>> 
> 
> -- 
> 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/D18ED02F-10C8-4381-9D99-D2068BB38847%40gmail.com
>  
> .
> For more options, visit https://groups.google.com/d/optout 
> .


Tim Jervis

http://timjervis.com/

-- 
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/B7565367-A992-468F-8272-28DF7253EC14%40timjervis.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Re: Impromptu racket meetup in London Friday, 19 July at 12pm-3pm

2019-07-12 Thread Stephen De Gabrielle



> On 12 Jul 2019, at 16:20, Stephen De Gabrielle  
> wrote:
> 
> Hi,
> 
> Next Friday, 19 July at 12pm-3pm there will be an impromptu Racket meetup at 
> the cafe at the British Library 'The Last Word'. 
> https://goo.gl/maps/M62e4b9JK7c1oaA69 
> 
> No agenda. All welcome. Spread the word!
> 
> I'll be drinking tea, eating cake(I hope), and will be easily identified as a 
> the man with racket logo on his laptop. Updates on this thread.
> 
> Stephen
> 

-- 
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/D18ED02F-10C8-4381-9D99-D2068BB38847%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] Impromptu racket meetup in London Friday, 19 July at 12pm-3pm

2019-07-12 Thread James Geddes
Given that I work inside the Library building, I will try to drop by!

(I also have a Racket sticker on my laptop. Will be there around 12:30.)

James


> On 12 Jul 2019, at 16:20, Stephen De Gabrielle  
> wrote:
> 
> Hi,
> 
> Next Friday, 19 July at 12pm-3pm there will be an impromptu Racket meetup at 
> the cafe at the British Library 'The Last Word'. 
> https://goo.gl/maps/M62e4b9JK7c1oaA69 
> 
> No agenda. All welcome. Spread the word!
> 
> I'll be drinking tea, eating cake(I hope), and will be easily identified as a 
> the man with racket logo on his laptop. Updates on this thread.
> 
> Stephen
> 
> 
> -- 
> 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/CAGHj7-%2BygW4HZEstkv-xBCsdb0eaxro8DR9QWzpkSciPbNzvhw%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/831ED46F-E64A-4C0A-AAB3-C6BDD1B4A741%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Impromptu racket meetup in London Friday, 19 July at 12pm-3pm

2019-07-12 Thread Stephen De Gabrielle
Hi,

Next Friday, 19 July at 12pm-3pm there will be an impromptu Racket meetup
at the cafe at the British Library 'The Last Word'.
https://goo.gl/maps/M62e4b9JK7c1oaA69

No agenda. All welcome. Spread the word!

I'll be drinking tea, eating cake(I hope), and will be easily identified as
a the man with racket logo on his laptop. Updates on this thread.

Stephen

-- 
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/CAGHj7-%2BygW4HZEstkv-xBCsdb0eaxro8DR9QWzpkSciPbNzvhw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] 1:1 help for 11yo to create her own language.

2019-07-12 Thread Stephen De Gabrielle
Hi,

Is anyone in or around the London area interested in helping a keen 11yo ?
(I'm not really qualified but I've offered to help with any questions she
sends)

If you are please let me know and I'll put you in contact with her mum.

Dear Stephen,

Hello, my name is XXX and Jesse Alama has given me your email and suggested
> to get in touch. :)
> My daughter  is 11 years old, and has a great interest in Functional
> Programming. She has taught herself several programming languages since the
> age of about 6 ( with library books and free online video tutorials) first
> Python, Javascript, Swift and most recently this past year - Clojure.
> Clojure is her favourite language and she also is now exploring and using
> Racket to create her own language.
> They do not yet teach programming at her school, (or hardly any IT for
> that matter, just very basic word processing) and she is very bored at
> school. It’s also an underperforming school and been graded as inadequate
> by OFSTED, so the maths and science has been seriously lacking. Hence why
> Connie has been desperate to leave and is so looking forward to a better
> curriculum at her next school, moving up to secondary education in
> September. Meanwhile, I‘m supporting her as much as possible by helping her
> to attend as many computing events outside of school that I can to
> encourage and foster her learning and love of programming. (I myself, am
> not a programmer!).
> I contacted Jesse online and he was thrilled to hear that  was using
> Racket and he very kindly gave us diversity tickets to this summers
> RacketFest, but we‘re unable to travel there due to financial constraints.
> So as we’re unable to attend, I thought it would be wonderful instead, for
>  to maybe spend an hour or so doing some 1:1 programming with someone
> in the community here in the UK who may be able to assist with her language
> that she’s been making in Racket. It’s difficult for her when Googling
> solutions, and there are no people we know here that use Racket. So Jesse
> suggested that as you are in London maybe we could reach out to you. On the
> last day of school, 19 July we’d happily go into London (Obviously I’d
> accompany her and supervise.) if you are free or know anyone else within
> your Racket community or offices based in London? I realise this is a bit
> of a random and short notice request! But please do let me know.
> Kind regards,
> X

-- 
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/CAGHj7-%2B_3jMvhj6byQNQDzNEyWWN2JZZUSEHpNkHxPWRZceyXw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.