• Pleonasm@programming.dev
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    Who is this for? People who write lots of regular expressions won’t need it because they know what they’re doing and people who don’t write lots of regular expressions probably won’t find it anyway.

    It just seems like a weird type of user who actually wants this.

    • Kempeth@feddit.de
      link
      fedilink
      English
      arrow-up
      0
      ·
      1 year ago

      me for example. I don’t write regex often enough to be really familar with the cryptic syntax. But I do use them every once in a while and dread the occasion every time. Having a more expressive way to write pattern matching instructions would be really useful to me.

      • Pleonasm@programming.dev
        link
        fedilink
        English
        arrow-up
        0
        ·
        1 year ago

        But then you’ll have to learn the syntax of this instead.

        I suspect that if you actually start using Melody you won’t find it as helpful as you think you might. Maybe I’m wrong. Let’s see in a year’s time.

        • Kempeth@feddit.de
          link
          fedilink
          English
          arrow-up
          0
          ·
          1 year ago

          I mean it’s JS. I’m not touching that if I can help it. But what you describe is less of a problem with the concept and more one with an immature technology.

    • realitista@lemm.ee
      link
      fedilink
      English
      arrow-up
      0
      ·
      edit-2
      1 year ago

      I almost never use regex, but when I do, I’d love something like this. Exactly because I don’t use regex enough to be bothered learning it’s impenetrable syntax.

      • SloppyPuppy@lemmy.world
        link
        fedilink
        English
        arrow-up
        0
        ·
        1 year ago

        I just learned to type what I want from a regex in chatgpt and call it a day. It works pretty well.

        Also fuck regex.

      • custom_situation@lemm.ee
        link
        fedilink
        English
        arrow-up
        0
        ·
        edit-2
        1 year ago

        i mean, you can learn the basics of matching in 30 minutes or less. that core knowledge will be broadly applicable across any tool that uses regex. things get much easier once to have a handle on the basics.

        …or you can learn this regex dsl and still have to learn regex. the difference is you’re learning a non-portable regex syntax.

        • Kempeth@feddit.de
          link
          fedilink
          English
          arrow-up
          0
          ·
          1 year ago

          Sure. I just very rarely need just basic regexes.

          And once you go beyond these the syntax gets very obtuse. Which means I’m spending an hour+ googling something close to what I need and then using a sandbox to try and tweak it until it does what I need. Then I paste something into my code that I won’t understand anymore 5 minutes into the future - which isn’t exactly great for maintainability.

      • NightAuthor@beehaw.org
        link
        fedilink
        English
        arrow-up
        0
        ·
        1 year ago

        I learned enough to see how powerful it was, then started using it within Sublime Text to edit data from time to time. (Extract URLs or something from a websites code, reformat X or Y data for a script I’m hacking together) and I’ve slowly retained more and more of the elements I repeatedly use. I think I’ve actually got a pretty good grasp on it. Maybe you should be using it more.

        • Kempeth@feddit.de
          link
          fedilink
          English
          arrow-up
          0
          ·
          1 year ago

          When you want to get better using a hammer, just treat everything as a nail.

  • custom_situation@lemm.ee
    link
    fedilink
    English
    arrow-up
    0
    ·
    1 year ago

    so, where’s the email address regex? that’s where this lives or dies. there is no reason to use this for extremely simple happy-path regexes.

    i’m having a tough time understanding who this is for. a beginner might think this is great, but they’re shooting themselves in the foot by adding an additional layer of abstraction rather than reading something to learn the basics.

    • Kempeth@feddit.de
      link
      fedilink
      English
      arrow-up
      0
      ·
      1 year ago

      I disagree. Anyone familiar with regex can debug these statements post conversion. Anyone not familiar with regex is going to have to learn something in order to debug the statement. I’d rather learn something that’s expressive and easy to visually parse.

      regex syntax is a vestige of the old “as few bytes as possible” era where every character of code had to be written personally. It’s an obsolete way of thinking for the vast majority of programming.

  • Kempeth@feddit.de
    link
    fedilink
    English
    arrow-up
    0
    ·
    1 year ago

    I am very much in the market for a way to do regex without resorting to incantations that look like someone spilled a bag of special characters. Just not on JS…

    You seem to be the author. A suggestion to you. You should really rethink your playground. All it currently does is turning melody into regex, which is important to have for comparison. But you’re specifically courting people who DON’T want to deal with regex syntax. What you desperately need is a way to run melody expressions. And - if possible - a way to translate regex into melody wouldn’t hurt as well.

    Many (most?) of us tend to google regex on the web and pasting them in our code. Having them converted into a syntax that we can better understand would be hugely helpful.