Threads for Garbi

  1. 5

    I disliked this from the first example because you aren’t replacing the function with a regex you are replacing it with .test(s)

    1. 5

      You’re replacing the logic of the function with matching it against a regex. The method you use to match it against a regex is an implementation detail.

      1. 3

        I disliked it because the question was asked “But wouldn’t it be cool if your IDE gave you a refactoring hint?” No. No that wouldn’t be cool because it would imply that replacing that fast concise array manipulation or length checking is for some reason not as good as using a regular expression. For simple things like that, I call it RE abuse. Not using an RE is almost always better. The tutorial lost me at this point.

      1. 5

        The work that went into automating things is really nice, and I’m sure it was a very interesting set of challenges to solve.

        So now, the team at Twitter has a bunch of tools telling them what servers are failing, maybe why… but you still need humans to go and fix things. It always boils down to humans going there and replacing faulty hardware, or humans investigating why a server did not (re)start properly, etc.

        1. 1

          And bring the angle grinder.

        1. 1

          This reminds me of an issue I have with Discord and gmail. Every time I get a Discord invite to my gmail account the link is invalid. Is it possible that Google is accessing my link before me and ruining the invite?

          1. 1

            I’m unable to replicate this with an invite sent from outlook to gmail. Is it possible that the invites are expiring? How are the invites sourced?

            Edit: Actually, merely viewing the invite isn’t enough to decrease the number of uses on a limited-use invite

            1. 1

              They are expiring within 2 minutes of generation. Weird. Thanks for thinking about it.

          1. 5

            I am disappointed at the title of this blog post, because it insufficiently captures the sheer scope and importance of the topic discussed within.

            1. 4

              It is an excellent post. It packs a lot of content into a small word count with clear explanations.

              1. 4

                thank you for convincing me to read to article instead of just clicking through the comments! I agree it’s an excellent post :)

                1. 1

                  Agree. Wasn’t expecting it to be that good. Updating my philosophy to give friction a better reputation.

              2. 2

                Same, there’s just so much potential to this article

              1. 4

                Anyone else wonder if Mallory is intentionally filling github with buggy code?

                1. 13

                  No need for malicious activity, Github is full of student projects that got abandoned halfway through, or other throwaway code. If they trained the model on all Github repositories, without any filtering, such low-quality, mostly copy-pasted code is probably the majority of the training data.

                  1. 2

                    I guess I should have said exploits instead of mere bugs. And a nation state actor is well placed to do so. When someone says “Never attribute to malice that which can be explained by incompetence” I respond with “Never attribute to incompetence that which can be explained by malice masquerading as incompetence.”

                    1. 1

                      “Think of how stupid the average person is, and realize half of them are stupider than that.” — George Carlin

                  1. 2

                    I don’t get why new programmers bounce off parens. The view from my chair is they are the best thing about lisp and they make everything understandable.

                    1. 4

                      I’ve seen this funny remark somewhere:

                      (f x y) — too many parentheses

                      f x y — too academic

                      f(x, y) — just right

                      1. 3

                        I don’t really understand it, but I do acknowledge that it’s far easier to persuade programmers to try unfamiliar semantics in a new language than unfamiliar syntax. Java programmers find it easy to move to C++ than Objective-C, even though Objective-C is far more semantically similar to Java than C++ is. They’ll move to JavaScript even more easily, even though the object model is a totally different family of OOP.

                      1. 1

                        I hate surveys with mandatory questions. What is my opinion about packages? I have none, what’s a package? Too bad I must answer with false information. So I check every box so that no one answer is preferred.

                        1. 3

                          A common problem is someone tries various commands or config changes, then one of them works, but there are all kinds of side effects left in the system, little time bombs that create havoc later. Eventually you just factory reset. It’s not a sane way to live.

                          1. 1

                            I always wondered why it’s called complexity. Big O and NP are about resource requirements. To my lay understanding, complexity relates more to chaos and nonlineariry. Sensitive dependence on initial conditions doesn’t mean much when you can initialize all your variables.

                            1. 3

                              Total guess: because each complexity class corresponds to a set of problems which can be solved that cheaply, and the bigger classes contain more difficult / complicated problems.

                              1. 3

                                From On the Computational Complexity of Algorithms (1965), the word “complexity” was chosen to refer to the difficulty of computing sequences of numbers (emphasis added):

                                One finds […] that some computable sequences are very easy to compute whereas other computable sequences seem to have an inherent complexity that makes them difficult to compute.

                                1. 1

                                  There are many ways to measure complexity depending on the domain.

                                  Kolmogorov complexity is about finding the smallest programa that produces a given string (the definition is a obviously more technical).

                                  The VC dimension is a generalization of degrees of freedom, and a model with high VC dimension can classify more complex data sets.

                                  The algorithmic complexity means that there is a hierarchy of difficulty, or complication, or solving problems, and problems that take less steps to solve are said to be simpler.

                                  1. 1

                                    I like that VC dimension idea. To me a system is simple if an abstraction of it is much smaller than the thing itself. Think a crystal. Something is complex if it can’t be abstracted so easily. Think a mitochondrion. The same level of abstraction of a mitochondrion (patterns of atoms) is a sizable fraction of the thing itself. I don’t think that maps directly onto algorithmic complexity. I guess we just use the same word for somewhat different things.

                                    1. 1

                                      Something is complex if it can’t be abstracted so easily.

                                      Sounds (a lot!) like you’re talking about entropy

                                      1. 2

                                        Absolutely, yes. Just didn’t have room in one paragraph to bring in such a huge concept.

                                      2. 1

                                        From what you say, sounds like Kolmogorov complexity could be very interesting to - and a related concept, minimal descriptor length.

                                  1. 3

                                    Keyboard rate limiter doesn’t seem like a great solution.

                                    1. 3

                                      The title led me to believe the handwriting would be parsed somehow but the hyperlinks are just hand crafted img tags.

                                      1. 1

                                        Hah, came here to post my first post but you beat me to it, you Magical Redditor you!

                                        1. 2

                                          It was sent to me by a friend who’s really into MtG :P

                                        1. 1

                                          Why would four people flag this as off-topic?

                                          1. 2

                                            Because it’s not very technical

                                            1. 2

                                              It’s not suprising to see a service having some trouble. Eventually they might or might not resolve this but either way it’s more expected that they won’t share any insightful information on this incident.

                                              1. 2

                                                Product information is off topic on Lobsters?

                                                Lobsters is focused pretty narrowly on computing; tags like art don’t imply every piece of art is on-topic. Some rules of thumb for great stories to submit: Will this improve the reader’s next program? Will it deepen their understanding of their last program? Will it be more interesting in five or ten years?

                                                This post meets none of the criteria. “it’s relevant because it’s a JPEG compression bug” is the same as saying “any website is relevant because Nginx serves it”. There’s no technical content.

                                              1. 4

                                                Gmail has been telling me my Thunderbird POP3/SMTP client is insecure for years now.

                                                1. 6

                                                  How do you get hash to start with 1337? That alone seems an accomplishment. Brute force by making 10,000+ hashes of tiny differences in the image?

                                                  1. 16

                                                    That was the easy part. Note that it ends in 1337 too, making it a 2^32 bruteforce - only a few minutes with a naive multi-threaded CPU bruteforce.

                                                  1. 4

                                                    Following in my father’s footsteps, I shall now proceed to destroy the fun

                                                    1. 2

                                                      The mouse is a much faster input device than the keyboard: the latter is almost always stationary.

                                                      Did you enter that into your blog with your mouse?

                                                      It’s important to consider ergonomics in sedentary jobs: every now and then, programmers should shift a bit.

                                                      << funnay