Re: Having "in" for arrays

2017-11-22 Thread lobo via Digitalmars-d-learn
On Wednesday, 22 November 2017 at 09:36:43 UTC, Dukc wrote: On Wednesday, 22 November 2017 at 08:03:50 UTC, Fra Mecca wrote: void main() { auto v = ["r", "i", "o"]; assert ("r" in v); } Also note that even if it wereimplemented, you search for 'r' instead of "r". "r" is a

Re: Looking for a job in USA

2017-11-22 Thread Indigo via Digitalmars-d
On Saturday, 18 November 2017 at 08:59:53 UTC, Satoshi wrote: On Saturday, 18 November 2017 at 01:31:09 UTC, Indigo wrote: On Wednesday, 15 November 2017 at 17:32:50 UTC, Satoshi wrote: Hi, as the title says, I'm looking for a job opportunity in the USA (H1B visa sponsorship required). I'm

Re: Introducing Nullable Reference Types in C#. Is there hope for D, too?

2017-11-22 Thread Jonathan M Davis via Digitalmars-d
On Wednesday, November 22, 2017 09:28:47 codephantom via Digitalmars-d wrote: > On Wednesday, 22 November 2017 at 08:55:03 UTC, Petar Kirov > > [ZombineDev] wrote: > > On Wednesday, 22 November 2017 at 00:19:51 UTC, codephantom > > > > wrote: > >> btw. what was the last compiler you wrote? > > >

Re: object.Exception@generated\gtkd\gtkd\Loader.d(125):Library load failed(libgio-2.0.0.dll)

2017-11-22 Thread PECman via Digitalmars-d
On Tuesday, 21 November 2017 at 18:32:45 UTC, Mike Wey wrote: On 21-11-17 11:19, PECman wrote: On Sunday, 19 November 2017 at 13:39:39 UTC, Mike Wey wrote: On 19-11-17 08:35, PECman wrote: I complied the D application with gtkD successfully.However,I cant run it successfully.My settings are

Re: TickDuration deprecation

2017-11-22 Thread Walter Bright via Digitalmars-d
On 11/21/2017 11:48 PM, Jon Degenhardt wrote: Hi Walter - I wonder if there is a miscommunication. My understanding is that the question is whether there should be a built-in conversion from Duration to float/double in a specific unit of measure, like milliseconds. It sounds as if your concern

Re: TickDuration deprecation

2017-11-22 Thread Timon Gehr via Digitalmars-d
On 22.11.2017 06:50, Walter Bright wrote: There is another, perhaps obsolete, consideration. Some CPUs do not have floating point units. C, for example, is carefully set up so that when you don't need floating point, it isn't required to have an FPU. This made C usable on cheap processors.

Re: TickDuration deprecation

2017-11-22 Thread Timon Gehr via Digitalmars-d
On 22.11.2017 03:22, Walter Bright wrote: On 11/21/2017 1:40 PM, Timon Gehr wrote: Computer clocks have discrete ticks, they are not continuous. That may be true, but the plotting library may still just expect a list of doubles. What's the point of removing the simple conversion function that

Re: Having "in" for arrays

2017-11-22 Thread Dukc via Digitalmars-d-learn
On Wednesday, 22 November 2017 at 08:03:50 UTC, Fra Mecca wrote: void main() { auto v = ["r", "i", "o"]; assert ("r" in v); } Also note that even if it wereimplemented, you search for 'r' instead of "r". "r" is a string, but you would want to search for a char.

Re: Introducing Nullable Reference Types in C#. Is there hope for D, too?

2017-11-22 Thread codephantom via Digitalmars-d
On Wednesday, 22 November 2017 at 08:55:03 UTC, Petar Kirov [ZombineDev] wrote: On Wednesday, 22 November 2017 at 00:19:51 UTC, codephantom wrote: btw. what was the last compiler you wrote? https://github.com/eth-srl/psi https://github.com/tgehr/d-compiler touché ;-) nonetheless. I stand

Re: Introducing Nullable Reference Types in C#. Is there hope for D, too?

2017-11-22 Thread Petar via Digitalmars-d
On Wednesday, 22 November 2017 at 00:19:51 UTC, codephantom wrote: btw. what was the last compiler you wrote? https://github.com/eth-srl/psi https://github.com/tgehr/d-compiler

Re: Having "in" for arrays

2017-11-22 Thread Jonathan M Davis via Digitalmars-d-learn
On Wednesday, November 22, 2017 08:03:50 Fra Mecca via Digitalmars-d-learn wrote: > Why doesn't D have a in keyword for arrays? > > The docs explains that you can use in only for associative arrays > but I don't see the reasons for such decision. > > > Example code: > > void main() > { > auto v

Re: interfacing c++

2017-11-22 Thread drug via Digitalmars-d-learn
22.11.2017 02:12, Markus пишет: snip I could do the instancing/destruction by functions and write a custom d class that calls these methods in this()/~this(). This is what I used to do as special members like ctor/dtor did not supported in D before, but your example of using ctor is

Re: interfacing c++

2017-11-22 Thread MGW via Digitalmars-d-learn
On Wednesday, 22 November 2017 at 08:29:26 UTC, MGW wrote: Possibly it will be interesting https://pp.userapi.com/c639524/v639524332/60240/uH3jnxrchik.jpg

Re: interfacing c++

2017-11-22 Thread MGW via Digitalmars-d-learn
On Tuesday, 21 November 2017 at 23:12:33 UTC, Markus wrote: hi, im trying to interface a cpp class. I'd like to interface a bigger library and I'm trying to figure out the minimum effort. Possibly it will be interesting https://www.youtube.com/watch?v=HTgJaRRfLPk

<    1   2