On Thursday, 6 October 2016 at 03:05:18 UTC, Patric Dexheimer
wrote:
But why i´m overwriting the struct if its the first time i´m
putting it there? (like on the array).
There's a difference between initialization and assignment.
```
// Given this structure
struct MyStruct { int x; }
//
On Thursday, 6 October 2016 at 03:05:18 UTC, Patric Dexheimer
wrote:
But why i´m overwriting the struct if its the first time i´m
putting it there? (like on the array).
The compiler doesn't know it is the first time (it doesn't follow
the data from creation, it just looks at that individual
On Thursday, 6 October 2016 at 02:09:44 UTC, Adam D. Ruppe wrote:
On Thursday, 6 October 2016 at 01:23:35 UTC, Patric Dexheimer
wrote:
Why?
Because you'd be overwriting that immutable member. Structs
just put structure around their contents, but it doesn't change
their nature. That struct
On Wednesday, 5 October 2016 at 12:12:24 UTC, Basile B. wrote:
On Wednesday, 5 October 2016 at 11:45:49 UTC, Laeeth Isharc
wrote:
I noticed the problem before - previously it was my fault.
I had a circulator dependency where A imported B, B did a
selective import of C and C imported A
On Thursday, 6 October 2016 at 00:13:20 UTC, WhatMeWorry wrote:
Dub/Derelict is returning the following error at the D line:
DerelictFT.load(); // Load the FreeType library
On Thursday, 6 October 2016 at 01:23:35 UTC, Patric Dexheimer
wrote:
Why?
Because you'd be overwriting that immutable member. Structs just
put structure around their contents, but it doesn't change their
nature. That struct is no different than if you wrote `immutable
size_t` as the value -
struct Test{
immutable size_t id;
}
Test[string] dict;
Test[] array;
void main(){
array~=Test(1);//work
dict["teste"] = Test(1); //fail ??
}
"Error: cannot modify struct dict["teste"] Test with immutable
members"
Why?
Dub/Derelict is returning the following error at the D line:
DerelictFT.load(); // Load the FreeType library
derelict.util.exception.SharedLibLoadException@C:\Users\kheaser\AppData\Roaming\dub\packages\derelict-util-2.0.6\source\derelict\util\exception.d(35):
Failed to
load one or
On Wednesday, 5 October 2016 at 12:48:07 UTC, Jonathan M Davis
wrote:
On Wednesday, October 05, 2016 11:25:57 Begah via
Digitalmars-d-learn wrote:
[...]
Unless you're writing lock-free algorithms (which really should
only be done by experts, and even then, they should probably
reconsider
On 10/05/2016 12:30 PM, Jonathan M Davis via Digitalmars-d-learn wrote:
> On Wednesday, October 05, 2016 19:22:03 pineapple via
Digitalmars-d-learn
> wrote:
>> Would just like to point out that this is design weirdness on
>> Phobos' part - the library I've been writing does not have this
>>
On Wednesday, October 05, 2016 19:22:03 pineapple via Digitalmars-d-learn
wrote:
> On Wednesday, 5 October 2016 at 18:19:27 UTC, TheGag96 wrote:
> > On Wednesday, 5 October 2016 at 02:19:13 UTC, Jonathan M Davis
> >
> > wrote:
> >> The problem is that static arrays aren't ranges (calling
> >>
On Wednesday, 5 October 2016 at 18:19:27 UTC, TheGag96 wrote:
On Wednesday, 5 October 2016 at 02:19:13 UTC, Jonathan M Davis
wrote:
The problem is that static arrays aren't ranges (calling
popFront on them can't work, because their length isn't
mutable). However, you can slice a static array
On Wednesday, 5 October 2016 at 02:19:13 UTC, Jonathan M Davis
wrote:
The problem is that static arrays aren't ranges (calling
popFront on them can't work, because their length isn't
mutable). However, you can slice a static array to get a
dynamic array which _is_ a range. e.g.
On Wednesday, 5 October 2016 at 12:12:24 UTC, Basile B. wrote:
On Wednesday, 5 October 2016 at 11:45:49 UTC, Laeeth Isharc
wrote:
I noticed the problem before - previously it was my fault.
I had a circulator dependency where A imported B, B did a
selective import of C and C imported A
On Tuesday, 4 October 2016 at 16:09:34 UTC, Darren wrote:
Back again with another little problem that isn't specifically
OpenGL related, but is a result of getting such code to work.
I actually figured it out; my own mistakes.
Depends on the license text.
On Wednesday, October 05, 2016 11:25:57 Begah via Digitalmars-d-learn wrote:
> On Wednesday, 5 October 2016 at 07:36:58 UTC, Jonathan M Davis
>
> wrote:
> > On Tuesday, October 04, 2016 19:22:10 Begah via
> >
> > Digitalmars-d-learn wrote:
> >> How can I make a method that accepts being called by
On 2016-10-05 11:39, Martin Nowak wrote:
Because you're linking with druntime/phobos which drags in plenty of
symbols (including a GC). Also Jakob is showing the symbols of the
object file, not executable.
No. There's a difference between DMD 2.070.0 and 2.071.0:
$ cat main.d
module main;
On Wednesday, 5 October 2016 at 11:46:14 UTC, Adam D. Ruppe wrote:
On Wednesday, 5 October 2016 at 11:43:12 UTC, John C wrote:
Is there a way to convert something like AliasSeq!(int, int,
int) to an int[] - the opposite of aliasSeqOf?
If it is a legal array (matching types), just put []
On Wednesday, 5 October 2016 at 11:45:49 UTC, Laeeth Isharc wrote:
I noticed the problem before - previously it was my fault.
I had a circulator dependency where A imported B, B did a
selective import of C and C imported A selectively. That led
to link problems with module constructors.
On Wednesday, 5 October 2016 at 11:43:12 UTC, John C wrote:
Is there a way to convert something like AliasSeq!(int, int,
int) to an int[] - the opposite of aliasSeqOf?
If it is a legal array (matching types), just put [] around it.
int[] arr = [ AliasSeq!(1,2,3) ];
An AliasSeq is
I noticed the problem before - previously it was my fault.
I had a circulator dependency where A imported B, B did a
selective import of C and C imported A selectively. That led to
link problems with module constructors.
Here I noticed it in a different context. Simple two-page main
code
Is there a way to convert something like AliasSeq!(int, int, int)
to an int[] - the opposite of aliasSeqOf?
On Wednesday, 5 October 2016 at 07:36:58 UTC, Jonathan M Davis
wrote:
On Tuesday, October 04, 2016 19:22:10 Begah via
Digitalmars-d-learn wrote:
How can I make a method that accepts being called by both a
shared and non-shared object, to prevent having to copy
methods and adding a "shared"?
On Monday, 19 September 2016 at 21:09:39 UTC, Gary Willoughby
wrote:
On Monday, 20 June 2016 at 06:35:32 UTC, Jacob Carlborg wrote:
On 2016-06-19 21:53, Gary Willoughby wrote:
If compiled with -betterC, it contains these:
T _main
U _printf
I get
That makes sense :). Thanks
Dne 5.10.2016 v 10:27 Mike Parker via Digitalmars-d-learn napsal(a):
On Wednesday, 5 October 2016 at 08:23:25 UTC, Mike Parker wrote:
The ~> constrains the dependency to the minor version number, meaning
DUB will not try to use a version of the dependency that
On Wednesday, 5 October 2016 at 08:23:25 UTC, Mike Parker wrote:
The ~> constrains the dependency to the minor version number,
meaning DUB will not try to use a version of the dependency
that has a higher minor version.
Oh, that came out wrong. TO be clear for anyone who doesn't read
the
On Wednesday, 5 October 2016 at 08:01:33 UTC, Daniel Kozak wrote:
I really does not understand how does DUB works. I have small
app which use vibe-d:core as dependency, and I use libasync as
subConfiguration. When I try to build my app it always try to
download libasync-0.7.9 instead of
I really does not understand how does DUB works. I have small app
which use vibe-d:core as dependency, and I use libasync as
subConfiguration. When I try to build my app it always try to
download libasync-0.7.9 instead of libasync-0.8.0. Why? I would
expect to select the latest one frum dub
On Tuesday, October 04, 2016 19:22:10 Begah via Digitalmars-d-learn wrote:
> How can I make a method that accepts being called by both a
> shared and non-shared object, to prevent having to copy methods
> and adding a "shared"?
You could templatize them, but really, the idea is that you _don't_
30 matches
Mail list logo