1778: "Interest Timescales"

This forum is for the individual discussion thread that goes with each new comic.

Moderators: Moderators General, Prelates, Magistrates

User avatar
sardia
Posts: 5850
Joined: Sat Apr 03, 2010 3:39 am UTC

1778: "Interest Timescales"

Postby sardia » Wed Dec 28, 2016 5:53 am UTC

Image
Title text: Sometimes, parts of a slowly-rising mountain suddenly rises REALLY fast, which is extra interesting.

I think it's 1778. That previous dude's post messed me up. The alt text is a volcano right?
Last edited by gmalivuk on Wed Dec 28, 2016 10:45 pm UTC, edited 2 times in total.
Reason: put the link in

ps.02
Posts: 378
Joined: Fri Apr 05, 2013 8:02 pm UTC

Re: 1778: "Interest Timescales"

Postby ps.02 » Wed Dec 28, 2016 8:21 am UTC

Yes, yes, Randall, now tell us about the timescales of your compounding interest.

sardia wrote:The alt text is a volcano right?

Probably, but relative to the usual speed of a mountain rising, I suspect a lot of geological events would be "REALLY fast" in comparison.

ETA: Yes, it's 1778, but could you add the usual "" to the subject?

niauropsaka
Posts: 72
Joined: Mon Apr 22, 2013 8:50 pm UTC

Re: 1778: Interest Timescales

Postby niauropsaka » Wed Dec 28, 2016 9:01 am UTC

It took me a bit to realise Randall was referring to wind erosion of mountains, as opposed to, say, BASE jumping.

User avatar
ecow
Posts: 4
Joined: Wed Dec 28, 2016 12:36 pm UTC

Re: 1778: "Interest Timescales"

Postby ecow » Wed Dec 28, 2016 3:19 pm UTC

I think there is a grammatical error in the title text:
Sometimes, parts of a slowly-rising mountain suddenly rises REALLY fast, which is extra interesting.

One of those plurals needs to be a singular. I'm thinking the latter, "rises" should be "rise" so that "parts" can remain plural.

I'm not sure how often Randall browses these forums, and I didn't know a way to contact him directly.

User avatar
Soupspoon
You have done something you shouldn't. Or are about to.
Posts: 2533
Joined: Thu Jan 28, 2016 7:00 pm UTC
Location: 53-1

Re: 1778: "Interest Timescales"

Postby Soupspoon » Wed Dec 28, 2016 5:28 pm UTC

ecow wrote:I'm not sure how often Randall browses these forums, and I didn't know a way to contact him directly.
Find a spot of the Earth just starting to develop an appropriate thrust-fault at a convergent plate boundary, then wait. If you've chosen the right spot, you'll eventually find yourself atop a mountain, and may be able to then attract his attention by the cry of "Wheeee!".

It might take some time, but I've never known this method to fail.

ps.02
Posts: 378
Joined: Fri Apr 05, 2013 8:02 pm UTC

Re: 1778: "Interest Timescales"

Postby ps.02 » Wed Dec 28, 2016 6:28 pm UTC

ecow wrote:
Sometimes, parts of a slowly-rising mountain suddenly rises REALLY fast, which is extra interesting.

One of those plurals needs to be a singular.

It turns out to be really hard to write a post nitpicking language without discrediting yourself with at least one error. It is known. Yours is that, in fact, rises is not a plural. It is not even a noun. It is a verb conjugated as third-person singular indicative. This conjugation evolved from -th/-eth, as in riseth. Wherever you got this idea that plural means has a -s suffix, it will trip you up badly when you encounter nouns like biceps (pl. biceps), aurochs (pl. aurochs), genus (pl. genera), octopus (pl. octopodes), and fungus (pl. fungi).

-s used to also serve as a genitive marker. This still survives in the pronouns his and its.

Mikeski
Posts: 876
Joined: Sun Jan 13, 2008 7:24 am UTC
Location: Minnesota, USA

Re: 1778: "Interest Timescales"

Postby Mikeski » Wed Dec 28, 2016 6:58 pm UTC

ps.02 wrote:ETA: Yes, it's 1778, but could you add the usual "" to the subject?

