On Tue, 08 Dec 2015 14:12:02 +1100, Daniel Murphy wrote:
> On 4/12/2015 8:38 AM, Chris Wright wrote:
>> An object reference is just a pointer, but we can't directly cast it.
>> So we make a pointer to it and cast that; the type system allows it.
>> Now we can access the data that the object refere
On 4/12/2015 8:38 AM, Chris Wright wrote:
An object reference is just a pointer, but we can't directly cast it. So
we make a pointer to it and cast that; the type system allows it. Now we
can access the data that the object reference refers to directly.
Casting is fine too: cast(void*)classRef
On Monday, 7 December 2015 at 20:56:24 UTC, John Carter wrote:
So whilst attempt to convert from a hex string (without the 0x)
to int I bumped into the @@@BUG@@@ the size of China
https://github.com/D-Programming-Language/phobos/blob/master/std/conv.d#L2270
Is there a bugzilla issue number
On Monday, 7 December 2015 at 22:03:42 UTC, Alex Parrill wrote:
On Monday, 7 December 2015 at 18:48:18 UTC, Random D user wrote:
struct Foo
{
this( int k )
{
a = k;
}
int a;
}
Foo foo;
int[ Foo ] map;
map[ foo ] = 1; // Crash! bug?
// This also crashes. I believe cras
On Monday, 7 December 2015 at 22:38:03 UTC, Steven Schveighoffer
wrote:
It's an old bug, if it still exists. But in any case, the
description is terrible. A real bug report should be filed.
-Steve
Filed (https://issues.dlang.org/show_bug.cgi?id=15419) and fixed
(https://github.com/D-Programm
On 12/7/15 5:32 PM, anonymous wrote:
On 07.12.2015 21:56, John Carter wrote:
So whilst attempt to convert from a hex string (without the 0x) to int I
bumped into the @@@BUG@@@ the size of China
https://github.com/D-Programming-Language/phobos/blob/master/std/conv.d#L2270
Is there a bugzi
On 07.12.2015 21:56, John Carter wrote:
So whilst attempt to convert from a hex string (without the 0x) to int I
bumped into the @@@BUG@@@ the size of China
https://github.com/D-Programming-Language/phobos/blob/master/std/conv.d#L2270
Is there a bugzilla issue number tracking this?
Search
On Monday, 7 December 2015 at 22:19:17 UTC, Enjoys Math wrote:
On Monday, 7 December 2015 at 22:01:15 UTC, BLM768 wrote:
On Monday, 7 December 2015 at 21:33:57 UTC, Enjoys Math wrote:
I've seen these:
https://github.com/DerelictOrg?page=1
BUt not sure how to use them, examples?
OpenGL itself
On Monday, 7 December 2015 at 22:01:15 UTC, BLM768 wrote:
On Monday, 7 December 2015 at 21:33:57 UTC, Enjoys Math wrote:
I've seen these:
https://github.com/DerelictOrg?page=1
BUt not sure how to use them, examples?
OpenGL itself can't create a window/context, so you'll need to
use DerelictG
On Monday, 7 December 2015 at 18:48:18 UTC, Random D user wrote:
struct Foo
{
this( int k )
{
a = k;
}
int a;
}
Foo foo;
int[ Foo ] map;
map[ foo ] = 1; // Crash! bug?
// This also crashes. I believe crash above makes a call like
this (or similar) in the rt.
//auto h
On Monday, 7 December 2015 at 21:33:57 UTC, Enjoys Math wrote:
I've seen these:
https://github.com/DerelictOrg?page=1
BUt not sure how to use them, examples?
Derelict is just bindings for other libraries, for using C
libraries with D. Pick a library that does windows management (I
use GLFW,
On Monday, 7 December 2015 at 21:33:57 UTC, Enjoys Math wrote:
I've seen these:
https://github.com/DerelictOrg?page=1
BUt not sure how to use them, examples?
OpenGL itself can't create a window/context, so you'll need to
use DerelictGLFW or DerelictSDL. GLFW is lighter-weight.
Combine the s
I've seen these:
https://github.com/DerelictOrg?page=1
BUt not sure how to use them, examples?
So whilst attempt to convert from a hex string (without the 0x)
to int I bumped into the @@@BUG@@@ the size of China
https://github.com/D-Programming-Language/phobos/blob/master/std/conv.d#L2270
Is there a bugzilla issue number tracking this?
Searching for conv and parse in the issue trac
This seems to work:
struct RefVal(T) {
private T* ptr;
this(T* val) {
ptr = val;
}
ref auto opAssign(U)(auto ref U value) {
*ptr = value;
return *ptr;
}
auto get
I kind of miss reference values on stack, so I attempted to make
one in a struct.
Pointers are pretty good (since d doesn't have ->), but it would
be nice to avoid dereferencing them explicitly on assignment.
Since reference is a pointer that you can't change afterwards.
I tried something like
worksforme. git HEAD, GNU/Linux, x86.
struct Foo
{
this( int k )
{
a = k;
}
int a;
}
Foo foo;
int[ Foo ] map;
map[ foo ] = 1; // Crash! bug?
// This also crashes. I believe crash above makes a call like
this (or similar) in the rt.
//auto h = typeid( foo ).getHash( &foo ); // Crash!
win64 & dmd 2.69.2
On Monday, 7 December 2015 at 17:18:20 UTC, Dominikus Dittes
Scherkl wrote:
Hmm. But it works just fine! It overloads also the special
floatingpoint operators <> !<> !<= and so on.
Those are deprecated:
http://dlang.org/deprecate.html#Floating%20point%20NCEG%20operators
And how else could I
On Monday, 7 December 2015 at 13:31:52 UTC, Mike Parker wrote:
On Monday, 7 December 2015 at 11:49:51 UTC, Dominikus Dittes
Scherkl wrote:
On the other hand the chapter also states that opCmp() should
always return "int" - which is a bad idea if you e.g. want to
provide a "NaN" value in your ty
On Sunday, 6 December 2015 at 13:32:19 UTC, visitor wrote:
gtkd demos for examples, might be of interest, like clock :
https://github.com/gtkd-developers/GtkD/blob/master/demos/cairo/cairo_clock/clock.d
Thanks!
I didn't knew about that source, that helped me alot :)
On Monday, 7 December 2015 at 14:40:12 UTC, Martin Tschierschke
wrote:
When I do the following:
auto mysql = new Mysql("localhost", 3306, "mt", "",
"verwaltung");
auto rows = mysql.query("select field from my_table limit 50");
foreach(row;rows){
writeln(row["field"]);}
// second time same l
On Monday, 7 December 2015 at 14:40:12 UTC, Martin Tschierschke
wrote:
When I do the following:
auto mysql = new Mysql("localhost", 3306, "mt", "",
"verwaltung");
auto rows = mysql.query("select field from my_table limit 50");
foreach(row;rows){
writeln(row["field"]);}
// second time same l
On 12/6/15 6:01 PM, Andrew LaChance wrote:
On Saturday, 5 December 2015 at 23:27:31 UTC, Steven Schveighoffer wrote:
On 12/5/15 6:06 PM, Andrew LaChance wrote:
I was reading a blog post here: http://3d.benjamin-thaut.de/?p=20 which
mentions:
"Calls to the druntime invariant handler are emitted
When I do the following:
auto mysql = new Mysql("localhost", 3306, "mt", "", "verwaltung");
auto rows = mysql.query("select field from my_table limit 50");
foreach(row;rows){
writeln(row["field"]);}
// second time same loop
foreach(row;rows){
writeln(row["field"]);}
I only get the output of
On Monday, 7 December 2015 at 11:49:51 UTC, Dominikus Dittes
Scherkl wrote:
On Sunday, 6 December 2015 at 15:01:08 UTC, cym13 wrote:
Don't use opCmp, all binary operators should be overriden
using opBinary. For more information I recommend this page
http://ddili.org/ders/d.en/operator_overloadi
On Monday, 7 December 2015 at 08:17:27 UTC, Enjoys Math wrote:
Exception Message:
First-chance exception: std.format.FormatException Unterminated
format specifier: "%" at
C:\D\dmd2\windows\bin\..\..\src\phobos\std\format.d(828)
[CODE]
module set;
import std.conv;
struct Set(T) {
stri
On Monday, 7 December 2015 at 10:55:25 UTC, Alex wrote:
On Sunday, 6 December 2015 at 12:23:52 UTC, visitor wrote:
Hello, interesting exercise for me to learn about allocators
:-)
Nice to know, a novice can inspire someone :)
i managed to parallelize the code reaching similar
performance, in
On Sunday, 6 December 2015 at 15:01:08 UTC, cym13 wrote:
Don't use opCmp, all binary operators should be overriden using
opBinary. For more information I recommend this page
http://ddili.org/ders/d.en/operator_overloading.html
Why should we don't use opCmp() ?
I can't see any recommendation ab
On Monday, 7 December 2015 at 00:43:50 UTC, Ali Çehreli wrote:
On 12/06/2015 06:41 AM, Márcio Martins wrote:
> auto m = (a > b) * a + 15;
> auto c = a.choose(a > b)^^2;
What do those operations do? Are you thinking of a special
meaning for '>', perhaps common in numerical computations,
which
On Monday, 7 December 2015 at 08:17:27 UTC, Enjoys Math wrote:
Exception Message:
First-chance exception: std.format.FormatException Unterminated
format specifier: "%" at
C:\D\dmd2\windows\bin\..\..\src\phobos\std\format.d(828)
[CODE]
module set;
import std.conv;
struct Set(T) {
stri
On Sunday, 6 December 2015 at 12:23:52 UTC, visitor wrote:
Hello, interesting exercise for me to learn about allocators :-)
Nice to know, a novice can inspire someone :)
i managed to parallelize the code reaching similar performance,
in terms of speed, as the non parallel version :
http://dpa
On Sunday, 6 December 2015 at 08:45:10 UTC, Rikki Cattermole
wrote:
Why is TreeNode not final?
This is an interesting hint! Just after adding final the program
takes two seconds less... This is roughly 5%. Do you have another
hints of this kind? ;)
Also yours does not use threads in any way.
On Monday, 7 December 2015 at 08:17:27 UTC, Enjoys Math wrote:
Exception Message:
First-chance exception: std.format.FormatException Unterminated
format specifier: "%" at
C:\D\dmd2\windows\bin\..\..\src\phobos\std\format.d(828)
[CODE]
module set;
import std.conv;
struct Set(T) {
stri
Exception Message:
First-chance exception: std.format.FormatException Unterminated
format specifier: "%" at
C:\D\dmd2\windows\bin\..\..\src\phobos\std\format.d(828)
[CODE]
module set;
import std.conv;
struct Set(T) {
string toString() const {
auto str = "{";
35 matches
Mail list logo