Re: Pipe shell output into REPL?

2018-09-05 Thread Andy Fingerhut
Others with better imagination or Unix-like system hackery skills than
myself may respond with a way, but my first inclination is 'no'.  In
particular, normally what you type at the REPL is being read from standard
in.

Perhaps if you had a way of changing the Clojure REPL function executed
when you type the command 'lein repl' read from a different Unix file
descriptor than 0 (the one for stdin), _and_ you found some way for the
terminal/console/whatever to have keystrokes you type go to that file
descriptor rather than 0, that would do it.  That second part sounds like
the trickiest bit to me.

Have you look at named pipes?  By creating one of those, and cat'ing the
file you want into that named pipe, you could start a REPL in the usual
way, type commands into it, and when you were ready, open the named pipe
and read from it.

Andy

On Wed, Sep 5, 2018 at 6:56 PM Didier  wrote:

> Hi all,
>
> I was wondering if there is an easy way I can pipe my shell output into a
> REPL. Something like:
>
> cat /tmp/remus-lighthouse-apis-info.ion | lein repl
>
> When I try this, it starts a REPL, and then each line gets sent one by one
> to the REPL and ran.
>
> I'd like it so that I'm at the REPL, and standard in is ready to be read
> by me, from the REPL, so I can manipulate the input being piped how I see
> fit within the repl session.
>
> Is there anyway to do this?
>
> --
> 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.


Pipe shell output into REPL?

2018-09-05 Thread Didier
Hi all,

I was wondering if there is an easy way I can pipe my shell output into a 
REPL. Something like:

cat /tmp/remus-lighthouse-apis-info.ion | lein repl

When I try this, it starts a REPL, and then each line gets sent one by one 
to the REPL and ran.

I'd like it so that I'm at the REPL, and standard in is ready to be read by 
me, from the REPL, so I can manipulate the input being piped how I see fit 
within the repl session.

Is there anyway to do this?

-- 
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: [ANN] spec.alpha 0.2.176 and core.specs.alpha 0.2.44

2018-09-05 Thread Alex Miller
s/not/now/ :)

On Wednesday, September 5, 2018 at 8:24:02 AM UTC-4, Alex Miller wrote:
>
> New releases of spec.alpha and core.specs.alpha are not available. These 
> releases make several changes to spec error printing and to the definition 
> of the existing clojure.core macro specs to improve readability and error 
> reporting. Some additional changes are coming in 1.10.0-alpha7, but these 
> libraries can be used now with Clojure 1.9.0.
>
> deps.edn:
>
>   org.clojure/spec.alpha {:mvn "0.2.176"}
>   org.clojure/core.specs.alpha {:mvn "0.2.44"}
>
>
> spec.alpha 0.2.176
>
>- CLJ-2373  Don't print 
>ex-info into spec errors
>- CLJ-2391  Change spec 
>problem line print order
>- CLJ-2392  Stop 
>prepending :args to spec problem paths
>- CLJ-2393  Sort on 
>descending "in" length before "at" length
>
>
> core.specs.alpha 0.2.44
>
>- CLJ-2395  improve path 
>names and predicate names in core specs
>
>
>
>
>

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


[ANN] Clojure 1.10.0-alpha7

2018-09-05 Thread Stuart Halloway
deps.edn dependency:

  org.clojure/clojure {:mvn/version "1.10.0-alpha7"}

1.10.0-alpha7 includes the following changes since 1.10.0-alpha6:

   - Update deps to latest spec.alpha (0.2.176) and core.specs.alpha
   (0.2.44)
   - CLJ-2373  - categorize
   and overhaul printing of exception messages at REPL
   - CLJ-1279  - report
   correct arity count for function arity errors inside macros
   - CLJ-2386  - omit ex-info
   construction stack frames
   - CLJ-2394  - warn in pst
   that stack trace for syntax error failed before execution
   - CLJ-2396  - omit :in
   clauses when printing spec function errors if using default explain printer

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


[ANN] spec.alpha 0.2.176 and core.specs.alpha 0.2.44

2018-09-05 Thread Alex Miller
New releases of spec.alpha and core.specs.alpha are not available. These 
releases make several changes to spec error printing and to the definition 
of the existing clojure.core macro specs to improve readability and error 
reporting. Some additional changes are coming in 1.10.0-alpha7, but these 
libraries can be used now with Clojure 1.9.0.

deps.edn:

  org.clojure/spec.alpha {:mvn "0.2.176"}
  org.clojure/core.specs.alpha {:mvn "0.2.44"}


spec.alpha 0.2.176
   
   - CLJ-2373  Don't print 
   ex-info into spec errors
   - CLJ-2391  Change spec 
   problem line print order
   - CLJ-2392  Stop 
   prepending :args to spec problem paths
   - CLJ-2393  Sort on 
   descending "in" length before "at" length


core.specs.alpha 0.2.44
   
   - CLJ-2395  improve path 
   names and predicate names in core specs




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