Fork me on GitHub
#chlorine
<
2020-05-08
>
fabrao03:05:18

Hello all, I don´t know if is it a bug but ...

(ns app.core
  (:require [mount.core :as mount]
            [app.config :refer [config]])) -> [{:config {:bancos ...}}]

(comment
  config -> nil
)

fabrao03:05:47

evaluating config in different ways, diff results

seancorfield04:05:18

I just remembered that it's hard to eval just a single var inside an expression like that because "current form" expands to the parens around it, so you get (comment config) which is nil.

seancorfield04:05:51

Maybe you can double-click config and evaluate selection @fabrao?

seancorfield04:05:32

(I use my inspect-var in cases like this, so it sends (var config) to REBL which displays the value and any metadata etc)

fabrao04:05:24

your inspect selection works

fabrao04:05:23

but sean:inspect-block I think this go to comment block

seancorfield04:05:46

Yes, as does Chlorine's built-in evaluate-block -- which is what I said above.

seancorfield04:05:57

inspect-var is different.

fabrao04:05:33

(comment [config]) -> work !?!?

seancorfield04:05:02

Of course, because "current form" expands to the parentheses (again, as I said above).

fabrao04:05:04

well, I can use it with []

seancorfield04:05:25

Are you using Cognitect's REBL?

fabrao04:05:55

regular Chlorine REPL

seancorfield04:05:09

Ah, REBL brings so much useful stuff...

seancorfield04:05:39

I hope to find time tomorrow to put up a new video on YouTube showing how I use it (to go with the three that I put up months ago)

fabrao04:05:00

I saw your video about REBL, but I switch from Emacs and I didn´t have time to use it yet

fabrao04:05:51

I´m working hard with Lacinia GraphQL now and it´s fulling my time :-)

fabrao04:05:07

and I had to use this

(defn- encode-string [valor encode]
  (String. (.getBytes valor encode)))

(defn- string->utf8 [valor]
  (encode-string valor "UTF-8"))

(defn- convert-strings [linha campos]
  (reduce #(assoc %1 %2 (string->utf8 (%2 linha))) linha campos))
for converting "strange" chars from SQLSERVER database

mauricio.szabo14:05:08

If only REBL would work with ClojureScript... 🤔

vlaaad14:05:18

REBL can work with cljs

vlaaad14:05:54

via prepls

vlaaad14:05:55

no fancy datafy/nav stuff because of the process boundary, but it can show deserialized evaluation results

vlaaad14:05:48

For the curious: 1. start a cljs prepl (like that: clj -Sdeps '{:deps {org.clojure/clojurescript {:mvn/version "1.10.758"}}}' -J-Dclojure.server.cljs-prepl='{:port 50505 :accept cljs.server.browser/prepl}') 2. in a repl with rebl on the classpath, evaluate this:

(cognitect.rebl/ui :proc
                   #(clojure.core.server/remote-prepl
                      "localhost" 50505
                      %1 %2
                      :valf (partial clojure.edn/read-string {:default tagged-literal})))

mauricio.szabo18:05:01

I saw that there were some problems with PREPL over Shadow-CLJS or Figwheel, do you know if they still happen?

vlaaad18:05:49

No I don't know