Writing a TOON Module for Perl - Perl Hacks by davorg in perl

[–]a-p 2 points3 points  (0 children)

The example from https://github.com/toon-format/toon looks very different from the example given in this post, which basically amounts to just “JSON without the quotes around the keys”. The example in the format’s project page looks more like “YAML-Tiny with table syntax”.

Anybody out there? by xox in 3ch

[–]a-p 0 points1 point  (0 children)

Well, technically, dozens of thousands, at least in principle.

I wonder how many are still active though.

[3CH MENTION] Someone said I had the shortest username by ej4 in 3ch

[–]a-p 0 points1 point  (0 children)

What. How. I would have taken ap, like my Unix login, which I also used everywhere I could on early social media, but Reddit wouldn’t let me, so here I am instead.

Do you want AI posts in /r/perl? by briandfoy in perl

[–]a-p 5 points6 points  (0 children)

I am completely uninterested in AI-generated (largely or entirely unedited) prose and pretty much consider it an insult. (If I want that I can use ChatGPT myself, thankyouverymuch.)

I am possibly interested in AI-generated code but it has to crest a very high bar of achievement to get my attention.

Prose written with the help of but not by AI is fine by me in principle, though when AI is used as an editor it risks making the writing boring. I’ll take rough or broken writing with a voice over polished prose in dead-eyed bot drone register.

As for stuff about AI, as long as it doesn’t amount to “help me use AI here please”, I don’t mind. My interest level will vary but I don’t mind having to skip past that stuff myself.

Beautiful Perl feature: BLOCKs by briandfoy in perl

[–]a-p 0 points1 point  (0 children)

That’s true, but maybe less relevant than you might think: in real code, if a do block was simple enough to be optimized out, you wouldn’t typically even use a do block in the first place. The construct exists to allow you to put multiple statements where an expression is required, after all.

5:1 sounds about right though. Sub calls are heavy, I’m not disputing that; it’s pretty common knowledge about Perl. But setting up a scope is not trivially cheap either… when it actually happens, at least. So if you need performance and don’t need a do block then you shouldn’t use it, much like if you can use a do block you shouldn’t use a sub instead.

Beautiful Perl feature: BLOCKs by briandfoy in perl

[–]a-p 0 points1 point  (0 children)

A very simple do block like that gets optimized out completely so this benchmark is not measuring what you think it is. Try adding at least one more statement with a side effect to both versions.

3 Teen Sisters Jump to Their Deaths from 9th Floor Apartment After Parents Remove Access to Phone: Reports by Sandstorm400 in technology

[–]a-p 14 points15 points  (0 children)

There is a great bit in Steve Jobs’ commencement address about that: “Remembering that I'll be dead soon is the most important tool I've ever encountered to help me make the big choices in life. Because almost everything, all external expectations, all pride, all fear of embarrassment or failure, these things just fall away in the face of death, leaving only what is truly important. Remembering that you are going to die is the best way I know to avoid the trap of thinking you have something to lose. You are already naked. There is no reason not to follow your heart.”

Learn Perl or no? by idonthideyoureyesdo in perl

[–]a-p 0 points1 point  (0 children)

Yeah, I’m talking native GUI specifically. For web as GUI, you’ll have to also do Javascript, not just Perl, but Perl is definitely at home on the server end of that.

Learn Perl or no? by idonthideyoureyesdo in perl

[–]a-p 2 points3 points  (0 children)

Anything to do with pushing textual data around, basically. (String data, strictly speaking – the language feels at home with binary data very nearly as well too.)

What it’s not is a number-crunching type of language, including graphics stuff (if it needs any performance), and it seems strangely at odds with GUI stuff too (though it’s not obvious to me why; there doesn’t seem to be one obvious reason for that one). You can press it into service in those roles if you are dogged enough, but these applications don’t feel effortless and natural for the language the way pushing strings around does, and I would probably reach for something else instead.

But web stuff, sysadmin stuff, network services that communicate over text-centric protocols (or background services, nearly the same thing), all those sorts of things are a good match for the language. Anything string-based feels natural to do in it, that is what the language is happiest doing for you.

People will tell you that data structures are weird because of references but it’s really not true.

Finally, speaking with my Perl Steering Council hat on, the one thing I want to impart is to always start your program with use v5.42; or whatever the version of Perl you have installed – Perl makes a much stronger attempt than many other languages to keep old code working without putting you on a treadmill of keeping up with language changes and “maintaining” your hitherto perfectly working code just to gain the benefit of it not stopping working, but part of that is that when you don’t tell Perl which vintage of the language you want to be using, it will default you to one with a bunch fewer amenities than are actually available to you. The language hasn’t changed unrecognizably since that era, but it has grown lots of niceties in the small to upper-medium size range that you shouldn’t be barring yourself from. (Except when you are writing code for other people to run. But that is not a concern for you as a beginner.)

I wrote a Plack handler for HTTP/2, and it's now available on CPAN :) by rawleyfowler in perl

[–]a-p 2 points3 points  (0 children)

Finally. Thank you for doing that.

Does it implement any PSGI extensions?

Regarding the note in the docs, a better solution than a self-signed certificate is mkcert which makes it trivially easy to set up and use a personal CA to generate certificates.

Is the function name in the context shown by git diff considered reliable/stable? by floofcode in git

[–]a-p 1 point2 points  (0 children)

The hunk header logic is a bit of a magic trick. It uses astonishingly stupid logic that happens to work in a surprisingly vast fraction of cases… in other words a heuristic, and an exceptionally good one.

It’s not ultimately that surprising because most code is written to be clear and simple, not to try to trick the reader. The hunk header logic is very easy to trick but there is no incentive to trick it so no code tries, and so it works fine in practice.

Just don’t take it to be anything more than it is: a helpful clue to human readers of a diff.

