On 04/07/2011 03:07 AM, Ali Çehreli wrote:
Given an array of strings std.string.join() returns a single string:
import std.string;
void main() {
string[] a1 = [hello, red];
string j1 = join(a1, ); // OK
}
But in a program I need an array of mutable arrays of chars. If I join
On 04/07/2011 09:52 AM, spir wrote:
On 04/07/2011 03:07 AM, Ali Çehreli wrote:
Given an array of strings std.string.join() returns a single string:
import std.string;
void main() {
string[] a1 = [hello, red];
string j1 = join(a1, ); // OK
}
But in a program I need an array of mutable arrays
On 04/07/2011 09:52 AM, spir wrote:
On 04/07/2011 03:07 AM, Ali Çehreli wrote:
Given an array of strings std.string.join() returns a single string:
import std.string;
void main() {
string[] a1 = [hello, red];
string j1 = join(a1, ); // OK
}
But in a program I need an array of mutable arrays
Hello,
In D stdlib's ddoc the idiom $(D some d code) is constantly used. But it does
not work by me. Not only it's not interpreted, but the contents are stripped
out all together. (A *very* big bug of ddoc.)
First, I'd like to know why.
Second, there is another pattern $(D_CODE some d code),
Hello,
Is it possible to call within a D driver program library functions which are
programmed in C/C++ with the message passing interface (MPI)? I want to write
a program which makes use of the ParMetis library
(http://glaros.dtc.umn.edu/gkhome/metis/parmetis/overview).
Supposing it is
On 04/07/2011 10:20 AM, spir wrote:
Hello,
In D stdlib's ddoc the idiom $(D some d code) is constantly used. But it does
not work by me. Not only it's not interpreted, but the contents are stripped
out all together. (A *very* big bug of ddoc.)
First, I'd like to know why.
Second, there is
On Tue, 05 Apr 2011 18:46:06 +0100, Steven Schveighoffer
schvei...@yahoo.com wrote:
On Tue, 05 Apr 2011 13:24:49 -0400, Regan Heath re...@netmail.co.nz
wrote:
On Fri, 01 Apr 2011 18:23:28 +0100, Steven Schveighoffer
schvei...@yahoo.com wrote:
assert( !is null); // works on D. Try it.
spir:
I take the opprtunity to ask another question: does anyone know how to tag a
*span* of text as literal/uninterpreted (either in html or css). The issue is
pre makes a *block*, even if not inside a div or p; I desperately need
the same feature for inline pieces of code.
Try:
spir Wrote:
I get this error message:
Not the start of the UTF-8 sequence
if it's '\0', the error message is clearly incorrect, report a bug.
bearophile Wrote:
Regan Heath:
conceptually it's nice to be able to express (exists but is empty) and
(does not exist).
You may want to express that, but for the implementation of the language
those two situations are the same, because in the [] literal the ptr is null.
So I think
On 04/07/2011 12:53 PM, bearophile wrote:
spir:
I take the opprtunity to ask another question: does anyone know how to tag a
*span* of text as literal/uninterpreted (either in html or css). The issue is
pre makes a *block*, even if not inside adiv orp; I desperately need
the same feature for
On 2011-04-07 12:25, spir wrote:
On 04/07/2011 10:20 AM, spir wrote:
Hello,
In D stdlib's ddoc the idiom $(D some d code) is constantly used. But
it does
not work by me. Not only it's not interpreted, but the contents are
stripped
out all together. (A *very* big bug of ddoc.)
First, I'd like
On Wed, 06 Apr 2011 12:32:37 -0400, simendsjo simen.end...@pandavre.com
wrote:
Both the d1 and d2 homepage states the following:
There are two versions of the language:
1. D version 1 which is in maintenance mode.
2. D version 2 which is recommended for new projects.
Should it mention
On Tue, 05 Apr 2011 01:19:08 -0300, Jose Armando Garcia wrote:
dmd can compile and run to follow the code:
unittest
{
spawn(fun);
}
void fun(int i) { writeln(i); }
Which if you are lucky segfaults and if you are unlucky prints garbage!
The problem is that spawn doesn't checks
On Thu, 07 Apr 2011 02:13:16 +0200, bearophile bearophileh...@lycos.com
wrote:
Given an array of strings std.string.join() returns a single string:
import std.string;
void main() {
string[] a1 = [hello, red];
string j1 = join(a1, ); // OK
}
But in a program I need an array of
Hello,
I'm trying to use C's memmove as a tool to delete or insert a slice from/into
an array. But I cannot manage to do it: systematic segmentation fault.
What is wrong below?
import std.c.string : memmove;
// void *memmove(void *dest, const void *src, size_t n);
void moveEnd (E) (E[]
On 04/07/2011 03:32 PM, Jacob Carlborg wrote:
On 2011-04-07 12:25, spir wrote:
On 04/07/2011 10:20 AM, spir wrote:
Hello,
In D stdlib's ddoc the idiom $(D some d code) is constantly used. But
it does
not work by me. Not only it's not interpreted, but the contents are
stripped
out all
On Thu, 07 Apr 2011 13:09:05 -0400, spir denis.s...@gmail.com wrote:
Hello,
I'm trying to use C's memmove as a tool to delete or insert a slice
from/into an array. But I cannot manage to do it: systematic
segmentation fault.
What is wrong below?
import std.c.string : memmove;
// void
On 04/07/2011 01:04 AM, spir wrote:
On 04/07/2011 09:52 AM, spir wrote:
On 04/07/2011 03:07 AM, Ali Çehreli wrote:
Given an array of strings std.string.join() returns a single string:
import std.string;
void main() {
string[] a1 = [hello, red];
string j1 = join(a1, ); // OK
}
But in
Dominic Jones Wrote:
Hello,
Is it possible to call within a D driver program library functions which are
programmed in C/C++ with the message passing interface (MPI)? I want to write
a program which makes use of the ParMetis library
spir Wrote:
// If move down, compress array.
if (offset 0)
elements.length += offset;
ow, addAssign works on length?
On Thu, 07 Apr 2011 14:44:28 -0400, Kagamin s...@here.lot wrote:
spir Wrote:
// If move down, compress array.
if (offset 0)
elements.length += offset;
ow, addAssign works on length?
Since 12/09 :)
http://www.digitalmars.com/d/2.0/changelog.html#new2_037
-Steve
spir Wrote:
unittest {
string s = abc;
char[] chars = cast(char[])s;
chars ~= de;
s = cast(string) chars;
writeln(s, ' ', chars); // abcde abcde
chars[1] = 'z';
writeln(s, ' ', chars); // azcde azcde
}
s's chars are mutable ;-) So, I guess there is /really/ no reason for
Is it possible to add a particular number of days to a Date?
I have number of days since 1 Jan 2000 and I want to convert it to Date:
int days = read!int; // number of days since 1 Jan 2000
Date x = Date(2000, 1, 1);
x.add!days(days);
Unfortunately add() does not support adding days. Will it
On 04/07/2011 08:12 PM, Steven Schveighoffer wrote:
On Thu, 07 Apr 2011 13:09:05 -0400, spir denis.s...@gmail.com wrote:
Hello,
I'm trying to use C's memmove as a tool to delete or insert a slice from/into
an array. But I cannot manage to do it: systematic segmentation fault.
What is wrong
On 05.04.2011 22:04, Steven Schveighoffer wrote:
On Tue, 05 Apr 2011 15:24:46 -0400, simendsjo simen.end...@pandavre.com
wrote:
I don't know if this is an actual problem, but I don't understand the
behavior.
When one slice calls assumeSafeAppend, both slices is given control,
that is, gets the
Dominic Jones Wrote:
Hello,
Is it possible to call within a D driver program library functions which are
programmed in C/C++ with the message passing interface (MPI)? I want to write
a program which makes use of the ParMetis library
On Thu, 07 Apr 2011 15:07:02 -0400, Piotr Szturmaj bncr...@jadamspam.pl
wrote:
Is it possible to add a particular number of days to a Date?
I have number of days since 1 Jan 2000 and I want to convert it to Date:
int days = read!int; // number of days since 1 Jan 2000
Date x = Date(2000, 1,
On Thu, 07 Apr 2011 15:22:10 -0400, simendsjo simen.end...@pandavre.com
wrote:
On 05.04.2011 22:04, Steven Schveighoffer wrote:
However, a does not end on the master slice, so its capacity is 0.
Note
that technically using a[1..$] is undefined at this point since the
runtime
On Thu, 07 Apr 2011 15:22:10 -0400, simendsjo simen.end...@pandavre.com
wrote:
I'm having some problems explaining it as I'm not sure about the correct
terminology (I should have drawn some pictures..), but I'll try.
The runtime doesn't track the original array and the slices (for this
Steven Schveighoffer wrote:
On Thu, 07 Apr 2011 15:07:02 -0400, Piotr Szturmaj
bncr...@jadamspam.pl wrote:
Is it possible to add a particular number of days to a Date?
I have number of days since 1 Jan 2000 and I want to convert it to Date:
int days = read!int; // number of days since 1 Jan
Jesse Phillips:
Casting to and from string/char[] is very dangerous, even through
assumeUnique. AssumeUnique is intended to be used for returning a mutable as
immutable from a function. Casting is often a no-op for the CPU and as you
discovered removes any safety provided by the type
It turns out that using assert() that throws in a Windows application will show
an error such as this:
---
first.exe - Application Error
---
The instruction at 0x00411e6a referenced memory at 0x0044. The memory
could not be read.
Oh I'm so stupid I didn't realize my commands were outside the try
catch statement.
Everything works fine now, please disregard my silly thread. :)
Is the makefile supposed to work out-of-the-box, or is it expected that it
be edited first? Because when I do make -f win32.mak form the src dir I
just get Error: '\dm\bin\dmc' not found. Same (exact same) result if I do
make -f win32.mak D=path_to_parent_of_dm.
I know I can just hack the
Like the subject says. I try to use the makefile, but I keep getting this:
Error on line 76: expecting target : dependencies
37 matches
Mail list logo