May 23, 2015
On Saturday, 23 May 2015 at 20:44:37 UTC, cym13 wrote:
>> Not sure what kind of meat you mean, but I really don't see much meat in ranges. Of course, this is 10 times better and easier to use than STL iterators C++. For me the most important feature D are mixins, which I, unfortunately, rarely use. I'm waiting for new features from D: for new designs, not simply the expansion of Phobos and fix bugs in DMD :) Should I wait for these new features? It seems to me that everyone is not enough to simply correct C++ — they all want a language in which many different sugar. In my opinion, sugar you can try to shake out of Lisp, if possible :)
>>
>
> I think you are mistaken. The hard part about growing a
> programming language isn't adding features, it's finding the right
> core of features that are stable yet generic enough to answer
> everything in their own way.
>
> This is why C still is such a popular language, it hardly evolvevd
> since the begginning. It is also why Java in its time or Go know
> are popular among companies: they are boring, just boring. But they
> are stable. C++ wanted to address every problem, and look at it
> know.
>
> We have to develop a style, not more features. Python has its own
> style but every new feature (and they are rare) is very diligently
> examined. Most are refused. There is the python way. If python isn't
> the right tool for the job, then the best thing to do is finding
> another tool, not scotch an extension to the first one.
>
> I like python. I like D. I like other languages. Of course sometimes
> I'd like to have, say, UFCS in python or list comprehension in D.
> But D isn't the best language to do python, python is. And as there
> is a python way, there is a D way.
>
> This is not to say that we should dismiss any good concept of other
> languages, but those concepts fit in a philosophy, in an ecosystem.

You may find it nonsense, but Paul Graham says that each language has its own power. He believes that Lisp is the most powerful language, and programmers who write in other languages, he said Blub programmers. Learn more about "The Blub Paradox" can be read in the article Graham:
http://www.paulgraham.com/avg.html

What about increasing the number of features and stability, I agree. You may need more stability.

Based on the theory of Graham, I should point out that the level of power python clearly lower than D :)
May 23, 2015
On Saturday, 23 May 2015 at 21:09:45 UTC, weaselcat wrote:
> After another review, I think some of these conversions to D could be expressed much easier if the built-in slice had multidimensional slicing
>
> It was added in 2.066* but I don't think there's any plans to add support for it to slices.

Actually not a bad idea: add to Phobos module std.multiarray.

> * - you can see an example at http://denis-sh.bitbucket.org/unstandard/unstd.multidimarray.html

Embed multidimensional slices directly into the language is not
very good, but in a separate module, why not...
May 23, 2015
On Saturday, 23 May 2015 at 21:32:51 UTC, anonymous wrote:
> On Saturday, 23 May 2015 at 21:08:19 UTC, Dennis Ritchie wrote:
>> Perhaps that's not the site, and in Windows. That's what gives me in CMD:
>>
>> 456 4 4 8 99 456
>> [[456, 4, 4, 8, 99, 456]13 546
>> std.conv.ConvException@C:\D\dmd2\windows\bin\..\..\src\phobos\std\conv.d(2013): Unexpected end of input when converting from type char[] to type int
>
> That's a different issue. Works fine for me in wine.
>
> You may be typing spaces before/after the numbers.

Yes, I think I scored one space after 546.
May 24, 2015
On Saturday, 23 May 2015 at 22:01:42 UTC, Dennis Ritchie wrote:
> You may find it nonsense, but Paul Graham says that each language has its own power. He believes that Lisp is the most powerful language, and programmers who write in other languages, he said Blub programmers. Learn more about "The Blub Paradox" can be read in the article Graham:
> http://www.paulgraham.com/avg.html

I'm a fan of lisp(Clojure being my favorite. Too bad it takes about a century just to load the runtime...), and yet I find it quite ironic that Paul Graham claims lisp to be the most powerful language right after claiming that programmers can't understand - and therefore disregard - the power of languages more powerful than the ones they use...
May 24, 2015
On Sunday, 24 May 2015 at 02:43:47 UTC, Idan Arye wrote:
> I'm a fan of lisp(Clojure being my favorite. Too bad it takes about a century just to load the runtime...), and yet I find it quite ironic that Paul Graham claims lisp to be the most powerful language right after claiming that programmers can't understand - and therefore disregard - the power of languages more powerful than the ones they use...

This is not ironic, because I did neglect the power of Lisp, because not quite understand it fully :) The power of Lisp - his worst enemy. Strange Lisp syntax allows you to write powerful macros, which is unique in other languages, but many programmers do not understand Lisp syntax (and therefore may find it funny).
May 24, 2015
On Sunday, 24 May 2015 at 11:07:19 UTC, Dennis Ritchie wrote:
> On Sunday, 24 May 2015 at 02:43:47 UTC, Idan Arye wrote:
>> I'm a fan of lisp(Clojure being my favorite. Too bad it takes about a century just to load the runtime...), and yet I find it quite ironic that Paul Graham claims lisp to be the most powerful language right after claiming that programmers can't understand - and therefore disregard - the power of languages more powerful than the ones they use...
>
> This is not ironic, because I did neglect the power of Lisp, because not quite understand it fully :) The power of Lisp - his worst enemy. Strange Lisp syntax allows you to write powerful macros, which is unique in other languages, but many programmers do not understand Lisp syntax (and therefore may find it funny).

