Re: [racket-users] hackernews

2018-12-29 Thread Philip McGrath
On Sat, Dec 29, 2018 at 1:48 PM Tomasz Rola  wrote:

> Where does Racket belong? I understand Racket community no longer
> considers themselves as part of Scheme landscape, but I am unable to
> say where I get this impression from. If I am wrong, then the first
> thing for anybody willing to contribute to R* success would be to make
> their blog being displayed on Scheme Planet (IMHO). If I am right (R*
> not Scheme), then this is a pity.


There's much to discuss here, and much of it would start to get off-topic
for this thread, but I can give a few facts for the record.

Racket is a language in the Scheme branch of the Lisp family. Racket
includes implementations of the R5RS
 and R6RS
 Scheme languages, and
programs/libraries written in those languages can interoperate with code in
other Racket languages, but the main Racket language isn't Scheme. Racket
is both more than and different from the languages specified by any of the
Revised Reports in numerous ways, ranging from immutable pairs and
guaranteed left-to-right evaluation to the large standard library,
cutting-edge macro system, and multi-lingual programming support (which
enable those implementations of R5RS and R6RS), to name just a few. The
Racket language evolved from PLT Scheme: a blog post
 gives more of the rationale for the
change, but basically it's called something different because it is
something different. That said, Schemers are still some of Racketeers'
closest relatives: there is ongoing work to implement Racket in Chez
Scheme, and you will find some of the creators of Racket listed on the
cover page of R6RS.

Right now I am willing to write some scripts, with intention to run
> them both on Linux and OpenBSD. A kind of stuff that is normally
> written in Perl. … This means I will have to have source at my hand, just
> install *BSD,
> compile Gauche, install my scripts, ready to go, before any network is
> up I mean.
>
> Does Racket match such a use case? I can compile it from sources
> … but I wonder if it will
> compile in a very limited, rugged environment - no network connection,
> just what was there in base install (with C compiler, of course). I
> might try one day, but it seems Gauche has less dependency on outside
> packages than R*.
>

Racket can certainly do this. You do not need a network connection either
to compile Racket itself or to compile code written in Racket (provided, of
course, that you have all of the sources you need). On (non-Mac) Unix-like
systems, Racket does by default use some shared libraries (e.g. for GUI
stuff) that it expects to be installed via the OS package manager, but "Minimal
Racket does not require additional native libraries to run"
, and you can
configure things so that these are bundled with Racket instead. Also, if
you prefer, Racket can compile your scripts into stand-alone executables,
so you could just deploy the binaries if that simplifies things.


> Like, I write a program
> and hope it will keep working for the next few years without much work
> (other than bug fixing). Thus, language stability is important to
> me. Or backwards compatibility. Or at least knowing I can switch to
> alternative implementation, should I ever feel such necessity.
>

Being concerned about backwards-compatibility is very reasonable! Others
can speak more to their actual experience, but the Racket developers take
compatibility very seriously, and I've heard of people running quite old
code with the latest releases of Racket. Read through the documentation and
you will see lots of evidence for this in various APIs: for example, `#lang
scheme` still runs PLT Scheme programs from before the name change.

The Racket (PLT Scheme) project started in 1995 and has been publishing
regular releases for decades, so the possibility of abandonment seems
vanishingly small.

As far as I can see it, Racket contributes to fragmentation of Scheme
> scene (which is already a "everybody tends for oneself" kind,
> AFAICT).


Since, as noted, Racket is a different language than Scheme, this becomes
rather like saying that C++ contributes to fragmentation of C
implementations.


> There is no clear message if there is way to run in R* a code
> developed with other Schemes or vice versa and a very minimalistic
> effort to portability in a form of slib library is not going to work
> in R*, am I right?
>

