this post was submitted on 13 Aug 2023
28 points (85.0% liked)

Programming

17450 readers
171 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 1 year ago
MODERATORS
all 11 comments
sorted by: hot top controversial new old
[–] beckerist@lemmy.world 27 points 1 year ago* (last edited 1 year ago) (1 children)

Announcing [language]! A [language]-like language that produces [this language], [that language], or [another language]! Written in [language]!

/s

[–] Dalinar@lemmy.nz 2 points 1 year ago (2 children)

Why does it being written in Rust? Do people think, wow I must use this because it's written in Rust?

[–] eager_eagle@lemmy.world 5 points 1 year ago

speed, probably

[–] Lmaydev@programming.dev 1 points 1 year ago

Speed and memory safety generally

[–] Sibbo@sopuli.xyz 5 points 1 year ago (1 children)
[–] yoavlavi@programming.dev 5 points 1 year ago

Quickly creating or editing objects. The main target would be editor extensions, image a snippet that expands to an object on tab for instance

[–] Andy@programming.dev 1 points 1 year ago* (last edited 1 year ago)

I wanted to try using yamlpath (yaml-set in particular) to recreate the first example, even though the usage model doesn't quite match up. It's a bit tedious because I don't think you can do unrelated replacements in a single command:

$ <<<'{}' yaml-set -g ignored.hello -a world | yaml-set -g tabwidth -a 2 -F dquote | yaml-set -g trailingComma -a all | yaml-set -g singleQuote -a true -F dquote | yaml-set -g semi -a true -F dquote | yaml-set -g printwidth -a 120 -F dquote | yaml-get -p .

Trying to make it neater with Zsh and (forbidden) use of eval:

$ reps=(ignored.hello world tabwidth 2 trailingComma all singleQuote true semi true printwidth 120) cmd=()
$ for k v ( ${(kv)reps} )  cmd+=(yaml-set -g $k -a $v -F dquote \|)
$ <<<'{}' eval $cmd yaml-get -p .

EDIT: Ugh I can't figure out how to properly write the less than sign in lemmy comments.

[–] diemechanist@programming.dev 1 points 1 year ago

Off-topic, but beacme of Google's Carbon? People on Reddit created much hype like an year ago.

[–] atheken@programming.dev 1 points 1 year ago* (last edited 1 year ago)

Interesting concept, just FYI, there’s a popular code grepping tool called Silver Searcher, and it also uses ag - consider just using august to avoid ambiguity/collisions.