This IS ironic, because Paul Graham claims lisp to be the most powerful, but if he have ever encounter a more powerful language he couldn't accept it is more powerful than lisp due to the very same "Blub Paradox" he describes himself.
May 24, 2015
On Sunday, 24 May 2015 at 14:15:55 UTC, Idan Arye wrote:
> This IS ironic, because Paul Graham claims lisp to be the most powerful, but if he have ever encounter a more powerful language he couldn't accept it is more powerful than lisp due to the very same "Blub Paradox" he describes himself.

Probably! But, in my opinion, it has not yet appeared stronger language Lisp, so "Blub Paradox" is not yet threatened with Graham :)
May 24, 2015
On Sunday, 24 May 2015 at 15:40:21 UTC, Dennis Ritchie wrote:
> On Sunday, 24 May 2015 at 14:15:55 UTC, Idan Arye wrote:
>> This IS ironic, because Paul Graham claims lisp to be the most powerful, but if he have ever encounter a more powerful language he couldn't accept it is more powerful than lisp due to the very same "Blub Paradox" he describes himself.
>
> Probably! But, in my opinion, it has not yet appeared stronger language Lisp, so "Blub Paradox" is not yet threatened with Graham :)

But according to the Blub Paradox, your(Or mine. Or Paul Graham's) opinion on whether or not a stronger language than Lisp has appeared can not be trusted!
May 24, 2015
On Sunday, 24 May 2015 at 15:53:24 UTC, Idan Arye wrote:
> But according to the Blub Paradox, your(Or mine. Or Paul Graham's) opinion on whether or not a stronger language than Lisp has appeared can not be trusted!

Based on an article Graham about Blub Paradox, I can conclude that Blub Paradox programmers only acts on a certain age. It is possible that this occurs after the age of 25 years. And since I am under 25 years old, I think I can be trusted completely :)
-----
Paul Graham:
"This idea is rarely followed to its conclusion, though. After a certain age, programmers rarely switch languages voluntarily. Whatever language people happen to be used to, they tend to consider just good enough.
...
But I don't expect to convince anyone (over 25) to go out and learn Lisp."
June 11, 2015
On Saturday, 23 May 2015 at 10:58:33 UTC, Kagamin wrote:
> On Saturday, 23 May 2015 at 02:36:14 UTC, Dennis Ritchie wrote:
>> For example, the code in Python looks quite natural:
>>
>> a = [[int(j) for j in input().split()] for i in range(n)]
>>
>> About D-code, I can not say:
>>
>>>auto a = stdin
>>>         .byLine
>>>         .map!(l => l.splitter.map!(to!int).array)
>>>         .take(n);
>
> Well, list comprehension is built into language in python (and not in D), such level of support is definitely more streamlined.

Yes, but D is also possible to create a strong inclusion of list comprehensions. Here's the proof:
https://github.com/pplantinga/delight

> Probably the coolest feature in Delight is list comprehensions. Delight uses functions in std.algorithm to generate an iterable range. The syntax is similar to Python's. See the last two lines of the code above for an example.

print { i * 2 for i in 0 .. 5 where i ^ 2 less than 5 }
# prints [0, 2, 4]
1 2 3
Next ›   Last »