n find the source at
https://github.com/henrik42/extended-lisp-reader/blob/master/src/extended_lisp_reader/stream_parser.clj
In
https://github.com/henrik42/extended-lisp-reader/blob/master/src/extended_lisp_reader/instaparse_adapter.clj
you find (parser-for) that builds an instaparse parser that pa
to Clojure target form is missing in the examples).
If you're interested have a look at
https://github.com/henrik42/extended-lisp-reader
What do you think?
Henrik
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this g
*LOL* Can anybody change the title to "embeded language forms"? :-)
--
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 y
Not anybody? I'm a little puzzled: is this feature so useless? I thought
embedding stuff like CSV data in Clojure code "as is" could be a nice
feature.
https://github.com/henrik42/extended-lisp-reader#parsing-csv
No need to rewrite it in Clojure syntax/string literals or other
@Luc: I see your points. Thanks for the reply.
Just to make it clear: all I suggest is to integrate
https://github.com/henrik42/extended-lisp-reader/blob/master/src/extended_lisp_reader/core.clj
into clojure.core - i.e. make #[...]-forms and the delegation to user code
"official".
T
Thanks. But I'm looking for something that may
(a) clojure.walk a clojure data structure
(b) let me use clojure.match rules to say what I'm interested in (like
xpath does) and
(c) use zippers to 'mutate'.
- Henrik
--
You received this message because you are subscribed to the Google
Groups "Cloj
Hi,
I'd like to ship my app *incl. documentation* as an uberjar to end-users
and give them access to the docs via HTTP.
I plan to use codox/marginalia/markdown-clj to produce the HTML in lein
build and then build the uberjar incl. the generated HTML.
The app will have a CLI but as a plus I'd li
Hi,
I'd like to use Markdown in the description of my Leiningen project.clj:
(defproject foo "0.1.0-SNAPSHOT"
:description "*foo* is my project"
:plugins [[codox "0.8.11"]]
:codox {:defaults {:doc/format :markdown}}
[...])
But its not working. Markdown in function descriptions is working
Hi Alex,
I did some experimenting with Clojure and RMI and tried some things with
classloading.
The READE at https://github.com/henrik42/rmi-examples is long-ish - sorry.
At the end I used
(defmacro compile-with-cl [body]
(.addURL @Compiler/LOADER (java.net.URL.
"http://127.0.0.1:8080/
Hi,
I hacked a small example.
https://github.com/henrik42/stuff/blob/master/require-example/java/RequireExample.java
Testes with 1.5.1.
- Henrik
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email
Hi all,
I have a function
*(defn foo [a b & {:keys [c d] :or {c "C" d "D"}
:as opt-args}] [a b opt-args])*
I want to let users call *(foo 1 2 :e "E")* and get *[1 2 {:e "E", :c "C",
:d "D"}]*. But *:or* only affects the binding of *c* and *d* - not
*opt
Hi Adan,
not sure if it helps, but defining Spring beans that call Clojure code is
straight forward:
You can find more examples at https://github.com/henrik42/spring-break
I've played around with the Spring scpting API but as far as I can tell it
won&
7;re interested
have a look at https://github.com/henrik42/spring-break I'm still writing
on it. Feedback is very much appreciated.
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroup
Hi folks,
I added code that lets you call your clojure functions via JMX operations.
https://github.com/henrik42/spring-break#jmxmbeans
Cheers Henrik
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email
Hello again,
just in case anybody is following this - I added stuff that lets you
publish your mutable references (atom, ref, var) as JMX attributes so that
you may use jconsole to change things at runtime.
https://github.com/henrik42/spring-break#changing-mutable-state-references-via-jmx
Hi all,
I want to parse a stream of text which comes from a java.io.Reader with
https://github.com/Engelberg/instaparse.
But the stream of text will only start with what can be parsed by my
grammar. The rest of the text stream must be
consumed/parsed with some other grammar. I know of instpars
Hi,
I'm using an nREPL server as an sshd replacement for Windows. I'm doing
things like unzip files, copy files, calling shell (bat/cmd/git bash)
scripts local to the nREPL process. The scripts write to stdout/stderr.
Some of the scripts produce **A LOT** of output so I'm not using
clojure.jav
I did the opposite - build Spring beans with clojure -
https://github.com/henrik42/spring-break#defining-clojure-based-spring-beans
HTH Henrik
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email
Hi,
I'm doing a little write-up on Java basics and comparing some of them
to Clojure (things like mutable shared state, side effects and so
on). When I came to "numbers" I was surprised by some of the things I
found in Clojure.
(== (double 0.5) (float 0.5)) ;; -> true
(== (double 0.2) (fl
gt; More:
> http://steve.hollasch.net/cgindex/coding/ieeefloat.html
>
> https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/
>
Thanks for your reply. Yes, I know. Here
https://github.com/henrik42/java-quiz#numberquiz I wrote down some of the
"inter
Hi,
I'm calling some functions a,b and c via ring/compojure. I would like to be
able to switch to "remote invocation of a, b and c via nREPL" without
changing my ring/compojure routes. I know I can just code that into a, b
and c,(not good, not-dry) but I was wondering if there is a lib that
sup
Hi,
I ended up using https://github.com/technomancy/robert-hooke -- like this:
,,,(:require [clojure.tools.nrepl :refer :all])
(defn remote-eval [conn code]
(let [{:keys [value err]} (-> (client conn 1000)
(message {:op :eval
ne that loads my code
base. After that Clojure finds clojure/core.clj without problems.
Any ideas on how to do without this hack?
Henrik
[1] https://github.com/henrik42/buttle/
[2]
https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/RT.java#L2174
[3]
https://github.com/henrik
Rastko - thanks for the reply. My
/modules/buttle/main/module.xml looks like this:
And the driver in standalone.xml:
The loading of my classes incl. clojure.lang.RT works "in
principle". Only when Clojure
Hello,
I just did my very first release to clojars.
https://github.com/henrik42/buttle
*Buttle* is a proxying JDBC driver with hooks. It can be used like any
other JDBC driver and lets you do testing, debugging, monitoring etc.
Hope someone finds this usefull.
Sincerely,
Henrik
--
You
Hi,
I have an uberjar that I want to deploy to clojars. Part of
building the uberjar is building the "standard" lib-jar of the
same project.
Now I'd like to release/deploy both with the same group/artefactid to
clojars. The uberjar should get the :classifier "app".
So after that people could lei
@Francis Great that works. Thank's!
The deploy task expects a repo argument in this case though. So I came up
with this:
https://github.com/henrik42/buttle/blob/1.0.0/plugin/leiningen/deploy_driver.clj
With this I can use this in project.clj
https://github.com/henrik42/buttle/blob/m
I'd like to do a `lein with-profile +local-repo release` and
`lein with-profile +clojars release`. This way I want to control
which repo the deploy goes to.
I tried but it didn't work. Here you find my attempt:
https://github.com/henrik42/buttle/blob/master/project.clj#L92
Look
a) in Java, so that IDE autocompletion, generics etc. work as excepted.
HTH
Henrik
[1] https://github.com/henrik42/spring-break
Example:
Am Montag, 10. Juni 2019 17:34:25 UTC+2 schrieb eglue:
>
> > I find the glue code is actually small in practice (I've done a couple
>
I hacked just that a few days ago to support Java development at work:
https://github.com/henrik42/deeto Not released yet but could be a starter
in that direction.
Henrik
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this g
(via reflection) the interface class and then give you a
factory for it.
Deeto returns Java dynamic proxys which implements `Cloneable` and
`Serializable`. The proxy has sane `equals`, `hashCode` and `clone`
implemetations.
It's available now on Clojars.
Henrik
[1] https://github.com/henrik42/deeto/
Yes! I agree. This is for people how want/must stay with Java for reasons.
There are people in the Clojure community who work on
Java-Clojure-integration and this is one of man ways to go. I just hope it
is useful for someone. It could even be a door opener for Clojure and more
people (like you
I like using tree-seq and core.match when working on instaparse ASTs - like
this:
(require ['clojure.core.match :as 'm])
(def s
[{"n" {"id" "a"} "d" 2 "children" [{"n" {"id" "c"} "d" 4 "children"
nil}]} {"n" {"id" "b"} "d" 3 "children" nil}])
;; top-down-traversal
(defn nodes [x]
(tree-seq
OK, so in this special case you one would just use
(def s
[{"n" {"id" "a"} "d" 2 "children" [{"n" {"id" "c"} "d" 4 "children"
nil}]} {"n" {"id" "b"} "d" 3 "children" nil}])
(some
(fn [x]
(and (map? x)
(some
#{{"id" "c"}}
(vals x
(tree-seq coll? seq s))
--
34 matches
Mail list logo