Re: Help me decide D or C

2019-08-01 Thread Aurélien Plazzotta via Digitalmars-d-learn
On Thursday, 1 August 2019 at 16:23:51 UTC, Alexandre wrote: On Thursday, 1 August 2019 at 15:42:08 UTC, a11e99z wrote: On Thursday, 1 August 2019 at 15:17:11 UTC, a11e99z wrote: Right now, job is not a good criteria for me. I work in a not related field and I doubt I would get any job

Re: Why does choose not work here

2019-08-01 Thread ag0aep6g via Digitalmars-d-learn
On 01.08.19 22:23, Matt wrote: Version 4 does not work when PairedA.previous is null. I'd love to understand why. [...] auto myFilter(R1, R2)(R1 a, R2 b) { import std.algorithm : filter, canFind; return a.filter!(c => b.canFind(c)); } struct A { uint[] starts, stops;

Why does choose not work here

2019-08-01 Thread Matt via Digitalmars-d-learn
I'm having some trouble with a "Program exited with code -1073741819" error in some code I'm writing and I would appreciate any help/insight. The problem stems from some incompatibility between the Phobos function "choose" and the template function "myFilter" which returns a range. The code

Re: Why does choose not work here

2019-08-01 Thread Matt via Digitalmars-d-learn
On Thursday, 1 August 2019 at 21:12:51 UTC, ag0aep6g wrote: `choose`'s parameters aren't lazy. So the second argument is evaluated even when `previous is null`. That means `intervalRange` is called on a null `previous`. And that fails, of course, because `intervalRange` can't access `starts`

Re: Help me decide D or C

2019-08-01 Thread Kagamin via Digitalmars-d-learn
On Wednesday, 31 July 2019 at 22:30:52 UTC, Alexandre wrote: 1) Improve as a programmer 2) Have fun doing programs Thats it basically. I am planning to study all "free" time I have. I am doing basically this since last year. Try Basic. It has builtin graphics, seeing you program draw is

Re: Help me decide D or C

2019-08-01 Thread Murilo via Digitalmars-d-learn
On Wednesday, 31 July 2019 at 18:38:02 UTC, Alexandre wrote: Hi everyone, I would like an honest opinion. I have a beginner level (able to do very small programs) in a few languages such as python, go, C, guile(scheme) and common lisp. I want to pick a language and go deep with it and focus

Re: Help me decide D or C

2019-08-01 Thread Russel Winder via Digitalmars-d-learn
On Thu, 2019-08-01 at 14:49 +, bachmeier via Digitalmars-d-learn wrote: […] > There's nothing wrong with Haskell if you want to take a deep > dive into pure functional programming. I personally find Haskell > to be more of a religion than a programming language. You can > learn the same

Re: Help me decide D or C

2019-08-01 Thread ryuo via Digitalmars-d-learn
I have spent the better part of 10 years with C, and it was my first serious language. I would say go with D if you just want to work on higher level projects and forego the low level details to an extent. C is very low level and very unforgiving. The inexperienced will run into things like

Re: Help me decide D or C

2019-08-01 Thread Alexandre via Digitalmars-d-learn
On Thursday, 1 August 2019 at 15:42:08 UTC, a11e99z wrote: On Thursday, 1 August 2019 at 15:17:11 UTC, a11e99z wrote: [...] imo better choice is (with criteria to find best job) - Qt: C++ with any library that u need in one style - C#: web, graphics, mobiles, command tools with nice

Re: Help me decide D or C

2019-08-01 Thread bachmeier via Digitalmars-d-learn
On Wednesday, 31 July 2019 at 23:42:10 UTC, SashaGreat wrote: About Mike's book, you're talking about this one: https://www.amazon.com/Learning-D-Michael-Parker/dp/1783552484/ref=as_li_ss_tl?ie=UTF8=1448974911=8-1=learning+d=sl1=aldacron-20=d696b771c78030fc272e9b853986a708 Yep. It provides a

Re: Help me decide D or C

2019-08-01 Thread JN via Digitalmars-d-learn
On Thursday, 1 August 2019 at 09:43:20 UTC, Kagamin wrote: On Wednesday, 31 July 2019 at 22:30:52 UTC, Alexandre wrote: 1) Improve as a programmer 2) Have fun doing programs Thats it basically. I am planning to study all "free" time I have. I am doing basically this since last year. Try

Re: Help me decide D or C

2019-08-01 Thread matheus via Digitalmars-d-learn
On Thursday, 1 August 2019 at 09:43:20 UTC, Kagamin wrote: On Wednesday, 31 July 2019 at 22:30:52 UTC, Alexandre wrote: 1) Improve as a programmer 2) Have fun doing programs Thats it basically. I am planning to study all "free" time I have. I am doing basically this since last year. Try

Re: Example uses "volatile"; compiler says "undefined identifier volatile"

2019-08-01 Thread Paul via Digitalmars-d-learn
Thank you. I'll try that.

Re: Help me decide D or C

2019-08-01 Thread a11e99z via Digitalmars-d-learn
On Wednesday, 31 July 2019 at 18:38:02 UTC, Alexandre wrote: Hi everyone, I would like an honest opinion. I have a beginner level (able to do very small programs) in a few languages such as python, go, C, guile(scheme) and common lisp. I want to pick a language and go deep with it and focus

Re: Help me decide D or C

2019-08-01 Thread bachmeier via Digitalmars-d-learn
On Thursday, 1 August 2019 at 03:59:23 UTC, Bert wrote: But if you really want to learn to program I suggest you go with Haskell. You can do them all together too but Haskell is like learning Alien while D is learning German. There's nothing wrong with Haskell if you want to take a deep

Re: Help me decide D or C

2019-08-01 Thread a11e99z via Digitalmars-d-learn
On Thursday, 1 August 2019 at 15:17:11 UTC, a11e99z wrote: On Wednesday, 31 July 2019 at 18:38:02 UTC, Alexandre wrote: Hi everyone, I would like an honest opinion. I have a beginner level (able to do very small programs) in a few languages such as python, go, C, guile(scheme) and common