On Tue, Sep 9, 2008 at 10:29 AM, Kassen
Stephen Sinclair;
I don't use it (emacs ftw!)
Would you have the time to share some of your thoughts on the advantages of emacs for ChucKing? I looked at it but it's quite a daunting editor and I'd like to know a bit about the potential gains before investing time in it.
Hm, let's see. _mainly_ I use emacs because i'm used to it. I use it for coding, and my fingers know the shortcuts, and it just works for me. I've tried to get used to vim, for example, and just can't seem to do it. This goes for any editor, of course: use what you know, and what you like. I'm not on any mission to make people use specific software, I can't only make recommendations. However, there are some virtues, I think that deserve mention. (Some of these will of course be available in other programs.) One, is that emacs has "windows". You can drop a shell into one window, an editor into another, and a status window into a third. You can split the screen in any desireable way. Two, is that I have F6 configured for "compile", which gives me a one-liner shell command, and F7 for "recompile", which just repeats whatever the last compile command was. This is insanely useful for chucking, because you can hit F6 and tell chuck to load your script, and then take note of which shred ID it got, and use the '=' command to replace it the next time. Then just edit and keep hitting F7. On top of that, emacs has really good search & replace and regexp support. (I use the former more than the latter.) Which I have configured to Ctrl-A on my keyboard so that's a really fast thing to do. Then I can switch between files by hitting Ctrl-B and typing the first few letters of the file name and then Tab (if i've loaded it already) or load or create a new file with Ctrl-F. The filename completion rocks. Lastly, it's completely programmable with lisp. So if I wanted I could probably make it way more intelligently communicate with ChucK, interpreting its error messages among other things. But I don't have the patience for that. :) One thing that I sorely miss is the ability to automatically track which shred IDs get assigned to which files, for when I want to remove or replace a shred. However I think this is also partly the fault of ChucK which can't be bothered to tell me this information in a useful way, since it doesn't differentiate between files and sporks. But I'd love to be able to remove or replace a shred by *name* instead of by some number that I have to look way back in the buffer to find. (But of course Ctrl-S-S "search" is pretty quick for this.) All in all I don't have to take my hand off the keyboard, which is particularly nice. As for it being a daunting editor, I really only use a handful of commands, though of course it's capable of much more.
but I just tried to compile it quickly and it failed, so I can't help directly.
Hmmm. I found the Mini quite easy to compile, at least since there is a clear list of all that you need for it, on top of ChucK's dependencies.
Yeah I don't know why it didn't work. But I haven't taken the time to figure it out. Probably something small.
I just wish it would have a more intelligent "replace" function for shreds then always replacing the last one that was run. It's nice and simple, I like that. There are hotkeys for running code though not enough for editing it. emacs will solve all of those issues, I'm sure but that would go at the expense of the simplicity?
I'd love to program some emacs lisp, or some other mechanism, to track which shreds have been loaded. Something that would give super-quick keyboard access to remove or replace specific shreds. Perhaps Tab completion would be good for this. By the way, with all this talk about emacs, I should really specify, honestly, that I really only have a very short beard. And no, I don't wear sandles. ;-) cheers, Steve
Stephen Sinclair
Hm, let's see. _mainly_ I use emacs because i'm used to it. I use it for coding, and my fingers know the shortcuts, and it just works for me. I've tried to get used to vim, for example, and just can't seem to do it. This goes for any editor, of course: use what you know, and what you like. I'm not on any mission to make people use specific software, I can't only make recommendations. However, there are some virtues, I think that deserve mention. (Some of these will of course be available in other programs.)
Yes, thanks, that's what I was hoping for.
One, is that emacs has "windows". You can drop a shell into one window, an editor into another, and a status window into a third. You can split the screen in any desireable way.
This is really quite nice.
Two, is that I have F6 configured for "compile", which gives me a one-liner shell command, and F7 for "recompile", which just repeats whatever the last compile command was. This is insanely useful for chucking, because you can hit F6 and tell chuck to load your script, and then take note of which shred ID it got, and use the '=' command to replace it the next time. Then just edit and keep hitting F7.
Ok, and that's perhaps because of the "major mode" that we have on the WiKi?
On top of that, emacs has really good search & replace and regexp support. (I use the former more than the latter.) Which I have configured to Ctrl-A on my keyboard so that's a really fast thing to do. Then I can switch between files by hitting Ctrl-B and typing the first few letters of the file name and then Tab (if i've loaded it already) or load or create a new file with Ctrl-F. The filename completion rocks.
Cool. I found notepad++ (which I like on Windows) tends to need a bit of mousing for such tasks. This sounds good.
One thing that I sorely miss is the ability to automatically track which shred IDs get assigned to which files, for when I want to remove or replace a shred. However I think this is also partly the fault of ChucK which can't be bothered to tell me this information in a useful way, since it doesn't differentiate between files and sporks. But I'd love to be able to remove or replace a shred by *name* instead of by some number that I have to look way back in the buffer to find. (But of course Ctrl-S-S "search" is pretty quick for this.)
Yes. I agree. The Mini does link the shred's name to the buffer it was launched from (untilted-n), I'm not sure why I missed this before and even pointed it out on the list. Perhaps there are more differences between the versions then I noticed, perhaps I was simply -again- completely confused. I think the Audicle's system of linking edit buffers t versions and to Shreds is great but clearly the Audicle is a very different sort of thing. Replacement by name would be good and indeed a way to tell what sporked child function links to what "added" mother would help as well. I'd also like "replace" in editors to mean "replace the last shred added from this buffer/file with the current contents of the buffer/file" instead of "replace the last shred with this". Right now I'll write a bassline, add drums, edit the bassline.... and at that point the Mini's replace function won't work sensibly anymore.
All in all I don't have to take my hand off the keyboard, which is particularly nice.
Yes.
As for it being a daunting editor, I really only use a handful of commands, though of course it's capable of much more.
Still daunting :¬). It also uses lots of unusual hotkeys, for example ctrl+f is supposed to move the cursor (according to the tutorial I just went over) but Gnome feels it's more important to use this command to go into full-screen mode. I'd love to program some emacs lisp, or some other mechanism, to track
which shreds have been loaded. Something that would give super-quick keyboard access to remove or replace specific shreds. Perhaps Tab completion would be good for this.
I'm interested in this.
By the way, with all this talk about emacs, I should really specify, honestly, that I really only have a very short beard. And no, I don't wear sandles. ;-)
I used to have a short beard but I've been back to clean shaven for a while now. I do have a fairly large afro though so perhaps Emacs will still feel I'm hairy enough? Kas.
Replacement by name would be good and indeed a way to tell what sporked child function links to what "added" mother would help as well. I'd also like "replace" in editors to mean "replace the last shred added from this buffer/file with the current contents of the buffer/file" instead of "replace the last shred with this". Right now I'll write a bassline, add drums, edit the bassline.... and at that point the Mini's replace function won't work sensibly anymore.
Hmmm, Actually, it turns out that the Mini now works exactly like this. I only found out by complete accident pushing some random buttons for kicks while closing down tonight's practice session. I don't think it used to be like that and can't remember a note about the change. Either I'm slowly going insane or I started using more editing buffers or there was a change to this some time? Oops. Kas.
participants (3)
-
Kassen
-
Michael Heuer
-
Stephen Sinclair