March 09, 2012
On Thursday, March 08, 2012 23:54:21 deadalnix wrote:
> Le 08/03/2012 07:15, Jonathan M Davis a écrit :
> > On Thursday, March 08, 2012 00:52:57 Nick Sabalausky wrote:
> >> "Ary Manzana"<ary@esperanto.org.ar> wrote in message news:jj94mb$1i7v$1@digitalmars.com...
> >> 
> >>> Here's something I wrote today:
> >>> 
> >>> parent_ids = results.map{|x| x['_source']['parent_ids']}.flatten.uniq.compact Hash[Site.find(parent_ids).map{|x| [x.id, x]}]
> >> 
> >> When you format it like that (that is to say, when you *don't* format
> >> it),
> >> yea, it's unreadable. Which is why I do such things like this:
> >> 
> >> parent_ids =
> >> 
> >> results
> >> .map{|x| x['_source']['parent_ids']}
> >> .flatten.uniq
> >> .compactHash[
> >> 
> >> Site.find(parent_ids).map{|x| [x.id, x]}
> >> 
> >> ]
> > 
> > I actually tend to find code like that hard to read, because all of the operations are inside out in comparison to normal. But since the only difference between his example and yours is the formatting, I agree yours is easier to read. Still, I'd much prefer if such code didn't use UFCS, since I find it much harder to read that way. It's just so backwards.
> > 
> > - Jonathan M Davis
> 
> You got tricked by your experience. You are used to read backward. The function are written in the order they are executed in the example above. This isn't very traditional, and may be the reverse order of what people expect due to previous experience, but definitively is the forward way.

I mean that it is backwards from what is normal. The result of that is that I find it harder to read. So yes, you could say that it's executing "forward," since the functions are executed from left-to-right instead of right-to-left, but regardless, it's backwards from what is normal and therefore feels very backwards to me, which is my point.

- Jonathan M Davis
March 09, 2012
"Matt Soucy" <msoucy@csh.rit.edu> wrote in message news:jjb75b$2en4$1@digitalmars.com...
> I recall my theater director telling me that the closest modern dialect to "Shakespearean English" was somewhere near the south side of the state of New York...not sure how much truth there is to that, but it's a cool idea.

Interesting. And amusingly ironic.

> Regional dialects are definitely a thing in the US, but I agree that they're not always noticeable...unless you find just the right words for someone to say that accent their pronunciation, like the classic "pahk the cah in hahvahd yahd" that goes with a Bostonian accent.
>

My dad's mother is from Pittsburgh, and both of them talk in "normal" US English until they say something like "wash" which will come out as either "wush", "warsh" or occasionally "wursh" (although after my occasional teasing, they've both been getting better :( ).

>>> I tolerate USian spellings
>>
>> I see I'm not the only one with a pet peeve that "'America' is two continents, not one country" :)
>>
> "American" does have the benefit of being more pronounceable, though...I just tried to pronounce that "oohz-ee-an", "us-ee-an", etc and they all sound odd.
>

Yea, that's why I always give in and use the word "American" even though it kinda makes me cringe sometimes.

>>> as much as non-English speaking programmers do, because I see it as an accepted "Programmer's English".
>>>
>>
>> Being from the US I couldn't be sure, but that's what I has suspected.
>>
>
> To be honest, I've occasionally wondered why there aren't any (commonly used) programming languages using other human languages as bases. I mean, English doesn't exactly have the nicest syntax ever...USian here, though.

I'm sure it's because much of computer history is heavily rooted in the US.

But yea, it would be interesting to see a langauge that was based on something very different. A German-based one would be fun. Or even better, something that doesn't use the Latin alphabet, like Japanese or Hebrew or Russian. Or Swahili (which is an awesome-sounding language). Designing/using an Arabic (right-to-left, IIRC) programming language would be a great mind-fuck. Heh one of us should hack up DMD to produce a NihonD, using (or at least allowing) kanji instead of the kanas wherever appropriate :) That'd be both fun to make and to use.



