Pygments: now with more Lasso

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

Pygments: now with more Lasso

Eric Knibbe
For anyone interested, I've posted my fork of the Pygments project with support added for highlighting Lasso 8 or 9 code. It's capable of:

- hilighting any surrounding HTML, XML, CSS, or JavaScript using the appropriate lexer
- handling Lasso 9 shell scripts
- ignoring code inside [noprocess] blocks
- recognizing type, trait, query expression, member data, member method, and unbound method definitions
- tagging escape sequences within single- or double-quoted strings
- handling built-in tags, types, traits, and methods for both Lasso 8 and 9

If you want to try it out, read the first three pages at <http://pygments.org/docs/>, then follow instructions for "installing the development version", except clone my Mercurial repository at <https://bitbucket.org/EricFromCanada/pygments-main>. Once that's done, you should be able to run `pygmentize -l lasso sourcefile.lasso` to preview its output in Terminal.*

If you'd like to contribute, there's a few things that need work:

- it's not very good at detecting Lasso code in files that lack the .lasso extension. (This only applies when asking Pygments to guess which lexer to use, rather than specifying it manually.) Anyone with strong Python-fu is encouraged to tackle this.
- it's only been tested on the handful of Lasso source files I had on hand, so any examples of valid code that trips up the lexer would be appreciated. It should also be able to handle shoddy or incorrect code, but again, more testing is in order.
- it'll have a better chance of being incorporated into the main trunk if it includes a file or two of example code that demonstrates Lasso syntax with as much variety as possible.

Success? Failure? Suggestions? Let me know.

‐‐‐‐‐‐‐‐‐‐✂‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐
Eric3
 
* I'm told that for Mac devs to use Apple's or MacPorts' Python is a Bad Idea, so... http://jessenoller.com/2009/03/16/so-you-want-to-use-python-on-the-mac/
#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Pygments: now with more Lasso

stevepiercy
On 6/1/12 at 1:38 PM, [hidden email] (Eric Knibbe) pronounced:

>For anyone interested, I've posted my fork of the Pygments project with
>support added for highlighting Lasso 8 or 9 code. It's capable of:

YES!  Thank you!

I'm excited about this because as soon as the lexer for Lasso
gets pulled into the main branch of Pygments, then GitHub will
add Lasso as an official language and source files stored there
will have automatic syntax coloring.  w00t!

https://github.com/github/linguist#linguist

Of course, that means we would need an accompanying OctoRhino.
http://octodex.github.com/

>* I'm told that for Mac devs to use Apple's or MacPorts' Python
>is a Bad Idea, so... http://jessenoller.com/2009/03/16/so-you-want-to-use-python-on-the-mac/

Indeed.  It is best to get the installer for whatever Python you
want here:
http://www.python.org/download/

And you absolutely should use virtualenv.  This guide for
installing Pyramid into a virtualenv is extremely helpful and focused.
http://docs.pylonsproject.org/projects/pyramid/en/1.3-branch/narr/install.html#installing-pyramid-on-a-unix-system

The only difference would be to stop prior to installing Pyramid
and substitute the following commands:

     cd env
     bin/easy_install Pygments

--steve

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- --
Steve Piercy               Web Site Builder              
Soquel, CA
<[hidden email]>                  <http://www.StevePiercy.com/>

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Pygments: now with more Lasso

Eric Landmann
In reply to this post by Eric Knibbe
On 6/1/12 at 12:38 PM, [hidden email] (Eric Knibbe) wrote:

>For anyone interested, I've posted my fork of the Pygments project with support added for highlighting Lasso 8 or 9 code. It's capable of:

Sounds very good, but have a question. I have a Wordpress blog
that I use to post Lasso code bits. Would this work for that?

<http://blog.landmanninteractive.com/>

-------------------------------------------------------
Eric Landmann
Landmann InterActive, 6000 Gisholt Dr. #204, Madison, WI 53713 USA
Voice 608-257-1558  iChat: landintraktv  Twitter: iteratews
Content Management Systems | eCommerce | Custom Development

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Pygments: now with more Lasso

