[ANN] Cumino 0.2 - Now supports pretty indentation through stylish-haskell

Hi everyone, in case you have missed it, I've released a Vim plugin called Cumino: http://adinapoli.github.com/cumino/ It does one simple thing: It allows communication between Vim and tmux, in particular to a ghci session. With Cumino you can fire-up Vim, load a ghci session and interact with it with only few keystrokes. The plugin also supports visual selection: you can select for example a function (even with all its signature!) and you can send it to ghci. The visual selection supports imports, custom types and typeclasses. It's a simple idea but so damn useful, imho. This release also adds the possibility to prettify the code using the excellent stylish-haskell: select a snippet, simply indent in the usual way ( = ) and voilà, now your code is indented! Feedback are highly appreciated, as well as contributions. There are still some issues with some terminals (for example urxvt does not work right now) but the plugin has been tested against gnome-terminal, xterm and mlterm. I'll post in reddit too for completeness! Bye! Alfredo

Are urxvt-related issues documented somewhere? On 09/12/2012 05:03 PM, Alfredo Di Napoli wrote:
There are still some issues with some terminals (for example urxvt does not work right now)

Hi,
I'm not in front of the pc now, but afair the problem was related to opening a new urxvt window FROM a running urxvt.
More details soon :)
Sent from my iPad
On 12/set/2012, at 15:18, Matvey Aksenov
Are urxvt-related issues documented somewhere?
On 09/12/2012 05:03 PM, Alfredo Di Napoli wrote:
There are still some issues with some terminals (for example urxvt does not work right now)

On Wed, Sep 12, 2012 at 11:25 AM, Alfredo Di Napoli < alfredo.dinapoli@gmail.com> wrote:
I'm not in front of the pc now, but afair the problem was related to opening a new urxvt window FROM a running urxvt. More details soon :)
urxvt defaults to using a client-server model for all terminals, IIRC (we have a warning about it in the xmonad documentation as well since it messes up ManageHooks). There's possibly some option to disable this and force an independent terminal. -- brandon s allbery allbery.b@gmail.com wandering unix systems administrator (available) (412) 475-9364 vm/sms

If such a possibility exists, I would be happy to fix the urxvt support :) Bear in mind, though, that the Cumino terminal is only needed for the Ghci session, so you can use your favourite terminal to run Vim :) A.
urxvt defaults to using a client-server model for all terminals, IIRC (we have a warning about it in the xmonad documentation as well since it messes up ManageHooks). There's possibly some option to disable this and force an independent terminal.
-- brandon s allbery allbery.b@gmail.com wandering unix systems administrator (available) (412) 475-9364 vm/sms

On Wed, Sep 12, 2012 at 1:36 PM, Alfredo Di Napoli < alfredo.dinapoli@gmail.com> wrote:
If such a possibility exists, I would be happy to fix the urxvt support :)
Actually I went back through it and it should only be an issue if urxvtc is used; urxvt "should" always be standalone. Unless they went and made it too smart for its own good, in which case there might be some option to make it behave the old way. See http://www.haskell.org/haskellwiki/Xmonad/General_xmonad.hs_config_tips#Term... details. (I am assuming the problem is urxvt recognizes itself and uses the terminal factory to rub off a new window in the same process, which can't be given separate configuration information and can't be communicated with via xterm-style raw pty mode etc.) -- brandon s allbery allbery.b@gmail.com wandering unix systems administrator (available) (412) 475-9364 vm/sms

