• (disco)

    Does it rankle anyone else that the term "regular expression" has been appropriated for things that aren't? :smile:

    (I actually use "regular expression" for things that are actually regular expressions, and "regex" for things that are similar, but I'm probably bonkers. I wish they had been called "pattern expressions" instead or something.)

  • (disco) in reply to EvanED

    I believe the idea behind calling them 'regular expressions' was because they're expressions written in a regular language. Whatever that means.

  • (disco)
    kupfernigk:
    Is PHP even a language?

    It's more like grunting at Apache, hoping it understands what you want to do.

    kupfernigk:
    I thought it was a psychedelic drug that makes people think nobody will evernot notice security holes.

    FTFY.

  • (disco) in reply to RaceProUK
    RaceProUK:
    I believe the idea behind calling them 'regular expressions' was because they're expressions written in a regular language. Whatever that means.
    A real regular expressions _defines_ a regular language, not is written in one.1 And "reg"exs in the wild support several things that are not regular, like backreferences. For example, `(a|b)+` defines a regular language, `{a, b, aa, ab, ba, bb, aaa, ...}`. `(a|b)+ \1` defines a _non_regular language `{a a, b b, aa aa, ab ab, ...}` and hence `(a|b)+ \1` isn't a "regular" expression.

    1 You need a context-free language to define regular expression syntax, i.e. what is a legal regex and what isn't.

  • (disco) in reply to Zacrath

    Actually, it will work if you escape the first dash "-" inside the first set of square brackets: https://www.debuggex.com/r/5WlQHU11ys7nognU

    It seems that the slightly tweaked syntax does not includes the concept of character ranges. Or case insensitivity.

  • (disco) in reply to kupfernigk
    kupfernigk:
    You lost me at "Ook!", could you provide a little contextualisation? Or a banana?

    Looks like a program written in Ook. An esoteric language designed to be readable to orang-utans.

  • (disco) in reply to chreng

    I think it won't survive the head bang against it afterwards... :P

  • (disco) in reply to Zacrath
    Zacrath:
    Looks like a program written in Ook. An esoteric language designed to be readable to orang-utans.
    Ook! Ook? Ook? Ook? Ook.
    Ook. Ook! Ook. Ook! Ook!
    Ook? Ook? Ook? Ook. Ook!
    Ook. Ook? Ook. Ook! Ook.
    

    (OokSCII.)

  • (disco)

    You have a problem. You use a slightly tweaked regex to solve it. Now you have 28 problems.

  • (disco) in reply to JBert
    JBert:
    the trusty IBM Model M

    is not "most keyboards". It's a mechanically sophisticated thing of beauty made with actual switches. I would not ever put a Model M through a dishwasher, because a Model M will never fail in a way requiring more than a good blowing out with compressed air.

    Most keyboards are cheap pieces of shit with a single PCB onto which the keytops directly press little blobs of conductive rubber, and leaving them tilted up on one corner in an airy sunny spot for a week is generally enough to dry them out even if you can't be arsed taking them apart.

  • (disco) in reply to flabdablet
    flabdablet:
    is not "most keyboards". It's a mechanically sophisticated thing of beauty made with actual switches. I would not ever put a Model M through a dishwasher, because a Model M will never fail in a way requiring more than a good blowing out with compressed air.

    Most keyboards are cheap pieces of shit with a single PCB onto which the keytops directly press little blobs of conductive rubber, and leaving them tilted up on one corner in an airy sunny spot for a week is generally enough to dry them out even if you can't be arsed taking them apart.

    Mechanical keyboards are godlike. You just don't realize how awesome they are until you actually start using one.

  • (disco) in reply to Masaaki_Hosoi

    Au contraire. You don't realize how awesome they are until you notice that every keyboard you've touched in the past twenty years, apart from the Model M you've owned yourself for all that time, has been complete and utter crap.

    Edit: I take that back. I have touched my Apple ][+ keyboard within the last twenty years. It feels nice. I think I'll go and fondle it some more right now.

    Worst keyboards I have ever used: a tie between the original square-buttons Commodore PET one and the horrible chiclet thing on the IBM PC Jr., with honorable mentions to the Sinclair ZX81 and Spectrum.

    http://www.vintage-computer.com/images/pet2001front.jpg http://images.pcworld.com/reviews/graphics/139100-ibmPCjr.jpg

  • (disco) in reply to flabdablet
    flabdablet:
    Worst keyboards I have ever used: a tie between the original square-buttons Commodore PET one and the horrible chiclet thing on the IBM PC Jr., with honorable mentions to the Sinclair ZX81 and Spectrum.

    ZX81 and Spectrum aren't the worst? Wow…

  • (disco) in reply to Maciejasjmj
    Maciejasjmj:
    any other language
    Lojban is perfectly understandable if you've had just the right type of lobotomy.
  • (disco) in reply to dkf
    dkf:
    ZX81 and Spectrum aren't the worst? Wow…

    Have you never used either of my nominated two Worst Keyboards Ever? The Sinclair keyboards are merely cheap and nasty, as befits the machines they came on; the two leaders were complete fucking disasters.

    The PET keyboard was built out of calculator-style dome switches - really, really, cheap ones - and after about two months of use the keys would begin to stick very, very badly. Even when you provided enough pressure to ram those sticky keys home, you'd still have to kind of twirl your fingertip around at the bottom of the stroke to make the dome switch make contact - and sometimes you'd need to do a bit more twirling to get the key to come back up again. The two-key-wide space bar, naturally, went out before any of the others (just as well PET BASIC was completely insensitive to whitespace). But even before it wore out, the weird square layout made it damn near impossible to touch type on.

    The feel of the IBM PC Jr's hideous chiclet keyboard made a Sinclair toy keyboard feel like a Model M by comparison. The keys were loose and sloppy but even so they tended to jam. And it was a wireless keyboard with a highly directional TV-remote-grade IR link to the system box: sit the keyboard in your lap and the IR got blocked. Even when it had line of sight it was unreliable. It was really common for key-up codes to go missing, leaving whatever key you'd pressed most recently on endless repeat until you pressed it again. Horrible, horrible keyboard.

    Edit: the PC Jr's IR keyboard receiver was also wired to the 8088 CPU's Non-Maskable Interrupt line in order for the 8088 to deserialize keycodes in software. That meant that anything time-critical was liable to be horribly disrupted any time you pressed a key. Assuming the IR link actually worked, of course.

  • (disco) in reply to flabdablet
    flabdablet:
    Most keyboards survive a trip through the dishwasher quite well

    Thanks for that, pal. I now have a useless MacBook Pro, and my company wants me to buy a new one out of my own pocket...

  • (disco) in reply to grkvlt
    grkvlt:
    I now have a useless MacBook Pro

    There, there. At least fast-charging the iPhones in the microwave still hasn't been patched.

  • (disco) in reply to Masaaki_Hosoi
    Masaaki_Hosoi:
    Mechanical keyboards are godlike.
    Eh, I don't think they're _as_ good as they are cracked up to be. I have one with MX Blues that I originally got for gaming but used for a while for typing, and it wouldn't even been in my two favorite keyboards I _own_; those would be the MS Sculpt Ergonomic keyboard and Natural 4000. The mechanical keyboard has a better "finger feel", but not better enough for me to make up for the benefits of the Sculpt & Natural's better shape.1

    I wish there were mechanical-key split keyboards that weren't a significant redesign (which excludes the Kinesis, ErgoDox, and a couple others) and mimiced the "ergonomic" keyboards like the MS Natural line... but I don't know of any. And don't anticipate using a mechanical keyboard for typing typing until there is one.

    1 I think the Sculpt has better finger feel, but the function keys are kind of crappy and I don't like the disconnected numpad or the fact that it's only available in wireless. It's still my current favorite, but it seems keyboards are a game of tradeoffs.

  • (disco) in reply to Zacrath
    Zacrath:
    Looks like a program written in Ook. An esoteric language designed to be readable to orang-utans.

    Now I understand. Turing machine code, sort of. Conclusion: there are people out there who have much too much time on their hands. The difficulty is that while the language might be readable by Pratchett-type orang-utans, I can imagine that they would all find that they had much better things to do than bother.

    No, I have no sense of humour.

  • (disco) in reply to Masaaki_Hosoi
    Masaaki_Hosoi:
    Mechanical keyboards are godlike. You just don't realize how awesome they are until you actually start using one.

    It's true! I got one because I'd heard people say this, but you don't realize until you actually start using it.

    Better yet, I got my company to pay for it!

  • (disco) in reply to grkvlt
    grkvlt:
    Thanks for that, pal. I now have a useless MacBook Pro

    You're supposed to remove the keyboard part first, and only wash it.

  • (disco) in reply to EvanED
    EvanED:
    I don't think they're as good as they are cracked up to be. I have one with MX Blues

    Well, that's because you got blues and probably have been driven insane from the noise. Shoulda got browns instead.

  • (disco) in reply to FrostCat

    I actually was surprised at how little I was annoyed by the blues' noise. I suspect a lot has to do with the fact that I was using it and not some other asshole, but I bought the keyboard for gaming, thoroughly expecting to be annoyed by the noise if I were to use it for typing and was pleasantly surprised that it took basically no time to get used to. (It's also still noticeably quieter than the Model M.)

  • (disco) in reply to EvanED

    I've used Model Ms back in the day and always found the noise obnoxious.

  • (disco) in reply to kupfernigk

    The last thing we want is a possibility for the Librarian to tamper with Hex...

  • (disco) in reply to flabdablet
    flabdablet:
    Edit: the PC Jr's IR keyboard receiver was also wired to the 8088 CPU's Non-Maskable Interrupt line in order for the 8088 to deserialize keycodes in software. That meant that anything time-critical was liable to be horribly disrupted any time you pressed a key. Assuming the IR link actually worked, of course.

    Well there's the problem. They should have implemented a Non-Maskable Interrupt Mask like we had in one project. Basically an external AND1 gate placed before the NMI pin that keeps the interrupt signal from ever getting to the processor unless a certain bit in an I/O register was also high. "Non-Maskable"? Ha!

    But I call shenanigans on flabdablet. Who ever did anything time-critical on a PCjr?

    1 Okay, there was a latch in there as well, and the logic levels may have been inverted so it needed a NOR gate instead, but you get the idea.

  • (disco) in reply to narbat
    narbat:
    They should have implemented a Non-Maskable Interrupt Mask like we had in one project. Basically an external AND1 gate placed before the NMI pin that keeps the interrupt signal from ever getting to the processor unless a certain bit in an I/O register was also high. "Non-Maskable"? Ha!

    :facepalm:

  • (disco) in reply to narbat
    narbat:
    Who ever did anything time-critical on a PCjr?

    Anybody who attempted to run a serial terminal on it at 2400 bps or over.

  • (disco)

    The include of cornify completely breaks the homepage from loading anything past this article since cornify.com is down.

Leave a comment on “Regularly Expressing Hate”

Log In or post as a guest

Replying to comment #:

« Return to Article