All Projects → gnestor → magic-console

gnestor / magic-console

Licence: MIT License
Interactive programming for Atom

Programming Languages

javascript
184084 projects - #8 most used programming language
CSS
56736 projects
coffeescript
4710 projects
python
139335 projects - #7 most used programming language
ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to magic-console

SLIMA
Superior Lisp Interactive Mode for Atom
Stars: ✭ 59 (+353.85%)
Mutual labels:  atom, repl
Radian
A 21 century R console
Stars: ✭ 878 (+6653.85%)
Mutual labels:  console, repl
Omnia
Stars: ✭ 81 (+523.08%)
Mutual labels:  console, repl
Hydrogen
Run code interactively, inspect data, and plot. All the power of Jupyter kernels, inside your favorite text editor.
Stars: ✭ 3,763 (+28846.15%)
Mutual labels:  atom, repl
Atom Chlorine
An Atom plugin to integrate with Socket-REPL over Clojure, ClojureScript, ClojureCLR, Joker, Babashka, Clojerl, Lumo and Plank
Stars: ✭ 155 (+1092.31%)
Mutual labels:  atom, repl
x-terminal
An xterm based Atom plugin for providing terminals inside your Atom workspace.
Stars: ✭ 34 (+161.54%)
Mutual labels:  atom, console
fancyline
Readline-esque library with fancy features
Stars: ✭ 72 (+453.85%)
Mutual labels:  console, repl
tinker-zero
Bridge laravel/tinker for your laravel-zero applications
Stars: ✭ 39 (+200%)
Mutual labels:  console, repl
unity-rich-text
🌈 Forget about rich text tags pain
Stars: ✭ 14 (+7.69%)
Mutual labels:  console
asciichart-sharp
C# port of asciichart
Stars: ✭ 27 (+107.69%)
Mutual labels:  console
syntax-atom-ui
An Atom UI theme inspired by Framer’s popular code editor.
Stars: ✭ 26 (+100%)
Mutual labels:  atom
mautic-cron-commands
Script to run Mautic commands from a web page.
Stars: ✭ 32 (+146.15%)
Mutual labels:  console
jsxt
The collection of Javascript / JScript / VBScript extensions, tools and more
Stars: ✭ 23 (+76.92%)
Mutual labels:  repl
serilog-sinks-richtextbox
A Serilog sink that writes log events to a WPF RichTextBox control with colors and theme support
Stars: ✭ 48 (+269.23%)
Mutual labels:  console
webinc
Webex in console - Cisco Webex Teams Client for Linux/MacOS/Windows
Stars: ✭ 17 (+30.77%)
Mutual labels:  console
moses-smt
Dock You a Moses: Moses Statistical MT in a container
Stars: ✭ 12 (-7.69%)
Mutual labels:  repl
dataViz CADi
Materials for the "Data Visualization" CADi workshop @ "Tecnológico de Monterrey"
Stars: ✭ 14 (+7.69%)
Mutual labels:  atom
prettier-eslint-atom
DEPRECATED IN FAVOR OF prettier-atom + ESLint integration
Stars: ✭ 64 (+392.31%)
Mutual labels:  atom
atom-ide-datatip
Datatips for Atom IDE
Stars: ✭ 30 (+130.77%)
Mutual labels:  atom
atom-language-perl6
Atom/Github Raku Syntax Highlighting Support 🦋
Stars: ✭ 22 (+69.23%)
Mutual labels:  atom

Magic Console (alpha)

Interactive programming for Atom

Magic Console is a package for Atom that evaluates code in pretty much any language and renders the output alongside the source code. If that alone weren't good enough, it also visualizes the outputs in a human-friendly way (e.g. string as Markdown, array as table, object/dictionary as tree). Wait there's more! Visualizations are entirely pluggable, so you can take advantage of the core plugins and plugins created by the community or create a custom plugin for your specific application.

Features

  • Visual
  • Interactive
    • Static and dynamic visualizations
    • Re-evaluate source code on save
    • Hot reload visualizations on save
      • Automatically install NPM dependencies when declared in visualization source (coming soon!)
    • Time-travel between past output states
  • Universal
  • Plug and play
    • No configuration necessary
    • No (dev) server necessary

Practical applications

Interactive playground

Use Magic Console to try out code, explore results, run experiments, etc.

Interactive testing

