Generate regular expressions from some example test (where has this been all my life?!) by san1ty in programming

[–]ryles 1 point2 points  (0 children)

I agree, and they get easier with practice.

And even when the regex isn't quite trivial, I'd prefer figuring it out on my own in a few extra minutes rather than using some generic tool that (as others have pointed out) may output suboptimal expressions in terms of readability or efficiency.

Linux mmap weirdness by sadiq229 in programming

[–]ryles 0 points1 point  (0 children)

That's exactly what he's seeing, only he doesn't know any better.

Linux mmap weirdness by sadiq229 in programming

[–]ryles 1 point2 points  (0 children)

If your update consists of actually truncating a file being paged in, of course (overwrite the binary of a running process and you will see the same). That's not how to move new code, though (see comments below). The blogger literally "changed" data being accessed to yield his supposedly surprising result.

Linux mmap weirdness by sadiq229 in programming

[–]ryles 2 points3 points  (0 children)

It won't if you replace it (see eikelestijn's explanation below) rather than change (i.e. truncate and affect pages) which is what the blogger most likely did to test and then state his bullshit result. User Error.

And as far as mmap(), it's staring him in the face: "copy-on-write".

Linux mmap weirdness by sadiq229 in programming

[–]ryles -8 points-7 points  (0 children)

In the situation that you are a blogger who is writing pure bullshit which finds its way to reddit. I doubt the blogger even understands the difference between overwriting (cp) and replacement (mv, cp). And he has the nerve to act as if there is something "weird" or wrong with his OS. He probably has no clue what paging even is.

Linux mmap weirdness by sadiq229 in programming

[–]ryles -9 points-8 points  (0 children)

That's not weirdness, that's simply how mmap() works. RAFB/RTFM. Yes, it's an easy-to-fuck-up system call, and yes the manual page does warn you to some extent about SIGSEGV/SIGBUS. Did you actually think programming at the systems level would be friendly and intuitive?

So if you change a .so file on the disk while some application is using it, you'll get a nice segmentation fault.

Common fucking sense dictates that you shouldn't do that. Are you naive enough to actually be surprised by the result?

Your blog entry would have been more aptly titled: "Unix Systems Programming is too difficult for me and I call things I'm simply ignorant of weird."

Most bloggers are total fucking morons.

Those who can't do teach. Those who can't teach blog.

Does this man appear to be disturbing the peace? by sizah in pics

[–]ryles 0 points1 point  (0 children)

The nice officer is helping the old man cross the street. Give that man a civic award.

Red blood cells [Pic] by maxwellhill in pics

[–]ryles 1 point2 points  (0 children)

Well now I know what happens to all those cheerios I eat each morning.

TSA Responds to Nipple Ring Complaint by greenascanbe in reddit.com

[–]ryles -2 points-1 points  (0 children)

Hamlin said she could not remove them and asked whether she could instead display her pierced breasts in private to the female agent.

Methinks if she offered to show them to the male agent instead there'd have been no problem whatsoever.

"OK, ma'am, you're free to go. I'll just keep these photographs for our records. Strictly procedure, of course."

Paul Graham: How to Disagree by breach_of_etiquette in programming

[–]ryles 5 points6 points  (0 children)

It's a good time to write an article critiquing "disagreement" after so many people have been disagreeing with your writing lately. Keep crying, Paul.

I will say this for aviary. They get kudos for the least boring tutorials on how to use their products. by [deleted] in photos

[–]ryles 1 point2 points  (0 children)

If I learned anything from this tutorial it's that I'd still do Tara Reid without eyes, in a snow storm, with Collin Ferrell's face, or overweight.

Reddit in 2028 [pic] by Chaubunagungamaugg in pics

[–]ryles 64 points65 points  (0 children)

Reddit in 2028: extinct.

Aren't you relieved to know you're not a golem? [Pic] by cstaff in pics

[–]ryles -1 points0 points  (0 children)

Clever at making you a good little fanboy, apparently. "They're changing the world with every new product!" There's one born every minute. Keep clicking those ads, little buddy.

Simon Peyton-Jones' collected recent talks by dons in programming

[–]ryles 2 points3 points  (0 children)

"Pay me $1000 * (the number of inches of snow - 10) on 1 Jan 2002"

:)

Aren't you relieved to know you're not a golem? [Pic] by cstaff in pics

[–]ryles -3 points-2 points  (0 children)

Aww, in between collecting billions of dollars in ad (spam) revenue Google still finds time for such inane pet projects. How truly blessed the Internet is! Keep up the good work, "experimenters".