March 09, 2012
On 9 March 2012 12:45, Nick Sabalausky <a@a.a> wrote:
> "Nick Sabalausky" <a@a.a> wrote in message news:jjavf2$1v3p$1@digitalmars.com...
>> "James Miller" <james@aatch.net> wrote in message news:mailman.235.1331210469.4860.digitalmars-d@puremagic.com...
>>>On 9 March 2012 01:23, Stewart Gordon <smjg_1998@yahoo.com> wrote:
>>>>
>>>> I'm finding it hard to figure how someone would pronounce the "o" and
>>>> "u" in
>>>> "colour" separately.
>>>>
>>
>> I would imagine it'd be like "kuh-lore".
>>
>>>Being British means that I do notice the differences in pronunciation, I've pretty much done the opposite to Reagan, gone from England to NZ. I tend to get frustrated when I can't even correct pronunciation because nobody can hear the difference!
>>
>> I have a little extra insight into this as my mom is a speech/language pathologist:
>>
>> As you've noticed, trying to get a person to hear the difference often doesn't work (And even if they can hear it, that doesn't necessarily give them enough info to actually pronounce it). I think the right thing to do, at least in cases where it actually matters, is to instruct them on the actual mouth movements involved. Then they can "feel" the difference, and start to hear themselves making the different sound. "Hearing" it can naturally follow from that.
>>
>
> Out of curiosity, I just asked her about this and she said that "hearing" it *does* typically come first, so I guess I was wrong about that. But she did say that failing that, yea, bringing in instruction on the mouth movements can be a reasonable next step as it brings other senses into play.


For a university project, I had to do a group assignment building a psycholinguistic demo platform for a textbook. While it was more focused on how the brain interprets language (very interesting in itself), we spent a lot of time talking to a linguistics professor, and he can produce the strangest sounds! I assume its because he's studied how these sounds get made so well that he can make them himself, despite not speaking the languages the sounds originate from.

--
James Miller
March 09, 2012
"H. S. Teoh" <hsteoh@quickfur.ath.cx> wrote in message news:mailman.278.1331251506.4860.digitalmars-d@puremagic.com...
>
> The problem with learning by 'hearing' is that, past a certain age, you lose the sensitivity to certain sound distinctions that are not present in your mother tongue. I suppose it's a sort of instinctive "optimization" done by your brain: if a certain set of sound differences don't matter, then there's no need to retain the extra resources to distinguish between them. Lump them all together and treat them as the same sound for higher efficiency.
>

Hmm, I don't doubt that theory.

> English speakers trying to learn Chinese, for example, have an incredible difficulty in hearing the "tones" -- because there is simply not such a distinction made in English that saying something in a different tone can *completely* change the meaning.

I've heared that in countries like China which have a tonal language, the percentage of people with "perfect pitch" is incredibly high - something like 90-99%. Whereas in other places, like the US, it's *way* below half the population (something like 10%, IIRC).

> Korean speakers
> learning English, OTOH, have the hardest time telling the difference
> between "fork" and "pork" -- because in Korean, "p" and "f" are not
> distinguished. They just don't hear it, or if they do, they can't
> reliably reproduce it. (Makes for hilarious dinner conversations --
> "please pass the [fp]ork".)
>

Fun :)


March 09, 2012
"James Miller" <james@aatch.net> wrote in message news:mailman.282.1331251951.4860.digitalmars-d@puremagic.com...
>
> For a university project, I had to do a group assignment building a psycholinguistic demo platform for a textbook. While it was more focused on how the brain interprets language (very interesting in itself), we spent a lot of time talking to a linguistics professor, and he can produce the strangest sounds!

lol, I love how you worded that :)

Speaking of strange human-produced [vocal] sounds, I've always wished I could do *half* of what Michael Winslow can do ( http://en.wikipedia.org/wiki/Michael_Winslow ).


March 09, 2012
"Marco Leise" <Marco.Leise@gmx.de> wrote in message news:op.wave6bo49y6py2@marco-leise.homedns.org...
> Am 07.03.2012, 15:17 Uhr, schrieb Marco Leise <Marco.Leise@gmx.de>:
>
>> Am 07.03.2012, 07:17 Uhr, schrieb Daniel Murphy <yebblies@nospamgmail.com>:
>>
>>> "Derek" <ddparnell@bigpond.com> wrote in message news:op.warmsnem34mv3i@red-beast...
>>>> On Wed, 07 Mar 2012 03:38:09 +1100, Adam D. Ruppe <destructionator@gmail.com> wrote:
>>>>
>>>>> Why aren't we using real words here? Real words are easier to remember and easier to type.
>>>>
>>>> Should we use American or English spelling? Color verses Colour, for example?
>>>>
>>>>
>>>> --
>>>> Derek Parnell
>>>> Melbourne, Australia
>>>
>>> American.  Always.
>>
>> Whatever Java uses.
>
> Ok, that *was* a bad idea: http://en.wikipedia.org/wiki/Java#Languages

What, you don't think that'd be fun? :)


March 09, 2012
"H. S. Teoh" <hsteoh@quickfur.ath.cx> wrote in message news:mailman.275.1331250663.4860.digitalmars-d@puremagic.com...
> On Thu, Mar 08, 2012 at 11:54:21PM +0100, deadalnix wrote:
>> Le 08/03/2012 07:15, Jonathan M Davis a écrit :
>> >On Thursday, March 08, 2012 00:52:57 Nick Sabalausky wrote:
>> >>"Ary Manzana"<ary@esperanto.org.ar>  wrote in message news:jj94mb$1i7v$1@digitalmars.com...
> [...]
>> >>parent_ids =
>> >>     results
>> >>     .map{|x| x['_source']['parent_ids']}
>> >>     .flatten.uniq
>> >>     .compactHash[
>> >>         Site.find(parent_ids).map{|x| [x.id, x]}
>> >>     ]
>> >
>> >I actually tend to find code like that hard to read, because all of the operations are inside out in comparison to normal. But since the only difference between his example and yours is the formatting, I agree yours is easier to read. Still, I'd much prefer if such code didn't use UFCS, since I find it much harder to read that way. It's just so backwards.
>> >
>> >- Jonathan M Davis
>>
>> You got tricked by your experience. You are used to read backward. The function are written in the order they are executed in the example above. This isn't very traditional, and may be the reverse order of what people expect due to previous experience, but definitively is the forward way.
>
> Yeah, modern function composition syntax is totally backwards. This is most obvious when you use the f?g notation in math. It means f(g), that is, apply g first, then f. So if you use this notation in functional programming, writing something like a?b?c?d?e?f means run steps a..f *backwards*. Written on multiple lines, it totally goes against the flow of control.

