technomancy / grenchman Goto Github PK
View Code? Open in Web Editor NEWSorry about the name
License: GNU General Public License v3.0
Sorry about the name
License: GNU General Public License v3.0
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
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".
Trickier because defmulti dispatch can't be changed dynamically.
Outputs get stuck behind inputs when we send stdin
or interrupt
messages.
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
Loading up libreadline
during the build process instead of at runtime with Dl.dlopen
is supposedly better and allows for Mac compatibility since it doesn't hard-code "libreadline.so" into the source, but it breaks compatibility with Ubuntu.
Waiting for clarification as to what's going happening on this thread on the ctypes mailing list: http://lists.ocaml.org/pipermail/ctypes/2013-October/000013.html
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 :)
https://github.com/diml/lambda-term
Pros:
Cons:
At the time of this writing all of the download links on http://leiningen.org/grench.html are unavailable.
Fetching https://grenchman.s3.amazonaws.com/downloads/grench-0.2.0-debian-7:
<Error>
<Code>AllAccessDisabled</Code>
<Message>All access to this object has been disabled</Message>
<RequestId>66A583042E4636FA</RequestId>
<HostId>lztFuukq6sLsdTuGGIXW7MmCxfjAoC27qbaw1n+yDy/6z9LdUAlWIBIfdnHlFtqkCuqAPpj9qG0=</HostId>
</Error>
This should help with shebangs.
~/.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
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
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.
When starting a process like grench lein cljsbuild auto foo
it doesn't seem possible to kill this with Control-C.
$ 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
Upgrading to leiningen 2.3.3 did not help, btw.
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.
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
It's pretty easy to confuse it by running grench help copying
, etc.
According to the Cake guys, this is really hard to get right. Maybe better to let users handle this for now.
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.
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?
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
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
Basic implementation exists in the Repl
module. Needs:
Completion can be done later.
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.