[GitHub] tinkerpop issue #384: TINKERPOP-1037 Made life more colorful

2016-08-22 Thread robertdale
Github user robertdale commented on the issue:

https://github.com/apache/tinkerpop/pull/384
  
@pluradj I noticed that too. I was thinking that metaclass could be used to 
intercept calls to groovy shell's Preferences class and gremlin console could 
have its own Java Preferences node. This would give it full separation from 
normal 'groovysh'.  I believe that currently max-iteration is the only 
gremlin-specific pref. So if we do decide to use namespaces, then max-iteration 
should be deprecated but supported with and without namespace.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] tinkerpop issue #384: TINKERPOP-1037 Made life more colorful

2016-08-20 Thread pluradj
Github user pluradj commented on the issue:

https://github.com/apache/tinkerpop/pull/384
  
I retested with the latest commits. Setting a preference value with spaces 
worked, remotes worked nicely with `conf/remote-objects.yaml`. Nice work 
@robertdale.

`mvn clean install -pl gremlin-console -DskipIntegrationTests=false` was 
successful.

One other thought here even though I've already voted... it might be better 
if the preference keys were all prefixed with `gremlin.` since Groovy 
preferences are [globally 
shared](https://github.com/apache/groovy/blob/master/src/main/org/codehaus/groovy/tools/shell/util/Preferences.java#L34)
 with other groovysh-based consoles. That preference problem may have hit us 
before with 
[`interpreterMode`](https://github.com/thinkaurelius/titan/issues/1172). 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] tinkerpop issue #384: TINKERPOP-1037 Made life more colorful

2016-08-20 Thread spmallette
Github user spmallette commented on the issue:

https://github.com/apache/tinkerpop/pull/384
  
someone might want to run:

```
mvn clean install -pl gremlin-console -DskipIntegrationTests=false
```

before merge (now that there are sufficient votes to do so) 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] tinkerpop issue #384: TINKERPOP-1037 Made life more colorful

2016-08-20 Thread robertdale
Github user robertdale commented on the issue:

https://github.com/apache/tinkerpop/pull/384
  
The previous commit to fix :set with quoted spaces did break :remote 
commands because the parser stripped the quotes. Since :set command is the only 
one affected, I made a quick hack for it while leaving everything else alone. 
If this is not acceptable, just let me know and I'll back it out.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] tinkerpop issue #384: TINKERPOP-1037 Made life more colorful

2016-08-19 Thread pluradj
Github user pluradj commented on the issue:

https://github.com/apache/tinkerpop/pull/384
  
VOTE: +1


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] tinkerpop issue #384: TINKERPOP-1037 Made life more colorful

2016-08-19 Thread pluradj
Github user pluradj commented on the issue:

https://github.com/apache/tinkerpop/pull/384
  
The colorization stuff looks good.

One small problem I've run into is that you can't set a prompt string that 
contains spaces. For example, I tried `:set result.prompt 'result => '` and got 
this error message:

```Command ':set' requires arguments:  []```

Setting the preference containing spaces from `groovysh` works fine. It 
appears to be specific to Gremlin Console, and it is reproducible in 3.2.1 
without this PR. Would be fine to handle this bug as a separate JIRA.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] tinkerpop issue #384: TINKERPOP-1037 Made life more colorful

2016-08-19 Thread PommeVerte
Github user PommeVerte commented on the issue:

https://github.com/apache/tinkerpop/pull/384
  
awesome!! VOTE: +1 from me as well



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] tinkerpop issue #384: TINKERPOP-1037 Made life more colorful

2016-08-19 Thread pluradj
Github user pluradj commented on the issue:

https://github.com/apache/tinkerpop/pull/384
  
Good news, it works on Windows.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] tinkerpop issue #384: TINKERPOP-1037 Made life more colorful

2016-08-19 Thread pluradj
Github user pluradj commented on the issue:

https://github.com/apache/tinkerpop/pull/384
  
_hoping I don't have to fire up that old machine_ :)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] tinkerpop issue #384: TINKERPOP-1037 Made life more colorful

2016-08-19 Thread spmallette
Github user spmallette commented on the issue:

https://github.com/apache/tinkerpop/pull/384
  
@pluradj sucks the wind out of the PR - hahaha


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] tinkerpop issue #384: TINKERPOP-1037 Made life more colorful

2016-08-19 Thread pluradj
Github user pluradj commented on the issue:

https://github.com/apache/tinkerpop/pull/384
  
@robertdale did you test this on Windows?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] tinkerpop issue #384: TINKERPOP-1037 Made life more colorful

2016-08-19 Thread okram
Github user okram commented on the issue:

https://github.com/apache/tinkerpop/pull/384
  
VOTE +1.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] tinkerpop issue #384: TINKERPOP-1037 Made life more colorful

2016-08-19 Thread robertdale
Github user robertdale commented on the issue:

https://github.com/apache/tinkerpop/pull/384
  
I'm done with changes. Carry on.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] tinkerpop issue #384: TINKERPOP-1037 Made life more colorful

