On Saturday, 17 February 2018 at 14:54:37 UTC, ag0aep6g wrote:
Nordlöw's methods are only weakly pure. They have mutable
indirections either in the return type or in a parameter type.
So calls to them should not be optimized away.
I found a solution at
El 17/02/18 a les 18:49, Martin Tschierschke via Digitalmars-d-learn ha escrit:
> But the installation via apt-get is not working without the steps already
> mentioned in the post before! (s/http/https/ and manually import of the
> public key)
"d-apt.list" file fixed! (s/http/https/)
d-apt
On Saturday, 17 February 2018 at 20:30:16 UTC, Saravana Kumar
Arumugam wrote:
...Make sure you also renamed the file "FileTrackerUI.dll" to
"FileTracker32UI.dll" in the latest LCID folder...
Don't forget to make copy!! That'll bring you even more problems
while compiling other projects! It
On Friday, 2 February 2018 at 08:56:45 UTC, Markus wrote:
On Tuesday, 21 November 2017 at 04:39:52 UTC, A Guy With a
Question wrote:
I'm trying to learn D using Visual D in Visual Studio
Community 2015. Both dmd and ldc give me this error when
building from Visual Studio. Any ideas? I'm able
On 2/17/18 9:54 AM, ag0aep6g wrote:
On 02/17/2018 03:04 PM, Steven Schveighoffer wrote:
You have to be a bit careful here. pure functions can assume nothing
is happening and simply not call the function.
That's only a problem when the called function is strongly pure, right?
Nordlöw's
double[][] skalar_m_2d(double[][] arr, double skalar)
{
import std.algorithm;
// return arr.map(a=> a[] *= skalar).array;
arr.each!((ref a) => a[] *= skalar));
return arr;
}
On Wednesday, 14 February 2018 at 11:23:48 UTC, Andrea Fontana
wrote:
On Wednesday, 14 February 2018 at 11:16:25 UTC, Martin
Tschierschke wrote:
Ok, good to know!
I started with 16.04 and made the initial mistake to take the
32 Bit version,
do you use 32 or 64 Bit?
64bit of course!
Andrea
On Saturday, 17 February 2018 at 16:12:48 UTC, thorstein wrote:
public double[][] skalar_m_2d(double[][] array, double skalar)
{
return array.map!(b => b[].map!(c => c * skalar));
}
It'd probably be better to just do that in-place...
foreach(row; array)
row[] *= skalar;
return array;
On Saturday, 17 February 2018 at 16:12:48 UTC, thorstein wrote:
Hello,
This was my goal:
-
public double[][] skalar_m_2d(double[][] array, double skalar)
{
return array.map!(b => b[].map!(c => c * skalar));
}
!!! But: return value is not double!
Type check for return value:
Hello,
This was my goal:
-
public double[][] skalar_m_2d(double[][] array, double skalar)
{
return array.map!(b => b[].map!(c => c * skalar));
}
!!! But: return value is not double!
Type check for return value:
a = array.map!(b => b[].map!(c => c
On Saturday, 17 February 2018 at 12:33:25 UTC, Nordlöw wrote:
I'm struggling with making
https://github.com/nordlow/phobos-next/blob/master/src/pure_mallocator.d
callable in pure functions such as here
https://github.com/nordlow/phobos-next/blob/master/src/pure_mallocator.d#L84
Shouldn't a
On 02/17/2018 03:04 PM, Steven Schveighoffer wrote:
You have to be a bit careful here. pure functions can assume nothing is
happening and simply not call the function.
That's only a problem when the called function is strongly pure, right?
Nordlöw's methods are only weakly pure. They have
On 2/17/18 8:32 AM, ag0aep6g wrote:
On 02/17/2018 01:35 PM, rikki cattermole wrote:
pure means no globals. As in none :)
... except immutable ones. And since PureMallocator has no fields,
`instance` can be made immutable, and all the methods can be made static
or const. Then they can be
On Saturday, 17 February 2018 at 07:58:40 UTC, ANtlord wrote:
Hello!
Yesterday I found an interesting issue for myself while I was
implementing unique pointer for my project in BetterC. When I
was trying to return new instance from a `move` method I got
calling of destructor the instance.
On 2/17/18 7:33 AM, Nordlöw wrote:
I'm struggling with making
https://github.com/nordlow/phobos-next/blob/master/src/pure_mallocator.d
callable in pure functions such as here
https://github.com/nordlow/phobos-next/blob/master/src/pure_mallocator.d#L84
Shouldn't a shared
static
On 02/17/2018 01:35 PM, rikki cattermole wrote:
pure means no globals. As in none :)
... except immutable ones. And since PureMallocator has no fields,
`instance` can be made immutable, and all the methods can be made static
or const. Then they can be used in `pure` code.
On Friday, 16 February 2018 at 18:03:40 UTC, Ali Çehreli wrote:
auto pureF = assumePure();
pureF(42);
Ali
Thanks!
On Saturday, 17 February 2018 at 12:35:00 UTC, rikki cattermole
wrote:
in pure functions?
pure means no globals. As in none :)
I guess one solution is to make the member functions in
PureMallocator static and change how the template argument
`Allocator` for a container is used to call
On 17/02/2018 12:48 PM, Nordlöw wrote:
On Saturday, 17 February 2018 at 12:35:00 UTC, rikki cattermole wrote:
in pure functions?
pure means no globals. As in none :)
I don't understand.
I thought std.experimental.allocators API was designed to be able
express these needs, @andralex?
On Saturday, 17 February 2018 at 12:35:00 UTC, rikki cattermole
wrote:
in pure functions?
pure means no globals. As in none :)
I don't understand.
I thought std.experimental.allocators API was designed to be able
express these needs, @andralex?
I'm struggling with making
https://github.com/nordlow/phobos-next/blob/master/src/pure_mallocator.d
callable in pure functions such as here
https://github.com/nordlow/phobos-next/blob/master/src/pure_mallocator.d#L84
Shouldn't a shared
static shared PureMallocator instance;
make it
On Saturday, 17 February 2018 at 12:33:25 UTC, Nordlöw wrote:
PureMallocator.instance.allocate(16);
currently errors as
pure_mallocator.d(84,16): Error: pure function
'pure_mallocator.__unittest_pure_mallocator_82_0' cannot access
mutable static data 'instance'
On 17/02/2018 12:33 PM, Nordlöw wrote:
I'm struggling with making
https://github.com/nordlow/phobos-next/blob/master/src/pure_mallocator.d
callable in pure functions such as here
https://github.com/nordlow/phobos-next/blob/master/src/pure_mallocator.d#L84
Shouldn't a shared
static
Hello!
Yesterday I found an interesting issue for myself while I was
implementing unique pointer for my project in BetterC. When I was
trying to return new instance from a `move` method I got calling
of destructor the instance. When the instance is out of scope the
calling is happens again. I
24 matches
Mail list logo