• (nodebb)

    Hmm, I'm surprised as well that a language from the Lisp family was picked. Often I hear they used in the good old days before Java mostly languages from the PASCAL family or FORTRAN as an introduction.

  • Industrial Automation Engineer (unregistered)

    Funny. Joel Spolsky (yes, I'm "beyond that age") said that a student's programming language should not be easy or accessible, it should teach/train the mental capacity to understand pointers, iterations, recursions, etc. those that cannot wrap their head around those concept should fail, and fail early. I tend to agree with him.

  • LCrawford (unregistered)

    I don't agree with this view of Perl - just amused that anyone would take this viewpoint in 2023: https://two-wrongs.com/why-perl.html

  • LZ79LRU (unregistered) in reply to Industrial Automation Engineer

    I agree as well. My first language was C and it has made me the man I am today.

  • Sauron (unregistered)

    That code is insane.

    An arbitrary match somewhere in the middle HTML data doesn't mean a thing.

    First, if there is no check that the HTML is well formed, then the result probably doesn't mean a thing (at best it is unreliable).

    Also, HTML is a language to structure documents. An arbitrary match doesn't tell you whether you're matching some text content, some CSS, some JS, some SVG, or (God forbid!) the base64 code someone stupid put in the src tag of an <img>, some HTML comment, or whatever else that is technically valid (or not!) in today's sprawling web standards.

  • (nodebb)

    After almost 2 decades of not touching Perl, I needed to write a plugin for the linux sysadmin utility, logwatch. Perl was the right tool for that job.

  • (author) in reply to MaxiTB

    At the time, it's what MIT's program did. My school was very much NOT MIT, but the program was very heavy on theoretical grounding. Compared to folks I know that went to tech schools in that time period and region, the undergrad program I did was a much better educational program.

  • LZ79LRU (unregistered) in reply to Sauron

    To be fair I can envision a use for such a check in several scenarios:

    1. You just want to check if a particular string is present on a whole bunch of pages automatically.Like say you put a copyright notice into the source (not displayed to viewers) or files that link to a particular other file or similar.

    2. You want to find a file containing a particular line or comment or ID of some sort. Again, probably hidden in the source.

    3. You want to quickly find files containing a piece of text and flag them for manual review later.

    Etc. etc.

    It's nothing you couldn't do with say Notepad++ without having to code a thing. But like, the uses are there.

  • dpm (unregistered)

    "adress"?

  • Kythyria (unregistered)

    That Stack Overflow answer is a WTF in itself: the question asked can in fact be solved with a regex. What makes HTML (and XML, SGML, bbcode, technically markdown...) not regular is the nesting, and the question doesn't consider the nesting. It only considers a part of the grammar which (in XML; not sure about HTML5) is in fact regular. Enormous, due to the very large character classes in element/attribute names, but regular.

  • Scott (unregistered) in reply to Industrial Automation Engineer

    I concur. My first was mainframe Assembler and every language after that has been a piece of cake. Except RPG <shudder>.

  • Adam Ingerman (github) in reply to Sauron

    First, if there is no check that the HTML is well formed

    You don't need to check. It never is.

  • Deeseearr (unregistered)

    No Zalgo today. Zalgo tomorrow. There's always a Zalgo tomorrow.

    What? Look, somebody's got to have some damn perspective around here! Zalgo!

  • Brian (unregistered)

    When I was young and dumb, my Intro to Programming class was taught with a C-like pseudocode. No compiler or runtime, no "as long as it works" grading scripts, everything was written and graded by hand. Probably why even today I'm still a stickler for neat, easy-to-read code.

    A few years later I found out they switched the class to use Scheme instead, and I remember thinking what a terrible disservice that was for the incoming students.

  • (nodebb)

    I like the interpolation of $adress just to add a space onto the end. That's a WTF all by itself

  • (nodebb)

    My introductory programming class in my Master's program was in Scheme (Racket), and it really expanded my mind despite having already had an undergraduate degree in CS and three years' professional experience (unfortunately in IBM UniBasic and shell scripts).

  • Sniffnoy (unregistered)

    There's another big hair-raiser about this code... if it finds a match, it doesn't exit early! It just keeps searching the rest of the document!

  • (nodebb) in reply to Remy Porter

    Theoretical background is in my opinion the most valuable anyway. There's not really a big market for developers fluent in Oberon or SmallTalk these days and learning the fundamentals allow understanding new languages with ease.

  • (nodebb)

    in just the most "write only language" way possible

    Incorrect. The programming "language" in question is not APL.

  • (nodebb) in reply to Remy Porter

    My school was very much NOT MIT, but the program was very heavy on theoretical grounding. Compared to folks I know that went to tech schools in that time period and region, the undergrad program I did was a much better educational program.

    Judging by your photo here (a poor resource, given that I don't know how long ago it was taken), I'd hazard a guess that you're younger than me.(1) My school wasn't MIT either(2), and when I started there in the autumn term of 1984, the language of choice for all the versions of CS101 was Fortran, specifically WATFIV...

    (1) The first female programmer I ever met was my mother, who resigned from her job in late '65 or early '66 because she was expecting a future cynic, and that was what was expected of women in 1960s Britain. And before you say it, yes, I followed in my mother's footsteps, not my father's.

    (2) It is the reason that I rigorously refer, in abbreviation, to any flavour of Raspberry Pi as an RPi, and not an RPI, because I don't want to associate it with the Tute Screw...(3)

    (3) For financial reasons(4), I was unable to complete my degree there, and ended up graduating from an institution whose most famous alumna achieved her fame by dying on the way to space in the Shuttle Challenger.

    (4) My parents, specifically my mother, were cheapskates, and unwilling to do what it would have taken to enable me to continue there.(5)

    (5) Yes, I'm a just a <===========================> teeny bit bitter about that, even now.

  • Fizzlecist (unregistered) in reply to MaxiTB

    Fully agree. Our undergrad CS classes exposed us to Pascal, C, Scheme & Prolog among others to expose us to as many different approaches to programming as possible.

  • mihi (unregistered)

    In Scheme, you can filter people by whether they can wrap their head around call/cc :-)

    Unfortunately, the article does not tell what was the intent of this search. I have seen several (crude but very reliable) website uptime monitoring scripts (today you would probably call them integration tests) that hit the POST endpoint of the login form with a known good credential used for that purpose only and grep the resulting html for the full name of the user (which is not part of the user name and also no common word that may appear on the site anywhere or in BASE64 images). If it is there, the login must have worked, and so the webserver, database, etc. are not competely broken.

  • eric bloedow (unregistered)
    Comment held for moderation.
  • Randal L. Schwartz (github)

    SmallTalk

    Ahem. It's Smalltalk. No capital T.

  • (nodebb) in reply to Remy Porter

    My French university insisted on reaching me Lisp when I wanted to learn C. I hated it. I hated it even more because they insisted on doing things the recursive way which were "obviously" simpler done via a basic iterative for loop. I mean all these algorithms to walk trees and sort and whatnot clearly were a waste of time, right?

    Later I got to realize how wrong I was.

  • (nodebb)

    the important thing: at least they're not trying to parse it.

    The level of sarcasm is high on that one.

  • (nodebb)

    My uni taught Lisp as part of a course on AI (not the way AI is used today). Which meant learning a new language, and a new language paradigm (we were all taught Java / OOP for everything else). I came out of the course not having learnt how to do functional programming, trying to do OOP in Lisp (which was possible, but not without understanding Lisp in the first place), and not really having learnt anything about AI techniques, because I spent the whole course struggling with/against Lisp.

    Another course briefly covered assembly language over a few weeks. The main lesson was "this is what your compiler does, and it can do it better than you." A very important lesson that warns against premature optimisation.

  • LZ79LRU (unregistered)
    Comment held for moderation.
  • jonwil (github)

    In high school the languages taught were first Pascal (around the time of Turbo Pascal 6) then Visual Basic. When I went to uni, the language we started with was Java.

    In 2023 if I was going to pick a language for someone to learn who just wants to play around a bit for fun and isn't interested in doing "serious" programming I would pick something like Scratch which is dead simple to understand. If I was picking a language for someone who wants to get serious about programming I would pick C#. You can get all the stuff you need for free (Visual Studio Code is 100% free as are all the .NET and C# compilers and runtimes and most of it is even open source these days I believe), its a fairly easy language to learn, the company that owns it isn't evil and greedy and trying to squeeze every dollar out of it coughOraclecough and C# supports probably most of the high-level concepts someone new to programming should be learning.

    Will never understand the people who somehow think Python is a good language for a beginner (I have seen enough Python code in my time to know that its completely the wrong thing to start with if you want to get serious about programming)

  • Duke of New York (unregistered) in reply to LCrawford
    Comment held for moderation.
  • (nodebb) in reply to Deeseearr

    You can have a massive thumbs up for that Babylon 5 reference :)

Leave a comment on “Searching for a Perl”

Log In or post as a guest

Replying to comment #:

« Return to Article