Andy

joined 2 years ago
MODERATOR OF
 
 

Hello! This is not my project, I just found it today.

Making verbose things more concise and readable makes a big difference to me, and this could be excellent for me when dealing with HTML/XML. Just piping those formats through xmq yields a beautiful and clear rendering of the data.

And as a NestedText enthusiast, I can now (using additional existing tooling):

  • transform HTML -> JSON -> NestedText
  • edit NestedText
  • transform NestedText -> JSON -> HTML
 

cross-posted from: https://programming.dev/post/10377576

Hello! I love broot. It's not my own project, but this blog post is, so feel free to send any questions or insults my way.

Previews:

 

Hello! I love broot. It's not my own project, but this blog post is, so feel free to send any questions or insults my way.

Previews:

 

Hey that's me! No, not the amazing Factor dev that authored this post. No, not the contributor who jumped in and saved the day. I'm the

one of the members of the Factor Discord server

who complained about numbers! Woohoo!

 
 

Parsing!

[–] Andy@programming.dev 1 points 2 years ago

Thanks. I know that's the case for Nim's flexibility, but I didn't think it applied to the pipe operator stuff like in Roc. I'll do some reading tonight to confirm.

[–] Andy@programming.dev 2 points 2 years ago (2 children)

That’s true, but if the transformations have more than one argument, they go after the name

Yup, I understand. That's why I've not put them in the concatenative section.

Also, there are more languages with this feature, for example D, VimScript or Koka.

Thanks, maybe I'll add them to the sidebar! I hadn't heard of Koka.

If you have a suggested heading/description to replace "partially concatenative" I'm interested. Function chaining? And I'm not sure but maybe execline is actually concatenative and needs to be moved out of that section.

[–] Andy@programming.dev 1 points 2 years ago

Exactly. That's the second link under "Wikipedia Topics" in the sidebar.

[–] Andy@programming.dev 1 points 2 years ago (6 children)

I may be expressing it poorly and inaccurately, but what I mean is that in Nim you can re-order arguments and functions to start with some data followed by a series of transformations. The following two lines are equivalent:

parse_int(read_line(stdin))
stdin.read_line().parse_int()

Roc offers a similar flow with their |> operator. Here's a snippet from one of my Advent of Code 2022 solutions:

partOne =
    "input.txt"
    |> getData
    |> Task.await \data ->
        data
        |> getRangePairs
        |> List.keepIf pairHasStrictSubset
        |> List.len
        |> Num.toStr
        |> Stdout.line
[–] Andy@programming.dev 2 points 2 years ago (9 children)

Factor!

It's incredible and elegant and defies some common categorization.

I've put some of my favorite resources in the sidebar of https://programming.dev/c/concatenative and I'm happy to walk through any particular challenges/examples -- I've done about the first week of Advent of Code with it this year, and the most recent handful of Perl Weekly Challenges, and some basic Euler problems.

[–] Andy@programming.dev 2 points 2 years ago

Plasma may not ever implement window shading for Wayland, but I'm hopeful. That's probably my last blocker.

[–] Andy@programming.dev 3 points 2 years ago

Nice to see highlight there, an excellent project with an active and responsive developer. I use it every day in my Zsh aliases and functions, and it's a much faster shell highlighter than bat (or rich-cli), with better language support as well.

[–] Andy@programming.dev 1 points 2 years ago (1 children)

I don't think apk would check multiple files for the world. But you could maintain them outside the apk mechanisms, just concatenating them into a single file, with tup/make/sh/whatever.

[–] Andy@programming.dev 2 points 2 years ago (3 children)

FWIW, Alpine Linux has a nice world file, too. And I am continually impressed by the selection of up to date packages in their Edge repos.

[–] Andy@programming.dev 2 points 2 years ago (1 children)

Any thoughts on the alternative I mentioned, DYN, described here?

[–] Andy@programming.dev 1 points 2 years ago

Approval voting simplifies things but also has limitations because it removes any weight/preference people may have.

Yes, but nowhere near the problems of IRV. If those particular limitations bother you, as I said:

If you want to take on a little complexity for some further improvement, use delegable yes/no voting.

. . . don’t let the perfect be the enemy of the good.

I see zero "good" in IRV, for all the reasons outlined in the rant. Its failures are absurd and beyond unacceptable given that there are strictly better and simpler alternatives. Don't let something shiny and terrible stop you from using something actually quite good.

[–] Andy@programming.dev 1 points 2 years ago

I'm repeating myself here because a lot of commenters have a misplaced hope for IRV improving things:

Instant runoff voting is terrible and more complicated than people think, and I will never support it. It's a false improvement whose adoption will discourage meaningful change.

If it's a single winner election and you want a simple improvement, use approval voting. If you want to take on a little complexity for some further improvement, use delegable yes/no voting. I have one idea for further improvement, if anyone is really interested in voting methods.

Link to my anti-IRV rant

view more: ‹ prev next ›