So, suppose that I'm in a terminal vim session, and I want to start ghci (in the current terminal). What do I do? <localleader>cc starts a new terminal, which is not what I want. On Wed, Sep 12, 2012 at 3:03 PM, Alfredo Di Napoli < alfredo.dinapoli@gmail.com> wrote:
Hi everyone,
in case you have missed it, I've released a Vim plugin called Cumino:
http://adinapoli.github.com/cumino/
It does one simple thing: It allows communication between Vim and tmux, in particular to a ghci session. With Cumino you can fire-up Vim, load a ghci session and interact with it with only few keystrokes. The plugin also supports visual selection: you can select for example a function (even with all its signature!) and you can send it to ghci. The visual selection supports imports, custom types and typeclasses.
It's a simple idea but so damn useful, imho.
This release also adds the possibility to prettify the code using the excellent stylish-haskell: select a snippet, simply indent in the usual way ( = ) and voilà, now your code is indented!
Feedback are highly appreciated, as well as contributions. There are still some issues with some terminals (for example urxvt does not work right now) but the plugin has been tested against gnome-terminal, xterm and mlterm.
I'll post in reddit too for completeness!
Bye! Alfredo
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Hi everyone, If this mail sound strange to you, you are free to ignore it. My name is Alfredo Di Napoli and I'm a 24-year-old programmer from Rome, Italy. I've graduated in May and I'm currently working as an intern for a company involved in the defence field. In my spare time, though, I study functional programming, especially Haskell. FP is my true passion and I'm another dreamer trying to land the job he loves. In a nutshell I'm looking for every possibility to do Haskell/functional programming in Europe/North Europe. I'm throwing this stone into this pond because life has endless possibilities, who knows? :) A disclaimer, though: I'm not an expert Haskeller, but I'm very passionate about technology and I love learning (I've obviously already read LYAH and RWH). You can find more information about me (including my CV if interested) here: www.alfredodinapoli.com Oh! One last thing! I would be very grateful to everyone willing to spent two minutes of his time giving me any kind of suggestion about the FP job world or how to prepare/improve myself for the foreseeable future. Thanks again, and sorry for the OT/spammish plug. Humbly, Alfredo Di Napoli

Hi Alfredo,
You might look at the various bigdata companies. I was surprised by
how many of them are using Scala or Clojure - it's definitely over
50%. Looks like FP is really gaining traction in this area.
On Wed, Sep 12, 2012 at 11:48 AM, Alfredo Di Napoli
Hi everyone,
If this mail sound strange to you, you are free to ignore it.
My name is Alfredo Di Napoli and I'm a 24-year-old programmer from Rome, Italy. I've graduated in May and I'm currently working as an intern for a company involved in the defence field.
In my spare time, though, I study functional programming, especially Haskell. FP is my true passion and I'm another dreamer trying to land the job he loves.
In a nutshell I'm looking for every possibility to do Haskell/functional programming in Europe/North Europe. I'm throwing this stone into this pond because life has endless possibilities, who knows? :)
A disclaimer, though: I'm not an expert Haskeller, but I'm very passionate about technology and I love learning (I've obviously already read LYAH and RWH). You can find more information about me (including my CV if interested) here:
www.alfredodinapoli.com
Oh! One last thing! I would be very grateful to everyone willing to spent two minutes of his time giving me any kind of suggestion about the FP job world or how to prepare/improve myself for the foreseeable future.
Thanks again, and sorry for the OT/spammish plug.
Humbly, Alfredo Di Napoli
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
-- Eugene Kirpichov http://www.linkedin.com/in/eugenekirpichov We're hiring! http://tinyurl.com/mirantis-openstack-engineer

On Wed, Sep 12, 2012 at 01:03:49PM +0000, Alfredo Di Napoli wrote:
Hi everyone,
in case you have missed it, I've released a Vim plugin called Cumino:
http://adinapoli.github.com/cumino/
It does one simple thing: It allows communication between Vim and tmux, in particular to a ghci session. With Cumino you can fire-up Vim, load a ghci session and interact with it with only few keystrokes. The plugin also supports visual selection: you can select for example a function (even with all its signature!) and you can send it to ghci. The visual selection supports imports, custom types and typeclasses.
It's a simple idea but so damn useful, imho.
This release also adds the possibility to prettify the code using the excellent stylish-haskell: select a snippet, simply indent in the usual way ( = ) and voilà, now your code is indented!
Feedback are highly appreciated, as well as contributions. There are still some issues with some terminals (for example urxvt does not work right now) but the plugin has been tested against gnome-terminal, xterm and mlterm.
I'll post in reddit too for completeness!
Nice bridge between vim and tmux! Would you mind add supporting for `urxvtc'? urxvtc's -e option is followed by a list of options instead of a string. urxvtc -e sh -c 'echo a' xterm -e echo a

Nice bridge between vim and tmux!
Thanks!
Would you mind add supporting for `urxvtc'? urxvtc's -e option is followed by a list of options instead of a string.
urxvtc -e sh -c 'echo a' xterm -e echo a
I would like to, and in fact I've already tried, but urxvt is trickier than other shells. Using the command you gave me does not create a new window, tested both on XMonad and Gnome. This is the error you can see using the option "-hold", this way: urxvt --hold -e "echo a" This opens a new window with the error: *urxvt: Unable to exec child. * Any idea?

On Thu, Sep 13, 2012 at 2:22 AM, Alfredo Di Napoli < alfredo.dinapoli@gmail.com> wrote:
urxvtc -e sh -c 'echo a'
xterm -e echo a
I would like to, and in fact I've already tried, but urxvt is trickier than other shells. Using the command you gave me does not create a new window, tested both on XMonad and Gnome. This is the error you can see using the option "-hold", this way:
urxvt --hold -e "echo a"
This opens a new window with the error: *urxvt: Unable to exec child. *
I think you misunderstood; as I read it (and as I would expect it to work given the above descrtiption) that would be urxvt --hold -e sh -c 'echo a' -- brandon s allbery allbery.b@gmail.com wandering unix systems administrator (available) (412) 475-9364 vm/sms

If I remember correctly, I've also tried that combinations, without success. Anyway, I'm not at work so I can't test Cumino against gnome and Xmonad until tomorrow morning: I'll keep you posted! Bye, Alfredo
I think you misunderstood; as I read it (and as I would expect it to work given the above descrtiption) that would be
urxvt --hold -e sh -c 'echo a'
-- brandon s allbery allbery.b@gmail.com wandering unix systems administrator (available) (412) 475-9364 vm/sms

Ok, I've added the support for urxvt.
Bear in mind that it partially support urxvt, though: it works fine if you
run GVim or Vim outside an already running tmux session, otherwise it won't
start.
The problem is due to the fact urxvt believes that the new session is
launched within the running tmux session, whining about nested tmux session
and not starting at all.
You can unset the $TERM variable as workaround, but I don't like that
apporach.
If you come up with an alternative solution please let me know :)
A.
On 13 September 2012 16:16, Alfredo Di Napoli
If I remember correctly, I've also tried that combinations, without success.
Anyway, I'm not at work so I can't test Cumino against gnome and Xmonad until tomorrow morning: I'll keep you posted!
Bye, Alfredo
I think you misunderstood; as I read it (and as I would expect it to work given the above descrtiption) that would be
urxvt --hold -e sh -c 'echo a'
-- brandon s allbery
allbery.b@gmail.com
wandering unix systems administrator (available) (412) 475-9364vm/sms

