On Sat, Dec 25, 2010 at 12:21 AM, bearophile wrote:
> Caligo:
>
>
> > Here are the measurements (average of 3 runs):
>
> Your timings lack information about the CPU, compilation switches used, and
> C++ compiler version used.
> Are those really averages?
>
>
> I used gcc version 4.4.4 to compile m
Caligo:
> I'm going to ignore the C version because it's ugly and uses a hash.
Some of the others too use a hash. You can write nice looking code in C too,
but you need more skills :-)
> I'm also going to ignore the fastest C++ version because it uses a digital
> trie
> (it's very fast but ex
If there are, say, 14 unique words then the executable compiled with GDC
doesn't always output the correct result and sometimes it gives segmentation
fault. 14 in this case would be the correct result, and 32 would not. It
seems to work fine with very small data sets, but things start to go wrong
== Quote from Caligo (iteronve...@gmail.com)'s article
> --000e0cd215b8b968a004982e3775
> Content-Type: text/plain; charset=ISO-8859-1
> This is the page that would require your attention:
> http://unthought.net/c++/c_vs_c++.html
> I'm going to ignore the C version because it's ugly and uses a hash
isRandomAccessRange at
http://digitalmars.com/d/2.0/phobos/std_range.html#isRandomAccessRange
describes what a RandomAccessRange is:
A random-access range is a bidirectional range that also offers the
primitive opIndex, OR an infinite forward range that offers opIndex. In
either case, the
A cheer for all of you!
On 12/24/2010 06:44 PM, Andrei Alexandrescu wrote:
On 12/24/2010 10:17 AM, Simen kjaeraas wrote:
Yeah, starting a bit early on this side of the pond. Enjoy the holidays!
Happy Holidays and a Happy New Year everyone! 2010 has been a great year
for this community. We hav
This is the page that would require your attention:
http://unthought.net/c++/c_vs_c++.html
I'm going to ignore the C version because it's ugly and uses a hash. I'm
also going to ignore the fastest C++ version because it uses a digital trie
(it's very fast but extremely memory hungry; the complexi
On 12/24/2010 12:35 PM, Caligo wrote:
ok, thanks. And just a reminder that there is nothing about this on the
errata.
Fixed: http://www.erdani.com/tdpl/errata/
Thanks!
Andrei
On 12/24/10 12:44 PM, Gour wrote:
On Fri, 24 Dec 2010 11:44:54 -0600
"Andrei" == Andrei Alexandrescu wrote:
Andrei> ...and last but not least TDPL sales are up in December
Andrei> (countering an overall decrease of technical book sales during
Andrei> this month).
You may check 3-star revie
Adam D. Ruppe wrote:
In short, ease them into it and reassure them that it is a low risk,
beneficial change. Start small, with something like helper scripts
before trying to introduce it into a bigger project, so they know
it can and has done real work for them before.
Thanks for letting us kno
On Fri, 24 Dec 2010 11:44:54 -0600
>> "Andrei" == Andrei Alexandrescu wrote:
Andrei> ...and last but not least TDPL sales are up in December
Andrei> (countering an overall decrease of technical book sales during
Andrei> this month).
You may check 3-star review on UK's Amazon. I left reply, bu
Trass3r wrote:
>> Yup. I use D almost exclusively in my professional work
> Wow how did you do that?
> People around here don't even know D exists.
One thing that helps me a lot is I'm an independent contractor,
so as long as I give results, I have quite a bit of freedom in
the specifics.
Neverth
ok, thanks. And just a reminder that there is nothing about this on the
errata.
On Fri, Dec 24, 2010 at 11:51 AM, Andrei Alexandrescu <
seewebsiteforem...@erdani.org> wrote:
> On 12/24/2010 11:35 AM, Caligo wrote:
>
>> I've been following the examples in the book and on page 8 we have this:
>>
sybrandy Wrote:
> On 12/24/2010 11:17 AM, Simen kjaeraas wrote:
> > Yeah, starting a bit early on this side of the pond. Enjoy the holidays!
> >
> Well, considering most of us probably won't be checking the newsgroup
> tomorrow unless we have absolutely nothing better to do (Sorry to you
> all),
On 12/24/2010 11:35 AM, Caligo wrote:
I've been following the examples in the book and on page 8 we have this:
import std.stdio;
import std.string;
void main(){
size_t[string] dictionary;
foreach(line; stdin.byLine()){
foreach(word; splitter(strip(line))){
On 12/24/2010 10:17 AM, Simen kjaeraas wrote:
Yeah, starting a bit early on this side of the pond. Enjoy the holidays!
Happy Holidays and a Happy New Year everyone! 2010 has been a great year
for this community. We have many new members, increased activity overall
(even quality of trolling ha
I've been following the examples in the book and on page 8 we have this:
import std.stdio;
import std.string;
void main(){
size_t[string] dictionary;
foreach(line; stdin.byLine()){
foreach(word; splitter(strip(line))){
if(word in dictionary) conti
On 12/24/2010 11:17 AM, Simen kjaeraas wrote:
Yeah, starting a bit early on this side of the pond. Enjoy the holidays!
Well, considering most of us probably won't be checking the newsgroup
tomorrow unless we have absolutely nothing better to do (Sorry to you
all), starting early is a good idea
Yeah, starting a bit early on this side of the pond. Enjoy the holidays!
--
Simen
Anyone has had a similar issue?
http://forums.codeblocks.org/index.php?topic=13923.0
Andrei
This has been reported in the bugzilla. remove should return a bool
but it is currently void.
On 12/24/10, Mariusz Gliwiński wrote:
> When i compile:
> type[key2][key1] assocArray1;
> assocArray1[key1].remove(key2);
>
> everything is ok, but building
> type[key2][key1] assocArray1;
> return (asso
Am 24.12.2010 10:41, schrieb spir:
On Thu, 23 Dec 2010 23:18:06 -0600
Andrei Alexandrescu wrote:
module testmodule;
import std.string : split;
import std.stdio : writeln;
string modulename = split(.stringof)[1];
void main()
{
writeln(modulename);
}
What the... I didn't know you can
Yup. I use D almost exclusively in my professional work
Wow how did you do that?
People around here don't even know D exists.
On 12/24/2010 07:18 AM, Andrei Alexandrescu wrote:
What the... I didn't know you can do that. Thanks for the tip!
Andrei
It's great we can do that. Though it doesn't make D's compile-time
introspection much easier to work with. For example, look how we get
overloads of a function in the cur
On Thu, 23 Dec 2010 23:18:06 -0600
Andrei Alexandrescu wrote:
> > module testmodule;
> >
> > import std.string : split;
> > import std.stdio : writeln;
> >
> > string modulename = split(.stringof)[1];
> >
> > void main()
> > {
> > writeln(modulename);
> > }
>
> What the... I didn't know y
spir:
> Note: Iota is right-side exclusive like i..j . (I've just been caught by this
> trap ;-)
This is for the better, to increase language consistency (as in Python).
In APL (where the iota name comes from) the semantics was different:
i 5 ==> 1, 2, 3, 4, 5
Integer ranges are very common, so
Another post about Phobos usability. Again the relative code is a rosettacode
Task:
>Assume we have a collection of numbers, and want to find the one with the
>largest minimal prime factor (that is, the one that contains relatively large
>factors). To speed up the search, the factorization shou
27 matches
Mail list logo