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 "java.i
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
Group
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
clojure.lang.Pe
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 0x162d8
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 fol
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 :
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:
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 r
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.
https://github.com/philoskim/reasoned-sche
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.
https://github.com/philoskim/reasoned-sche
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 clojure@googlegroups
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 clojure@googlegroups
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
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?
--
Yo
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 yo
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.
>
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 thi
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 insert
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
https://www.amazon.com/Clojure-Programming-Practical-Lisp-World/dp/1449394701/ref=sr_1_2?ie=UTF8&qi
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 messa
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
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 cloj
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 that
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 "Clojur
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
Grou
* 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 patien
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 because
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
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 a
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 a
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
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
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 [r
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_
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 arou
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 alternative
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 u
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 understan
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.
https://github.com/phi
39 matches
Mail list logo