On Saturday, 7 April 2018 at 05:10:05 UTC, Paul Backus wrote:
I'm playing around with functional programming in D, and have
run into a problem with the following code:
[...]
I don't see the error you are talking about:
https://run.dlang.io/is/XWPIc1
Are you using the latest compiler?
I'm playing around with functional programming in D, and have run
into a problem with the following code:
--- list.d
import std.variant: Algebraic, This, visit;
import std.typecons: Tuple, tuple;
struct Nil {}
alias List(T) = Algebraic!(
Nil,
Tuple!(T, "head", This*, "tail")
);
alias
On Tuesday, 3 April 2018 at 09:14:28 UTC, Eduard Staniloiu wrote:
So, say `reg` is your allocator, your workflow would be
auto obj = reg.make!Type(args);
/* do stuff */
reg.dispose(obj); // If Type has a __dtor, it will call
obj.__dtor
// and then reg.deallocate(obj)
If I
On Friday, 6 April 2018 at 17:46:26 UTC, Per Nordlöw wrote:
Why isn't `std.conv.emplaceRef` public when `std.conv.emplace`
is?
AFAICT,
emplaceRef(x, ...)
is a bit more @safe than
emplace(, ...)
...
I had the same thoughts too:
https://issues.dlang.org/show_bug.cgi?id=18701
We can even
Why isn't `std.conv.emplaceRef` public when `std.conv.emplace` is?
AFAICT,
emplaceRef(x, ...)
is a bit more @safe than
emplace(, ...)
...
On Friday, April 06, 2018 16:10:56 Dr.No via Digitalmars-d-learn wrote:
> I'm reading line by line the lines from a CSV file provided by
> the user which is assumed to be UTF8. But an user has provided an
>
> ANSI file which resulted in the error:
>
I'm reading line by line the lines from a CSV file provided by
the user which is assumed to be UTF8. But an user has provided an
ANSI file which resulted in the error:
core.exception.UnicodeException@src\rt\util\utf.d(292): invalid
UTF-8 sequence
(it happend when the user took the
On Friday, 6 April 2018 at 15:35:59 UTC, Anonymouse wrote:
The dustmite wiki[0] lists the following example script for use
to monitor the reduction progress:
Here's a more complete version that also works with -j:
https://gist.github.com/CyberShadow/2e8f01895c248111c171e982313bb008
The dustmite wiki[0] lists the following example script for use
to monitor the reduction progress:
#!/bin/sh
watch -cn 0.1 "zsh -c 'ls -al $1.reduced/**/*.d ; colordiff -ru
$1.reduced $1.test'"
This repeatedly compares the $1.reduced directory with a $1.test
directory. The dustmite run
On Friday, 6 April 2018 at 14:43:25 UTC, Ali wrote:
On Friday, 6 April 2018 at 14:31:49 UTC, Alex wrote:
On Friday, 6 April 2018 at 13:41:50 UTC, aerto wrote:
[...]
A question from me, since I am also still learning D
what is the difference between those following two declarations
On Friday, 6 April 2018 at 14:31:49 UTC, Alex wrote:
On Friday, 6 April 2018 at 13:41:50 UTC, aerto wrote:
its possible to make this work ??
import std.stdio;
class UUsers
{
public:
int age;
}
class users
{
public:
int[int] uid;
}
void main() {
users newuser =
On Friday, 6 April 2018 at 13:41:50 UTC, aerto wrote:
its possible to make this work ??
import std.stdio;
class UUsers
{
public:
int age;
}
class users
{
public:
int[int] uid;
}
void main() {
users newuser = new users();
newuser.uid[0].age = 23;
On Friday, 6 April 2018 at 13:41:50 UTC, aerto wrote:
its possible to make this work ??
import std.stdio;
class UUsers
{
public:
int age;
}
class users
{
public:
int[int] uid;
}
void main() {
users newuser = new users();
newuser.uid[0].age = 23;
On Friday, 6 April 2018 at 14:15:08 UTC, Kayomn wrote:
On Friday, 6 April 2018 at 13:55:55 UTC, nkm1 wrote:
[...]
Figured I had a handle on how it worked doing but guess not.
One final question, however.
[...]
Nevermind, I'm blind. I missed the post-increment in newID().
On Friday, 6 April 2018 at 13:55:55 UTC, nkm1 wrote:
On Friday, 6 April 2018 at 13:10:23 UTC, Kayomn wrote:
ID tags are unique and spsecific to the class type. There
shouldn't be more than one type ID assigned to one class type.
The idea behind what it is I am doing is I am implementing a
On Friday, 6 April 2018 at 13:10:23 UTC, Kayomn wrote:
ID tags are unique and spsecific to the class type. There
shouldn't be more than one type ID assigned to one class type.
The idea behind what it is I am doing is I am implementing a
solution to getting a type index, similar to
its possible to make this work ??
import std.stdio;
class UUsers
{
public:
int age;
}
class users
{
public:
int[int] uid;
}
void main() {
users newuser = new users();
newuser.uid[0].age = 23;
writeln(newuser.uid[0].age);
}
Besides this, I tried something with types used as user defined
attributes.
https://dlang.org/spec/attribute.html#uda
Automatic compile time tagging is not my speciality, however, I
think is also achievable with mixins somehow?
But I don't know how to workaround the bug
On Friday, 6 April 2018 at 02:20:29 UTC, Kayomn wrote:
Wrong example code, here's the correct example:
switch (queryString(childJson,"type")) {
case (typeof (Sprite).name):
child =
On Friday, 6 April 2018 at 02:20:29 UTC, Kayomn wrote:
Wrong example code, here's the correct example:
switch (queryString(childJson,"type")) {
case (typeof (Sprite).name):
child =
20 matches
Mail list logo