Starting a NetBeans-based IDE

1,618 views
Skip to first unread message

Sam Harwell

unread,
Jan 15, 2012, 6:12:22 PM1/15/12
to golan...@googlegroups.com
Hello,
 
First I'd like to introduce myself and give a bit of background. I'm Sam Harwell, and I'm a Ph. D. student at the University of Texas at Austin studying several aspects of the ways developers interact with IDEs to boost productivity. Currently I'm leading development of ANTLRWorks 2 (IDE) in parallel with Dr. Terence Parr's work on ANTLR 4. ANTLRWorks 2 supports development of ANTLR grammars and StringTemplate templates. Due to the simplicity of these languages, I've been looking for an additional general purpose language to work with so I can exercise some of the more advanced features of the framework powering ANTLRWorks 2. After a great deal of consideration, I've tentatively chosen Go as the language to bring into the fold.
 
On Friday (1/13) at 4:30 I forked the ANTLRWorks 2 project to make the project "GoWorks". Somewhere between running errands and watching Mission Impossible, I built a fairly functional editor from the Go Language Specification. I give these times to point out the flexibility of ANTLR 4 and the ANTLRWorks 2 framework in building both a parser and editor for a new language. For today I'll give just a screenshot (tease!), along with what I'm hoping to accomplish in the short run.
 
Goal 0: Within the next week
  • Functional editor with syntax and semantic-aware highlighting for single files (analysis extends only to the file currently being edited)
  • Initial release for public review
  • Features very likely to be completely missing: multi-file analysis, project/build system, etc.
Goal 1: Within the next month
  • Basic project system to keep track of folder/file structure on disk
  • Multi-file analysis for all files in the current project
  • Context-sensitive code completion (this not your average completion support)
  • Editing features very likely to be completely missing: refactoring, code templates, etc.
  • Other features still very likely to be missing: build system support, debugging, etc.
Along the way, community feedback will be immensely appreciated.
 
Thank you,
Sam Harwell
GoWorksTeaser.png

rh

unread,
Jan 15, 2012, 6:23:46 PM1/15/12
to golan...@googlegroups.com
Very nice work!  ANTLR[Works] and its ilk (elk?) are very nice tools.  Looking forward to seeing what you do with this!

Sam Harwell

unread,
Jan 15, 2012, 6:43:52 PM1/15/12
to golan...@googlegroups.com
ANTLRWorks 2 is actually a ground-up rewrite since I didn't do any work on the first version. The new version is a NetBeans Standalone Platform Application brings over a few of the techniques I developed in previous projects targeting Visual Studio. This is my first IDE work which is backed by ANTLR 4 (previously I used ANTLR 3), and I've been helping the development of several portions of ANTLR 4 to make sure it's able to handle several IDE-specific algorithms I've designed over the past several years. In case anyone is interested, here are a few links to IDEs I've developed in the past.
 
ANTLRWorks 2 (early stage, active development with a new preview coming in the next couple of days now that I fixed a bunch of issues while I used it to build the grammars for Go):
 
nFringe (complete IDE+debugger for UnrealScript, developed for Pixel Mine Games):
 
Various Visual Studio extensions, projects from last year which are currently on hold while I work on ANTLR 4 since it's so, so much better as an IDE backend than ANTLR 3:
PHP, ANTLR, Java, StringTemplate 4, Go, Alloy
 
Sam

Pavel Korotkov

unread,
Jan 16, 2012, 4:50:50 AM1/16/12
to golang-nuts
Hi, I've just downloaded the current version of IDE and couldn't
create a project: no entity appeared in the dialog box.

