I didn't have access to my compute for longer than I thought, but
I finally got around to this.
After some messing around, I not only managed to track down the
cause, but I got it fixed and the Audio module for DSFML is back
to where it was.
In one of my D classes, SoundStream, I defined a
ketmar:
other function declarations (methods, nested functions) accepts
'static', so why free functions shouldn't?
For various reasons, one of them is that accepting useless code
confuses newbies and doesn't allow them to build a correct model
of the D semantics in their head.
Bye,
On Sunday, 17 August 2014 at 21:09:04 UTC, monarch_dodra wrote:
On Sunday, 17 August 2014 at 18:54:27 UTC, Paulo Pinto wrote:
Hi,
I was wondering if it is possible to use the BinaryHeap store
like
the C++'s make_heap/pop_heap/push_heap functions.
I would like to port to D some A* C++ code I
On Monday, 18 August 2014 at 01:22:00 UTC, Ali Çehreli wrote:
The following solution relies on an alias template parameter
and a template constraint. The code covers both Nullable
variants:
import std.typecons;
auto nullable(T)(T value)
{
return Nullable!T(value);
}
unittest
{
auto
Hi
Starting to use GtkD TreeModel, I write an instance of an
abstract class to TreeIter.userData.
When reading back the void pointer and casting to my abstract
class leads to crash when instance is used (Task is the abstract
class):
int fillIter(TreeIter iter, Task t)
{
On Monday, 18 August 2014 at 10:07:30 UTC, Remi Thebault wrote:
Hi
Starting to use GtkD TreeModel, I write an instance of an
abstract class to TreeIter.userData.
When reading back the void pointer and casting to my abstract
class leads to crash when instance is used (Task is the
abstract
Classes are reference types. You take reference of local
reference (it's address on stack). Use just cast(void*)t
Thank you!
On Saturday, 16 August 2014 at 20:59:47 UTC, monarch_dodra wrote:
I don't get it? If you use byDchar, you are *explicitly*
decoding. How is that any better? If anything, you are
*preventing* the (many) opportunities phobos has to *avoid*
decoding when it can...
byDchar and alikes are lazy
On Monday, 18 August 2014 at 11:28:25 UTC, Nordlöw wrote:
On Saturday, 16 August 2014 at 20:59:47 UTC, monarch_dodra
wrote:
I don't get it? If you use byDchar, you are *explicitly*
decoding. How is that any better? If anything, you are
*preventing* the (many) opportunities phobos has to
On Monday, 18 August 2014 at 06:50:08 UTC, Paulo Pinto wrote:
On Sunday, 17 August 2014 at 21:09:04 UTC, monarch_dodra wrote:
On Sunday, 17 August 2014 at 18:54:27 UTC, Paulo Pinto wrote:
Hi,
I was wondering if it is possible to use the BinaryHeap store
like
the C++'s
On Mon, Aug 18, 2014 at 06:46:02AM +, bearophile via Digitalmars-d-learn
wrote:
ketmar:
other function declarations (methods, nested functions) accepts
'static', so why free functions shouldn't?
For various reasons, one of them is that accepting useless code
confuses newbies and
Hi all,
I've the following code snipped:
import std.bigint;
void main(string[] args)
{
BigInt i = 12345;
if (args.length 1)
{
goto Exit;
}
i = BigInt(67890);
Exit:
return;
}
When I try to compile this sample
H. S. Teoh:
Is there a bug filed for this?
Probably there is. But I stopped filing similar bugs because they
seem to have a very low priority.
Bye,
bearophile
import std.net.curl;
void main(){}
// Output:
Undefined symbols for architecture x86_64:
_curl_easy_cleanup, referenced from:
_D3std3net4curl4Curl8shutdownMFZv in libphobos2.a(curl_3063_37c.o)
_curl_easy_setopt, referenced from:
nrgyzer:
import std.bigint;
void main(string[] args)
{
BigInt i = 12345;
if (args.length 1)
{
goto Exit;
}
i = BigInt(67890);
Exit:
return;
}
When I try to compile this sample application I'm getting the
It looks like a compiler bug
https://issues.dlang.org/show_bug.cgi?id=13321
Bye,
bearophile
On Monday, 18 August 2014 at 06:46:03 UTC, bearophile wrote:
ketmar:
other function declarations (methods, nested functions) accepts
'static', so why free functions shouldn't?
For various reasons, one of them is that accepting useless code
confuses newbies and doesn't allow them to build a
On Monday, 18 August 2014 at 05:29:53 UTC, Jonathan M Davis via
Digitalmars-d-learn wrote:
On Mon, 18 Aug 2014 01:32:40 +
Phil Lavoie via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com
wrote:
Ok, so after years of D usage I just noticed that this is
valid D
(compiles anyways):
On Monday, 18 August 2014 at 14:23:47 UTC, bearophile wrote:
H. S. Teoh:
Is there a bug filed for this?
Probably there is. But I stopped filing similar bugs because
they seem to have a very low priority.
Bye,
bearophile
I looked around for it but didn't find it. I filed this one:
I think there is something that I don't understand about concept
of *properties*. I thing that property is sort of object
attribute that belongs to it. Currently property considered as
two functions: *get* and/or *set*. So we can do two sort of
operations on concept that called *property*:
On Thu, 14 Aug 2014 05:57:17 +, Carl Sturtivant wrote:
This is the idea I mean.
http://citeseer.ist.psu.edu/viewdoc/download?
doi=10.1.1.14.9450rep=rep1type=pdf
Here's a C++ implementation supported I think by gcc.
http://www.sgi.com/tech/stl/Rope.html
Is there a D implementation of a
On Mon, 18 Aug 2014 13:51:12 +, nrgyzer wrote:
When I try to compile this sample application I'm getting the
following error:
sample.d(7): Error: goto skips declaration of variable
sample.main.__ctmp1344 at sample.d(9)
http://dlang.org/changelog.html#disable_goto_skips_init
First
On Monday, 18 August 2014 at 14:24:54 UTC, Andrew Edwards wrote:
import std.net.curl;
void main(){}
// Output:
Undefined symbols for architecture x86_64:
_curl_easy_cleanup, referenced from:
The problem here is that std.net.curl is based on libcurl, so you
need to link your program
On Monday, 18 August 2014 at 16:09:04 UTC, Martin Nowak wrote:
The problem here is that std.net.curl is based on libcurl, so
you need to link your program against it.
Add '-L-lcurl' to your dmd invocation to do this.
I also added an enhancement request to load curl at runtime.
I found this code sample in vibe:
void connect(NetworkAddress addr)
{
enforce(.connect(m_ctx.socketfd, addr.sockAddr,
addr.sockAddrLen) == 0, Failed to connect UDP
socket.~to!string(getLastSocketError()));
}
What does mean .connect? Where I can find description of this
On Monday, 18 August 2014 at 16:30:13 UTC, Nikolay wrote:
I found this code sample in vibe:
void connect(NetworkAddress addr)
{
enforce(.connect(m_ctx.socketfd, addr.sockAddr,
addr.sockAddrLen) == 0, Failed to connect UDP
socket.~to!string(getLastSocketError()));
}
What
On Monday, 18 August 2014 at 15:35:26 UTC, Uranuz wrote:
date.day++;
date.day -= 5;
Should be treated as:
date.day = date.day + 1;
date.day = date.day - 5;
if the were not oveloaded. So if we have get and set property
methods I see that it could be calculated and this should
working.
This
Hi there.
Brief introduction, and a beginner's question.
I just started playing with D a couple of weeks ago. I have been
programming in C on and off since the late 80s, but I do finance
for a living and my programming skills grew rusty. I have a bit
more time now to catch up with
Thank to jwhear on irc who solved it for me despite claiming not
to be a pyd guru.
In case it's of benefit, here is what works:
module hellostruct;
import pyd.pyd;
import std.stdio;
import std.conv;
struct t_mystruct {
int i;
string s;
};
t_mystruct hellostruct(int[] inp) {
int i;
On Mon, 2014-08-18 at 16:39 +, Laeeth Isharc via Digitalmars-d-learn
wrote:
Hi there.
Brief introduction, and a beginner's question.
I just started playing with D a couple of weeks ago. I have been
programming in C on and off since the late 80s, but I do finance
for a living and my
Am 18.08.2014 14:49, schrieb monarch_dodra:
On Monday, 18 August 2014 at 06:50:08 UTC, Paulo Pinto wrote:
On Sunday, 17 August 2014 at 21:09:04 UTC, monarch_dodra wrote:
On Sunday, 17 August 2014 at 18:54:27 UTC, Paulo Pinto wrote:
Hi,
I was wondering if it is possible to use the BinaryHeap
On Mon, 18 Aug 2014 06:46:02 +
bearophile via Digitalmars-d-learn digitalmars-d-learn@puremagic.com
wrote:
accepting useless code confuses newbies
i think that i'm not really a newbie now ;-), but i'm still used to
declare various private module functions and variables as 'static'.
yes,
On 08/18/2014 09:07 AM, ollie wrote:
On Mon, 18 Aug 2014 13:51:12 +, nrgyzer wrote:
When I try to compile this sample application I'm getting the
following error:
sample.d(7): Error: goto skips declaration of variable
sample.main.__ctmp1344 at sample.d(9)
On Mon, 18 Aug 2014 13:51:12 +
nrgyzer via Digitalmars-d-learn digitalmars-d-learn@puremagic.com
wrote:
When I try to compile this sample application I'm getting the
following error:
sample.d(7): Error: goto skips declaration of variable
sample.main.__ctmp1344 at sample.d(9)
it's
On Monday, 18 August 2014 at 17:42:37 UTC, ketmar via
Digitalmars-d-learn wrote:
On Mon, 18 Aug 2014 06:46:02 +
bearophile via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com
wrote:
accepting useless code confuses newbies
i think that i'm not really a newbie now ;-), but i'm still
On Mon, 18 Aug 2014 16:30:12 +
Nikolay via Digitalmars-d-learn digitalmars-d-learn@puremagic.com
wrote:
What does mean .connect? Where I can find description of this
syntax (dot + function name)?
right here: http://dlang.org/expression.html#PrimaryExpression
language documentation rulez!
On Mon, 18 Aug 2014 17:55:01 +
Phil Lavoie via Digitalmars-d-learn digitalmars-d-learn@puremagic.com
wrote:
I don't think he meant you personally.
ah, nothing personal, i just described my use case, maybe using some
vague wording. i AM a newbie in D, there is nothing insulting in being
On Mon, 2014-08-18 at 17:17 +, Laeeth Isharc via Digitalmars-d-learn
wrote:
Thank to jwhear on irc who solved it for me despite claiming not
to be a pyd guru.
:-)
[…]
distutils.util.get_platform(),
[…]
Does os.uname() not provide sufficient information?
[…]
print mystruct.i
All you said makes sense. If there is a direct connection between
getter, setter and member than yes, returning it by reference is
usually more convenient:
private T _member;
@property ref inout(T) member() inout {return _member;}
However, sometimes, there is no direct connection between
All the cool folk doing data analysis and visualization using
Python no longer bother with hand written C (*) for when pure
Python won't cut the mustard. If Numba can't do the job, then
Cython gets used.
I have all my computational pure Python source codes running as
fast as C these days
On Monday, 18 August 2014 at 18:07:09 UTC, Phil Lavoie wrote:
All you said makes sense. If there is a direct connection
between getter, setter and member than yes, returning it by
reference is usually more convenient:
private T _member;
@property ref inout(T) member() inout {return _member;}
On Monday, 18 August 2014 at 18:08:59 UTC, Russel Winder via
Digitalmars-d-learn wrote:
[…]
distutils.util.get_platform(),
[…]
Does os.uname() not provide sufficient information?
This was boilerplate generated by pyd.
I posted it suddenly. I don't know why.
I'll give short illustration.
struct PropType
{
void append(int value)
{
//implementation
}
}
class Test
{
PropType myProp() @property
{
return _propValue;
}
private PropType _propValue;
}
void main()
{
Test test
On Mon, 2014-08-18 at 19:00 +, Laeeth Isharc via Digitalmars-d-learn
wrote:
On Monday, 18 August 2014 at 18:08:59 UTC, Russel Winder via
Digitalmars-d-learn wrote:
[…]
distutils.util.get_platform(),
[…]
Does os.uname() not provide sufficient information?
This was
On Mon, 2014-08-18 at 18:59 +, Laeeth Isharc via Digitalmars-d-learn
wrote:
[…]
Thanks for the colour - I appreciate it. I have played with
numba and pypy with numpy and it seems a powerful tool for some
kinds of jobs. Perhaps it is my relative unfamiliarity with
python, but for the time
On Monday, 18 August 2014 at 12:42:25 UTC, monarch_dodra wrote:
On Monday, 18 August 2014 at 11:28:25 UTC, Nordlöw wrote:
On Saturday, 16 August 2014 at 20:59:47 UTC, monarch_dodra
wrote:
I don't get it? If you use byDchar, you are *explicitly*
decoding. How is that any better? If anything,
In the new D release there have been some changes regarding
built-in types.
http://dlang.org/changelog.html?2.066#array_and_aa_changes
I would like to learn why this has been done like this and why it
is desired to be free functions rather than properties?
On Monday, 18 August 2014 at 21:02:09 UTC, Gary Willoughby wrote:
In the new D release there have been some changes regarding
built-in types.
http://dlang.org/changelog.html?2.066#array_and_aa_changes
I would like to learn why this has been done like this and why
it is desired to be free
On Monday, 18 August 2014 at 19:28:55 UTC, Russel Winder via
Digitalmars-d-learn wrote:
On Mon, 2014-08-18 at 19:00 +, Laeeth Isharc via
Digitalmars-d-learn
wrote:
On Monday, 18 August 2014 at 18:08:59 UTC, Russel Winder via
Digitalmars-d-learn wrote:
[…]
Whilst the hardcore Pythonistas remain Pythonistas, some of the
periphery has jumped ship to Go. Sadly D did not capture these
folk, it perhaps should have done. It would be easy to blame
fadism, but I think the actual reasons are far less superficial.
So I gather that you agree that what
Dr Russel Winder
41 Buckmaster Road
London SW11 1EN, UK
Are there any D users groups/meetups in London? I see you are
not far away (I am in Barnes).
Laeeth
alias extern(Windows) HRESULT fnNtQuerySystemInformation( uint
SystemInformationClass, void* info, uint infoLength, uint*
ReturnLength ) nothrow;
If you know, respond here or at the following bug report:
https://issues.dlang.org/show_bug.cgi?id=13309
On Monday, 18 August 2014 at 23:12:28 UTC, Laeeth Isharc wrote:
For me, NumPy has some serious problems despite being the
accepted norm for computational work.
If not too offtopic, do you have a link describing, or would
you briefly summarize these problems? I am intrigued. And
what would
On Monday, 18 August 2014 at 21:17:11 UTC, Jonathan M Davis wrote:
On Monday, 18 August 2014 at 21:02:09 UTC, Gary Willoughby
wrote:
In the new D release there have been some changes regarding
built-in types.
http://dlang.org/changelog.html?2.066#array_and_aa_changes
I would like to learn
On 8/19/14, 1:09 AM, Martin Nowak wrote:
On Monday, 18 August 2014 at 14:24:54 UTC, Andrew Edwards wrote:
import std.net.curl;
void main(){}
// Output:
Undefined symbols for architecture x86_64:
_curl_easy_cleanup, referenced from:
The problem here is that std.net.curl is based on
On Tuesday, 19 August 2014 at 00:54:25 UTC, Idan Arye wrote:
On Monday, 18 August 2014 at 21:17:11 UTC, Jonathan M Davis
wrote:
On Monday, 18 August 2014 at 21:02:09 UTC, Gary Willoughby
wrote:
In the new D release there have been some changes regarding
built-in types.
On Tue, 19 Aug 2014 09:56:30 +0900
Andrew Edwards via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com wrote:
Add '-L-lcurl' to your dmd invocation to do this.
Okay, got it. Thank you much.
or you can add
pragma(lib, curl);
to your source file if you are using dmd.
signature.asc
On Tuesday, 19 August 2014 at 02:24:48 UTC, ketmar via
Digitalmars-d-learn wrote:
On Tue, 19 Aug 2014 09:56:30 +0900
Andrew Edwards via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com wrote:
Add '-L-lcurl' to your dmd invocation to do this.
Okay, got it. Thank you much.
or you can add
right here: http://dlang.org/expression.html#PrimaryExpression
language documentation rulez! ;-)
Yes I found it. Correct link:
Module Scope Operator
http://dlang.org/module.html
On Tue, 19 Aug 2014 03:37:23 +
Vladimir Panteleev via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com wrote:
And Windows. Since, apparently, pragma(lib) is only supported by
COFF and OMF.
nope, GNU/Linux DMD supports it too (at least 32-bit version).
signature.asc
Description: PGP
On Tue, 19 Aug 2014 03:36:26 +
Nikolay via Digitalmars-d-learn digitalmars-d-learn@puremagic.com
wrote:
right here: http://dlang.org/expression.html#PrimaryExpression
language documentation rulez! ;-)
Yes I found it. Correct link:
Module Scope Operator
http://dlang.org/module.html
On Tuesday, 19 August 2014 at 02:24:48 UTC, ketmar via
Digitalmars-d-learn wrote:
On Tue, 19 Aug 2014 09:56:30 +0900
Andrew Edwards via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com wrote:
Add '-L-lcurl' to your dmd invocation to do this.
Okay, got it. Thank you much.
or you can add
On Mon, 2014-08-18 at 23:16 +, Laeeth Isharc via Digitalmars-d-learn
wrote:
Are there any D users groups/meetups in London? I see you are
not far away (I am in Barnes).
Crickey, that is just round the corner . :-)
Yes there is a London D user group, it just hasn't met as yet. I
On Mon, 2014-08-18 at 23:12 +, Laeeth Isharc via Digitalmars-d-learn
wrote:
Whilst the hardcore Pythonistas remain Pythonistas, some of the
periphery has jumped ship to Go. Sadly D did not capture these
folk, it perhaps should have done. It would be easy to blame
fadism, but I think
64 matches
Mail list logo