New gems created: motion-kramdown and motion-strscan...

29 views
Skip to first unread message

lapo...@gmail.com

unread,
Feb 26, 2015, 4:04:02 AM2/26/15
to rubym...@googlegroups.com
Wanted to let everyone know that two new gems were created, solving a pain point I was having.

motion-kramdown brings the ruby Markdown parser kramdown to RubyMotion.  I like kramdown from my Rails work, and was missing it in my RM work.

motion-strscan is an implementation of StringScanner, which was needed for kramdown.

The performance still needs some work, but overall seems to be quite acceptable.  Happy for any suggestions or pull requests.

They are up on rubygems if anyone is interested.

Cheers,
Brett

Colin T.A. Gray

unread,
Feb 26, 2015, 9:25:35 AM2/26/15
to rubym...@googlegroups.com
Wow, awesome work!  Was it straightforward to convert these to RubyMotion-compatible code?


Colin T.A. Gray
Community Manager
HipByte



--
You received this message because you are subscribed to the Google Groups "RubyMotion - Ruby for iOS, OS X, and Android" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubymotion+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubymotion/3f9d5bc2-fad5-479f-8444-63e29a4a1b8d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jamon Holmgren

unread,
Feb 26, 2015, 9:48:45 PM2/26/15
to rubym...@googlegroups.com
Very nice indeed!

Jamon

lapo...@gmail.com

unread,
Feb 27, 2015, 3:02:44 PM2/27/15
to rubym...@googlegroups.com
Well, it turned out a little more difficult than I expected.  Since StringScanner (strscan) is not in the RM library, that had to be implemented.  Although I was able to find a MacRuby version (and a Rubinius version), both needed work to get working properly.

Probably the biggest issue was not realizing earlier that regular expressions follow the Cocoa style, rather than Ruby (there are a couple subtle differences).  Since kramdown is built off of regular expression parsing, it was a core problem.

The performance is not at all where it needs to be yet, and will take some work to figure out how to address it.

All in all, I'm glad I did it - I have a much better understanding of RM now.  And I wanted kramdown for a project i'm working on...

Cheers,
Brett
Reply all
Reply to author
Forward
0 new messages