2016-08-19 Thread robertdale
Github user robertdale commented on the issue:

https://github.com/apache/tinkerpop/pull/384
  
I think I'll leave templating for another jira ticket. :satisfied:   
Currently, themes (really any `:set` commands) can be saved into files and 
loaded with `:load my-gremlin.theme`.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] tinkerpop issue #384: TINKERPOP-1037 Made life more colorful

2016-08-19 Thread okram
Github user okram commented on the issue:

https://github.com/apache/tinkerpop/pull/384
  
Great. What do you think about `:set color.template=black-background`, 
`:set color.template=white-background`, etc. And then from there, those "MACRO" 
command will trigger a series of set error, message, gremlin, etc.  


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] tinkerpop issue #384: TINKERPOP-1037 Made life more colorful

2016-08-19 Thread robertdale
Github user robertdale commented on the issue:

https://github.com/apache/tinkerpop/pull/384
  
Disco disco!  ANSI is enabled by default. This is actually not a change. It 
was this way before this PR.  No color scheme by default. If you want colors, 
you have to set them yourself. Added colorizing for String, Number, and values 
within Iterables.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] tinkerpop issue #384: TINKERPOP-1037 Made life more colorful

2016-08-19 Thread okram
Github user okram commented on the issue:

https://github.com/apache/tinkerpop/pull/384
  
Thoughts:

1. I think there is a bit of an overdose of options here. Keep it simple.

2. We have to realize that not everyone has a black background as their 
terminal. I use a light brown. Some people use white. Thus, I don't think the 
default should be to use color. You can `:set` colors if you want and perhaps 
we even have "standard themes" -- `:set black-background-standard` (or whatever 
the naming convention that we are using for other `:set` commands so we are 
consistent in our naming of parameters.

If you guys want to go with edge/vertex/etc. being able to be colored, 
please don't have that be part of the "standard templates." Keep things clean 
and simple and not a "disco club" coming at you.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] tinkerpop issue #384: TINKERPOP-1037 Made life more colorful

2016-08-19 Thread alaam
Github user alaam commented on the issue:

https://github.com/apache/tinkerpop/pull/384
  
+1


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] tinkerpop issue #384: TINKERPOP-1037 Made life more colorful

2016-08-19 Thread robertdale
Github user robertdale commented on the issue:

https://github.com/apache/tinkerpop/pull/384
  
Attached groovy script that prints the color palette.  usage: groovy 
jansi-colors.txt 


[jansi-colors.txt](https://github.com/apache/tinkerpop/files/427016/jansi-colors.txt)

 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] tinkerpop issue #384: TINKERPOP-1037 Made life more colorful

2016-08-19 Thread dkuppitz
Github user dkuppitz commented on the issue:

https://github.com/apache/tinkerpop/pull/384
  
Oh nice, I like that.

VOTE: +1


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] tinkerpop issue #384: TINKERPOP-1037 Made life more colorful

2016-08-19 Thread robertdale
Github user robertdale commented on the issue:

https://github.com/apache/tinkerpop/pull/384
  
I'm definitely not the right person to pick a color scheme. Open for 
suggestions or we can figure it out later. Committed the vertex, edge, path 
coloring so you can see.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] tinkerpop issue #384: TINKERPOP-1037 Made life more colorful

2016-08-19 Thread dkuppitz
Github user dkuppitz commented on the issue:

https://github.com/apache/tinkerpop/pull/384
  
Awesome! I don't like the color choice, but it's good to see that it works. 
How did you do it? Did you overwrite the respective `toString()` methods?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] tinkerpop issue #384: TINKERPOP-1037 Made life more colorful

2016-08-18 Thread robertdale
Github user robertdale commented on the issue:

https://github.com/apache/tinkerpop/pull/384
  
I think a mockup of the desired coloring effect would be nice to have.  
Currently elements just have toString called on them. I added a vertex.color 
and edge.color for demonstration purposes. Here's what it would look like. Let 
me know if that's worth committing.

![screenshot_2016-08-18_21-00-22](https://cloud.githubusercontent.com/assets/122206/17795525/12511530-6587-11e6-8427-71d6e033a026.png)



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] tinkerpop issue #384: TINKERPOP-1037 Made life more colorful

2016-08-18 Thread spmallette
Github user spmallette commented on the issue:

https://github.com/apache/tinkerpop/pull/384
  
nice @robertdale - a final request from my end would be documentation. 
perhaps a word or two added to the docs about these settings. I guess the 
reference docs might be the best place for that:


https://github.com/apache/tinkerpop/blob/f35f733663029701af538fc527e1f5ab563eb07d/docs/src/reference/gremlin-applications.asciidoc#console-commands

then maybe an announcement of the feature in upgrade docs for users:


https://github.com/apache/tinkerpop/blob/f35f733663029701af538fc527e1f5ab563eb07d/docs/src/upgrade/release-3.2.x-incubating.asciidoc#upgrading-for-users

and if you want to really be complete an entry in changelog:


