On 25.11.2013 22:01, Frustrated wrote:
set PATH=D:\Dlang\dmd2\windows\\bin;C:\Program Files (x86)\Microsoft
SDKs\Windows\v7.0A\\\bin;%PATH%
set LIB="C:\Program Files (x86)\Windows Kits\8.1\Lib\win8\um\x86"
echo. > D:\DLang\Projects\Tests\RTest1\RTest1\Debug DMD
Win32\RTest1.build.lnkarg
echo "
On Tuesday, 26 November 2013 at 06:40:24 UTC, Ali Çehreli wrote:
On 11/25/2013 09:11 PM, Frustrated wrote:
> On Tuesday, 26 November 2013 at 05:03:45 UTC, Ali Çehreli
wrote:
>> On 11/25/2013 04:27 PM, Frustrated wrote:
>>> I have some type of automatically generated interface using
a mixin an
>>
On 2013-11-26 01:27, Frustrated wrote:
I have some type of automatically generated interface using a mixin an
would like to extend them after they are generated:
mixin(GenerateMyInterface!(...));
... ...
Since you're generating the interface in the first place, can't you
generate
On 11/07/2013 10:05 PM, Philippe Sigaud wrote:
On Fri, Nov 8, 2013 at 5:55 AM, Ross Hays wrote:
And let me say that I really do like that this works in D. I can't imagine
doing anything like this in C++ (which is what I used primarily in the
past).
The only reason I joke about it being useles
On Monday, 25 November 2013 at 23:44:26 UTC, Jonathan M Davis
wrote:
On Monday, November 25, 2013 22:08:37 monarch_dodra wrote:
On Monday, 25 November 2013 at 21:04:43 UTC, Jesse Phillips
wrote:
> On Monday, 25 November 2013 at 19:38:44 UTC, Jack Applegame
>
> wrote:
>> This isn't compiles. B
On 11/25/2013 09:11 PM, Frustrated wrote:
> On Tuesday, 26 November 2013 at 05:03:45 UTC, Ali Çehreli wrote:
>> On 11/25/2013 04:27 PM, Frustrated wrote:
>>> I have some type of automatically generated interface using a mixin an
>>> would like to extend them after they are generated:
>>>
>>>
On Tuesday, November 26, 2013 01:27:49 Frustrated wrote:
> I have some type of automatically generated interface using a
> mixin an would like to extend them after they are generated:
>
> mixin(GenerateMyInterface!(...));
>
> ... MyInterface which was generated above> ...
>
> Is this at all pos
On Monday, November 25, 2013 18:34:30 Spott wrote:
> Why is rhs a purely runtime argument? I would think it would be
> known at compile time.
Function arguments are runtime entities, not compile-time entities and
therefore cannot be used in places where a compile-time entity is required.
e.g. th
On Tuesday, 26 November 2013 at 05:13:00 UTC, Shammah Chancellor
wrote:
What is the practical purpose of such a thing?
-Shammah
The two cases I can think of are:
1. To define a set of supported handlers which can be passed in
as a parameter to a call. Rather than writing a switch in your
me
On Monday, 25 November 2013 at 23:25:05 UTC, Jeremy DeHaan wrote:
Order matters, no matter the language. See
http://stackoverflow.com/a/409470/1924406
Thanks!
That's a great link. It cleared up quite a lot.
Note that this also applies to Windows with MinGW (and, I assume,
Cygwin). It's a
On Tuesday, 26 November 2013 at 05:12:00 UTC, Frustrated wrote:
On Tuesday, 26 November 2013 at 05:03:45 UTC, Ali Çehreli wrote:
On 11/25/2013 04:27 PM, Frustrated wrote:
I have some type of automatically generated interface using a
mixin an
would like to extend them after they are generated:
On 2013-11-25 23:32:25 +, Chris Williams said:
Is there any way to do something like this?
import std.stdio;
enum Foo : void function() {
WOMBAT = () {writeln("Wombat");}
}
void doStuff(Foo f) {
f();
}
int main() {
doStuff( Foo.WOMBAT );
return 0;
On Tuesday, 26 November 2013 at 05:03:45 UTC, Ali Çehreli wrote:
On 11/25/2013 04:27 PM, Frustrated wrote:
I have some type of automatically generated interface using a
mixin an
would like to extend them after they are generated:
mixin(GenerateMyInterface!(...));
... MyInterface
whic
On 11/25/2013 04:27 PM, Frustrated wrote:
I have some type of automatically generated interface using a mixin an
would like to extend them after they are generated:
mixin(GenerateMyInterface!(...));
... ...
Is this at all possible?
Just inherit from it:
interface MyInterface
{
On Tuesday, 26 November 2013 at 00:27:25 UTC, IgorStepanov wrote:
You can write
enum Foo : void function()
{
WOMBAT = function void () {writeln("Wombat");}
}
or
enum Foo
{
WOMBAT = function void () {writeln("Wombat");}
}
`() {writeln("Wombat");}` literal recognized by compiler as
del
On Tuesday, 26 November 2013 at 01:31:11 UTC, bearophile wrote:
Craig Dillabaugh:
What do you mean by an 'immutable' data structure. The linked
article talks about Persistent data structures. Are these the
same thing?
When I saw "Immutable" I figured it didn't support
insertion/deletion -
Craig Dillabaugh:
While I am at it, I might as well ask another question. How is
it that your 'insert' function is const? I thought I
understood const, but apparently not!
The D code I have linked is not yet working, so don't read too
much in it.
But you can add items to an immutable tree,
Craig Dillabaugh:
What do you mean by an 'immutable' data structure. The linked
article talks about Persistent data structures. Are these the
same thing?
When I saw "Immutable" I figured it didn't support
insertion/deletion - which would sort eliminate the need for a
Red-Black tree anyway
On Tuesday, 26 November 2013 at 01:21:49 UTC, Craig Dillabaugh
wrote:
On Tuesday, 26 November 2013 at 00:28:34 UTC, bearophile wrote:
clip
Bye,
bearophile
What do you mean by an 'immutable' data structure. The linked
article talks about Persistent data structures. Are these the
same thin
On Tuesday, 26 November 2013 at 00:28:34 UTC, bearophile wrote:
Bartosz Milewski has written the second article about immutable
data structures in C++11, this time about Red-Black trees:
http://bartoszmilewski.com/2013/11/25/functional-data-structures-in-c-trees/
The C++11 code with few small c
Hi guys I'm trying out Mono-D with Monodevelop 4.2 and the
compiler seems to build ok but the debugger says Error 1.
Here is the sample Hello world code
--
import std.stdio;
void main()
{
writeln("Hello World!");
}
I have some type of automatically generated interface using a
mixin an would like to extend them after they are generated:
mixin(GenerateMyInterface!(...));
... MyInterface which was generated above> ...
Is this at all possible?
Bartosz Milewski has written the second article about immutable
data structures in C++11, this time about Red-Black trees:
http://bartoszmilewski.com/2013/11/25/functional-data-structures-in-c-trees/
The C++11 code with few small changes (like using "enum class"
instead of "enum"):
http://code
On Monday, 25 November 2013 at 23:32:27 UTC, Chris Williams wrote:
Is there any way to do something like this?
import std.stdio;
enum Foo : void function() {
WOMBAT = () {writeln("Wombat");}
}
void doStuff(Foo f) {
f();
}
int main() {
doStuff( Foo.WOMBAT );
On Monday, 25 November 2013 at 20:09:20 UTC, Frustrated wrote:
On Monday, 25 November 2013 at 17:44:43 UTC, Jeremy DeHaan
wrote:
On Monday, 25 November 2013 at 13:49:58 UTC, Frustrated wrote:
I had an old dmd2 setup that worked perfectly. I recently
installed VS2013, SDK 8, DMD 2.064.2, and VS
On Monday, November 25, 2013 22:08:37 monarch_dodra wrote:
> On Monday, 25 November 2013 at 21:04:43 UTC, Jesse Phillips wrote:
> > On Monday, 25 November 2013 at 19:38:44 UTC, Jack Applegame
> >
> > wrote:
> >> This isn't compiles. Bug?
> >>
> >> import std.range;
> >> class Foo {}
> >> void mai
Is there any way to do something like this?
import std.stdio;
enum Foo : void function() {
WOMBAT = () {writeln("Wombat");}
}
void doStuff(Foo f) {
f();
}
int main() {
doStuff( Foo.WOMBAT );
return 0;
}
Currently, I get the errors:
hello.d(4): Error:
On Monday, 25 November 2013 at 20:29:19 UTC, Antoche wrote:
On Monday, 25 November 2013 at 18:19:57 UTC, Jeremy DeHaan
wrote:
Hey all,
New to Linux, so I wanted to double check something. I have a
C shared library and a D static library. The D static library
uses functions from the C library.
On 2013-11-25 14:08:53 +, Dicebot said:
Sending immutable classes currently does not work because of
https://d.puremagic.com/issues/show_bug.cgi?id=7069 (and has never
worked despite being intended).
Can you send immutable struct references?
On Monday, 25 November 2013 at 21:04:43 UTC, Jesse Phillips wrote:
On Monday, 25 November 2013 at 19:38:44 UTC, Jack Applegame
wrote:
This isn't compiles. Bug?
import std.range;
class Foo {}
void main() {
immutable(Foo)[] a;
immutable(Foo)[] b;
auto c = chain(a, b).lengt
I think I remember when setting up Visual D I went in and had to
add some path to the library folders or something. Maybe that has
to do with it?
The issue only happens when I import the library I've created
into the project so it probably is a configuration issue within
Visual D.
e.g., Cre
On Monday, 25 November 2013 at 19:38:44 UTC, Jack Applegame wrote:
This isn't compiles. Bug?
import std.range;
class Foo {}
void main() {
immutable(Foo)[] a;
immutable(Foo)[] b;
auto c = chain(a, b).length;
}
http://dpaste.dzfl.pl/71272a10
Seems like a bug to me. If Fo
On Monday, 25 November 2013 at 11:48:06 UTC, Shammah Chancellor
wrote:
On 2013-11-25 06:03:27 +, Antoche said:
The following code compiles but doesn't work as expected:
import std.stdio;
import std.concurrency;
class A
{
this() immutable {}
}
void m
On Monday, 25 November 2013 at 19:38:44 UTC, Jack Applegame wrote:
This isn't compiles. Bug?
Yes, and a trivially trivial bug at that. File it and I'll fix it.
I think I remember when setting up Visual D I went in and had to
add some path to the library folders or something. Maybe that has
to do with it?
The issue only happens when I import the library I've created
into the project so it probably is a configuration issue within
Visual D.
e.g., Cre
On Monday, 25 November 2013 at 18:19:57 UTC, Jeremy DeHaan wrote:
Hey all,
New to Linux, so I wanted to double check something. I have a C
shared library and a D static library. The D static library
uses functions from the C library. On Windows, it didn't matter
what order I linked the .libs
In gdb, for C/C++ programs, 'catch throw' and 'catch catch' allow
the user to break on exception throwing and exception catching,
respectively. See
https://sourceware.org/gdb/onlinedocs/gdb/Set-Catchpoints.html
This doesn't seem to work in D. The only way I've been able to
catch an exception in t
On Monday, 25 November 2013 at 17:44:43 UTC, Jeremy DeHaan wrote:
On Monday, 25 November 2013 at 13:49:58 UTC, Frustrated wrote:
I had an old dmd2 setup that worked perfectly. I recently
installed VS2013, SDK 8, DMD 2.064.2, and VS 3.37 on a fresh
system.
I copied the project to the HD, updat
On 11/25/2013 10:52 AM, Uranuz wrote:
> In my programme I want to make set of immutable struct objects, that
> will be initialazed at startup in shared static this() constructor. But
> using the folowing code I have compilation error. I think there is a
> problem with associative array.
>
> For u
*doesn't compile
This isn't compiles. Bug?
import std.range;
class Foo {}
void main() {
immutable(Foo)[] a;
immutable(Foo)[] b;
auto c = chain(a, b).length;
}
http://dpaste.dzfl.pl/71272a10
On 25.11.2013 14:49, Frustrated wrote:
I had an old dmd2 setup that worked perfectly. I recently installed
VS2013, SDK 8, DMD 2.064.2, and VS 3.37 on a fresh system.
I copied the project to the HD, updated the sc.ini files and tried to
compile. Basic projects would compile but my old projects
25-Nov-2013 22:19, Jeremy DeHaan пишет:
Hey all,
New to Linux, so I wanted to double check something. I have a C shared
library and a D static library. The D static library uses functions from
the C library. On Windows, it didn't matter what order I linked the
.libs in and it always compiled fin
In my programme I want to make set of immutable struct objects,
that will be initialazed at startup in shared static this()
constructor. But using the folowing code I have compilation
error. I think there is a problem with associative array.
For usual array we have .idup property that returns
On Monday, 25 November 2013 at 17:57:21 UTC, Dicebot wrote:
On Monday, 25 November 2013 at 17:38:00 UTC, Lemonfiend wrote:
&_this
vs
_this.ptr
I had thought those would give the same result, but apparently
not?
Think about slice as a struct with two fields - data pointer
and data length. `&
Hey all,
New to Linux, so I wanted to double check something. I have a C
shared library and a D static library. The D static library uses
functions from the C library. On Windows, it didn't matter what
order I linked the .libs in and it always compiled fine. On
Linux, however, I have to link
On Monday, 25 November 2013 at 17:38:00 UTC, Lemonfiend wrote:
&_this
vs
_this.ptr
I had thought those would give the same result, but apparently
not?
Think about slice as a struct with two fields - data pointer and
data length. `&slice` gives pointer to struct itself, `slice.ptr`
yields da
On Monday, 25 November 2013 at 13:49:58 UTC, Frustrated wrote:
I had an old dmd2 setup that worked perfectly. I recently
installed VS2013, SDK 8, DMD 2.064.2, and VS 3.37 on a fresh
system.
I copied the project to the HD, updated the sc.ini files and
tried to compile. Basic projects would com
On Thursday, 21 November 2013 at 19:21:10 UTC, Ali Çehreli wrote:
On 11/21/2013 07:22 AM, Lemonfiend wrote:
> I'm wondering if it's possible to have a struct in D which
uses the same
> pointer and memory as returned by the extern C function.
> This would allow me to manipulate and use the C stru
On Thursday, 21 November 2013 at 07:23:09 UTC, Jonathan M Davis
wrote:
On Wednesday, November 20, 2013 23:49:42 Spott wrote:
I've been screwing around with templates lately, and I'm
attempting to figure out why the following won't compile:
struct value
{
int a;
const auto
On Thursday, 21 November 2013 at 06:48:40 UTC, qznc wrote:
On Wednesday, 20 November 2013 at 22:49:42 UTC, Spott wrote:
I've been screwing around with templates lately, and I'm
attempting to figure out why the following won't compile:
struct value
{
int a;
const auto
opBinary(s
Sending immutable classes currently does not work because of
https://d.puremagic.com/issues/show_bug.cgi?id=7069 (and has
never worked despite being intended).
I had an old dmd2 setup that worked perfectly. I recently
installed VS2013, SDK 8, DMD 2.064.2, and VS 3.37 on a fresh
system.
I copied the project to the HD, updated the sc.ini files and
tried to compile. Basic projects would compile but my old
projects would give errors either:
user32.lib
On 25/11/13 12:00, bearophile wrote:
Is this acceptable?
Actually, your suggestion made me realize I could do even better -- here's the
patch I came up with in the end:
https://github.com/WebDrake/Dgraph/commit/34d6cfacee928b74d084cff7c2f6c438f5144436
The arrays in question are only ever ass
On 2013-11-25 10:34:39 +, Namespace said:
On Monday, 25 November 2013 at 03:13:48 UTC, Shammah Chancellor wrote:
On 2013-11-25 00:08:50 +, Namespace said:
I love this feature, but I'm unsure how it works. Can someone explain
me, how the compiler deduce that he should read 4 bytes for
On 2013-11-25 06:03:27 +, Antoche said:
The following code compiles but doesn't work as expected:
import std.stdio;
import std.concurrency;
class A
{
this() immutable {}
}
void main()
{
auto tid = spawn( &fooBar, thisTid );
This D1 entry needs an update:
http://rosettacode.org/wiki/Metered_concurrency#D
Is someone willing to update it?
import std.stdio, core.thread, std.c.time;
class Semaphore {
private int lockCnt, maxCnt;
this(in int count) {
maxCnt = lockCnt = count;
}
void acquire()
On 25/11/13 12:00, bearophile wrote:
Is this acceptable?
struct Foo {
auto bar() {
const result = ...;
return result;
}
}
Could work, nice thought :-) I was hoping for something in the function
signature rather than internally, though.
Joseph Rushton Wakeling:
struct Foo
{
const(auto) bar()
{
// modifies internal data of Foo
// but returns a const type
}
}
Is this acceptable?
struct Foo {
auto bar() {
const result = ...;
return resu
The following code used to compile with DMD 2.063.2:
import std.typecons;
struct Foo
{
alias Tuple!(int) NEW_ARGS;
NEW_ARGS args;
void foo ()
{
static if (NEW_ARGS.length == 1) {}
}
}
But compiling the above code with DMD 2.064.2 results in this error:
typecons.d(
On Monday, 25 November 2013 at 03:13:48 UTC, Shammah Chancellor
wrote:
On 2013-11-25 00:08:50 +, Namespace said:
I love this feature, but I'm unsure how it works. Can someone
explain me, how the compiler deduce that he should read 4
bytes for each index (the 'at' function)? The type is voi
On 25/11/13 10:13, Andrea Fontana wrote:
auto bar() { return cast(const int) 10; }
writeln(typeid(bar()));
Yup, I should have added that I would prefer to avoid a cast in the return
statement :-) Thanks anyway!
Does a binding for google api (for example analytics api) exist?
I search on github, nothing found. Anyone?
On Monday, 25 November 2013 at 09:05:39 UTC, Joseph Rushton
Wakeling wrote:
Hello all,
If I mark a struct or class method as const, this is assumed to
apply to the entire method, i.e. that nothing in it will modify
any internal data of the struct/class.
struct Foo
{
const aut
Hello all,
If I mark a struct or class method as const, this is assumed to apply to the
entire method, i.e. that nothing in it will modify any internal data of the
struct/class.
struct Foo
{
const auto bar()
{
// I can't modify any of the
// int
65 matches
Mail list logo