Eric Knibbe
A quick search dug up <http://wordpress.org/extend/plugins/tags/pygments>, so it looks workable, assuming you have shell access to the server to get it installed. Unlike JavaScript-based tools like Chili <http://noteslog.com/projects/chili/> or SyntaxHighlighter <http://alexgorbatchev.com/SyntaxHighlighter/>, Pygments is a server-side tool, so hilighting code on web pages is just one of its potential applications.

‐‐‐‐‐‐‐‐‐‐✂‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐
Eric3
 

On 2012-06-01, at 4:36 PM, Eric Landmann wrote:

> On 6/1/12 at 12:38 PM, [hidden email] (Eric Knibbe) wrote:
>
>> For anyone interested, I've posted my fork of the Pygments project with support added for highlighting Lasso 8 or 9 code. It's capable of:
>
> Sounds very good, but have a question. I have a Wordpress blog that I use to post Lasso code bits. Would this work for that?
>
> <http://blog.landmanninteractive.com/>
>
> -------------------------------------------------------
> Eric Landmann
> Landmann InterActive, 6000 Gisholt Dr. #204, Madison, WI 53713 USA
> Voice 608-257-1558  iChat: landintraktv  Twitter: iteratews
> Content Management Systems | eCommerce | Custom Development
>
> #############################################################
> This message is sent to you because you are subscribed to
> the mailing list Lasso
> [hidden email]
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Pygments: now with more Lasso

stevepiercy
In reply to this post by Eric Landmann
On 6/1/12 at 3:36 PM, [hidden email] (Eric
Landmann) pronounced:

>On 6/1/12 at 12:38 PM, [hidden email] (Eric Knibbe) wrote:
>
>>For anyone interested, I've posted my fork of the Pygments project with support added for
>highlighting Lasso 8 or 9 code. It's capable of:
>
>Sounds very good, but have a question. I have a Wordpress blog
>that I use to post Lasso code bits. Would this work for that?
>
><http://blog.landmanninteractive.com/>

Not automatically.

Pygments is in Python, so you would have to fire off a command
to execute it, then capture the output.  You could do that
manually then add the content to your blog entry, or you could
try to hack WP to fire it off and capture the output.

Alternatively for syntax coloring, I use the SyntaxHighlighter
javascript tool by Alex Gorbachev and a Lasso theme from Jason
Huck.  It renders code samples on the client side pretty well.  
The documentation provides instructions on how to work with blogs.
http://alexgorbatchev.com/SyntaxHighlighter/

If you downloaded the slides from either of my LDC
presentations, the source is contained therein.  I don't see
them up on the LassoSoft site yet.

--steve

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- --
Steve Piercy               Web Site Builder              
Soquel, CA
<[hidden email]>                  <http://www.StevePiercy.com/>

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Pygments: now with more Lasso

stevepiercy
In reply to this post by Eric Knibbe
On 6/1/12 at 1:38 PM, [hidden email] (Eric Knibbe) pronounced:

>If you want to try it out, read the first three pages at
><http://pygments.org/docs/>, then follow instructions for "installing the
>development version", except clone my Mercurial repository at
><https://bitbucket.org/EricFromCanada/pygments-main>. Once that's done, you
>should be able to run `pygmentize -l lasso sourcefile.lasso` to preview its
>output in Terminal.*

One more thing.  Forking first is recommended over just cloning
repos when working in teams of developers.  This document
provides details of the workflow process.

https://confluence.atlassian.com/display/BITBUCKET/Forking+a+bitbucket+Repository

--steve

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- --
Steve Piercy               Web Site Builder              
Soquel, CA
<[hidden email]>                  <http://www.StevePiercy.com/>

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Pygments: now with more Lasso

stevepiercy
In reply to this post by Eric Knibbe
Should the lexer be kept "pure" and not include custom types?

Let's say I want to add custom types, like knop_nav, to the
lexer.  Should I modify the file
pygments/lexers/_lassobuiltins.py directly, modify the
generating script, or something else?

--steve


On 6/1/12 at 1:38 PM, [hidden email] (Eric Knibbe) pronounced:

