On Wed, 2019-10-09 at 11:12 -0700, H. S. Teoh via Digitalmars-d-learn wrote:
[…]
> Actually, std.functional is somewhat of a misnomer. It mostly deals with
> higher-order functions, i.e., functions that return functions, currying,
> that sort of thing. These are part of functional programming,
On Wednesday, 9 October 2019 at 18:57:01 UTC, SrMordred wrote:
https://garden.dlang.io/
This should be more prominent. Very nice.
On Thu, Oct 10, 2019 at 09:59:49AM +0100, Russel Winder via Digitalmars-d-learn
wrote:
> On Wed, 2019-10-09 at 11:12 -0700, H. S. Teoh via Digitalmars-d-learn wrote:
> […]
> > Actually, std.functional is somewhat of a misnomer. It mostly deals
> > with higher-order functions, i.e., functions that
On Thu, 2019-10-10 at 03:08 -0700, H. S. Teoh via Digitalmars-d-learn wrote:
[…]
> Note this is why I wrote "functional-style programming" w.r.t. D, rather
> than "functional programming". Clearly, what D has isn't "real"
> functional programming in the strict sense, but it does share similar
>
Here I have a program that wants to
1. detect whether if it's the only instance
1.1. it does that by trying to create a Unix Domain Socket
and trying to binding it to a specific address.
2. if a duplicate program is not running, establish an UDS
and then listen to the socket.
On Thursday, 10 October 2019 at 12:30:25 UTC, Hossain Adnan wrote:
Here I have a program that wants to
1. detect whether if it's the only instance
1.1. it does that by trying to create a Unix Domain Socket
and trying to binding it to a specific address.
[...]
If it helps explaining
In C# you can do something like:
if (obj is Person)
{
var person = obj as Person;
// do stuff with person...
}
where you can check the type of an object prior to casting. Does
D have a similar mechanism? It's so widely useful in the C# realm
that they even added
On Thursday, 10 October 2019 at 08:59:49 UTC, Russel Winder wrote:
I feel that it is best to leave functional programming to
functional programming language, e.g. Haskell, Scheme, etc.
rather than try to do functional programming in imperative
languages, e.g. Java, C++, Rust, D. The reason is
On Thursday, 10 October 2019 at 16:33:47 UTC, H. S. Teoh wrote:
On Thu, Oct 10, 2019 at 03:58:02PM +, jmh530 via
Digitalmars-d-learn wrote:
On Thursday, 10 October 2019 at 15:47:58 UTC, Just Dave wrote:
> In C# you can do something like:
>
>
> if (obj is Person)
> {
> var
On Thursday, 10 October 2019 at 10:08:14 UTC, H. S. Teoh wrote:
On Thu, Oct 10, 2019 at 09:59:49AM +0100, Russel Winder via
Digitalmars-d-learn wrote:
On Wed, 2019-10-09 at 11:12 -0700, H. S. Teoh via
Digitalmars-d-learn wrote: […]
> Actually, std.functional is somewhat of a misnomer. It
>
On Thursday, October 10, 2019 9:47:58 AM MDT Just Dave via Digitalmars-d-
learn wrote:
> In C# you can do something like:
>
>
> if (obj is Person)
> {
> var person = obj as Person;
> // do stuff with person...
> }
>
> where you can check the type of an object prior
On Thursday, 10 October 2019 at 10:08:14 UTC, H. S. Teoh wrote:
On Thu, Oct 10, 2019 at 09:59:49AM +0100, Russel Winder via
Digitalmars-d-learn wrote:
On Wed, 2019-10-09 at 11:12 -0700, H. S. Teoh via
Digitalmars-d-learn wrote: […]
> Actually, std.functional is somewhat of a misnomer. It
>
On Thu, Oct 10, 2019 at 03:58:02PM +, jmh530 via Digitalmars-d-learn wrote:
> On Thursday, 10 October 2019 at 15:47:58 UTC, Just Dave wrote:
> > In C# you can do something like:
> >
> >
> > if (obj is Person)
> > {
> > var person = obj as Person;
> > // do stuff with
On Wednesday, 9 October 2019 at 10:54:49 UTC, David Briant wrote:
On Tuesday, 8 October 2019 at 20:37:03 UTC, dan wrote:
I have a double precision number that i would like to print
all significant digits of, but no more than what are actually
present in the number. Or more exactly, i want to
On Thursday, 10 October 2019 at 12:30:25 UTC, Hossain Adnan wrote:
Here I have a program that wants to
1. detect whether if it's the only instance
1.1. it does that by trying to create a Unix Domain Socket
and trying to binding it to a specific address.
2. if a duplicate program is not
I'm trying to get my head around mixing templates. I'm using it
as kind of a replacement for class inheritance as it seems to fit
better composition over inheritance. So I do something like:
mixin template NumberTemplate()
{
private:
int number = 0;
public:
int
On 10/10/19 6:47 PM, Just Dave wrote:
In C# you can do something like:
if (obj is Person)
{
var person = obj as Person;
// do stuff with person...
}
where you can check the type of an object prior to casting. Does D have
a similar mechanism? It's so widely
On Thursday, 10 October 2019 at 15:47:58 UTC, Just Dave wrote:
if (obj is Person person)
Looks the same as D's
if(auto person = cast(Person) obj) {
// use person in here
} else {
// it was some other type
}
Even though static solutions would be more performance minded,
I'd actually prefer to see the runtime equivalent so I don't have
to rethink how I think as performance isn't really my major
concern right now.
On Thursday, 10 October 2019 at 15:47:58 UTC, Just Dave wrote:
In C# you can do something like:
if (obj is Person)
{
var person = obj as Person;
// do stuff with person...
}
where you can check the type of an object prior to casting.
Does D have a similar
On Thursday, 10 October 2019 at 15:53:20 UTC, Adam D. Ruppe wrote:
On Thursday, 10 October 2019 at 15:47:58 UTC, Just Dave wrote:
if (obj is Person person)
Looks the same as D's
if(auto person = cast(Person) obj) {
// use person in here
} else {
// it was some other type
}
On Thursday, 10 October 2019 at 15:56:36 UTC, Just Dave wrote:
I'm trying to get my head around mixing templates. I'm using it
as kind of a replacement for class inheritance as it seems to
fit better composition over inheritance. So I do something like:
mixin template NumberTemplate()
Missing _getmaxstdio / _setmaxstdio?
I'd like to try and increase the limit of open files without
resorting to Windows API, is it possible or will I have to resort
to the WinAPI to achieve this?
Thanks
Damian
On Thu, Oct 10, 2019 at 09:13:05PM +, Jon Degenhardt via
Digitalmars-d-learn wrote:
> On Thursday, 10 October 2019 at 17:12:25 UTC, dan wrote:
> > Thanks also berni44 for the information about the dig attribute, Jon
> > for the neat packaging into one line using the attribute on the
> > type.
I have started working with neural networks and for that I need a
lot of computing power but the programs I make only use around
30% of the cpu, or at least that is what Task Manager tells me.
How can I make it use all 4 cores of my AMD FX-4300 and how can I
make it use 100% of it?
On Thursday, 10 October 2019 at 19:26:36 UTC, Daniel Kozak wrote:
On Thursday, 10 October 2019 at 19:25:22 UTC, Daniel Kozak
wrote:
On Thursday, 10 October 2019 at 19:21:06 UTC, Daniel Kozak
wrote:
On Thursday, 10 October 2019 at 19:19:42 UTC, Daniel Kozak
wrote:
On Thursday, 10 October 2019
On Thursday, 10 October 2019 at 18:52:32 UTC, Jarek wrote:
On Monday, 23 September 2019 at 12:31:16 UTC, Adam D. Ruppe
wrote:
[...]
Hello,
thanks for reply.
This is my first dlang work:
import std.stdio;
import std.conv;
import core.sys.posix.dirent;
[...]
You should use fromStringZ:
I have two project I want to compile and both times get this error:
Undefined symbols for architecture x86_64:
"_dyld_enumerate_tlv_storage", referenced from:
__d_dyld_getTLSRange in libphobos2.a(osx_tls.o)
I'm wondering where this comes from as I didn't see it in the past. Any idea?
--
What dmd version?
https://issues.dlang.org/show_bug.cgi?id=20019
On Thu, Oct 10, 2019 at 8:15 PM Robert M. Münch via
Digitalmars-d-learn wrote:
>
> I have two project I want to compile and both times get this error:
>
> Undefined symbols for architecture x86_64:
>
On Thursday, 10 October 2019 at 19:19:42 UTC, Daniel Kozak wrote:
On Thursday, 10 October 2019 at 18:52:32 UTC, Jarek wrote:
On Monday, 23 September 2019 at 12:31:16 UTC, Adam D. Ruppe
wrote:
[...]
Hello,
thanks for reply.
This is my first dlang work:
import std.stdio;
import std.conv;
On Monday, 23 September 2019 at 12:31:16 UTC, Adam D. Ruppe wrote:
On Monday, 23 September 2019 at 06:06:05 UTC, Jarek wrote:
I have the same question. Where to find something similar to
man pages from C?
They are the same functions, so the idea is you can just use
the C man pages directly.
On Thursday, 10 October 2019 at 19:25:22 UTC, Daniel Kozak wrote:
On Thursday, 10 October 2019 at 19:21:06 UTC, Daniel Kozak
wrote:
On Thursday, 10 October 2019 at 19:19:42 UTC, Daniel Kozak
wrote:
On Thursday, 10 October 2019 at 18:52:32 UTC, Jarek wrote:
On Monday, 23 September 2019 at
On Thursday, 10 October 2019 at 19:21:06 UTC, Daniel Kozak wrote:
On Thursday, 10 October 2019 at 19:19:42 UTC, Daniel Kozak
wrote:
On Thursday, 10 October 2019 at 18:52:32 UTC, Jarek wrote:
On Monday, 23 September 2019 at 12:31:16 UTC, Adam D. Ruppe
wrote:
[...]
Hello,
thanks for reply.
On Thursday, 10 October 2019 at 17:12:25 UTC, dan wrote:
Thanks also berni44 for the information about the dig attribute,
Jon for the neat packaging into one line using the attribute on
the type.
Unfortunately, the version of gdc that comes with the version
of debian
that i am using does not
On Fri, Oct 11, 2019 at 2:45 AM Murilo via Digitalmars-d-learn
wrote:
>
> I have started working with neural networks and for that I need a
> lot of computing power but the programs I make only use around
> 30% of the cpu, or at least that is what Task Manager tells me.
> How can I make it use
On Thursday, 10 October 2019 at 22:44:05 UTC, H. S. Teoh wrote:
On Thu, Oct 10, 2019 at 09:13:05PM +, Jon Degenhardt via
Digitalmars-d-learn wrote:
On Thursday, 10 October 2019 at 17:12:25 UTC, dan wrote:
> Thanks also berni44 for the information about the dig
> attribute, Jon
> for the
On Fri, Oct 11, 2019 at 6:58 AM Daniel Kozak wrote:
>
> so can stress your CPU.
can't
37 matches
Mail list logo