On Jan 16, 3:12 am, Sam Harwell <samharw...@gmail.com> wrote:
> Hello,
>
> First I'd like to introduce myself and give a bit of background. I'm Sam
> Harwell, and I'm a Ph. D. student at the University of Texas at Austin
> studying several aspects of the ways developers interact with IDEs to boost
> productivity. Currently I'm leading development of ANTLRWorks 2 (IDE) in
> parallel with Dr. Terence Parr's work on ANTLR 4. ANTLRWorks 2 supports
> development of ANTLR grammars and StringTemplate templates. Due to the
> simplicity of these languages, I've been looking for an additional general
> purpose language to work with so I can exercise some of the more advanced
> features of the framework powering ANTLRWorks 2. After a great deal of
> consideration, I've tentatively chosen Go as the language to bring into the
> fold.
>
> On Friday (1/13) at 4:30 I forked the ANTLRWorks 2 project to make the
> project "GoWorks". Somewhere between running errands and watching Mission
> Impossible, I built a fairly functional editor from the Go Language
> Specification. I give these times to point out the flexibility of ANTLR 4
> and the ANTLRWorks 2 framework in building both a parser and editor for a
> new language. For today I'll give just a screenshot (tease!), along with
> what I'm hoping to accomplish in the short run.
>
> Goal 0: Within the next week
>
>    - Functional editor with syntax and semantic-aware highlighting for
>    single files (analysis extends only to the file currently being edited)
>    - Initial release for public review
>    - Features very likely to be completely missing: multi-file analysis,
>    project/build system, etc.
>
> Goal 1: Within the next month
>
>    - Basic project system to keep track of folder/file structure on disk
>    - Multi-file analysis for all files in the current project
>    - Context-sensitive code completion (this not your average completion
>    support)
>    - Editing features very likely to be completely missing: refactoring,
>    code templates, etc.
>    - Other features still very likely to be missing: build system support,
>    debugging, etc.
>
> Along the way, community feedback will be immensely appreciated.
>
> Thank you,
> Sam Harwell
>
>  GoWorksTeaser.png
> 137KViewDownload

Sam Harwell

unread,
Jan 16, 2012, 11:11:52 AM1/16/12
to golan...@googlegroups.com
Hi Pavel,
 
I'm not sure what you're referring to, since I've never even locally built a distributable copy of this project.
 
ANTLRWorks 2 only supports the ANTLR grammars and StringTemplate 4 template languages. It currently doesn't have any form of project system, so you just open a grammar or template file in the editor and you can work on it.
 
I'll post another message to this thread later this week when I have an experimental build ready for the public to look at. :)
 
Thanks, Sam

Tom Deakin

unread,
Jan 16, 2012, 5:33:01 PM1/16/12
to golan...@googlegroups.com
Looks great! Be good to see this in the wild.

Sam Harwell

unread,
Jan 18, 2012, 11:50:05 PM1/18/12
to golan...@googlegroups.com
We're a bit more than halfway through the week now and I wanted to give a progress update and another screenshot. Since last time, I have:
  • Implemented a trivial project system (enough to just show the folder structure in the Projects pane)
  • Vastly improved the semantic highlighter and implemented many of the internal data structures required for code completion and other IDE features.

In the previous screenshot I was careful to not have any type references shown to non-builtin types because the resolution functionality was not at all implemented (they would all show as just black). As you can see in today's screenshot, I have resolution working for most types in the current package.

For debugging during this early stage, I've enabled a special mode in the semantic highlighter that underlines all unresolved items so it's easy to see how my progress is coming along. After cross-package type resolution is working, I'll add support for constants, then vars, then methods. For this week's release, I expect much of the semantic highlighting to be working but code completion probably not in place until next week.
 
GoWorksTeaser2.png

Mikhail Strebkov

unread,
Jan 19, 2012, 12:23:16 AM1/19/12
to golan...@googlegroups.com
Impressed! Good work! I will follow with interest your progress and will definitely try the IDE, as soon as it is publicly available.

Brad Fitzpatrick

unread,
Jan 19, 2012, 12:25:29 AM1/19/12
to golan...@googlegroups.com
Exciting!

Popog

unread,
Jan 19, 2012, 5:04:07 AM1/19/12
to golang-nuts
Excellent work. Keep us posted.

On Jan 18, 8:50 pm, Sam Harwell <samharw...@gmail.com> wrote:
> We're a bit more than halfway through the week now and I wanted to give a
> progress update and another screenshot. Since last time, I have:
>
>    - Implemented a trivial project system (enough to just show the folder
>    structure in the Projects pane)
>    - Vastly improved the semantic highlighter and implemented many of the
>    internal data structures required for code completion and other IDE
>    features.
>
> In the previous screenshot I was careful to not have any type references
> shown to non-builtin types because the resolution functionality was not at
> all implemented (they would all show as just black). As you can see in
> today's screenshot, I have resolution working for most types in the current
> package.
> For debugging during this early stage, I've enabled a special mode in the
> semantic highlighter that underlines all unresolved items so it's easy to
> see how my progress is coming along. After cross-package type resolution is
> working, I'll add support for constants, then vars, then methods. For this
> week's release, I expect much of the semantic highlighting to be working
> but code completion probably not in place until next week.
>
>  GoWorksTeaser2.png
> 121KViewDownload