That's why I'll always use std.functional.pipe instead of std.functional.compose. (Though if my math background was stronger than my programming backgroud, I'd probably prefer std.functional.compose)

>It's the programming language version of top-posting. ;-)
>

Forth using like just It's.

> Unfortunately, the alternative is reverse Polish notation, which isn't all that readable either.
>

My Calculus class in high-school uses a graphing calculator that used reverse polish notation. I had less trouble with it than some of the students because of my programming background and prior understanding of stacks. But boy did it still seem goofy. I like the TI's so much better.

> Chained object notation is a good compromise, which happens quite often when you use jQuery:
>
> $(selector)
> .html(htmlcode)
> .add(more_nodes)
> .css(some_styles)
> .filter(unwanted_nodes)
> .click(click_handler)
> .show();
>
> Writing this in function composition order would cause an instant quantum leap in unreadability.
>

Ziggy says there's an 80% chance you're here to decrease excess parenthesis nesting and set straight what once went backwards.


March 09, 2012
Am 09.03.2012, 01:07 Uhr, schrieb Nick Sabalausky <a@a.a>:

> But yea, it would be interesting to see a langauge that was based on
> something very different. A German-based one would be fun.

Has been done: http://www.ph-ludwigsburg.de/fileadmin/subsites/2e-imix-t-01/user_files/logo/befehld.pdf
(A beginner's language that evolved around "turtle graphics")

> Or even better,
> something that doesn't use the Latin alphabet, like Japanese or Hebrew or
> Russian. Or Swahili (which is an awesome-sounding language). Designing/using
> an Arabic (right-to-left, IIRC) programming language would be a great
> mind-fuck.

You are free too use Hebrew, Cyrillic or Arabic characters for your identifiers right now. Only the keywords and druntime/Phobos would remain English:

	int main()
	{
		int العربية = 42; // <- I really love this mind-fuck !!!
		return العربية;
	}

> Heh one of us should hack up DMD to produce a NihonD, using (or
> at least allowing) kanji instead of the kanas wherever appropriate :) That'd
> be both fun to make and to use.
March 09, 2012
"Ary Manzana" <ary@esperanto.org.ar> wrote in message news:jjbg62$2vi3$1@digitalmars.com...
> On 3/8/12 4:04 PM, Jonathan M Davis wrote:
>> On Thursday, March 08, 2012 06:55:17 Steven Schveighoffer wrote:
>>> On Wed, 07 Mar 2012 21:14:34 -0500, Ary Manzana<ary@esperanto.org.ar>
>>>
>>> wrote:
>>>> The problem is not mistaking it with something else. The problem is
>>>> when
>>>> you want to write it. In Ruby my mind works like this:
>>>>
>>>> Mind: "How would I get a span for 5 seconds?"
>>>> Mind: "Let's try 5.seconds"
>>>> Mind: "Wow, it works!"
>>>>
>>>> I'm trying to remember cases when I just wrote what my mind thought it was correct and I was *so* surprised it worked out of the box in Ruby. Like writing array.last, and get it to work, instead of array[array.length - 1]. But in D, from the docs (http://dlang.org/arrays.html )
>>>>
>>>> bar[$-1] // retrieves last element of the array
>>>>
>>>> I read: bar dollar minus one wait what??
>>>
[...]
>>
>> Yeah. I don't understand how anyone can expect to just write code and
>> have it
>> work without looking anything up.
>
> I just stumbled upon this again in Ruby. I have a time object. I want to know if it's in the past. I wrote:
>
> time.past?
>
> it worked! :-)

I don't like to do such things (especially in dynamic languages). I'd be concerned about it *seeming* to work, but not exactly as I expect. Just seems to be programming by guesswork and assumptions. I don't trust it.



March 09, 2012
On Fri, Mar 09, 2012 at 01:12:20PM +1300, James Miller wrote: [...]
> For a university project, I had to do a group assignment building a psycholinguistic demo platform for a textbook. While it was more focused on how the brain interprets language (very interesting in itself), we spent a lot of time talking to a linguistics professor, and he can produce the strangest sounds! I assume its because he's studied how these sounds get made so well that he can make them himself, despite not speaking the languages the sounds originate from.
[...]

I know someone who is studying linguistics, and she told us that in one phonology class, they were taught how to make all kinds of strange sounds. I assume that must be part and parcel of being a linguist. :-)


T

-- 
It's amazing how careful choice of punctuation can leave you hanging: