On Friday, 15 November 2013 at 22:22:32 UTC, Jacek Furmankiewicz
wrote:
Sohow does Facebook handle it with their new D code?
No GC at all, explicit memory management?
AFAWK, Facebook doesn't use D for its core business yet, only for
buiding tools. OTOH, Andrei has been working hard on
On Tuesday, 5 February 2013 at 20:10:37 UTC, bearophile wrote:
Jos van Uden:
I'll give it a shot if you like. The RCRPG I'd like to try
first.
I have already partially written those:
Partial translation of rcrpg-Python:
http://codepad.org/SflrKqbT
Partial translation of
On Tuesday, 1 May 2012 at 02:04:03 UTC, Ary Manzana wrote:
On 5/1/12 2:44 AM, simendsjo wrote:
On Mon, 30 Apr 2012 20:55:45 +0200, Ary Manzana
a...@esperanto.org.ar
wrote:
Looking at the code of mysql.d I see a big switch with many
cases like
case 0x01: // TINYINT. But then there's the
On Tuesday, 1 May 2012 at 08:40:27 UTC, SomeDude wrote:
On Tuesday, 1 May 2012 at 02:04:03 UTC, Ary Manzana wrote:
On 5/1/12 2:44 AM, simendsjo wrote:
On Mon, 30 Apr 2012 20:55:45 +0200, Ary Manzana
a...@esperanto.org.ar
wrote:
Looking at the code of mysql.d I see a big switch with many
On Saturday, 28 April 2012 at 17:42:42 UTC, Adam D. Ruppe wrote:
On Saturday, 28 April 2012 at 16:19:37 UTC, simendsjo wrote:
As it resides in this big misc repository, does it have many
dependecies?
It depends on the database.d module in there too. (database.d
provides the base interface and
Hi all,
Not owning TDPL right now, I feel I could learn the language much
more quickly with it. But Andrei hinted somewhere that there
would be a new edition of his book. Should I wait for it ?
On Wednesday, 25 April 2012 at 17:37:33 UTC, H. S. Teoh wrote:
First of all, differences as small as 20ms really should be
considered
as background noise. The exact measurements depend on a lot of
system-specific and environment-specific factors, such as OS
memory
usage, CPU cache behaviour,
On Friday, 27 April 2012 at 14:14:37 UTC, Steven Schveighoffer
wrote:
Have you tried measuring the code timings just inside main
instead of the full execution of the program including runtime
startup and shutdown?
-Steve
OK, it seems you are right. It turns out using
Measure-Command{...}
On Wednesday, 25 April 2012 at 15:35:44 UTC, Steven Schveighoffer
wrote:
On Wed, 25 Apr 2012 07:27:29 -0400, SomeDude
lovelyd...@mailmetrash.com wrote:
On Wednesday, 25 April 2012 at 08:34:40 UTC, SomeDude wrote:
Noone reproduces this ?
On my linux box, it runs in about 580ms
On Saturday, 21 April 2012 at 23:24:57 UTC, Jay Norwood wrote:
While playing with sorting the unzip archive entries I tried
use of the last example in
http://dlang.org/phobos/std_algorithm.html#sort
std.algorithm.sort!(toLower(a.name)
Sorry for the noob questions, but
import std.stdio;
struct Foo {
int x;
}
void main() {
auto array = new Foo[10];
auto i = array.length;
foreach(Foo f; array) { f.x = --i; write(f.x);}
writeln();
foreach(Foo f; array) { write(f.x);}
}
gives me:
PS
On Sunday, 22 April 2012 at 21:50:32 UTC, Dmitry Olshansky wrote:
Omagad, thank you, too much Java is bd for your brains.
Le 19/04/2012 05:36, bearophile a écrit :
Brad Anderson:
You can popFront() for as long as you want well passed the length.
Obviously popping off the front of a zero length range isn't valid but
I would have expected a range violation to occur rather than it to
silently continuing the series
Le 19/04/2012 10:07, Jonathan M Davis a écrit :
Having an assertion may be desirable, but the bug is in the usage of iota,
not
iota itself. At best, the assertion would help indicate that the caller has a
bug. It's exactly the same as doing something like
for(size_t i = 3; cond; --i) {}
Le 19/04/2012 05:04, Michaël Larouche michael.larou...@gmail.com a
écrit :
Reading the bug thread, I am wondering why my template worked in a
struct but not inside a class.
Anyway, I decided to move my mixin outside the struct/class and abuse
UFCS instead. Now everything works like a charm
Le 19/04/2012 11:11, Jonathan M Davis a écrit :
On Thursday, April 19, 2012 10:14:39 Somedude wrote:
Le 19/04/2012 10:07, Jonathan M Davis a écrit :
Having an assertion may be desirable, but the bug is in the usage of iota,
not iota itself. At best, the assertion would help indicate
On Thursday, 19 April 2012 at 11:38:39 UTC, Steven Schveighoffer
wrote:
On Thu, 19 Apr 2012 04:07:00 -0400, Jonathan M Davis
jmdavisp...@gmx.com wrote:
Having an assertion may be desirable, but the bug is in the
usage of iota, not
iota itself.
Yes, and iota should detect that bug with an
I'm going through a number of bug reports, trying to reproduce the
problems and see what can be closed easily (i.e non reproduced, correct
behaviour, etc), and I just came accross
http://d.puremagic.com/issues/show_bug.cgi?id=7326 titled
write interprets enum with byte backing type as a character
On Wednesday, 18 April 2012 at 19:43:50 UTC, Paul D. Anderson
wrote:
SomeDude: Your outline and especially your emphasis on what a
rank beginner needs to know is very good.
Would you consider writing it up yourself? Not the whole thing,
maybe but the beginner info and the compiler/linker
Le 17/04/2012 16:07, Ali Çehreli a écrit :
On 04/17/2012 12:42 AM, Somedude wrote:
Sorry for hijacking this thread, but since you're around, I hope you'll
see this message. As a D beginner, I'm browsing through your book.
I wanted to tell you that there is something essential missing
Le 18/04/2012 10:26, Somedude a écrit :
Yes, I think that you have a lot of valuable information, but the
organization is lacking. The advanced chapters look good, but the first
beginner chapters can be .
... largely improved.
Le 18/04/2012 12:04, Jacob Carlborg a écrit :
I can't find any easy or friendly get started hacking on Phobos page,
so can anyone advise how to get set up correctly?
I've thought about this several times, we need one badly.
I've just created a page in the Wiki with the posts here:
Le 18/04/2012 12:41, maarten van damme a écrit :
That's a very odd design. Making it work when instantiating a new struct
of that type but not inline. Anyway, test(3,5) works perfect, thank you.
It's not odd at all. You append a structure, not an array.
{3,5} is for array initialization, it's
Le 18/04/2012 14:19, Paul a écrit :
I think there should be a learn.newbie forum. After I post my little
problems of a sample code snippet that won't compile, I read some of the
other threads. There are those c/c++ programmers learning the ins/outs
of D and then there are the greenies like
Le 18/04/2012 14:34, Paul a écrit :
I bought the book and am trying to patiently learn this language. I
follow various tutorials here and around the web that frequently won't
compile. I suspect it has something to do with D1/D2/Phobos/Tango and
not just really poor unvetted tutorials. It
Le 18/04/2012 05:15, Joseph Rushton Wakeling a écrit :
On 13/04/12 10:04, Dmitry Olshansky wrote:
OK, I'll see what I can do. I'd like to discuss and refine the design a
bit further before making any pull request -- should I take things over
to the Phobos mailing list for this ... ?
I'm no
On Tuesday, 17 April 2012 at 12:11:21 UTC, David wrote:
In this case, I had to type:
rdmd -unittest --main test.d
Without the --main, I would get linker errors, and couldn't
find the
reason for these errors. Happily, someone here explained me
that the
effect of the --main flag was to insert a
On Tuesday, 17 April 2012 at 00:04:16 UTC, Michaël Larouche
wrote:
My template works with a struct but when I try to mixin my
template in a class, I get compile error because
T.tupleof.length returns 0.
Here's the whole code:
http://ideone.com/UR6YU
For what it's worth, dmd 2.059 (it seems
On Wednesday, 18 April 2012 at 16:36:39 UTC, bearophile wrote:
Ali:
That a thousandth time I have made that mistake and still have
not learned. :( Yes, .nan may not be compared with any other
value, including .nan.
Today I'll present an enhancement request to remove this
problem from D.
On Wednesday, 18 April 2012 at 18:18:44 UTC, Ali Çehreli wrote:
On 04/18/2012 10:13 AM, Jonathan M Davis wrote:
It's by design. An enhancement request is a waste of time.
Comparisons with
NaN _always_ return false regardless of what they're compared
against - even
NaN. It's not going to
Le 17/04/2012 02:01, Ali Çehreli a écrit :
On 04/16/2012 04:56 PM, darkstalker wrote:
i have this example program:
---
void main()
{
int[3] a;
foreach (p; a)
p = 42;
writeln(a);
}
---
after running it, i expect to get [42, 42, 42] but instead i get [0, 0,
0] (i know that you can do
Le 17/04/2012 08:40, Russel Winder a écrit :
On Mon, 2012-04-16 at 21:03 +0200, Somedude wrote:
[...]
Issue 7919
http://d.puremagic.com/issues/show_bug.cgi?id=7919
Thanks.
Le 17/04/2012 12:19, Mike Parker a écrit :
On 4/17/2012 4:42 PM, Somedude wrote:
Ali
Hi Ali,
Sorry for hijacking this thread, but since you're around, I hope you'll
see this message. As a D beginner, I'm browsing through your book.
I wanted to tell you that there is something essential
Le 17/04/2012 09:30, Somedude a écrit :
Anyway, I think I'll add this simple piece of info somewhere in the
wiki. I've already cleaned it up a little.
Ok, here it is: http://prowiki.org/wiki4d/wiki.cgi?HowTo/UnitTests
Le 15/04/2012 20:40, Russel Winder a écrit :
On Sun, 2012-04-15 at 16:04 +0200, Artur Skawina wrote:
[...]
(my old GDC needs the explicit function, no idea if newer
frontends still require that)
OK, works for me with GDC as well, DMD is broken! I'll file a bug
report.
Did you file a bug
I'm trying to compile a D source on win32 with DMD 2.059, and I get this:
PS E:\DigitalMars\dmd2\samples rdmd xinoksort.d
OPTLINK (R) for Win32 Release 8.00.12
Copyright (C) Digital Mars 1989-2010 All rights reserved.
http://www.digitalmars.com/ctg/optlink.html
OPTLINK : Warning 23: No Stack
Le 16/04/2012 21:51, Andrej Mitrovic a écrit :
On 4/16/12, Somedude lovelyd...@mailmetrash.com wrote:
OPTLINK : Warning 134: No Start Address
This means you're missing a void main or int main function. You can
pass --main to rdmd to add it automatically (useful when e.g.
unittesting).
All
Le 15/04/2012 09:23, ReneSac a écrit :
On Sunday, 15 April 2012 at 02:56:21 UTC, Joseph Rushton Wakeling wrote:
On Saturday, 14 April 2012 at 19:51:21 UTC, Joseph Rushton Wakeling
wrote:
GDC has all the regular gcc optimization flags available IIRC. The
I notice the 2D array is declared
Le 15/04/2012 20:40, Russel Winder a écrit :
On Sun, 2012-04-15 at 16:04 +0200, Artur Skawina wrote:
[...]
(my old GDC needs the explicit function, no idea if newer
frontends still require that)
OK, works for me with GDC as well, DMD is broken! I'll file a bug
report.
It works here (DMD
Le 15/04/2012 23:33, Ashish Myles a écrit :
On Sun, Apr 15, 2012 at 5:16 PM, Somedude lovelyd...@mailmetrash.com wrote:
Le 15/04/2012 09:23, ReneSac a écrit :
On Sunday, 15 April 2012 at 02:56:21 UTC, Joseph Rushton Wakeling wrote:
On Saturday, 14 April 2012 at 19:51:21 UTC, Joseph Rushton
Le 15/04/2012 23:41, Somedude a écrit :
Le 15/04/2012 23:33, Ashish Myles a écrit :
On Sun, Apr 15, 2012 at 5:16 PM, Somedude lovelyd...@mailmetrash.com wrote:
Oh right, sorry for this. It's a bit confusing.
Now apart from comparing the generated asm, I don't see.
Le 14/04/2012 21:53, q66 a écrit :
On Saturday, 14 April 2012 at 19:05:40 UTC, ReneSac wrote:
I have this simple binary arithmetic coder in C++ by Mahoney and
translated to D by Maffi. I added notrow, final and pure and
GC.disable where it was possible, but that didn't made much
difference.
Le 14/04/2012 18:04, Russel Winder a écrit :
I thought the following would terminate gracefully having printed 0..9
in some (random) order:
#! /usr/bin/env rdmd
import std.algorithm ;
import std.range ;
import std.stdio ;
import
On Thursday, 12 April 2012 at 16:59:31 UTC, Joseph Rushton
Wakeling wrote:
On 12/04/12 16:45, Joseph Rushton Wakeling wrote:
What I thought I'd do is implement some clever algorithms for
random sampling
which I've already done in a C based on the GNU Scientific
Library.
I noticed that there
Le 09/11/2011 14:15, Trass3r a écrit :
2. what is your opinion about public import ? In C++, hidden or
implicit #includes is a common source of compilation problems (order
of #includes), I tend to think it's a bad thing.
It can be quite useful. I use it often for C library wrappers. As soon
as
Hello,
what is the currently DB API considered usable today ?
http://prowiki.org/wiki4d/wiki.cgi?DatabaseBindings#ODBC
d-dbapi looked quite decent, but the source code is no longer available :(
Thank you
Dude
Le 09/11/2011 14:50, Jacob Carlborg a écrit :
2. what is your opinion about public import ? In C++, hidden or
implicit #includes is a common source of compilation problems (order
of #includes), I tend to think it's a bad thing.
Sometimes public imports are useful. It's possible to emulate
Hello,
When I display the dependencies with dmd -deps=depends, I see that
simply importing std.stdio imports dozens of modules, among which
std.ranges, std.datetime, std.c.windows.winsock, std.regex, etc
In fact, the depends file is 433 lines long.
I noticed that std.string imports quite a lot
Le 09/11/2011 10:14, Somedude a écrit :
My question is: how do we know if std.range, std.regex, std.traits and
std.algorithm are spurious imports or if we can (and threfore should)
remove them safely from std.string ?
Dude
I meant:
how do we know if std.range, std.regex, std.traits
Le 09/11/2011 13:15, Jacob Carlborg a écrit :
Phobos contains a lot of templates and if a template isn't instantiated
it won't be compiled. Meaning there can be hidden compile errors if you
start to remove imports and they will not show until a template that
uses something from the import is
50 matches
Mail list logo