GithubHelp home page GithubHelp logo

nubank / morse Goto Github PK

View Code? Open in Web Editor NEW
331.0 8.0 1.0 3.41 MB

A graphical, interactive tool for browsing Clojure data

License: Apache License 2.0

Clojure 20.00% JavaScript 79.89% CSS 0.01% HTML 0.10%
nubank-stable

morse's Introduction

Morse

Rationale

One of the prime value propositions in using a Lisp language is that you should be able to connect to and interact with your live program. Doing so allows you to access and explore the program state. The typical access mechanism for Clojure programs is the REPL, but its textual output is not ideal for robust data exploration. Instead, an interface that allows you to browse and navigate the data in your live program is a more ideal environment for understanding. Morse, like REBL before it, provides a browser for Clojure data that allows active traversal into and back out of nested forms. However, it's not always feasible to execute the browser process inside of the live program. Therefore, Morse provides a way to inspect the live program's data remotely, but also provides an in-process mode if needed.

This software is considered an alpha release and subject to change.

Morse runs remotely to or within your application JVM process, and can be used at dev-time without adding any runtime deps. The UI is written in JavaFX.

Quick links:

The Morse user interface

Requirements

  • Clojure, 1.10.0 or higher
  • Java 11 or higher

Release Information

Latest release:

deps.edn dependency information:

Latest Morse Git dependency coordinate:

io.github.nubank/morse {:git/tag "v2023.04.30.01" :git/sha "d99b09c"}

Installing Morse as a Clojure CLI tool

Morse is available as a Clojure CLI tool and may be installed and upgraded via:

clj -Ttools install-latest :lib io.github.nubank/morse :as morse

Usage:

See the Morse Guide to learn how to use Morse for your purposes.

Docs

Contributing

Morse is open source, developed internally at Nubank. Issues can be filed using GitHub issues for this project. Initially, we prefer to do development internally and are not accepting pull requests or patches.

Copyright and License

Copyright © 2023 Nu North America, Inc

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

morse's People

Contributors

stuarthalloway avatar fogus avatar redinger avatar richhickey avatar puredanger avatar ghadishayban avatar jebberjeb avatar magemasher avatar levand avatar

Stargazers

Philipp Küng avatar Brian Maddy avatar Chris avatar Renier Strydom avatar Will Weber avatar  avatar  avatar Mello avatar Pedro P. avatar Sam Panza avatar guto avatar Aeonik Chaos avatar Donavan-Ross Costaras avatar  avatar Joe Tague avatar Darren Olivier avatar Stel Abrego avatar Ismaël Mejía avatar Tim Kersey avatar  avatar Vishesh Gupta avatar Romain Leroux avatar  avatar wolfi3 avatar Stefaney Roberts avatar Andrei Surugiu avatar A Brooks avatar Edwin Kofler avatar Guo Lijun avatar  avatar Thomas Schranz avatar vinurs avatar Gilles Philippart avatar Vincent Cantin avatar Andrea Richiardi avatar Danilo Silva avatar Rowan Molony avatar  avatar Vaclav Synacek avatar Zsolt Botykai avatar Adrian Medina avatar James Davidson avatar Rangel Spasov avatar Jonathon McKitrick avatar Ali Elshishini avatar Quân avatar Jeremy Field avatar Franciosi avatar Martino Visintin avatar Aaron Brooks avatar Hoon Wee avatar Michael Salihi avatar Exceptionz Project avatar Daniel Ziltener avatar macmoebius avatar Mark Sto avatar Darong Mean avatar Matteo Redaelli avatar tlonist-sang avatar David Bruce avatar Adam Comella avatar markIV avatar Andrey Subbotin avatar  avatar Michael avatar  avatar Nikola Vojičić avatar Andrew Foltz-Morrison avatar Harry Gallagher avatar Filipe Bezerra de Souza avatar Michael Dan Mossinsohn avatar  avatar Izaak Yusop avatar Luka Teras avatar  avatar Sean Hagstrom avatar Pedro Manuel Torres avatar Davis avatar Wei Hsu avatar Sean Wang avatar Sunil KS avatar kq avatar i love my dog avatar KUR avatar João Fernando Apel Miguel avatar Mert Nuhoglu avatar  avatar emmmm~ avatar Bia avatar  avatar  avatar David Whittington avatar Vsevolod Romashov avatar Artem Medeu avatar Tomáš Bílek avatar Ivan Malopinsky avatar Ulan Sametov avatar MurilinhoPs avatar Renata Carreira avatar  avatar

