Bug reported as
https://issues.dlang.org/show_bug.cgi?id=14298
On Monday, 16 March 2015 at 22:19:52 UTC, Gary Willoughby wrote:
I guess it depends on the encoding?
No the character itself are encoding independent.
Some references:
http://stackoverflow.com/questions/23853489/generate-a-random-unicode-string
This will not work as the caller has to
On Saturday, 14 March 2015 at 23:46:28 UTC, Ellery Newcomer wrote:
On Saturday, 14 March 2015 at 13:52:13 UTC, Craig Dillabaugh
wrote:
I don't have any C# experience so I can't compare those
languages much, but I've heard people say their are D / C#
similarities.
Anyway, this isn't a
On Monday, 16 March 2015 at 20:03:36 UTC, Marc Schütz wrote:
You can file bugs against component websites there.
Thanks.
This has already been fixed AFAIK, it's just not yet deployed.
OK.
The problem in your example is that your making a copy of the
returned data. Of course any changes to that copy won't affect
the original. You need to return a pointer to it (`ref` won't do
if you want to store it in a local variable, because these can't
be `ref`).
struct BlockHead
{
On Monday, 16 March 2015 at 19:20:09 UTC, anonymous wrote:
On Monday, 16 March 2015 at 18:47:00 UTC, Namespace wrote:
const(Matrix)* m = t.getCurrentModelViewMatrix(); //
currently
}
But IMO it would be a lot nicer if I could store the reference
like this:
ref const(Matrix) m =
On Mon, 16 Mar 2015 12:32:01 +0100, Robert M. Münch wrote:
I prefer to move things to the far future compatibility path ASAP.
Reduce a lot of maintenance headaches.
then you can check properties, not versions. ;-)
static if (__traits(compiles, {import std.string : format;})) {
import
On Monday, 16 March 2015 at 12:18:42 UTC, Ellery Newcomer wrote:
On Sunday, 15 March 2015 at 14:58:54 UTC, Idan Arye wrote:
Even if we can't get the lambdas as syntax tress, the fact
that we can send whatever types we want to the delegates and
overload operators and stuff means we can still
... from all Unicode characters in an idiomatic D way?
(std.interal.unicode_*)
```
T genUnicodeString(T)(size_t minChars, size_t maxChars)
if(isSomeString!T) {
...
}
```
Thanks! I'll try this out after I get home.
On Monday, 16 March 2015 at 09:03:18 UTC, Lukasz Wrzosek wrote:
Hello
I was just exploring possibility to mimic multiple inheritance
from C++ (do not ask why, just for fun).
I've stumbled on below issue (let's say corner case) and most
likely this is bug in implementation of template Proxy,
On Sunday, 15 March 2015 at 14:58:54 UTC, Idan Arye wrote:
Even if we can't get the lambdas as syntax tress, the fact that
we can send whatever types we want to the delegates and
overload operators and stuff means we can still convert the
lambdas into SQL.
There are limitations on operator
On Sunday, 15 March 2015 at 16:21:21 UTC, Kyle wrote:
I have a variable, x, which I want to update when the content
of a DlangUI EditLine is modified. I tried making this work
with the onContentChange method listed in the API
documentation, but dmd told me it's not there. I've got this
On 2015-03-15 19:16:52 +, anonymous said:
Answerting myself:
static if (__traits(compiles, version_minor 67))
import std.string; // format() for versions 2.0.67
else
import std.format; // format() for versions = 2.0.67
That doesn't do what you want.
You need to `import std.compiler;`
On Mon, 16 Mar 2015 16:44:45 +, Andrew Brown wrote:
can you please show output of `dmd -v` and `gdc -v`, so we can see the
actual commands they both using for linking?
signature.asc
Description: PGP signature
UP
On 03/15/2015 04:51 PM, ketmar via Digitalmars-d-learn wrote:
On Sun, 15 Mar 2015 16:34:14 -0700, Charles Hixson via Digitalmars-d-learn
wrote:
if you know the exact layouts of `spare`, you can use union for that:
struct S {
// ...
union {
ulong[61] spare;
struct { int vala;
Hi,
I'm trying to compile code which calls C and fortan routines from
D on the linux cluster at work. I've managed to get it to work
with all 3 compilers on my laptop, but LDC and GDC fail on the
cluster (though DMD works perfectly). I'm using the precompiled
compiler binaries on these
On Monday, 16 March 2015 at 12:03:12 UTC, John Colvin wrote:
What behaviour would you expect if both IA and C inherited from
IB?
This case should assert at compile time.
But my example shows that case with implicit case is working, but
the explicit cast is not. That seems to be incorrect
On 03/16/2015 08:28 AM, Lukasz Wrzosek wrote:
On Monday, 16 March 2015 at 12:03:12 UTC, John Colvin wrote:
What behaviour would you expect if both IA and C inherited from IB?
This case should assert at compile time.
But my example shows that case with implicit case is working, but the
On 03/16/2015 09:16 AM, Charles Hixson via Digitalmars-d-learn wrote:
On 03/15/2015 04:51 PM, ketmar via Digitalmars-d-learn wrote:
On Sun, 15 Mar 2015 16:34:14 -0700, Charles Hixson via
Digitalmars-d-learn
wrote:
if you know the exact layouts of `spare`, you can use union for that:
struct
On 03/15/2015 01:53 PM, Suliman wrote:
I have App that read config sections. If the section is true I want to
run it in new thread.
if (parseconfig.obsmpplots_load == true)
{
auto obsmpplots = new ObsmpPlots(db);
auto theTask = task(obsmpplots.getPlots);
On 03/16/2015 04:59 PM, Lukasz Wrzosek wrote:
Bug reported as
https://issues.dlang.org/show_bug.cgi?id=14298
Thanks...
I have carried the discussion over to the main newsgroup:
http://forum.dlang.org/thread/me8e0a$1kp6$1...@digitalmars.com
As I mention there, there is a workaround: Add a
On Mon, 16 Mar 2015 12:49:40 -0700, Charles Hixson via Digitalmars-d-learn
wrote:
yep, you're doing it wrong, as Marc already wrote. ;-)
it's not very obvious, but this line makes a copy:
auto val = tst.value;
there are no `ref` type in D. `ref` is modifier for function arguments,
but not
On 03/16/2015 12:04 PM, Suliman wrote:
Ali, please add text above to your book!
Will do. Please email me your full name at acehr...@yahoo.com so that I
can add it to the Acknowledgments section.
Thank you,
Ali
On Monday, 16 March 2015 at 18:48:29 UTC, bearophile wrote:
Perhaps by rejection? I mean, generating a uint, test if it's a
character and repeat until the result is true.
hm, that must not even terminate.
On 03/16/2015 01:24 PM, via Digitalmars-d-learn wrote:
The problem in your example is that your making a copy of the returned
data. Of course any changes to that copy won't affect the original.
You need to return a pointer to it (`ref` won't do if you want to
store it in a local variable,
On Monday, 16 March 2015 at 13:33:55 UTC, Robert burner Schadek
wrote:
... from all Unicode characters in an idiomatic D way?
(std.interal.unicode_*)
```
T genUnicodeString(T)(size_t minChars, size_t maxChars)
if(isSomeString!T) {
...
}
```
I guess it depends on the encoding?
Some
On Mon, 16 Mar 2015 11:18:16 -0700, Charles Hixson via Digitalmars-d-learn
wrote:
My current best answer is to turn the unused into a vector of bytes,
and then pass that to the using routines as a ref. This still is wide
open to errors at the calling end, but the BlockHead end can ensure that
Ali, please add text above to your book!
On 2015-03-15 15:57:43 +, Marc Schütz said:
Ok. I need to dig into how the interpreter handles the returned pointer
and how the stack is handled.
C usually uses manual memory management, therefore I would expect that
the interpreter actually documents whom the pointer belongs to, and who
Ali, again big thanks for your book, without it I was not able
how to work with D.
But for me now absolutely clear what difference between:
auto theTask = task(someFunction);
and:
auto theTask = task!anOperation();
Currently, if you want to store a long getter into a variable
without copying it (because it may be a big struct), your only
way is to store it as a pointer:
struct Matrix {
float[16] values= [
1, 0, 0, 0,
0, 1, 0, 0,
0, 0, 1, 0,
0, 0, 0, 1
];
}
On 03/16/2015 11:28 AM, Suliman wrote:
difference between:
auto theTask = task(someFunction);
and:
auto theTask = task!anOperation();
tl;dr - Prefer task!anOperation() unless you can't. :)
task() is flexible enough to take what to execute either as a function
(or delegate) pointer
Robert burner Schadek:
... from all Unicode characters in an idiomatic D way?
Perhaps by rejection? I mean, generating a uint, test if it's a
character and repeat until the result is true.
Bye,
bearophile
On Monday, 16 March 2015 at 18:47:00 UTC, Namespace wrote:
const(Matrix)* m = t.getCurrentModelViewMatrix(); //
currently
}
But IMO it would be a lot nicer if I could store the reference
like this:
ref const(Matrix) m = t.getCurrentModelViewMatrix(); // nicer
[Of course
Am Mon, 16 Mar 2015 16:44:45 +
schrieb Andrew Brown aabrow...@hotmail.com:
Hi,
I'm trying to compile code which calls C and fortan routines from
D on the linux cluster at work. I've managed to get it to work
with all 3 compilers on my laptop, but LDC and GDC fail on the
cluster
On Monday, 16 March 2015 at 20:00:24 UTC, Dennis Ritchie wrote:
I don't know where to write about a bug on the website, so I
decided to write in this section.
This is the official bug tracker:
https://issues.dlang.org/enter_bug.cgi
You can file bugs against component websites there.
This
I don't know where to write about a bug on the website, so I
decided to write in this section.
This page is not displayed correctly:
http://dlang.org/phobos/std_format.html
On Monday, 16 March 2015 at 19:20:09 UTC, anonymous wrote:
On Monday, 16 March 2015 at 18:47:00 UTC, Namespace wrote:
const(Matrix)* m = t.getCurrentModelViewMatrix(); //
currently
}
But IMO it would be a lot nicer if I could store the reference
like this:
ref const(Matrix) m =
On 03/16/2015 11:55 AM, ketmar via Digitalmars-d-learn wrote:
On Mon, 16 Mar 2015 11:18:16 -0700, Charles Hixson via Digitalmars-d-learn
wrote:
My current best answer is to turn the unused into a vector of bytes,
and then pass that to the using routines as a ref. This still is wide
open to
Hello
I was just exploring possibility to mimic multiple inheritance
from C++ (do not ask why, just for fun).
I've stumbled on below issue (let's say corner case) and most
likely this is bug in implementation of template Proxy, isn't it ?
import std.typecons;
class IA {}
class IB {}
class C
I am creating a simple SDL_Texture manager, and was wondering if
the following code would work:
---
// 'list' is am assoc array of a struct containing a pointer and
ref counter.
// max_list_length is set to 20 if it's ever found to be 0
// compact list
if(list.length == max_list_length){
43 matches
Mail list logo