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

[racket-users] Application Templates!

2020-08-18 Thread Stephen De Gabrielle
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/CAGHj7-JF5Roar5pZyvE092OHxF4Rcd3P_wCcnhJPXCp_Ykst8w%40mail.gmail.com.