>For anyone interested, I've posted my fork of the Pygments
>project with support added for highlighting Lasso 8 or 9 code.
>It's capable of:
>
>- hilighting any surrounding HTML, XML, CSS, or JavaScript using the appropriate lexer
>- handling Lasso 9 shell scripts
>- ignoring code inside [noprocess] blocks
>- recognizing type, trait, query expression, member data,
>member method, and unbound method definitions
>- tagging escape sequences within single- or double-quoted strings
>- handling built-in tags, types, traits, and methods for both Lasso 8 and 9
>
>If you want to try it out, read the first three pages at
><http://pygments.org/docs/>, then follow instructions for
>"installing the development version", except clone my Mercurial
>repository at
><https://bitbucket.org/EricFromCanada/pygments-main>. Once
>that's done, you should be able to run `pygmentize -l lasso
>sourcefile.lasso` to preview its output in Terminal.*
>If you'd like to contribute, there's a few things that need work:
>- it's not very good at detecting Lasso code in files that lack
>the .lasso extension. (This only applies when asking Pygments
>to guess which lexer to use, rather than specifying it
>manually.) Anyone with strong Python-fu is encouraged to tackle this.
>- it's only been tested on the handful of Lasso source files I
>had on hand, so any examples of valid code that trips up the
>lexer would be appreciated. It should also be able to handle
>shoddy or incorrect code, but again, more testing is in order.
>- it'll have a better chance of being incorporated into the
>main trunk if it includes a file or two of example code that
>demonstrates Lasso syntax with as much variety as possible.
>Success? Failure? Suggestions? Let me know.
>
>‐‐‐‐‐‐‐‐‐‐✂‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐
>Eric3
>
>* I'm told that for Mac devs to use Apple's or MacPorts' Python
>is a Bad Idea, so... http://jessenoller.com/2009/03/16/so-you-want-to-use-python-on-the-mac/
>#############################################################
>This message is sent to you because you are subscribed to
>the mailing list Lasso
>[hidden email]
>To unsubscribe, E-mail to: <[hidden email]>
>Send administrative queries to  <[hidden email]>

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- --
Steve Piercy               Web Site Builder              
Soquel, CA
<[hidden email]>                  <http://www.StevePiercy.com/>

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Pygments: now with more Lasso

stevepiercy
Or adding in the tags from TagSwap?

Perhaps modifying the _lassobuiltins.py file by adding custom tags/types at the end?

--steve


On 6/1/12 at 4:25 PM, [hidden email] (Steve Piercy - Web Site Builder) pronounced:

> Should the lexer be kept "pure" and not include custom types?
>
> Let's say I want to add custom types, like knop_nav, to the
> lexer.  Should I modify the file
> pygments/lexers/_lassobuiltins.py directly, modify the
> generating script, or something else?
>
> --steve
>
>
> On 6/1/12 at 1:38 PM, [hidden email] (Eric Knibbe) pronounced:
>
> >For anyone interested, I've posted my fork of the Pygments
> >project with support added for highlighting Lasso 8 or 9 code.
> >It's capable of:
> >
> >- hilighting any surrounding HTML, XML, CSS, or JavaScript using the appropriate lexer
> >- handling Lasso 9 shell scripts
> >- ignoring code inside [noprocess] blocks
> >- recognizing type, trait, query expression, member data,
> >member method, and unbound method definitions
> >- tagging escape sequences within single- or double-quoted strings
> >- handling built-in tags, types, traits, and methods for both Lasso 8 and 9
> >
> >If you want to try it out, read the first three pages at
> ><http://pygments.org/docs/>, then follow instructions for
> >"installing the development version", except clone my Mercurial
> >repository at
> ><https://bitbucket.org/EricFromCanada/pygments-main>. Once
> >that's done, you should be able to run `pygmentize -l lasso
> >sourcefile.lasso` to preview its output in Terminal.*
> >If you'd like to contribute, there's a few things that need work:
> >- it's not very good at detecting Lasso code in files that lack
> >the .lasso extension. (This only applies when asking Pygments
> >to guess which lexer to use, rather than specifying it
> >manually.) Anyone with strong Python-fu is encouraged to tackle this.
> >- it's only been tested on the handful of Lasso source files I
> >had on hand, so any examples of valid code that trips up the
> >lexer would be appreciated. It should also be able to handle
> >shoddy or incorrect code, but again, more testing is in order.
> >- it'll have a better chance of being incorporated into the
> >main trunk if it includes a file or two of example code that
> >demonstrates Lasso syntax with as much variety as possible.
> >Success? Failure? Suggestions? Let me know.
> >
> >‐‐‐‐‐‐‐‐‐‐✂‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐
> >Eric3
> >
> >* I'm told that for Mac devs to use Apple's or MacPorts' Python
> >is a Bad Idea, so...
> http://jessenoller.com/2009/03/16/so-you-want-to-use-python-on-the-mac/
> >#############################################################
> >This message is sent to you because you are subscribed to
> >the mailing list Lasso
> >[hidden email]
> >To unsubscribe, E-mail to: <[hidden email]>
> >Send administrative queries to  <[hidden email]>
>
> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> -- --
> Steve Piercy               Web Site Builder              
> Soquel, CA
> <[hidden email]>                  <http://www.StevePiercy.com/>
>
> #############################################################
> This message is sent to you because you are subscribed to
>   the mailing list Lasso
> [hidden email]
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>
>

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Steve Piercy               Web Site Builder               Soquel, CA
<[hidden email]>                  <http://www.StevePiercy.com/>

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Pygments: now with more Lasso

stevepiercy
In reply to this post by Eric Knibbe
One more tip.

Configuring Multiple SSH Identities for GitBash, Mac OSX, &
Linux on Bitbucket
https://confluence.atlassian.com/pages/viewpage.action?pageId=271943168

--steve


On 6/1/12 at 1:38 PM, [hidden email] (Eric Knibbe) pronounced:

>For anyone interested, I've posted my fork of the Pygments
>project with support added for highlighting Lasso 8 or 9 code.
>It's capable of:
>
>- hilighting any surrounding HTML, XML, CSS, or JavaScript using the appropriate lexer
>- handling Lasso 9 shell scripts
>- ignoring code inside [noprocess] blocks
>- recognizing type, trait, query expression, member data,
>member method, and unbound method definitions
>- tagging escape sequences within single- or double-quoted strings
>- handling built-in tags, types, traits, and methods for both Lasso 8 and 9
>
>If you want to try it out, read the first three pages at
><http://pygments.org/docs/>, then follow instructions for
>"installing the development version", except clone my Mercurial
>repository at
><https://bitbucket.org/EricFromCanada/pygments-main>. Once
>that's done, you should be able to run `pygmentize -l lasso
>sourcefile.lasso` to preview its output in Terminal.*
>If you'd like to contribute, there's a few things that need work:
>- it's not very good at detecting Lasso code in files that lack
>the .lasso extension. (This only applies when asking Pygments
>to guess which lexer to use, rather than specifying it
>manually.) Anyone with strong Python-fu is encouraged to tackle this.
>- it's only been tested on the handful of Lasso source files I
>had on hand, so any examples of valid code that trips up the
>lexer would be appreciated. It should also be able to handle
>shoddy or incorrect code, but again, more testing is in order.
>- it'll have a better chance of being incorporated into the
>main trunk if it includes a file or two of example code that
>demonstrates Lasso syntax with as much variety as possible.
>Success? Failure? Suggestions? Let me know.
>
>‐‐‐‐‐‐‐‐‐‐✂‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐
>Eric3
>
>* I'm told that for Mac devs to use Apple's or MacPorts' Python
>is a Bad Idea, so... http://jessenoller.com/2009/03/16/so-you-want-to-use-python-on-the-mac/
>#############################################################
>This message is sent to you because you are subscribed to
>the mailing list Lasso
>[hidden email]
>To unsubscribe, E-mail to: <[hidden email]>
>Send administrative queries to  <[hidden email]>

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- --
Steve Piercy               Web Site Builder              
Soquel, CA
<[hidden email]>                  <http://www.StevePiercy.com/>

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Pygments: now with more Lasso

Eric Knibbe
In reply to this post by Eric Knibbe
Is anyone eagerly anticipating the addition of a Lasso lexer to Pygments? If you'd like to show your anticipation, you can do so by heading on over to the pull request I just created and "liking" it, just in case that'll help move it up the pygments developers' priority queue.

<https://bitbucket.org/birkenfeld/pygments-main/pull-request/95/new-lexer-for-the-lasso-language>
‐‐‐‐‐‐‐‐‐‐✂‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐
Eric3
 

On 2012-06-01, at 1:38 PM, Eric Knibbe wrote:

> For anyone interested, I've posted my fork of the Pygments project with support added for highlighting Lasso 8 or 9 code. It's capable of:
>
> - hilighting any surrounding HTML, XML, CSS, or JavaScript using the appropriate lexer
> - handling Lasso 9 shell scripts
> - ignoring code inside [noprocess] blocks
> - recognizing type, trait, query expression, member data, member method, and unbound method definitions
> - tagging escape sequences within single- or double-quoted strings
> - handling built-in tags, types, traits, and methods for both Lasso 8 and 9
>
> If you want to try it out, read the first three pages at <http://pygments.org/docs/>, then follow instructions for "installing the development version", except clone my Mercurial repository at <https://bitbucket.org/EricFromCanada/pygments-main>. Once that's done, you should be able to run `pygmentize -l lasso sourcefile.lasso` to preview its output in Terminal.*
>
> If you'd like to contribute, there's a few things that need work:
>
> - it's not very good at detecting Lasso code in files that lack the .lasso extension. (This only applies when asking Pygments to guess which lexer to use, rather than specifying it manually.) Anyone with strong Python-fu is encouraged to tackle this.
> - it's only been tested on the handful of Lasso source files I had on hand, so any examples of valid code that trips up the lexer would be appreciated. It should also be able to handle shoddy or incorrect code, but again, more testing is in order.
> - it'll have a better chance of being incorporated into the main trunk if it includes a file or two of example code that demonstrates Lasso syntax with as much variety as possible.
>
> Success? Failure? Suggestions? Let me know.
>
> ‐‐‐‐‐‐‐‐‐‐✂‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐
> Eric3
>
> * I'm told that for Mac devs to use Apple's or MacPorts' Python is a Bad Idea, so... http://jessenoller.com/2009/03/16/so-you-want-to-use-python-on-the-mac/
> #############################################################
> This message is sent to you because you are subscribed to
>  the mailing list Lasso
> [hidden email]
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Pygments: now with more Lasso

stevepiercy
"like"-ing the addition of Lasso as a lexer in Pygments is
important because GitHub uses these lexers to:

* detect blob languages [Lasso would become one]
* highlight code [syntax code coloring]
* ignore binary files
* suppress generated files in diffs
* generate language breakdown graphs

https://github.com/github/linguist/blob/master/README.md

Please take a few minutes to sign up for a free BitBucket
account to enable "like".

<https://bitbucket.org/birkenfeld/pygments-main/pull-request/95/new-lexer-for-the-lasso-language>

--steve


On 8/17/12 at 11:22 PM, [hidden email] (Eric Knibbe) pronounced:

>Is anyone eagerly anticipating the addition of a Lasso lexer to
>Pygments? If you'd like to show your anticipation, you can do
>so by heading on over to the pull request I just created and
>"liking" it, just in case that'll help move it up the pygments
>developers' priority queue.
><https://bitbucket.org/birkenfeld/pygments-main/pull-request/95/new-lexer-for-the-
>lasso-language>
>‐‐‐‐‐‐‐‐‐‐✂‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐
>Eric3
>
>
>On 2012-06-01, at 1:38 PM, Eric Knibbe wrote:
>
>>For anyone interested, I've posted my fork of the Pygments project with support
>added for highlighting Lasso 8 or 9 code. It's capable of:
>>
>>- hilighting any surrounding HTML, XML, CSS, or JavaScript using the appropriate
>lexer
>>- handling Lasso 9 shell scripts
>>- ignoring code inside [noprocess] blocks
>>- recognizing type, trait, query expression, member data, member method, and
>unbound method definitions
>>- tagging escape sequences within single- or double-quoted strings
>>- handling built-in tags, types, traits, and methods for both Lasso 8 and 9
>>
>>If you want to try it out, read the first three pages at
><http://pygments.org/docs/>, then follow instructions for
>"installing the development version", except clone my Mercurial
>repository at
><https://bitbucket.org/EricFromCanada/pygments-main>. Once
>that's done, you should be able to run `pygmentize -l lasso
>sourcefile.lasso` to preview its output in Terminal.*
>>
>>If you'd like to contribute, there's a few things that need work:
>>- it's not very good at detecting Lasso code in files that lack the .lasso
>extension. (This only applies when asking Pygments to guess
>which lexer to use, rather than specifying it manually.) Anyone
>with strong Python-fu is encouraged to tackle this.
>>- it's only been tested on the handful of Lasso source files I had on hand, so
>any examples of valid code that trips up the lexer would be
>appreciated. It should also be able to handle shoddy or
>incorrect code, but again, more testing is in order.
>>- it'll have a better chance of being incorporated into the main trunk if it
>includes a file or two of example code that demonstrates Lasso
>syntax with as much variety as possible.
>>
>>Success? Failure? Suggestions? Let me know.
>>
>>‐‐‐‐‐‐‐‐‐‐✂‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐
>>Eric3
>>
>>* I'm told that for Mac devs to use Apple's or MacPorts' Python is a Bad Idea,
>so... http://jessenoller.com/2009/03/16/so-you-want-to-use-python-on-the-mac/
>>#############################################################
>>This message is sent to you because you are subscribed to
>>the mailing list Lasso
>>[hidden email]
>>To unsubscribe, E-mail to: <[hidden email]>
>>Send administrative queries to  <[hidden email]>
>
>#############################################################
>This message is sent to you because you are subscribed to
>the mailing list Lasso
>[hidden email]
>To unsubscribe, E-mail to: <[hidden email]>
>Send administrative queries to  <[hidden email]>

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- --
Steve Piercy               Web Site Builder              
Soquel, CA
<[hidden email]>                  <http://www.StevePiercy.com/>

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Pygments: now with more Lasso

stevepiercy
We're in!  W00T!
https://bitbucket.org/birkenfeld/pygments-main/pull-request/95/new-lexer-for-the-lasso-language

Now I'm watching for GitHub to update Linguist, deploy, and see
the Knop project (and all the Lasso things) with syntax highlighting!
https://github.com/github/linguist/issues/234

--steve


On 8/17/12 at 8:56 PM, [hidden email] (Steve Piercy - Web
Site Builder) pronounced:

>"like"-ing the addition of Lasso as a lexer in Pygments is
>important because GitHub uses these lexers to:
>
>* detect blob languages [Lasso would become one]
>* highlight code [syntax code coloring]
>* ignore binary files
>* suppress generated files in diffs
>* generate language breakdown graphs
>
>https://github.com/github/linguist/blob/master/README.md
>
>Please take a few minutes to sign up for a free BitBucket
>account to enable "like".
>
><https://bitbucket.org/birkenfeld/pygments-main/pull-request/95/new-lexer-for-the-lasso-language>
>
>--steve
>
>
>On 8/17/12 at 11:22 PM, [hidden email] (Eric Knibbe) pronounced:
>
>>Is anyone eagerly anticipating the addition of a Lasso lexer
>>to Pygments? If you'd like to show your anticipation, you can
>>do so by heading on over to the pull request I just created
>>and "liking" it, just in case that'll help move it up the
>>pygments developers' priority queue.
>><https://bitbucket.org/birkenfeld/pygments-main/pull-request/95/new-lexer-for-the-
>>lasso-language>
>>‐‐‐‐‐‐‐‐‐‐✂‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐
>>Eric3
>>
>>
>>On 2012-06-01, at 1:38 PM, Eric Knibbe wrote:
>>
>>>For anyone interested, I've posted my fork of the Pygments project with support
>>added for highlighting Lasso 8 or 9 code. It's capable of:
>>>
>>>- hilighting any surrounding HTML, XML, CSS, or JavaScript using the appropriate
>>lexer
>>>- handling Lasso 9 shell scripts
>>>- ignoring code inside [noprocess] blocks
>>>- recognizing type, trait, query expression, member data, member method, and
>>unbound method definitions
>>>- tagging escape sequences within single- or double-quoted strings
>>>- handling built-in tags, types, traits, and methods for both Lasso 8 and 9
>>>
>>>If you want to try it out, read the first three pages at
>><http://pygments.org/docs/>, then follow instructions for
>>"installing the development version", except clone my
>>Mercurial repository at
>><https://bitbucket.org/EricFromCanada/pygments-main>. Once
>>that's done, you should be able to run `pygmentize -l lasso
>>sourcefile.lasso` to preview its output in Terminal.*
>>>
>>>If you'd like to contribute, there's a few things that need work:
>>>- it's not very good at detecting Lasso code in files that lack the .lasso
>>extension. (This only applies when asking Pygments to guess
>>which lexer to use, rather than specifying it manually.)
>>Anyone with strong Python-fu is encouraged to tackle this.
>>>- it's only been tested on the handful of Lasso source files I had on hand, so
>>any examples of valid code that trips up the lexer would be
>>appreciated. It should also be able to handle shoddy or
>>incorrect code, but again, more testing is in order.
>>>- it'll have a better chance of being incorporated into the main trunk if it
>>includes a file or two of example code that demonstrates Lasso
>>syntax with as much variety as possible.
>>>
>>>Success? Failure? Suggestions? Let me know.
>>>
>>>‐‐‐‐‐‐‐‐‐‐✂‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐
>>>Eric3
>>>
>>>* I'm told that for Mac devs to use Apple's or MacPorts' Python is a Bad Idea,
>>so... http://jessenoller.com/2009/03/16/so-you-want-to-use-python-on-the-mac/
>>>#############################################################
>>>This message is sent to you because you are subscribed to
>>>the mailing list Lasso
>>>[hidden email]
>>>To unsubscribe, E-mail to: <[hidden email]>
>>>Send administrative queries to  <[hidden email]>
>>
>>#############################################################
>>This message is sent to you because you are subscribed to
>>the mailing list Lasso
>>[hidden email]
>>To unsubscribe, E-mail to: <[hidden email]>
>>Send administrative queries to  <[hidden email]>
>
>-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>-- --
>Steve Piercy               Web Site Builder              
>Soquel, CA
><[hidden email]>                  <http://www.StevePiercy.com/>
>
>#############################################################
>This message is sent to you because you are subscribed to
>the mailing list Lasso
>[hidden email]
>To unsubscribe, E-mail to: <[hidden email]>
>Send administrative queries to  <[hidden email]>
>

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- --
Steve Piercy               Web Site Builder              
Soquel, CA
<[hidden email]>                  <http://www.StevePiercy.com/>

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Pygments: now with more Lasso

stevepiercy
In reply to this post by Eric Knibbe
For GitHub recognition of Lasso, I submitted a pull request for linguist:
https://github.com/github/linguist/pull/235

Their buildbot returned a status of "failed" because GitHub is
using a 2-month old version of Pygments.  So I added a comment
to an open issue for that library:
https://github.com/tmm1/pygments.rb/issues/36

Feel free to add comments to these issues and gently request
GitHub's attention.

--steve


On 8/19/12 at 2:27 AM, [hidden email] (Steve Piercy - Web
Site Builder) pronounced:

>We're in!  W00T!
>https://bitbucket.org/birkenfeld/pygments-main/pull-request/95/new-lexer-for-the-lasso-language
>
>Now I'm watching for GitHub to update Linguist, deploy, and see
>the Knop project (and all the Lasso things) with syntax highlighting!
>https://github.com/github/linguist/issues/234
>
>--steve
>
>
>On 8/17/12 at 8:56 PM, [hidden email] (Steve Piercy - Web Site Builder) pronounced:
>
>>"like"-ing the addition of Lasso as a lexer in Pygments is
>>important because GitHub uses these lexers to:
>>
>>* detect blob languages [Lasso would become one]
>>* highlight code [syntax code coloring]
>>* ignore binary files
>>* suppress generated files in diffs
>>* generate language breakdown graphs
>>
>>https://github.com/github/linguist/blob/master/README.md
>>
>>Please take a few minutes to sign up for a free BitBucket
>>account to enable "like".
>>
>><https://bitbucket.org/birkenfeld/pygments-main/pull-request/95/new-lexer-for-the-lasso-language>
>>
>>--steve
>>
>>
>>On 8/17/12 at 11:22 PM, [hidden email] (Eric Knibbe) pronounced:
>>
>>>Is anyone eagerly anticipating the addition of a Lasso lexer
>>>to Pygments? If you'd like to show your anticipation, you can
>>>do so by heading on over to the pull request I just created
>>>and "liking" it, just in case that'll help move it up the
>>>pygments developers' priority queue.
>>><https://bitbucket.org/birkenfeld/pygments-main/pull-request/95/new-lexer-for-the-
>>>lasso-language>
>>>‐‐‐‐‐‐‐‐‐‐✂‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐
>>>Eric3
>>>
>>>
>>>On 2012-06-01, at 1:38 PM, Eric Knibbe wrote:
>>>
>>>>For anyone interested, I've posted my fork of the Pygments project with support
>>>added for highlighting Lasso 8 or 9 code. It's capable of:
>>>>
>>>>- hilighting any surrounding HTML, XML, CSS, or JavaScript using the appropriate
>>>lexer
>>>>- handling Lasso 9 shell scripts
>>>>- ignoring code inside [noprocess] blocks
>>>>- recognizing type, trait, query expression, member data, member method, and
>>>unbound method definitions
>>>>- tagging escape sequences within single- or double-quoted strings
>>>>- handling built-in tags, types, traits, and methods for both Lasso 8 and 9
>>>>
>>>>If you want to try it out, read the first three pages at
>>><http://pygments.org/docs/>, then follow instructions for
>>>"installing the development version", except clone my
>>>Mercurial repository at
>>><https://bitbucket.org/EricFromCanada/pygments-main>. Once
>>>that's done, you should be able to run `pygmentize -l lasso
>>>sourcefile.lasso` to preview its output in Terminal.*
>>>>
>>>>If you'd like to contribute, there's a few things that need work:
>>>>- it's not very good at detecting Lasso code in files that lack the .lasso
>>>extension. (This only applies when asking Pygments to guess
>>>which lexer to use, rather than specifying it manually.)
>>>Anyone with strong Python-fu is encouraged to tackle this.
>>>>- it's only been tested on the handful of Lasso source files I had on hand, so
>>>any examples of valid code that trips up the lexer would be
>>>appreciated. It should also be able to handle shoddy or
>>>incorrect code, but again, more testing is in order.
>>>>- it'll have a better chance of being incorporated into the main trunk if it
>>>includes a file or two of example code that demonstrates
>>>Lasso syntax with as much variety as possible.
>>>>
>>>>Success? Failure? Suggestions? Let me know.
>>>>
>>>>‐‐‐‐‐‐‐‐‐‐✂‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐
>>>>Eric3
>>>>
>>>>* I'm told that for Mac devs to use Apple's or MacPorts' Python is a Bad Idea,
>>>so... http://jessenoller.com/2009/03/16/so-you-want-to-use-python-on-the-mac/
>>>>#############################################################
>>>>This message is sent to you because you are subscribed to
>>>>the mailing list Lasso
>>>>[hidden email]
>>>>To unsubscribe, E-mail to: <[hidden email]>
>>>>Send administrative queries to  <[hidden email]>
>>>
>>>#############################################################
>>>This message is sent to you because you are subscribed to
>>>the mailing list Lasso
>>>[hidden email]
>>>To unsubscribe, E-mail to: <[hidden email]>
>>>Send administrative queries to  <[hidden email]>
>>
>>-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>>-- --
>>Steve Piercy               Web Site Builder              
>>Soquel, CA
>><[hidden email]>                  <http://www.StevePiercy.com/>
>>
>>#############################################################
>>This message is sent to you because you are subscribed to
>>the mailing list Lasso
>>[hidden email]
>>To unsubscribe, E-mail to: <[hidden email]>
>>Send administrative queries to  <[hidden email]>
>>
>
>-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>Steve Piercy               Web Site Builder               Soquel, CA
><[hidden email]>                  <http://www.StevePiercy.com/>

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- --
Steve Piercy               Web Site Builder              
Soquel, CA
<[hidden email]>                  <http://www.StevePiercy.com/>

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>