quoting vs syntax quoting

2020-03-02 Thread Sonny To
(defmacro moo1 [] '(defn foo [])) (defmacro moo2 [] `(defn foo [])) stigmergy.wocket.server> (moo1)

Re: JNA stdout and the REPL

2020-02-14 Thread Sonny To
.C/INSTANCE "hello "(into-array [])) does not show anything On Friday, February 14, 2020 at 6:30:51 PM UTC+8, Sonny To wrote: > > I am using JNA to call native C code. calling native code that outputs to > stdout does not show up in the Clojure REPL. stdout is redirected somew

JNA stdout and the REPL

2020-02-14 Thread Sonny To
I am using JNA to call native C code. calling native code that outputs to stdout does not show up in the Clojure REPL. stdout is redirected somewhere that is not attached to *out* How can I get stdout from native code outputting to *out* in the REPL? Without this, it makes it difficult to see w

pair programming with tmux spacemacs on Mac/Linux

2019-10-07 Thread Sonny To
This is not clojure specific but has anyone successfully used spacemacs to pair programming with tmux and spacemacs? My pairing partner uses a mac with french Canadian keyboard but when he ssh into my box to pair, his key bindings don't work even though I used his init.el The meta key and paredi

[ANN] Voodoo a Clojure library for byte buffer manipulation

2019-09-03 Thread Sonny To
https://github.com/sonwh98/voodoo -- 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

Re: dynamically defining specs

2019-02-19 Thread Sonny To
s/def is a macro so it doesn't evaluate the parameter n. had to use s/def-impl instead like this (let [n :foo/bar3 f int?] (s/def-impl n n f) ) On Tuesday, February 19, 2019 at 1:18:20 PM UTC+1, Sonny To wrote: > > (let [n :foo/bar > f int?] &g

dynamically defining specs

2019-02-19 Thread Sonny To
(let [n :foo/bar f int?] (s/def n f) ) (s/get-spec :foo/bar) why does this return nil? it seems I can only define a spec like this (s/def :foo/bar int?) Is there a way to programmatically create a spec from data? -- You received this message because you are subscribed to the

Re: [ANN] Ikota

2018-12-13 Thread Sonny To
It has reagent like components. I extracted this library out while creating a reagent like library without a dependency on react.js -- 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 tha

[ANN] Ikota

2018-12-13 Thread Sonny To
Yet another Hiccup implementation for Clojure and ClojureScript https://bitbucket.org/sonwh98/ikota/src/master/ -- 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 m

[ANN] CHP Clojure Hiccup Page

2018-12-13 Thread Sonny To
https://bitbucket.org/sonwh98/chp/src/master/ PHP is popular for server-side web development because it is easy to get started. It was initially designed to be a templating language to create dynamic HTML pages on the server-side. PHP pages are HTML pages with embedded code. CHP borrows this

Re: What is the minimal Emacs config for practical Clojure development?

2018-07-09 Thread Sonny To
Not sure what you mean by minimum but here's instruction on setting up a dev environment that works for me http://lambdakids.stigmergy.systems/2018/6/6/hello-world.blog my emacs init.el is at https://bit.ly/2z3gtyi On Monday, July 2, 2018 at 6:41:23 AM UTC+3, Austin Haas wrote: > > I don't want

Re: accessing symbols in local context of a closure

2018-05-26 Thread Sonny To
ay 26, 2018 at 9:23:05 AM UTC+3, James Gatannah wrote: > > > > On Friday, May 25, 2018 at 7:40:12 AM UTC-5, Sonny To wrote: >> >> Hi James, >> I'm trying to access the local bindings of the closure like it is an >> object >> (.-x bar) should give 1.

Re: accessing symbols in local context of a closure

2018-05-25 Thread Sonny To
2018 at 1:22:42 PM UTC-5, Sonny To wrote: >> >> (defn foo[] >> (let [x 1] >>(fn [] >> (+ x 1) >> ) >> ) >> >> (def bar (foo)) >> >> Is there a way to get the value of x from closure bar? >> > &g

accessing symbols in local context of a closure

2018-05-24 Thread Sonny To
(defn foo[] (let [x 1] (fn [] (+ x 1) ) ) (def bar (foo)) Is there a way to get the value of x from closure bar? -- 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 tha

macro to unwrap a list

2016-02-15 Thread Sonny To
I am trying to write a macro to unwrap a list: here's my naive attempt (defmacro unwrap [s] (-> s pr-str (clojure.string/replace #"[\(\)]" "") read-string)) (unwrap (1 2 3) ) should give 1 2 3 any ideas how this can be done? thanks, Sonny -- You received this message because you are subsc