home.social

#peg — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #peg, aggregated by home.social.

fetched live
  1. I've been riding a #nerd #high since late June and here is one of the results.

    codeberg.org/tnalpgge/cabrillo

    While it is not directly responsible for helping me #slice and #dice our #hamradio contact logs from this past #FieldDay, it did eliminate the need for a bunch of #shell and #awk that I was using previously. Of course, by replacing some compact, proven scripts by a larger library of #Emacs #Lisp is more of an exercise in #purity than #practicality. Still, playing with #peg and formal-ish grammars was an interesting alternative to my traditional #regex approach to text processing.

    It's not a thorough test suite, but it did help me catch two bugs this evening!

  2. 🚀 Ohm's #PEG-to-WASM Compiler: because everyone needs a #parsing #tool that's 50x #faster to parse things nobody asked for! 😂 Forget about improving your life—just make #parsing 0.02 seconds quicker. Is it a bird? Is it a plane? No, it's an #unnecessary #compiler update! 🙄
    ohmjs.org/blog/2026/03/12/peg- #update #speed #improvement #tool #coding #humor #HackerNews #ngated

  3. PEG Pattern: optional a
    Tries to parse a. Succeeds if a succeeds.
    "a?"
    (? a)
    Succeeds if a succeeds.
    Oh, man. I love this. ​:blobfoxlul:​

    #guix #peg

  4. This time I'm solving #AdventOfCode in #Janet (I'll write about my solutions in my blog in batches) and I'm really pleased by the built-in #PEG parsers. This is how the grammar looks for day 2:

    ```janet
    {:main (sequence :ranges -1)
    :ranges (some :range)
    :range (group (sequence (number :num) "-" (number :num) (opt ",")))
    :num (some :d)}
    ```

    #programming #parsing

  5. Company Insights 🛠️

    Here’s the snapshot:
    🟢 #Eiffage, #Vinci, #BalfourBeatty, #Strabag → positive earnings growth and reasonable P/E ratios.
    ⚠️ #NCC (pure-play) → solid industry, but above implied fair value.
    ⚠️ #Acciona → renewables exposure + valuation pressure = overvalued on #PEG.

    (2/5)

  6. I am down the rabbit hole of melding #golang and #cuelang with a dash of #peg and a twist of #TextMate tmLanguage.json (but using RE2 not Oniguruma for reasons)

  7. Guido van Rossum, creator of , also writes high-quality prose for programming enthusiasts.

    I started reading his posts about , saw they were on Medium, and got annoyed by the paywall.

    Thanks to Guido’s generous CC licensing, I’m republishing them on my blog:

    ramalho.org/posts/peg-series/

  8. Guido van Rossum, criador do #Python, também escreve prosa de altíssima qualidade para quem curte programação.

    Comecei a ler seus posts sobre análise sintática PEG (#PEG #parsing), vi que tavam no Medium, o paywall me irritou, então estou republicando no meu blog:

    ramalho.org/posts/peg-series/

  9. 🚀 Behold the epic tale of Janet's #PEG #module, where the author heroically excludes regular expressions like they're yesterday's news. 💥 Marvel at the labyrinth of #parsing magic that claims to be more readable, but only if you have a PhD in arcane text processing. 📜✨
    bakpakin.com/writing/how-janet #Janet #readability #textprocessing #regex #HackerNews #ngated

  10. Just released dumbql v0.2.0 — a simple and data-provider-agnostic query language for Go programs. Made for YouTube tutorial (in progress), but might be useful anyway.

    github.com/tomakado/dumbql

    #golang #programming #dsl #parser #peg

  11. Практика использования парсер-комбинаторов peco и оператора match для создания простых DSL на языке Python

    Задачи разработки компиляторов и интерпретаторов конфигурационных языков или даже полноценных Тьюринг-полных языков программирования время от времени встают перед разработчиками программного обеспечения. На практике, как правило, речь идёт о разработке предметно-ориентированных языков (англ. Domain Specific Language, DSL), проектируемых специально для решения узкого класса прикладных задач. В настоящей статье рассматривается один из способов реализации DSL-компиляторов на примере разработки системы символьного дифференцирования, с использованием парсер-комбинаторов peco и структурного сопоставления с образцом по PEP 636 . Материал рассчитан на прикладных разработчиков, уже знакомых с Python, но, надеюсь, может быть полезен и продолжающим компиляторщикам.

    habr.com/ru/articles/866646/

    #peg #парсеркомбинаторы #функциональное_программирование #компиляторы #формальные_языки #python #лексический_разбор #синтаксический_разбор #dsl #предметноориентированный_язык

  12. Having a problem with #guile #peg #parsing library: lists.gnu.org/archive/html/gui

    Does anyone know, whether it is possible using that library to have mutually recursive pattern definitions? Or is that library kind of broken?

    #scheme #orgmode

  13. Side questing into PEGs and #EBNF grammars (that I only barely understand) to parse #CSS.

    pypi.org/project/pyparsing/ looks useful, but I found this rudimentary CSS #PEG (gist.github.com/erikrose/56241) which can be used by pypi.org/project/parsimonious/ and it… appears to work?

    I was already re-writing the current CSS processing (remove the recusion, add in dataclasses to encapsulate domains, etc), but maybe using a more formal grammar would be a good idea. #python

  14. Context free grammars (CFG) are better than parsing expression grammars (PEG), because CFGs represent how we think.

    Parser combinators are similar to PEGs, so they are worse than CFGs, too.

    So, don't use Rust libraries nom, combine. Use lalrpop.

    Don't use Haskell libraries parsec, gigaparsec, attoparsec, megaparsec, trifecta. Use Earley, happy.

    See more detailed story in my new article safinaskar.writeas.com/this-is .

    The story also includes some cases, where PEG and parser combinators may still be useful. Also, the article gives links to my Haskell parsing libraries.

    #haskell #rust #parsing #parse #cfg #peg #combinators #parsercombinators #parsingcombinators #nom #combine #lalrpop #parsec #earley #happy

  15. Created my first Peggy grammar to parse and evaluate some custom expressions. It was surprisingly easy once I got the hang of the syntax, and very powerful with the JavaScript actions to process and transform expression matches. 👌

    peggyjs.org/

    #Javascript #PEG

  16. "Using neutron reflectometry measurements & #molecular dynamics simulations of poly(ethylene glycol) (PEG) polymers of different molecular weights near charged & neutral membranes, we demonstrate the roles of surface dielectrophoresis & counterion pressure in repelling #PEG from charged #membrane surfaces. The..depletion zone is expected to have consequences for drug design & delivery, the activity of proteins near membrane surfaces, and the transport of small molecules"

    pubs.acs.org/doi/full/10.1021/

  17. Livello di stress: sogno che suonano gli allarmi dei macchinari che tengono in vita mamma e mi ritrovo in piedi in mezzo alla stanza in meno di un secondo per poi realizzare che non sta suonando niente.

    #careGiver #SLA #ventiloterapia #pulsossimetro #PEG

  18. Left Recursion in Parsing Expression Grammars:

    arxiv.org/pdf/1207.0443v1.pdf

    "A frequently missed feature of PEGs is left #recursion, which is commonly used in Context-Free Grammars (#CFGs) to encode left-associative operations. We present a simple conservative extension to the semantics of #PEGs that gives useful meaning to direct and indirect left-recursive rules, and show that our extensions make it easy to express left-recursive idioms from CFGs in PEGs, with similar results."

    #Parser #PEG