[racket-users] Reporting odd linklet error blocking my project

2020-04-23 Thread Sage Gerard
Reposting here. I'm experiencing what I believe is a blocker that is preventing 
me from building updates for my website. I am not at all sure how the private 
contract libs got into the shown state, but I left as many details as I knew to 
share.

Any assistance appreciated.

https://github.com/racket/racket/issues/3128

-- 
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/bEzEBrGCLUJfGtqo0gUdNU49HN0upit4w4tD-Fga9DhkJGULqa0urcjIfrw_37p9v3tynRih9BMtmNhApinZPT2ivWEEuvV6eXMLr91XYyw%3D%40sagegerard.com.


Re: [racket-users] Do I misunderstand set! ?

2020-04-23 Thread Hendrik Boom
On Thu, Apr 23, 2020 at 11:40:44PM -0500, Alexis King wrote:
> > On Apr 23, 2020, at 21:15, Hendrik Boom  wrote:
> > 
> > (fprintf anomaly "resEEEulttyope was ~s~n" resulttype)
> > (fprintf anomaly "set resulttyoe to ~s~n" ty)
> > `(set! resulttype ty)
> > (fprintf anomaly "resEEulttyope now ~s~n" resulttype)
> 
> (Re-sending this because I forgot to CC the list the first time.)
> 
> Assuming it is not some strange artifact of your email client’s formatting, 
> you have a backtick at the beginning of the line your set! expression appears 
> on, so it is quasiquoted and will not do anything.

Yes!  You nailed it!  I didn't even *see* the backtick until you pointed 
it out!  Good thing I reallt copy-pasted it instead of typeing it in. 

> Both DrRacket and racket-mode communicate this information to you in 
> various ways: DrRacket won’t draw binding arrows for set! or 
> resulttype, and I believe racket-mode has similar functionality 
> (albeit displayed in a different way).

Which explains why I wasn't getting binding arrows.  Now I know what to 
look for when that happens.

-- hendrik

-- 
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/20200424050847.takja5obmnhvk3pl%40topoi.pooq.com.


Re: [racket-users] Do I misunderstand set! ?

2020-04-23 Thread Alexis King
> On Apr 23, 2020, at 21:15, Hendrik Boom  wrote:
> 
> (fprintf anomaly "resEEEulttyope was ~s~n" resulttype)
> (fprintf anomaly "set resulttyoe to ~s~n" ty)
> `(set! resulttype ty)
> (fprintf anomaly "resEEulttyope now ~s~n" resulttype)

(Re-sending this because I forgot to CC the list the first time.)

Assuming it is not some strange artifact of your email client’s formatting, you 
have a backtick at the beginning of the line your set! expression appears on, 
so it is quasiquoted and will not do anything. Both DrRacket and racket-mode 
communicate this information to you in various ways: DrRacket won’t draw 
binding arrows for set! or resulttype, and I believe racket-mode has similar 
functionality (albeit displayed in a different way).

-- 
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/6C5015F4-B5F8-46CB-85EF-F04BE3B0D7AA%40gmail.com.


Re: [racket-users] Do I misunderstand set! ?

2020-04-23 Thread Hendrik Boom
On Thu, Apr 23, 2020 at 05:07:31PM -0400, Philip McGrath wrote:
> I think you are running into the (very confusing!) issue Ben describes
> here: https://groups.google.com/d/msg/racket-users/UD20HadJ9Ec/mDd4x8Y1BwAJ

If so, I'm confused.  That issue seems to deal with modules.
I'm not aware of amy modules hanging around.
The creation of resulttype, the use of resulttype, and the set!ing of
resuttype all happen within one single function.

I'll paste it in below.