Use Magic Console to test code as you write it. Since you are evaluating your code in real-time, you don't need to write tests. Nonetheless, you can write assertions against your code and render the outputs using the Test plugin.

Interactive documentation

Use Magic Console to mix Markdown documentation with interactive code examples.

Getting started

Install

  • Install Atom
  • Clone the repo
    • git clone https://github.com/gnestor/magic-console.git
    • cd magic-console
  • Install the dependencies
    • npm install
  • Link the directory
    • apm link

Commands

Command OS X Linux/Windows Notes
Magic Console: Toggle CMD+ENTER CTRL+ENTER Evaluate current file or selected text
Magic Console: Open plugins directory Open the plugins directory in a new workspace
Magic Console: Create new plugin Create a new plugin and open it in the current workspace
Magic Console: Step Backward CMD+Z CTRL+Z Step back in output history
Magic Console: Step Forward CMD+SHIFT+Z or CMD+Y CTRL+Y Step forward in output history

FAQ

I don't see any output...

The runtime for the source code must be supported by Magic Console and installed. For example, if your source code is a CoffeeScript file, then as long as the coffee-script runtime is installed, you're good to go because CoffeeScript is supported. If your source code is a Dogescript file, then you would need to add that runtime because it's not supported yet and have dogescript runtime installed.

I'm getting compilation errors...

Check out the active grammar for your source code in the lower-right side of the bottom status bar and make sure that it matches the programming language you are using. For example, if you are writing ES6 Javascript and you are seeing "Javascript" and not "Babel ES6 Javascript," you need to install the "Babel ES6 Javascript" grammar and use it instead.

How do I?

  • Watch a file: Enable "Evaluate on save" in Magic Console's package settings
  • Toggle between visualizations/plugins?: Hover over an output and use the drop-down selector to toggle between plugins available for that data type
  • Edit a plugin's source code: Hover over the plugin and click the code button. The plugin source code will open in a new editor panel and allow you to edit the source code inline with its rendering. When the source code is saved, it will be hot reloaded and the rendering will be updated instantly.
  • Clear the outputs: Hover out the outputs and click the clear button at the top.
  • Copy/paste output: Hover over the outputs and click the copy button at the top to copy the raw output data to the clipboard.
  • Import output data into another source file or application?: The output data for each source file is serialized in a hidden file by the same name in the same directory (.helloWorld.js.json for helloWorld.js). You can import this data as JSON like so (using Javascript):
import {outputs} from './.helloWorld.js.json'

Contributing

Use the Atom contributing guidelines

Workflow

  • Re-install dependencies after pulling upstream changes
    • npm install
  • Run Atom in dev mode
    • npm start or atom --dev .
  • Submit a pull request!

Thanks

Appendix

Supported runtimes

  • 1C (BSL)
  • AppleScript
  • Bash
  • Behat Feature
  • C
  • C++
  • C#
  • cript
  • Clojure (via Leiningen)
  • Coffeescript
  • CoffeeScript (Literate)
  • Crystal
  • Cucumber (Gherkin)
  • D
  • DOT
  • Elixir
  • Erlang
  • F#
  • Forth (via GForth)
  • Gnuplot
  • Go
  • Groovy
  • Haskell
  • ioLanguage
  • Java
  • Javascript
  • JavaScript for Automation (JXA)
  • Jolie
  • Julia
  • Kotlin
  • LaTeX (via latexmk)
  • LilyPond
  • Lisp (via SBCL)
  • Literate Haskell
  • LiveScript
  • Lua
  • Makefile
  • MoonScript
  • MongoDB
  • NCL#
  • newLISP
  • Nim (and NimScript)
  • NSIS
  • Objective-C
  • Objective-C++
  • OCaml
  • Pandoc Markdown
  • Perl
  • Perl 6
  • PHP
  • PostgreSQL
  • Prolog
  • Python
  • RSpec
  • Racket
  • RANT
  • Ruby
  • Ruby on Rails
  • Rust
  • Sage
  • Sass/SCSS
  • Scala
  • Shell Script
  • Swift
  • TypeScript
  • Dart
  • Octave
  • Zsh

Add a runtime

Clojure:
  "Selection Based":
    command: "lein"
    args: (context)  -> ['exec', '-e', context.getCode()]
  "File Based":
    command: "lein"
    args: (context) -> ['exec', context.filepath]
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].