Sam Harwell

unread,
Jan 20, 2012, 12:21:34 AM1/20/12
to golan...@googlegroups.com
Still very early, but as promised I have a build ready this week. A code completion dropdown will probably appear as you type but isn't finished yet - for the most part it shouldn't get in the way of your work but keep in mind this is something I'm actively working to finish. :)
 
To use, place a folder called "nbgoproject" in the root of your source directory. You can then use the File -> Open Project command in GoWorks to load that directory as a project (no build support, but does allow you to see the folders in a tree).
 
GoWorks "Early access" preview #1:
 
 

Sam Harwell

unread,
Jan 24, 2012, 4:31:45 AM1/24/12
to golan...@googlegroups.com
I have some more screenshots of new things that will be included in the next preview release (#2). :)
 
id: unqualified identifier being used within an expression
member: currently the selection operator (a period) works for resolving fields (methods coming soon)
fieldkey: context sensitive completion gives the field name key within a literal value
 
Performance of the code completion algorithm seems pretty good, but I'll let y'all give a real verdict once the next preview is ready.
GoWorksTeaser3-id.png
GoWorksTeaser3-member.png
GoWorksTeaser3-fieldkey.png

Sam Harwell

unread,
Jan 24, 2012, 12:14:09 PM1/24/12
to golan...@googlegroups.com
Code completion works with method resolution now (screenshot attached).
 
:)
GoWorksTeaser4-member.png

Mikhail Strebkov

unread,
Jan 24, 2012, 12:52:51 PM1/24/12
to golan...@googlegroups.com
Very promising! I look forward to further updates. Good luck!

Sam Harwell

unread,
Jan 24, 2012, 3:34:10 PM1/24/12
to golan...@googlegroups.com
Improved member resolution, plus resolution of members in an imported package (package "io" in this case).
 
 
GoWorksTeaser5-member.png
GoWorksTeaser5-imported.png

Sam Harwell

unread,
Jan 25, 2012, 11:20:58 PM1/25/12
to golan...@googlegroups.com
Looks like it's time for another preview! :) There are definitely pros and cons to this release, so I'll summarize here:
 
  • Trivial project system is in place - place an empty folder named "nbgoproject" in the folder where your Go package sources are located, and GoWorks will let you open the folder of packages as a project. No build/debug support is in place. For the Go source repository, the path to the empty folder would be "go/src/pkg/nbgoproject".
  • Full-project background scanning is in place.
  • Context-sensitive code completion is in place for some but definitely not all usages. In the places where it works, it should definitely be fast enough to use.
  • I haven't updated the semantic syntax highlighter with the new analysis that's available to code completion, so many things that work for code completion will show as plain identifiers (black) in the highlighter.
 
This release is very, VERY demanding on RAM. If you want to open the Go library as a project (go/src/pkg), you'll need to use a 64-bit JVM and have some 4GB free memory before launching GoWorks (it uses about 3.4GB on my machine). You can configure the JVM to use in goworks/etc/goworks.conf. I'm working to resolve this soon. Java 1.7 will perform better than 1.6, and I've only tried it on HotSpot.
 
I'm interested in any feedback y'all have if you get a chance to try it out.
 
 
Thanks!
 
PS: Remember when you find bugs that I started this project just 12 days ago. :)
 

Sam Harwell

