Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
jk0ne
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
4 ms
·
1.
▲
Preventing the NPM Debug/Chalk Compromise in 200 lines of JavaScript
(getvouchsafe.org)
2 points
by
jk0ne
1y ago
|
0 comments
2.
▲
by
jk0ne
4y ago
It has been used in applications that have been security tested. The module itself doesn’t use the JavaScript parser at all and has no mechanism for making JavaScript calls from within the DTL expressions. This is by design and part of DTLs
3.
▲
by
jk0ne
4y ago
Thanks. Yes, DTL's core textual syntax is described with PEG. I make use of the Peggy ( https://peggyjs.org/ ) PEG processor to build up the AST that is used to actually process DTL. There are C based PEG processors, wh
4.
▲
by
jk0ne
4y ago
Thanks. :) From what I can tell, Arquero looks to be intended to provide an SQL-like interface to querying tabular data and is in a very imperitive format, do this, then with that do this, etc. DTL, on the other hand, doesn't require y
5.
▲
by
jk0ne
4y ago
That's a very similar use case to where DTL started. We needed a way to link arbitrary APIs together without having to resort to custom code to rewrite the data between formats. DTL was born as a way to handle that translation without
6.
▲
by
jk0ne
4y ago
The SQL::Abstract stuff is interesting. DTL has it's origins in needing to do a very similar thing - to be able to create a set of transformations and go back and forth between the real expression and a UI / object representing t
7.
▲
by
jk0ne
4y ago
* it already does parse to an AST and caches the AST generated from an expression, so for a given expression the parsing is only done once, but that's just within Javascript. I would like to extract that out and have DTL libraries in m
8.
▲
by
jk0ne
4y ago
Thanks. It can. The cli can handle json5 ( https://json5.org/ ) so trailing commas and comments are a-ok. And yes, re: jayk. Almost certainly. :) It has been an ambition of mine to turn this into a c lib to parse/proces
9.
▲
by
jk0ne
4y ago
There are a number of areas where DTL can be used where jq can't. The obvious ones are that DTL is a library and is therefore usable directly in your own code, both frontend and backend. In terms of the command line, I'm sure adv
10.
▲
by
jk0ne
4y ago
I am not super-familiar with jsonata, so someone else can probably comment better here. That said, I think the biggest difference is Jsonata is really oriented towards querying, as evidenced by it's xpath oriented syntax. DTL can do qu
11.
▲
Show HN: DTL: a language and JavaScript lib to transform and manipulate data
(getdtl.org)
63 points
by
jk0ne
4y ago
|
20 comments
12.
▲
Show HN: DTL: a language and JavaScript lib to transform and manipulate data
(getdtl.org)
1 points
by
jk0ne
4y ago
|
0 comments