Which IDE do you use?

My purpose with this topic is to know what are the pros and cons of each text editor regarding using SC. Currently I am programming only high-level stuff like SC, Processing, Pd and sometimes Matlab, 90% of the time doing artistic stuff.

If I am not mistaken, using Emacs would be impossible to visually use SC-IDE’s resources like the bottom and top menu, right? This would also happen in editors like Atom and Sublime, right?

IMO SC-IDE miss some stuff that would help many mouse oriented users like me:

  • A second window for monitoring with scope, freqscope, levelmeter, nodetree, record gui, all grouped in a full screen window which newbie users could toggle between with simple keyboard shortcut. Something like traditional DAWs;
  • Retain docklets arrange between each initialization;
  • Alternatives for color schemes, specially concerning the help docklet;
  • Multi-line cursor would be awesome;
  • Code snippets shortcuts;
    *Tweaking code option (like Processing) would be really great, although I can imagine that this would demand too much work from the developers…

I think that SC-IDE is really good, thanks a lot for that, congrats dev team! And I also know that improving the IDE it is not the priority in the developers team, but sometimes I feel that it is too minimal. For me Emacs seems frightening and using Atom seems that I would miss the coolest graphical stuff from SC-IDE… Trying to find a solution in which I can have the best of both worlds…

I’ve been using SC exclusively through SCVim/tmux/iTerm2 on osx for a couple years now and don’t recall ever having seen that error.

If I remember correctly there used to be an osx-specific issue with an incorrect path being hardcoded somewhere, but I think that got fixed a while back. Anyway it’s been ages since I set it up, and it’s worked with no trouble since then.

Anyway…

…yeah, you’re definitely not looking for vim or emacs, at least not for now. Personally, I feel every bit as strongly about vim (especially for working with SC) as others in this thread do about emacs, but that’s a different story; each of those editors offers something very different from the “modern IDE” paradigm as I understand it.

Having said that, I should note that the various docklets and graphical widgets are independent of SC-IDE. They all have representations in sclang and can be opened by evaluating the appropriate statements, for example:

HelpBrowser.new
Server.local.meter
Server.local.scope
Server.local.plotTree

…and so on. I do this from vim all the time. No reason you couldn’t do it from e.g. Atom as well.

1 Like

Actually, Emacs does have menus for it’s various modes. It’s just not common for people to use them. This is most of what the menu has. There isn’t a lot there.

@luka I looked at my autocomplete a bit more closely, there is a menu there. This is what I see when I tab on “Si”.

EmacsAutocomplete

If you are interested getting your config to do this, maybe we can start a separate thread. I’d love to take a look at your i3 config file. That setup looks awesome.

He has 2 emacs frames opened, and the help browser window is a regular terminal window.
Aside from that, he has a bar on top for time, temperature, hdd space, etc (popular bars these days are: lemonbar, polybar…) As for what else he has that’s not shown in the screenshot or the config for i3, you’re going to have to wait for Luka, like the theme he uses for Emacs, etc. :wink:
For desktop customization or the aesthetic aspect of linux, reddit’s unixporn subreddit is pretty neat and is a good place to get ideas from. It has its own discord server as well. Of course, there’s also a very active irc community, and the most popular are rizon’s #rice, and nixers.net’s unix.chat irc server. :blush:

what linux distro are you guys running by the way?
I’m on archlinux at the moment.

by the way, do you guys have the entire scide running, just with the help browser shown and rest hidden or is there a way to only launch the help browser as a detatched window?

any idea on how to get w3m to work in emacs? when i installed via use-package, i’m getting some bytecompile error - w3m did get installed, but when I try to search for things in the sclang’s help browser via w3m in emacs, none of the searches seem to work for some reason.

add

body {
    -webkit-filter: invert(100%);
    filter: invert(100%);
    background: #333;
    color: #555;    
}

to the bottom of /usr/local/share/SuperCollider/HelpSource. this works for the Help in QT window, regardless of using SCIDE or SCEL (Emacs)

EDIT: apologies, the path above is missing the filename : scdoc.css

/usr/local/share/SuperCollider/HelpSource/scdoc.css

11 Likes

I run SCHelp from SCEL, therefore Emacs. No SCIDE necessary. You can run it from anywhere where you are running sclang, just evaluate:

HelpBrowser.new

From Emacs/SCEL use C-c h <RETURN> - if your cursor is on a method or UGen it will propose in the bottom command buffer to open that in HelpBrowser.

Make sure you don’t do C-c C-h, cause that will try to open help in w3m in an Emacs buffer.

2 Likes

thanks luka!
got the gui showing and seems to be working :wink:

I did get this message in the post-window though, is this normal? The help browser works anyway, but was just curious if you guys are getting the same thing as well.

JavaScript Message: WebSocket connection to ‘ws://localhost:12344/’ failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED
JavaScript Message: WebChannel error: [object Event]

By the way, have you guys tried using w3m for the help browser as mentioned on the scel github page?
I seems to be getting this bytecompile error when installing w3m and while I am able to get w3m to open the help page, it seems it’s not able to search for anything for some reason. :thinking: In the gui help browser things would show up as you type what you want to find in the search box, but w3m requires you to actually click the search link, but then nothing ever shows up when you click the search link.

I also see those JavaScript errors. I have a feeling they are connected with the fact that you cannot evaluate code within the HelpBrowser when using Emacs as IDE. But that’s speculative.