unread,
Feb 4, 2012, 8:23:22 PM2/4/12
to golan...@googlegroups.com
Spent a lot of time this week generalizing the way the IDE resolves identifiers. By tying this into the semantic syntax highlighter and using a color scheme that uniquely identifies all the various elements I was able to quickly gauge my progress. As before, nothing is highlighted unless it was actually resolved (i.e. I don't highlight the 'T' in '[]T' as a type simply because only a type is allowed there - it must also be defined and visible).
 
Again, the crazy color scheme here is for diagnostic purposes but also shows how well this is coming along.
 
Memory usage is down and speed is up, but it's still using a very early build of ANTLR 4 with some known performance bottlenecks that I'll be addressing. Without constrained memory (-Xms2048m -Xmx4096m) the project loads and full source under the pkg folder is background cached in 18sec. Unlike before, with constrained memory (-Xms512m -Xmx512m) it's usable coming in at 22sec. The time it takes to actually open a file and perform the more extensive initial analysis used for editing (as opposed to just tracking top level declarations) is largely proportional to the number of identifiers in the file. reflect/value.go is a good example of an "expensive" file, and everything completes in under 0.3sec from when you double click to open the file.
 
GoWorksTeaser6-highlights.png

Kyle Lemons

unread,
Feb 5, 2012, 12:59:54 AM2/5/12
to golan...@googlegroups.com
Just out of curiosity, is this going more or less smoothly than in other languages you've (presumably) done similar work with?  I know that, anecdotally, the regularity of Go syntax and structure helps with program clarity and machine processing but it would be interesting to hear your thoughts.

Sam Harwell

unread,
Feb 5, 2012, 4:32:09 PM2/5/12
to Kyle Lemons, golan...@googlegroups.com

Hi Kyle,

 

The work I do is more complicated than people realize. Although I've been working on IDEs for various languages for many years, I've only had my current (highly experimental) algorithm operational for a couple of months. Also, the only general purpose programming language for which I've implemented automatic code completion on a broad scale is UnrealScript, which not only lacks a formal specification but tends to mutate from month to month and vary across the various companies who use it. For these reasons, I'll focus on how building an IDE for Go differs from building other analysis tools for Go.

 

Surprisingly, you may find that once implemented in a high-speed IDE, some features in Go designed for clarity/simplicity will actually reduce the ability of some developers to quickly write code. The primary case-in-point is the short var declaration vs. an assignment statement. If you compare the following two expressions:

 

someVar := 3

someVar = 3

 

You see that the `someVar` in the first statement is a variable definition, where the `someVar` in the second statement is a variable reference. For most machine processing applications, the complete text of the statement is available so it's immediately clear whether `someVar` should be treated as a definition or reference. However, in an IDE you might have simply the following, with a | representing the caret position:

 

s|

 

In this IDE, typing the `s` triggers an implicit code completion operation (as opposed to a Ctrl+Space triggering an explicit code completion operation). Without the context available to establish whether the user is typing a new definition or referencing something previously defined, the implicit code completion in the IDE must assume the user is typing a definition or risk inadvertently replacing the (valid) identifier of a new definition with that of a reference to a previously defined item. The net result is the short var declaration syntax places a fixed bound on the ability of a code completion algorithm to provide assistance on the first word of a new statement. Given the current nonexistence of IDEs capable of exposing this bound, it’s truly hard to explain how or why it would ever cause a problem. The current attempts to implement implicit code completion of identifiers have resulted in extremely frustrating behavior for a great number of reasons. However, this IDE for Go is designed for extremely predictable behavior and users will quickly figure out how to take advantage of its features without being slowed down by language limitations like this.

 

I have a few more tweaks to make related to the code completion engine before releasing a new preview within the next week. Hopefully at that point it will be much more apparent what I mean by all of this. :)

 

Thanks,

--

Sam Harwell

Owner, Lead Developer

Description: Description: C:\Users\sam\Documents\Work\TVL\tvl_logo_small.png

http://tunnelvisionlabs.com

image001.png

Kyle Lemons

unread,
Feb 5, 2012, 4:53:09 PM2/5/12
to Sam Harwell, golan...@googlegroups.com

The work I do is more complicated than people realize. Although I've been working on IDEs for various languages for many years, I've only had my current (highly experimental) algorithm operational for a couple of months. Also, the only general purpose programming language for which I've implemented automatic code completion on a broad scale is UnrealScript, which not only lacks a formal specification but tends to mutate from month to month and vary across the various companies who use it. For these reasons, I'll focus on how building an IDE for Go differs from building other analysis tools for Go.

 

Surprisingly, you may find that once implemented in a high-speed IDE, some features in Go designed for clarity/simplicity will actually reduce the ability of some developers to quickly write code. The primary case-in-point is the short var declaration vs. an assignment statement. If you compare the following two expressions:

 

someVar := 3

someVar = 3

 

You see that the `someVar` in the first statement is a variable definition, where the `someVar` in the second statement is a variable reference. For most machine processing applications, the complete text of the statement is available so it's immediately clear whether `someVar` should be treated as a definition or reference. However, in an IDE you might have simply the following, with a | representing the caret position:

 

s|

 

