tlc Expect like library?

2018-02-13 Thread Stephen Feyrer
Hi,

I would like to ask, is there a Clojure version of the tlc expect library
or an equivalent?

Something to launch and control other applications.  Specifically I want to
control text based terminal application.  Emulating the screen, moving the
cursor around and firing character codes at it?

Thanks.


Stephen Feyrer.

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: tlc Expect like library?

2018-02-13 Thread Justin Smith
I've long thought implementing something like TCL expect in Clojure would
be a fun project, as far as I know it hasn't been tried (though the google
results are drowned out by the Expectations testing library so who
knows...).

If I were doing this from scratch I'd start with the Process and
ProcessBuilder APIs, or use node child_process API with cljs. core.match
might be useful for program interaction dispatch.

On Tue, Feb 13, 2018 at 4:42 AM Stephen Feyrer 
wrote:

> Hi,
>
> I would like to ask, is there a Clojure version of the tlc expect library
> or an equivalent?
>
> Something to launch and control other applications.  Specifically I want
> to control text based terminal application.  Emulating the screen, moving
> the cursor around and firing character codes at it?
>
> Thanks.
>
>
> Stephen Feyrer.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+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 "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


create vector from other vector and indices

2018-02-13 Thread Andre Bieler
Just started with clojure.
Lets say I have two vectors, v containing values and another vector idx 
that contains the indices by which vector v should be ordered (rather a new 
vector be created, ordered given by idx.

(def v [10, 11, 12, 13])
(def idx [1 3 0 2])

; goal is a new vector with values [11 13 10 12]



I tried combinations of map / apply / nth / get but could not get anything 
working.
Thanks!

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: create vector from other vector and indices

2018-02-13 Thread Tomasz Sulej
(map #(v %) idx)

or

(map (partial get v) idx))

On 13 February 2018 at 20:10, Andre Bieler  wrote:

> Just started with clojure.
> Lets say I have two vectors, v containing values and another vector idx
> that contains the indices by which vector v should be ordered (rather a new
> vector be created, ordered given by idx.
>
> (def v [10, 11, 12, 13])
> (def idx [1 3 0 2])
>
> ; goal is a new vector with values [11 13 10 12]
>
>
>
> I tried combinations of map / apply / nth / get but could not get anything
> working.
> Thanks!
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+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 "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: create vector from other vector and indices

2018-02-13 Thread Tomasz Sulej
Or even simpler: (map v idx)

On 13 February 2018 at 20:48, Tomasz Sulej  wrote:

> (map #(v %) idx)
>
> or
>
> (map (partial get v) idx))
>
> On 13 February 2018 at 20:10, Andre Bieler 
> wrote:
>
>> Just started with clojure.
>> Lets say I have two vectors, v containing values and another vector idx
>> that contains the indices by which vector v should be ordered (rather a new
>> vector be created, ordered given by idx.
>>
>> (def v [10, 11, 12, 13])
>> (def idx [1 3 0 2])
>>
>> ; goal is a new vector with values [11 13 10 12]
>>
>>
>>
>> I tried combinations of map / apply / nth / get but could not get
>> anything working.
>> Thanks!
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> To post to this group, send email to clojure@googlegroups.com
>> Note that posts from new members are moderated - please be patient with
>> your first post.
>> To unsubscribe from this group, send email to
>> clojure+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "Clojure" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to clojure+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 "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: tlc Expect like library?

2018-02-13 Thread Stephen Feyrer
Hi Justin,

That looks really cool.  I'll take some time reading about it and see if I
can do anything.

Thank you.


--
Kind regards,

Stephen.

On 13 February 2018 at 18:26, Justin Smith  wrote:

> I've long thought implementing something like TCL expect in Clojure would
> be a fun project, as far as I know it hasn't been tried (though the google
> results are drowned out by the Expectations testing library so who
> knows...).
>
> If I were doing this from scratch I'd start with the Process and
> ProcessBuilder APIs, or use node child_process API with cljs. core.match
> might be useful for program interaction dispatch.
>
> On Tue, Feb 13, 2018 at 4:42 AM Stephen Feyrer 
> wrote:
>
>> Hi,
>>
>> I would like to ask, is there a Clojure version of the tlc expect library
>> or an equivalent?
>>
>> Something to launch and control other applications.  Specifically I want
>> to control text based terminal application.  Emulating the screen, moving
>> the cursor around and firing character codes at it?
>>
>> Thanks.
>>
>>
>> Stephen Feyrer.
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> To post to this group, send email to clojure@googlegroups.com
>> Note that posts from new members are moderated - please be patient with
>> your first post.
>> To unsubscribe from this group, send email to
>> clojure+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "Clojure" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to clojure+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 "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+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 "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: tlc Expect like library?

2018-02-13 Thread Andy Fingerhut
Google searches for the terms: java tcl expect

turn up a few things that appear to be integrations of existing Tcl/Expect
into the JVM via native interfaces like JNI.  There might also be a "native
Java" version available that way.

The up side of wrapping an existing implementation is that it would be more
familiar to Tcl/Expect users, and all of the docs and support that exist
for that.  The down side is: if you don't want to learn Tcl/Expect, but
want features like that, then coming up with a new way of specifying the
kinds of behaviors one wants is much easier by starting fresh.  (Easier to
create something different, at least -- clean APIs are difficult to design).

Andy

On Tue, Feb 13, 2018 at 1:34 PM, Stephen Feyrer 
wrote:

> Hi Justin,
>
> That looks really cool.  I'll take some time reading about it and see if I
> can do anything.
>
> Thank you.
>
>
> --
> Kind regards,
>
> Stephen.
>
> On 13 February 2018 at 18:26, Justin Smith  wrote:
>
>> I've long thought implementing something like TCL expect in Clojure would
>> be a fun project, as far as I know it hasn't been tried (though the google
>> results are drowned out by the Expectations testing library so who
>> knows...).
>>
>> If I were doing this from scratch I'd start with the Process and
>> ProcessBuilder APIs, or use node child_process API with cljs. core.match
>> might be useful for program interaction dispatch.
>>
>> On Tue, Feb 13, 2018 at 4:42 AM Stephen Feyrer 
>> wrote:
>>
>>> Hi,
>>>
>>> I would like to ask, is there a Clojure version of the tlc expect
>>> library or an equivalent?
>>>
>>> Something to launch and control other applications.  Specifically I want
>>> to control text based terminal application.  Emulating the screen, moving
>>> the cursor around and firing character codes at it?
>>>
>>> Thanks.
>>>
>>>
>>> Stephen Feyrer.
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Clojure" group.
>>> To post to this group, send email to clojure@googlegroups.com
>>> Note that posts from new members are moderated - please be patient with
>>> your first post.
>>> To unsubscribe from this group, send email to
>>> clojure+unsubscr...@googlegroups.com
>>> For more options, visit this group at
>>> http://groups.google.com/group/clojure?hl=en
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "Clojure" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to clojure+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 "Clojure" group.
>> To post to this group, send email to clojure@googlegroups.com
>> Note that posts from new members are moderated - please be patient with
>> your first post.
>> To unsubscribe from this group, send email to
>> clojure+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "Clojure" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to clojure+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 "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+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 "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Help API

2018-02-13 Thread Mortimer Cladwell
JavaHelp will work.  Details here 


On Wednesday, December 27, 2017 at 8:17:09 AM UTC-5, Mortimer Cladwell 
wrote:
>
>  I am looking for a help api for my clojure application, something that 
> will pop up when the user selects "Help" from the main menu bar.  Something 
> supporting context sensitive help would be desirable.  Something like 
> javahelp, but I don't see clojure support for javahelp, other than calling 
> the java methods directly.  Any suggestions?
> Thanks
> Mortimer
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: create vector from other vector and indices

2018-02-13 Thread Matching Socks
user> (def v [:a :b :c :d])
#'user/v
user> (mapv v [3 1 2 0])
[:d :b :c :a]



-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.