Public Vars

Back

*e (clj)

(source)

variable

bound in a repl thread to the most recent exception caught by the repl

Examples

HumbleUI/HumbleUI
(ns examples
  (:require
    [clojure.core.server :as server]
    [examples.7guis-converter]
    [examples.align]
    [examples.animation]
    [examples.backdrop]
    [examples.blur]
    [examples.bmi-calculator]
    [examples.button]
    [examples.calculator]
    [examples.canvas]
    [examples.canvas-shapes]
    [examples.checkbox]
    [examples.container]
    [examples.effects]
    [examples.errors]
    [examples.event-bubbling]
    [examples.framerate]
    [examples.grid]
    [examples.image-snapshot]
    [examples.label]
    [examples.oklch]
    [examples.paragraph]
    [examples.scroll]
    [examples.settings]
    [examples.slider]
    [examples.stack]
    [examples.state :as state]
    [examples.svg]
    [examples.text-field]
    [examples.text-field-debug]
    [examples.todomvc]
    [examples.toggle]
    [examples.tooltip]
    [examples.tree]
    [examples.treemap]
    [examples.wordle]
    [io.github.humbleui.app :as app]
    [io.github.humbleui.debug :as debug]
    [io.github.humbleui.paint :as paint]
    [io.github.humbleui.window :as window]
    [io.github.humbleui.ui :as ui]))

(def border-line
  (ui/rect (paint/fill light-grey)
    (ui/gap 1 0)))
      
(def app
  (ui/default-theme {}; :font-size 13
    ; :cap-height 10
    ; :leading 100
    ; :fill-text (paint/fill 0xFFCC3333)
    ; :hui.text-field/fill-text (paint/fill 0xFFCC3333)
    (ui/row
      (ui/vscrollbar
        (ui/column
          (for [[name _] (sort-by first examples)]
            (ui/clickable
              {:on-click (fn [_] (reset! examples.state/*example name))}
              (ui/dynamic ctx [selected? (= name @examples.state/*example)
                               hovered?  (:hui/hovered? ctx)]
                (let [label (ui/padding 20 10
                              (ui/label name))]
                  (cond
                    selected? (ui/rect (paint/fill 0xFFB2D7FE) label)
                    hovered?  (ui/rect (paint/fill 0xFFE1EFFA) label)
                    :else     label)))))))
      border-line
      [:stretch 1
       (ui/clip
         (ui/dynamic _ [name @examples.state/*example]
           (examples name)))])))
mhuebert/maria
(ns cells.cell
  (:refer-clojure :exclude [bound-fn get])
  (:require [clojure.core :as core]
            [cells.util :as util]
            [applied-science.js-interop :as j]))

(defmacro bound-fn
  "Returns an anonymous function which will evaluate in the context of the current cell
   (useful for handling async-state)"
  [& body]
  `(let [cell# ~'cells.cell/*self*
         error-handler# ~'cells.cell/*error-handler*]
     (fn [& args#]
       (binding [~'cells.cell/*self* cell#
                 ~'cells.cell/*error-handler* error-handler#]
         (try (apply (fn ~@body) args#)
              (catch ~'js/Error e#
                (~'cells.cell/error! cell# e#)))))))
typedclojure/typedclojure
(ns ^:no-doc typed.ann.clojure
  "Type annotations for the base Clojure distribution."
  #?(:cljs (:require-macros [typed.ann-macros.clojure :as macros]))
  (:require [clojure.core :as cc]
            [typed.clojure :as t]
            #?(:clj [typed.ann-macros.clojure :as macros])
            #?(:clj typed.ann.clojure.jvm) ;; jvm annotations
            #?(:clj clojure.core.typed))
  #?(:clj
     (:import (clojure.lang PersistentHashSet PersistentList
                            APersistentMap #_IPersistentCollection
                            #_ITransientSet
                            IRef)
              (java.util Comparator Collection))))

cc/*1 t/Any
cc/*2 t/Any
cc/*3 t/Any
cc/*e #?(:cljs t/Any :default (t/U nil Throwable))
#?@(:cljs [] :default [
cc/*agent* (t/U nil (t/Deref t/Any) #_(t/Agent t/Any))
cc/*allow-unresolved-vars* t/Any
cc/*data-readers* (t/Map t/Sym t/AnyVar)
cc/*default-data-reader-fn* (t/U nil [t/Any t/Any :-> t/Any])
cc/*fn-loader* t/Any
cc/*math-context* t/Any
cc/*source-path* t/Str
cc/*use-context-classloader* t/Any
])
cc/*assert* t/Any

#?@(:cljs [] :default [
cc/*file* t/Str
])
cc/*command-line-args* (t/NilableNonEmptyASeq t/Str)
#?@(:cljs [
cc/*unchecked-if* t/Bool
cc/*unchecked-arrays* t/Bool
cc/*warn-on-infer* t/Bool
cc/enable-console-print! [:-> t/Any]
] :default [
cc/*warn-on-reflection* t/Bool
cc/*compile-path* t/Str
cc/*compile-files* t/Bool
cc/*unchecked-math* t/Bool
cc/*compiler-options* (t/Map t/Any t/Any)
cc/*in* java.io.Reader
cc/*out* java.io.Writer ;; FIXME cljs
cc/*err* java.io.Writer
cc/*repl* t/Any
])
cc/*flush-on-newline* t/Bool
cc/*print-meta* t/Bool
cc/*print-dup* t/Bool
cc/*print-readably* t/Bool
#?@(:cljs [] :default [
cc/*read-eval* (t/U ':unknown t/Bool)
])
cognitect-labs/day-of-datomic-cloud
(require '[datomic.client.api.async :as d]
         '[clojure.core.async :refer (<!!)])

(d/q {:query '[:find (count ?name)
               :where [_ :artist/name ?name]]
      :args [db]
      :timeout 1})
(ex-data *e)
 
mauricioszabo/repl-tooling
(ns repl-tooling.editor-integration.connection-test
  (:require [clojure.test :refer [testing]]
            [check.core :refer [check]]
            [check.async-old :as a]
            [clojure.core.async :as async]
            [repl-tooling.editor-integration.connection :as connection]
            [repl-tooling.editor-helpers :as editor-helpers]
            [repl-tooling.eval :as eval]))

    (testing "capturing stderr"
      (-> repls a/await! :clj/repl (eval/evaluate "(binding [*out* *err*] (prn :bar))" {} identity))
      (check (a/await! stderr) => ":bar"))