Giter Club home page Giter Club logo

grenchman's People

Contributors

danielcompton avatar gonzih avatar hugoduncan avatar hypirion avatar shriphani avatar technomancy avatar winks avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

grenchman's Issues

Needed libraries not found from OSX binary

Download and run of OSX binary on 10.8.5 produces dynamic link error:

grench
dyld: Library not loaded: /usr/local/opt/libffi/lib/libffi.6.dylib
Referenced from: /usr/local/bin/grench
Reason: image not found
Trace/BPT trap

Note there is no /usr/local/opt directory on my system (default installation)

uname -a
Darwin twelf 12.5.0 Darwin Kernel Version 12.5.0: Mon Jul 29 16:33:49 PDT 2013; root:xnu-2050.48.11~1/RELEASE_X86_64 x86_64

otool -L grench
grench:
/usr/local/opt/libffi/lib/libffi.6.dylib (compatibility version 7.0.0, current version 7.1.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 159.1.0)
/usr/lib/libedit.3.dylib (compatibility version 2.0.0, current version 3.0.0)

mdfind -name libffi
/System/Library/Tcl/8.5/Ffidl0.6.1/libFfidl0.6.1.dylib
/System/Library/Tcl/8.4/Ffidl0.6.1/libFfidl0.6.1.dylib
/usr/lib/libffi.dylib # appears to be version 1.0.0

Multiline input

If a form is incomplete, we need to read more input.

We might be able to just send it to the server and rely on its parser to avoid reinventing the reader. Just read another line if it returns an "EOF while reading".

Debian Jessie now uses libffi6 instead of 5

The upshot of which is that the Wheezy binary now links to a nonexistent libffi, but the Ubuntu binary runs just fine.
the version in Jessie/Sid is 3.1-2:
https://packages.debian.org/jessie/libffi6
And the version the ubuntu package was last tested against apparently was 3.0.13
http://packages.ubuntu.com/raring/libffi6
which has been bumped up to 3.1-ish? which is close enough I'd think to say it works there too:
http://packages.ubuntu.com/trusty/libffi6

Installation on OSX

I'm trying to install grenchman on OSX ML:

$ wget https://grenchman.s3.amazonaws.com/downloads/grench-0.2.0-mac
$ chmod +x grench-0.2.0-mac
$ mv grench-0.2.0-mac /usr/local/bin/grench
$ grench
dyld: Library not loaded: /usr/local/opt/libffi/lib/libffi.6.dylib
  Referenced from: /usr/local/bin/grench
  Reason: image not found
[1]    20224 trace trap  grench

Am I missing something?

Thanks :)

Port repl to lambda-term

https://github.com/diml/lambda-term

Pros:

  • More advanced repl features
  • The other repl enhancement requests could either be done more easily with existing lambda-term features, or contributed to lambda-term for the good of all of us

Cons:

  • Adds a bunch of dependencies (though it removes the dependency on libreadline)

~/.inputrc setting 'set editing-mode vi' ignored

~/.inputrc setting 'set editing-mode vi' ignored, even if it seems to be working for other programs, i.e. bash.

Mac OS X: 10.11.6 (El Capitan)
grenchman 0.2.0
Leiningen 2.6.1 on Java 1.8.0_05

Exit code on exceptions

I suppose the project is no longer actively developed but I'd like to submit the idea, just in case.

For scripting (e.g. on CI server) it would be great to be able to get exit error codes on evaluation exceptions. At the moment it looks like grench always returns 0:

ᐅ grench eval '(throw (ex-info "oops" {}))'
clojure.lang.ExceptionInfo: oops
 at clojure.core$ex_info.invokeStatic (core.clj:4725)
 ...

ᐅ echo $?                                                              
0

Running leiningen tasks doesn't work in a project-local REPL

This is what I tried:

$ lein new app hello
$ cd hello
$ lein run
Hello, World!
$ lein repl :headless
$ LEIN_REPL_PORT=`cat .nrepl-port` grench lein run # in another terminal session
  Unknown status: 19:namespace-not-found
  Unknown status: 5:error

It seems like setting the ns to leiningen.core.main is giving a namespace-not-found error, but I have no idea why.

interrupts don't seem to work

When starting a process like grench lein cljsbuild auto foo it doesn't seem possible to kill this with Control-C.

confusing error messages.

$ lein trampoline repl :headless 
nREPL server started on port 38457 on host 127.0.0.1
$ lein version
Leiningen 2.3.0 on Java 1.7.0_25 OpenJDK 64-Bit Server VM

so far so good

$ ~/bin/grench-0.2.0-debian-7 eval '(println "hi")' 
Couldn't read port from .nrepl-port or $GRENCH_PORT.
$ GRENCH_PORT=38457 ~/bin/grench-0.2.0-debian-7 eval '(println "hi")'
hi

