Search Results

Search found 122 results on 5 pages for 'repl'.

Page 1/5 | 1 2 3 4 5  | Next Page >

  • Wrong number of args passed to: repl$repl

    - by grm
    Hi, I have a trouble with a compojure "Getting started" example that I do not seem to understand. When I run the example from http://weavejester.github.com/compojure/docs/getting-started.html ...I get the following error at the lein repl step: ~/hello-www> lein repl src/hello_www/core.clj Exception in thread "main" java.lang.IllegalArgumentException: Wrong number of args passed to: repl$repl (NO_SOURCE_FILE:0) at clojure.lang.Compiler.eval(Compiler.java:5359) at clojure.lang.Compiler.eval(Compiler.java:5311) at clojure.core$eval__4350.invoke(core.clj:2364) at clojure.main$eval_opt__6502.invoke(main.clj:228) at clojure.main$initialize__6506.invoke(main.clj:247) at clojure.main$script_opt__6526.invoke(main.clj:263) at clojure.main$main__6544.doInvoke(main.clj:347) at clojure.lang.RestFn.invoke(RestFn.java:483) at clojure.lang.Var.invoke(Var.java:381) at clojure.lang.AFn.applyToHelper(AFn.java:180) at clojure.lang.Var.applyTo(Var.java:482) at clojure.main.main(main.java:37) Caused by: java.lang.IllegalArgumentException: Wrong number of args passed to: repl$repl at clojure.lang.AFn.throwArity(AFn.java:439) at clojure.lang.AFn.invoke(AFn.java:43) at clojure.lang.Var.invoke(Var.java:369) at clojure.lang.AFn.applyToHelper(AFn.java:165) at clojure.lang.Var.applyTo(Var.java:482) at clojure.core$apply__3776.invoke(core.clj:535) at leiningen.core$_main__59$fn__61.invoke(core.clj:94) at leiningen.core$_main__59.doInvoke(core.clj:91) at clojure.lang.RestFn.applyTo(RestFn.java:138) at clojure.core$apply__3776.invoke(core.clj:535) at leiningen.core$_main__59.invoke(core.clj:97) at user$eval__67.invoke(NO_SOURCE_FILE:1) at clojure.lang.Compiler.eval(Compiler.java:5343) ... 11 more I have tried both the stable and the developer version of lein without any success. Any ideas on what I could look for next? I get the same result both on linux and cygwin. When I run it manually, it seems to work fine on linux: java -cp "lib/*" clojure.main src/hello_www/core.clj 2010-05-17 19:34:17.280::INFO: Logging to STDERR via org.mortbay.log.StdErrLog 2010-05-17 19:34:17.281::INFO: jetty-6.1.14 2010-05-17 19:34:17.382::INFO: Started [email protected]:8080

    Read the article

  • Launch Scala REPL programatically?

    - by David Crawshaw
    I would like to launch a Scala Swing application from the command line, then after the application is started, drop into the Scala REPL to use as a control interface. Ideally I would also like to pre-bind some variable names. Even better would be using a Java2D terminal emulator for the REPL, but I couldn't find anything appropriate. Does the Scala REPL have a public API?

    Read the article

  • Unresponsive Clojure REPL after exception

    - by Hendekagon
    If I start a REPL and then do something that throws an exception like (use 'non-existent-thing) ** then after that the REPL ceases to evaluate anything I enter. Is there a special key I can press to make it turn round, face me, uncross its arms and listen once more ? Or must I ctrl-d, restart, type everything up to where I was and get it right this time ? ** which results in: Exception in thread "Thread-1" java.lang.RuntimeException: java.io.FileNotFoundException: Could not locate non_existent_thing__init.class or non_existent_thing.clj on classpath: (NO_SOURCE_FILE:0)

    Read the article

  • Java REPL shell

    - by Don
    Hi, I'm looking for a REPL shell that I can use to test out snippets of Java code. Either a desktop app, or a web app (like the Groovy web console). Ideally, commonly used Java packages like: java.io.* java.util.* should be automatically imported, so that I can copy and paste code from a class without having to add a bunch of imports. Does such a thing exist? Thanks, Donal

    Read the article

  • lua recursive repl on error?

    - by anon
    In many scheme/lisp dialects, when an error occurs, a "recursive repl" is popped up ... one can execute scheme/lisp code at the frame where the error occured, and go up/down the stack. Is it possible to do something similar to this in lua? Thanks!

    Read the article

  • scala REPL is slow on vista

    - by Jacques René Mesrine
    I installed scala-2.8.0.RC3 by extracting the tgz file into my cygwin (vista) home directory. I made sure to set $PATH to scala-2.8.0.RC3/bin. I start the REPL by typing: $ scala Welcome to Scala version 2.8.0.RC3 (Java HotSpot(TM) Client VM, Java 1.6.0_20). Type in expressions to have them evaluated. Type :help for more information. scala> Now when I tried to enter an expression scala> 1 + 'a' the cursor hangs there without any response. Granted that I have chrome open with a million tabs and VLC playing in the background, but CPU utilization was 12% and virtual memory was about 75% utilized. What's going on ? Do I have to set the CLASSPATH or perform other steps.

    Read the article

  • "Final" Scheme REPL definitions: how to save them?

    - by Aeneas
    Is there a way to show and save all "final" definitions entered into a Scheme REPL into a text file? Say, if I have defined in the REPL: (define (increase x) (+ 1 x)) (define (multbytwo x) (* 3 x)) ; let us say this was an error (define (multbytwo x) (* 2 x)) I want to save this into an .scm-file with the content: (define (increase x) (+ 1 x)) (define (multbytwo x) (* 2 x)) i.e. the multbytwo function that got defined erraneously shall be "forgotten" due to re-definition. Is this possible?

    Read the article

  • Dump output from REPL

    - by Ankit Soni
    I'm writing SML programs, and I'd like a way to quickly see the output from running a program in the REPL without actually running the REPL (to quickly see if a program has syntax errors - I plan to use this as a make program for .sml files in vim to view the output inside vim).. Currently, I have this: sml file.sml | echo -e "\004" So it runs the program, and then echoes Ctrl-D to exit the REPL. The problem is that its too quick to send the Ctrl-D key, so there is no output. I tried this too: sml file.sml | sleep 2 ; echo -e "\004" But that isn't doing it either. Any ideas on how I can get a dump of the output from the REPL?

    Read the article

  • Is there an easy way to get the Scala REPL to reload a class or package?

    - by Rex Kerr
    I almost always have a Scala REPL session or two open, which makes it very easy to give Java or Scala classes a quick test. But if I change a class and recompile it, the REPL continues with the old one loaded. Is there a way to get it to reload the class, rather than having to restart the REPL? Just to give a concrete example, suppose we have the file Test.scala: object Test { def hello = "Hello World" } We compile it and start the REPL: ~/pkg/scala-2.8.0.Beta1-prerelease$ bin/scala Welcome to Scala version 2.8.0.Beta1-prerelease (Java HotSpot(TM) Server VM, Java 1.6.0_16). Type in expressions to have them evaluated. Type :help for more information. scala> Test.hello res0: java.lang.String = Hello World Then we change the source file to object Test { def hello = "Hello World" def goodbye = "Goodbye, Cruel World" } but we can't use it: scala> Test.goodbye <console>:5: error: value goodbye is not a member of object Test Test.goodbye ^ scala> import Test; <console>:1: error: '.' expected but ';' found. import Test;

    Read the article

  • Improving the speed of writing code in C#

    - by Robert Harvey
    Laugh if you want, but I used to develop substantial line-of-business applications in VB6, long before the .NET framework came along. Why, when I was your age, we used to walk two miles in the snow, uphill. Both ways... Love it or hate it, VB6 had a REPL-like feel, and a very rapid development cycle. I would like to know how to come closer to that process in C#. In VB6, I could write a function, execute it, debug it and have it fully functional in a few minutes. I am told this is how the Lisp crowd works. It's a very rapid-fire style of programming. In C# I write a function, then I write a unit test for that function (which is OK, I understand the value of that), then I right-click, run test, wait for the project to compile (takes about 10 seconds right now, which would be an eternity for a REPL loop), and get an exception. Honestly, this feels more like my junior college days, when I used to feed punch cards into a hopper and wait for a printout (exaggerating only slightly for effect). Additionally, my tendency nowadays is to make everything public while I'm testing it. Unit testing with private accessors works fine, but you can't trace through the code (unless, of course, I'm doing something wrong) while you're using them. So what I'd like to know is, what adjustments have you made to your development process in C# to streamline it, and make it possible to write and verify your code very rapidly?

    Read the article

  • How to implement a python REPL that nicely handles asynchronous output?

    - by andy
    I have a Python-based app that can accept a few commands in a simple read-eval-print-loop. I'm using raw_input('> ') to get the input. On Unix-based systems, I also import readline to make things behave a little better. All this is working fine. The problem is that there are asynchronous events coming in, and I'd like to print output as soon as they happen. Unfortunately, this makes things look ugly. The " " string doesn't show up again after the output, and if the user is halfway through typing something, it chops their text in half. It should probably redraw the user's text-in-progress after printing something. This seems like it must be a solved problem. What's the proper way to do this? Also note that some of my users are Windows-based. TIA Edit: The accepted answer works under Unixy platforms (when the readline module is available), but if anyone knows how to make this work under Windows, it would be much appreciated!

    Read the article

  • Python repl in python application

    - by Olorin
    Hello i am learning python(so i can use qt with python not only c++) and i'm curios if it would be possible to embed a python interpreter in my application as a repl. I would like to give users to possibility to script the app using python either loading a file (and that file to act as a plugin for the app) or by evaluating code entered in a text box or something like that. Just like you can embed the interpreter in C or C++ and script the app using python can this be done if the application is itself written in python(and made a stand-alone binary using py2exe or something similar)? something like Anders did with the C# repl or Miguel with mono. Thanks.

    Read the article

  • Using clojure.contrib functions in slime REPL

    - by Tyler
    I want to use the functions in the clojure.contrib.trace namespace in slime at the REPL. How can I get slime to load them automatically? A related question, how can I add a specific namespace into a running repl? On the clojure.contrib API it describes usage like this: (ns my-namespace (:require clojure.contrib.trace)) But adding this to my code results in the file being unable to load with an "Unable to resolve symbol" error for any function from the trace package. I use leiningen 'lein swank' to start the ServerSocket and the project.clj file looks like this (defproject test-project "0.1.0" :description "Connect 4 Agent written in Clojure" :dependencies [[org.clojure/clojure "1.2.0-master-SNAPSHOT"] [org.clojure/clojure-contrib "1.2.0-SNAPSHOT"]] :dev-dependencies [[leiningen/lein-swank "1.2.0-SNAPSHOT"] [swank-clojure "1.2.0"]]) Everything seems up to date, i.e. 'lein deps' doesn't produce any changes. So what's up?

    Read the article

  • Clojure: using *command-line-args* in the script rather than REPL

    - by Teflon Mac
    I've clojure running within Eclipse. I want to pass arguments to clojure when running it. In the below the arguments are available in the REPL but not in the script itself. What do I need to do such that in the below typing arg1 in the REPL will return the first argument? Script: (NS Test) (def arg1 (nth *command-line-args* 0)) After clicking on the Eclipse "Run"... Clojure 1.1.0 1:1 user=> #<Namespace test> 1:2 test=> arg1 nil 1:3 test=> *command-line-args* ("bird" "dog" "cat" "pig") 1:4 test=> (def arg2 (nth *command-line-args* 1)) #'test/arg2 1:5 test=> arg2 "dog" 1:6 test=>

    Read the article

  • Sublime Text 2 + Eval in REPL

    - by user330121
    Using sublime text 2 on windows 8, I've set my key-bindings to: [ { "keys": ["ctrl+alt+f"], "args": { "id": "repl_f#", "file": "config/F/Main.sublime-menu" }, "command": "run_existing_window_command" }, { "keys": ["ctrl+shift+enter"], "args": { "scope": "selection" }, "command": "repl_transfer_current" } ] But when I press "ctrl+shift+enter" I get the following error. Does anyone know how to resolve this? Traceback (most recent call last): File ".\sublime_plugin.py", line 356, in run_ File ".\text_transfer.py", line 123, in run File ".\sublimerepl.py", line 437, in find_repl File ".\repls\subprocess_repl.py", line 185, in is_alive File ".\subprocess.py", line 705, in poll File ".\subprocess.py", line 874, in _internal_poll WindowsError: [Error 6] The handle is invalid

    Read the article

  • Is there a full REPL for Erlang?

    - by Gabriel Cuvillier
    Is there a way to have a full interpreter in Erlang, not just a "shell". Since it is a dynamic language, not being able to define named functions in the interpreter is a little bit disappointing... I suspect that it is because compilation units (modules) must be explicitly compiled for their execution by the VM, but maybe a REPL acting as a dynamic/recompilable module exist?

    Read the article

  • Java REPL onsole

    - by Don
    Hi, I'm looking for a console that I can use to test out snippets of Java code. Either a desktop app, or a web app (like the Groovy web console). Ideally, the console should automatically import commonly used package like java.io.* java.util.* So that I can copy and paste code from a class without having to add a bunch of imports. Does such a thing exist? Thanks, Donal

    Read the article

  • Are there any free embedable REPL interpreters for a website? [migrated]

    - by Google
    I am hoping to find a free REPL interpreter for a number of languages. I am starting a new web page to help developers learn with a number of tutorials. I want to embed an interpreter on the site so users can have a tutorial and interpreter side by side. I really like free interpreters such as the one at repl.it. However, I am unable to find a free/embeddable interpreter. I was hoping to avoid making one myself-- they seem tricky to make safely! Thanks!

    Read the article

  • Is there a Scala version of .irbrc or another way to define some default libraries for REPL use?

    - by Tom Morris
    I've written a little library that uses implicits to add functionality that one only needs when using the REPL in Scala. Ruby has libraries like this - for things like pretty printing, firing up text editors (like the interactive_editor gem which invokes Vim from irb - see this post), debuggers and the like. The library I am trying to write adds some methods to java.lang.Class and java.lang.reflect classes using the 'pimp my library' implicit conversion process to help you go and find documentation (initially, with Google, then later possibly with a JavaDoc/ScalaDoc viewer, and maybe the StackOverflow API eventually!). It's an itch-scratching library: I spend so much time copying and pasting classnames into Google that I figured I may as well automate the process. It is the sort of functionality that developers will want to add to their system for use only in the REPL - they shouldn't really be adding it to projects (partly because it may not be something that their fellow developers want, but also because if you are doing some exploratory development, it may be with just a Scala REPL that's not being invoked by an IDE or build tool). In my case, I want to include a few classes and set up some implicits - include a .jar on the CLASSPATH and import it, basically. In Ruby, this is the sort of thing that you'd add to your .irbrc file. Other REPLs have similar ways of setting options and importing libraries. Is there a similar file or way of doing this for the Scala REPL?

    Read the article

1 2 3 4 5  | Next Page >