...and the required link to the comic? (which would have told you it was #1778.)

"First!" is getting to be ... a thing around here, innit?

User avatar
faunablues
Posts: 95
Joined: Wed Feb 27, 2008 3:14 am UTC

Re: 1778: "Interest Timescales"

Postby faunablues » Wed Dec 28, 2016 8:00 pm UTC

ps.02 wrote:
ecow wrote:
Sometimes, parts of a slowly-rising mountain suddenly rises REALLY fast, which is extra interesting.

One of those plurals needs to be a singular.

It turns out to be really hard to write a post nitpicking language without discrediting yourself with at least one error. It is known. Yours is that, in fact, rises is not a plural. It is not even a noun. It is a verb conjugated as third-person singular indicative. This conjugation evolved from -th/-eth, as in riseth. Wherever you got this idea that plural means has a -s suffix, it will trip you up badly when you encounter nouns like biceps (pl. biceps), aurochs (pl. aurochs), genus (pl. genera), octopus (pl. octopodes), and fungus (pl. fungi).

-s used to also serve as a genitive marker. This still survives in the pronouns his and its.


Hold up. So if you remove the words in between

"Parts... rises"

that's correct? As would be "they rises?"

My inclination is that OP is correct. S/he is talking about multiple parts doing something, whereas (for instance) biceps refers to a single muscle (with two components, but beside the point).

JudeMorrigan
Posts: 1238
Joined: Tue Jan 26, 2010 1:26 pm UTC

Re: 1778: "Interest Timescales"

Postby JudeMorrigan » Wed Dec 28, 2016 8:07 pm UTC

faunablues wrote:
ps.02 wrote:
ecow wrote:
Sometimes, parts of a slowly-rising mountain suddenly rises REALLY fast, which is extra interesting.

One of those plurals needs to be a singular.

It turns out to be really hard to write a post nitpicking language without discrediting yourself with at least one error. It is known. Yours is that, in fact, rises is not a plural. It is not even a noun. It is a verb conjugated as third-person singular indicative. This conjugation evolved from -th/-eth, as in riseth. Wherever you got this idea that plural means has a -s suffix, it will trip you up badly when you encounter nouns like biceps (pl. biceps), aurochs (pl. aurochs), genus (pl. genera), octopus (pl. octopodes), and fungus (pl. fungi).

-s used to also serve as a genitive marker. This still survives in the pronouns his and its.


Hold up. So if you remove the words in between

"Parts... rises"

that's correct? As would be "they rises?"

My inclination is that OP is correct. S/he is talking about multiple parts doing something, whereas (for instance) biceps refers to a single muscle (with two components, but beside the point).

The issue, such as it is, is that there's a subject-verb agreement problem with the original statement and that ecow should have said that either the subject needed to be singular or the verb plural.

That said, I'm reasonably certain that they knew perfectly well that "rises" was a verb, knew the fundamental issue, and simply mangled their statement of it.

User avatar
Soupspoon
You have done something you shouldn't. Or are about to.
Posts: 2533
Joined: Thu Jan 28, 2016 7:00 pm UTC
Location: 53-1

Re: 1778: "Interest Timescales"

Postby Soupspoon » Wed Dec 28, 2016 8:44 pm UTC

Mikeski wrote:"First!" is getting to be ... a thing around here, innit?

As someone who has effectively bagged a number of "First!"s since my officially joining at the start of this year, I think I can be allowed to express my surprise that this wasn't already a thing.

(Although for me it has usually been a surprise that I'm the first to notice a newly published strip, self-satisfaction is secondary.)

User avatar
Flumble
Yes Man
Posts: 1951
Joined: Sun Aug 05, 2012 9:35 pm UTC

Re: 1778: "Interest Timescales"

Postby Flumble » Wed Dec 28, 2016 9:17 pm UTC

Further to the right: dinosaurs. They're rising once more and turn into CO2 and H2O.
Slightly to the right of the rocket: dinosaurs.

Soupspoon wrote:
Mikeski wrote:"First!" is getting to be ... a thing around here, innit?

As someone who has effectively bagged a number of "First!"s since my officially joining at the start of this year, I think I can be allowed to express my surprise that this wasn't already a thing.

I think it's not so much a "First!" thing, but negligence of topic starters to RTFM and negligence by the moderators to (hilariously) punish the offenders.

User avatar
Copper Bezel
Posts: 2416
Joined: Wed Oct 12, 2011 6:35 am UTC
Location: Web exclusive!

Re: 1778: "Interest Timescales"

Postby Copper Bezel » Wed Dec 28, 2016 9:57 pm UTC

ps.02 wrote:It turns out to be really hard to write a post nitpicking language without discrediting yourself with at least one error. It is known.

Quite so. Someone encountering the singular octopus or genus would be in little danger, since the regularized plurals are also accepted.

I hate to death seeing "bicep", usually used to mean "upper arm", though. Like, I get that we don't have a convenient word for that, and for a body part, that's pretty inexcusable. But getting the anatomy and the grammar of a particular word so wrong all at once is not the way to solve that problem.
So much depends upon a red wheel barrow (>= XXII) but it is not going to be installed.

she / her / her

User avatar
Pfhorrest
Posts: 3969
Joined: Fri Oct 30, 2009 6:11 am UTC
Contact:

Re: 1778: "Interest Timescales"

Postby Pfhorrest » Wed Dec 28, 2016 10:19 pm UTC

If you are wearing white pants and some wine accidentally spills on one knee, have you stained your pants, or only one pant?
Forrest Cameranesi, Geek of All Trades
"I am Sam. Sam I am. I do not like trolls, flames, or spam."
The Codex Quaerendae (my philosophy) - The Chronicles of Quelouva (my fiction)

User avatar
Flumble
Yes Man
Posts: 1951
Joined: Sun Aug 05, 2012 9:35 pm UTC

Re: 1778: "Interest Timescales"

Postby Flumble » Wed Dec 28, 2016 10:37 pm UTC

If you spill it on your knee, you've stained the pant leg —not to be confused with a panting leg (image not available).
Since the whole pants have to be washed anyway, you might as well say the pants are stained.

But what if you stain it near your crotch? What's the non-leg pant part called?

User avatar
Soupspoon
You have done something you shouldn't. Or are about to.
Posts: 2533
Joined: Thu Jan 28, 2016 7:00 pm UTC
Location: 53-1

Re: 1778: "Interest Timescales"

Postby Soupspoon » Wed Dec 28, 2016 10:46 pm UTC

Pfhorrest wrote:If you are wearing white pants and some wine accidentally spills on one knee, have you stained your pants, or only one pant?

For me, a trouser. Or just a damp knee, if you're only in pants, as modern underwear rarely goes down as far as the knee. ;)

User avatar
Flumble
Yes Man
Posts: 1951
Joined: Sun Aug 05, 2012 9:35 pm UTC

Re: 1778: "Interest Timescales"

Postby Flumble » Wed Dec 28, 2016 10:58 pm UTC

Soupspoon wrote:
Pfhorrest wrote:If you are wearing white pants and some wine accidentally spills on one knee, have you stained your pants, or only one pant?

A trouser. Or just a damp knee, as modern underwear rarely goes down to the knee. ;)

Check your dialect privilege!

Anyway, I'm seeing both pant and trouser being accepted in some dictionaries and rejected in others. English is confusing.
At least Dutch has only one leading dictionary, that rejects the existence of cromulent words.

User avatar
somitomi
Posts: 459
Joined: Fri Nov 06, 2015 11:21 pm UTC
Location: can be found in Hungary
Contact:

Re: 1778: "Interest Timescales"

Postby somitomi » Wed Dec 28, 2016 11:02 pm UTC

Flumble wrote:If you spill it on your knee, you've stained the pant leg —not to be confused with a panting leg (image not available).
Since the whole pants have to be washed anyway, you might as well say the pants are stained.

But what if you stain it near your crotch? What's the non-leg pant part called?

Why are pants called pants anyway? This is one thing that never ceases to grind my gears about the English language. That some objects have a plural name because they have two similar parts or something. And then you have to deal with needlessly roundabout phrases if you want to be more specific about the quantity of those objects. :x
"It's like he's his own alt account. Saves all the logging in and out."/poxic
they/them/theirs = he/him/his ❖ If you want to use something else out of dadaist spite, I won't mind.
✆ Hello? This is Forum Games Discord, what is your emergency?

User avatar
gmalivuk
GNU Terry Pratchett
Posts: 25820
Joined: Wed Feb 28, 2007 6:02 pm UTC
Location: Here and There
Contact:

Re: 1778: "Interest Timescales"

Postby gmalivuk » Wed Dec 28, 2016 11:12 pm UTC

English may have more pluralia tantum than many other languages, but it is far from unique in having them in the first place.
Unless stated otherwise, I do not care whether a statement, by itself, constitutes a persuasive political argument. I care whether it's true.
---
If this post has math that doesn't work for you, use TeX the World for Firefox or Chrome

(he/him/his)

User avatar
Soupspoon
You have done something you shouldn't. Or are about to.
Posts: 2533
Joined: Thu Jan 28, 2016 7:00 pm UTC
Location: 53-1

Re: 1778: "Interest Timescales"

Postby Soupspoon » Wed Dec 28, 2016 11:20 pm UTC

Flumble wrote:English is confusing.

There are some meanings that are peculiar to English English, and some meanings that are peculiar in English English.

( https://en.wiktionary.org/wiki/peculiar#Adjective #s 2 and 1, respectively. ;))

Some are sanctioned for common use, while some are sanctioned against. ( https://en.wiktionary.org/wiki/sanction#Noun )

That's before we even take into account the colonialist positions on words. I think we tried to table that issue for discussion, but they seem to have tabled that idea. ( https://en.wiktionary.org/wiki/table#Verb #s 1 and 2)

ps.02
Posts: 378
Joined: Fri Apr 05, 2013 8:02 pm UTC

Re: 1778: "Interest Timescales"

Postby ps.02 » Thu Dec 29, 2016 12:21 am UTC

faunablues wrote:
ps.02 wrote:
ecow wrote:
Sometimes, parts of a slowly-rising mountain suddenly rises REALLY fast, which is extra interesting.

One of those plurals needs to be a singular.

in fact, rises is not a plural.

Hold up. So if you remove the words in between

"Parts... rises"

that's correct? As would be "they rises?"

No, ecow said "one of those plurals," referring to the words parts and rises. What ecow meant was that the noun and verb do not agree in number. That's true. The error is in calling them both "plurals." (I then speculated that the error arose because each word has a -s suffix.)

As I said: it's hard to post a language nitpick (spelling, grammar, usage) without at least one comparable error showing up in your own post. Caveat scriptor.

User avatar
Heimhenge
Posts: 168
Joined: Thu May 01, 2014 11:35 pm UTC

Re: 1778: "Interest Timescales"

Postby Heimhenge » Thu Dec 29, 2016 2:03 am UTC

somitomi wrote:Why are pants called pants anyway? This is one thing that never ceases to grind my gears about the English language. That some objects have a plural name because they have two similar parts or something. And then you have to deal with needlessly roundabout phrases if you want to be more specific about the quantity of those objects. :x


Yeah, like "scissors" ... if the rivet in your scissors falls out, and the two halves separate, is each a "scissor"? Curiously, "scissor" is listed as a verb and not a noun. See: https://en.oxforddictionaries.com/definition/scissor

And if you have a pile of those scissor halves on a table, what do you have? A pile of ... scissor halves? Scissors? Scissorss? Scissori?

Mikeski
Posts: 876
Joined: Sun Jan 13, 2008 7:24 am UTC
Location: Minnesota, USA

Re: 1778: "Interest Timescales"

Postby Mikeski » Thu Dec 29, 2016 2:21 am UTC

Copper Bezel wrote:Like, I get that we don't have a convenient word for that [the part of the arm between the shoulder and the elbow], and for a body part, that's pretty inexcusable.

Only because common usage (arm = shoulder to wrist, forearm = elbow to wrist) doesn't match anatomical usage (arm = shoulder to elbow, forearm = elbow to wrist). But then we'd need another word for both parts together...

And it's backwards compared to the anatomical names for the other limb... anatomically, it's a thigh and a leg, so the distal part, rather than the proximal part, names the whole limb in common usage. And we don't have a common word for the distal part... it's not a "shin" or a "calf", since those are just the front or back halves of it... it could be a "crus", but that's certainly not in common use. (I hadn't heard "crus" until I looked at the wikipedia article for "human leg" just now.)

Heimhenge wrote:Yeah, like "scissors" ... if the rivet in your scissors falls out, and the two halves separate, is each a "scissor"?

Ryoko and Nui say they're "scissor blades".

And if you have a pile of those scissor halves on a table, what do you have? A pile of ... scissor halves? Scissors? Scissorss? Scissori?

A mess.

I have a pair of "kitchen shears" which come apart for cleaning, rather than being permanently riveted together... now I need to know if each half is a shear, or a shear blade... silly language.
Last edited by Mikeski on Thu Dec 29, 2016 2:28 am UTC, edited 1 time in total.

User avatar
da Doctah
Posts: 812
Joined: Fri Feb 03, 2012 6:27 am UTC

Re: 1778: "Interest Timescales"

Postby da Doctah » Thu Dec 29, 2016 2:28 am UTC

Heimhenge wrote:like "scissors" ... if the rivet in your scissors falls out, and the two halves separate, is each a "scissor"?


Obpondiality: someone sends you to the supply cabinet to bring back "four pairs of compasses" so her craft group can draw circles. Do you return with two objects, four, or eight?

User avatar
Copper Bezel
Posts: 2416
Joined: Wed Oct 12, 2011 6:35 am UTC
Location: Web exclusive!

Re: 1778: "Interest Timescales"

Postby Copper Bezel » Thu Dec 29, 2016 4:58 am UTC

Sorta the thing, because the "pair" explicitly refers to the single object, same as "pair of scissors". (While "four scissors", or presumably "eight compasses", doesn't sound like it means anything.)

Mikeski wrote:Only because common usage (arm = shoulder to wrist, forearm = elbow to wrist) doesn't match anatomical usage (arm = shoulder to elbow, forearm = elbow to wrist). But then we'd need another word for both parts together...

And it's backwards compared to the anatomical names for the other limb... anatomically, it's a thigh and a leg, so the distal part, rather than the proximal part, names the whole limb in common usage. And we don't have a common word for the distal part... it's not a "shin" or a "calf", since those are just the front or back halves of it... it could be a "crus", but that's certainly not in common use.

And so I today learn that anatomical usage is just stupid.

I don't know, I definitely use "shin" to mean "lower leg" and am not bother by the inaccuracy. If we were borrowing an anatomical word for upper arms, I wouldn't object to "humerus".
So much depends upon a red wheel barrow (>= XXII) but it is not going to be installed.

she / her / her

User avatar
chridd
Has a vermicelli title
Posts: 779
Joined: Tue Aug 19, 2008 10:07 am UTC
Location: ...Earth, I guess?
Contact:

Re: 1778: "Interest Timescales"

Postby chridd » Thu Dec 29, 2016 10:52 am UTC

da Doctah wrote:
Heimhenge wrote:like "scissors" ... if the rivet in your scissors falls out, and the two halves separate, is each a "scissor"?


Obpondiality: someone sends you to the supply cabinet to bring back "four pairs of compasses" so her craft group can draw circles. Do you return with two objects, four, or eight?
I'd be confused and maybe ask for clarification since compasses don't usually come in pairs, and I'm not sure I've heard "compass" as plurale tantum before now (this is a compass, this is two compasses, and eight compasses is perfectly sensical). Unless the compasses came in packs of two. Maybe I'd bring eight just in case?
(And now I'm curious if specific dialects use one form over the other, or different subjects, or random variation, or what...)

(Also, I'd probably just use "upper leg" and "lower leg", and I'm not even sure exactly what "calf", "shin", and "thigh" refer to.)
~ chri d. d. /tʃɹɪ.di.di/ (Phonotactics, schmphonotactics) · they (for now, at least) · Forum game scores
mittfh wrote:I wish this post was very quotable...
flicky1991 wrote:In both cases the quote is "I'm being quoted too much!"

User avatar
Soupspoon
You have done something you shouldn't. Or are about to.
Posts: 2533
Joined: Thu Jan 28, 2016 7:00 pm UTC
Location: 53-1

Re: 1778: "Interest Timescales"

Postby Soupspoon » Thu Dec 29, 2016 12:36 pm UTC

Compass:
Spoiler:
Image

The other thing(s) probably derive(s) from the "compass calliper(s)" or equivalent family of divider(s). When navigating a sea-chart manually, both a compass and a pair of compasses might well be useful. Or multiple compasses and pairs of compasses if you want to make sure you have replacements should anything happen to the original(s)... ;)

(Calf, for me, is the rear of the lower leg, the muscle bit. Shin is the front of the lower leg, the bone. The thigh is the upper leg, and mostly muscle, but probably because the thighbone isn't as prominent with the whole sheathing of thigh-muscles (front/lap, rear/sedantry surface, outer/width-defining, inner/potentially erotic). A calf injury is often a strain, a shin injury a bruised skin or potentially a broken bone in the worst cases. Thigh injuries are soft-tissue mostly but a thigh-break is serious, not the least from the risk of injuries incurred to the soft tissues on the way to the break and/or secondary injuries arising from the splintered bone.)
Last edited by Soupspoon on Thu Dec 29, 2016 12:49 pm UTC, edited 1 time in total.

User avatar
ecow
Posts: 4
Joined: Wed Dec 28, 2016 12:36 pm UTC

Re: 1778: "Interest Timescales"

Postby ecow » Thu Dec 29, 2016 12:46 pm UTC

Wow, I'm happy that my first post here resulted in a discussion about pants, biceps, and octopuses/octopodes/octopi.

Yes, ps.02 is right, I should not have said "plurals" when I just meant "esses". But I am glad that my conclusion was correct, even if the statement I used to describe it wasn't. I tried to convince myself that "parts rises" was using some rule of English unknown to me, and thus preserve Randall's perfection.

Also, it still hasn't been changed on the site, so I guess he doesn't browse the forums. Or at least not on an hourly basis.

User avatar
ecow
Posts: 4
Joined: Wed Dec 28, 2016 12:36 pm UTC

Re: 1778: "Interest Timescales"

Postby ecow » Thu Dec 29, 2016 3:12 pm UTC

By the way, I think this is the proper regular expression that encompasses both options, and optimally what I'd like to see the Title Text changed to to maximize nerdiness:

"Sometimes, part(s)? of a slowly-rising mountain suddenly rise(?(1)|s) REALLY fast, which is extra interesting."

User avatar
Flumble
Yes Man
Posts: 1951
Joined: Sun Aug 05, 2012 9:35 pm UTC

Re: 1778: "Interest Timescales"

Postby Flumble » Thu Dec 29, 2016 4:05 pm UTC

That certainly isn't a regular regular expression. Instead, it looks like syntax that could support context-free languages. Or maybe that syntax is still so limited it can be compiled to a regular expression.
In normal regex it's just the verbose "Sometimes, part( of a slowly-rising mountain suddenly rises|s of a slowly-rising mountain suddenly rise) REALLY fast, which is extra interesting."

User avatar
Sableagle
Ormurinn's Alt
Posts: 1232
Joined: Sat Jun 13, 2015 4:26 pm UTC
Location: The wrong side of the mirror
Contact:

Re: 1778: "Interest Timescales"

Postby Sableagle » Thu Dec 29, 2016 4:55 pm UTC

faunablues wrote:"Parts... rises"

that's correct? As would be "they rises?"
Yesss, presscioussss.
Oh, Willie McBride, it was all done in vain.

User avatar
Soupspoon
You have done something you shouldn't. Or are about to.
Posts: 2533
Joined: Thu Jan 28, 2016 7:00 pm UTC
Location: 53-1

Re: 1778: "Interest Timescales"

Postby Soupspoon » Thu Dec 29, 2016 5:07 pm UTC

"(s)?" is 'optionally an "s", stored in the first variable'. (I might have written it as "(s?)", but it might not then have worked with the next part the same.
"(?(1)|s)" is a format I'm not entirely familiar with but obviously intended to be in the Extended Pattern grouping of the regexp format, perhaps 'if there is a first variable defined then (nothing, between the "?(1)" decider and the "|" OR-choice), else an "s" in this position is required.' If that's how it works, it's a neat solution.

I might have done just "(s?)" in both cases as a first test (which must be passed as true in the first instance), then add an "$1$2" necessarily equaling just "s" as a followup test for the ultimate truth/falsity... ("" and "ss" would be failures.)

But that's something I must try some time.

Ah, look, here we are: (?(condition)yes-pattern|no-pattern)
I must remember that trick. YLSNED...

User avatar
ecow
Posts: 4
Joined: Wed Dec 28, 2016 12:36 pm UTC

Re: 1778: "Interest Timescales"

Postby ecow » Thu Dec 29, 2016 6:25 pm UTC

Soupspoon wrote:I might have done just "(s?)" in both cases as a first test (which must be passed as true in the first instance), then add an "$1$2" necessarily equaling just "s" as a followup test for the ultimate truth/falsity... ("" and "ss" would be failures.)

Close, but I don't think you can put the question mark inside the parentheses. That would make the group that is matched either "s" or "" (no s), so the (1) in the conditional assertion would be true in both cases, and it would only match "" (no s) in the second word. What we really want is that the group is "s" if it exists, and there is no group otherwise.

Here's my resource: http://www.regular-expressions.info/conditional.html

User avatar
somitomi
Posts: 459
Joined: Fri Nov 06, 2015 11:21 pm UTC
Location: can be found in Hungary
Contact:

Re: 1778: "Interest Timescales"

Postby somitomi » Thu Dec 29, 2016 6:43 pm UTC

Heimhenge wrote:And if you have a pile of those scissor halves on a table, what do you have? A pile of ... scissor halves? Scissors? Scissorss? Scissori?

How many scissors does this count as?
Spoiler:
Image

da Doctah wrote:Obpondiality: someone sends you to the supply cabinet to bring back "four pairs of compasses" so her craft group can draw circles. Do you return with two objects, four, or eight?

Tell her they don't need compasses.
Soupspoon wrote:The other thing(s) probably derive(s) from the "compass calliper(s)" or equivalent family of divider(s). When navigating a sea-chart manually, both a compass and a pair of compasses might well be useful. Or multiple compasses and pairs of compasses if you want to make sure you have replacements should anything happen to the original(s)... ;)

Ah, here's another nuisance: objects that share a single name despite being almost completely but not entirely unlike one another. I wonder how sailors never got around to rename one of them.
"It's like he's his own alt account. Saves all the logging in and out."/poxic
they/them/theirs = he/him/his ❖ If you want to use something else out of dadaist spite, I won't mind.
✆ Hello? This is Forum Games Discord, what is your emergency?

User avatar
Soupspoon
You have done something you shouldn't. Or are about to.
Posts: 2533
Joined: Thu Jan 28, 2016 7:00 pm UTC
Location: 53-1

Re: 1778: "Interest Timescales"

Postby Soupspoon » Thu Dec 29, 2016 7:54 pm UTC

ecow wrote:
Soupspoon wrote:I might have done just "(s?)" in both cases as a first test (which must be passed as true in the first instance), then add an "$1$2" necessarily equaling just "s" as a followup test for the ultimate truth/falsity... ("" and "ss" would be failures.)

Close, but I don't think you can put the question mark inside the parentheses. That would make the group that is matched either "s" or "" (no s), so the (1) in the conditional assertion would be true in both cases, and it would only match "" (no s) in the second word.

Yup, as acknowledged. My Perl solution would have been something like:

Code: Select all

return ($string=~m/dumdedum(s?) dumdedum(s?) dumdedum/)  && ($1.$2 eq "s");
 # needs testing for typos and brainfarts, of course...

If it doesn't match any combination of optional (s?)s in the rest of the string (here "dumdedum"ed for brevity), whilst attempting to fill $1 and $2 with the specifics of each, it short-circuits to return false. Otherwise one and/or the other, or neither is "s". We don't care which, so long as it is just one, so concatenate and do an explicit equality. An alternative (apart from the slightly bulky =~/^s$/ follow-up regexp) might be to do $1^$2 (bitwise XOR) to get a result if dissimilar.

Using two (s)?s and then testing for defined $1 (from whichever one matches) but undefined $2 (because both didn't match) is another two-stage version, if one fancies coding a form of that. (With ($1//!$2) perhaps? Does "only-if-defined left or NOT potentially-undefined right" return what I think it does? I must test that.)

What we really want is that the group is "s" if it exists, and there is no group otherwise.

It's definitely neater to do that. Expect my future code to be smattered with that trick at every opportunity. And even if there isn't an opportunity, unless I really bend thongs to need it... ;)

Code: Select all

my $lettersInWord=join('',sort split('',$word));
   ## Forgoing "use List::MoreUtils qw(uniq);" in header and "...,sort uniq split(..."
   ## but that's an option, too, then we can forget the "+"s in the following line
my @matches = ($=~|(a+)?(b+)?(c+)?………(x+)?(y+)?(z+)?|);
   ## and the next line which (probably) converts each $matches[n] element from something like "aaaa" to "a".
map {substr $_,1} @matches;

print "Up to five characters in '$word', alphabetically, are ".@matches[0..4]."\n";

(Because just splitting, blindly incrementing hash items then presenting the resulting hash keys in sorted (and maybe then spliced down) order is just so passé, right? ;) )

I shall read that forthwith. If not FORTHwith. ;)

User avatar
Mahnarch
Posts: 23
Joined: Wed Jul 08, 2015 6:02 am UTC

Re: 1778: "Interest Timescales"

Postby Mahnarch » Fri Dec 30, 2016 3:29 pm UTC

Image


Return to “Individual XKCD Comic Threads”

Who is online

Users browsing this forum: Bing [Bot] and 25 guests