ok

$ ~/bin/grench-0.2.0-debian-7 lein version 
Couldn't read port from ~/.lein/repl-port or $LEIN_REPL_PORT.

If Leiningen is not running, launch `lein repl :headless' from outside a
project directory and try again.
$ LEIN_REPL_PORT=38457 ~/bin/grench-0.2.0-debian-7 lein version
  Unknown status: 19:namespace-not-found
  Unknown status: 5:error

o_O

So, to sum it up

  • Why wouldn't ~/.lein/repl-port be created automatically? Can I just do that? Why no hint which format?
  • Why is .nrepl-port not there? And why is that in the current dir? Same questions as above as well
  • If I set LEIN_REPL_PORT, why does that not work?

Upgrading to leiningen 2.3.3 did not help, btw.

Isolate plugin loading inside classloader

If we are to re-use a JVM for Leiningen itself, we'll get unpredictable results unless we isolate each project's set of plugins in their own classloader. This will need to be implemented inside Leiningen.

Cannot build

using the build instructions on ubuntu 17.10 64bit

ocamlbuild -use-ocamlfind -lflags -cclib,-lreadline grench.native
+ ocamlfind ocamlc -c -g -annot -thread -package core -package async -package ctypes.foreign -o nrepl.cmo nrepl.ml
File "nrepl.ml", line 1, characters 5-14:
Warning 3: deprecated: module Async.Std
[since 2017-02] use Async. The Std sub-module is no longer needed
File "nrepl.ml", line 2, characters 5-13:
Warning 3: deprecated: module Core.Std
[since 2017-02] Use Core. The Std sub-module is no longer needed
File "nrepl.ml", line 11, characters 21-61:
Warning 3: deprecated: module Core.Std
[since 2017-02] Use Core. The Std sub-module is no longer needed
File "nrepl.ml", line 76, characters 6-13:
Error: This pattern matches values of type 'a option
       but a pattern was expected which matches values of type
         equal:(string -> string -> bool) -> string option
Command exited with code 2.
Compilation unsuccessful after building 8 targets (6 cached) in 00:00:00

Implement completion in Repl module

According to the readline docs, we need to set the rl_completion_entry_function variable to a function pointer, but the ctypes docs don't really cover how that works.

Support for remote hosts

Or is this a non-starter because nrepl doesn't have authentication? Or is it there and I'm just really bad at reading OCaml?

libffi not found on OSX Yosemite

When I execute grench-0.2.0-mac (placed on the $PATH as executable), I get the following error:

(user@air) ~/bin $ ./grench-0.2.0-mac
dyld: Library not loaded: /usr/local/opt/libffi/lib/libffi.6.dylib
Referenced from: /Users/user/bin/./grench-0.2.0-mac
Reason: image not found
Trace/BPT trap: 5

Grench lein broken?

I get an error when I launch, for instance grench lein help. The conf below, this is the error I get:

Exception in thread "nREPL-worker-0" java.lang.Error: java.net.SocketException: Socket closed
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1148)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.net.SocketException: Socket closed
    at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:116)
    at java.net.SocketOutputStream.write(SocketOutputStream.java:153)
    at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
    at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
    at clojure.tools.nrepl.transport$bencode$fn__243.invoke(transport.clj:103)
    at clojure.tools.nrepl.transport.FnTransport.send(transport.clj:28)
    at clojure.tools.nrepl.middleware.render_values$wrap_renderer$reify__1138.send(render_values.clj:30)
    at cider.nrepl.middleware.track_state$make_transport$reify__15743.send(track_state.clj:186)
    at clojure.tools.nrepl.middleware.interruptible_eval$interruptible_eval$fn__679$fn__682.invoke(interruptible_eval.clj:223)
    at clojure.tools.nrepl.middleware.interruptible_eval$run_next$fn__674.invoke(interruptible_eval.clj:190)
    at clojure.lang.AFn.run(AFn.java:22)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    ... 2 more

It looks like a nrepl middleware issue. If I remove my profile.clj the error changes in:

Unknown status: 19:namespace-not-found

Can I do something to debug?

My conf:

Leiningen 2.5.3 on Java 1.8.0_66 Java HotSpot(TM) 64-Bit Server VM
nREPL server started on port 34379 on host 127.0.0.1 - nrepl://127.0.0.1:34379
REPL-y 0.3.7, nREPL 0.2.11
Clojure 1.7.0

Raw clojure.main repl hangs

This should give you a rudimentary repl, but it hangs when run inside a project:

$ grench run -m clojure.main/main -r

Turns out the need-input status is never sent over nrepl.

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.