Better HN
topnewbestaskshowjobs
Log inSign up

alexprengere

36 karma · joined Mar 15, 2013 (13y ago) · 18 submissions

Submissions

comment 1mo ago · link · parent

Yes it was meant colloquially, like "the syntax tree describes the actual underlying structure of the flat list of EDIFACT segments".

comment 1mo ago · link · parent

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.

comment 1mo ago · link · parent

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.

4.

Parsing EDIFACT in Python with syntax trees(github.com ↗)

25 points · by alexprengere · 1mo ago · 17 comments

comment 6mo ago · link · parent

If this turns out to exfiltrate all my keys, I will have some explaining to do to my security department.

comment 1y ago · link · parent

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

7.

I built a Python playground with Pyodide and Ace in ~100 lines of JavaScript(alexprengere.github.io ↗)

1 points · by alexprengere · 1y ago · 1 comment

comment 9y ago · link · parent

Author here! Thanks for the post :)

9.

I compiled some figures on how efficient is Pypy/Rpython when running BrainFuck(github.com ↗)

1 points · by alexprengere · 9y ago · discuss

10.

GraphDash, the web dashboard for your graphs, is now on PyPI(pypi.python.org ↗)

4 points · by alexprengere · 10y ago · discuss

11.

Show HN: Jekyll-inspired tool builds a web dashboard for your graphs in seconds(amadeusitgroup.github.io ↗)

3 points · by alexprengere · 10y ago · discuss

comment 10y ago · link · parent

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.

comment 10y ago · link · parent

In this case, your svg/png/jpg files.

14.

Show HN: A web-based dashboard for your graphs(github.com ↗)

3 points · by alexprengere · 10y ago · 4 comments

15.

Build a web dashboard for your graphs in seconds!!(github.com ↗)

2 points · by alexprengere · 10y ago · discuss

16.

Build a web dashboard for your graphs in seconds(amadeusitgroup.github.io ↗)

3 points · by alexprengere · 10y ago · discuss

comment 11y ago · link · parent

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/

18.

GeoBases: data services and visualization(opentraveldata.github.com ↗)

3 points · by alexprengere · 13y ago · discuss