On Wednesday, 7 October 2015 at 16:25:02 UTC, Marc Schütz wrote:
Lionello Lunesu posted a PR that should fix this:
https://github.com/D-Programming-Language/dmd/pull/1913
See also the discussion in the linked bug report.
Unfortunately it seems it's been forgotten since then...
Meanwhile I
On Thursday, 8 October 2015 at 05:46:31 UTC, ketmar wrote:
On Thursday, 8 October 2015 at 04:38:43 UTC, tcak wrote:
Is it possible to modify GC (without rebuilding the compiler),
so it uses a given shared memory area instead of heap for
allocations?
sure. you don't need to rebuild the
I am "trying" to write a function that takes an array of items,
and returns the length of longest item.
[code]
size_t maxLength(A)( const A[] listOfString ) if( __traits(
hasMember, A, "length" ) )
{
return 0; // not implemented yet
}
[/code]
I tried it with
if( __traits( compiles,
On Thursday, 8 October 2015 at 09:29:30 UTC, tcak wrote:
I am "trying" to write a function that takes an array of items,
and returns the length of longest item.
[code]
size_t maxLength(A)( const A[] listOfString ) if( __traits(
hasMember, A, "length" ) )
{
return 0; // not
On Thursday, 8 October 2015 at 02:31:24 UTC, bitwise wrote:
If you have System.Collections.Generic.List(T) static class
member, there is nothing wrong with using it from multiple
threads like this:
The equivalent of your D example would be
class Foo {
static List numbers = new List();
On 10/08/15 11:29, tcak via Digitalmars-d-learn wrote:
> I am "trying" to write a function that takes an array of items, and returns
> the length of longest item.
>
> [code]
> size_t maxLength(A)( const A[] listOfString ) if( __traits( hasMember, A,
> "length" ) )
> {
> return 0; // not
GC is chosen at link time simply to satisfy unresolved symbols.
You only need to compile your modified GC and link with it, it
will be chosen instead of GC from druntime, no need to recompile
anything else.
On Thursday, 8 October 2015 at 09:29:30 UTC, tcak wrote:
I am "trying" to write a function that takes an array of items,
and returns the length of longest item.
[code]
size_t maxLength(A)( const A[] listOfString ) if( __traits(
hasMember, A, "length" ) )
{
return 0; // not
On Thursday, 8 October 2015 at 10:11:38 UTC, Kagamin wrote:
On Thursday, 8 October 2015 at 02:31:24 UTC, bitwise wrote:
If you have System.Collections.Generic.List(T) static class
member, there is nothing wrong with using it from multiple
threads like this:
The equivalent of your D example
On 10/7/15 1:27 AM, Laeeth Isharc wrote:
On Wednesday, 7 October 2015 at 02:53:32 UTC, Steven Schveighoffer wrote:
On 10/6/15 7:21 PM, Laeeth Isharc wrote:
could we have ssize_t defined in phobos somewhere so your code ends up
being portable ;) (It's trivial to do, obviously).
ptrdiff_t
On Thursday, 8 October 2015 at 09:50:12 UTC, John Colvin wrote:
On Thursday, 8 October 2015 at 09:29:30 UTC, tcak wrote:
[...]
I'm 99% sure something like __traits(hasMember, int[], "length"
) should evaluate to true. Please file a bug at
issues.dlang.org I notice it also doesn't work for
On Thursday, 8 October 2015 at 15:22:02 UTC, tcak wrote:
BTW, there is nothing like std.traits.hasLength.
yeah, that's because __traits(hasMember, ...) should be good
enough, but obviously not in this case at the moment.
On Thursday, 8 October 2015 at 15:22:02 UTC, tcak wrote:
BTW, there is nothing like std.traits.hasLength.
You're just looking in the wrong place =)
http://dlang.org/phobos/std_range_primitives.html#hasLength
On Thursday, 8 October 2015 at 13:44:46 UTC, bitwise wrote:
That still doesn't explain what you mean about it being illegal
in other languages or why you brought up C# in the first place.
Illegal means the resulting program behaves incorrectly,
potentially leading to silent failures and data
In my code I'm passing an array of BitArrays to a constructor
like this (though mostly as a placeholder):
Terrain t = new Terrain(1, 15, [
BitArray([1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]),
BitArray([1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1]),
BitArray([0, 0, 1, 1, 1, 0, 1, 1, 1, 1,
Thanks guys that was I was looking for!
On Thursday, 8 October 2015 at 20:42:46 UTC, Kagamin wrote:
On Thursday, 8 October 2015 at 13:44:46 UTC, bitwise wrote:
That still doesn't explain what you mean about it being
illegal in other languages or why you brought up C# in the
first place.
Illegal means the resulting program behaves
I was fighting with it a little bit and after all i just leave
original function which was in code, removed dependencies from
vibe.d and finally tried to contact api. Here is my present code:
#!/usr/bin/rdmd -L-lcurl
import std.stdio;
import std.string;
import std.file;
import std.datetime;
On Friday, 9 October 2015 at 04:04:57 UTC, holo wrote:
r.dateString = client.addRequestHeader("Authoryzation:",
"AWS4-HMAC-SHA256" ~ " " ~ "Credential=" ~ accKey ~ "/" ~
xamztime ~ "/" ~ zone ~ "/" ~ service ~ "/" ~ "aws4_request" ~
", " ~ "SignedHeaders=" ~ "content-type;host;x-amz-date" ~
On Thursday, 8 October 2015 at 13:32:17 UTC, Steven Schveighoffer
wrote:
On 10/7/15 1:27 AM, Laeeth Isharc wrote:
On Wednesday, 7 October 2015 at 02:53:32 UTC, Steven
Schveighoffer wrote:
On 10/6/15 7:21 PM, Laeeth Isharc wrote:
could we have ssize_t defined in phobos somewhere so your
code
20 matches
Mail list logo