This post introduces Optique, a new library created to address the pervasive problem of repetitive and often messy validation code in CLI tools. The author was motivated by the observation that nearly every CLI tool reinvents the wheel with similar validation patterns for dependent options, mutually exclusive options, and environment-specific requirements. Optique leverages parser combinators and TypeScript's type inference to ensure that CLI arguments are parsed directly into valid configura...| Hackers' Pub
I have been using the Pest parser generator library for Rust recently in a couple of projects, and I want to talk a bit about a couple of things that weren’t too obvious for me. Pest has really good documentation in my opinion, so I won’t give you a basic tutorial. But, in the interest of making this post understandable even if you don’t know much about it, here’s an example grammar written with Pest:| Andrea Bergia's Website
I've been doing some operations on URLs in Javascript where I needed to extract different parts from a string URL, such as the domain, port, and most importantly the parameter values. I really wished there was some function which takes a string URL and breaks it down into an ...| The Code Ship
The TOML (Tom’s Obvious Minimal Language) format came out in 2013, so it’s been around for more than a decade. Python added support for TOML in Python 3.11 with its tomllib module in the standard library. However, unlike some of Python’s other standard libraries, such as jsonor its XML-related libraries, the tomllib library is only […] The post Python 101: Reading TOML with Python appeared first on Mouse Vs Python.| Mouse Vs Python
Annotations in GHC| Shayne Fletcher
arith-cxx-tagless-final| Shayne Fletcher
My last post on parsing in the presence of dynamic pragmas left us with this outline for calling the GHC parser.| Shayne Fletcher
This post about Handling GHC parse errors shows that using qualified in postpostive position is a syntax error unless the ImportQualifiedPost language extension is enabled. In that post, it is explained that the program| Shayne Fletcher
Did you know, a POk parse result from the GHC parser doesn't necessarily mean the parse was OK? This blog explains what's up with that. The source code below is from this example in the ghc-lib repo.| Shayne Fletcher
We write a bytecode VM for arithmetic in Haskell.| abhinavsarkar.net
Working with very large JSON files (20MB+) using online tools tends to be a crashy affair. Whether you’re looking to format or search them, all the tools I found just crash. I found myself having to work with huge JSON files recently, so I built a tool specifically optimized for huge JSON files, called Huge … Continue reading Search Huge JSON files on the Web→| SOS
Building a custom tokenizer for the Ovo2 language in Elixir - parsing strings, keywords, and pattern-matching with recursive functions| Lucas Sifoni
Building parser combinators in Elixir to transform token streams into an AST - implementing either/any combinators and value parsers for the Ovo2 language| Lucas Sifoni
Implementing an AST printer and parser feedback loop for the Ovo2 language - creating a round-trip workflow to validate parsing correctness| Lucas Sifoni
Evaluation of Ovo2 by walking its AST| Lucas Sifoni
First part of my journey reimplementing Ovo2 in Elixir - from TypeScript to the BEAM, exploring language design for pure data transformations| Lucas Sifoni
Performance-oriented comparison of alternative regexp engines that may (or may not) speed up your Ruby code.| SerpApi
Everyone speaks at least one language. It’s fascinating how we learned that first language, too. Without any formal instruction, we heard it, repeated it, and found ourselves effective communicators within about seven years. And in that time, we learned what our language sounded like, too. Language is merely words seeking their melodies Even if weRead More| Frank M Taylor
Left & Mutual Recursion Mitigation| Siddharth Mishra
We add error reporting capabilities to the JSON parser we wrote from scratch in Haskell.| abhinavsarkar.net
We add error reporting capabilities to the JSON parser we wrote from scratch in Haskell.| abhinavsarkar.net
Recently I needed to parse some data embedded in HTML. At first glance it appeared to be JSON, so after pulling the text out of…| GrimBlog
A series of posts outlining how we can use F# for solving some interesting scientific computing problems| John Azariah’s Blog
Server-sent events are a standard for web servers to stream a sequence of events to a browser over a single HTTP connection. You can view them as a simpler, unidirectional, alternative to websockets (that doesn’t require support from any middleboxes), or as an optimization over one-event-per-request longpolling. The wire format for an event consists of a number of newline-separated key-value pairs, in a simple key: value format. For instance, the documentation provides the example event: ev...| Accidentally Quadratic
Extracting 3D Models From CesiumJS - Part 2: Terrain Map Parsing 2021-05-09, 00:00 en CesiumJS 3D Models Parsing This article is part of a series: CesiumJS Terrain Map Scraping CesiumJS Terrain Map Parsing CesiumJS is a open source JavaScript framework for rendering 2D and 3D maps - everything…| s3lph.me
In the second part of this series about fast parsers for sequencing applications, I will review the code for the regex based parser. This is shown below (I use v5.38, as you should! because the year is 2023 and you should not have to type use strict; use warnings)| blogs.perl.org
This post is part of the Introduction to parsing series. In the last part we have improved our parser so that it can now handle basic arithmetics and floating number. This time, we’ll teach it how to call functions!| Andrea Bergia's Website
This post is part of the Introduction to parsing series. In the last part we have started making some real changes on our little parser, giving it the ability to handle basic arithmetics such as the four basic operations. In this part, we are going to teach it to handle parenthesis and floating numbers. Let’s dive in!| Andrea Bergia's Website
This post is part of the Introduction to parsing series. In the last part we have continued working on our little parser. Specifically, we have improved the lexer and started creating the parser, so that it is now able to handle simple numbers. Let’s teach it some arithmetic now!| Andrea Bergia's Website
This post is part of the Introduction to parsing series. In the last post we have started working on our parser for our very simple mathematical language. Specifically, we focused on the lexer, the part of code that divides the input into tokens. In this part, we are going to extend our lexer a bit and start writing the parser. Let’s dive in!| Andrea Bergia's Website
This post is part of the Introduction to parsing series. In this posts series, we’re going to dive a bit into parsing. The idea is to eventually build a very simple language that can calculate mathematical derivative. That is, we want to be able to write things like:| Andrea Bergia's Website
Research in Software Engineering from Rahul Gopinath| rahul.gopinath.org