HNHacker News
TopNewBestAskShowJobs

alexprengere

36 karma · joined March 15, 2013

submissionscomments
alexprengere··on Parsing EDIFACT in Python with syntax trees
Yes it was meant colloquially, like "the syntax tree describes the actual underlying structure of the flat list of EDIFACT segments".
alexprengere··on Parsing EDIFACT in Python with syntax trees
Even with the "tree", it is not that trivial, as a single segment tag may be repeated in the "tree", so you cannot just jump to that segment and execute a callback. You need to be aware of the possible transitions from any given "node" in the tree. Edison solves this by computing a state machine graph whose nodes are all segments, and edges are all transitions, so parsing is just a walk in the graph.
alexprengere··on Parsing EDIFACT in Python with syntax trees
Edison is a Python library for parsing EDIFACT messages. Instead of treating a message as a flat list of segments, it models messages as a syntax tree: segments can define groups of child segments, recursively.

You define the syntax tree once, then parse, validate, or pretty-print messages against that structure. It works by converting the syntax tree to a state machine of possible transitions between segments.

alexprengere··on Ratty – A terminal emulator with inline 3D graphics
If this turns out to exfiltrate all my keys, I will have some explaining to do to my security department.
alexprengere··on I built a Python playground with Pyodide and Ace in ~100 lines of JavaScript
I never realized how easy it was to put all this together. ~100 lines of CSS, ~100 lines of JS.

All the Python code execution is happening in your browser using Pyodide (a port of CPython to WebAssembly), so once the page is loaded, it should work even without internet.

You can even use GitHub pages to serve this statically. So I did: https://alexprengere.github.io/python_playground/

Sources: https://github.com/alexprengere/python_playground

alexprengere··on A Python implementation of formal systems from the book “Gödel, Escher, Bach”
Author here! Thanks for the post :)
alexprengere··on Show HN: A web-based dashboard for your graphs
I tried to clear up things in the README. The tool is inspired by Jekyll, it will build a static website for your graphs (that you already have), and some metadata you write to configure how the graphs will be displayed in the website.
alexprengere··on Show HN: A web-based dashboard for your graphs
In this case, your svg/png/jpg files.
alexprengere··on Ruby gaining a safe navigation operator: '.?'
Interesting timing, python-ideas has also been discussing this, leading to a new PEP 505 - None-aware operators:

https://www.python.org/dev/peps/pep-0505/