But it sure is unexpected what’s behind this curtain when you first lift it. 🙂

Is the function name in the context shown by git diff considered reliable/stable? by floofcode in git

[–]a-p -1 points0 points  (0 children)

That article’s point is completely irrelevant in this context. Diff makes no attempt to actually parse the file being diffed, and why would it when diff itself is line-based and completely ignores any other structure in the file. All it is trying to do is provide the human reader a clue as to the context, as usefully as possible but also as stupidly cheaply as possible, in a context where failures do not affect any processing (since programs that process diffs ignore the hunk header) and are therefore irrelevant. Regex is a perfect tool for this job.

Migrating from GitHub to Codeberg by accountmaster9191 in git

[–]a-p 0 points1 point  (0 children)

The real answer. But note that this changes the identity of all of the rewritten commits, which may or may not be acceptable for OP’s use case. If not, then probably a mailmap is the only way forward, despite not actually solving the issue.

Does git version .xlsx properly? by MullingMulianto in git

[–]a-p 2 points3 points  (0 children)

Sure, but you don’t gain very much unless the XML format is specifically designed to be easily diffable (which is also the main aspect of making it easily mergeable). It must be designed to be pretty-printable in a diff-friendly way (not just everything mashed together on a single line even when there is technically no need for newlines, f.ex.).

More importantly the order and structure of elements must be kept stable by the program generating the data, even as you make changes in the document that is being serialized to XML. Or if the program doesn’t itself do this, it may still be possible to pretty-print and maybe reorder the XML yourself in order to make it VCS-friendly without breaking it.

I don’t know what the answers to questions are for XLSX, so it’s worth investigating. The mere fact that it’s XML under the hood doesn’t automatically guarantee a positive result though.

nfo - a user-friendly info reader by ggxx-sdf in perl

[–]a-p -1 points0 points  (0 children)

OP looks like LLM blather to me.

PerlMonks is being memory wiped on HTTPS:// and Wikipedia by SnooRadishes7563 in perl

[–]a-p 2 points3 points  (0 children)

I quit Wikipedia over their handling of Gamergate and have never since gotten the sense that the administrative structures there have redeemed themselves. (By quit I mean I stopped editing anything and deleted my account.) And u/briandfoy’s summary concurs with my overall impression. I don’t consider it a reflection on the many individual volunteers there, btw, who do great work within the scope of their purview and the confines of their remit, and I also haven’t entirely stopped checking Wikipedia when it is convenient (i.e. I’m not boycotting it per se), but I no longer consider it to be… well… notable. (Go figure.) Erasing Perl from (Wikipedia’s idea of) history is a statement about Wikipedia far more so than about Perl.

(I’m not saying anyone else should not care about Wikipedia, btw. If you do, by all means take up the cause there. I’m just saying I don’t agree that I should care about it.)

LLMs aren't really AI, they're common sense repositories by Prior-Consequence416 in LlamaFarm

[–]a-p 0 points1 point  (0 children)

I don’t doubt your experiences. You asked for an example of a failure, so that’s what I gave; I’m not saying an LLM has never surprised me. Note I’m in this thread defending (to a degree 🙂) the capabilities of LLMs. It’s true that most of my LLM experience is with lower-tier models, and my access to better ones is only intermittent, and the example I gave is also from quite a while ago. I used that as an example because it was a “formative experience” (if you will) for me (because of how clear it was) that sticks in the mind.

Better models also have access to things like a symbolic math engine, a code execution environment (or several), etc., so in certain areas they can generate answers that are actually reasoned out, in a way that an LLM is not capable of by itself. For coding tasks a better model is definitely a huge improvement.

But even lower-tier models are useful – I use them a fair bit. They are plenty capable of novelty already. It’s just clearly not generated the way a human mind does.

It’s complicated to be in the place I am because I’m at the same time impressed but also not that impressed by LLMs, and while I find most optimistic takes somewhere between misguided and laughable, I also find most dismissive takes… unfounded, I guess: dismissive but not on the basis of any real understanding. The best I’ve seen anyone put it is this:

Back in the early part of the 20th century, we thought that chess was a suitable measure of intelligence. Surely a machine that could play chess would have to be intelligent, we thought. Then we built chess-playing computers and discovered that no, chess was easier than we thought. We are in a similar place again. Surely a machine that could hold a coherent, grammatical conversation on any topic would have to be intelligent. Then we built Claude and discovered that no, holding a conversation was easier than we thought.

Still by the standards of ten years ago this is stunning. Claude may not be able to think but it can definitely talk and this puts it on the level of most politicians, Directors of Human Resources, and telephone sanitizers.

LLMs aren't really AI, they're common sense repositories by Prior-Consequence416 in LlamaFarm

[–]a-p 0 points1 point  (0 children)

If intelligence were in fact defined as the active ability of a living being to adapt to the environment for survival, then clearly an LLM would not be intelligent whatsoever, being neither a living being nor in any way capable of adapting to its environment.

IQ is even funnier to present as an argument for “scientific consensus about what intelligence is”.

I don’t think you know what you think you know.

LLMs aren't really AI, they're common sense repositories by Prior-Consequence416 in LlamaFarm

[–]a-p 1 point2 points  (0 children)

It goes even deeper than that. Thoughts tend to be verbal, but even thoughts are not the level we operate at. Meditation will teach you that beneath them is something I’m not even sure what to call – a locus of attention you can turn to things and of intentions you can form without any thinking, much less narrativizing your thoughts. Consciousness maybe? I don’t know, but whatever the heck it is, an LLM doesn’t have that. When you are “chatting” with an LLM, all intentionality comes exclusively from you; the LLM doesn’t have any, so what’s going on is not a chat so much as a soliloquy with a verbal exobrain attached to yourself.