[?] alter-var-root and *out*

2021-09-01 Thread Philos Kim
I can change my dynamic var with alter-var-root like this. (def ^:dynamic *x* "abc") (alter-var-root #'*x* (constantly "xyz")) *x* ; => "xyz" However, I cannot change *out* with alter-var-root. (alter-var-root #'*out* (constantly "xyz")) *out* ; => #object[java.io.PrintWriter 0x6957ec80

Debux 0.8.0 is out.

2021-08-09 Thread Philos Kim
Debux(https://clojars.org/philoskim/debux) is a trace-based debugging library for Clojure and ClojureScript. * new feature: dbgt and clogt macros added for debugging transducers. https://github.com/philoskim/debux#dbgt -- You received this message because you are subscribed to the Google

How to print the intermediate values in a transient vector?

2020-06-25 Thread Philos Kim
How can I print the *intermediate values* in a transient vector? I tried this but the printed result is not what I want to see. (let [v (transient [])] (dotimes [n 3] (conj! v n) (println v))) ;; printed v #object[clojure.lang.PersistentVector$TransientVector 0x162d8132

How to print the intermediate values in a transient vector?

2020-06-25 Thread Philos Kim
How can I print the intermediate values in a transient vector? I tried this but the printed result is like this and it is not what I want to see. (let [v (transient [])] (dotimes [n 3] (conj! v n) (println v))) ;; printed v #object[clojure.lang.PersistentVector$TransientVector

Re: [?] Spec error: please tell me the reason.

2019-10-30 Thread Philos Kim
Thanks for your answer! I corrected the code like the following according to your advice. (s/fdef transform-fontspecs :args (s/cat :fontspecs ::fontspecs)) However, the same error occurs again. 2019년 10월 31일 목요일 오전 11시 44분 46초 UTC+9, Philos Kim 님의 말: > > I don't know why the followin

[?] Spec error: please tell me the reason.

2019-10-30 Thread Philos Kim
I don't know why the following spec error occurred. Could anyone tell me why? (ns spec-test (:require [clojure.spec.alpha :as s] [clojure.spec.test.alpha :as stest])) ;;; spec definitions (s/def :msds.fontspec/tag #{:fontspec}) (s/def ::id string?) (s/def ::size int?) (s/def

Re: [ANN] debux 0.5.0 is out

2018-09-10 Thread Philos Kim
The problem is solved in the newer 0.5.1 version of debux. 2018년 9월 9일 일요일 오후 3시 49분 59초 UTC+9, Mike 님의 말: > > Hello. > > I can't run debux on JVM 10. Issue is created > https://github.com/philoskim/debux/issues/11 > > Mike. > > суббота, 8 сентября 2018 г., 19:56:14 UT

[ANN] debux 0.5.0 is out

2018-09-08 Thread Philos Kim
Debux is a trace-based debugging library for Clojure and ClojureScript. https://github.com/philoskim/debux * Major improvement of version 0.5.0 - Multiple use of dbgn and dbg https://github.com/philoskim/debux/blob/master/README.adoc#multiple-code-dbgn-code-and-code-dbg-code -- You

[?] The Reasoned Schemer vs. Core.logic

2018-08-24 Thread Philos Kim
I am studying *The Reasoned Schemer, 2nd ed.* and translating its source code into Clojure. https://github.com/philoskim/reasoned-schemer-for-clojure In the middle of studying the problem #98 of Chapter 3, I encountered an unexpected result like this.

[?] The Reasoned Schemer vs. core.logic

2018-08-24 Thread Philos Kim
I am studying *The Reasoned Schemer, 2nd ed.* and translating its source code into Clojure. https://github.com/philoskim/reasoned-schemer-for-clojure In the middle of studying the problem #98 of Chapter 3, I encountered an unexpected result like this.

[TIP] How to alias the ClojureScript namespaces in macros

2018-07-09 Thread Philos Kim
Refer to https://groups.google.com/forum/#!topic/clojurescript/oP4qFdPRm2Q or https://gist.github.com/philoskim/496a01dc8d71b83c678c866874310871 -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to

[?] How to alias the ClojureScript namespaces in macros

2018-07-09 Thread Philos Kim
Refer to https://groups.google.com/forum/#!topic/clojurescript/oP4qFdPRm2Q or https://gist.github.com/philoskim/496a01dc8d71b83c678c866874310871 -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to

Re: When will the async/await feature in ES8 be introduced in ClojureScript?

2018-05-24 Thread Philos Kim
Refer to https://groups.google.com/forum/#!topic/clojurescript/scUMhU-ctEM for discussions. 2018년 5월 24일 목요일 오후 1시 19분 41초 UTC+9, Philos Kim 님의 말: > > I wonder when the async/await feature in ES8 will be introduced in > ClojureScript. > > Of course, I know there is core.async i

When will the async/await feature in ES8 be introduced in ClojureScript?

2018-05-23 Thread Philos Kim
I wonder when the async/await feature in ES8 will be introduced in ClojureScript. Of course, I know there is core.async in ClojureScript but I hope that the async/await feature in ES8 will be supported in ClojureScript as soon as possible. Does anyone know when it will be supported? --

[TIP] How to get *ns* string in ClojureScript

2018-04-09 Thread Philos Kim
https://gist.github.com/philoskim/19bafdac0d9d5610408157e528c053d6 -- 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

Re: [?] How to enumerate the ClojureScript macros in ClojureScript REPL such as figwheel REPL?

2018-04-08 Thread Philos Kim
I found the way, so I want to share the tip with others here ( https://gist.github.com/philoskim/1d61574f69902c102d1a3c5c9112c6ba ). 2018년 4월 5일 목요일 오후 5시 23분 44초 UTC+9, Philos Kim 님의 말: > > I ran the follwoing code in the figwheel REPL and the result is an empty > list. >

[?] How to enumerate the ClojureScript macros in ClojureScript REPL such as figwheel REPL?

2018-04-05 Thread Philos Kim
I ran the follwoing code in the figwheel REPL and the result is an empty list. How can I enumerate the ClojureScript macros? dev:cljs.user=> (->> (ns-publics 'cljs.core) vals (filter #(get (meta %) :macro))) () Thanks in advance. -- You received

[ANN] debux 0.4.3 is out.

2018-03-17 Thread Philos Kim
Debux: Clojure and ClojureScript debugging library v0.4.3 Changed: The same duplicate evaluated results are not printed by default. https://github.com/philoskim/debux#dup-option Enhanced: The readability is enhanced for the looping constructs such as map, reduce, for, loop, and so on by

Re: Best Book for Clojure

2018-03-13 Thread Philos Kim
This book is somewhat out-of-date but still the best book I have read on Clojure. And I am so unhappy to see the second edition not come out. Clojure Programming: Practical Lisp for the Java World

Re: [?] Adding my own function to clojure.core namespace

2018-02-25 Thread Philos Kim
I have another question. Debux library supports ClojureScript as well. Similarly, I want to add my own function or macro to cljs.core as in Clojure. Can I use the same strategy in ClojureScript as in Clojure if I use it in the ClojureScript source code, not in REPL? -- You received this

Re: [?] Adding my own function to clojure.core namespace

2018-02-25 Thread Philos Kim
Thanks both of you! I know it is not desirable but it is sometimes needed, especially in my case. For example , I wrote debux ( https://github.com/philoskim/debux ) library. I want to use it only in development, not in production. If I 'require' debux in source code to use it in development, I

[?] Adding my own function to clojure.core namespace

2018-02-24 Thread Philos Kim
Is there any way to add my own function to clojure.core namespace? Because I want to use that function globally without 'require' or 'use'. Thanks in advance. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to

[?] Adding my own function to clojure.core nanespace

2018-02-24 Thread Philos Kim
Is there any way to add my own function to clojutr.core namespace? Because I want to use that function without 'require' or 'use'. -- 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

Re: [ANN] Clojure/ClojureScript debugging library debux 0.4.0 is out.

2017-12-17 Thread Philos Kim
Debux library is now upgraded to version 0.4.1. 2017년 12월 7일 목요일 오후 7시 34분 29초 UTC+9, Philos Kim 님의 말: > > * https://github.com/philoskim/debux > > * https://clojars.org/philoskim/debux > -- You received this message because you are subscribed to the Google Groups "Clo

Cider - emacs lisp errors reported

2017-12-10 Thread Philos Kim
I encountered the same problem some years ago. In my case the problem was solved by removing (require 'cl-lib) line in my init.el file. The cl-lib package defined when-let as well. I hope that this will help you out! -- You received this message because you are subscribed to the Google

[ANN] Clojure/ClojureScript debugging library debux 0.4.0 is out.

2017-12-07 Thread Philos Kim
* https://github.com/philoskim/debux * https://clojars.org/philoskim/debux -- 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

[ANN] debux(Clojure/ClojureScript debugging library) 0.3.1 is out.

2017-06-28 Thread Philos Kim
I'm pleased to announce debux version 0.3.1. # Debux is a library for debugging Clojure and ClojureScript. # The new added feature is to show you every evaluated results of a form. https://github.com/philoskim/debux https://clojars.org/philoskim/debux -- You received this message

[ANN] debux(Clojure/ClojureScript debugging library) 0.3.1 is out.

2017-06-28 Thread Philos Kim
I'm pleased to announce debux version 0.3.0. # Debux is a library for debugging Clojure and ClojureScript. # The new added feature is to show you every evaluated results of a form. https://github.com/philoskim/debux https://clojars.org/philoskim/debux -- You received this message

[ANN] debux(Clojure/ClojureScript debugging library) 0.3.0 is out.

2017-06-28 Thread Philos Kim
I'm pleased to announce debux version 0.3.0. # Debux is a library for debugging Clojure and ClojureScript. # The new added feature is to show you every evaluated results of a form. https://github.com/philoskim/debux https://clojars.org/philoskim/debux -- You received this message because you

[ANN] debux 0.3.0 is out.

2017-06-28 Thread Philos Kim
I'm pleased to announce debux version 0.3.0. # Debux is a library for debugging Clojure and ClojureScript. # The new added feature is to show you every evaluated results of a form. https://github.com/philoskim/debux https://clojars.org/philoskim/debux -- You received this message because you

[?] cljs-devtools vs. dirac DevTools

2016-10-09 Thread Philos Kim
Could anyone explain the difference between cljs-devtools and dirac DevTools? And which one to use when? https://github.com/binaryage/cljs-devtools https://github.com/binaryage/dirac Many thanks in advance. -- You received this message because you are subscribed to the Google Groups

clojure.spec question

2016-09-24 Thread Philos Kim
How can I define the following spec? {"id" 1 "name" "john"} 1) The keys of a map must be the string type, not the keyword type. 2) The values must be fixed. Namely, the value of the key "id" must be 1 and the value of the key "name" must be "john" -- You received this message because you

Re: How can I evaluate local symbols using eval function in Clojure?

2016-09-06 Thread Philos Kim
I appreciate your reply. The following is the entire code where I encountered this problem. My intention was for debugging purpose to print the result of every nested expression in a form. (ns debux.lab (:require (clojure [walk :as walk]))) ;; For debugging (defmacro dbg_ [form] `(let

Re: How can I evaluate local symbols using eval function in Clojure?

2016-09-06 Thread Philos Kim
I appreciate your reply. The following is the entire code where I encountered this problem. My intention was for debugging purpose to print the result of every nested expression in a form. (ns debux.lab (:require (clojure [walk :as walk]))) ;; For internal debugging (defmacro ^:private dbg_

How can I evaluate local symbols using eval function in Clojure?

2016-09-06 Thread Philos Kim
I need to evaluate local symbols using eval function in Clojure. (def a 1) (def b 2) (let [a 10 b 20] (eval '(+ a b))) ;=> 3 I expected the result to be 30, but the result is 3. I want to know why Clojure eval function doesn't evaluate the local symbols. And any alternative to get

How can I evaluate local symbols using eval function in Clojure?

2016-09-06 Thread Philos Kim
I need to evaluate local symbols using eval function in Clojure. (def a 1) (def b 2) (let [a 10 b 20] (eval '(+ a b))) ;=> 3 I expected the result to be 30, but the reusult is 3. I want to know the reason why Clojure eval function doesn't evaluate the local symbols. And any

[ANN] debux 0.2.1 is out

2016-05-16 Thread Philos Kim
Debux is a small but useful library for debugging Clojure and ClojureScript. https://github.com/philoskim/debux Change Logs Version 0.2.1 (minor bug fixes): Fixed: An error fixed when using (clog (->> .)) Fixed: An error fixed when using (dbg (let [[a & b] [10 20 30]] ..)) Added: break

Re: Understanding init (the zero arity function) for transducers.

2016-03-09 Thread Philos Kim
I wrote the next example to trace the inner workings of transducer. I hope that this will help. The next filter-t(transducer), map-t(transducer) and conj-t(reducer) functions are excerpted from the filter, map and conj from clojure.core and then simplified and modified to focus on the

[ANN] debux 0.2.0 is out

2016-02-24 Thread Philos Kim
Debux is a simple but useful library for debugging Clojure and ClojureScript. I wrote this library to debug my own Clojure(Script) code and to analyze other developer's Clojure(Script) code. This version includes the new features of debugging ->, ->>, let and comp forms.