Re: [racket-users] Racket Shell

2016-08-21 Thread William G Hatch

I've looked over the scsh docs at various times, though I've never
actually used it -- it's never been pre-packaged for distros I've used,
and every time I've tried to build it I've run into errors.  Perhaps I
should try again.  As far as  the process syntax goes, a little bit of
macros over my pipeline library should be able to get you something
pretty close.  I'll probably do that later.

The parts of scsh aside from the process forms, like the regex stuff, I
think are mostly orthogonal to the process stuff, so that could probably
just be a different library, then they could be used together.


I just ran across this little thing:

https://asciinema.org/a/0utgivr7glk3ssn01fn5uwtey


A lot of that does look pretty good.  I think he's probably right that
the |> piped output should be the last argument (I've had my `shellify`
wrapper making it the first).


I’d love to use a Racket shell and script Unix in a ‘natural’ way.


Not just Unix -- it works on Windows too ;)

So is scsh what you consider natural?

I definitely want a nice s-expression syntax for it, but also a
convenient line-based syntax for interactive use.  I like the idea that
you can more or less turn a transcript of such commands into a script --
one of the reasons I always encourage people to get used to using a
shell is that it makes you think a lot more about automating tasks when
you type the same command sequence often.  It's something you just can't
do with GUI interfaces, and automating boring stuff is one of the joys
of programming.  Having a nice upgrade path (just gradually put more of
it in regular racket until it turns into a "real" program) for those
scripts that seem to grow over time is also really appealing to me.

Thanks for the feedback.

William

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

2016-08-21 Thread Matthias Felleisen

I just ran across this little thing: 

 https://asciinema.org/a/0utgivr7glk3ssn01fn5uwtey 

People who want more shell ought to watch. It’s 2mins and cute  — Matthias



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

2016-08-21 Thread Matthias Felleisen

William & Norman, 

as much as I give credit to scsh, I just think that taking clues from scsh is 
enough. One could expand surface syntax into William’s pipe library for 
example. 

The irony is of course that scsh’s start-up time was so bad back then, that we 
couldn’t use it for anything real. 

— Matthias






> On Aug 21, 2016, at 4:46 PM, Norman Gray  wrote:
> 
> 
> William, hello.
> 
> On 20 Aug 2016, at 23:23, Matthias Felleisen wrote:
> 
>> You may wish to read up on scsh. While it was way ahead of its
>> time, Olin Shivers made the syntax as natural as possible so it
>> would be quickly useful to people used to basic shell scripting
>> syntax. After all, this syntax has a 40+ history and shouldn’t be
>> thrown out.
> 
> What Matthias said...
> 
> I think that Olin Shivers made a lot of excellent syntactical decisions when 
> designing scsh -- in particular his syntax for regular expressions and for 
> extended process forms -- to the extent that if one were simply to 
> reimplement the scsh syntax in Racket, that would be an excellent departure 
> point.  This is not to dispute your own syntactical choices, but in an 
> enterprise like this, scsh would be the elephant in the room.
> 
> There have been a couple of attempts to support the scsh syntax in Racket, 
> and the scsh code is still under active, though rather low-level, maintenance 
> .  Incidentally, scsh does start up very 
> quickly, which is an attractive feature.
> 
> And this enthusiasm isn't just because scsh was the first Scheme 
> implementation I spent serious time with (*wipes wistful tear*).
> 
> Best wishes,
> 
> Norman
> 
> 
> -- 
> Norman Gray  :  https://nxg.me.uk
> SUPA School of Physics and Astronomy, University of Glasgow, UK

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

2016-08-21 Thread Norman Gray


William, hello.

On 20 Aug 2016, at 23:23, Matthias Felleisen wrote:


You may wish to read up on scsh. While it was way ahead of its
time, Olin Shivers made the syntax as natural as possible so it
would be quickly useful to people used to basic shell scripting
syntax. After all, this syntax has a 40+ history and shouldn’t be
thrown out.


What Matthias said...

I think that Olin Shivers made a lot of excellent syntactical decisions 
when designing scsh -- in particular his syntax for regular expressions 
and for extended process forms -- to the extent that if one were simply 
to reimplement the scsh syntax in Racket, that would be an excellent 
departure point.  This is not to dispute your own syntactical choices, 
but in an enterprise like this, scsh would be the elephant in the room.


There have been a couple of attempts to support the scsh syntax in 
Racket, and the scsh code is still under active, though rather 
low-level, maintenance .  Incidentally, 
scsh does start up very quickly, which is an attractive feature.


And this enthusiasm isn't just because scsh was the first Scheme 
implementation I spent serious time with (*wipes wistful tear*).


Best wishes,

Norman


--
Norman Gray  :  https://nxg.me.uk
SUPA School of Physics and Astronomy, University of Glasgow, UK

--
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] Racket -script running other Racket scripts

2016-08-21 Thread Ben Greenman
I would use `system*` or `process*` with `(find-exe)` [1] as the first
argument.

You might also like `find-console-bin-dir` [2].

[1]
http://docs.racket-lang.org/raco/exe.html#%28def._%28%28lib._compiler%2Ffind-exe..rkt%29._find-exe%29%29
[2]
http://docs.racket-lang.org/raco/dirs.html#%28def._%28%28lib._setup%2Fdirs..rkt%29._find-console-bin-dir%29%29

On Sun, Aug 21, 2016 at 6:00 AM, Pekka Niiranen 
wrote:

> Hello users,
>
> I am trying to eradicate *.bat files running Racket scripts.
>
> What is the idiom to make Racket script to start itself recursively
> (system, process, subprocess) when main script is started from shell
> and all outputs are printed to console?
>
> "racket mscript.rkt args" => (system *.bat) => "racket *.rkt args"
>
> -pekka-
>
> --
> 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.
>

-- 
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] Racket -script running other Racket scripts

2016-08-21 Thread Pekka Niiranen

Hello users,

I am trying to eradicate *.bat files running Racket scripts.

What is the idiom to make Racket script to start itself recursively
(system, process, subprocess) when main script is started from shell
and all outputs are printed to console?

"racket mscript.rkt args" => (system *.bat) => "racket *.rkt args"

-pekka-

--
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] Sending a file via HTML request.

2016-08-21 Thread Normal Loone
Hallo,

I am trying to write a small web-based program in racket. The main task of it 
should be to send a specific file to a server. 

How do I best send it? Through a HTML request or on another way?

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