On Monday, 2 May 2016 at 10:15:04 UTC, Marc Schütz wrote:
This check can be done purely by looking at the tokens.
In other words it's trivial for D-Scanner to warn about this.
https://github.com/Hackerpilot/Dscanner/issues/341
On Wednesday, 4 May 2016 at 23:19:08 UTC, Jonathan Villa wrote:
What I'm doing wrong? :<
All right. D's type system is marking the `Session` constructor
as `shared`. This makes the check `static if
(is(typeof(result.__ctor(args` in std.conv.emplace fail
because `result` is a non-shared `
On Wednesday, 4 May 2016 at 23:34:52 UTC, Jonathan Villa wrote:
On Wednesday, 4 May 2016 at 23:33:28 UTC, Brian Schott wrote:
On Wednesday, 4 May 2016 at 23:19:08 UTC, Jonathan Villa wrote:
What I'm doing wrong? :<
I see that the types of `id_user` aren't necessarily the same
between `create
On Wednesday, 4 May 2016 at 23:19:08 UTC, Jonathan Villa wrote:
What I'm doing wrong? :<
I see that the types of `id_user` aren't necessarily the same
between `create` and `this`.
On Monday, 11 April 2016 at 23:01:08 UTC, marcpmichel wrote:
Is it because Linux is not an OS ? :p
I gnu somebody would bring that up.
On Monday, 18 January 2016 at 05:20:42 UTC, WhatMeWorry wrote:
I can workaround the problem but it seems like a kludge; I'm
curious about the subtleties of this problems.
You can't have a variable with the same name as a module because
they're both symbols with the same name. It messes up the
On Tuesday, 10 November 2015 at 10:28:45 UTC, Marc Schütz wrote:
This fails, too:
static assert(is(AliasSeq!(char) : AliasSeq!(dchar)));
Which makes sense IMO, because it can be thought of as an
unnamed struct, cp. the following:
struct A { char c; }
struct B { dchar c; }
static assert(is(A :
On Tuesday, 10 November 2015 at 01:29:11 UTC, Brian Schott wrote:
Yes. It's a hack that gives you a modulus without having to do
a modulus. It only works on powers of two.
http://graphics.stanford.edu/~seander/bithacks.html#ModulusDivisionEasy
On Monday, 9 November 2015 at 21:33:09 UTC, TheFlyingFiddle wrote:
On Monday, 9 November 2015 at 04:52:37 UTC, rsw0x wrote:
On Monday, 9 November 2015 at 04:29:30 UTC, Rikki Cattermole
wrote:
Fwiw, EMSI provides high quality containers backed by
std.experimental.allocator.
https://github.com/e
On Monday, 9 November 2015 at 05:49:25 UTC, tcak wrote:
I checked for a flag in this page
http://dlang.org/dmd-linux.html , but couldn't have found any
for this purpose.
Is there a way to parse a d source file so it generates a tree
in JSON, XML, or something-that-can-be-processed-easily file
Given the following code:
```
import std.meta;
static assert(is(char : dchar));
static assert(is(AliasSeq!(int, char) : AliasSeq!(int, char)));
static assert(is(AliasSeq!(int, char) : AliasSeq!(int, dchar)));
```
The third static assert fails. Should it, given that the first
and second pass?
On Thursday, 22 October 2015 at 22:06:47 UTC, Nordlöw wrote:
Can't I use InSituRegion in this way?
No.
InSituRegion is not copyable. Try creating a
`HashSet!(InSituRegion*)` instead.
On Thursday, 14 May 2015 at 00:29:06 UTC, Dennis Ritchie wrote:
Why doesn't the compiler produces an error?
-
import std.stdio;
void main() {
writeln({});
}
-
http://ideone.com/qTZCAd
You told it to output a function literal, so it did.
(That or you told it to output a struct
On Friday, 8 May 2015 at 12:44:31 UTC, Artur Skawina wrote:
On 05/08/15 03:53, Brian Schott via Digitalmars-d-learn wrote:
The problem occurs when I want to register multiple modules to
scan for functions. The grammar does not allow this syntax:
```
template (alias Modules
On Friday, 8 May 2015 at 02:03:17 UTC, Rikki Cattermole wrote:
Can you not use something like this?
Yes. I was getting confused by another problem that I had just
worked on before this one.
I have some code that automatically wires up control flow based
on annotations. Use of this code looks something like this:
```
import some_package.some_module;
void main(string[] args) {
doMagicStuff!(some_package.some_module)(args);
}
```
All of this works and everything is happy (Except t
What you're trying to do is currently impossible. I filed a bug
(https://issues.dlang.org/show_bug.cgi?id=14525) because what
you're trying to do really should be possible.
import std.stdio : writefln;
import std.getopt;
void main(string[] args)
{
string fname;
try
{
getopt
On Monday, 30 March 2015 at 22:34:00 UTC, matovitch wrote:
Hi again again,
ulong u = 1 << 63;
Raise :
Error: shift by 63 is outside the range 0..31
This is a bug isn't it, the ulong are supposed to be on 64 bits
? I guess it's time I go to bed.
Have a nice night !
The problem is that `1`
On Wednesday, 8 October 2014 at 01:16:50 UTC, K.K. wrote:
Is there a way to generate variable names using strings? What
I'm
trying to do in this particular case is use a for loop, to
generate variables (then probably put them in an array in the
end) that represent images. So the name is pretty m
On Wednesday, 17 September 2014 at 15:27:40 UTC, Justin Whear
wrote:
These containers are all certified GC-free.
With the exception of getting keys and values arrays. Those
return GC memory to the caller. I'm pretty sure it's documented
that it does that though. Everything else uses allocator
It would be nice if we could at least allow both "nothrow" and
"@nothrow". Because "nothrow" is already a keyword there's no
possibility of a UDA overriding it. This would at least give
people the option of making their code look nicer.
The "delete" keyword is deprecated[1] and making that dec
I'd be more convinced if the following statements were false:
1. Writing an automated upgrade tool is difficult
2. The compiler would have no way of knowing what @nothrow means
On Wednesday, 27 August 2014 at 19:25:42 UTC, Gary Willoughby
wrote:
Why don't you need to dereference the pointer 'foo' to reach
its member 'bar'?
The compiler inserts the dereference for you. (It knows which
types are references and which are values and can do this
correctly) This makes the
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, 11 August 2014 at 22:20:54 UTC, Brian Schott wrote:
On Monday, 11 August 2014 at 19:47:46 UTC, Klaus wrote:
I mean when writing a D lexer, you necessarly reach the moment
when you think:
"Oh no! is this feature just here to suck ?"
They are and they do.
Also, use this: https://g
On Monday, 11 August 2014 at 19:47:46 UTC, Klaus wrote:
I mean when writing a D lexer, you necessarly reach the moment
when you think:
"Oh no! is this feature just here to suck ?"
They are and they do.
On Friday, 1 August 2014 at 23:33:22 UTC, Freddy wrote:
On Friday, 1 August 2014 at 23:22:06 UTC, bearophile wrote:
Freddy:
uint[uint] test;
void main(){
test=[0:2 ,1:3 ,2:4];
writeln(test.map!(a=>a-2));
}
If you need keys or values you have .keys .values, .byKey,
.byValue
On Tuesday, 13 May 2014 at 19:53:17 UTC, Tim Holzschuh via
Digitalmars-d-learn wrote:
Hi there,
I read a book about an introduction to creating programming
languages (really basic).
The sample code is written in Ruby, but I want to rewrite the
examples in D.
However, the Lexer uses Ruby's r
28 matches
Mail list logo