Watchers

Abhik Khanra avatar Adrian A. avatar Hyunwoo Nam avatar Paul Iannazzo avatar  avatar Kostas Georgiou avatar  avatar José Javier Blanco Rivero avatar

Forkers

erickisos

morse's Issues

Feature request: Hotkey for 'Focus Nav'

Thanks for writing Morse! I like it.

It would be nice to be able to quickly jump to the Nav area, type in something (e.g. a 0) and then jump back to the browser with Ctrl/Cmd+B.

`nav->` quick switching

It would be useful to be able to quickly switch between many nav-> inputs. I have this need when I'm switching between things which are slightly different and I want to select different data from them. Especially when I re-run my code, and rebrowse into it, my nav-> is lost unless I have copied it before hand.

A recent history dropdown might be a useful way to implement this.

:host property is ignored

morse doesn't show any errors in the UI when it cannot connect to a remote, you just get a stacktrace written to stdout of the process

`Ctrl-D` is shadowed on macOS

Ctrl-D is a globally supported key binding for forward character deletion, which is a very basic and very common editing operation, but it's assigned todef as.

If I'm not mistaken, even VS Code defines Ctrl-D as the deleteRight action by default.

The alternative on Apple keyboards is to use Fn-Delete, which is not so commonly known (probably), neither as convenient as Ctrl-D (especially on smaller, custom keyboards).

Ctrl+Shift+D however is not defined by default, so that would be one alternative as a default binding.

It would be also more memorable, since the Viewer: dropdown right next to it also has a Shifted shortcut.

To prevent further complaints about key bindings, I concur that #3 would be a great feature.

launch-remote can't process results (read+string on a string instead of reader)

Repro:

  1. Server:
    clj 
    -Sdeps '{:deps {io.github.clojure/data.alpha.replicant-server {:git/tag """v2023.04.25.01""" :git/sha """039bea0"""}}}' 
    -X clojure.data.alpha.replicant.server.prepl/start :host """localhost""" :port 7272
    (triple quotes because Windows...)
  2. Client:
    clj 
    -Sdeps '{:deps {io.github.nubank/morse {:git/tag """v2023.04.27.01""" :git/sha """7a85e46"""}}}' 
    -X dev.nu.morse/launch-remote :port 7272

Observed behavior:
any evaluation in the UI results in error:
image
The error:

{:via
 [{:type java.lang.ClassCastException,
   :message
   "class java.lang.String cannot be cast to class clojure.lang.LineNumberingPushbackReader (java.lang.String is in module java.base of loader 'bootstrap'; clojure.lang.LineNumberingPushbackReader is in unnamed module of loader 'app')",
   :at [clojure.core$read_PLUS_string invokeStatic "core.clj" 3782]}],
 :trace
 [[clojure.core$read_PLUS_string invokeStatic "core.clj" 3782]
  [clojure.core$read_PLUS_string invokeStatic "core.clj" 3771]
  [clojure.core$read_PLUS_string invokeStatic "core.clj" 3771]
  [clojure.core$read_PLUS_string invoke "core.clj" 3771]
  [dev.nu.morse.ui$init_remote$fn__13714$fn__13719$fn__13727
   invoke
   "ui.clj"
   565]
  [clojure.core.server$remote_prepl$fn__9088$fn__9090
   invoke
   "server.clj"
   322]
  [clojure.core.server$remote_prepl$fn__9088 invoke "server.clj" 321]
  [clojure.lang.AFn run "AFn.java" 22]
  [java.lang.Thread run "Thread.java" 833]],
 :cause
 "class java.lang.String cannot be cast to class clojure.lang.LineNumberingPushbackReader (java.lang.String is in module java.base of loader 'bootstrap'; clojure.lang.LineNumberingPushbackReader is in unnamed module of loader 'app')",
 :phase :read-eval-result}

This is because read+string receives a string instead of a LineNumberingPushbackReader on this line: https://github.com/nubank/morse/blob/main/src/dev/nu/morse/ui.clj#L565

To be fair, I don't understand why it uses read+string there, read-string looks more fitting in this case where we only want a value.

"def as" on list attempts evaluation (and fails)

I have a cons list and when using "def as" on it, morse attempts to evaluate it which doesn't work because the elements of the list aren't evaluatable (it's a list of many maps, which exceeds the arity of a map).

A simple reproduction is to type into the Eval area: '(1 2 3 4), then focus the result, then try to "def as" it as a.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.