-- hendrik
> 
> -Philip
> 
> 
> On Thu, Apr 23, 2020 at 5:00 PM Hendrik Boom  wrote:
> 
> > extract from code:
> >
> >   (fprintf anomaly "resEEEulttyope was ~s~n" resulttype)
> >   (fprintf anomaly "set resulttyoe to ~s~n" ty)
> >  `(set! resulttype ty)
> >   (fprintf anomaly "resEEulttyope now ~s~n" resulttype)
> >
> > Previous creation of resulttype:
> >
> >   (define resulttype : (Option TType) #f) ; TODO: check there's only one
> >
> > Output that appeared on the anomaly file:
> >
> > resEEEulttyope was #f
> > set resulttyoe to _void
> > resEEulttyope now #f
> >
> > I stuck the E's in just to make sure these were the statements really
> > generating that output.
> >
> > If I am correct, the set! should have changed the value of resulttype.
> > I'm doing thie in typed-racket.

And here's the function:

(define (process-command [command : (Listof XML)])
  (fprintf output "~n") ; TODO this line is temporary code
  (define name : (Option Symbol) #f) ; TODO: check there's only one
  (define resulttype : (Option TType) #f) ; TODO: check there's only one
  (define group : (Option XML) #f)
  (define proto : (Option prototype) #f); TODO: check there's only one
  (define params : (Listof parameter)'()) ; list of parameters in reverse order
  (define glxtype : (Option String) #f)
  (define opcode : (Option String) #f)
  (for ([item command])
(match item
  #;[(list 'proto ty (list 'name n))
  `   (set! resulttype
` (if (and (string? ty) (equal? "void" (strip-white ty))) '_void 
ty))
` (fprintf anomaly "resulttype set to ~s~n" resulttype)`
` (set! name (string->symbol (strip-white n)))
   ]
  [(cons 'proto rest)
   (set! proto (process-proto (cast rest (Listof XML
   (match proto
 [(prototype ty n g) ; formerly list n ': t)
  (fprintf anomaly " prottype's type is ~s~n" ty)
  (when name (fprintf anomaly "Too many names ~s ~s~n" name n))
  (set! name n)

  (when resulttype (fprintf anomaly "Too many result types ~s ~s`n" 
resulttype ty))
  (fprintf anomaly "resEEEulttyope was ~s~n" resulttype)
  (fprintf anomaly "set resulttyoe to ~s~n" ty)
 `(set! resulttype ty)
  (fprintf anomaly "resEEulttyope now ~s~n" resulttype)

  (when group (fprintf anomaly "Too many groupss ~s ~s`n" group g))
 `(set! group g) #;(fprintf anomaly "proto had group ~s\n" g)
  ]
 [ _ (fprintf anomaly "; TODO: strange proto in command: ~s~n" command)]
 )] 
  [(cons 'param rest) (set! params (cons (parse-param (cast rest (Listof 
XML))) params))]
  [(list 'glx (list '@ (list 'type (? string? t)) (list 'opcode (? string? 
o
   (set! glxtype t)
   (set! opcode o)
   (fprintf anomaly "; LATER: whatever do i do with item ~s in command 
~s~n" item name)]
  [(list 'alias (list '@ (list 'name name)))
   (fprintf output "; alias for ~a~n" name)]
  [(list 'vecequiv (list '@ (list 'name name)))
   (fprintf anomaly "; LATER vecequiv ~s~n" item)]
   
  [ _ (fprintf anomaly "; TODO: unknown command item ~s~n" item) ]
  ))

  (when (null? name)
  #;(fprintf anomaly "; TODO: no name in command definition~n")
(fprintf anomaly "; TODO: best try:~n #;")
)

  (fprintf output "TODO: debug: Parameter list is ~s from command ~s~n" params 
command)
  (fprintf trace "; DEBUGG ~s~n" (map parameter-type params))
  (define args (params->ctypes params))
  (define results : (Listof (List Symbol ': TType)) (get-output-ctypes args)) ; 
parameters used as output variables
  (fprintf output "got results ~s from args ~s~n" results args)
;  (define rev-regular-type (cons '-> (map (lambda ([a :(List Boolean Symbol ': 
TType)]) (cdr a)) args))) ; <><><><>
  (define rev-regular-type
(cons '-> (map (ann cdr (-> (List Boolean Symbol ': TType) (List Symbol ': 
TType))) args))) ; <><><><>
  (fprintf output " resulttype ~s~n" resulttype)
  (define rev-type ; the type for the C ffi.
(if (null? results)
(cons resulttype rev-regular-type)
(cons (cons 'values
(cons 'result (map (lambda ([a : (List Symbol ': TType)]) 
(car a))
   (cast results (Listof (List Symbol ': 
TType)))
   )))
  (cons '-> (cons (list 'result ': resulttype) rev-regular-type))
  )
))
  (fprintf output "! rev-type ~s~n" rev-type)
  

[racket-users] Re: [racket-dev] Racket now on GitHub sponsors

2020-04-23 Thread Stephen De Gabrielle
I love the themed levels - a nice touch !

S

On Thu, 23 Apr 2020 at 21:48, Sam Tobin-Hochstadt 
wrote:

> Racketeers,
>
> It's now possible to "sponsor" Racket with a monthly contribution
> using GitHub sponsors, at https://github.com/sponsors/racket/
>
> Racket is and will always be free to everyone, but financial
> contributions help both to pay for costs like AWS hosting as well as
> support outreach events like Racket School and RacketCon.
>
> I am personally blown away by the generous contributions so far, and
> very thankful to the people sponsoring.
>
> [Note that contributions via other methods of donating continue to
> work fine -- this is just a new avenue.]
>
> Sam
>
> --
> You received this message because you are subscribed to the Google Groups
> "Racket Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to racket-dev+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/racket-dev/CAK%3DHD%2BYCnVjjhr3HxVRg-%3DWyRxYsepUr7OOP1y4b6C%3DkFsDBug%40mail.gmail.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/CAGHj7-KxNSaXvOR_UM%3DCVJVgCvc0sRMEji1vCyu6zr6KvbgMkg%40mail.gmail.com.


Re: [racket-users] Do I misunderstand set! ?

2020-04-23 Thread Philip McGrath
I think you are running into the (very confusing!) issue Ben describes
here: https://groups.google.com/d/msg/racket-users/UD20HadJ9Ec/mDd4x8Y1BwAJ

-Philip


On Thu, Apr 23, 2020 at 5:00 PM Hendrik Boom  wrote:

> extract from code:
>
>   (fprintf anomaly "resEEEulttyope was ~s~n" resulttype)
>   (fprintf anomaly "set resulttyoe to ~s~n" ty)
>  `(set! resulttype ty)
>   (fprintf anomaly "resEEulttyope now ~s~n" resulttype)
>
> Previous creation of resulttype:
>
>   (define resulttype : (Option TType) #f) ; TODO: check there's only one
>
> Output that appeared on the anomaly file:
>
> resEEEulttyope was #f
> set resulttyoe to _void
> resEEulttyope now #f
>
> I stuck the E's in just to make sure these were the statements really
> generating that output.
>
> If I am correct, the set! should have changed the value of resulttype.
> I'm doing thie in typed-racket.
>
> -- hendrik
>
> --
> 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/20200423210026.3iuntiq3jqyjtpmc%40topoi.pooq.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/CAH3z3gbZqM4i1V_Cowzd8ewfpVZS9po5oUqXnw81BARMaJfnUg%40mail.gmail.com.


[racket-users] Do I misunderstand set! ?

2020-04-23 Thread Hendrik Boom
extract from code:

  (fprintf anomaly "resEEEulttyope was ~s~n" resulttype)
  (fprintf anomaly "set resulttyoe to ~s~n" ty)
 `(set! resulttype ty)
  (fprintf anomaly "resEEulttyope now ~s~n" resulttype)

Previous creation of resulttype:

  (define resulttype : (Option TType) #f) ; TODO: check there's only one

Output that appeared on the anomaly file:

resEEEulttyope was #f
set resulttyoe to _void
resEEulttyope now #f

I stuck the E's in just to make sure these were the statements really 
generating that output.

If I am correct, the set! should have changed the value of resulttype.
I'm doing thie in typed-racket.

-- hendrik

-- 
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/20200423210026.3iuntiq3jqyjtpmc%40topoi.pooq.com.


Re: [racket-users] bitmap% performance

2020-04-23 Thread Robby Findler
On Thu, Apr 23, 2020 at 1:14 PM 'racket' via users-redirect
 wrote:
>
> > Thanks! For the first task I think you probably have to use the raw
> > bitmap% object (since I guess you're using `read-bitmap`).
>
> Hi Robby, I don’t understand how to read a jpeg into a platform-bitmap. 
> Probably I'm missing something in the documentation…

Right-- I agree that that isn't supported currently. I don't know how
difficult it would be to support.

Just a random thought: did you try using the read-bitmap method on the
already created bitmap? I don't know if that would be faster (I wanted
to try before posting but I didn't get there). It may be, however,
that the code inside bitmap% would have to be improved.

Robby

-- 
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/CAL3TdOP-i6soN%2BuLZ4OqsAvtGfDLhr28FE5wYpyWXRtxonK2Bg%40mail.gmail.com.


Re: [racket-users] bitmap% performance

2020-04-23 Thread 'racket' via users-redirect
> Thanks! For the first task I think you probably have to use the raw
> bitmap% object (since I guess you're using `read-bitmap`). 

Hi Robby, I don’t understand how to read a jpeg into a platform-bitmap. 
Probably I'm missing something in the documentation…  


> For the second, I guess you are creating very small bitmaps so
> probably this particular creation issue isn't affecting that part? If
> you really have a lot of them, you could probably implement some
> clever pooling that wasn't keeping all of the jpegs in actual bitmap%
> objects all the time but was just keeping ones that were likely to be
> looked at soon in bitmap% objects.

Yes, this is exactly what I’m doing. I’m preloading very small bitmaps in 
memory, display them to give to user a “preview", and then replacing them with 
a better version.

Andrea


-- 
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/etPan.5ea1daf8.49f41fcc.17869%40andreagiardina.com.


Re: [racket-users] bitmap% performance

2020-04-23 Thread 'racket' via users-redirect
Hi Sam,
trying your code I get back the following error:

load-file in bitmap%: not available in a canvas-compatible bitmap: 
(object:quartz-bitmap% ...)


The error I get is expected according to the load-file documentation:

"Loads a bitmap from a file format that read from in, unless the bitmap was 
produced by make-platform-bitmap, make-screen-bitmap, or make-bitmap in canvas% 
(in which case an exn:fail:contract exception is raised)"

Which racket version/platform did you use?

Andrea 





On 23 April 2020 at 18:39:08, Sam Tobin-Hochstadt 
(sa...@cs.indiana.edu(mailto:sa...@cs.indiana.edu)) wrote:

> I'm trying to understand the issue here. You say that you can't use
> `make-platform-bitmap` doesn't work, but this program works for me and
> loads two JPEGs into a platform bitmap.
>  
> #lang racket/base
> (require racket/draw racket/class)
> (define b (make-platform-bitmap 1000 1000))
> (define bs (make-bytes 100))
>  
> (send b load-file "/home/samth/Dropbox/punge-stuff/diploma.jpeg")
> (send b get-argb-pixels 20 20 5 5 bs)
> (bytes->list bs)
>  
> (send b load-file "/usr/share/doc/texlive-doc/dvipdfm/mwicks.jpeg")
> (send b get-argb-pixels 20 20 5 5 bs)
> (bytes->list bs)
>  
> On Wed, Apr 22, 2020 at 4:39 PM 'racket' via users-redirect
> wrote:
> >
> >
> > Hi,
> > I’m writing to the group looking for help with a performance issue.
> > I’m coding a gallery like application, using the racket/draw library, but 
> > the bitmap% class seems to be pretty slow. The (make-bitmap 4000 3000) 
> > operation takes more than 4 seconds on my computer (a macbook pro with a 
> > 3.1GHz dual core i5 and 16GB ram).
> > What I'd need to do is simply read and resize some jpeg files to display 
> > them in a canvas. I could use some external program to resize the photos 
> > but I would prefer to work with racket only. The make-platform-bitmap is 20 
> > times faster than the make-bitmap, but I didn’t find a way to draw a jpeg 
> > on it.
> > Do you have any suggestion?
> >
> > Thanks,
> > Andrea
> >
> > --
> > 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/etPan.5ea0ab6b.35178ff7.17869%40andreagiardina.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/etPan.5ea1d99d.2741b08f.17869%40andreagiardina.com.


Re: [racket-users] bitmap% performance

2020-04-23 Thread Robby Findler
Thanks! For the first task I think you probably have to use the raw
bitmap% object (since I guess you're using `read-bitmap`). I'm not
sure if there could be some improvement internally so that screen
bitmaps were used to read in the jpegs. Absent an improvement at that
level, I guess I'd just try caching the conversions.

For the second, I guess you are creating very small bitmaps so
probably this particular creation issue isn't affecting that part? If
you really have a lot of them, you could probably implement some
clever pooling that wasn't keeping all of the jpegs in actual bitmap%
objects all the time but was just keeping ones that were likely to be
looked at soon in bitmap% objects.

hth,
Robby

On Thu, Apr 23, 2020 at 10:05 AM 'racket' via users-redirect
 wrote:
>
> Hi Robby, thanks for your reply.
>
>
> What are you using the bitmap for, exactly? Just to resize the bitmaps? Or as 
> a backing store for drawing into the canvas? Something else?
>
> Both of them.
>
> * I have more than 10K photos in 4000x3000 format that I’d like to download 
> from a webdav server, read exif info, and resize to 960x720 and 320x240
>
> * I should display the thumbnails in a canvas, keeping the system as smooth 
> as possible while scrolling the canvas.
>
> For the first task, if I don’t find any valid alternative, I could use some 
> external tool to resize the images (let’s say libvips or imagemagick) or 
> maybe write some ffi code to use libjpeg. I would prefer this solution over 
> the first one, but I don’t have any experience with ffi coding.
>
>
> Thanks,
>
> Andrea
>
> --
> 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/etPan.5ea1ae9c.ee2bf71.17869%40andreagiardina.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/CAL3TdONHF8qPj35yw0wBjLcHk4eiJL8%3Dmdde%3DcQNBKiB6_0xHg%40mail.gmail.com.


Re: [racket-users] bitmap% performance

2020-04-23 Thread 'racket' via users-redirect
Hi Robby, thanks for your reply.

What are you using the bitmap for, exactly? Just to resize the bitmaps? Or as a 
backing store for drawing into the canvas? Something else?
Both of them. 

* I have more than 10K photos in 4000x3000 format that I’d like to download 
from a webdav server, read exif info, and resize to 960x720 and 320x240

* I should display the thumbnails in a canvas, keeping the system as smooth as 
possible while scrolling the canvas.

For the first task, if I don’t find any valid alternative, I could use some 
external tool to resize the images (let’s say libvips or imagemagick) or maybe 
write some ffi code to use libjpeg. I would prefer this solution over the first 
one, but I don’t have any experience with ffi coding.



Thanks,

Andrea  

-- 
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/etPan.5ea1ae9c.ee2bf71.17869%40andreagiardina.com.


Re: [racket-users] bitmap% performance

2020-04-23 Thread Robby Findler
(My reply to this post bounced on the attempt to send to OP.)

On Wed, Apr 22, 2020 at 3:39 PM 'racket' via users-redirect <
us...@plt-scheme.org> wrote:

>
> Hi,
> I’m writing to the group looking for help with a performance issue.
> I’m coding a gallery like application, using the racket/draw library, but
> the bitmap% class seems to be pretty slow. The (make-bitmap 4000 3000)
> operation takes more than 4 seconds on my computer (a macbook pro with a
> 3.1GHz dual core i5 and 16GB ram).
> What I'd need to do is simply read and resize some jpeg files to display
> them in a canvas. I could use some external program to resize the photos
> but I would prefer to work with racket only. The make-platform-bitmap is 20
> times faster than the make-bitmap, but I didn’t find a way to draw a jpeg
> on it.
> Do you have any suggestion?
>
> Thanks,
> Andrea
>
> --
> 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/etPan.5ea0ab6b.35178ff7.17869%40andreagiardina.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/CAL3TdOPcD4e_HOzO5_t_DXJisvZovOXOFRTA50LbGye2RsVb-g%40mail.gmail.com.


Re: [racket-users] bitmap% performance

2020-04-23 Thread Robby Findler
I don't know that we can help with the specific call you are reporting a
slowdown for (maybe, but I won't address that here as asking other
questions first seems worth doing).

What are you using the bitmap for, exactly? Just to resize the bitmaps? Or
as a backing store for drawing into the canvas? Something else?

Robby

On Wed, Apr 22, 2020 at 3:39 PM 'racket' via users-redirect <
us...@plt-scheme.org> wrote:

>
> Hi,
> I’m writing to the group looking for help with a performance issue.
> I’m coding a gallery like application, using the racket/draw library, but
> the bitmap% class seems to be pretty slow. The (make-bitmap 4000 3000)
> operation takes more than 4 seconds on my computer (a macbook pro with a
> 3.1GHz dual core i5 and 16GB ram).
> What I'd need to do is simply read and resize some jpeg files to display
> them in a canvas. I could use some external program to resize the photos
> but I would prefer to work with racket only. The make-platform-bitmap is 20
> times faster than the make-bitmap, but I didn’t find a way to draw a jpeg
> on it.
> Do you have any suggestion?
>
> Thanks,
> Andrea
>
> --
> 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/etPan.5ea0ab6b.35178ff7.17869%40andreagiardina.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/CAL3TdONjYztUX_MR4yLDf4rR2W_Vswc5J4hDhNKn%2BK5hVdN6PQ%40mail.gmail.com.


[racket-users] Re: Puzzler - A Language for Puzzle Games

2020-04-23 Thread unlimitedscolobb
Hi Alex,

Sounds really interesting!  I'm not into puzzle games myself, but I have 
some friends who could definitely be excited.

I shared it on the Fediverse: 
https://bidule.menf.in/notice/9uKmWBX2f0i52XqwF6

-
Sergiu


On Thursday, April 23, 2020 at 12:51:41 AM UTC+2, Alex Owens wrote:
>
> Hello everyone! 
>
> My name is Alex Owens and I've been a lurker on this mailing list - and in 
> the Racket community in general - for a while. While I'm still relatively 
> new to Racket, I wanted to share a project I worked on called Puzzler.
>
> Puzzler is a DSL to enable easy creation of 2D grid-based puzzle games. It 
> features a very concise and readable syntax for representing puzzle games 
> through a small collection of built-in constructs like win/lose conditions 
> and entity interactions. Most of the actual work for Puzzler was done about 
> a year ago at the end of my undergrad, and while I'm not planning any big 
> new features soon, I have recently been cleaning up the implementation and 
> adding documentation.
>
> Mostly I hope that if you're interested in language-oriented programming 
> for game development you will check it out. It is a small language, but 
> even if it doesn't suit all of your needs you may find it a useful 
> reference project for what a language for puzzle game development might 
> look like! If you do decide to use Puzzler and you find any bugs or 
> functionality you think is missing, feel free to submit an issue (or better 
> yet a pull request) on my GitHub. I can't promise I'll fix things 
> immediately, but I will try my best to respond in a timely fashion - I'm 
> always up to learn more Racket. Of course, you are also free to clone/fork 
> it and build onto it however you see fit.
>
> Puzzler on the package catalog: 
> https://pkgs.racket-lang.org/package/puzzler
> Source code: https://github.com/aowens-21/puzzler
>
> Stay safe and healthy, and I look forward to getting to know you all and 
> being more active here in the future!
>
> - Alex
>

-- 
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/25b9bb76-0bb6-41be-b026-33c2f644a53c%40googlegroups.com.


[racket-users] Re: bitmap% performance

2020-04-23 Thread Simon Schlee
Hi,

have you tried using read-bitmap? 
https://docs.racket-lang.org/draw/Drawing_Functions.html?q=read-bitmap#%28def._%28%28lib._racket%2Fdraw..rkt%29._read-bitmap%29%29

Personally I have only used the second constructor that takes a parameter 
named "in" here:
https://docs.racket-lang.org/draw/bitmap_.html

I didn't notice any performance problems, but my images have much lower 
resolution.

I resize my images by using the bitmap function which returns a pict, then 
using scale-to-fit, then using pict->bitmap to convert back to a bitmap.

Hope that is helpful,
otherwise you could provide an example that I can test on my computer, I am 
on linux.

Good luck!
Simon

-- 
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/b5d6bac2-bc9f-4966-a2a8-8b872825dd17%40googlegroups.com.


[racket-users] Re: Puzzler - A Language for Puzzle Games

2020-04-23 Thread Jack Firth
Wow this is really, really cool. It reminds me a lot of Baba Is You.

On Wednesday, April 22, 2020 at 3:51:41 PM UTC-7, Alex Owens wrote:
>
> Hello everyone! 
>
> My name is Alex Owens and I've been a lurker on this mailing list - and in 
> the Racket community in general - for a while. While I'm still relatively 
> new to Racket, I wanted to share a project I worked on called Puzzler.
>
> Puzzler is a DSL to enable easy creation of 2D grid-based puzzle games. It 
> features a very concise and readable syntax for representing puzzle games 
> through a small collection of built-in constructs like win/lose conditions 
> and entity interactions. Most of the actual work for Puzzler was done about 
> a year ago at the end of my undergrad, and while I'm not planning any big 
> new features soon, I have recently been cleaning up the implementation and 
> adding documentation.
>
> Mostly I hope that if you're interested in language-oriented programming 
> for game development you will check it out. It is a small language, but 
> even if it doesn't suit all of your needs you may find it a useful 
> reference project for what a language for puzzle game development might 
> look like! If you do decide to use Puzzler and you find any bugs or 
> functionality you think is missing, feel free to submit an issue (or better 
> yet a pull request) on my GitHub. I can't promise I'll fix things 
> immediately, but I will try my best to respond in a timely fashion - I'm 
> always up to learn more Racket. Of course, you are also free to clone/fork 
> it and build onto it however you see fit.
>
> Puzzler on the package catalog: 
> https://pkgs.racket-lang.org/package/puzzler
> Source code: https://github.com/aowens-21/puzzler
>
> Stay safe and healthy, and I look forward to getting to know you all and 
> being more active here in the future!
>
> - Alex
>

-- 
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/45eb124e-8b3c-4c6c-9982-430e1e8a8307%40googlegroups.com.