Re: [racket-users] Re: Application Templates!

2020-08-20 Thread Alex Harsanyi


On Thursday, August 20, 2020 at 9:11:45 PM UTC+8 hen...@topoi.pooq.com 
wrote:

> On Wed, Aug 19, 2020 at 09:33:01PM -0700, Alex Harsanyi wrote: 
> ... 
> ... 
> > I think Racket would benefit by a suite of applications which are small 
> but 
> > not trivial and with a source code which is commented in more detail 
> than a 
> > regular application. 
>
> Every regular application would also benefit from being commented in 
> this much detail. 


Whenever you write a comment, you usually have an intended reader in mind 
(this happens even if you are not conscious about it).  For a comment in an 
application code base, the intended readers are the application developers, 
so you tend to assume that they already know (1) the language constructs 
and conventions, (2) the problem domain and (3) the application 
architecture.  Such a comment would be useless to someone who is trying to 
learn the programming language or learn the application architecture.

Than, there is the question of effort required to write these comments.  It 
took me significantly longer to write the programs that I linked to, 
because I wanted to structure them in ways that are easier to understand by 
a broader set of users,  Still, I did not explain what `define` or function 
application is, so I left out the absolute beginners.For small programs 
and blog posts, this is workable, for larger programs I don't think it is 
-- this is why introductory material at various expertise levels is still 
needed.

Alex.


> -- 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/c5373eaf-bd13-473c-9ece-b26ce2852c45n%40googlegroups.com.


Re: [racket-users] Deserializing snips from untrusted input

2020-08-20 Thread Robby Findler
I believe that the "other ways to cause harm" that mention applies here,
but this is the docs that explain the thing I'm talking about:

https://docs.racket-lang.org/gui/editor-overview.html?q=snip-class#%28part._editorsnipclasses%29

It would require the attacker put the file on the disk in a collection and
then this would trigger running that code.

There are other ways to trigger running code (e.g., starting up DrRacket)
if the attacker can write to the filesystem into a collection, tho.

Robby


On Thu, Aug 20, 2020 at 2:29 PM Daniel Melcer  wrote:

> To make sure I'm understanding correctly, as long as the code verifies
> that the given snipclass is in (get-the-snip-class-list), it should be
> relatively safe? So the only way that the user would run malicious code in
> this case is if they installed a malicious package first, in which case
> there are easier ways to cause harm.
>
> OTOH, when using the load-file method, the dynamic-require could be an
> issue if a theoretical attacker put a .rkt file at a known path and the
> input to load-file refers to that path.
>
> Daniel
>
> On Thursday, August 20, 2020 at 3:12:00 PM UTC-4 Robby Findler wrote:
>
>> The issue I mention in 157 is different than this one.
>>
>> In this situation, the snipclass needs to be installed somehow before its
>> code will be loaded, but that installation can happen by a require
>> (triggered by the opening of that snip). So it may be that you have code
>> installed in a collection that you do not trust and unmarshalling a snip
>> may load that code.
>>
>> That said, in the code below, I don't think this is happening. In
>> particular, the way that untrusted code may be loaded is because the name
>> of the snipclass follows a specific format and the editor itself is going
>> to do the require.
>>
>> In short, you can treat the `load-file` method of editor<%> as possibly
>> doing a dynamic-require. This may or may not be a problem, of course.
>>
>> (At least I think that that's the only thing here. I may be forgetting
>> something?)
>>
>> Robby
>>
>>
>> On Thu, Aug 20, 2020 at 2:08 PM Sorawee Porncharoenwase <
>> sorawe...@gmail.com> wrote:
>>
>>> I don't know much about this specific case, but see Robby's comment
>>> about how "DrRacket can run user (untrusted) code in certain situations" at
>>> https://github.com/racket/gui/issues/157. A concrete problem I found is
>>> that you can have a snip running `struct->vector` and it will successfully
>>> extract private fields of that struct value, even though it won't be able
>>> to if you do that in normal circumstances.
>>>
>>> On Thu, Aug 20, 2020 at 8:34 AM Daniel Melcer  wrote:
>>>
 There are some well-known vulnerabilities that are a result of
 deserializing untrusted inputs. Are editor snips restrictive enough that
 their deserialization is safe? After all, they are already loaded when a
 file is opened in DrRacket, and a file on the disk may originate from an
 untrusted source. In particular, I would be doing something like this
 (snip-class-name, bytes, and snip-pos are from an untrusted source). The
 whole thing will be wrapped in an exception handler:

 (define snip-class (send (get-the-snip-class-list) find
 snip-class-name)) ; Also handle case where this returns #f
 (define bytes-base-in (make-object editor-stream-in-bytes-base%
 bytes))
 (define editor-stream-in (make-object editor-stream-in%
 bytes-base-in))
 (define new-snip (send snip-class read editor-stream-in))
 (send text insert new-snip snip-pos)

 Daniel

 --
 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...@googlegroups.com.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/racket-users/153d1c59-0343-4ed9-805b-2909499ec98fn%40googlegroups.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...@googlegroups.com.
>>>
>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/racket-users/CADcuegtnpb3h_JkDFmBdhiosJkz948ypkhmoj1vZc7vq5SAR0w%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 

Re: [racket-users] Deserializing snips from untrusted input

2020-08-20 Thread Daniel Melcer
To make sure I'm understanding correctly, as long as the code verifies that 
the given snipclass is in (get-the-snip-class-list), it should be 
relatively safe? So the only way that the user would run malicious code in 
this case is if they installed a malicious package first, in which case 
there are easier ways to cause harm.

OTOH, when using the load-file method, the dynamic-require could be an 
issue if a theoretical attacker put a .rkt file at a known path and the 
input to load-file refers to that path.

Daniel

On Thursday, August 20, 2020 at 3:12:00 PM UTC-4 Robby Findler wrote:

> The issue I mention in 157 is different than this one.
>
> In this situation, the snipclass needs to be installed somehow before its 
> code will be loaded, but that installation can happen by a require 
> (triggered by the opening of that snip). So it may be that you have code 
> installed in a collection that you do not trust and unmarshalling a snip 
> may load that code.
>
> That said, in the code below, I don't think this is happening. In 
> particular, the way that untrusted code may be loaded is because the name 
> of the snipclass follows a specific format and the editor itself is going 
> to do the require. 
>
> In short, you can treat the `load-file` method of editor<%> as possibly 
> doing a dynamic-require. This may or may not be a problem, of course.
>
> (At least I think that that's the only thing here. I may be forgetting 
> something?)
>
> Robby
>
>
> On Thu, Aug 20, 2020 at 2:08 PM Sorawee Porncharoenwase <
> sorawe...@gmail.com> wrote:
>
>> I don't know much about this specific case, but see Robby's comment about 
>> how "DrRacket can run user (untrusted) code in certain situations" at 
>> https://github.com/racket/gui/issues/157. A concrete problem I found is 
>> that you can have a snip running `struct->vector` and it will successfully 
>> extract private fields of that struct value, even though it won't be able 
>> to if you do that in normal circumstances.
>>
>> On Thu, Aug 20, 2020 at 8:34 AM Daniel Melcer  wrote:
>>
>>> There are some well-known vulnerabilities that are a result of 
>>> deserializing untrusted inputs. Are editor snips restrictive enough that 
>>> their deserialization is safe? After all, they are already loaded when a 
>>> file is opened in DrRacket, and a file on the disk may originate from an 
>>> untrusted source. In particular, I would be doing something like this 
>>> (snip-class-name, bytes, and snip-pos are from an untrusted source). The 
>>> whole thing will be wrapped in an exception handler:
>>>
>>> (define snip-class (send (get-the-snip-class-list) find 
>>> snip-class-name)) ; Also handle case where this returns #f
>>> (define bytes-base-in (make-object editor-stream-in-bytes-base% 
>>> bytes))
>>> (define editor-stream-in (make-object editor-stream-in% 
>>> bytes-base-in))
>>> (define new-snip (send snip-class read editor-stream-in))
>>> (send text insert new-snip snip-pos)
>>>
>>> Daniel
>>>
>>> -- 
>>> 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...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/racket-users/153d1c59-0343-4ed9-805b-2909499ec98fn%40googlegroups.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...@googlegroups.com.
>>
> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/racket-users/CADcuegtnpb3h_JkDFmBdhiosJkz948ypkhmoj1vZc7vq5SAR0w%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/d201725a-e043-4c31-975e-f0ff289982f4n%40googlegroups.com.


Re: [racket-users] Deserializing snips from untrusted input

2020-08-20 Thread Robby Findler
The issue I mention in 157 is different than this one.

In this situation, the snipclass needs to be installed somehow before its
code will be loaded, but that installation can happen by a require
(triggered by the opening of that snip). So it may be that you have code
installed in a collection that you do not trust and unmarshalling a snip
may load that code.

That said, in the code below, I don't think this is happening. In
particular, the way that untrusted code may be loaded is because the name
of the snipclass follows a specific format and the editor itself is going
to do the require.

In short, you can treat the `load-file` method of editor<%> as possibly
doing a dynamic-require. This may or may not be a problem, of course.

(At least I think that that's the only thing here. I may be forgetting
something?)

Robby


On Thu, Aug 20, 2020 at 2:08 PM Sorawee Porncharoenwase <
sorawee.pw...@gmail.com> wrote:

> I don't know much about this specific case, but see Robby's comment about
> how "DrRacket can run user (untrusted) code in certain situations" at
> https://github.com/racket/gui/issues/157. A concrete problem I found is
> that you can have a snip running `struct->vector` and it will successfully
> extract private fields of that struct value, even though it won't be able
> to if you do that in normal circumstances.
>
> On Thu, Aug 20, 2020 at 8:34 AM Daniel Melcer  wrote:
>
>> There are some well-known vulnerabilities that are a result of
>> deserializing untrusted inputs. Are editor snips restrictive enough that
>> their deserialization is safe? After all, they are already loaded when a
>> file is opened in DrRacket, and a file on the disk may originate from an
>> untrusted source. In particular, I would be doing something like this
>> (snip-class-name, bytes, and snip-pos are from an untrusted source). The
>> whole thing will be wrapped in an exception handler:
>>
>> (define snip-class (send (get-the-snip-class-list) find
>> snip-class-name)) ; Also handle case where this returns #f
>> (define bytes-base-in (make-object editor-stream-in-bytes-base%
>> bytes))
>> (define editor-stream-in (make-object editor-stream-in%
>> bytes-base-in))
>> (define new-snip (send snip-class read editor-stream-in))
>> (send text insert new-snip snip-pos)
>>
>> Daniel
>>
>> --
>> 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/153d1c59-0343-4ed9-805b-2909499ec98fn%40googlegroups.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/CADcuegtnpb3h_JkDFmBdhiosJkz948ypkhmoj1vZc7vq5SAR0w%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/CAL3TdOMHWqy1FM20OmbV1zB9x3WU%2BzDnbjguW%3D8PHfgfLgbmGw%40mail.gmail.com.


Re: [racket-users] Deserializing snips from untrusted input

2020-08-20 Thread Sorawee Porncharoenwase
I don't know much about this specific case, but see Robby's comment about
how "DrRacket can run user (untrusted) code in certain situations" at
https://github.com/racket/gui/issues/157. A concrete problem I found is
that you can have a snip running `struct->vector` and it will successfully
extract private fields of that struct value, even though it won't be able
to if you do that in normal circumstances.

On Thu, Aug 20, 2020 at 8:34 AM Daniel Melcer  wrote:

