On Wednesday, 13 June 2018 at 17:37:44 UTC, Steven Schveighoffer
wrote:
Hm... the only way to do it in D is to provide a function that
checks whether the small vector optimization is in play, and
return a pointer/slice to itself.
With D it is possible to alias the getter function that
On Wednesday, 13 June 2018 at 14:56:10 UTC, 9il wrote:
Hi,
I am trying to build a large project that is split into dozen
of sub-packages.
How I can do it using dub without writing my own doc scripts?
--combined does not help here.
Best regards,
Ilya
UPDATE: --combined works, but DDOX fails
Hi all,
I now really appreciate the power Ranges provide and am an avid
consumer, but am only slowly becoming accustomed to implementing
my own.
In the present problem, I am writing a binding to a C library
(htslib) that provides many functions related to high-throughput
sequencing files.
On Wednesday, 13 June 2018 at 23:34:02 UTC, Murilo wrote:
Does D use ASCII or UNICODE? It seems to use ASCII since it
causes error whenever I use a non-ASCII character.
Your system might be misconfigured. D can use UTF-8 (Unicode)
too. See https://dlang.org/spec/lex.html#source_text
Does D use ASCII or UNICODE? It seems to use ASCII since it
causes error whenever I use a non-ASCII character.
On Wednesday, June 13, 2018 14:33:48 Jonathan M Davis via Digitalmars-d-
learn wrote:
> On Wednesday, June 13, 2018 07:35:25 RazvanN via Digitalmars-d-learn
wrote:
> > Hello,
> >
> > I'm having a hard time understanding whether this inconsistency
> > is a bug or intended behavior:
> >
> >
On Wednesday, June 13, 2018 07:35:25 RazvanN via Digitalmars-d-learn wrote:
> Hello,
>
> I'm having a hard time understanding whether this inconsistency
> is a bug or intended behavior:
>
> immutable class Foo {}
> immutable struct Bar {}
>
> void main()
> {
> import std.stdio : writeln;
>
On Friday, 8 June 2018 at 08:21:39 UTC, evilrat wrote:
On Friday, 8 June 2018 at 08:06:27 UTC, Arafel wrote:
On Thursday, 7 June 2018 at 13:07:21 UTC, evilrat wrote:
I don't think so. It clearly states that children must mixin
too, which can mean it just grabs symbols in scope only, and
On Wednesday, June 13, 2018 10:56:41 wjoe via Digitalmars-d-learn wrote:
> On Wednesday, 13 June 2018 at 03:14:33 UTC, Jonathan M Davis
>
> wrote:
> > Most programs do not handle the case where they run out of
> > memory and cannot continue at that point. For better or worse,
> > D's GC was
On 6/13/18 1:08 PM, Michał wrote:
On Wednesday, 13 June 2018 at 16:40:51 UTC, Steven Schveighoffer wrote:
On 6/13/18 10:43 AM, Michał wrote:
When I pass my struct to function something is going wrong. I don't
know how to fix it.
Code:
import std.stdio;
void print(ref Vector v, string s){
On Wednesday, 13 June 2018 at 16:40:51 UTC, Steven Schveighoffer
wrote:
On 6/13/18 10:43 AM, Michał wrote:
When I pass my struct to function something is going wrong. I
don't know how to fix it.
Code:
import std.stdio;
void print(ref Vector v, string s){
writefln("%s==%s %s", ,
On Wednesday, 13 June 2018 at 13:05:44 UTC, Kagamin wrote:
On Wednesday, 13 June 2018 at 10:56:41 UTC, wjoe wrote:
I understand the idea that an Error is not supposed to be
caught but why would such a 'feature' be desirable? Where's
the benefit if nothing can be relied upon ?
It's a
On Wednesday, 13 June 2018 at 12:59:27 UTC, Kagamin wrote:
On Wednesday, 13 June 2018 at 02:02:54 UTC, wjoe wrote:
it is possible to install a signal handler for almost every
signal on POSIX, including segfault. The only signal you can't
catch is signal 9 - sigkill if memory serves.
So I could
On 6/13/18 10:43 AM, Michał wrote:
When I pass my struct to function something is going wrong. I don't know
how to fix it.
Code:
import std.stdio;
void print(ref Vector v, string s){
writefln("%s==%s %s", , v.ptr, s);
}
struct Vector {
int x;
int* ptr;
this(this)
On 6/13/18 8:44 AM, Kagamin wrote:
On Tuesday, 12 June 2018 at 14:15:42 UTC, Steven Schveighoffer wrote:
I predict at some point when Errors actually don't do proper cleanup,
it is going to be a really difficult time for D.
Looks like it already doesn't: https://run.dlang.io/is/OhDwtW
Damn,
On 6/13/18 3:24 AM, Mike Franklin wrote:
Because D is more evolution then intelligent design, unfortunately.
I had to LOL on this, nice :)
-Steve
On 6/13/18 3:35 AM, RazvanN wrote:
Hello,
I'm having a hard time understanding whether this inconsistency is a bug
or intended behavior:
immutable class Foo {}
immutable struct Bar {}
void main()
{
import std.stdio : writeln;
Foo a;
Bar b;
writeln("typeof(a): ",
On 6/13/18 1:18 AM, Flaze07 wrote:
I see, so it means that only char is affected, gotcha
Well, char[] and wchar[]. dchar[] is treated as an array by Phobos. But
calling byCodeUnit on a dchar array should work just like an array as
well, so using it is the most generic solution.
-Steve
Hi,
I am trying to build a large project that is split into dozen of
sub-packages.
How I can do it using dub without writing my own doc scripts?
--combined does not help here.
Best regards,
Ilya
When I pass my struct to function something is going wrong. I
don't know how to fix it.
Code:
import std.stdio;
void print(ref Vector v, string s){
writefln("%s==%s%s", , v.ptr, s);
}
struct Vector {
int x;
int* ptr;
this(this) {
On Wednesday, 13 June 2018 at 10:56:41 UTC, wjoe wrote:
I understand the idea that an Error is not supposed to be
caught but why would such a 'feature' be desirable? Where's the
benefit if nothing can be relied upon ?
It's a debugging facility for development stage that allows to
print the
On Wednesday, 13 June 2018 at 02:02:54 UTC, wjoe wrote:
it is possible to install a signal handler for almost every
signal on POSIX, including segfault. The only signal you can't
catch is signal 9 - sigkill if memory serves.
So I could for instance install a clean up handler on a
segfault via
On Tuesday, 12 June 2018 at 14:15:42 UTC, Steven Schveighoffer
wrote:
I predict at some point when Errors actually don't do proper
cleanup, it is going to be a really difficult time for D.
Looks like it already doesn't: https://run.dlang.io/is/OhDwtW
On Wednesday, 13 June 2018 at 10:57:27 UTC, Malte wrote:
I want to import a config file at compile time, but also need a
way to have multiple configurations.
With gcc you could do something like
-DIMPORTFROM='"MyConfigFile.txt"'. Is there any equivalent in D?
Hardcoding the config files for
I want to import a config file at compile time, but also need a
way to have multiple configurations.
With gcc you could do something like
-DIMPORTFROM='"MyConfigFile.txt"'. Is there any equivalent in D?
Hardcoding the config files for different versions and using that
is not an option.
On Wednesday, 13 June 2018 at 03:14:33 UTC, Jonathan M Davis
wrote:
Most programs do not handle the case where they run out of
memory and cannot continue at that point. For better or worse,
D's GC was designed with that in mind, and it treats failed
allocations as an Error. In the vast
Hello,
I'm having a hard time understanding whether this inconsistency
is a bug or intended behavior:
immutable class Foo {}
immutable struct Bar {}
void main()
{
import std.stdio : writeln;
Foo a;
Bar b;
writeln("typeof(a): ", typeof(a).stringof);
writeln("typeof(b): ",
On Wednesday, 13 June 2018 at 07:19:24 UTC, Gokhhy wrote:
Nevermind, it doesn't affect functions inside classes and
structs.
Yeah, that's kindof unfortunate isn't it. Just do the same thing
within the class/struct scope.
class C {
@nogc:
void nogcMethod1() {}
void nogcMehtod2()
On Wednesday, 13 June 2018 at 07:14:35 UTC, Gokhhy wrote:
On Wednesday, 13 June 2018 at 07:11:56 UTC, Mike Franklin wrote:
On Wednesday, 13 June 2018 at 06:45:27 UTC, Gokhhy wrote:
Is there a way to define an entire module as @nogc or
otherwise make it so I don't have to qualify every single
On Wednesday, 13 June 2018 at 06:45:27 UTC, Gokhhy wrote:
Is there a way to define an entire module as @nogc or otherwise
make it so I don't have to qualify every single function as
@nogc?
---
module module_wide-nogc;
@nogc:
/*
declarations or statements...
*/
---
But this is not
On Wednesday, 13 June 2018 at 06:45:27 UTC, Gokhhy wrote:
Is there a way to define an entire module as @nogc or otherwise
make it so I don't have to qualify every single function as
@nogc?
You can put attributes at the top of a module followed by a ":"
to have them apply to everything below
On Wednesday, 13 June 2018 at 07:11:56 UTC, Mike Franklin wrote:
On Wednesday, 13 June 2018 at 06:45:27 UTC, Gokhhy wrote:
Is there a way to define an entire module as @nogc or
otherwise make it so I don't have to qualify every single
function as @nogc?
You can put attributes at the top of a
Is there a way to define an entire module as @nogc or otherwise
make it so I don't have to qualify every single function as @nogc?
33 matches
Mail list logo