read-eval-print-loop

How to run Python 3 in Sublime 2 REPL Mac

二次信任 提交于 2019-12-22 05:53:57
问题 My question is the following, I have sublime 2 and sublime repl plugin installed all working fine, the only thing i need is to change the version of python that is running on the sublimerepl built in console. What I mean is, I have python 2.7.5 (which is pre installed with maveriks) running fine in sublime (via sublimerepl), and I have installed via the installer from python.org, python 3.3.3 , that I need to use, I want to run this version of python on the sublimerepl console but I don't

Can I stop the execution of an infinite loop in Scala REPL?

别说谁变了你拦得住时间么 提交于 2019-12-22 01:52:21
问题 Can I stop the execution of an infinite loop in Scala REPL? Type this and try to stop it without quitting the REPL. while(true){} I thought something like Ctrl-C would work. 回答1: It depends on your scala version. If you are already on scala 2.9 it will work by just using CTRL-C. It might take some time untile the command reaches the REPL but it will abort your infinite loop at some time. If you are on an older version of scala (before 2.9). There is no way to stop execution. On those versions

How to customize the SBCL REPL?

徘徊边缘 提交于 2019-12-21 08:44:09
问题 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. 回答1: You could use rlwrap If you have MacPorts installed you can get it with sudo port install rlwrap The invoke sbcl with rlwrap sbcl 回答2: There's vim+slime (slimv) too, for vim users. 回答3: Most of the people use SBCL REPL with SLIME . It gives it by far much more features, then readline , that is

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

你说的曾经没有我的故事 提交于 2019-12-21 08:08:11
问题 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. :) 回答1: 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

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

自古美人都是妖i 提交于 2019-12-21 08:08:08
问题 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. :) 回答1: 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

How to suspend node REPL and resume at a later stage with all the environment preserved?

ε祈祈猫儿з 提交于 2019-12-21 07:36:20
问题 I wish to suspend a REPL session so that I could shut down the system and then at a later time continue to work on the REPL session as if I'd never closed it, i.e. without having to lose all the environment. I think that the possible solutions to this could be Snapshot memory, save to file and load env from file later : I think this would be the neatest solution, like happens when you use the 'hibernate' feature of Windows. I've found this heapdump utility which is intended to take a memory

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

谁说我不能喝 提交于 2019-12-21 04:27:28
问题 Is it possible to switch phase without exiting from current session? I've tried entering :power mode, but it still doesn't print types. 回答1: 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

How to Import modules without an Xcode project in Swift

五迷三道 提交于 2019-12-21 04:19:08
问题 I am using the command line to create swift files and using the "swift" command in order to run one of them. However I would like one file to be able to access functions from another file. If this were C then I could use the #include macro and specify where the file is. But Swift's import statement doesn't seem to allow that. There should be a way and I would like to know how to do it. for example: If I have a file with a function in it and then I make another file that uses that function.

C# REPL tools; quick console-like compiling tool

旧巷老猫 提交于 2019-12-21 03:58:24
问题 Often times, I start a new instance of Visual Studio, just to create a console application that has some output and/or input. It's a temporary sandbox I use to test a method or something else and close a few minutes later. Can you think of any tools to replace this? I use to have an application that had two text fields: one on top to take C# code, and one on the bottom, to act as an stdout. But I can't remember the name. 回答1: Take a look at LINQPad. It's light-weight and has lots of features.

Why is leiningen so slow when it starts?

吃可爱长大的小学妹 提交于 2019-12-21 03:39:15
问题 I'm using lein repl to execute clojure repl in console. When I run it, it takes over 15 seconds . When I run java -cp clojure-1.6.0.jar clojure.main , it takes just a few seconds. Why is lein repl so slow? Are there anyways to make it faster? My env: H/W: MacBookAir O/S: Mac OS 10.9 Mavericks CPU: i7 MEM: 8GB 回答1: Leiningen starts two JVMs, and hooks them together. It's got to load extra stuff to do that. The prompt you type into is a different process from the Clojure process that evaluates