In this IDE, typing the `s` triggers an implicit code completion operation (as opposed to a Ctrl+Space triggering an explicit code completion operation). Without the context available to establish whether the user is typing a new definition or referencing something previously defined, the implicit code completion in the IDE must assume the user is typing a definition or risk inadvertently replacing the (valid) identifier of a new definition with that of a reference to a previously defined item. The net result is the short var declaration syntax places a fixed bound on the ability of a code completion algorithm to provide assistance on the first word of a new statement. Given the current nonexistence of IDEs capable of exposing this bound, it’s truly hard to explain how or why it would ever cause a problem. The current attempts to implement implicit code completion of identifiers have resulted in extremely frustrating behavior for a great number of reasons. However, this IDE for Go is designed for extremely predictable behavior and users will quickly figure out how to take advantage of its features without being slowed down by language limitations like this.


It's entirely possible that I am missing something (my exposure to writing completion code is within the bounds of Eclipse and vim's omni completion), but it seems to me that the assumption for code completion should always be to complete an existing variable, function, type, etc.  I don't mind seeing someVar as a suggestion as I'm preparing to declare a new variable somethingElse, and if I did choose to complete someVar it is trivial (after a bit of experience writing Go) to know not to type := afterward.  Presumably, a suitably aware IDE could even visually warn you when you try to redefine a variable illegally before it even gets to the compiler stage.  It could also provide visual cues when you're shadowing a variable, which could even further alleviate the issues new Go programmers have.  As for showing too many options after the first character on a line, I actually find visual noise distracting as I'm coding, so I wouldn't want the completion to show up until it is triggered explicitly or it has a reasonably good idea what I'm trying to say.  The number of possible meanings for "s" at the beginning of the line is probably a long enough list that showing completions would be surprising, to me.  The biggest wins of a highly aware IDE in my book are in things like function argument completion, where the IDE knows the type of the argument and provides a list of references of compatible types and references with methods returning compatible types.  If I type "fmt.Fprintf(" I would love it if all of the local io.Writers (and, ideally, local vars with methods returning io.Writers and package functions returning them) popped up.

As I said though, this could just be my expectation clouded by IDEs with only limited awareness :).  Eclipse does a pretty good with being smart about completion in Java, so that's probably where most of my expectations come from.  (I actually don't usually like Visual Studio's completion, it never seemed like it really knew what it was doing.)

In any case, thanks for all of the work you've put in; I think more competition in the IDE space can only help the adoption of Go, so even if it's unlikely to draw me away from vim I think it's an awesome project.

DisposaBoy

unread,
Feb 6, 2012, 2:41:19 AM2/6/12
to golan...@googlegroups.com
fwiw I've been thinking about ideas like this for GoSublime as well including the same kind of awareness for completion of map keys - I keep triggering the autocompletion everytime I go to fill in a map expecting/hoping it will work, sigh...

unread,
Feb 6, 2012, 6:12:28 AM2/6/12
to golang-nuts
On Feb 5, 10:32 pm, "Sam Harwell" <s...@tunnelvisionlabs.com> wrote:
> Surprisingly, you may find that once implemented in a high-speed IDE, some
> features in Go designed for clarity/simplicity will actually reduce the
> ability of some developers to quickly write code. The primary case-in-point
> is the short var declaration vs. an assignment statement. If you compare the
> following two expressions:
>
> someVar := 3
>
> someVar = 3
>
> You see that the `someVar` in the first statement is a variable definition,
> where the `someVar` in the second statement is a variable reference. For
> most machine processing applications, the complete text of the statement is
> available so it's immediately clear whether `someVar` should be treated as a
> definition or reference. However, in an IDE you might have simply the
> following, with a | representing the caret position:
>
> s|

If it is impossible to recognize programmer's intention, it is
impossible to recognize programmer's intention.

An example of a situation in which it is possible to identify
programmer's intention:

