fosstodon.org is one of the many independent Mastodon servers you can use to participate in the fediverse.
Fosstodon is an invite only Mastodon instance that is open to those who are interested in technology; particularly free & open source software. If you wish to join, contact us for an invite.

Administered by:

Server stats:

9.8K
active users

#pygments

0 posts0 participants0 posts today
Robin Tarsiger<p>… the <a href="https://mastodon.online/tags/Pygments" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Pygments</span></a> lexer for <a href="https://mastodon.online/tags/CommonLisp" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>CommonLisp</span></a> treats ‘defun’ and ‘list*’ (among other symbols) as basically the same thing. They're both ‘builtins’.</p><p>As the kids say, my disappointment is immeasurable.</p><p>Ggghh, emacs --batch + font-lock-fontify-buffer + output the face changes maybe?</p>
Virgile Andreani<p>If you use the pygments syntax highlighter (for example in your documentation), and you have examples that produce output (for example from the shell or Python REPL), here is a tip that I just discovered: look for the &quot;console session&quot; version of your language on this page: <a href="https://pygments.org/languages/" target="_blank" rel="nofollow noopener noreferrer" translate="no"><span class="invisible">https://</span><span class="">pygments.org/languages/</span><span class="invisible"></span></a><br />It keeps the language&#39;s syntactic coloring while dealing correctly with the prompt and output. Also when you copy the code, it will avoid copying the prompt.</p><p><a href="https://fosstodon.org/tags/Python" class="mention hashtag" rel="tag">#<span>Python</span></a> <a href="https://fosstodon.org/tags/pygments" class="mention hashtag" rel="tag">#<span>pygments</span></a> <a href="https://fosstodon.org/tags/foss" class="mention hashtag" rel="tag">#<span>foss</span></a></p>
Marei<p>Service toot: Just in case you need a reason to update your <a href="https://chaos.social/tags/TeXLive" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>TeXLive</span></a>:</p><p><a href="https://chaos.social/tags/minted" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>minted</span></a> finally release the 3.0.0 which provides an own binary which makes the python/ <a href="https://chaos.social/tags/pygments" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>pygments</span></a> setup obsolete. This also drops the requirement of shell-escape (or different hacks) to use the syntax highlighting.</p><p>Ensure to not only update the package itself, as you also need to update the settings which allow it to run in restricted mode.</p><p><a href="https://chaos.social/tags/TeXLaTeX" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>TeXLaTeX</span></a></p>
きゅーけー<p><a href="https://mastodon.tojo.tokyo/tags/pygments" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>pygments</span></a> 、Racket のコードもちゃんとシンタックスハイライティングしてくれるのかなり嬉しいな。<br>Racket に最初から入っている手続きに色が付いているので Racket の手続きやマクロのリストを持っているっぽい。<br>すばらしい。</p>
Ben Ramsey<p>Is Brent Roose on the Fediverse anywhere? I love this idea, and I’d love to help contribute.</p><p>I started down the path of trying to port <a href="https://phpc.social/tags/Pygments" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Pygments</span></a> to <a href="https://phpc.social/tags/PHP" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>PHP</span></a> a while back. I maintained a PHP wrapper for it (<a href="https://github.com/ramsey/pygments" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="">github.com/ramsey/pygments</span><span class="invisible"></span></a>), and even set up a GitHub organization for “Phygments.” 😉 <a href="https://github.com/phygments" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="">github.com/phygments</span><span class="invisible"></span></a></p><p>I want to help make this happen. Maybe I’ll have to email Brent if he’s not on the Fediverse.</p><p><span class="h-card" translate="no"><a href="https://phpc.social/@freekmurze" class="u-url mention" rel="nofollow noopener noreferrer" target="_blank">@<span>freekmurze</span></a></span> <span class="h-card" translate="no"><a href="https://phpc.social/@pronskiy" class="u-url mention" rel="nofollow noopener noreferrer" target="_blank">@<span>pronskiy</span></a></span> Do either of you know if he’s here? <a href="https://mastodon.social/@php_discussions/112118298296419881" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">mastodon.social/@php_discussio</span><span class="invisible">ns/112118298296419881</span></a></p>
Paolo Melchiorre<p>I used two default styles of &quot;pygments&quot; with high contrast ratio 🎨<br /><a href="https://pygments.org/styles/" target="_blank" rel="nofollow noopener noreferrer" translate="no"><span class="invisible">https://</span><span class="">pygments.org/styles/</span><span class="invisible"></span></a></p><p><a href="https://fosstodon.org/tags/a11y" class="mention hashtag" rel="tag">#<span>a11y</span></a> <a href="https://fosstodon.org/tags/pygments" class="mention hashtag" rel="tag">#<span>pygments</span></a> <a href="https://fosstodon.org/tags/contrast" class="mention hashtag" rel="tag">#<span>contrast</span></a> <a href="https://fosstodon.org/tags/styles" class="mention hashtag" rel="tag">#<span>styles</span></a> <a href="https://fosstodon.org/tags/code" class="mention hashtag" rel="tag">#<span>code</span></a></p>
danzin<p>At last, submitted a proposal for a <a href="https://mastodon.social/tags/Python" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Python</span></a> source code annotator for <a href="https://mastodon.social/tags/wily" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>wily</span></a>, by <span class="h-card" translate="no"><a href="https://fosstodon.org/@tonybaloney" class="u-url mention" rel="nofollow noopener noreferrer" target="_blank">@<span>tonybaloney</span></a></span>.</p><p>It allows inline visualization of code metrics in source code, inspired by <span class="h-card" translate="no"><a href="https://hachyderm.io/@coveragepy" class="u-url mention" rel="nofollow noopener noreferrer" target="_blank">@<span>coveragepy</span></a></span> </p><p>Uses <a href="https://mastodon.social/tags/radon" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>radon</span></a> to calculate <a href="https://mastodon.social/tags/Cyclomatic" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Cyclomatic</span></a> <a href="https://mastodon.social/tags/Complexity" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Complexity</span></a> and <a href="https://mastodon.social/tags/Halstead" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Halstead</span></a> metrics, then adds color coded metric values to a <a href="https://mastodon.social/tags/Pygments" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Pygments</span></a> highlighted source listing and allows changing the metrics for visualization.</p><p>The code works, there are screenshots and an example in the linked issue.</p><p><a href="https://mastodon.social/tags/codequality" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>codequality</span></a> </p><p><a href="https://github.com/tonybaloney/wily/issues/217" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">github.com/tonybaloney/wily/is</span><span class="invisible">sues/217</span></a></p>
danzin<p>Working on a <a href="https://mastodon.social/tags/Python" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Python</span></a> source code annotator for <a href="https://mastodon.social/tags/wily" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>wily</span></a>, which uses <a href="https://mastodon.social/tags/radon" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>radon</span></a> to calculate <a href="https://mastodon.social/tags/Cyclomatic" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Cyclomatic</span></a> <a href="https://mastodon.social/tags/Complexity" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Complexity</span></a> and <a href="https://mastodon.social/tags/Halstead" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Halstead</span></a> metrics. It adds metric values to a <a href="https://mastodon.social/tags/Pygments" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Pygments</span></a> highlighted source listing and allows changing the metrics for visualization.</p><p>Because radon doesn't record line numbers for Halstead metrics, we do a little song and dance to add them. Will probably offer a patch to include them upstream.</p><p><a href="https://mastodon.social/tags/codequality" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>codequality</span></a> 🐍 </p><p><a href="https://devdanzin.github.io/wily/annotated_src.annotator.py.html" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">devdanzin.github.io/wily/annot</span><span class="invisible">ated_src.annotator.py.html</span></a></p>
Kunal Mehta<p>Today <span class="h-card"><a href="https://octodon.social/@bd808" class="u-url mention" rel="nofollow noopener noreferrer" target="_blank">@<span>bd808</span></a></span> and I updated the <a href="https://wikis.world/tags/Pygments" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Pygments</span></a> syntax highlighter on <a href="https://wikis.world/tags/Wikimedia" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Wikimedia</span></a> from version 2.11.2 to 2.15.1 and saw a pretty nice drop in latency so far!</p><p>Also brought in some new languages, including the long-requested "wikitext"! You can now highlight wikitext markup in wikitext! lots of documentation to update :)</p><p><a href="https://phabricator.wikimedia.org/T334433" rel="nofollow noopener noreferrer" target="_blank"><span class="invisible">https://</span><span class="ellipsis">phabricator.wikimedia.org/T334</span><span class="invisible">433</span></a></p><p><a href="https://phabricator.wikimedia.org/T334137" rel="nofollow noopener noreferrer" target="_blank"><span class="invisible">https://</span><span class="ellipsis">phabricator.wikimedia.org/T334</span><span class="invisible">137</span></a></p><p>graph source: <a href="https://grafana.wikimedia.org/d/RKogW1m7z/shellbox?orgId=1&amp;var-dc=eqiad+prometheus%2Fk8s&amp;var-service=shellbox&amp;var-namespace=shellbox-syntaxhighlight&amp;var-release=main&amp;from=1682957424681&amp;to=1683000624681&amp;viewPanel=36" rel="nofollow noopener noreferrer" target="_blank"><span class="invisible">https://</span><span class="ellipsis">grafana.wikimedia.org/d/RKogW1</span><span class="invisible">m7z/shellbox?orgId=1&amp;var-dc=eqiad+prometheus%2Fk8s&amp;var-service=shellbox&amp;var-namespace=shellbox-syntaxhighlight&amp;var-release=main&amp;from=1682957424681&amp;to=1683000624681&amp;viewPanel=36</span></a></p>
Lucas Werkmeister<p>TIL: when pytest shows code, it automatically adds syntax highlighting if pygments is installed &lt;3</p><p>(pictured: the same test before vs. after installing pygments in the venv)</p><p><a href="https://wikis.world/tags/Python" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Python</span></a> <a href="https://wikis.world/tags/pytest" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>pytest</span></a> <a href="https://wikis.world/tags/pygments" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>pygments</span></a></p>
laund [moved]<p>I just got the first version of my Respawn Squirrel (source engine scripting language) lexer working! I'm making it in <a href="https://hachyderm.io/tags/pygments" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>pygments</span></a> for highlighting in the Sphinx documentation for the <a href="https://northstar.tf" rel="nofollow noopener noreferrer" target="_blank"><span class="invisible">https://</span><span class="">northstar.tf</span><span class="invisible"></span></a> <a href="https://hachyderm.io/tags/titanfall2" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>titanfall2</span></a> <a href="https://hachyderm.io/tags/modding" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>modding</span></a> client.</p><p>Pygments lexers are heaps of painful regex, and it probably doesn't help that I've never built a lexer before. But hey, now the docs can have beautiful code blocks! image is a screenshot of the readthedocs page.</p>
MediaWiki<p><a href="https://wikis.world/tags/MediaWiki" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>MediaWiki</span></a> uses the <a href="https://wikis.world/tags/Pygments" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Pygments</span></a> syntax highlighter to enable rich formatting of code blocks: <a href="https://www.mediawiki.org/wiki/Extension:SyntaxHighlight" rel="nofollow noopener noreferrer" target="_blank"><span class="invisible">https://www.</span><span class="ellipsis">mediawiki.org/wiki/Extension:S</span><span class="invisible">yntaxHighlight</span></a></p><p>diskdance has submitted a pull request to add a lexer to support <a href="https://wikis.world/tags/wikitext" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>wikitext</span></a> markup: <a href="https://github.com/pygments/pygments/pull/2373" rel="nofollow noopener noreferrer" target="_blank"><span class="invisible">https://</span><span class="ellipsis">github.com/pygments/pygments/p</span><span class="invisible">ull/2373</span></a></p><p>Hopefully it'll be in a release soon, to be used in on-wiki help pages and documentation!</p><p>(h/t to rundg for spotting)</p>
Thomas Waldmann<p>After almost 2 years, I finally released bepasty 1.1.0 (the universal pastebin), see there:</p><p><a href="https://github.com/bepasty/bepasty-server/releases/tag/1.1.0" rel="nofollow noopener noreferrer" target="_blank"><span class="invisible">https://</span><span class="ellipsis">github.com/bepasty/bepasty-ser</span><span class="invisible">ver/releases/tag/1.1.0</span></a></p><p><a href="https://chaos.social/tags/python" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>python</span></a> <a href="https://chaos.social/tags/flask" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>flask</span></a> <a href="https://chaos.social/tags/pygments" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>pygments</span></a> <a href="https://chaos.social/tags/pastebin" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>pastebin</span></a></p>
Alexandre B A Villares 🐍<p><span class="h-card"><a href="https://fosstodon.org/@joshburnett" class="u-url mention" rel="nofollow noopener noreferrer" target="_blank">@<span>joshburnett</span></a></span> <span class="h-card"><a href="https://mas.to/@nmstoker" class="u-url mention" rel="nofollow noopener noreferrer" target="_blank">@<span>nmstoker</span></a></span></p><p>Wow, <a href="https://ciberlandia.pt/tags/pygments" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>pygments</span></a> is amazing huh?<br>I have to explore the SVGFormatter class too...</p>
dpaste.com<p>I think this <a href="https://fosstodon.org/tags/Pygments" class="mention hashtag" rel="tag">#<span>Pygments</span></a> theme is the most Halloweeny of the bunch.</p><p><a href="https://dpaste.com/styles/#inkpot" target="_blank" rel="nofollow noopener noreferrer" translate="no"><span class="invisible">https://</span><span class="">dpaste.com/styles/#inkpot</span><span class="invisible"></span></a></p><p>(I promise I will not submit a pull request to change its name to &quot;Pumpkin Spice&quot;.)</p>
Paul :python: :django:<p>Presuming there are other <a href="https://fosstodon.org/tags/Python" class="mention hashtag" rel="tag">#<span>Python</span></a> developers besides me who periodically go looking for a simple visual catalog of <a href="https://fosstodon.org/tags/Pygments" class="mention hashtag" rel="tag">#<span>Pygments</span></a> code-colorizing styles, I&#39;ll share this page I made last weekend: <a href="https://dpaste.com/styles" target="_blank" rel="nofollow noopener noreferrer" translate="no"><span class="invisible">https://</span><span class="">dpaste.com/styles</span><span class="invisible"></span></a></p>
phryk 🏴<p>Managed to find a <a href="https://mastodon.social/tags/sphinx" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>sphinx</span></a> theme that allows easily overridable CSS without having to modify the theme itself and applied a dark color scheme.</p><p>Will need to whip up a PR to get rid of about 3 lines that make it impossible to effectively change the <a href="https://mastodon.social/tags/pygments" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>pygments</span></a> color scheme, but besides that it's pretty damn nice in its simplicity (especially CSS-wise)</p><p>But first, sleep.</p>