As for w3m, I have a feeling that when those enchancements came to create more modern Help system it also broke the compatibility with non-javascript text browsers like w3m. I’m speculating again, but I have a feeling that HelpDocs compatibility with w3m is broken. It doesn’t work for me for a while now. But some devs should be asked for clarification. I also faintly recall that some Emacs users where kinda pissed about it a while ago.

Ah! I see - just wanted to make sure it’s not just me :yum:

i get this in the post window when supercollider starts up; immediately after compilation of the class library:

Open ended symbol started on line 225 of file ‘/home/rue/.local/share/SuperCollider/Extensions/sc/SCVim.sc’

Ah yeah, my mistake. I’ve gotten accustomed to ignoring the “open ended symbol” warning because it doesn’t actually cause any problems that I’ve ever noticed in practice.

Incidentally the line in question is:

methSearchString = format('/% %/;"'.asString, methName, 123.asAscii);

If you interpret '/% %/;"'.class, you’ll see that it’s a valid symbol, but it’s also easy to see how the unmatched quote inside the symbol could trigger a warning. No time to really dig into this, but at least on my end (macos 10.12.6, sc 3.10.0, iterm2/tmux/current vim from homebrew) it works fine. Sorry for any confusion!

I’d suggest to file a bug with the SCVim module.

It looks like the author is using a Symbol with asString as a workaround to include a quote mark. But it’s more direct to use a backslash to escape the quote. Then you can skip asString (more efficient).

methSearchString = format("/% %/;\"", methName, 123.asAscii);

Actually I’m not sure if this will make the “open ended symbol” message go away. This is printed only when compiling the class library, not when running code interactively, and I don’t feel like making a test class just to check this out. But I think this is a better way to write it.

hjh

OK, on-topic reply: I use the IDE, because both autocompletion and method argument templates are extremely important to me. I’d go so far as to say that I can’t use SC without them.

I used sc-el for some years before the IDE. Actually, I wouldn’t mind giving that a try again… but, if autocompletion and method argument templates are not complete and working smoothly, then I really can’t. When jmt2080ad says, “No, just tab complete really, and it’s spotty,” I’m afraid… nope, I couldn’t live with that.

Some years ago, somebody had forked scel and improved these features, but then the main line of development diverged too much and I’m pretty sure a/ I couldn’t find that fork now and b/ it wouldn’t work if I did. But it was not too bad.

If I had time and Emacs-lisp chops, I would create an Emacs mode for my live-coding system… but the time I would spend doing that would be time not spent making music, so… probably not going to happen.

hjh

2 Likes

Yes, I absolutely agree on principle. However, it turns out that replacing the coerced symbol '/% %/;"'.asString with the equivalent string "/% %/;\"" causes the lexer to throw a fatal error that prevents the class library from compiling. I’ve done a bit of digging from here and could go into more detail, but this is already a bit of a tangent!

However, it turns out that replacing the coerced symbol '/% %/;"'.asString with the equivalent string "/% %/;\"" causes the lexer to throw a fatal error that prevents the class library from compiling.

Not on my machine…

TestStringParser {
	*initClass {
		"/% %/;\"".format("a", "b").postln;
	}
}
compile done
localhost : setting clientID to 0.
internal : setting clientID to 0.
/a b/;"
Class tree inited in 0.03 seconds

What environment are you using? (I realize this is a bit OT, but if you can’t compile that string, it’s a bug… and the bug isn’t happening everywhere, so we should figure out where that’s happening.)

hjh

Sure, the test class works as expected for me as well. It’s not a matter of not being able to compile the string; I made a test branch of SCVim on my machine and made the change directly in SCVim.sc, changing line 224 from:

methSearchString = format('/% %/;"'.asString, methName, 123.asAscii);

to:

methSearchString = format("/% %/;\"", methName, 123.asAscii);

After having made that change, the actual error thrown by the lexer is:

ERROR: Parse error
  in file '/Users/tranquilitybass/Library/Application Support/SuperCollider/Extensions/SCVim.sc'
  line 234 char 1:

  } // end class
  ^
-----------------------------------
unmatched '}'
  in file '/Users/tranquilitybass/Library/Application Support/SuperCollider/Extensions/SCVim.sc' line 234 char 1
Expected class name.  got token: '}' 280
  in file '/Users/tranquilitybass/Library/Application Support/SuperCollider/Extensions/SCVim.sc'
  line 234 char 1:

  } // end class
  ^
-----------------------------------

…which is unexpected to say the least. No time to look more closely at it tonight (plus I’m conscious of the fact that I’m hanging all this out here on a thread in which only maybe one other person even uses SCVim). Just wanted to clear up any confusion.

I’d also hate for anyone reading this to get the impression that SCVim isn’t perfectly usable. In my experience it works fine, besides complaining about the open ended symbol.

I believe this message/error is related to a flaw in the lexer, which has historically been my area of the codebase: https://github.com/supercollider/supercollider/issues/3352

This thread has made me interested in fixing it soon!

2 Likes

EDIT: Minimal-er example: I will log this as a bug shortly.

TestStringParser {
	*initClass {
		"\"".postln;
		("\"".postln);
	}
}

hjh

PS: https://github.com/supercollider/supercollider/issues/4247

1 Like

there is a pr up now for the bug we’ve been discussing; it will probably be included in 3.10.2: https://github.com/supercollider/supercollider/pull/4255. sorry for continuing to be off-topic!