Sun 2012-10-21 ( In En pr )

I totally missed this new Rouge gem which came out in September. It’s a Pygments port in pure Ruby!

Jay Adkisson did a great job in my opinion, and the project is destined to become popular — I guess, in the long run, even more popular than CodeRay. Like Pygments, it has a long list of supported languages, a plethora of compatible stylesheets (even with 256 color terminal output), and the ability to guess the language of a piece of code.

If you’re using CodeRay or one of the Pygments wrappers, you should definitely check out this project.

Rouge also inherits from Pygments the DSL-based lexer definitions, which means it’s much cleaner to maintain, and also slower to execute.

Here’s a very quick benchmark that helped me to get a first impression:

The last number is based on two performance patches that have already been merged.

So, right now Rouge is a lot slower than the Pygments wrappers. If that can be fixed, there’s no reason left not to switch.

Update 2012-10-31: With @jayferd’s latest speedups, Rouge is almost as fast as Pygments now!

Say something! / Sag was!

1
aYlNlfdX @ 19:26 on Tuesday, 2024-08-06
1
aYlNlfdX @ 19:26 on Tuesday, 2024-08-06
1
aYlNlfdX @ 19:27 on Tuesday, 2024-08-06
1
aYlNlfdX @ 19:27 on Tuesday, 2024-08-06
1
-1 OR 2+67-67-1=0+0+0+1 -- @ 19:27 on Tuesday, 2024-08-06
1
-1 OR 2+70-70-1=0+0+0+1 @ 19:27 on Tuesday, 2024-08-06
1
-1' OR 2+637-637-1=0+0+0+1 -- @ 19:27 on Tuesday, 2024-08-06
1
-1' OR 2+687-687-1=0+0+0+1 or 'AzjFxczD'=' @ 19:27 on Tuesday, 2024-08-06
1
-1" OR 2+293-293-1=0+0+0+1 -- @ 19:27 on Tuesday, 2024-08-06
1
if(now()=sysdate(),sleep(15),0) @ 19:27 on Tuesday, 2024-08-06
1
aYlNlfdX0"XOR(if(now()=sysdate(),sleep(15),0))XOR"Z @ 19:27 on Tuesday, 2024-08-06
1
(select(0)from(select(sleep(15)))v)/*'+(select(0)from(select(sleep(15)))v)+'"+(select(0)from(select(sleep(15)))v)+"*/ @ 19:27 on Tuesday, 2024-08-06
1
aYlNlfdX-1 waitfor delay '0:0:15' -- @ 19:27 on Tuesday, 2024-08-06
1
aYlNlfdXAKU4lgbX'; waitfor delay '0:0:15' -- @ 19:27 on Tuesday, 2024-08-06
1
aYlNlfdX8aRE9ku8' OR 811=(SELECT 811 FROM PG_SLEEP(15))-- @ 19:27 on Tuesday, 2024-08-06
1
aYlNlfdXWuK9yaQv') OR 675=(SELECT 675 FROM PG_SLEEP(15))-- @ 19:27 on Tuesday, 2024-08-06
1
aYlNlfdXZ4O4H7D0')) OR 601=(SELECT 601 FROM PG_SLEEP(15))-- @ 19:27 on Tuesday, 2024-08-06
1
aYlNlfdX'||DBMS_PIPE.RECEIVE_MESSAGE(CHR(98)||CHR(98)||CHR(98),15)||' @ 19:27 on Tuesday, 2024-08-06
1
'||(select 1 from (select pg_sleep(15))x)||' @ 19:27 on Tuesday, 2024-08-06
1
''||(select 1 from (select pg_sleep(15))x)||'' @ 19:27 on Tuesday, 2024-08-06
1
aYlNlfdX'" @ 19:27 on Tuesday, 2024-08-06
1
@@U2WaW @ 19:27 on Tuesday, 2024-08-06
1
aYlNlfdX @ 19:27 on Tuesday, 2024-08-06
1
aYlNlfdX @ 19:27 on Tuesday, 2024-08-06
-1 OR 2+774-774-1=0+0+0+1 -- 
aYlNlfdX @ 19:27 on Tuesday, 2024-08-06
-1 OR 3+497-497-1=0+0+0+1
aYlNlfdX @ 19:27 on Tuesday, 2024-08-06
-1 OR 3*2<(0+5+497-497)
aYlNlfdX @ 19:27 on Tuesday, 2024-08-06
-1 OR 3*2>(0+5+497-497)
aYlNlfdX @ 19:27 on Tuesday, 2024-08-06
-1' OR 2+451-451-1=0+0+0+1 -- 
aYlNlfdX @ 19:27 on Tuesday, 2024-08-06
-1' OR 2+102-102-1=0+0+0+1 or 'LVPs2kWH'='
aYlNlfdX @ 19:27 on Tuesday, 2024-08-06
-1" OR 2+625-625-1=0+0+0+1 -- 
aYlNlfdX @ 19:27 on Tuesday, 2024-08-06
1*if(now()=sysdate(),sleep(15),0)
aYlNlfdX @ 19:27 on Tuesday, 2024-08-06
10'XOR(1*if(now()=sysdate(),sleep(15),0))XOR'Z
aYlNlfdX @ 19:27 on Tuesday, 2024-08-06
10"XOR(1*if(now()=sysdate(),sleep(15),0))XOR"Z
aYlNlfdX @ 19:27 on Tuesday, 2024-08-06
(select(0)from(select(sleep(15)))v)/*'+(select(0)from(select(sleep(15)))v)+'"+(select(0)from(select(sleep(15)))v)+"*/
aYlNlfdX @ 19:27 on Tuesday, 2024-08-06
1-1; waitfor delay '0:0:15' -- 
aYlNlfdX @ 19:27 on Tuesday, 2024-08-06
1-1); waitfor delay '0:0:15' -- 
aYlNlfdX @ 19:27 on Tuesday, 2024-08-06
1-1 waitfor delay '0:0:15' -- 
aYlNlfdX @ 19:27 on Tuesday, 2024-08-06
17KZbwMWG'; waitfor delay '0:0:15' -- 
aYlNlfdX @ 19:27 on Tuesday, 2024-08-06
1-1 OR 656=(SELECT 656 FROM PG_SLEEP(15))--
aYlNlfdX @ 19:27 on Tuesday, 2024-08-06
1-1)) OR 896=(SELECT 896 FROM PG_SLEEP(15))--
aYlNlfdX @ 19:27 on Tuesday, 2024-08-06
1yUtXa7va' OR 724=(SELECT 724 FROM PG_SLEEP(15))--
aYlNlfdX @ 19:27 on Tuesday, 2024-08-06
1sfDWrHtc') OR 124=(SELECT 124 FROM PG_SLEEP(15))--
aYlNlfdX @ 19:27 on Tuesday, 2024-08-06
15bXAChJi')) OR 615=(SELECT 615 FROM PG_SLEEP(15))--
aYlNlfdX @ 19:27 on Tuesday, 2024-08-06
1*DBMS_PIPE.RECEIVE_MESSAGE(CHR(99)||CHR(99)||CHR(99),15)
aYlNlfdX @ 19:27 on Tuesday, 2024-08-06
1
aYlNlfdX @ 19:27 on Tuesday, 2024-08-06
1
aYlNlfdX @ 19:27 on Tuesday, 2024-08-06
1'||DBMS_PIPE.RECEIVE_MESSAGE(CHR(98)||CHR(98)||CHR(98),15)||'
aYlNlfdX @ 19:27 on Tuesday, 2024-08-06
'||(select 1 from (select pg_sleep(15))x)||'
aYlNlfdX @ 19:27 on Tuesday, 2024-08-06
''||(select 1 from (select pg_sleep(15))x)||''
aYlNlfdX @ 19:27 on Tuesday, 2024-08-06
1'"
aYlNlfdX @ 19:27 on Tuesday, 2024-08-06
@@Qcccc
aYlNlfdX @ 19:27 on Tuesday, 2024-08-06
1
aYlNlfdX @ 19:27 on Tuesday, 2024-08-06
1
aYlNlfdX @ 19:27 on Tuesday, 2024-08-06
1
aYlNlfdX @ 19:27 on Tuesday, 2024-08-06
1
aYlNlfdX @ 19:27 on Tuesday, 2024-08-06
1
aYlNlfdX @ 19:27 on Tuesday, 2024-08-06
1
aYlNlfdX @ 19:27 on Tuesday, 2024-08-06
1
aYlNlfdX @ 19:30 on Tuesday, 2024-08-06
1
aYlNlfdX @ 19:30 on Tuesday, 2024-08-06
1
aYlNlfdX @ 19:57 on Tuesday, 2024-08-06
1
aYlNlfdX @ 19:57 on Tuesday, 2024-08-06
1
aYlNlfdX @ 19:57 on Tuesday, 2024-08-06
1
aYlNlfdX @ 19:57 on Tuesday, 2024-08-06
1
aYlNlfdX @ 19:57 on Tuesday, 2024-08-06
1
aYlNlfdX @ 19:57 on Tuesday, 2024-08-06
1
aYlNlfdX @ 19:58 on Tuesday, 2024-08-06
1
aYlNlfdX @ 19:58 on Tuesday, 2024-08-06

No markup, just plain monospace text. / Kein Markup, nur Normschrift-Klartext.