https://github.com/apache/tinkerpop/blob/f35f733663029701af538fc527e1f5ab563eb07d/CHANGELOG.asciidoc#tinkerpop-322-not-officially-released-yet

@dkuppitz brought up the full scope of the ticket, but i think we can save 
the bigger picture for some other time. at least the pattern for colors is in 
place and working.

I still haven't tested this out myself or reviewed the code just yet to see 
what you did differently than me to get this to work. My mind is still kinda 
reeling from that.  :disappointed: 



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] tinkerpop issue #384: TINKERPOP-1037 Made life more colorful

2016-08-18 Thread robertdale
Github user robertdale commented on the issue:

https://github.com/apache/tinkerpop/pull/384
  

![screenshot_2016-08-18_18-54-19](https://cloud.githubusercontent.com/assets/122206/17793465/77a45b16-6575-11e6-99ce-bef4bb1471af.png)

## Color codes:
-BLACK
- RED
- GREEN
- YELLOW
- BLUE
- MAGENTA
- CYAN
- WHITE

### Background Colors
- BG_BLACK
- BG_RED
- BG_GREEN
- BG_YELLOW
- BG_BLUE
- BG_MAGENTA
- BG_CYAN
- BG_WHITE

### Attributes
- RESET
- INTENSITY_BOLD
- INTENSITY_FAINT
- ITALIC
- UNDERLINE
- BLINK_SLOW
- BLINK_FAST
- BLINK_OFF
- NEGATIVE_ON
- NEGATIVE_OFF
- CONCEAL_ON
- CONCEAL_OFF
- UNDERLINE_DOUBLE
- UNDERLINE_OFF
- BOLD
- FAINT



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] tinkerpop issue #384: TINKERPOP-1037 Made life more colorful

2016-08-18 Thread okram
Github user okram commented on the issue:

https://github.com/apache/tinkerpop/pull/384
  
+1 for `:set`. Look at our other `sets` to get a consistent naming 
convention, please.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] tinkerpop issue #384: TINKERPOP-1037 Made life more colorful

2016-08-18 Thread spmallette
Github user spmallette commented on the issue:

https://github.com/apache/tinkerpop/pull/384
  
+1 for use of `:set`


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] tinkerpop issue #384: TINKERPOP-1037 Made life more colorful

2016-08-18 Thread robertdale
Github user robertdale commented on the issue:

https://github.com/apache/tinkerpop/pull/384
  
Would you really want a separate preferences (properties) file or rather 
reuse the existing preferences mechanism (:set gremlin.console.errorMessage 
red) ?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] tinkerpop issue #384: TINKERPOP-1037 Made life more colorful

2016-08-18 Thread robertdale
Github user robertdale commented on the issue:

https://github.com/apache/tinkerpop/pull/384
  
There are some things that are out of our control because they are 
inherited from groovy.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] tinkerpop issue #384: TINKERPOP-1037 Made life more colorful

2016-08-18 Thread alaam
Github user alaam commented on the issue:

https://github.com/apache/tinkerpop/pull/384
  
+1 for having this be a preferences file


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] tinkerpop issue #384: TINKERPOP-1037 Made life more colorful

2016-08-18 Thread okram
Github user okram commented on the issue:

https://github.com/apache/tinkerpop/pull/384
  
Whoa. This is really cool. However, I think we should have a 
`.gremlin_preferences` style file where we do this:

```
gremlin.console.errorMessage=red
gremlin.console.prompt=white
gremlin.console.character=green
etc.
```

Then people can tweak to their liking and if they don't like it, they can 
go NOT have that file and it will be as it was before.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] tinkerpop issue #384: TINKERPOP-1037 Made life more colorful

2016-08-18 Thread dkuppitz
Github user dkuppitz commented on the issue:

https://github.com/apache/tinkerpop/pull/384
  
Hm, now the console has some colors, that's nice, but `TINKERPOP-1037` is 
actually about output coloring (which means to me, that results should have a 
bit of syntax coloring, right?). What do we need to do in order to have colored 
results (e.g. Strings in red, numbers in bllue, etc. et.c)?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] tinkerpop issue #384: TINKERPOP-1037 Made life more colorful

2016-08-18 Thread robertdale
Github user robertdale commented on the issue:

https://github.com/apache/tinkerpop/pull/384
  
Screenshot:  
![screenshot_2016-08-18_13-59-58](https://cloud.githubusercontent.com/assets/122206/17784872/4286944a-654c-11e6-8813-025bc3974601.png)



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] tinkerpop issue #384: TINKERPOP-1037 Made life more colorful

2016-08-18 Thread robertdale
Github user robertdale commented on the issue:

https://github.com/apache/tinkerpop/pull/384
  
Like I said, you did all the hard work. I just added color.  Try this in 
your console:  

gremlin> "@|bold,green Hello |@ "
==>Hello  




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] tinkerpop issue #384: TINKERPOP-1037 Made life more colorful

2016-08-18 Thread spmallette
Github user spmallette commented on the issue:

https://github.com/apache/tinkerpop/pull/384
  
that looks like all the same code i've written in the 
past...


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---