On Thursday, 26 May 2016 at 22:15:42 UTC, ag0aep6g wrote:
On 05/26/2016 11:13 PM, Era Scarecrow wrote:
void scan(ref Data[][] data, Condition cond) {
foreach(i; ...) {
if (cond)
data[i] ~= ...
}
}
Sorry, I'm still lost. Why can't you do whatever you're doing
in
On 05/26/2016 11:13 PM, Era Scarecrow wrote:
By adding a struct overload for opOpAssign I can shrink it all down
to this, and avoid lengths entirely... As such internally the length
starts at 0, and checks are in place to ensure the bounds are never
exceeded.
void scan(ref Data[][] data, C
On Thursday, 26 May 2016 at 20:46:31 UTC, TheDGuy wrote:
On Thursday, 26 May 2016 at 20:25:43 UTC, Basile B. wrote:
[...]
I tried this with the gfm-package. I opened the dub.json file
as a project and clicked 'Compilation'-> 'Compile Project' then
it did its things:
[...]
gfm doesn't yie
On Thursday, 26 May 2016 at 12:33:31 UTC, Adam D. Ruppe wrote:
On Thursday, 26 May 2016 at 12:30:30 UTC, Alex Parrill wrote:
The line "not having to make another array to keep track of
lengths and then shorten them" is fairly vague. "Shortening"
an array via slicing is basically free (it's just
On Thursday, 26 May 2016 at 11:47:13 UTC, ag0aep6g wrote:
I don't follow. Why can't you use a built-in array? What can
you do with the stand-in that you can't do with the array
itself?
I can do the job with the built-in arrays, however the need for
another temporary array to keep track of le
On Thursday, 26 May 2016 at 20:25:43 UTC, Basile B. wrote:
But the procedure I described is very easy. you just have to
clone, compile and click a button in the library manager. It's
even better because you can choose which version to compile by
"git checkout vx.x.x" while using the "DUB button
On 25.05.2016 01:19, Elie Morisse wrote:
On Saturday, 13 October 2012 at 22:58:56 UTC, Timon Gehr wrote:
Afaik free-function operator overloads (but not in the context of
UFCS) were considered and turned down because D did not want to get
amidst discussions about adding Koenig lookup. UFCS does
On Thursday, 26 May 2016 at 19:07:42 UTC, TheDGuy wrote:
On Thursday, 26 May 2016 at 17:25:25 UTC, Basile B. wrote:
I'm on Windows now. I'm sorry but both packages were setup
successfully.
What you can do is the other way:
- clone the git repos.
- open the DUB json as project.
- choose the r
On Thursday, May 26, 2016 16:24:37 Elie Morisse via Digitalmars-d-learn wrote:
> On Thursday, 26 May 2016 at 06:23:17 UTC, Jonathan M Davis wrote:
> > The difference is that it's impossible to do
> > 10.opBinary!"+"(15), so if you're forced to do
> > foo.opBinary!"+"(bar) to get around a symbol con
On Thursday, 26 May 2016 at 17:25:25 UTC, Basile B. wrote:
I'm on Windows now. I'm sorry but both packages were setup
successfully.
What you can do is the other way:
- clone the git repos.
- open the DUB json as project.
- choose the right config in the inspector.
- compile.
- while the proje
On Thursday, 26 May 2016 at 17:09:03 UTC, TheDGuy wrote:
On Thursday, 26 May 2016 at 17:06:03 UTC, Basile B. wrote:
colorize works. You meant "serial-port" ?
Well, i get the same message for both packages...Even though it
creates a new folder with all the files in
AppData\Roaming\dub\package
On Thursday, 26 May 2016 at 17:09:03 UTC, TheDGuy wrote:
On Thursday, 26 May 2016 at 17:06:03 UTC, Basile B. wrote:
colorize works. You meant "serial-port" ?
Well, i get the same message for both packages...Even though it
creates a new folder with all the files in
AppData\Roaming\dub\package
On Thursday, 26 May 2016 at 17:09:03 UTC, TheDGuy wrote:
On Thursday, 26 May 2016 at 17:06:03 UTC, Basile B. wrote:
colorize works. You meant "serial-port" ?
Well, i get the same message for both packages...Even though it
creates a new folder with all the files in
AppData\Roaming\dub\package
On Thursday, 26 May 2016 at 17:06:03 UTC, Basile B. wrote:
On Thursday, 26 May 2016 at 17:02:06 UTC, TheDGuy wrote:
On Thursday, 26 May 2016 at 16:53:42 UTC, Basile B. wrote:
[...]
Thanks, now i found it.
If i try to add for example 'colorize' as a package i get:
Fetching serial-port ~maste
On Thursday, 26 May 2016 at 17:06:03 UTC, Basile B. wrote:
colorize works. You meant "serial-port" ?
Well, i get the same message for both packages...Even though it
creates a new folder with all the files in
AppData\Roaming\dub\packages
On 26.05.2016 17:11, TheDGuy wrote:
Hi,
i use Visual D as a plugin for visual studio to create D applications.
But what bothers me a bit is that i have to tell visual D the exact link
to the .lib file for every lib i want to use in the project (!).
So these are the steps i have to make to get a
On Thursday, 26 May 2016 at 17:02:06 UTC, TheDGuy wrote:
On Thursday, 26 May 2016 at 16:53:42 UTC, Basile B. wrote:
[...]
Thanks, now i found it.
If i try to add for example 'colorize' as a package i get:
Fetching serial-port ~master...
Placing serial-port ~master to
C:\Users\luc\AppData\Ro
On Thursday, 26 May 2016 at 16:53:42 UTC, Basile B. wrote:
- Registering a dub package from online is in the "library
manager"
- The DUB project editor is a widget that's not docked by
default, see in the menu "Windows", the item "Dub project
editor".
The Native project configuration and ed
On Thursday, 26 May 2016 at 17:02:06 UTC, TheDGuy wrote:
Thanks, now i found it.
If i try to add for example 'colorize' as a package i get:
Fetching serial-port ~master...
Placing serial-port ~master to
C:\Users\luc\AppData\Roaming\dub\packages\...
Neither a package description file, nor so
On Thursday, 26 May 2016 at 16:53:42 UTC, Basile B. wrote:
On Thursday, 26 May 2016 at 16:21:30 UTC, TheDGuy wrote:
On Thursday, 26 May 2016 at 16:01:22 UTC, Basile B. wrote:
To register a DUB package, you can either fetch (DUB icon) or
clone the repo, open the DUB JSON project, compile the rig
On Thursday, 26 May 2016 at 16:21:30 UTC, TheDGuy wrote:
On Thursday, 26 May 2016 at 16:01:22 UTC, Basile B. wrote:
To register a DUB package, you can either fetch (DUB icon) or
clone the repo, open the DUB JSON project, compile the right
config, then in the libman there's a icon with a gray ch
On Thursday, 26 May 2016 at 15:51:39 UTC, Basile B. wrote:
Oh, I'm so sorry ! I totally missed the point of the Q.
float.nan is not a "unique" value. Several values verify "nan"
(Look at std.math.isNan). So I suppose it's simpler to test
for nullity. Though with the sign there's also two poss
On Thursday, 26 May 2016 at 06:23:17 UTC, Jonathan M Davis wrote:
The difference is that it's impossible to do
10.opBinary!"+"(15), so if you're forced to do
foo.opBinary!"+"(bar) to get around a symbol conflict, it won't
work with built-in types.
Obviously operator overloading should be limi
On Thursday, 26 May 2016 at 16:01:22 UTC, Basile B. wrote:
To register a DUB package, you can either fetch (DUB icon) or
clone the repo, open the DUB JSON project, compile the right
config, then in the libman there's a icon with a gray chain
over a book. Click this icon and the library is regis
On Thursday, 26 May 2016 at 15:41:45 UTC, TheDGuy wrote:
On Thursday, 26 May 2016 at 15:21:40 UTC, Basile B. wrote:
Use Coedit: the widget "library manager" allow to register
libraries in a single click and then they are usable on the
fly, in the projects or in a runnable modules, without
sp
On Thursday, 26 May 2016 at 15:48:18 UTC, Basile B. wrote:
On Thursday, 26 May 2016 at 15:34:50 UTC, ArturG wrote:
On Thursday, 26 May 2016 at 15:29:52 UTC, Basile B. wrote:
float.init is not equal to 0.0f. In D FP points values are
initialized to nan (not a number).
By the way for strings
On Thursday, 26 May 2016 at 15:34:50 UTC, ArturG wrote:
On Thursday, 26 May 2016 at 15:29:52 UTC, Basile B. wrote:
float.init is not equal to 0.0f. In D FP points values are
initialized to nan (not a number).
By the way for strings it works, it's like the array case I
described in the firs
On Thursday, 26 May 2016 at 15:38:55 UTC, Basile B. wrote:
because nan is not 0 and that the shortcut for float is
if (fpValue) <=> if (fpValue != 0)
if (!fpValue)<=> if (fpValue == 0)
There's no relation between the initializer and the shortcut.
It's not because for some values the shortcut
On Thursday, 26 May 2016 at 15:21:40 UTC, Basile B. wrote:
Use Coedit: the widget "library manager" allow to register
libraries in a single click and then they are usable on the
fly, in the projects or in a runnable modules, without
specifying anything (except a (*) in a project setting calle
On 05/26/2016 05:28 PM, ArturG wrote:
On Thursday, 26 May 2016 at 15:25:26 UTC, ag0aep6g wrote:
[...]
What does it matter?
You would have to create special cases for them.
When? If you want to check if something is the .init value, compare
against .init.
On Thursday, 26 May 2016 at 15:34:50 UTC, ArturG wrote:
On Thursday, 26 May 2016 at 15:29:52 UTC, Basile B. wrote:
float.init is not equal to 0.0f. In D FP points values are
initialized to nan (not a number).
By the way for strings it works, it's like the array case I
described in the firs
On Thursday, 26 May 2016 at 15:29:52 UTC, Basile B. wrote:
float.init is not equal to 0.0f. In D FP points values are
initialized to nan (not a number).
By the way for strings it works, it's like the array case I
described in the first answer).
yes i guess i tested all/most types and know
Hi,
i use Visual D as a plugin for visual studio to create D
applications. But what bothers me a bit is that i have to tell
visual D the exact link to the .lib file for every lib i want to
use in the project (!).
So these are the steps i have to make to get an external lib
working:
1. create
On Thursday, 26 May 2016 at 15:11:05 UTC, TheDGuy wrote:
Hi,
i use Visual D as a plugin for visual studio to create D
applications. But what bothers me a bit is that i have to tell
visual D the exact link to the .lib file for every lib i want
to use in the project (!).
So these are the steps i
On Thursday, 26 May 2016 at 15:25:03 UTC, arturg wrote:
On Thursday, 26 May 2016 at 15:15:57 UTC, Basile B. wrote:
On Thursday, 26 May 2016 at 15:14:21 UTC, Basile B. wrote:
On Thursday, 26 May 2016 at 15:11:50 UTC, Basile B. wrote:
On Thursday, 26 May 2016 at 14:03:16 UTC, ArturG wrote:
[...
On Thursday, 26 May 2016 at 15:25:26 UTC, ag0aep6g wrote:
On 05/26/2016 04:03 PM, ArturG wrote:
for example:
if(any floatingpoint.init) will be true
if(any char.init) also true
if("") also true
while others are false e.g.
string s;
if(s) will be false
all others are also false or did i miss a
On 05/26/2016 04:03 PM, ArturG wrote:
for example:
if(any floatingpoint.init) will be true
if(any char.init) also true
if("") also true
while others are false e.g.
string s;
if(s) will be false
all others are also false or did i miss any?
What does it matter?
On Thursday, 26 May 2016 at 15:15:57 UTC, Basile B. wrote:
On Thursday, 26 May 2016 at 15:14:21 UTC, Basile B. wrote:
On Thursday, 26 May 2016 at 15:11:50 UTC, Basile B. wrote:
On Thursday, 26 May 2016 at 14:03:16 UTC, ArturG wrote:
[...]
[...]
- integral(*): if (i) <=> if (i > 0)
I obvio
On Thursday, 26 May 2016 at 15:14:21 UTC, Basile B. wrote:
On Thursday, 26 May 2016 at 15:11:50 UTC, Basile B. wrote:
On Thursday, 26 May 2016 at 14:03:16 UTC, ArturG wrote:
[...]
[...]
- integral(*): if (i) <=> if (i > 0)
I obviously meant:
- integral(*): if (i) <=> if (i <> 0)
and "<=>
On Thursday, 26 May 2016 at 15:11:50 UTC, Basile B. wrote:
On Thursday, 26 May 2016 at 14:03:16 UTC, ArturG wrote:
[...]
[...]
- integral(*): if (i) <=> if (i > 0)
I obviously meant:
- integral(*): if (i) <=> if (i <> 0)
and "<=>" stands for "equivalence"
On Thursday, 26 May 2016 at 14:03:16 UTC, ArturG wrote:
for example:
if(any floatingpoint.init) will be true
if(any char.init) also true
if("") also true
while others are false e.g.
string s;
if(s) will be false
all others are also false or did i miss any?
It's a shortcut that works for cert
On Thursday, 26 May 2016 at 14:12:23 UTC, chmike wrote:
I couldn't find any information about this on the dlang web
site.
What is the effect adding the immutable attribute to a class
like this
immutable class MyClass { ... }
The compiler doesn't complain.
Will it add the immutable attribute
On Thursday, May 26, 2016 14:12:23 chmike via Digitalmars-d-learn wrote:
> I couldn't find any information about this on the dlang web site.
>
> What is the effect adding the immutable attribute to a class like
> this
>
> immutable class MyClass { ... }
>
> The compiler doesn't complain.
> Will it
On Thursday, 26 May 2016 at 14:12:23 UTC, chmike wrote:
I couldn't find any information about this on the dlang web
site.
What is the effect adding the immutable attribute to a class
like this
immutable class MyClass { ... }
The compiler doesn't complain.
Will it add the immutable attribute
Hi,
Whenever I try to compile code that relies on
Runtime.loadLibrary, I get a linker error during compilation.
```
Undefined symbols for architecture x86_64:
"_rt_loadLibrary", referenced from:
_D4core7runtime7Runtime17__T11loadLibraryZ11loadLibraryFxAaZPv in
ll_test.o
ld: symbol(s
I couldn't find any information about this on the dlang web site.
What is the effect adding the immutable attribute to a class like
this
immutable class MyClass { ... }
The compiler doesn't complain.
Will it add the immutable attribute to all members ?
for example:
if(any floatingpoint.init) will be true
if(any char.init) also true
if("") also true
while others are false e.g.
string s;
if(s) will be false
all others are also false or did i miss any?
On Thursday, 26 May 2016 at 07:51:46 UTC, Era Scarecrow wrote:
If the ptr is at offset 0, we declare it first, otherwise
second, simple... Except this fails since "no property
'offsetof' for type 'void*'". SO... I make a template to test
for it instead.
Built-in arrays are kinda magical and
On Thursday, 26 May 2016 at 12:30:30 UTC, Alex Parrill wrote:
The line "not having to make another array to keep track of
lengths and then shorten them" is fairly vague. "Shortening" an
array via slicing is basically free (it's just some integer
arithmetic), but I'm not sure if that's what you
On Thursday, 26 May 2016 at 07:51:46 UTC, Era Scarecrow wrote:
...
This smells like an XY problem [0]. Why exactly do you need the
internal layout of the array structure?
The line "not having to make another array to keep track of
lengths and then shorten them" is fairly vague. "Shortening"
On 05/26/2016 09:51 AM, Era Scarecrow wrote:
So I'm experimenting and want to override how arrays are managed for a
short duration, this is for optimization of not having to make another
array to keep track of lengths and then shorten them when i can in fact
just manage it myself *very* briefly
On Wednesday, 25 May 2016 at 15:44:34 UTC, Marc Schütz wrote:
On Tuesday, 24 May 2016 at 20:58:11 UTC, John Nixon wrote:
On Tuesday, 24 May 2016 at 15:17:37 UTC, Adam D. Ruppe wrote:
On Tuesday, 24 May 2016 at 14:29:53 UTC, John Nixon wrote:
Or add an explicit constructor:
struct CS {
On Thursday, 26 May 2016 at 09:16:48 UTC, Kagamin wrote:
try this:
struct X
{
byte[] data;
alias data this;
}
This doesn't help me with what I want, and effectively does
nothing as far as I can tell. Although testing is showing
managing the pointer & length directly is a lit
try this:
struct X
{
byte[] data;
alias data this;
}
On Wednesday, 25 May 2016 at 19:07:32 UTC, Era Scarecrow wrote:
On Wednesday, 25 May 2016 at 13:27:28 UTC, Chris wrote:
Why can the tuple be iterated with foreach, as in my quick
fix, and indexed with tuple[0..], but is not accepted as a
range? What are the differences? Is there a way to rangif
So I'm experimenting and want to override how arrays are managed
for a short duration, this is for optimization of not having to
make another array to keep track of lengths and then shorten them
when i can in fact just manage it myself *very* briefly.
So, I need to make sure the structure is
On Thursday, 26 May 2016 at 05:47:36 UTC, Era Scarecrow wrote:
On Thursday, 26 May 2016 at 05:20:25 UTC, vitus wrote:
Why 'alias wln1 = writeln;' doesnt't work but 'alias wln2 =
std.stdio.writeln;' work when import is not static? Why
'wln2("test");' work but 'std.stdio.writeln("test");' doesn't
57 matches
Mail list logo