fmt.Fprintf(os.err, |

A code completion algorithm can *easily* (in the sense that the
algorithm's prediction can be very accurate) convert the above line
into:

fmt.Fprintf(os.Stderr, |

This is much easier to predict than to predict the intended meaning of
s|. In fact, s| is a prime counter-example to code-completion. In my
opinion, a code-completion algorithm should simply stop at cases like
s|.

> In this IDE, typing the `s` triggers an implicit code completion operation
> (as opposed to a Ctrl+Space triggering an explicit code completion
> operation). Without the context available to establish whether the user is
> typing a new definition or referencing something previously defined, the
> implicit code completion in the IDE must assume the user is typing a
> definition or risk inadvertently replacing the (valid) identifier of a new
> definition with that of a reference to a previously defined item. The net
> result is the short var declaration syntax places a fixed bound on the
> ability of a code completion algorithm to provide assistance on the first
> word of a new statement.

In my opinion, the importance of a short var declaration is the same
as the importance of some other Go language features. Short var
declaration doesn't seem to be special in any way.

> Given the current nonexistence of IDEs capable of
> exposing this bound, it's truly hard to explain how or why it would ever
> cause a problem. The current attempts to implement implicit code completion
> of identifiers have resulted in extremely frustrating behavior for a great
> number of reasons. However, this IDE for Go is designed for extremely
> predictable behavior and users will quickly figure out how to take advantage
> of its features without being slowed down by language limitations like this.

Is there a list (a documentation) of the code completion features
provided by the IDE?

Sam Harwell

unread,
Feb 6, 2012, 8:46:25 AM2/6/12
to ⚛, golang-nuts
I don't currently have a list of features provided in this IDE since it's so new (literally less than a month old in its entirety).

Regarding the Fprintf example, it would perform as you mentioned for the reasons described in Part 6 of my latest blog post on the subject [1] (in particular point #6). In fact, it would very quickly learn to always replace "err" with "Stderr" fast enough that you never actually have to type "Stderr" again unless you're working within the os package itself - and you wouldn't have to press Ctrl+Space or slow down your typing for it to take effect. Some of the more advanced scenarios mentioned by Kyle involve a modification of points #8 and 9, similar to my commentary in Part 6.1. When my selection algorithms are used in combination with an even more advanced semantic analysis algorithm, perhaps similar to the one for sorting in [2], all kinds of options open up.

As I mentioned in my previous email, it's extremely difficult to understand or agree that such active behavior of code completion could be beneficial as opposed to extremely irritating. Hopefully people are open to trying new concepts and patient as I work to resolve issues that will surely surface. :)

[1] http://blog.280z28.org/archives/2011/12/105/
[2] http://www.monperrus.net/martin/Learning-from-Examples-to-Improve-Code-Completion-Systems.pdf

--
Sam Harwell
Owner, Lead Developer

http://tunnelvisionlabs.com

unread,
Feb 6, 2012, 11:48:07 AM2/6/12
to golang-nuts
On Feb 6, 2:46 pm, "Sam Harwell" <s...@tunnelvisionlabs.com> wrote:
> I don't currently have a list of features provided in this IDE since it's so new (literally less than a month old in its entirety).
>
> Regarding the Fprintf example, it would perform as you mentioned for the reasons described in Part 6 of my latest blog post on the subject [1] (in particular point #6). In fact, it would very quickly learn to always replace "err" with "Stderr" fast enough that you never actually have to type "Stderr" again unless you're working within the os package itself - and you wouldn't have to press Ctrl+Space or slow down your typing for it to take effect.

I see (more or less).

The idea in my example was based on the assumption that each keypress
is sending some bits of information to the IDE.

Typing "os.err," (including the comma) in the context of the 1st
argument of fmt.Fprintf should be enough data to conclude that the
programmer means "os.Stderr,". There is no learning phase, the
programmer does not need to explicitly teach the IDE anything.

Just "err" isn't enough information to map it to "os.Stderr" without
learning. The user needs to type "os.err," or something similar.

Another example:

var w io.Writer
var r io.Reader

copy(w, r)| --> io.Copy(w, r)|

> Some of the more advanced scenarios mentioned by Kyle involve a modification of points #8 and 9, similar to my commentary in Part 6.1. When my selection algorithms are used in combination with an even more advanced semantic analysis algorithm, perhaps similar to the one for sorting in [2], all kinds of options open up.
>
> As I mentioned in my previous email, it's extremely difficult to understand or agree that such active behavior of code completion could be beneficial as opposed to extremely irritating. Hopefully people are open to trying new concepts and patient as I work to resolve issues that will surely surface. :)
>
> [1]http://blog.280z28.org/archives/2011/12/105/
> [2]http://www.monperrus.net/martin/Learning-from-Examples-to-Improve-Cod...

Sam Harwell

unread,
Feb 7, 2012, 11:33:01 PM2/7/12
to golan...@googlegroups.com
Been working hard to iron out remaining bugs. There are definitely a number of prominent bugs remaining, but things seem to be working well enough that I should be able to release a new preview tomorrow. One of the recent additions is Mark Occurrences - currently it only works for some items but soon it should be accurate for whatever's under the caret.
GoWorksTeaser7-markrefs.png

yone098

unread,
Feb 7, 2012, 11:36:27 PM2/7/12
to golan...@googlegroups.com
Exciting and Good!!!

--
Masaaki YONEBAYASHI
@yone098

Sam Harwell

unread,
Feb 8, 2012, 12:52:36 PM2/8/12
to golan...@googlegroups.com

I finished enough to where it should be somewhat usable. :) Referring back to my “Goal 1: Within the next month” message on Jan. 15, here is a summary of the progress:

 

·         Basic project system (shows file/folder structure in the project pane) is in place.

·         Multi-file background analysis for all files in the current project is working.

·         Context-sensitive code completion is functional but still has some bugs I’m working out.

·         Mark Occurrences is a bonus feature I didn’t originally anticipate having in. :)

·         Other items which I said would be missing are still missing. A notable missing feature is Go To Definition, which I plan to implement soon.

 

Here are some additional notes about code completion in its current state:

 

·         It works in many but not all cases. The missing cases are not always “edge” cases, so there’s a high chance of finding situations where it doesn’t behave as you’d like it to.

·         It doesn’t support automatic completion of arguments to function calls.

·         It doesn’t track advanced semantics such as suggesting items for the right hand side of an assignment statement that match the type of the item on the left hand side.

·         In cross-package references, it doesn’t hide package-private members from the completion popup.

·         Background scanning isn’t currently hooked up to the progress bar in NetBeans’ status bar. Most code completion features will work properly after the background scan is complete, and you can watch the CPU usage with a task monitor on your system to know when the background scan is complete.

 

Here are some additional notes about performance. For reference, the configuration file is located in goworks/etc/goworks.conf.

 

·         If you have a system with enough memory (4G free memory for running NetBeans), I recommend using a 64-bit, 1.7 JVM and adding the following configuration options: “-Xms2g -Xmx4g -XX:+UseG1GC”.

·         For now, I recommend having at least 1G free memory when running GoWorks.

·         The code completion features currently perform more computation than is ideal, which makes it observably “laggy” on slower computers. On current generation machines (esp. those with Core i5, Core i7 or similar processors),  the code completion should perform close to the speed at which you type.

·         GoWorks is using a very early build of ANTLR 4 which tends to use a lot of memory. Even though I’ve reduced its demands by nearly 10:1 over the reference implementation and significantly improved its performance, I definitely have a ways left to go. Already on the drawing board are changes that will provide an order of magnitude improvement in many performance categories, and drop an O(2^n) worst-case algorithm in code completion to an O(n³) worst-case algorithm (n tends to be small, but the impact is certainly measurable).

 

Here are some final notes about me and this project:

 

·         This IDE is a case study in rapid development of an IDE for a general-purpose language. While other platforms for fast/easy integration of new languages (e.g. Xtext) focus on DSLs, I’m interested in scalability of IDE techniques to general purpose languages on large projects. Hopefully I surprised more than a couple people by actually delivering some of these features in the 1-month time span I originally stated. :)

·         I’ve never actually written a Go program. I chose Go for this project due to its active development, current lack of other IDE options, and especially the care taken to maintain a proper language specification I can work with.

·         In order to prove the true viability of my techniques, over the next couple of months I’m definitely going to polish the current set of features along with a sampling of a spectrum of other features (a couple navigation tools like Go To Definition and Find References, a couple refactoring operations like Rename and Extract Method, etc.). Once these are complete, I’m not sure how much I’ll be able to devote to additional features because they aren’t necessary for my research and the development costs are non-trivial. That said, I’ve really been enjoying this project so I’m hoping to find a way to keep working on it to make it (and Go) competitive in the “big leagues” of IDEs.

 

The latest “early access/pre alpha” release can be downloaded here:

GoWorks Early Access Preview 3: http://www.tunnelvisionlabs.com/downloads/go/2012-02-08-goworks-ea3.zip

GoWorks EULA (freeware/closed source): http://www.tunnelvisionlabs.com/downloads/go/GoWorksEula.pdf

 

Thank you,
--

Sam Harwell

Owner, Lead Developer

From: golan...@googlegroups.com [mailto:golan...@googlegroups.com] On Behalf Of Sam Harwell
Sent: Tuesday, February 07, 2012 10:33 PM
To: golan...@googlegroups.com
Subject: [go-nuts] Re: Starting a NetBeans-based IDE

 

Been working hard to iron out remaining bugs. There are definitely a number of prominent bugs remaining, but things seem to be working well enough that I should be able to release a new preview tomorrow. One of the recent additions is Mark Occurrences - currently it only works for some items but soon it should be accurate for whatever's under the caret.

image001.png

unread,
Feb 10, 2012, 4:19:58 AM2/10/12
to golang-nuts
On Feb 8, 6:52 pm, "Sam Harwell" <s...@tunnelvisionlabs.com> wrote:
> GoWorks Early Access Preview 3:http://www.tunnelvisionlabs.com/downloads/go/2012-02-08-goworks-ea3.zip

The IDE enters an infinite loop when I edit "i--" in a code like this:

for i := len(args)-1; i>=0; i-- {
println(1)
}

Sam Harwell

unread,
Feb 10, 2012, 5:43:15 PM2/10/12
to ⚛, golang-nuts
Well that's just no good at all!

Here's the update that should resolve this. You may get some flickering on occasion which I need to resolve, but at least it won't keep going forever (actually it will stop quickly).
http://www.tunnelvisionlabs.com/downloads/go/2012-02-10-goworks-ea4.zip

I'll set up a page next week for keeping a history of releases.

Thanks for the report (first indication I've had that anyone's even tried this)! :)

--
Sam Harwell
Owner, Lead Developer

http://tunnelvisionlabs.com


-----Original Message-----
From: golan...@googlegroups.com [mailto:golan...@googlegroups.com] On Behalf Of ?
Sent: Friday, February 10, 2012 3:20 AM
To: golang-nuts
Subject: [go-nuts] Re: Starting a NetBeans-based IDE

nz

unread,
Apr 18, 2012, 12:36:47 PM4/18/12
to golan...@googlegroups.com
Any more news on this ?

thanks
Nz

xiaoq...@doublelinepartners.com

unread,
Sep 1, 2014, 11:10:23 PM9/1/14
to golan...@googlegroups.com
Hey Sam,

I am Vincent , I did not know you were a UT CS graduate student. I am not a CS major but I am taking CS graduate&undergraduate classes. 

That's absolutely an excellent job. Is ANTLRWorks a part of your Dissertation? 
So, what is its status now? could it support custom DSL just like it does for GO language ?

Are you still in UT?

Thank you very much,
Vincent 

On Sunday, January 15, 2012 5:12:22 PM UTC-6, Sam Harwell wrote:
Hello,
 
First I'd like to introduce myself and give a bit of background. I'm Sam Harwell, and I'm a Ph. D. student at the University of Texas at Austin studying several aspects of the ways developers interact with IDEs to boost productivity. Currently I'm leading development of ANTLRWorks 2 (IDE) in parallel with Dr. Terence Parr's work on ANTLR 4. ANTLRWorks 2 supports development of ANTLR grammars and StringTemplate templates. Due to the simplicity of these languages, I've been looking for an additional general purpose language to work with so I can exercise some of the more advanced features of the framework powering ANTLRWorks 2. After a great deal of consideration, I've tentatively chosen Go as the language to bring into the fold.
 
On Friday (1/13) at 4:30 I forked the ANTLRWorks 2 project to make the project "GoWorks". Somewhere between running errands and watching Mission Impossible, I built a fairly functional editor from the Go Language Specification. I give these times to point out the flexibility of ANTLR 4 and the ANTLRWorks 2 framework in building both a parser and editor for a new language. For today I'll give just a screenshot (tease!), along with what I'm hoping to accomplish in the short run.
 
Goal 0: Within the next week
  • Functional editor with syntax and semantic-aware highlighting for single files (analysis extends only to the file currently being edited)
  • Initial release for public review
  • Features very likely to be completely missing: multi-file analysis, project/build system, etc.
Goal 1: Within the next month

xiaoq...@doublelinepartners.com

unread,
Sep 1, 2014, 11:22:02 PM9/1/14
to golan...@googlegroups.com
Sam,

I could not see my last post to you, can you see that? Thanks
Reply all
Reply to author
Forward
0 new messages