1. 6

    as a vim user, i’ve been wasiting time figuring out the best way to do overtone things without emacs.

    i want to be able to send snippets of code to a lein repl, and i think i’ve settled on vimux (and tmux)

    it works pretty well actually. i tried using it for haskell to interact with ghci (actually, ghci-color) but it doesn’t work so well, because you need to wrap multiline things in “:{ … :}”, and just copying a definition like

    foo :: String
    foo = "Whatevs"
    

    doesn’t work, as it needs to be

    let foo :: String
        foo = "Whatevs"
    

    what i should really be doing is study.

    1. 3

      Perhaps you might get farther using vim-ipython combined with IHaskell? I haven’t done it myself (I should try!) but I’ve heard that vim-ipython might work with IHaskell.

      (Disclaimer: IHaskell is my project, so of course take anything I say about it with a grain of salt :) The vim-ipython author filed some issues at some point that made it seem like it should work with IHaskell just fine.)

      1. 1

        i wouldn’t even mind using IHaskell by itself; i’ll give it a try again. i’ve tried it before, but i don’t really like the docker way of running it; and the standard installation hasn’t worked out for me; but i can try again when i have more time.

      2. 3

        I wish the vim REPL integration plugins were easier to use. I’ve had heaps of trouble getting IDE-like features to work. I’m currently using haskellmode-vim, which seems to work OK, but as soon as I import a cabal dependency, I can’t load a module directly in ghci and therefore haskellmode-vim’s type inference stuff fails.

        1. 2

          yeah; i think if i had a bit of free time i’d probably just sit down and learn emacs (or lighttable)

          1. 2

            tpope’s dispatch and fireplace work pretty well if you’re already a tmux user. I’m not gonna pretend that it’s like having an actual emacs repl but it’s not too bad and might actually work really well with overtone!

        1. 2

          A high performing Lisp that isn’t on the JVM and isn’t old as hell? /me drools

          1. 2

            A faster Clasp compiler is coming soon – the current Clasp compiler generates slow native code that is about 100x slower than highly tuned Common Lisp compilers like Steel Bank Common Lisp.

            Let’s hope that a higher performance version will indeed be coming soon :-)

            1. 1

              The project direction looks like it will be high performing eventually, as opposed to something like Racket which doesn’t have any plans to be natively compiled and isn’t terribly concerned with being blazing fast. Building on LLVM is a big hint that Clasp is going the opposite direction. That being said, I love Racket! <3

              Also, SBCL was what I was thinking of when I said old as hell. ;)

              1. 2

                What about ABCL and RoboVM?

                1. 1

                  I don’t know CL or even ABCL but I made a little progress. I followed this blog post on standalone ABCL jars.

                  But changed

                  // Load.loadSystemFile
                                  //("greet.lisp", false, false, false);
                                  Load.load
                                  ("./greet.lisp");
                  

                  Compile with

                  robovm -forcelinkclasses org.armedbear.lisp.* -verbose -jar greet.jar

                  gives me a stack trace I dont understand. The jar does run for me, but still references greet.lisp from the local filesystem, isn’t pulling it as a resource.

                  https://gist.github.com/anonymous/5d3a41fac14bd749b44e


                  It looks like ABCL calls

                  src/org/armedbear/lisp/JavaClassLoader.java
                  186:        return defineClass(name, b, off, len);
                  

                  which RoboVM doesn’t like

                  https://github.com/robovm/robovm/blob/89c55499db665b8ad6db38e68b893b13c9160db0/rt/libcore/libdvm/src/main/java/java/lang/ClassLoader.java#L242-L244


                  Rather than load a .lisp file, one could precompile to .cls

                  (zt.env)volcano:greet animatronic$ abcl
                  Armed Bear Common Lisp 1.3.1
                  Java 1.7.0_67 Oracle Corporation
                  Java HotSpot(TM) 64-Bit Server VM
                  Low-level initialization completed in 0.402 seconds.
                  Startup completed in 1.866 seconds.
                  Type ":help" for a list of available commands.
                  CL-USER(1): :cf greet.lisp
                  ; Compiling /Users/animatronic/w/robovm/tests/greet/greet.lisp ...
                  ; (DEFUN MAIN ...)
                  ; Wrote /Users/animatronic/w/robovm/tests/greet/greet.abcl (0.212 seconds)
                  CL-USER(2): ^D
                  (zt.env)volcano:greet animatronic$ jar tvf greet.abcl 
                     315 Fri Sep 26 16:06:38 PDT 2014 __loader__._
                    1744 Fri Sep 26 16:06:38 PDT 2014 greet_1.cls
                    3464 Fri Sep 26 16:06:38 PDT 2014 greet_2.cls
                  (zt.env)volcano:greet animatronic$ 
                  
          1. 15

            This is a really lucid explanation of the differences between the type systems in Go, Rust and Haskell even if the title is unnecessarily controversial.

            1. 1

              Reminds me of The Uneasy Case for Copyright (Breyer 1970).