> There are some well-known vulnerabilities that are a result of
> deserializing untrusted inputs. Are editor snips restrictive enough that
> their deserialization is safe? After all, they are already loaded when a
> file is opened in DrRacket, and a file on the disk may originate from an
> untrusted source. In particular, I would be doing something like this
> (snip-class-name, bytes, and snip-pos are from an untrusted source). The
> whole thing will be wrapped in an exception handler:
>
> (define snip-class (send (get-the-snip-class-list) find
> snip-class-name)) ; Also handle case where this returns #f
> (define bytes-base-in (make-object editor-stream-in-bytes-base%
> bytes))
> (define editor-stream-in (make-object editor-stream-in%
> bytes-base-in))
> (define new-snip (send snip-class read editor-stream-in))
> (send text insert new-snip snip-pos)
>
> Daniel
>
> --
> 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/153d1c59-0343-4ed9-805b-2909499ec98fn%40googlegroups.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/CADcuegtnpb3h_JkDFmBdhiosJkz948ypkhmoj1vZc7vq5SAR0w%40mail.gmail.com.


Re: [racket-users] Application Templates!

2020-08-20 Thread Stephen De Gabrielle
On Thu, Aug 20, 2020 at 6:43 PM James Geddes  wrote:

>
>
> > On 20 Aug 2020, at 18:22, Sorawee Porncharoenwase <
> sorawee.pw...@gmail.com> wrote:
> >
> > Is this intended to be something like
> https://docs.racket-lang.org/scaffold/?
>
> That also looks extremely useful!
>
> James
>
>
Agreed!

The raco from-template command does a git clone of the named template and
then removes the .git folder so the user has a fresh start.

$ raco from-template  

the script is
https://github.com/nixin72/from-template/blob/master/from-template.sh
(need a windows version!)

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-L8dYr9Cv3mOxsLWTh%2B9chnn%3DBfW8%3DtRxWD6bFKktVopQ%40mail.gmail.com.


Re: [racket-users] Re: Application Templates!

2020-08-20 Thread Robby Findler
On Thu, Aug 20, 2020 at 9:11 AM Deren Dohoda  wrote:

> I would kill to understand the intended use of the framework library. I
> don't understand what I'm supposed to do with it at all. Does anyone have
> an application written with framework that I can look at? Or could we make
> a small template with some framework features like autosave which are quite
> unique to framework over racket/gui? I feel very stupid asking but my
> desire to try it has exceeded my embarrassment in this regard.
>

The framework is intended to be a collection of mixins that provide useful
functionality in a variety of ways that someone building an app might want.
That said, I agree the documentation could really use some help with
introductory material and some examples and ... I don't know what. So if
people have energy to work on how to do that, I would be delighted.

Here's an example of the kind of thing I'm talking about. This is just
using racket/gui classes:

