home.social

#parser — Public Fediverse posts

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

  1. It was a cold and rainy day today so I decided to rework the parser of my text adventure game skeleton.

    So now you can enter a simple sentence as can be seen in the screenshot which is better than the two-word approach I initially implemented (still not Infocom like but then that's not what I am after).

    What happens in the background is that the user input is split into sub-strings which are then checked against a list of strings (e.g. object names, verbs), leaving their corresponding list index number on the stack. These numbers are then used within the actual game logic.

    Oh, and I've added some colors - now the thing is beginning to look like a game ...

    #textadventure
    #game
    #parser
    #retrocoding
    #durexforth
    #forth

  2. It was a cold and rainy day today so I decided to rework the parser of my text adventure game skeleton.

    So now you can enter a simple sentence as can be seen in the screenshots which is better than the two-word approach I initially implemented (still not Infocom like but then that's not what I am after).

    What happens in the background is that the user input is split into sub-strings which are then checked against a list of strings (e.g. object names, verbs), leaving their corresponding list index number on the stack. These numbers are then used within the actual game logic.

    Oh, and I've added some colors - now the thing is beginning to look like a game ...

    #textadventure
    #game
    #parser
    #retrocoding
    #durexforth
    #forth

  3. It was a cold and rainy day today so I decided to rework the parser of my text adventure game skeleton.

    So now you can enter a simple sentence as can be seen in the screenshots which is better than the two-word approach I initially implemented (still not Infocom like but then that's not what I am after).

    What happens in the background is that the user input is split into sub-strings which are then checked against a list of strings (e.g. object names, verbs), leaving their corresponding list index number on the stack. These numbers are then used within the actual game logic.

    Oh, and I've added some colors - now the thing is beginning to look like a game ...

    #textadventure
    #game
    #parser
    #retrocoding
    #durexforth
    #forth

  4. It was a cold and rainy day today so I decided to rework the parser of my text adventure game skeleton.

    So now you can enter a simple sentence as can be seen in the screenshots which is better than the two-word approach I initially implemented (still not Infocom like but then that's not what I am after).

    What happens in the background is that the user input is split into sub-strings which are then checked against a list of strings (e.g. object names, verbs), leaving their corresponding list index number on the stack. These numbers are then used within the actual game logic.

    Oh, and I've added some colors - now the thing is beginning to look like a game ...

    #textadventure
    #game
    #parser
    #retrocoding
    #durexforth
    #forth

  5. It was a cold and rainy day today so I decided to rework the parser of my text adventure game skeleton.

    So now you can enter a simple sentence as can be seen in the screenshots which is better than the two-word approach I initially implemented (still not Infocom like but then that's not what I am after).

    What happens in the background is that the user input is split into sub-strings which are then checked against a list of strings (e.g. object names, verbs), leaving their corresponding list index number on the stack. These numbers are then used within the actual game logic.

    Oh, and I've added some colors - now the thing is beginning to look like a game ...

    #textadventure
    #game
    #parser
    #retrocoding
    #durexforth
    #forth

  6. Had a day off today and used the free time to implement "take", ""drop" and "inv" (inventory) for that #text #adventure #game skeleton I'm occasionally tinkering with.

    On the #Commodore64 I use #durexforth, but the same code also works on the #MyNorMy4th and with #gforth and I plan to get it to work on the #Minstrel4d as well.

    I still use just a two-word #parser at the moment but I'm already looking into ways of expanding that (will not be as great as Infocom but better than it is now).

    #forth
    #retrocoding

  7. Had a day off today and used the free time to implement "take", ""drop" and "inv" (inventory) for that #text #adventure #game skeleton I'm occasionally tinkering with.

    On the #Commodore64 I use #durexforth, but the same code also works on the #MyNorMy4th and with #gforth and I plan to get it to work on the #Minstrel4d as well.

    I still use just a two-word #parser at the moment but I'm already looking into ways of expanding that (will not be as great as Infocom but better than it is now).

    #forth
    #retrocoding

  8. Had a day off today and used the free time to implement "take", ""drop" and "inv" (inventory) for that #text #adventure #game skeleton I'm occasionally tinkering with.

    On the #Commodore64 I use #durexforth, but the same code also works on the #MyNorMy4th and with #gforth and I plan to get it to work on the #Minstrel4d as well.

    I still use just a two-word #parser at the moment but I'm already looking into ways of expanding that (will not be as great as Infocom but better than it is now).

    #forth
    #retrocoding

  9. Had a day off today and used the free time to implement "take", ""drop" and "inv" (inventory) for that #text #adventure #game skeleton I'm occasionally tinkering with.

    On the #Commodore64 I use #durexforth, but the same code also works on the #MyNorMy4th and with #gforth and I plan to get it to work on the #Minstrel4d as well.

    I still use just a two-word #parser at the moment but I'm already looking into ways of expanding that (will not be as great as Infocom but better than it is now).

    #forth
    #retrocoding

  10. Had a day off today and used the free time to implement "take", ""drop" and "inv" (inventory) for that #text #adventure #game skeleton I'm occasionally tinkering with.

    On the #Commodore64 I use #durexforth, but the same code also works on the #MyNorMy4th and with #gforth and I plan to get it to work on the #Minstrel4d as well.

    I still use just a two-word #parser at the moment but I'm already looking into ways of expanding that (will not be as great as Infocom but better than it is now).

    #forth
    #retrocoding

  11. От регулярок к ANTLR4: три архитектурных решения на парсере бизнес-формул

    Три года назад я писал свой первый коммерческий парсер на ANTLR4 — для бизнес-формул аналитической системы. Несколько лет спустя я бы сделал его иначе в трёх центральных местах. Разбираю каждое: левая рекурсия для приоритета операторов, Listener vs Visitor, и почему getText() для повторного парсинга — антипаттерн.

    habr.com/ru/articles/1027742/

    #antlr #antlr4 #парсер #parser #грамматика #dsl #java #spring_boot #compiler #code_generation

  12. От регулярок к ANTLR4: три архитектурных решения на парсере бизнес-формул

    Три года назад я писал свой первый коммерческий парсер на ANTLR4 — для бизнес-формул аналитической системы. Несколько лет спустя я бы сделал его иначе в трёх центральных местах. Разбираю каждое: левая рекурсия для приоритета операторов, Listener vs Visitor, и почему getText() для повторного парсинга — антипаттерн.

    habr.com/ru/articles/1027742/

    #antlr #antlr4 #парсер #parser #грамматика #dsl #java #spring_boot #compiler #code_generation

  13. От регулярок к ANTLR4: три архитектурных решения на парсере бизнес-формул

    Три года назад я писал свой первый коммерческий парсер на ANTLR4 — для бизнес-формул аналитической системы. Несколько лет спустя я бы сделал его иначе в трёх центральных местах. Разбираю каждое: левая рекурсия для приоритета операторов, Listener vs Visitor, и почему getText() для повторного парсинга — антипаттерн.

    habr.com/ru/articles/1027742/

    #antlr #antlr4 #парсер #parser #грамматика #dsl #java #spring_boot #compiler #code_generation

  14. От регулярок к ANTLR4: три архитектурных решения на парсере бизнес-формул

    Три года назад я писал свой первый коммерческий парсер на ANTLR4 — для бизнес-формул аналитической системы. Несколько лет спустя я бы сделал его иначе в трёх центральных местах. Разбираю каждое: левая рекурсия для приоритета операторов, Listener vs Visitor, и почему getText() для повторного парсинга — антипаттерн.

    habr.com/ru/articles/1027742/

    #antlr #antlr4 #парсер #parser #грамматика #dsl #java #spring_boot #compiler #code_generation

  15. Мотивация, оптимизация, коробочка, жабочка и «налог на усталость»

    Я не программист. Я архитектор, проектирую дома, а полгода назад не знала, где живут скрипты и питоны. Но когда важный для меня чат в Telegram собрались удалять, я попросила нейросеть написать парсер – и пропала. С тех пор прошло полгода. Я всё ещё доделываю приложение. У него есть имя – Розитта, розовая робожаба на иконке. И оно пожирает мои ночи, деньги на такси и остатки семейного спокойствия. Это не история успеха за 4 дня. Это история о том, как взрослый человек с семьёй, работой и падающим забором ушёл в вайбкодинговый запой – и что из этого вышло. Все совпадения с реальными нейросетями не случайны, а промпты – настоящие. Заглянуть в цифровое болото

    habr.com/ru/articles/1022674/

    #telethon #parser #deepseek #околоайтишник #telegram #вайбкодинг

  16. Мотивация, оптимизация, коробочка, жабочка и «налог на усталость»

    Я не программист. Я архитектор, проектирую дома, а полгода назад не знала, где живут скрипты и питоны. Но когда важный для меня чат в Telegram собрались удалять, я попросила нейросеть написать парсер – и пропала. С тех пор прошло полгода. Я всё ещё доделываю приложение. У него есть имя – Розитта, розовая робожаба на иконке. И оно пожирает мои ночи, деньги на такси и остатки семейного спокойствия. Это не история успеха за 4 дня. Это история о том, как взрослый человек с семьёй, работой и падающим забором ушёл в вайбкодинговый запой – и что из этого вышло. Все совпадения с реальными нейросетями не случайны, а промпты – настоящие. Заглянуть в цифровое болото

    habr.com/ru/articles/1022674/

    #telethon #parser #deepseek #околоайтишник #telegram #вайбкодинг

  17. Мотивация, оптимизация, коробочка, жабочка и «налог на усталость»

    Я не программист. Я архитектор, проектирую дома, а полгода назад не знала, где живут скрипты и питоны. Но когда важный для меня чат в Telegram собрались удалять, я попросила нейросеть написать парсер – и пропала. С тех пор прошло полгода. Я всё ещё доделываю приложение. У него есть имя – Розитта, розовая робожаба на иконке. И оно пожирает мои ночи, деньги на такси и остатки семейного спокойствия. Это не история успеха за 4 дня. Это история о том, как взрослый человек с семьёй, работой и падающим забором ушёл в вайбкодинговый запой – и что из этого вышло. Все совпадения с реальными нейросетями не случайны, а промпты – настоящие. Заглянуть в цифровое болото

    habr.com/ru/articles/1022674/

    #telethon #parser #deepseek #околоайтишник #telegram #вайбкодинг

  18. Мотивация, оптимизация, коробочка, жабочка и «налог на усталость»

    Я не программист. Я архитектор, проектирую дома, а полгода назад не знала, где живут скрипты и питоны. Но когда важный для меня чат в Telegram собрались удалять, я попросила нейросеть написать парсер – и пропала. С тех пор прошло полгода. Я всё ещё доделываю приложение. У него есть имя – Розитта, розовая робожаба на иконке. И оно пожирает мои ночи, деньги на такси и остатки семейного спокойствия. Это не история успеха за 4 дня. Это история о том, как взрослый человек с семьёй, работой и падающим забором ушёл в вайбкодинговый запой – и что из этого вышло. Все совпадения с реальными нейросетями не случайны, а промпты – настоящие. Заглянуть в цифровое болото

    habr.com/ru/articles/1022674/

    #telethon #parser #deepseek #околоайтишник #telegram #вайбкодинг

  19. This week on the blog: the latest release of my Ophis assembler hit an ugly corner of 6502 assembly language syntax (Z80 has it too, x86 and m68k don't), and that turns out to be a good excuse to drop a couple of thousand words on parsing theory.

    Also, the Bison parser generator is cooler than it was the last time I looked at it.

    bumbershootsoft.wordpress.com/

    #6502asm #parser #assembly

  20. This week on the blog: the latest release of my Ophis assembler hit an ugly corner of 6502 assembly language syntax (Z80 has it too, x86 and m68k don't), and that turns out to be a good excuse to drop a couple of thousand words on parsing theory.

    Also, the Bison parser generator is cooler than it was the last time I looked at it.

    bumbershootsoft.wordpress.com/

    #6502asm #parser #assembly

  21. This week on the blog: the latest release of my Ophis assembler hit an ugly corner of 6502 assembly language syntax (Z80 has it too, x86 and m68k don't), and that turns out to be a good excuse to drop a couple of thousand words on parsing theory.

    Also, the Bison parser generator is cooler than it was the last time I looked at it.

    bumbershootsoft.wordpress.com/

    #6502asm #parser #assembly

  22. This week on the blog: the latest release of my Ophis assembler hit an ugly corner of 6502 assembly language syntax (Z80 has it too, x86 and m68k don't), and that turns out to be a good excuse to drop a couple of thousand words on parsing theory.

    Also, the Bison parser generator is cooler than it was the last time I looked at it.

    bumbershootsoft.wordpress.com/

    #6502asm #parser #assembly

  23. This week on the blog: the latest release of my Ophis assembler hit an ugly corner of 6502 assembly language syntax (Z80 has it too, x86 and m68k don't), and that turns out to be a good excuse to drop a couple of thousand words on parsing theory.

    Also, the Bison parser generator is cooler than it was the last time I looked at it.

    bumbershootsoft.wordpress.com/

    #6502asm #parser #assembly

  24. chibicc-dumper makes public.
    A JSON dumper tool derived from chibicc that can output C language tokens and ASTs.

    This is a small tool that extracts token sequences and ASTs from C source code and outputs them as JSON.
    With this tool, generating bridge code—such as FFI—from C source code becomes easier than before.

    github.com/kekyo/chibicc-dumpe

    #chibicc #tokenizer #parser #ast #typescript

  25. BuxarParser — простой парсер поисковиков Google, Яндекса и DuckDuckGo на Python

    Здравствуйте, товарищи! Сразу скажу: скрипт, которым делюсь, рассчитан в первую очередь на новичков (которых тут тьма). Старожилы, прошу не пинать сильно.

    habr.com/ru/articles/1009642/

    #parser #BuxarParser #python #Google #Яндекса #DuckDuckGo

  26. BuxarParser — простой парсер поисковиков Google, Яндекса и DuckDuckGo на Python

    Здравствуйте, товарищи! Сразу скажу: скрипт, которым делюсь, рассчитан в первую очередь на новичков (которых тут тьма). Старожилы, прошу не пинать сильно.

    habr.com/ru/articles/1009642/

    #parser #BuxarParser #python #Google #Яндекса #DuckDuckGo

  27. BuxarParser — простой парсер поисковиков Google, Яндекса и DuckDuckGo на Python

    Здравствуйте, товарищи! Сразу скажу: скрипт, которым делюсь, рассчитан в первую очередь на новичков (которых тут тьма). Старожилы, прошу не пинать сильно.

    habr.com/ru/articles/1009642/

    #parser #BuxarParser #python #Google #Яндекса #DuckDuckGo

  28. BuxarParser — простой парсер поисковиков Google, Яндекса и DuckDuckGo на Python

    Здравствуйте, товарищи! Сразу скажу: скрипт, которым делюсь, рассчитан в первую очередь на новичков (которых тут тьма). Старожилы, прошу не пинать сильно.

    habr.com/ru/articles/1009642/

    #parser #BuxarParser #python #Google #Яндекса #DuckDuckGo

  29. An update to my html-parse library - a new handler to the existing #Unisonlang ability to parses Html text into Markdown. Check the blog post for details. #parser #markdown

    notes.kaushikc.org/3mf6xazbcj2

  30. First building block towards creating an RSS reader on AT protocol - Unison HTML parser

    #html #unisonlang #parser

    notes.kaushikc.org/3mdxmxpjkg2

  31. Tags are sets. Many apps support tagging of content, but most of them (incl. Mastodon) treat tags only as singular/isolated topic filters, akin to a flat folder-based approach. But tagging can be so, so much more powerful when treating tags as sets and offering users the possibility to combine and query tagged content as sets (think Venn diagrams), i.e. allowing tags to be combined using AND/OR/NOT aka intersection/union/difference operations...

    Below is a simple query engine to do just that in ~40 lines of code (sans comments), incl. using an extensible interpreter for a simple Lisp-like S-Expression language to define arbitrarily complex nested tag queries (the code is actually lifted & simplified from my personal knowledge graph tooling, also talked about here recently[1]...)

    gist.github.com/postspectacula

    For example, the query:

    `(and (or 'Alps' 'PNW') (or 'LandscapePhotography' 'NaturePhotography') (not 'Monochrome'))`

    ...would select all items which have been tagged with `Alps` OR `PNW`, AND have at least one of the two photography tags given, but have NOT the `Monochrome` tag.

    Whilst this syntax is probably alien-looking to the average user, it'd would be fairly straightforward to create visual/structural UIs for defining such queries (over the past 20 years I've done that myself several times already), heck even a SLM (small language model) could be used to translate natural language into such query expressions — what matters here is the widespread lack of treating tags this way in terms of conceptual/data modeling in most applications. Imagine being able to use hashtags this way on Mastodon to assemble personalized timelines (and extend the system to not just deal with hashtags, but other post metadata/provenance too)...

    The code example illustrates how, with the right tools, such features are actually not hard to implement (or to integrate into existing apps). The example uses the following #ThingUmbrella packages for its key functionality:

    - thi.ng/associative: Set-theory operations, custom Map/Set data types (unused here)
    - thi.ng/lispy: Customizable/extensible S-expression parser, interpreter & runtime
    - thi.ng/oquery: Optimized object and array pattern query engine

    [1] mastodon.thi.ng/@toxi/11549755

    #Tagging #Sets #QueryEngine #Lisp #Syntax #Parser #Interpreter #TypeScript #JavaScript

  32. Oh joy, yet another #C++17 #parser combinator library! 🎉 Because what the world really needed was more creative ways to torture ourselves with syntactic nightmares and verbose error messages. 🚀 GitHub's endless quest to make #programming as enjoyable as a root canal continues unabated. 🙄
    github.com/foonathan/lexy #combinators #humor #GitHub #developer #woes #HackerNews #ngated

  33. My friend Melanie Pierce is presenting a Zeek webinar tomorrow at 10am PST on Parsnip, a project she's a lead on here at #INL. If you're interested in #Zeek and #parser development, please hop on!

  34. Here is a lightweight TUI for working with CSV files!

    🔍 **tabiew**: View and query CSV and TSV files.

    🔥 Supports SQL querying such as filtering, sorting, and aggregations.

    🚀 Has Vim-like key bindings.

    🦀 Written in Rust & built with @ratatui_rs

    ⭐ GitHub: github.com/shshemi/tabiew

  35. To the #Rust #rustlang community: I once started to write a #compiler / #parser with #nom #crate. However I had some struggles with it of how to provide **multiple** errors with line+column indicators for a parsed context.
    Now I read a tiny bit about #syn and #chumsky 👀
    Are they the right crates for me? Are there others?
    I do not parse rust-code, but a completely custom language (similar to pugjs)

    (Boost for reach 🙏)

  36. This is TSQLparser, a complete T-SQL parser written in Go. It's the kind of thing you use when you want to abandon Microsoft SQL Server for good (parser, lexer, and AST builder, to be exact).

    And here it is, GPL 3.0 licenced, or email me if you have any other ideas:
    [email protected]

    github.com/ha1tch/tsqlparser

    #golang #foss #tsql #mssql #mssqlserver #db #database #parser #microsoft #sql #sqlite #postgres

  37. 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

  38. 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