Sorry the typo, the variable is $TMUX and controls the nesting ot tmux
session. It turns out that if affect not only urxvt but also xterm and
gnome-terminal.
Perhaps it could be useful to unset it programmatically, I'll keep you
posted if I find a workaround.
A.
On 14 September 2012 06:14, Alfredo Di Napoli
Ok, I've added the support for urxvt. Bear in mind that it partially support urxvt, though: it works fine if you run GVim or Vim outside an already running tmux session, otherwise it won't start. The problem is due to the fact urxvt believes that the new session is launched within the running tmux session, whining about nested tmux session and not starting at all. You can unset the $TERM variable as workaround, but I don't like that apporach. If you come up with an alternative solution please let me know :) A.
On 13 September 2012 16:16, Alfredo Di Napoli
wrote: If I remember correctly, I've also tried that combinations, without success.
Anyway, I'm not at work so I can't test Cumino against gnome and Xmonad until tomorrow morning: I'll keep you posted!
Bye, Alfredo
I think you misunderstood; as I read it (and as I would expect it to
work
given the above descrtiption) that would be
urxvt --hold -e sh -c 'echo a'
-- brandon s allbery allbery.b@gmail.com wandering unix systems administrator (available) (412) 475-9364vm/sms
participants (6)
-
Alfredo Di Napoli
-
Brandon Allbery
-
Eugene Kirpichov
-
Matvey Aksenov
-
Ray
-
Roman Cheplyaka