#lang racket/gui
(define f (new frame% [label ""] [width 200] [height 200]))
(define t (new text%))
(send t insert "#lang racket\n(define (f x)\n  (expt x x))\n")
(define ec (new editor-canvas% [parent f] [editor t]))
(send f show #t)

but we can add a stuff from the framework, say, like this (to get
search/replace to work):

#lang racket/gui
(require framework)
(define f (new frame:searchable% [width 600] [height 800]))
(define t (send f get-editor))
(send t insert "#lang racket\n(define (f x)\n  (expt x x))\n")
(send f show #t)

If we change the editor class that gets created we can get syntax
highlighting based on the #lang-line

#lang racket/gui
(require framework)
(define f%
  (class frame:searchable%
(define/override (get-editor%)
  (text:searching-mixin
   racket:text%))
(super-new)))
(define f (new f% [width 600] [height 800]))
(define t (send f get-editor))
(send t insert "#lang racket\n(define (f x)\n  (expt x x))\n")
(send f show #t)

I've tried to make the framework library's mixins and classes at least
theoretically, be plausibly useful things outside of DrRacket but yes, the
framework and DrRacket have certainly grown together with each other.
Matthew Flatt started them in 1993? 4? and I've been slowly acreeting stuff
into them since (with help from many others, of course!)

Robby

On Thu, Aug 20, 2020 at 9:46 AM Laurent  wrote:

> My understanding is that Framework is born out of DrRacket, expecting that
> some of its tools may be useful in other contexts (like, say, keymaps).
>
>
> On Thu, Aug 20, 2020 at 3:11 PM Deren Dohoda 
> wrote:
>
>> > I think Racket would benefit by a suite of applications which are small
>> but
>> > not trivial and with a source code which is commented in more detail
>> than a
>> > regular application
>> I would kill to understand the intended use of the framework library. I
>> don't understand what I'm supposed to do with it at all. Does anyone have
>> an application written with framework that I can look at? Or could we make
>> a small template with some framework features like autosave which are quite
>> unique to framework over racket/gui? I feel very stupid asking but my
>> desire to try it has exceeded my embarrassment in this regard.
>>
>> Deren
>>
>> --
>> 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/c754b4a3-9073-4ecd-9815-7491ad96cf89n%40googlegroups.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/CABNTSaGAHqYPKtU-dTnOQ5ZNO0tMWuTgrRW8w8o2iNeZc7bEYg%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/CAL3TdOMvNSdayRKiU7dpjP-395Jdwuf4j2FUkK3h%3D3e6NCSxqQ%40mail.gmail.com.


Re: [racket-users] Application Templates!

2020-08-20 Thread James Geddes



> On 20 Aug 2020, at 18:22, Sorawee Porncharoenwase  
> wrote:
> 
> Is this intended to be something like https://docs.racket-lang.org/scaffold/? 

That also looks extremely useful!

James

-- 
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/13867585-A96B-49A9-ACEB-C824315AF71C%40gmail.com.


Re: [racket-users] Application Templates!

2020-08-20 Thread James Geddes
Just to note that I would find this sort of thing very useful. 

I have struggled to package my command-line app in a way that makes it easily 
accessible to my colleagues (a mixture of Python developers on Macs using 
homebrew and non-developers on corporate Windows systems using who knows what). 

I’ve also struggled to understand the convention organising directories within 
a package. (I think perhaps this is because the system is actually very 
flexible.) 

For me, commented examples of these would be a very helpful complement to the 
(excellent) guide and reference.

James



> On 20 Aug 2020, at 18:11, Stephen De Gabrielle  
> wrote:
> 
> Alex is right, most developers don't need this. 
> 
> The point of templates is a jumping off point for new developers, or 
> developers trying a domain they are not familiar with. 
> 
> Where possible I will be linking back to any supporting materials 
> (https://alex-hhh.github.io/2020/03/a-game-of-tetris.html thank you Alex)
> 
> As part of the working example distributing or deploying; sometimes we make 
> software for ourselves, (packages, plugins, scripts, keybindings and new raco 
> commands),
> but sometimes we make software for others; in those cases the templates need 
> to include instructions for that process
> - create the distributable executable 
> - deploy a web app (blog post by Alexis - but might make use of the 'Deploy 
> to Heroku' button)
> - Microsoft Store (help please? both x86 and ARM) 
> - App Store for mac (https://defn.io/2020/01/04/remember-internals/ thank you 
> Bogdan) and maybe iOS ( https://defn.io/2020/01/05/racket-on-ios/ )
> - packaged as a PPA for linux.
> - github actions
> - services or components in larger frameworks/applications/or os's (?)
> 
> A recent contribution is a new command extension to raco: 
> https://github.com/nixin72/from-template
> $ raco from-template  
> Philip described it 'like create-react-app, but for all sorts of Racket 
> templates' 
>  (It is currently only linux so it would be nice if a windows user could help)
> 
> A big thank you goes to Philip because it serves two purposes
> 1. It’s a raco tool for installing templates - exactly what is needed 
> 2. It is a template for adding a command to raco!
> 
> PS: I would suggest that Racket is *a lot* like dotnet core in that it is a 
> 'developer platform' (not a framework) 
> that consists of 'a runtime, a series of languages and a bunch of libraries'. 
> Mirroring https://twitter.com/shanselman/status/1288698620804362240?s=20 :
> Racket = .Net (The Ecosystem)
> bc/cs = JVM, CLR
> racket/base, racket/gui, typed/racket, datalog & others = Languages
> https://pkgs.racket-lang.org
>  = npm, maven, etc
> 
> raco
>  = dotnet cli - your entry point, SDK, driver, javac, go, etc 
> 
> raco from-template  = create-react-app, dotnet new - templates
> raco exe
>  = dotnet run - dev time compile and run
> 
> raco distribute = dotnet publish - ready up for deploy
>  
> Kind regards, 
> 
> Stephen
> 
> 
> On Thu, Aug 20, 2020 at 11:17 AM Laurent  wrote:
> Stephen's work may still be quite useful, as it provides a set of really 
> minimal (almost?) working examples that explain the specifics of various 
> tools.
> 
> I say keep it up, Stephen! 
> 
> On Thu, Aug 20, 2020 at 5:33 AM Alex Harsanyi  wrote:
> I am not sure that a template in the style of "dotnet new" is directly 
> applicable for Racket --  the .Net framework is, well a framework. which is a 
> library that expects the users to structure their own programs in certain 
> ways.  The templates fill the need of setting up the boilerplate code for 
> different kind of applications as required by the .Net framework.  Racket 
> applications don't need large amounts of "setup code", most of the code is 
> very specific to the application itself, so not sure what a template would 
> contain apart from very basic things.
> 
> I think Racket would benefit by a suite of applications which are small but 
> not trivial and with a source code which is commented in more detail than a 
> regular application.  I attempted to do this with my blog posts, some of 
> which describe more-or-less complete applications (most of them games). The 
> entire source code is in a single file which can be run directly and is 
> available as a GitHub Gist linked from the blog posts.
> 
> Here are some examples:
> 
> * ishido game (936 lines):  
> https://gist.github.com/alex-hhh/2e204b3a9d9d7094f65a0b585d0b7480 
> * tetris game (893 lines): 
> https://gist.github.com/alex-hhh/2233aee39852f4e0aead4af4cafb40d5
> * chess board (893 lines): 
> https://gist.github.com/alex-hhh/4817c4d0353e40b72108e7e753c3d0da
> * password generator GUI (346 lines): 
> https://gist.github.com/alex-hhh/6acbbb8ebca47c4cfaa2540499494af6
> * password generator, command line (142 lines): 
> https://gist.github.com/alex-hhh/27286f4609ea0c989675e5c946ca39de
> 
> These are of course not templates, but they could serve as the starting 
> points for users who already 

Re: [racket-users] Re: Application Templates!

2020-08-20 Thread Sorawee Porncharoenwase
Is this intended to be something like https://docs.racket-lang.org/scaffold/
?

On Thu, Aug 20, 2020 at 10:12 AM Stephen De Gabrielle <
spdegabrie...@gmail.com> wrote:

> Alex is right, most developers don't need this.
>
> The point of templates is a jumping off point for new developers, or
> developers trying a domain they are not familiar with.
>
> Where possible I will be linking back to any supporting materials (
> https://alex-hhh.github.io/2020/03/a-game-of-tetris.html thank you Alex)
>
> As part of the working example distributing or deploying; sometimes we
> make software for ourselves, (packages, plugins, scripts, keybindings and
> new raco commands),
> but sometimes we make software for others; in those cases the templates
> need to include instructions for that process
> - create the distributable executable
> - deploy a web app (blog post by Alexis - but might make use of the
> 'Deploy to Heroku' button)
> - Microsoft Store (help please? both x86 and ARM)
> - App Store for mac (https://defn.io/2020/01/04/remember-internals/ thank
> you Bogdan) and maybe iOS ( https://defn.io/2020/01/05/racket-on-ios/ )
> - packaged as a PPA for linux.
> - github actions
> - services or components in larger frameworks/applications/or os's (?)
>
> A recent contribution is a new command extension to raco:
> https://github.com/nixin72/from-template
> $ raco from-template  
> Philip described it 'like create-react-app, but for all sorts of Racket
> templates'
>  (It is currently only linux so it would be nice if a windows user could
> help)
>
> *A big thank you goes to Philip because it serves two purposes*
> *1. It’s a raco tool for installing templates - exactly what is needed *
> *2. It is a template for adding a command to raco!*
>
>
> PS: I would suggest that Racket is *a lot* like dotnet core in that it is
> a 'developer platform ' (not a framework)
> that consists of 'a runtime, a series of languages and a bunch of
> libraries '.
> Mirroring https://twitter.com/shanselman/status/1288698620804362240?s=20 :
>>
>> Racket = .Net (The Ecosystem)
>> bc/cs = JVM, CLR
>> racket/base, racket/gui, typed/racket, datalog & others = Languages
>> https://pkgs.racket-lang.org = npm, maven, etc raco = dotnet cli - your
>> entry point, SDK, driver, javac, go, etc raco from-template
>>  = create-react-app, dotnet
>> new - templates
>
> raco exe = dotnet run - dev time compile and run raco distribute = dotnet
>> publish - ready up for deploy
>
>
> Kind regards,
>
> Stephen
>
>
> On Thu, Aug 20, 2020 at 11:17 AM Laurent  wrote:
>
>> Stephen's work may still be quite useful, as it provides a set of really
>> minimal (almost?) working examples that explain the specifics of various
>> tools.
>>
>> I say keep it up, Stephen!
>>
>> On Thu, Aug 20, 2020 at 5:33 AM Alex Harsanyi 
>> wrote:
>>
>>> I am not sure that a template in the style of "dotnet new" is directly
>>> applicable for Racket --  the .Net framework is, well a framework. which is
>>> a library that expects the users to structure their own programs in certain
>>> ways.  The templates fill the need of setting up the boilerplate code for
>>> different kind of applications as required by the .Net framework.  Racket
>>> applications don't need large amounts of "setup code", most of the code is
>>> very specific to the application itself, so not sure what a template would
>>> contain apart from very basic things.
>>>
>>> I think Racket would benefit by a suite of applications which are small
>>> but not trivial and with a source code which is commented in more detail
>>> than a regular application.  I attempted to do this with my blog posts,
>>> some of which describe more-or-less complete applications (most of them
>>> games). The entire source code is in a single file which can be run
>>> directly and is available as a GitHub Gist linked from the blog posts.
>>>
>>> Here are some examples:
>>>
>>> * ishido game (936 lines):
>>> https://gist.github.com/alex-hhh/2e204b3a9d9d7094f65a0b585d0b7480
>>> * tetris game (893 lines):
>>> https://gist.github.com/alex-hhh/2233aee39852f4e0aead4af4cafb40d5
>>> * chess board (893 lines):
>>> https://gist.github.com/alex-hhh/4817c4d0353e40b72108e7e753c3d0da
>>> * password generator GUI (346 lines):
>>> https://gist.github.com/alex-hhh/6acbbb8ebca47c4cfaa2540499494af6
>>> * password generator, command line (142 lines):
>>> https://gist.github.com/alex-hhh/27286f4609ea0c989675e5c946ca39de
>>>
>>> These are of course not templates, but they could serve as the starting
>>> points for users who already have some experience with programming and want
>>> to try out some more complex programs.
>>>
>>> Alex.
>>>
>>> On Thursday, August 20, 2020 at 5:49:37 AM UTC+8 Stephen De Gabrielle
>>> wrote:
>>>
 I’ve started a small collection!

 https://github.com/racket-templates

 

Re: [racket-users] Re: Application Templates!

2020-08-20 Thread Stephen De Gabrielle
Alex is right, most developers don't need this.

The point of templates is a jumping off point for new developers, or
developers trying a domain they are not familiar with.

Where possible I will be linking back to any supporting materials (
https://alex-hhh.github.io/2020/03/a-game-of-tetris.html thank you Alex)

As part of the working example distributing or deploying; sometimes we make
software for ourselves, (packages, plugins, scripts, keybindings and new
raco commands),
but sometimes we make software for others; in those cases the templates
need to include instructions for that process
- create the distributable executable
- deploy a web app (blog post by Alexis - but might make use of the 'Deploy
to Heroku' button)
- Microsoft Store (help please? both x86 and ARM)
- App Store for mac (https://defn.io/2020/01/04/remember-internals/ thank
you Bogdan) and maybe iOS ( https://defn.io/2020/01/05/racket-on-ios/ )
- packaged as a PPA for linux.
- github actions
- services or components in larger frameworks/applications/or os's (?)

A recent contribution is a new command extension to raco:
https://github.com/nixin72/from-template
$ raco from-template  
Philip described it 'like create-react-app, but for all sorts of Racket
templates'
 (It is currently only linux so it would be nice if a windows user could
help)

*A big thank you goes to Philip because it serves two purposes*
*1. It’s a raco tool for installing templates - exactly what is needed *
*2. It is a template for adding a command to raco!*


PS: I would suggest that Racket is *a lot* like dotnet core in that it is a
'developer platform ' (not a framework)
that consists of 'a runtime, a series of languages and a bunch of libraries
'.
Mirroring https://twitter.com/shanselman/status/1288698620804362240?s=20 :
>
> Racket = .Net (The Ecosystem)
> bc/cs = JVM, CLR
> racket/base, racket/gui, typed/racket, datalog & others = Languages
> https://pkgs.racket-lang.org = npm, maven, etc raco = dotnet cli - your
> entry point, SDK, driver, javac, go, etc raco from-template
>  = create-react-app, dotnet new
> - templates

raco exe = dotnet run - dev time compile and run raco distribute = dotnet
> publish - ready up for deploy


Kind regards,

Stephen


On Thu, Aug 20, 2020 at 11:17 AM Laurent  wrote:

> Stephen's work may still be quite useful, as it provides a set of really
> minimal (almost?) working examples that explain the specifics of various
> tools.
>
> I say keep it up, Stephen!
>
> On Thu, Aug 20, 2020 at 5:33 AM Alex Harsanyi 
> wrote:
>
>> I am not sure that a template in the style of "dotnet new" is directly
>> applicable for Racket --  the .Net framework is, well a framework. which is
>> a library that expects the users to structure their own programs in certain
>> ways.  The templates fill the need of setting up the boilerplate code for
>> different kind of applications as required by the .Net framework.  Racket
>> applications don't need large amounts of "setup code", most of the code is
>> very specific to the application itself, so not sure what a template would
>> contain apart from very basic things.
>>
>> I think Racket would benefit by a suite of applications which are small
>> but not trivial and with a source code which is commented in more detail
>> than a regular application.  I attempted to do this with my blog posts,
>> some of which describe more-or-less complete applications (most of them
>> games). The entire source code is in a single file which can be run
>> directly and is available as a GitHub Gist linked from the blog posts.
>>
>> Here are some examples:
>>
>> * ishido game (936 lines):
>> https://gist.github.com/alex-hhh/2e204b3a9d9d7094f65a0b585d0b7480
>> * tetris game (893 lines):
>> https://gist.github.com/alex-hhh/2233aee39852f4e0aead4af4cafb40d5
>> * chess board (893 lines):
>> https://gist.github.com/alex-hhh/4817c4d0353e40b72108e7e753c3d0da
>> * password generator GUI (346 lines):
>> https://gist.github.com/alex-hhh/6acbbb8ebca47c4cfaa2540499494af6
>> * password generator, command line (142 lines):
>> https://gist.github.com/alex-hhh/27286f4609ea0c989675e5c946ca39de
>>
>> These are of course not templates, but they could serve as the starting
>> points for users who already have some experience with programming and want
>> to try out some more complex programs.
>>
>> Alex.
>>
>> On Thursday, August 20, 2020 at 5:49:37 AM UTC+8 Stephen De Gabrielle
>> wrote:
>>
>>> I’ve started a small collection!
>>>
>>> https://github.com/racket-templates
>>>
>>> These are GitHub templates so you use them by clicking ‘use this
>>> template‘ on the repo
>>>
>>> I’m looking for more ideas/contributions;
>>> From the top of my head;
>>> - ‘worker service’ (dotnet new has this)
>>> - DrRacket plugin
>>> - Keybinding package
>>> - Teachpack
>>> - raco command
>>> - scribble (multiple)
>>> - pollen (multiple)
>>> - slideshow
>>> - 

Re: [racket-users] GUI zoom and normal-control-font

2020-08-20 Thread James Platt


On Aug 19, 2020, at 8:53 PM, George Neuner wrote:

> Sorry, it was not clear to me that you wanted to resize widgets (child 
> windows).  Typically when one speaks about a window's "content" they are 
> referring to text or imagery drawn onto the window's backing bitmap.

I was going by Macintosh terminology where there are two different kinds of 
zoom.  A window zoom is activated, currently, by double clicking on the top bar 
of a window.  Previously, it was the green button on the window bar but that 
now activates full screen mode.  It toggles between the last custom dragged 
size of the window and a size of its contents.  Unfortunately, this has never 
worked as well in Mac OS X and macOS as well as it did in Classic Mac OS which 
might be part of the reason they switched the green button to full screen mode. 
 The zoom I want is the one activated by the zoom menu item (or command - / 
command =).  This resizes contents of the window, including text and imagery as 
well as widgets.  I would really like to have the full functionality but, for 
now, just resizing widgets would be a major improvement.  

-- 
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/1F4FEE9B-83AD-4E10-A850-4341F0AA935D%40biomantica.com.


Re: [racket-users] Re: Application Templates!

2020-08-20 Thread Stephen De Gabrielle
Hi Deren,

>
> The framework provides a number of mixins, classes and functions designed
> to help you build a complete application program on top of the racket/gui
>  library.


- https://docs.racket-lang.org/framework/index.html

Check out the overview and the table of contents - it has lots of stuff
useful for building a non-trivial gui application. (Imagine not having to
implement autosave or preferences from scratch!)

Another hidden gem for GUI applications is MrLib:
https://docs.racket-lang.org/mrlib/index.html

Stephen


On Thu, Aug 20, 2020 at 3:46 PM Laurent  wrote:

> My understanding is that Framework is born out of DrRacket, expecting that
> some of its tools may be useful in other contexts (like, say, keymaps).
>
>
> On Thu, Aug 20, 2020 at 3:11 PM Deren Dohoda 
> wrote:
>
>> > I think Racket would benefit by a suite of applications which are small
>> but
>> > not trivial and with a source code which is commented in more detail
>> than a
>> > regular application
>> I would kill to understand the intended use of the framework library. I
>> don't understand what I'm supposed to do with it at all. Does anyone have
>> an application written with framework that I can look at? Or could we make
>> a small template with some framework features like autosave which are quite
>> unique to framework over racket/gui? I feel very stupid asking but my
>> desire to try it has exceeded my embarrassment in this regard.
>>
>> Deren
>>
>> --
>> 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/c754b4a3-9073-4ecd-9815-7491ad96cf89n%40googlegroups.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/CABNTSaGAHqYPKtU-dTnOQ5ZNO0tMWuTgrRW8w8o2iNeZc7bEYg%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-LGWJBwWqQZ8CeFhVNoGuRYPYsif%2B9RAy-wXGA8Dcdjeg%40mail.gmail.com.


[racket-users] Deserializing snips from untrusted input

2020-08-20 Thread Daniel Melcer
There are some well-known vulnerabilities that are a result of 
deserializing untrusted inputs. Are editor snips restrictive enough that 
their deserialization is safe? After all, they are already loaded when a 
file is opened in DrRacket, and a file on the disk may originate from an 
untrusted source. In particular, I would be doing something like this 
(snip-class-name, bytes, and snip-pos are from an untrusted source). The 
whole thing will be wrapped in an exception handler:

(define snip-class (send (get-the-snip-class-list) find 
snip-class-name)) ; Also handle case where this returns #f
(define bytes-base-in (make-object editor-stream-in-bytes-base% 
bytes))
(define editor-stream-in (make-object editor-stream-in% 
bytes-base-in))
(define new-snip (send snip-class read editor-stream-in))
(send text insert new-snip snip-pos)

Daniel

-- 
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/153d1c59-0343-4ed9-805b-2909499ec98fn%40googlegroups.com.


Re: [racket-users] Re: Application Templates!

2020-08-20 Thread Laurent
My understanding is that Framework is born out of DrRacket, expecting that
some of its tools may be useful in other contexts (like, say, keymaps).


On Thu, Aug 20, 2020 at 3:11 PM Deren Dohoda  wrote:

> > I think Racket would benefit by a suite of applications which are small
> but
> > not trivial and with a source code which is commented in more detail
> than a
> > regular application
> I would kill to understand the intended use of the framework library. I
> don't understand what I'm supposed to do with it at all. Does anyone have
> an application written with framework that I can look at? Or could we make
> a small template with some framework features like autosave which are quite
> unique to framework over racket/gui? I feel very stupid asking but my
> desire to try it has exceeded my embarrassment in this regard.
>
> Deren
>
> --
> 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/c754b4a3-9073-4ecd-9815-7491ad96cf89n%40googlegroups.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/CABNTSaGAHqYPKtU-dTnOQ5ZNO0tMWuTgrRW8w8o2iNeZc7bEYg%40mail.gmail.com.


Re: [racket-users] Re: Application Templates!

2020-08-20 Thread Deren Dohoda
> I think Racket would benefit by a suite of applications which are small 
but 
> not trivial and with a source code which is commented in more detail than 
a 
> regular application 
I would kill to understand the intended use of the framework library. I 
don't understand what I'm supposed to do with it at all. Does anyone have 
an application written with framework that I can look at? Or could we make 
a small template with some framework features like autosave which are quite 
unique to framework over racket/gui? I feel very stupid asking but my 
desire to try it has exceeded my embarrassment in this regard.

Deren

-- 
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/c754b4a3-9073-4ecd-9815-7491ad96cf89n%40googlegroups.com.


Re: [racket-users] Can OpenSSL be upgraded for the next Racket release?

2020-08-20 Thread Matthew Flatt
Hi Andre,

For information and build scripts, see

  https://github.com/racket/racket/tree/master/racket/src/native-libs

As an intermediate step, I direct the libraries to a checkout of

  https://github.com/racket/libs/

which has the built libraries in package form and some upload scripts
for registering the updated packages.

The time-consuming part is preparing a set of environments where the
builds can work, including having all of the source archives at hand. I
start with a Mac that has old Mac OS SDKs and MinGW cross compilers
installed, so I can build 32-bit and 64-bit Mac and Windows libraries
in one place. I have a Debian 7 VM for the natipkg build. Probably
there's a more modern, Docker-based strategy that would make this
easier.

Matthew

At Thu, 20 Aug 2020 14:17:43 +0100, Andre Garzia wrote:
> Thanks a lot for the quick turnaround, Matthew.
> 
> I want to get more involved with Racket maintaining, specially for Windows
> platform, and before you replied here, I was trying to do this update
> myself. I saw the packages:
> 
> https://pkgs.racket-lang.org/package/racket-win32-i386
> https://pkgs.racket-lang.org/package/racket-win32-x86_64
> 
> But I couldn't find a repository or instructions on how to build them.
> Could you point me in to some instructions? In the future, instead of
> asking for upgrades, I'd like to maybe send a PR or something.
> 
> Best
> Andre
> 
> 
> 
> On Wed, 19 Aug 2020 at 00:42, Matthew Flatt  wrote:
> 
> > Yes --- done.
> >
> > Matthew
> >
> > At Mon, 17 Aug 2020 17:46:49 +0100, Andre Garzia wrote:
> > > Hi Folks,
> > >
> > > The OpenSSL DLLs being shipped with Racket (in version 7.7 at least) is
> > > v1.1.0.8 which has already been EOLd. Version 1.1.1 is the stable
> > version.
> > > Version 1.1.1 is LTS and supported until 2023. In theory 1.1.1 is a
> > drop-in
> > > replacement for 1.1.0.8 since it is ABI and binary compatible with the
> > > older version. Having that version available would allow us to benefit
> > from
> > > TLSv1.3:
> > >
> > > https://wiki.openssl.org/index.php/TLS1.3
> > >
> > > And also benefit from many other bug fixes.
> > >
> > > Best
> > > Andre
> > >
> > >
> > >
> > > --
> > > https://www.andregarzia.com 
> > > Want to support me? Buy me a coffee at https://ko-fi.com/andregarzia
> >
> 
> 
> -- 
> https://www.andregarzia.com 
> Want to support me? Buy me a coffee at https://ko-fi.com/andregarzia
> 
> -- 
> 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/CAF3jwTn--b58kKAOkWZhhTSFp7PMdhZ
> MD7cqiFHgJ87uOw-WGg%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/20200820075134.91%40sirmail.smtps.cs.utah.edu.


Re: [racket-users] Can OpenSSL be upgraded for the next Racket release?

2020-08-20 Thread Andre Garzia
Thanks a lot for the quick turnaround, Matthew.

I want to get more involved with Racket maintaining, specially for Windows
platform, and before you replied here, I was trying to do this update
myself. I saw the packages:

https://pkgs.racket-lang.org/package/racket-win32-i386
https://pkgs.racket-lang.org/package/racket-win32-x86_64

But I couldn't find a repository or instructions on how to build them.
Could you point me in to some instructions? In the future, instead of
asking for upgrades, I'd like to maybe send a PR or something.

Best
Andre



On Wed, 19 Aug 2020 at 00:42, Matthew Flatt  wrote:

> Yes --- done.
>
> Matthew
>
> At Mon, 17 Aug 2020 17:46:49 +0100, Andre Garzia wrote:
> > Hi Folks,
> >
> > The OpenSSL DLLs being shipped with Racket (in version 7.7 at least) is
> > v1.1.0.8 which has already been EOLd. Version 1.1.1 is the stable
> version.
> > Version 1.1.1 is LTS and supported until 2023. In theory 1.1.1 is a
> drop-in
> > replacement for 1.1.0.8 since it is ABI and binary compatible with the
> > older version. Having that version available would allow us to benefit
> from
> > TLSv1.3:
> >
> > https://wiki.openssl.org/index.php/TLS1.3
> >
> > And also benefit from many other bug fixes.
> >
> > Best
> > Andre
> >
> >
> >
> > --
> > https://www.andregarzia.com 
> > Want to support me? Buy me a coffee at https://ko-fi.com/andregarzia
>


-- 
https://www.andregarzia.com 
Want to support me? Buy me a coffee at https://ko-fi.com/andregarzia

-- 
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/CAF3jwTn--b58kKAOkWZhhTSFp7PMdhZMD7cqiFHgJ87uOw-WGg%40mail.gmail.com.


Re: [racket-users] Re: Application Templates!

2020-08-20 Thread Hendrik Boom
On Wed, Aug 19, 2020 at 09:33:01PM -0700, Alex Harsanyi wrote:
...
...
> I think Racket would benefit by a suite of applications which are small but 
> not trivial and with a source code which is commented in more detail than a 
> regular application.

Every regular application would also benefit from being commented in 
this much detail.

-- 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/20200820131137.z3mazyfs6l23ozdf%40topoi.pooq.com.


Re: [racket-users] Re: Application Templates!

2020-08-20 Thread Laurent
Stephen's work may still be quite useful, as it provides a set of really
minimal (almost?) working examples that explain the specifics of various
tools.

I say keep it up, Stephen!

On Thu, Aug 20, 2020 at 5:33 AM Alex Harsanyi 
wrote:

> I am not sure that a template in the style of "dotnet new" is directly
> applicable for Racket --  the .Net framework is, well a framework. which is
> a library that expects the users to structure their own programs in certain
> ways.  The templates fill the need of setting up the boilerplate code for
> different kind of applications as required by the .Net framework.  Racket
> applications don't need large amounts of "setup code", most of the code is
> very specific to the application itself, so not sure what a template would
> contain apart from very basic things.
>
> I think Racket would benefit by a suite of applications which are small
> but not trivial and with a source code which is commented in more detail
> than a regular application.  I attempted to do this with my blog posts,
> some of which describe more-or-less complete applications (most of them
> games). The entire source code is in a single file which can be run
> directly and is available as a GitHub Gist linked from the blog posts.
>
> Here are some examples:
>
> * ishido game (936 lines):
> https://gist.github.com/alex-hhh/2e204b3a9d9d7094f65a0b585d0b7480
> * tetris game (893 lines):
> https://gist.github.com/alex-hhh/2233aee39852f4e0aead4af4cafb40d5
> * chess board (893 lines):
> https://gist.github.com/alex-hhh/4817c4d0353e40b72108e7e753c3d0da
> * password generator GUI (346 lines):
> https://gist.github.com/alex-hhh/6acbbb8ebca47c4cfaa2540499494af6
> * password generator, command line (142 lines):
> https://gist.github.com/alex-hhh/27286f4609ea0c989675e5c946ca39de
>
> These are of course not templates, but they could serve as the starting
> points for users who already have some experience with programming and want
> to try out some more complex programs.
>
> Alex.
>
> On Thursday, August 20, 2020 at 5:49:37 AM UTC+8 Stephen De Gabrielle
> wrote:
>
>> I’ve started a small collection!
>>
>> https://github.com/racket-templates
>>
>> These are GitHub templates so you use them by clicking ‘use this
>> template‘ on the repo
>>
>> I’m looking for more ideas/contributions;
>> From the top of my head;
>> - ‘worker service’ (dotnet new has this)
>> - DrRacket plugin
>> - Keybinding package
>> - Teachpack
>> - raco command
>> - scribble (multiple)
>> - pollen (multiple)
>> - slideshow
>> - racket embedded in c app
>>
>> Can you suggest(or submit) any others?
>>
>> <> the reasons is to give new users another way ins>>
>>
>> Are language specific templates a good idea?
>> - typed racket
>> - datalog
>> - parenlog
>> - rosette
>>
>>
>>   Thoughts suggestions criticisms appreciated!
>>
>> Stephen
>>
>> On Wed, 19 Aug 2020 at 00:02, Stephen De Gabrielle 
>> wrote:
>>
>>> I got jealous that dot net has dotnet new with lots of templates so I
>>> made a GitHub template for a cli command
>>> https://github.com/spdegabrielle/cli-command
>>>
>>> If you have an idea for a template you should make one!
>>>
>>> If you have a cool package that can be demonstrated as an application
>>> maybe consider a template as a way to introduce new Racketeers to your
>>> package?
>>>
>>> Best
>>>
>>> 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/856e1c7a-5afc-42d8-89f0-6b6fb81158d5n%40googlegroups.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/CABNTSaEHswSSwNH5ojDqR74OTjq_gKeV9pWCnd8UC3AsKcUvjQ%40mail.gmail.com.