Re: Wiki spam

2018-02-02 Thread rikki cattermole via Digitalmars-d-learn
On 03/02/2018 6:34 AM, Tony wrote: Don't know if there is a better place to report this, but the wiki attracted a spammer: https://wiki.dlang.org/The_Search_Of_Charter_Yacht_Designer https://wiki.dlang.org/User:MichelMeudell General

Wiki spam

2018-02-02 Thread Tony via Digitalmars-d-learn
Don't know if there is a better place to report this, but the wiki attracted a spammer: https://wiki.dlang.org/The_Search_Of_Charter_Yacht_Designer https://wiki.dlang.org/User:MichelMeudell

Re: dub test

2018-02-02 Thread Joel via Digitalmars-d-learn
On Friday, 2 February 2018 at 09:00:38 UTC, carblue wrote: On Friday, 2 February 2018 at 07:23:54 UTC, Joel wrote: [snip] Import module base from file ... source/jmisc/base.d by: import jmisc.base; and recommended read: https://code.dlang.org/package-format?lang=json Thanks carblue. I had

Re: Should the "front" range primitive be "const" ?

2018-02-02 Thread H. S. Teoh via Digitalmars-d-learn
On Fri, Feb 02, 2018 at 07:06:56AM +, Simen Kjærås via Digitalmars-d-learn wrote: [...] > Which code would you rather write? > > void foo(T)(const T t) {} > foo(myValue); > > or: > > void foo(T)(T t) if (isTailConst!T) {} > foo(myValue.tailConst); [...] More thoughts on this: what if we ma

Re: Files and Buffers

2018-02-02 Thread Jerry Ferris via Digitalmars-d-learn
Good day, I reexamined my objective and needs, and I've determined that the entirety of the input does not need to be read in all cases. Thus I've returned to using File instead std.file.read. I should've put forth more thought; because I did not, I created a fairly useless OP. I do apologize,

Re: select, poll, epoll from D

2018-02-02 Thread Adam D. Ruppe via Digitalmars-d-learn
On Friday, 2 February 2018 at 19:30:32 UTC, Russel Winder wrote: The online documentation doesn't seem to acknowledge the existence of core.sys package! So how to find core.sys.linux.epoll? The core.sys stuff just includes operating system headers. But I think I grepped it. My documentation

Re: select, poll, epoll from D

2018-02-02 Thread Russel Winder via Digitalmars-d-learn
On Fri, 2018-02-02 at 18:03 +, Adam D. Ruppe via Digitalmars-d- learn wrote: > On Friday, 2 February 2018 at 18:00:45 UTC, Russel Winder wrote: > > Has anyone got any examples of using (select|poll|epoll) > > directly from D. Yes I can work it out from first principles, > > but it would be gr

Re: select, poll, epoll from D

2018-02-02 Thread Russel Winder via Digitalmars-d-learn
On Fri, 2018-02-02 at 18:02 +, Seb via Digitalmars-d-learn wrote: > On Friday, 2 February 2018 at 18:00:45 UTC, Russel Winder wrote: > > Hi, > > > > Has anyone got any examples of using (select|poll|epoll) > > directly from D. Yes I can work it out from first principles, > > but it would be

Re: select, poll, epoll from D

2018-02-02 Thread Seb via Digitalmars-d-learn
On Friday, 2 February 2018 at 18:00:45 UTC, Russel Winder wrote: Hi, Has anyone got any examples of using (select|poll|epoll) directly from D. Yes I can work it out from first principles, but it would be great to see what others have done in the past so as to make use of their work. Do you

Re: select, poll, epoll from D

2018-02-02 Thread Adam D. Ruppe via Digitalmars-d-learn
On Friday, 2 February 2018 at 18:00:45 UTC, Russel Winder wrote: Has anyone got any examples of using (select|poll|epoll) directly from D. Yes I can work it out from first principles, but it would be great to see what others have done in the past so as to make use of their work. I don't have

Re: Files and Buffers

2018-02-02 Thread Jonathan M Davis via Digitalmars-d-learn
On Friday, February 02, 2018 09:40:52 Steven Schveighoffer via Digitalmars- d-learn wrote: > std.file.read returns a void[]. > > I didn't see one that returns a ubyte[], and using the readText version > is going to validate the text I think (which may not be desired). It > really depends on the use

select, poll, epoll from D