The Racket Guide  points
you to how to run pure R5RS and R6RS code in Racket: did you not see this,
or was it not sufficiently clear? (Of course, writing practical programs in
pure portable RnRS Scheme is hard, but I don't think it's harder in
Racket's Scheme implementations than in others.) Racket also comes with
implementations of many SRFIs 
.



Re: [racket-users] Communicating the purpose of Racket (was: hackernews)

2018-12-29 Thread Alexis King
> On Dec 29, 2018, at 21:32, Philip McGrath  wrote:
> 
>> Respectfully, I would also concentrate on Rackets web presence.  If I was to 
>> google any of the popular languages, I would find the answer to these 
>> questions in spades, with real life applications, and examples.  You can 
>> also compare Pythons website to Rackets.   Pythons website seems to be 
>> design more for advertising Python.  If I go to the Pythons web page there 
>> is a section “use Python for” in it, it has various topics such as web 
>> development, GUI development, scientific and numeric, with all the 
>> applicable packages needed.   If you knew nothing about Python, but where 
>> interested in using it for web development, it easy to see where to go, etc. 
>>  
> 
> I would be interested to hear more about your experience with Racket's web 
> site, because it tries to include these things, but evidently it did not 
> succeed in communicating them to you. When I go to https://racket-lang.org/ 
> and scroll down about one screen's worth, I see short, runable examples of a 
> few flashy features including web development and GUI applications 
> specifically, with links to tutorials and documentation.

The previous version of the Racket website (before its redesign two years ago) 
included such things more explicitly, in a format non-Racketters (which is who 
the homepage is for, after all!) are more likely to comprehend. It included, 
among other things, a clear purpose statement for the language at the very top 
of the page, a set of small, to the point code examples that showed off various 
kinds of general-purpose programming (with explanations), and a set of links to 
further resources clearly geared towards programmers of different skill levels. 
To give you a sense for how this website used to be targeted, here’s the 
aforementioned purpose statement, in its entirety:

> Racket is a full-spectrum programming language. It goes beyond Lisp and 
> Scheme with dialects that support objects, types, laziness, and more. Racket 
> enables programmers to link components written in different dialects, and it 
> empowers programmers to create new, project-specific dialects. Racket's 
> libraries support applications from web servers and databases to GUIs and 
> charts.

The concepts enumerated in the above statement are linked to the relevant 
sections in the Guide for those interested in learning more.

The following code snippets showed Racket doing mundane but useful tasks an 
“ordinary” programmer would likely understand. They included things like simple 
scripting using the filesystem, a small web server, basic terminal I/O, 
creating a GUI window, a toy web scraper, and even sending e-mail. Towards the 
end of this carousel of snippets, some of Racket’s language-oriented 
programming features start to sneak in — there’s a small Typed Racket program, 
a document written in Scribble, and even a tiny datalog database — but these 
are clearly secondary to the main point: Racket is a full-spectrum, 
general-purpose programming language, and if you already know how to program, 
it is grounded in things familiar to you.

If you are interested in seeing the old homepage, in all its late aughts design 
glory, it is preserved with full functionality here:

https://web.archive.org/web/20161129144201/http://www.racket-lang.org:80/

The redesign of the Racket website shifted the emphasis from Racket as a 
general-purpose programming language to Racket as a language workbench. There 
is no doubt that this shift has its advantages — Racket’s support for 
language-oriented programming is one of its features that sets it apart most 
significantly from other ecosystems. Unfortunately, I don’t think we’ve gotten 
far enough to really push #lang as a killer feature to the working programmer 
yet, so I don’t think the current design does much to convey why the average 
person should care (especially since it focuses a lot on building languages 
while the old homepage focused more on using languages). I expressed some of 
these concerns, among others, when the redesign was first proposed; if you are 
interested, you can read the discussion here:

https://github.com/racket/racket-lang-org/pull/28

Now, admittedly, it’s easy to complain, but actions speak louder than words: I 
have put zero effort into making the website better, while I’m sure MB 
volunteered several days of his time. The website is open source, and perhaps 
if I truly cared, I would invest some of my own free time into suggesting (and 
implementing) concrete changes. I simply have not. I’m sure a pull request 
would be welcomed, should anyone submit one to clarify some confusion they 
bumped into. On the other hand, it obviously isn’t the responsibility of those 
outside of the Racket community to invest time into making Racket’s website 
better, especially given the effort involved, so it does not surprise me it has 
been left largely unchanged.

Alexis

-- 
You received 

Re: [racket-users] Re: hackernews

2018-12-29 Thread Philip McGrath
On Sat, Dec 29, 2018 at 10:31 AM BD1 a  wrote:

> I may be out of place here as I am a total beginner to programing.
>

I think hearing from an absolute newcomer is very useful: ignorance is a
non-renewable resource!

Respectfully, I would also concentrate on Rackets web presence.  If I was
> to google any of the popular languages, I would find the answer to these
> questions in spades, with real life applications, and examples.  You can
> also compare Pythons website to Rackets.   Pythons website seems to be
> design more for advertising Python.  If I go to the Pythons web page there
> is a section “use Python for” in it, it has various topics such as web
> development, GUI development, scientific and numeric, with all the
> applicable packages needed.   If you knew nothing about Python, but where
> interested in using it for web development, it easy to see where to go,
> etc.
>

I would be interested to hear more about your experience with Racket's web
site, because it tries to include these things, but evidently it did not
succeed in communicating them to you. When I go to https://racket-lang.org/
and scroll down about one screen's worth, I see short, runable examples of
a few flashy features including web development and GUI applications
specifically, with links to tutorials and documentation.

Are you looking for more or different material, or was it not clear to you
from the presentation on the website that these examples were what you are
looking for? I guess I can see some potential issues for discoverability:
you have to click to show any prose, even a heading (rather than just
code), and introducing the examples with "Make your dream language, or use
one of the dozens already available, including these —" may not make it
obvious what kind of examples these are, especially to non-Racketeers, and
especially since it's possible to write GUI and web programs in Racket
without using a special #lang.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] Escaping strings for the shell

2018-12-29 Thread rain1

On 2018-12-29 19:08, David Storrs wrote:
On Fri, Dec 28, 2018 at 11:34 PM Jack Rosenthal  
wrote:


On Fri, 28 Dec 2018 at 23:09 -0500, David Storrs wrote:
> I am using 'system' to offload some work onto wget and other
> applications in a few one-off scripts.  Is there an easy way to escape
> a string so it's suitable for usage in the shell?  Things like
> backwhacking all the quotes and relevant spaces and such.

Is avoiding the shell altogether an option? You could use "system*"


Not really:

Welcome to Racket v6.11.

; two argument strings
(system* "/usr/local/bin/wget" "http://google.com; "-O 
/tmp/fooflaksdjdghk")

 /tmp/fooflaksdjdghk: No such file or directory
#f

; one argument string
(system* "/usr/local/bin/wget" "http://google.com -O 
/tmp/fooflaksdjdghk")

--13:47:10--  http://google.com%20-o%20/tmp/fooflaksdjdghk
   => `fooflaksdjdghk'
Resolving google.com -o ... failed: nodename nor servname provided, or
not known.
#f

Okay, it's transforming -O into -o.  Let's try the long form:

(system* "/usr/local/bin/wget" "http://google.com; 
"--output-document=/tmp/zot")

...lots of spew...
#t

Yep, that works.  Okay, now let's try it with an actual filename,
unescaped to start.  I expect this to fail:

(system* "/usr/local/bin/wget" "http://google.com; 
"--output-document=/tmp/Sara's birthday, 9/12/01-18/181")

/tmp/Sara's birthday, 9/12/01-18/181: No such file or directory
#f

Sure enough.  Oh good, we're back to shell-style escapes where all this 
started.


You just did it wrong. SYSTEM* is actually useful in this situation.

(system* "/usr/local/bin/wget" "http://google.com; "-O" 
"/tmp/fooflaksdjdghk")


The -o needed to be a separate argv parameter.

--
You received this message because you are subscribed to the Google Groups "Racket 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] Escaping strings for the shell

2018-12-29 Thread Neil Van Dyke




(system* "/usr/local/bin/wget" "http://google.com; "-O /tmp/fooflaksdjdghk")


The process wants "-O" here to be an argument by itself.


Okay, it's transforming -O into -o.  Let's try the long form:


That happened because `wget` thought that you were still in the server 
authority host part of the URL, which in alphabetic case-insensitive, 
and it's normalizing the case. :)



Yep, that works.  Okay, now let's try it with an actual filename,


Yes, that's a good way to do it.  Or one argument for "-O" and another 
for the filename.




/tmp/Sara's birthday, 9/12/01-18/181: No such file or directory


The "/" in the filename is a separate problem, which actually has 
nothing to do with shell special character command line 
escaping/quoting.  If you're on a Unix derivative OS, it normally 
expects "/" to be a directory separator in a file pathname (although 
maybe your OS does something different), so it thinks you're talking 
about a file under the "181" directory, which doesn't exist.  So this 
error is due to something that is happening within or under the `wget` 
process (which is very much a Unix tool), either in its own code, in 
filesystem routines it uses, or in the OS services it's calling.  
Probably you don't want to put "/" in filenames, because, even if your 
current OS supports it, most filesystems and cloud storage interfaces 
will not.


--
You received this message because you are subscribed to the Google Groups "Racket 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] Escaping strings for the shell

2018-12-29 Thread David Storrs
On Fri, Dec 28, 2018 at 11:34 PM Jack Rosenthal  wrote:
>
> On Fri, 28 Dec 2018 at 23:09 -0500, David Storrs wrote:
> > I am using 'system' to offload some work onto wget and other
> > applications in a few one-off scripts.  Is there an easy way to escape
> > a string so it's suitable for usage in the shell?  Things like
> > backwhacking all the quotes and relevant spaces and such.
>
> Is avoiding the shell altogether an option? You could use "system*"

Not really:

Welcome to Racket v6.11.

; two argument strings
> (system* "/usr/local/bin/wget" "http://google.com; "-O /tmp/fooflaksdjdghk")
 /tmp/fooflaksdjdghk: No such file or directory
#f

; one argument string
> (system* "/usr/local/bin/wget" "http://google.com -O /tmp/fooflaksdjdghk")
--13:47:10--  http://google.com%20-o%20/tmp/fooflaksdjdghk
   => `fooflaksdjdghk'
Resolving google.com -o ... failed: nodename nor servname provided, or
not known.
#f

Okay, it's transforming -O into -o.  Let's try the long form:

> (system* "/usr/local/bin/wget" "http://google.com; 
> "--output-document=/tmp/zot")
...lots of spew...
#t

Yep, that works.  Okay, now let's try it with an actual filename,
unescaped to start.  I expect this to fail:

> (system* "/usr/local/bin/wget" "http://google.com; 
> "--output-document=/tmp/Sara's birthday, 9/12/01-18/181")
/tmp/Sara's birthday, 9/12/01-18/181: No such file or directory
#f

Sure enough.  Oh good, we're back to shell-style escapes where all this started.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] hackernews

2018-12-29 Thread Jens Axel Søgaard
Den lør. 29. dec. 2018 kl. 19.48 skrev Tomasz Rola :

> and last but not least,
>
> http://scheme.dk/planet/
> http://planet.lisp.org/
>
>
Apropos - if you want your blog on Planet Scheme, send me a mail.

/Jens Axel

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] hackernews

2018-12-29 Thread Tomasz Rola
On Wed, Dec 26, 2018 at 09:51:17AM -0500, Neil Van Dyke wrote:
> Stephen De Gabrielle wrote on 12/26/18 7:40 AM:
> >How did other languages grow their audience? e.g. Ruby-on-Rails,
> >Perl, Python, PHP, C++, Rust ?
> 
> All of those had merits, were right place and at right time, and
> (except Rust) really spread when there was *a lot* less noise and
> sheer mass of stuff.  Also, some of those had very long ramps to
> their ultimate popularity (which could give some hope to
> Racketeers).
[...]
> Why I suggested focusing outreach on Hacker News (and maybe I've
> talked about it more recently on "racket-money" than "racket-users")

What follows are just my thoughts, not a critique of Racket (I am
unwilling to criticize without suggesting how to improve things and it
always irritates me when someone just says "you wrong" and never
explains, so I am not saying "you wrong", ok?). More like, summary of
my position with regard to R* and some loose thoughts about improving
its adoption. Very subjective. And, being short on time, as usually, I
may write here about something already mentioned in this thread, so if
yes sorry for that.

I guess the kind of people on HN (and https://lobste.rs/ , another
place I regurarly attend) take their time and do a research by
themselves. Evangelism would do nothing to them (judging by myself, at
least), but interesting story tagged as "Show", a project using
Racket, that is another thing. But it is "the story, a project, what
is it" first, and only then "written in Racket".

Another places I frequent are various types of aggegators under the
name "Planet":

http://planet.emacsen.org/
http://www.planeterlang.com/
http://planet.haskell.org/
http://ocaml.org/community/planet/

and last but not least,

http://scheme.dk/planet/
http://planet.lisp.org/

Where does Racket belong? I understand Racket community no longer
considers themselves as part of Scheme landscape, but I am unable to
say where I get this impression from. If I am wrong, then the first
thing for anybody willing to contribute to R* success would be to make
their blog being displayed on Scheme Planet (IMHO). If I am right (R*
not Scheme), then this is a pity. I will cope just fine, but consider
the fate of Lush, a very interesting Lisp dialect. A very capable, if
I can judge without really trying it. And their latest-latest news is
from 2009:

http://lush.sourceforge.net/

Right now I am willing to write some scripts, with intention to run
them both on Linux and OpenBSD. A kind of stuff that is normally
written in Perl. But to be frank, two months ago I tried again writing
some smaller utility in Perl and ended up writing said util in gawk. I
know I am not stupid, but I have to avoid Perl. So the plan is to
write those utils in Gauche, because it seems to have what I need and
can take R5RS (for a while).

This means I will have to have source at my hand, just install *BSD,
compile Gauche, install my scripts, ready to go, before any network is
up I mean.

Does Racket match such a use case? I can compile it from sources
(actually, living on a very dated Debian I have no other way to stay
current, so I not only can but actually do) but I wonder if it will
compile in a very limited, rugged environment - no network connection,
just what was there in base install (with C compiler, of course). I
might try one day, but it seems Gauche has less dependency on outside
packages than R*.

See, while I appreciate Racket a lot there is no actual case where I
myself would want to rely on it (also, Lush). Like, I write a program
and hope it will keep working for the next few years without much work
(other than bug fixing). Thus, language stability is important to
me. Or backwards compatibility. Or at least knowing I can switch to
alternative implementation, should I ever feel such necessity.

As far as I can see it, Racket contributes to fragmentation of Scheme
scene (which is already a "everybody tends for oneself" kind,
AFAICT). There is no clear message if there is way to run in R* a code
developed with other Schemes or vice versa and a very minimalistic
effort to portability in a form of slib library is not going to work
in R*, am I right?

Common Lispers have a dated language (and boy sometimes it shows) but
at least they work together (or make good impression). And look at
their planet (mentioned above). I would be happy to write my utils in
CLISP - nice, small, conforming CL, but there is a small complication
in form of requiring certain library in just exact version matching
the exact version of CLISP and this certainly can be mitigated but I
have not so much time to tinker with other people's code. And another
"small problem" was that last time I tried writing such system util in
CL, certain file names were "transparent" for CL (because they looked
like regular expression) and I could not find way to open them (hint
from the web did not work, time ran out). So I will tinker with Scheme
and see how I fare. Yes it is time 

Re: [racket-users] typed racket backend/ir & gpu computing

2018-12-29 Thread Neil Van Dyke
Thank you, Sam and Matthias.  I'll have to come back to that project 
later, but this all looks useful.


--
You received this message because you are subscribed to the Google Groups "Racket 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Re: hackernews

2018-12-29 Thread BD1 a


I may be out of place here as I am a total beginner to programing.  In a 
matter of fact, I just pick up HTDP from Amazon to teach myself 
programing.   Respectfully, IMHO if you want to increase the popularity of 
Racket.  You can’t just place racket as another me too language like 
python, etc.  You must show, what problems does Racket solve or make 
exponentially easier that makes the risk of spending the time to learn, 
apply and deploy a racket based software solution to solve real life 
problems worth it.   A good example of what I mean is Yaron Minsky 
presentation about why Jane Street uses OCaml.  Even someone like me, who 
can’t even program an excel spreadsheet and who has never used a computer 
for more than social media can understand clearly the reasoning behind 
Minsky choice of OCaml.  Minsky clearly explains the problems that OCaml 
solves or makes exponentially easier and uses real life examples in his 
presentation.  In short, he answers the WHY!


Why should someone choose Racket to learn programing as opposed to another 
language such as Python?  


What problems do organizations, small business, and start up face that 
would make the risk of choosing Racket worth it?


What issues are prevalent in the software industry, that using Racket 
alleviates as compared to another language?  


Where are the real world examples of Racket being used to solve problems?


What is a programable programing language and how does it make my life 
easier as compared to other languages?  


What is language oriented programming?


If the racket community has already answered these questions, where would a 
person go to find out such things?

Etc, Etc, Etc


Respectfully, I would also concentrate on Rackets web presence.  If I was 
to google any of the popular languages, I would find the answer to these 
questions in spades, with real life applications, and examples.  You can 
also compare Pythons website to Rackets.   Pythons website seems to be 
design more for advertising Python.  If I go to the Pythons web page there 
is a section “use Python for” in it, it has various topics such as web 
development, GUI development, scientific and numeric, with all the 
applicable packages needed.   If you knew nothing about Python, but where 
interested in using it for web development, it easy to see where to go, 
etc.   Conversely if I was to google Racket, the answers are not as clear.  
If you go to the Rackets web page, it not clear what I can use Racket for.  
I would have to dig  deeper into Rackets websites to see if Racket would be 
a suitable solution to the problem I am trying to solve.  Respectfully 
Rackets website, while nice, seems to place Racket more towards 
educational/ toy language purposes, while Pythons website seems to place 
Python more towards industrial real world uses.   

 

I am just a beginner, and I have nothing but a superficial knowledge of 
Racket, computing, or the software industry.  My intention is not to attack 
or belittle the hard work put into racket by members, so I hope I don’t 
come off that way.  As a beginner, I just wanted to share my perspective in 
the difficulty in  choosing Racket as my first language to learn add my 2 
cents to the conversation.

 

On Thursday, December 13, 2018 at 6:53:41 PM UTC-5, Neil Van Dyke wrote:
>
> This might be a bad idea, and normally I disapprove of this sort of 
> thing, but... does anyone want to take on the job of RACKET EVANGELISM 
> STRIKE FORCE, among a concentration of startup-types and other software 
> practitioners? 
>
> Specifically, you'd participate regularly in Y Combinator's popular 
> "Hacker News" Web forum, "https://news.ycombinator.com/;, and, when the 
> not-unusual occasion to mention/show a strength of Racket presents 
> itself, do so. 
>
> I occasionally see Racket mentioned on HN, but not nearly as often as it 
> legitimately could be. 
>
> (There are also other strategic targets for the RACKET EVANGELISM STRIKE 
> FORCE operator or cell, and I recall Eli Barzilay and others active on a 
> lot of them years ago, but HN might be first priority right now.) 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.