On Sun, 14 Dec 2014 05:15:43 +
earthfront via Digitalmars-d-learn digitalmars-d-learn@puremagic.com
wrote:
On Saturday, 13 December 2014 at 06:40:41 UTC, ketmar via
Digitalmars-d-learn wrote:
auto names = File(names.txt)
.byLine!(char,char)(KeepTerminator.no, ',')
On Friday, 12 December 2014 at 04:25:01 UTC, Vlad Levenfeld wrote:
I'm trying to reduce a bug with dub dustmite feature and I must
be doing it wrong somehow, my regular dub output looks like
this:
source/experimental.d(2403): Error: struct
experimental.Product!(int[], int[]).Product no
On Wednesday, 10 December 2014 at 00:44:41 UTC, Justin Whear
wrote:
I'm trying to build components that I can dynamically link and
keep
running into an issue with sharing modules between the host and
the
pluggable components. Assuming a layout like this:
host.d -- loads components at
On Saturday, 13 December 2014 at 21:20:43 UTC, Andrey Derzhavin
wrote:
import std.stdio;
class ObjectAType {
bool ok;
this() {ok = true;}
}
void main()
{
auto a = new ObjectAType;
assert(a.ok);
destroy(a);
assert(!a.ok); // a has been destroyed.
}
This method of
On Saturday, 13 December 2014 at 19:03:42 UTC, aldanor wrote:
If I now want to have exactly the same module but with all
function declarations wrapped as described above, I have to
public import it in another module and then do some template
magic. However, it wouldn't be possible to retain
On Sunday, 14 December 2014 at 07:18:46 UTC, Rikki Cattermole
wrote:
On 14/12/2014 7:35 p.m., Suliman wrote:
Yes I used 2.0.65, but after updating compiler the situation
did not
resolved...
http://www.everfall.com/paste/id.php?apd0bfs5z4eg
Ah oh, I remember this issue from 2.064 - 2.065.
Why arent' Tuples defaultly printed as
(1, 2)
instead
Tuple!(int, int)(1, 2)
?
What's the most convenient of tweak this behaviour so I get
untyped-printing. Is there a function to convert a Tuple to into
a D parameter tuple?
On Saturday, 13 December 2014 at 23:08:13 UTC, H. S. Teoh via
Digitalmars-d-learn wrote:
Sounds like:
https://issues.dlang.org/show_bug.cgi?id=6788
T
I guess what's missing here is to make it work for ForwardRanges,
right?
There is also a branch named `develop` which at least compiles,
maybe it is usable.
how to add to dub this branch?
On Sunday, 14 December 2014 at 11:53:21 UTC, Nordlöw wrote:
Why arent' Tuples defaultly printed as
(1, 2)
instead
Tuple!(int, int)(1, 2)
?
What's the most convenient of tweak this behaviour so I get
untyped-printing. Is there a function to convert a Tuple to
into a D parameter tuple?
On Sunday, 14 December 2014 at 13:33:27 UTC, Suliman wrote:
There is also a branch named `develop` which at least
compiles, maybe it is usable.
how to add to dub this branch?
Compiling using dmd...
Linking...
OPTLINK (R) for Win32 Release 8.00.15
Copyright (C) Digital Mars 1989-2013 All
No luck, unfortunately.
On Sunday, 14 December 2014 at 13:47:21 UTC, Suliman wrote:
On Sunday, 14 December 2014 at 13:33:27 UTC, Suliman wrote:
There is also a branch named `develop` which at least
compiles, maybe it is usable.
how to add to dub this branch?
Compiling using dmd...
Linking...
OPTLINK (R) for Win32
Marc Schütz\ schue...@gmx.net writes:
On Saturday, 13 December 2014 at 21:20:43 UTC, Andrey Derzhavin wrote:
import std.stdio;
class ObjectAType {
bool ok;
this() {ok = true;}
}
void main()
{
auto a = new ObjectAType;
assert(a.ok);
destroy(a);
assert(!a.ok); // a
On Sunday, 14 December 2014 at 16:05:13 UTC, Dan Olson wrote:
Marc Schütz\ schue...@gmx.net writes:
On Saturday, 13 December 2014 at 21:20:43 UTC, Andrey
Derzhavin wrote:
import std.stdio;
class ObjectAType {
bool ok;
this() {ok = true;}
}
void main()
{
auto a = new ObjectAType;
I'm coming from this thread:
http://forum.dlang.org/thread/zzjeajhjpzhnvgxqu...@forum.dlang.org
I a nutshell:
- DUB didn't compile my dynamic library project, and Martin
linked me this issue:
https://github.com/D-Programming-Language/dub/issues/352. The
workaround is to put: dflags: [-fPIC]
I used to do it in C but in D it's giving this compile error
message:
switch case fallthrough - 'use goto case;' if intended
Here's the code:
switch(value) {
// alof of cases here
// ...
white: // regular label
case 'a': case 'c':
case 'd':
On Sun, 14 Dec 2014 18:24:39 +
MachineCode via Digitalmars-d-learn digitalmars-d-learn@puremagic.com
wrote:
I used to do it in C but in D it's giving this compile error
message:
switch case fallthrough - 'use goto case;' if intended
Here's the code:
switch(value) {
// alof of
On Sunday, 14 December 2014 at 18:27:28 UTC, ketmar via
Digitalmars-d-learn wrote:
On Sun, 14 Dec 2014 18:24:39 +
MachineCode via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com
wrote:
I used to do it in C but in D it's giving this compile error
message:
switch case fallthrough
On Sunday, 14 December 2014 at 18:41:54 UTC, MachineCode wrote:
The labels are disabled then? I find that goto case case_value
ugly and prefer goto labelName; but if it's the only way to go
let's do it
I'm not sure if it's intentionally not supported, or just an
oversight. Probably the
On Sun, 14 Dec 2014 18:48:15 +
Meta via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote:
On Sunday, 14 December 2014 at 18:41:54 UTC, MachineCode wrote:
The labels are disabled then? I find that goto case case_value
ugly and prefer goto labelName; but if it's the only way to
Nordlöw:
Why arent' Tuples defaultly printed as
(1, 2)
instead
Tuple!(int, int)(1, 2)
?
What's the most convenient of tweak this behaviour so I get
untyped-printing. Is there a function to convert a Tuple to
into a D parameter tuple?
I'd like a shorter representation of tuples
I'm writing a Matrix struct that I plan to use for some number
crunching, which will be intensive at times. So I want it to be
fast.
Will I do better by manually managing the memory myself with
malloc and free in the constructors/destructor or just using
plain D arrays?
The manual way I
What's the fastest way to append multiple elements to an array?:
Either
arr ~= e1;
arr ~= e2;
arr ~= e3;
or
arr ~= [e1,e2,e3];
or some other trick?
On 15.12.14 00:16, Nordlöw wrote:
or some other trick?
void append(T, Args...)(ref T[] arr, Args args){
arr.length += args.length;
foreach(i, e; args)
arr[$ - args.length + i] = args[i];
}
void main()
{
int[] arr = [1, 2, 3, 4, 5];
arr.append(3, 10, 14);
writeln(arr);
}
output:
On Sunday, 14 December 2014 at 23:52:15 UTC, zeljkog wrote:
void append(T, Args...)(ref T[] arr, Args args){
arr.length += args.length;
foreach(i, e; args)
arr[$ - args.length + i] = args[i];
}
Isn't this algorithm already encoded somewhere in Phobos?
On 15.12.14 01:00, Nordlöw wrote:
Isn't this algorithm already encoded somewhere in Phobos?
I don't know.
On Sunday, 14 December 2014 at 23:52:15 UTC, zeljkog wrote:
On 15.12.14 00:16, Nordlöw wrote:
or some other trick?
void append(T, Args...)(ref T[] arr, Args args){
arr.length += args.length;
foreach(i, e; args)
arr[$ - args.length + i] = args[i];
}
void main()
{
int[] arr = [1, 2,
On Sunday, 14 December 2014 at 22:14:55 UTC, Ryan wrote:
I'm writing a Matrix struct that I plan to use for some number
crunching, which will be intensive at times. So I want it to be
fast.
Will I do better by manually managing the memory myself with
malloc and free in the
On 13.12.2014 23:26, Suliman wrote:
I reread docs and understood that scope not for such case.
Next code is do what I need:
try
{
string dbname = config.getKey(dbname);
string dbpass = config.getKey(dbpass);
string dbhost = config.getKey(dbhost);
string dbport = config.getKey(dbport);
}
catch
30 matches
Mail list logo