On Tue, Dec 20, 2011 at 00:23, Timon Gehr wrote:
> Looks very good.
>
> Knowing it is a work in progress, I will already give some feedback:
(snip)
Wow, thanks for the thorough reading! I'll correct thos points.
I need to write a code extractor to automatically compile the
examples, because I'm
On 2011-12-20 01:34, Jesse Phillips wrote:
On Mon, 19 Dec 2011 18:52:44 +0100
Jacob Carlborg wrote:
You can always make the variable uninitialized using "void", don't
know if that what is what you're looking for.
float[] f = void;
He is trying to create an array where the elements are not
On Monday, 19 December 2011 at 19:01:10 UTC, Simen Kjærås wrote:
import std.typetuple : TypeTuple;
import std.typecons : tuple;
TypeTuple!(a, b) = tuple(b,a);
There is a pull request implementing multiple variable
declarations:
https://github.com/D-Programming-Language/dmd/pull/341
However,
test.cpp: http://www.ideone.com/uh7vN
DLibrary.d: http://www.ideone.com/fOLN8
$ g++ test.cpp
$ dmd -ofDLibrary.dll DLibrary.d
$ a.exe
$ 9
On Mon, 19 Dec 2011 18:52:44 +0100
Jacob Carlborg wrote:
> You can always make the variable uninitialized using "void", don't
> know if that what is what you're looking for.
>
> float[] f = void;
>
He is trying to create an array where the elements are not initialized.
Dne 20.12.2011 0:02, Trass3r napsal(a):
Am 19.12.2011, 23:13 Uhr, schrieb Martin Drašar :
Dne 19.12.2011 23:09, Trass3r napsal(a):
It actualy returns a procedure address and the procedure is called. It
lands inside export extern (C) int magicNumber() and crashes when
attempting to allocate mem
On 12/19/2011 09:30 PM, Philippe Sigaud wrote:
On Mon, Dec 19, 2011 at 18:49, Timon Gehr wrote:
On 12/19/2011 06:46 PM, Philippe Sigaud wrote:
On Mon, Dec 19, 2011 at 15:35, Heromythwrote:
Woo, I got it.
What's the difference with your first post?
He uses an eponymous template now
Am 19.12.2011, 23:13 Uhr, schrieb Martin Drašar :
Dne 19.12.2011 23:09, Trass3r napsal(a):
It actualy returns a procedure address and the procedure is called. It
lands inside export extern (C) int magicNumber() and crashes when
attempting to allocate memory for Something.
Did you properly ini
Dne 19.12.2011 23:09, Trass3r napsal(a):
It actualy returns a procedure address and the procedure is called. It
lands inside export extern (C) int magicNumber() and crashes when
attempting to allocate memory for Something.
Did you properly initialize druntime?
As I am just starting with D, th
It actualy returns a procedure address and the procedure is called. It
lands inside export extern (C) int magicNumber() and crashes when
attempting to allocate memory for Something.
Did you properly initialize druntime?
Dne 19.12.2011 19:39, Simon napsal(a):
On 19/12/2011 18:01, Andrej Mitrovic wrote:
Check if GetProcAddress returns null? It seems to me you're looking
for _magicFunction but defining magicNumber, two different names.
that's be it. can't remember the rules for whether it will have a
leading und
On Mon, Dec 19, 2011 at 18:49, Timon Gehr wrote:
> On 12/19/2011 06:46 PM, Philippe Sigaud wrote:
>>
>> On Mon, Dec 19, 2011 at 15:35, Heromyth wrote:
>>>
>>> Woo, I got it.
>>
>>
>> What's the difference with your first post?
>
>
> He uses an eponymous template now.
Ah yes, thanks. Strange, I'm
On Monday, December 19, 2011 11:07:49 Ali Çehreli wrote:
> That's a great article.[1] I hope that this chapter is more
> beginner-friendly:
>
> http://ddili.org/ders/d.en/ranges.html
Cool. One of the things that we're missing on the website is a solid article
on ranges (I started such an article
On 12/19/2011 10:39 AM, Jonathan M Davis wrote:
> it's a range (see
> http://www.informit.com/articles/printerfriendly.aspx?p=1407357 for a
general
> explanation of the concept of ranges)
That's a great article.[1] I hope that this chapter is more
beginner-friendly:
http://ddili.org/ders/d
On Mon, 19 Dec 2011 17:17:43 +0100, clk wrote:
Hello,
I'm new to this mailing list. I'm trying to learn D to eventually use
it in production code.
I'm a little bit intimidated by the fact that the topics in the d-learn
list look rather advanced to a newbie like me.
I have 3 fairly simple ques
On 12/19/2011 09:17 AM, clk wrote:
Hello,
I'm new to this mailing list. I'm trying to learn D to eventually use it
in production code.
I'm a little bit intimidated by the fact that the topics in the d-learn
list look rather advanced to a newbie like me.
I have 3 fairly simple questions:
1) Does
On 12/19/2011 08:17 AM, clk wrote:
> I'm a little bit intimidated by the fact that the topics in the d-learn
> list look rather advanced to a newbie like me.
We need more newbie topics here! :)
> 1) Does D support something like the javascript 1.8 destructuring
> assigment (multiple assigment i
On Monday, December 19, 2011 11:17:43 clk wrote:
> Hello,
> I'm new to this mailing list. I'm trying to learn D to eventually use
> it in production code.
> I'm a little bit intimidated by the fact that the topics in the d-learn
> list look rather advanced to a newbie like me.
> I have 3 fairly sim
On 19/12/2011 18:01, Andrej Mitrovic wrote:
Check if GetProcAddress returns null? It seems to me you're looking
for _magicFunction but defining magicNumber, two different names.
that's be it. can't remember the rules for whether it will have a
leading underscore, but you can always use depende
On 19.12.2011 17:17, clk wrote:
1) Does D support something like the javascript 1.8 destructuring
assigment (multiple assigment in python):
[a, b] = [b, a];
I don't think so, but you can do something like this with templates:
void swap(alias a, alias b)() {
auto t = a;
a = b;
b = t
On Mon, 19 Dec 2011 12:24:18 -0500, Bear wrote:
gc.malloc actually returns void[]
http://www.d-programming-language.org/phobos/core_memory.html#malloc
Looks like void* to me...
Or is there another function I'm not aware of? I think it should be
GC.malloc, not gc.malloc, so maybe I'm miss
Check if GetProcAddress returns null? It seems to me you're looking
for _magicFunction but defining magicNumber, two different names.
On 2011-12-19 18:24, Bear wrote:
gc.malloc actually returns void[]
Bearophile's suggestion seems to work though, but it doesn't seem to improve
performance for some reason... I guess I'll have to find some other way to make
my
prog quicker.
You can always make the variable uninitialized using
Hello everyone,
I would like to ask you about linking D shared objects (.dll and .so)
from a C++ program.
Say I have this C++ loader:
typedef int (*MagicFunction) ();
HMODULE handle = LoadLibraryA("DLibrary.dll");
if (handle)
{
MagicFunction fn = (MagicFunction) GetProcAddress(handle, "_m
Hello,
I'm new to this mailing list. I'm trying to learn D to eventually use
it in production code.
I'm a little bit intimidated by the fact that the topics in the d-learn
list look rather advanced to a newbie like me.
I have 3 fairly simple questions:
1) Does D support something like the ja
On 12/19/2011 06:46 PM, Philippe Sigaud wrote:
On Mon, Dec 19, 2011 at 15:35, Heromyth wrote:
Woo, I got it.
What's the difference with your first post?
He uses an eponymous template now.
On Mon, Dec 19, 2011 at 15:35, Heromyth wrote:
> Woo, I got it.
What's the difference with your first post?
gc.malloc actually returns void[]
Bearophile's suggestion seems to work though, but it doesn't seem to improve
performance for some reason... I guess I'll have to find some other way to make
my
prog quicker.
On Mon, 19 Dec 2011 07:04:20 -0500, Bear wrote:
Using D1, I have a program that creates tons of float[] ; for performance
reasons, I would like them to be uninitialized.
I've tried replacing
float[] f = new float[x];
by
float[] f = cast(float[])std.gc.malloc(x*4);
this is wrong. a float[] s
On Sun, 18 Dec 2011 18:42:31 -0500, Jonathan M Davis
wrote:
On Sunday, December 18, 2011 22:12:07 RenatoL wrote:
Reading the book from Alexandrescu we can find this (page 103-104,
at least in my edition):
Expanding arrays has a couple of subtleties that concern possible
reallocation of the
== Quote from Heromyth (bitwo...@qq.com)'s article
> == Quote from Philippe Sigaud (philippe.sig...@gmail.com)'s article
> > I suppose you do *not*want the commented line?
> I want to convert a delegate type define in C# to D's, as such:
> public delegate void AsynchronousAction(T argument, Asy
== Quote from Philippe Sigaud (philippe.sig...@gmail.com)'s article
> On Sun, Dec 18, 2011 at 14:13, Heromyth wrote:
> > I have a delegate as a parameter in a function which is a template function.
> > And I want to use alias for the delegate parameter.
> > Is there a better way for this?
> I supp
Am 19.12.2011, 13:04 Uhr, schrieb Bear :
Using D1, I have a program that creates tons of float[] ; for performance
reasons, I would like them to be uninitialized.
std.array.uninitializedArray
Bear:
> Using D1, I have a program that creates tons of float[] ; for performance
> reasons, I would like them to be uninitialized.
> I've tried replacing
>
> float[] f = new float[x];
> by
> float[] f = cast(float[])std.gc.malloc(x*4);
Try something like this (untested):
alias float TF;
TF[] f
Using D1, I have a program that creates tons of float[] ; for performance
reasons, I would like them to be uninitialized.
I've tried replacing
float[] f = new float[x];
by
float[] f = cast(float[])std.gc.malloc(x*4);
Unfortunately I keep running into "Access violation" and sometimes "Array
bound
35 matches
Mail list logo