• 0 Posts
  • 18 Comments
Joined 1 year ago
cake
Cake day: July 8th, 2023

help-circle






  • Despite my love of yaml. I actually think he has a small point with unquoted strings. I teach students and see their struggles. Bash also does unquoted strings and basically all students go years and years without realizing

    cat --help
    cat "--help"
    # ^ same thing
    
    cat *
    cat "*"
    # ^ not same thing
    
    cat $thing
    cat "$thing"
    # ^ similar but not the same 
    

    To know the difference between special and normal-but-no-quotes you have to know literally every special symbol. And, for example, its rare to realize the -- in --help, isn’t special at a language level, its only special at a convention level.

    Same thing can happen in yaml files, but actually a little worse I’d say. In bash all the “special” things are at least symbols. But in yaml there are more special cases. Imagine editing this kind of a list:

    js_keywords:
    - if
    - else
    - while
    - break
    - continue
    - import
    - from
    - default
    - class
    - const
    - var
    - let
    - new
    - async
    - function
    - undefined
    - null
    - true
    - false
    - Nan
    - Infinity
    

    Three of those are not strings. Syntax highlighting can help (which is why I don’t think its a real issue). But still “why are three not strings? Well … just because”. AKA there isn’t a syntax pattern, there’s just a hardcoded list of names that need to be memorized. What is actually challeging is, unless students start with a proper yaml tutorial, or see examples of quotes in the config, its not obvious that quotes will solve the problem (students think "true" behaves like "\"true\""). So even when they see true is highlighted funny, they don’t really know what to do about it. I’ve seem some try stuff like \true.

    Still doesn’t mean yaml is bad, every language has edge cases.


  • Its easy for me to say “just start writing JSON in the yaml. It doesn’t get more simple than JSON”, but actually I do think there’s a small point with the unquoted strings.

    Back before I knew programming, I was trying to change grammar settings sublime 2, which uses yaml. I had no idea what yaml was. The default setting values used unquoted strings fot regex. I knew PCRE regex and escapes, but suddenly they didnt work, and when I tried to match a single quote inside of regex that also didn’t work. I didn’t know I was editing yaml file (it had a .tmLanguage extension). Even worse, if I remeber correctly, unparsable settings just silently fail. Not only did I have no errors to google, I didn’t have any reason to believe the escapes were the cause of the problem (they worked in the command line). Sometimes I edited the regex and it was fine, and other times it just seemed to break. I didn’t learn about quoting in YAML until years later.

    For me that was an unfortuate combination, which was exacerbated by yaml unquoted weirdness. But when you’re talking about “did you read the spec” that’s a whole other story. .nan for nan, tabs vs spaces, unquted string weirdness, etc should just be one error message+google away. I think they’re a small hiccups with what is overall a great format.



  • I have read the 1.2 spec (I’m trying to make a round trip parser for JS, and I do maintainance on a fork of the rumel yaml python package). I actually think its very well thought out, with things I hadn’t considered like future extensibility, streaming applications, and data-corruption detection.

    The diagrams, color coding, and less-formailty of the spec was much appreciated. Especially compared to something like the ECMA Script spec, which reads like a math textbook had a child with a legal document.

    I’m not saying YAML is perfect; round trip (the thing I’m working on) is nearly impossible because it wasn’t a design goal. It has a few too many features (I’ve never seen a declaration in the wild), but it does a good job at accomplishing the creators goals, and the additional features basically only slow down parser-implementers like me. I often pick it because of the tag support, which I’ve struggled to find an equivalent for in other serialization languages. I use anchors in recursive data structures, and complex keys for serializing complex data structures (not human readable). The “document end” marker has been nice when I’m worried about detecting partial-writes. And the merge key is nice for config files.

    The application/perspective matters. Yaml might be bad for you but its not bad for everyone.




  • If you’re asking about specific names of features, its just the ones seen in that video clip. It seems like a pattern of very not-modular-ness.

    If you’re asking why that pattern is concerning as an end user: Zed claims to be “a lightweight text editor”. But hardcoded support for a particular javascript library, as well as hardcoded support for a particular formatter, feels a lot more like a opinionated IDE packed with features designed for the specific workflows of the creators. Even if there’s no runtime cost, there is a technical cost for open source contributors. These little not-modular things can really bloat the codebase and make it hard to contribute.

    More importantly, if Zed does add plugin support in the future, its going to require a major code refactor. Which makes forks and outside contributions especially hard.

    From a lock-in perspetive: if something better than tailwind comes out, and we were daily driving Sublime 3 with no extensions, its no big deal to switch to the new thing. There wasn’t any hidden favoritism to begin with. But in Zed, not only will it feel bad to use the unsupported new thing, but also the team behind the-new-thing can’t realistically fork and add support either. They just have to hope the Zed devs decide to support it.

    If their website said it was a fast low-overhead opinionated IDE I’d be fine because I’d know the kind of lock-in I was getting into.


  • Lapse is going the extensions-for-features route, cross platform from the start, is more buggy atm, slower progress (doesn’t have 3 dedicated experienced devs) but is more accepting of community support.

    Zed, similar goals and rust backend, probably has some monetization goals (eventual offering of live sharing code service), and Zed isn’t afraid to hardcode features. Like… very hard hardcoded features, to the point that I’m kinda concerned about it. This 5min clip of Theo looking over the source code shows it pretty well https://www.youtube.com/watch?v=ZOYp6-k9HhE&t=1533

    The Atom/Zed devs write the most well-documented code I’ve ever read. Clear variable names, perfect comment-explainations when needed, etc. I wish they would join up with Lapse.



  • The abbreviation method LessPass uses works pretty well. Its usually only a problem with a re-branding, like how wefwef changed to voyager. When that happens it’s not too big of a deal, I just change it to the new thing.

    What is a big problem with the URL though is login portals. Like when it’s some conglomerated system that involves a million redirects, and/or a “login with XYZ”. They can get some really weird URLs that have nothing to do with the actual site and those are a real pain.


  • jeffhykin@lemm.eetoSelfhosted@lemmy.worldReview of LessPass?
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    1 year ago

    #3 isn’t true. There’s a username field, so you just put in the username of the alt accounts.

    Your point about the master password and two factor is a good one though.

    In practice password restrictions are rare (like 1% of sites), but they are problematic when they happen because there’s so many different ways to restrict passwords and trying all combinations is impractical. Needing the counter is exceedingly rare. Remembering the username isn’t a problem, but if you don’t have a consistent policy of always-using-a-username or always-using-the-email (as the lesspass username) it can be difficult to remember that. Similar situation with the URL, if it’s not abbreviated consistently, then it’s a problem.

    That said, I still use LessPass for everything and just deal with the edgecase problems.


  • jeffhykin@lemm.eetoSelfhosted@lemmy.worldReview of LessPass?
    link
    fedilink
    English
    arrow-up
    1
    arrow-down
    2
    ·
    edit-2
    1 year ago

    Despite what others are saying, I’ve been using it for a couple years and it can work great if you’re okay with the trade-offs.

    Of the three (Integrity, Confidentiality, Availability) it has better availability than cloud storage which is what I care about. Even when the LessPass site is down, there’s an IPFS version, mirrors, local cache, etc so it’s basically always possible to derive any password.

    At a user level, it’s very impractical (and a slight risk) to always retype the master password at every single login screen. However, letting the local autofill save the password doesn’t defeat the point of LessPass. Why? because, if you only use local storage, and you’re traveling and your phone breaks, you’re now locked out of every account. With LessPass, you’re fine as soon as you get an internet connection.

    There are a few caveats.

    • There’s no global 2factor. Loosing the master password means every site that doesn’t have its own 2factor is instantly fully exposed.
    • I do agree there are a few sites where the default options don’t work because of the character restrictions. It’s about 1.2% of websites in my experience, but they are painful exceptions. Basically you have to rely on memory to be able to pick those same settings again. I recently wish there was a unified dataset of which websites had password requirements, and then LessPass would auto check the necessary boxes when the website URL was pasted in. Maybe one day.
    • Changing your master password requires changing every single website. If you don’t, then it’s impractical to remember what password was used for what site.