2018-02-02 Thread Russel Winder via Digitalmars-d-learn
Hi, Has anyone got any examples of using (select|poll|epoll) directly from D. Yes I can work it out from first principles, but it would be great to see what others have done in the past so as to make use of their work. -- Russel. === Dr Russel Winder

Re: Lambda returning a lambda?

2018-02-02 Thread aliak via Digitalmars-d-learn
On Friday, 2 February 2018 at 01:31:15 UTC, Seb wrote: Are you aware of partial? https://dlang.org/phobos/std_functional.html#partial Si si :) And now I'm thinking, practically, that might be enough. So thanks for the prod.

Re: Can you constrain a type based on properties of what it is being referenced by?

2018-02-02 Thread Steven Schveighoffer via Digitalmars-d-learn
On 2/2/18 9:19 AM, aliak wrote: To further explain what I mean: struct A if (!is(this == immutable) && !is(this == shared)) { } shared a = A() // error auto a = A() // ok immutable a = A() // error const a = A() // ok In this case, no. A struct is bit-copyable, so you must be able to move it

Re: Files and Buffers

2018-02-02 Thread Steven Schveighoffer via Digitalmars-d-learn
On 2/1/18 8:27 PM, Seb wrote: On Thursday, 1 February 2018 at 21:42:33 UTC, Steven Schveighoffer wrote: On 2/1/18 4:36 PM, Jerry Ferris wrote: Hello, I'm developing a program that will either receive data from stdin or a file, and pass it along to a function for processing. I want to place t

Re: Terminating multiple processes

2018-02-02 Thread Russel Winder via Digitalmars-d-learn
On Thu, 2018-02-01 at 20:13 +, Arek via Digitalmars-d-learn wrote: > […] > DInitify doesn't cover full capabilities of the inotify API. > Especially it doesn't utilize newer inotify_init1 syscall and > doesn't expose 'select' interface. > This C++ wrapper may be interesting for you: > https:

Re: Should the "front" range primitive be "const" ?

2018-02-02 Thread H. S. Teoh via Digitalmars-d-learn
On Fri, Feb 02, 2018 at 07:06:56AM +, Simen Kjærås via Digitalmars-d-learn wrote: > On Thursday, 1 February 2018 at 18:58:15 UTC, H. S. Teoh wrote: > > However, if we go back to the idea of tail-const, we could > > potentially eliminate the need for casts and also avoid breaking > > immutable.

Re: Terminating multiple processes

2018-02-02 Thread Russel Winder via Digitalmars-d-learn
On Fri, 2018-02-02 at 01:09 +, David Nadlinger via Digitalmars-d- learn wrote: > On Thursday, 1 February 2018 at 11:42:32 UTC, Russel Winder wrote: > > The problem is actually a thread blocked in an inotify blocking > > read. As both Steven and yourself have pointed out I am going > > to have

Re: Can you constrain a type based on properties of what it is being referenced by?

2018-02-02 Thread aliak via Digitalmars-d-learn
On Friday, 2 February 2018 at 14:19:37 UTC, aliak wrote: ... (see post in general forum by Simon for details [1]) *Simen Gah! Sorry!

Can you constrain a type based on properties of what it is being referenced by?

2018-02-02 Thread aliak via Digitalmars-d-learn
To further explain what I mean: struct A if (!is(this == immutable) && !is(this == shared)) { } shared a = A() // error auto a = A() // ok immutable a = A() // error const a = A() // ok Fake syntax above of course. I was thinking about this because I read a few posts about const, and approach

Re: How to proceed with learning to code Windows desktop applications?

2018-02-02 Thread Martin Tschierschke via Digitalmars-d-learn
On Thursday, 1 February 2018 at 09:18:30 UTC, I Lindström wrote: [...] And thank you all for your ideas and suggestions. I'll try some out and see what works. I found this useful: https://github.com/adamdruppe/arsd/blob/master/simpledisplay.d

Re: dub test

2018-02-02 Thread carblue via Digitalmars-d-learn
On Friday, 2 February 2018 at 07:23:54 UTC, Joel wrote: When I try 'dub test' I get errors like 'Source file '/Users/joelchristensen/jpro/dpro2/JMiscLib/source/jmisc/base.d' not found in any import path.' Here's the dub.json file I'm using: ``` { "name": "timelog", "targetType": "e

Re: Visual D >> TRACKER : error TRK0004: Failed to locate: "FileTracker32.dll". The system cannot find the file specified.

2018-02-02 Thread Markus via Digitalmars-d-learn
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 to build C++ projects... I had to update "Visual Studio 201