read-eval-print-loop

Is there a better console for PHP than running in interactive mode

≡放荡痞女 提交于 2019-12-04 03:20:30
Is there something like ipython for PHP? Syntax highlighting and not having the console exit to shell on the first exception would be nice to haves. :) The Interactive Shell will be improved in PHP 5.4. See http://schlueters.de/blog/archives/133-Now-in-trunk-Improved-interactive-shell.html Improved CLI Interactive readline shell (Johannes) Added cli.pager ini setting to set a pager for output. Added cli.prompt ini settingto configure the shell prompt. Added shortcut #inisetting=value to change ini settings at run-time. Don't terminate shell on fatal errors. An alternative would be http://phpsh

How to customize the SBCL REPL?

女生的网名这么多〃 提交于 2019-12-04 01:28:19
Is there a way to customize the SBCL REPL in a way that makes it work similar to the CLISP REPL. The standard SBCL REPL isn't really usable on Mac OS X. I can't use the arrow keys or backspace. You could use rlwrap If you have MacPorts installed you can get it with sudo port install rlwrap The invoke sbcl with rlwrap sbcl There's vim+slime (slimv) too, for vim users. Most of the people use SBCL REPL with SLIME . It gives it by far much more features, then readline , that is used in CLISP. If you aren't comfortable with using Emacs, you can try ABLE (available through quicklisp) - a very simple

lein REPL server launch timed out

社会主义新天地 提交于 2019-12-03 22:43:42
in a liberator based clojure project we are using datomic as DB. After migrating our local dev DB to a S3 hosted one and adding the needed dependencies on our project.clj we cannot launch the REPL but the Liberator stack runs fine through lein run My guess is that the DB connection is messing things up, so, the question is, how can I somehow "debug" or figure out what's the reason of this lein repl timeout? My project.clj (defproject myproject "0.1.0-SNAPSHOT" :main myproject.core :jvm-opts ["-Xmx1G"] :datomic {:schemas ["resources" ["myproject-schema.edn" ]]} :plugins [[lein-ring "0.8.10"]] ;

New console window when developing in the repl

不羁岁月 提交于 2019-12-03 21:33:46
If I'm developing, let's say, a console text editor, how could I call a new console frame from the lein repl? (or any repl) If it's called (main "file.txt") from the repl it would be 'popped' a new console window with the the file.txt content where I could edit. 来源: https://stackoverflow.com/questions/40961962/new-console-window-when-developing-in-the-repl

REPL on console emacs

浪尽此生 提交于 2019-12-03 16:48:16
问题 I'm using the console version of emacs (that is, I'm SSH'ed into a remote machine and using emacs there) and I was wondering how (assuming it's possible) to start up the REPL from there. I'm pretty new to Lisp and emacs. 回答1: How about M-x ielm ? ielm: Inferior Emacs Lisp Mode 回答2: You can run a terminal emulator with M-x term in Emacs and use any REPL you like in there. I prefer it to inferior modes, but I think it's just a matter of taste. 来源: https://stackoverflow.com/questions/4250913

Saving my running toplevel for later

↘锁芯ラ 提交于 2019-12-03 14:37:31
问题 When working in the ocaml or ghci toplevels I often build up a significant "context" for want of a better word, values bound, functions, modules loaded, and so on. Is there a way to save all of that and reload it later so I can continue exactly where I left off? Or better yet, dump out the entire lot as a text file that could be reloaded or be trivially modified into code that I could compile into an executable (e.g. by adding a Main)? 回答1: Users of HOL light have had similar needs, and they

Scala - Initialize REPL environment

独自空忆成欢 提交于 2019-12-03 14:33:17
问题 -Hi. I'd like to embed Scala REPL with initialized environment into my app. I've looked at IMain class and it seems I could do it via instance of it. The instance is created and then stored into intp public var in process() of ILoop . How can I bind some names and/or add some imports before process() (e.g. before REPL)? Following code fails on line 3 because intp is not yet created (=> NPE): val x = 3 val interp = new ILoop interp.bind("x", x) // -> interp.intp.bind("x", x) val settings = new

How turn off/on typer phase in scala repl and sbt console

拟墨画扇 提交于 2019-12-03 12:47:11
Is it possible to switch phase without exiting from current session? I've tried entering :power mode, but it still doesn't print types. In SBT just add the following setting: set scalacOptions in (Compile, console) := "-Xprint:typer" in REPL you can use :settings -Xprint:typer 来源: https://stackoverflow.com/questions/22354102/how-turn-off-on-typer-phase-in-scala-repl-and-sbt-console

Scala REPL: How to find function type?

心不动则不痛 提交于 2019-12-03 11:55:52
In Scala REPL one can find value types: scala> val x = 1 x: Int = 1 scala> :t x Int Yet Scala REPL does not show the type information for functions: scala> def inc(x:Int) = x + 1 inc: (x: Int)Int scala> :t inc <console>:9: error: missing arguments for method inc; follow this method with `_' if you want to treat it as a partially applied function inc ^ <console>:9: error: missing arguments for method inc; follow this method with `_' if you want to treat it as a partially applied function inc ^ How to find function type in Scala REPL ? Following the suggestion will work pretty well: :t inc _ Int

settings.maxPrintString for Scala 2.9 REPL

≡放荡痞女 提交于 2019-12-03 05:58:43
问题 I'd like to disable truncation of string values in the Scala REPL. The following thread suggested typing settings.maxPrintString = 0 : How to force interpreter show complete stack trace? Unfortunately, this doesn't seem to work with Scala 2.9: Welcome to Scala version 2.9.1.final (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_29). Type in expressions to have them evaluated. Type :help for more information. scala> settings.maxPrintString = 0 <console>:10: error: not found: value settings val