Skip to content

Instantly share code, notes, and snippets.

View gmp26's full-sized avatar

Mike Pearson gmp26

View GitHub Profile
@gmp26
gmp26 / README.md
Created April 5, 2022 11:44
Problems calling R attach from bb in certain contexts

I now have one failing case and three passing cases...

For the failing case, start test.clj in a Calva Babashka REPL. This is how I was testing...

clj꞉test꞉> 
; Evaluating file: test.clj
{:exit 1, :out "", :err "Error in print(tx_sex_m) : object 'tx_sex_m' not found\nExecution halted\n"}

This is the issue I was reporting

@gmp26
gmp26 / config.edn
Last active December 28, 2023 14:23
clj-kondo config for fulcro, mount and pathom2. WIP
;
; Put this under .clj-kondo in the project folder. Includes some fulcro, mount, pathom22, nubank workspaces,
; and fulcro-rad config.
;
{:hooks {:analyze-call {com.fulcrologic.fulcro.mutations/defmutation com.fulcrologic.fulcro.clj-kondo-hooks/defmutation
com.fulcrologic.guardrails.core/>defn com.fulcrologic.fulcro.clj-kondo-hooks/>defn}}
:linters {:clj-kondo.fulcro.defmutation/handler-arity {:level :error}
:clj-kondo.fulcro.>defn/signature-mismatch {:level :error}}
:lint-as {;com.fulcrologic.fulcro.mutations/defmutation clojure.core/def
nubank.workspaces.core/defcard clojure.core/def
@gmp26
gmp26 / jack-in-issue.txt
Created August 24, 2021 16:26
Started seeing this when jacking in.
clj꞉shadow.user꞉>  ; Use `alt+enter` to evaluate
; Creating cljs repl session...
; Connecting cljs repl: shadow-cljs...
; The Calva Connection Log might have more connection progress information.
; Error while connecting cljs REPL: TypeError: Cannot read property ‘search’ of undefined
; Jack-in done.
clj꞉shadow.user꞉>
ls -l resources/public/js/app.js
-rw-r--r-- 1 gmp26 staff 9534589 5 May 10:49 resources/public/js/app.js
@gmp26
gmp26 / calva-exception.txt
Created January 26, 2021 11:49
Calva terminal exception stacktrace
clojure -Sdeps '{:deps {nrepl/nrepl {:mvn/version "0.8.3"} cider/cider-nrepl {:mvn/version "0.25.7"}}}' -A:reveal:config
nREPL server started on port 52934 on host localhost - nrepl://localhost:52934
ERROR: Unhandled REPL handler exception processing message {:op stacktrace, :id 213, :session 3bbda768-0e96-4329-acd6-c3689159ec1b}
java.lang.ClassCastException: clojure.lang.Var$Unbound cannot be cast to java.lang.ClassLoader
at cider.nrepl.inlined_deps.orchard.v0v6v3.orchard.java.classpath$classloaders$fn__9515.invoke(classpath.clj:29)
at clojure.lang.Iterate.first(Iterate.java:47)
at clojure.lang.RT.first(RT.java:692)
at clojure.core$first__5384.invokeStatic(core.clj:55)
@gmp26
gmp26 / css tooltip
Created June 30, 2020 20:31
css tooltip on alt attribute
a {
position: relative;
display: inline-block;
margin-top: 50px;
}
a[alt]:hover:after {
content: attr(alt);
position: absolute;
top: -20px;
@gmp26
gmp26 / covid.charts.death.cljs
Created March 20, 2020 14:00
Clone of react-chartjs-2 line example
(ns covid.charts.deaths
(:require
["react-chartjs-2" :refer (Line)]
[reagent.core :as r]
[re-frame.core :as rf]
[covid.subs :as subs]))
(def data {:labels ["January" "February" "March" "April" "May" "June" "July"]
:datasets [{:label "My First dataset"
:fill false
@gmp26
gmp26 / csv starter
Last active October 22, 2019 14:15
```clj
(drop 1 (csv/read-csv (io/reader (BOMInputStream. (io/input-stream filename)) :encoding "UTF-8")))))
```
@gmp26
gmp26 / kaocha-cljs.log
Created September 6, 2019 13:40
linux kaocha-cljs connect fail
Running Kaocha Test
+ ./bin/kaocha :unit-cljs
[E]
Randomized with --seed 835207110
ERROR in unit-cljs (form-init8257058895239502683.clj:1)
Unexpected error executing kaocha-cljs test suite.
Exception: clojure.lang.ExceptionInfo: Kaocha ClojureScript client failed connecting back.
{:kaocha.testable/id :unit-cljs, :cljs/repl-env cljs.repl.browser/repl-env, :cljs/compiler-options {}}
at kaocha.type.cljs$eval6981$fn__6983$fn__6997.invoke (cljs.clj:265)
@gmp26
gmp26 / cljs.trace
Created June 25, 2019 11:01
figwheel repl stack trace
---- Exception Stack Trace ----
clojure.lang.ExceptionInfo: predict3.components.primitives does not exist
#:cljs.repl{:error :invalid-ns}
at cljs.repl$ns__GT_input.invokeStatic (repl.cljc:204)
cljs.repl$ns__GT_input.invoke (repl.cljc:199)
cljs.repl$load_namespace.invokeStatic (repl.cljc:243)
cljs.repl$load_namespace.invoke (repl.cljc:234)
cljs.repl$load_dependencies$fn__6589.invoke (repl.cljc:260)
clojure.core$map$fn__5866.invoke (core.clj:2755)