Re: SIMD on Windows

2013-06-21 Thread Walter Bright
On 6/21/2013 10:54 PM, Jonathan Dunlap wrote: Alright, I installed VC2010 (with x64 libs) and added the -m64 option to the compiler. Sadly the compiler dies with the below message. Should I file a bug or did I miss something? Anytime you see a message like "Internal error" it's a compiler bug a

Re: OT: CS education gone wrong (Was: Re: TDD is BS?)

2013-06-21 Thread deadalnix
On Friday, 21 June 2013 at 21:33:43 UTC, Andrei Alexandrescu wrote: If there's any need to reach for documentation, the interviewer has failed. When interviewing we (at Facebook) ask problems that are likely to appear in a normal day's work, but for which the typical libraries don't help. (E.g.

Re: SIMD on Windows

2013-06-21 Thread Michael
Check twice where is yours 64 bit tools installed. Paths something diff in Win8, VS2010, VS2012 Express installations.

Re: SIMD on Windows

2013-06-21 Thread Jonathan Dunlap
Also tried VC2012 Express (with x64 libs)... received the same compiler error.

Re: SIMD on Windows

2013-06-21 Thread Jonathan Dunlap
Alright, I installed VC2010 (with x64 libs) and added the -m64 option to the compiler. Sadly the compiler dies with the below message. Should I file a bug or did I miss something? - Building: Easy (Debug) Performing main compilation... Current dictionary: C:\Users\dunlap\Documents\GitHub

Re: SIMD on Windows

2013-06-21 Thread Geancarlo Rocha
If just installing VC++ doesn't work... http://forum.dlang.org/post/mailman.2800.1355837582.5162.digitalmar...@puremagic.com On Saturday, 22 June 2013 at 04:28:57 UTC, Jonathan Dunlap wrote: On Friday, 21 June 2013 at 23:04:10 UTC, Walter Bright wrote: On 6/21/2013 3:43 PM, Jonathan Dunlap wrot

Re: SIMD on Windows

2013-06-21 Thread Brad Anderson
On Saturday, 22 June 2013 at 04:28:57 UTC, Jonathan Dunlap wrote: On Friday, 21 June 2013 at 23:04:10 UTC, Walter Bright wrote: On 6/21/2013 3:43 PM, Jonathan Dunlap wrote: In D 2.063.2 on Windows 7: Error: SIMD vector types not supported on this platform Should I file a bug for this or is thi

proposal: lazy compilation model for compiling binaries

2013-06-21 Thread Timothee Cour
A) Currently, D suffers from a high degree of interdependency between modules; when one wants to use a single symbol (say std.traits.isInputRange), we pull out all of std.traits, which in turn pulls out all of std.array,std.string, etc. This results in slow compile times (relatively to the case whe

Re: TDD is BS?

2013-06-21 Thread QAston
On Thursday, 20 June 2013 at 12:16:54 UTC, deadalnix wrote: On Thursday, 20 June 2013 at 10:13:53 UTC, Jacob Carlborg wrote: On 2013-06-20 00:47, Nick Sabalausky wrote: - Writing a unittest first forces the API to be designed before the implementation is written. But implementation is necessa

Re: SIMD on Windows

2013-06-21 Thread Jonathan Dunlap
On Friday, 21 June 2013 at 23:04:10 UTC, Walter Bright wrote: On 6/21/2013 3:43 PM, Jonathan Dunlap wrote: In D 2.063.2 on Windows 7: Error: SIMD vector types not supported on this platform Should I file a bug for this or is this currently on a roadmap? I'm SUPER excited to get into SIMD deve

Re: regression: Issue 10440 - shared library on osx: worked in 2.062, fails in 2.063 / 2.063.2

2013-06-21 Thread Jonathan M Davis
On Friday, June 21, 2013 20:11:23 Timothee Cour wrote: > just posted 10440. > > Isn't there a unittest that tests for things such as shared libraries? > That regression is really blocking. I didn't think that shared libraries even _worked_ on OS X. We've only just added the beginnings of proper

regression: Issue 10440 - shared library on osx: worked in 2.062, fails in 2.063 / 2.063.2

2013-06-21 Thread Timothee Cour
just posted 10440. Isn't there a unittest that tests for things such as shared libraries? That regression is really blocking.

Re: SIMD on Windows

2013-06-21 Thread bearophile
Walter Bright: It's not a bug, and there are currently no plans to support SIMD on Win32. However, it is supported for Win64 compilations. LDC2 supports SIMD on Win32. Bye, bearophile

Re: Undefined behaviors & Clang 3.3

2013-06-21 Thread eles
On Friday, 21 June 2013 at 15:51:55 UTC, qznc wrote: On Friday, 21 June 2013 at 13:48:19 UTC, eles wrote: On Friday, 21 June 2013 at 10:42:32 UTC, bearophile wrote: The D definition mirrors what modern PC architectures do and hence can be compiled efficiently there. C avoids coupling with an

Re: feature request: N-ary map

2013-06-21 Thread Timothee Cour
On Fri, Jun 21, 2013 at 4:14 PM, Timothee Cour wrote: > On Fri, Jun 21, 2013 at 4:02 PM, Ali Çehreli wrote: > >> On 06/21/2013 03:57 PM, Diggory wrote: >> >>> On Friday, 21 June 2013 at 22:56:04 UTC, Andrei Alexandrescu wrote: >>> On 6/21/13 3:55 PM, Andrei Alexandrescu wrote: > On

Re: SIMD on Windows

2013-06-21 Thread Manu
On 22 June 2013 09:04, Walter Bright wrote: > On 6/21/2013 3:43 PM, Jonathan Dunlap wrote: > >> In D 2.063.2 on Windows 7: >> Error: SIMD vector types not supported on this platform >> >> Should I file a bug for this or is this currently on a roadmap? I'm SUPER >> excited to get into SIMD develop

Re: Undefined behaviors & Clang 3.3

2013-06-21 Thread eles
On Friday, 21 June 2013 at 14:48:46 UTC, Artur Skawina wrote: On 06/21/13 15:48, eles wrote: On Friday, 21 June 2013 at 10:42:32 UTC, bearophile wrote: Actually, it's the other way around - mandating wrapping is what makes it possible for code to detect the overflow. Having overflow be Very

Re: OT: CS education gone wrong (Was: Re: TDD is BS?)

2013-06-21 Thread H. S. Teoh
On Fri, Jun 21, 2013 at 04:02:20PM -0700, Walter Bright wrote: [...] > / > See "Algorithms" Second Edition by Robert Sedgewick. Boyer-Moore string > search routine. > ***

Re: OT: CS education gone wrong (Was: Re: TDD is BS?)

2013-06-21 Thread Adam D. Ruppe
On Friday, 21 June 2013 at 22:35:55 UTC, Andrei Alexandrescu wrote: Post it and I'll destroy it. inout(char)* mystrstr(inout(char)* haystack, const(char*) needle) { assert(haystack !is null); if(needle is null) return haystack; const(char)* where = needle; inout(cha

Re: feature request: N-ary map

2013-06-21 Thread Timothee Cour
On Fri, Jun 21, 2013 at 4:02 PM, Ali Çehreli wrote: > On 06/21/2013 03:57 PM, Diggory wrote: > >> On Friday, 21 June 2013 at 22:56:04 UTC, Andrei Alexandrescu wrote: >> >>> On 6/21/13 3:55 PM, Andrei Alexandrescu wrote: >>> On 6/21/13 3:45 PM, Timothee Cour wrote: > I'd like to supp

Re: SIMD on Windows

2013-06-21 Thread Walter Bright
On 6/21/2013 3:43 PM, Jonathan Dunlap wrote: In D 2.063.2 on Windows 7: Error: SIMD vector types not supported on this platform Should I file a bug for this or is this currently on a roadmap? I'm SUPER excited to get into SIMD development with D. :D It's not a bug, and there are currently no p

Re: TDD is BS?

2013-06-21 Thread H. S. Teoh
On Fri, Jun 21, 2013 at 06:12:57PM -0400, Nick Sabalausky wrote: > On Fri, 21 Jun 2013 09:47:46 -0700 > "H. S. Teoh" wrote: > > > > universities that actually *teach* real programming are more > > interested in finding solutions to uncomputable problems than > > teaching students how to solve com

Re: OT: CS education gone wrong (Was: Re: TDD is BS?)

2013-06-21 Thread Walter Bright
On 6/21/2013 3:35 PM, Andrei Alexandrescu wrote: On 6/21/13 3:22 PM, Adam D. Ruppe wrote: Just for laughs I just slapped together a strstr Post it and I'll destroy it. Can I play, too? Mine from the Digital Mars C library. Haven't looked at it since 2001. ==

Re: feature request: N-ary map

2013-06-21 Thread Ali Çehreli
On 06/21/2013 03:57 PM, Diggory wrote: On Friday, 21 June 2013 at 22:56:04 UTC, Andrei Alexandrescu wrote: On 6/21/13 3:55 PM, Andrei Alexandrescu wrote: On 6/21/13 3:45 PM, Timothee Cour wrote: I'd like to support N-ary map, ie std.algorithm.map that takes 1 or more ranges as arguments and op

Re: feature request: N-ary map

2013-06-21 Thread Timothee Cour
On Fri, Jun 21, 2013 at 3:57 PM, Diggory wrote: > On Friday, 21 June 2013 at 22:56:04 UTC, Andrei Alexandrescu wrote: > >> On 6/21/13 3:55 PM, Andrei Alexandrescu wrote: >> >>> On 6/21/13 3:45 PM, Timothee Cour wrote: >>> I'd like to support N-ary map, ie std.algorithm.map that takes 1 or mo

Re: feature request: N-ary map

2013-06-21 Thread Andrei Alexandrescu
On 6/21/13 3:55 PM, Andrei Alexandrescu wrote: On 6/21/13 3:45 PM, Timothee Cour wrote: I'd like to support N-ary map, ie std.algorithm.map that takes 1 or more ranges as arguments and operates lazily on those. Actually map used to do that in its early days. Then I figured composing with chain

Re: feature request: N-ary map

2013-06-21 Thread Andrei Alexandrescu
On 6/21/13 3:45 PM, Timothee Cour wrote: I'd like to support N-ary map, ie std.algorithm.map that takes 1 or more ranges as arguments and operates lazily on those. Actually map used to do that in its early days. Then I figured composing with chain() is even better. chain(r1, r2, r3).map...

Re: feature request: N-ary map

2013-06-21 Thread Diggory
On Friday, 21 June 2013 at 22:56:04 UTC, Andrei Alexandrescu wrote: On 6/21/13 3:55 PM, Andrei Alexandrescu wrote: On 6/21/13 3:45 PM, Timothee Cour wrote: I'd like to support N-ary map, ie std.algorithm.map that takes 1 or more ranges as arguments and operates lazily on those. Actually map

Re: SIMD on Windows

2013-06-21 Thread Jonathan Dunlap
Btw, is it possible to check for SIMD support as a compilation condition? Ideally I'm looking to 'polyfill' SIMD if it's not supported on the platform.

SIMD on Windows

2013-06-21 Thread Jonathan Dunlap
In D 2.063.2 on Windows 7: Error: SIMD vector types not supported on this platform Should I file a bug for this or is this currently on a roadmap? I'm SUPER excited to get into SIMD development with D. :D

feature request: N-ary map

2013-06-21 Thread Timothee Cour
I'd like to support N-ary map, ie std.algorithm.map that takes 1 or more ranges as arguments and operates lazily on those. example: suppose we have a 2 argument function, eg : auto absDiff(a,b){...} before: zip(a,b).map!(u=>absDiff(u[0],u[1])).reduce!fun; after: map!absDiff(a,b).reduce!fun; c

Re: OT: CS education gone wrong (Was: Re: TDD is BS?)

2013-06-21 Thread Andrei Alexandrescu
On 6/21/13 3:22 PM, Adam D. Ruppe wrote: Just for laughs I just slapped together a strstr Post it and I'll destroy it. Andrei

Re: OT: CS education gone wrong (Was: Re: TDD is BS?)

2013-06-21 Thread Andrei Alexandrescu
On 6/21/13 2:50 PM, Adam D. Ruppe wrote: On Friday, 21 June 2013 at 21:33:43 UTC, Andrei Alexandrescu wrote: brute-force strstr() is fair game and I think any engineer should be able to lift it off the ground quickly (to my dismay, only a fraction can). But, should the return value be const or

Re: OT: CS education gone wrong (Was: Re: TDD is BS?)

2013-06-21 Thread Adam D. Ruppe
On Friday, 21 June 2013 at 22:23:01 UTC, Adam D. Ruppe wrote: being built in to D Or maybe it is because everybody else does it in the documentation and such, since #include in C isn't *that* big of a deal. idk, all I do know for sure is that I do it now and didn't before.

Re: Raising the bar on Phobos unittest coverage

2013-06-21 Thread Joseph Rushton Wakeling
On 06/21/2013 09:42 PM, Walter Bright wrote: > If your minimum acceptable coverage is 92%, why list it as 85%? I wasn't sure if you might allow some margin to allow for the fact that introducing new functionality might introduce a drop in overall code coverage (I found not all "failures" of c

Re: TDD is BS?

2013-06-21 Thread Nick Sabalausky
On Fri, 21 Jun 2013 09:47:46 -0700 "H. S. Teoh" wrote: > > universities that actually *teach* real programming are more > interested in finding solutions to uncomputable problems than > teaching students how to solve computable ones > That doesn't match my experience (also in the US here). Gran

Re: OT: CS education gone wrong (Was: Re: TDD is BS?)

2013-06-21 Thread Adam D. Ruppe
Just for laughs I just slapped together a strstr and it made me realize a little thing I do in D that I never did in C: assert() I use it all over the place in D, pretty much any time I make an assumption, I slap it down in an assert. But I don't I ever, not once, used any kind of assertion

Re: OT: CS education gone wrong (Was: Re: TDD is BS?)

2013-06-21 Thread H. S. Teoh
On Fri, Jun 21, 2013 at 05:33:45PM -0400, Andrei Alexandrescu wrote: [...] > Also it's fair to ask about implementing a stdlib function itself if > the interview concerns some systems-level work; e.g. brute-force > strstr() is fair game and I think any engineer should be able to > lift it off the g

Re: OT: CS education gone wrong (Was: Re: TDD is BS?)

2013-06-21 Thread Adam D. Ruppe
On Friday, 21 June 2013 at 21:33:43 UTC, Andrei Alexandrescu wrote: brute-force strstr() is fair game and I think any engineer should be able to lift it off the ground quickly (to my dismay, only a fraction can). But, should the return value be const or not? :P I think I'd write in D just cu

Re: Time to split up std.datetime into a package?

2013-06-21 Thread Andrei Alexandrescu
On 6/21/13 8:23 AM, Wyatt wrote: On Thursday, 20 June 2013 at 18:54:20 UTC, Jonathan M Davis wrote: IMHO, the obvious split (and what I've wanted to do for some time) is std/datetime/common.d std/datetime/interval.d std/datetime/timepoint.d std/datetime/timezone.d common would primarily have t

Re: Time to split up std.datetime into a package?

2013-06-21 Thread Iain Buclaw
On Friday, 21 June 2013 at 21:35:17 UTC, Andrei Alexandrescu wrote: std.benchmark, where art thou... Andrei Deny thy father and refuse thy name; Or, if thou wilt not, be but sworn my love, And I'll no longer be a std.datetime.

Re: OT: CS education gone wrong (Was: Re: TDD is BS?)

2013-06-21 Thread Andrei Alexandrescu
On 6/21/13 5:59 AM, Jacob Carlborg wrote: On 2013-06-21 07:57, H. S. Teoh wrote: we got to ask HR to first administer a technical test before any interviews are arranged; test results are reviewed before deciding to interview the candidate I done tests like that, they all suck. This is how it

Re: TDD is BS?

2013-06-21 Thread John Colvin
On Friday, 21 June 2013 at 20:25:28 UTC, H. S. Teoh wrote: On Fri, Jun 21, 2013 at 09:49:21PM +0200, John Colvin wrote: On Friday, 21 June 2013 at 19:14:18 UTC, Walter Bright wrote: >On 6/20/2013 8:50 PM, H. S. Teoh wrote: >>One of my previous supervisors told me that when he gets >>resumés, as

Re: TDD is BS?

2013-06-21 Thread Nick Sabalausky
On Fri, 21 Jun 2013 17:48:25 +0200 Jacob Carlborg wrote: > On 2013-06-21 16:56, H. S. Teoh wrote: > > > +1, me too! I can say that 85-90% of what I do at work today, I > > learned from my personal coding projects, not from the CS courses I > > took in university. (That's why I like to joke about

Re: Undefined behaviors & Clang 3.3

2013-06-21 Thread Walter Bright
On 6/21/2013 8:51 AM, qznc wrote: The D definition mirrors what modern PC architectures do and hence can be compiled efficiently there. C avoids coupling with any architecture hence "undefined". What architectures do not wrap around? C is a very old language, and supported many architectures th

Re: TDD is BS?

2013-06-21 Thread H. S. Teoh
On Fri, Jun 21, 2013 at 12:11:51PM -0700, Walter Bright wrote: > On 6/21/2013 3:04 AM, Jacob Carlborg wrote: > >But I do some researcher about TDD and similar techniques, use my > >common sense, pick some pieces from here and there and use what I > >think works. > > I've been around long enough to

Re: Raising the bar on Phobos unittest coverage

2013-06-21 Thread Walter Bright
On 6/21/2013 2:26 AM, Joseph Rushton Wakeling wrote: I think a minimum acceptable threshold is necessary but not sufficient -- say your minimum code coverage is 85%, it's still most likely unacceptable if your coverage drops (say) from 92% to 87%. If your minimum acceptable coverage is 92%, why

Re: TDD is BS?

2013-06-21 Thread Walter Bright
On 6/21/2013 1:34 PM, H. S. Teoh wrote: But what actually happened was, nobody wanted to work on mundane projects -- maintaining existing systems, keeping the servers running, doing routine chores necessary for everyday operations, etc.. There was a lot of infighting on who gets to work on the fu

Re: TDD is BS?

2013-06-21 Thread H. S. Teoh
On Fri, Jun 21, 2013 at 01:11:44PM -0700, Walter Bright wrote: > On 6/21/2013 12:49 PM, John Colvin wrote: > >If you want a normal programming job, you need to show more real > >world experience than a PhD, but just throwing out people who have > >proved their originality and in depth understanding

Re: TDD is BS?

2013-06-21 Thread H. S. Teoh
On Fri, Jun 21, 2013 at 09:49:21PM +0200, John Colvin wrote: > On Friday, 21 June 2013 at 19:14:18 UTC, Walter Bright wrote: > >On 6/20/2013 8:50 PM, H. S. Teoh wrote: > >>One of my previous supervisors told me that when he gets resumés, as > >>soon as he sees "Ph.D" he chucks it straight into the

Re: TDD is BS?

2013-06-21 Thread Simen Kjaeraas
On Fri, 21 Jun 2013 21:11:51 +0200, Walter Bright wrote: Whether you write the unit tests before, during, or after the module is written is irrelevant. I mostly agree with this, but there is one reason to write tests before implementing - you don't know the code yet. This way you don't fil

Re: TDD is BS?

2013-06-21 Thread Walter Bright
On 6/21/2013 12:49 PM, John Colvin wrote: If you want a normal programming job, you need to show more real world experience than a PhD, but just throwing out people who have proved their originality and in depth understanding of a topic through a PhD is nothing short of absurd. You need a mix o

Re: TDD is BS?

2013-06-21 Thread John Colvin
On Friday, 21 June 2013 at 19:14:18 UTC, Walter Bright wrote: On 6/20/2013 8:50 PM, H. S. Teoh wrote: One of my previous supervisors told me that when he gets resumés, as soon as he sees "Ph.D" he chucks it straight into the trash. He'd have missed out on Andrei, then. And a lot of other pe

Re: new discovery: import only if available

2013-06-21 Thread Adam D. Ruppe
On Friday, 21 June 2013 at 18:47:24 UTC, Rainer Schuetze wrote: I guess you should move the "static if" outside of the template to avoid having it evaluated for every type. This can be pretty expensive as it includes a file search every time if it fails. Probably also the __traits(compiles

Re: TDD is BS?

2013-06-21 Thread Walter Bright
On 6/20/2013 8:50 PM, H. S. Teoh wrote: One of my previous supervisors told me that when he gets resumés, as soon as he sees "Ph.D" he chucks it straight into the trash. He'd have missed out on Andrei, then.

Re: TDD is BS?

2013-06-21 Thread Walter Bright
On 6/21/2013 3:04 AM, Jacob Carlborg wrote: But I do some researcher about TDD and similar techniques, use my common sense, pick some pieces from here and there and use what I think works. I've been around long enough to have seen an endless parade of magic new techniques du jour, most of whi

Re: new discovery: import only if available

2013-06-21 Thread Rainer Schuetze
On 21.06.2013 14:41, Adam D. Ruppe wrote: OMG guys this finishes the druntime extension problem! Try it yourself, open up dmd2/src/druntime/import/object.di and find template RTInfo. Change it to this: template RTInfo(T) { static if(__traits(compiles, { import druntime.extensions; auto

Re: Undefined behaviors & Clang 3.3

2013-06-21 Thread deadalnix
On Friday, 21 June 2013 at 15:51:55 UTC, qznc wrote: The D definition mirrors what modern PC architectures do and hence can be compiled efficiently there. C avoids coupling with any architecture hence "undefined". What architectures do not wrap around? Some used to have +0 and -0 and so wrap

Re: Time to split up std.datetime into a package?

2013-06-21 Thread Jonathan M Davis
On Friday, June 21, 2013 14:23:48 Wyatt wrote: > On Thursday, 20 June 2013 at 18:54:20 UTC, Jonathan M Davis wrote: > > IMHO, the obvious split (and what I've wanted to do for some > > time) is > > > > std/datetime/common.d > > std/datetime/interval.d > > std/datetime/timepoint.d > > std/datetime/

Re: TDD is BS?

2013-06-21 Thread H. S. Teoh
On Fri, Jun 21, 2013 at 05:48:25PM +0200, Jacob Carlborg wrote: > On 2013-06-21 16:56, H. S. Teoh wrote: > > >+1, me too! I can say that 85-90% of what I do at work today, I > >learned from my personal coding projects, not from the CS courses I > >took in university. (That's why I like to joke abo

Re: Raising the bar on Phobos unittest coverage

2013-06-21 Thread Vladimir Panteleev
On Friday, 21 June 2013 at 10:11:44 UTC, Jacob Carlborg wrote: On 2013-06-21 11:13, qznc wrote: Took that is a chance to become a contributor to Phobos and submitted a pull request [0]. Am I supposed to file something in Bugzilla or just wait for someone to look at my request? A matching bu

Re: Undefined behaviors & Clang 3.3

2013-06-21 Thread qznc
On Friday, 21 June 2013 at 13:48:19 UTC, eles wrote: On Friday, 21 June 2013 at 10:42:32 UTC, bearophile wrote: qznc: In D an integer overflow is defined, so there is no need to detect anything about it. A language should offer the programmer a way to specify when an integral overflow is ac

Re: TDD is BS?

2013-06-21 Thread Jacob Carlborg
On 2013-06-21 16:56, H. S. Teoh wrote: +1, me too! I can say that 85-90% of what I do at work today, I learned from my personal coding projects, not from the CS courses I took in university. (That's why I like to joke about CS grads knowing more about uncomputable problems than computable ones..

Re: OT: CS education gone wrong (Was: Re: TDD is BS?)

2013-06-21 Thread Jacob Carlborg
On 2013-06-21 17:14, H. S. Teoh wrote: Heh, at my job, we're looking for skill in specific languages, so candidates are explicitly asked to write C code. And this is done not in an interview setting (which puts too much pressure on the candidate -- can *you* write code in front of interviewers w

Re: OT: CS education gone wrong (Was: Re: TDD is BS?)

2013-06-21 Thread H. S. Teoh
On Fri, Jun 21, 2013 at 11:59:12AM +0200, Jacob Carlborg wrote: > On 2013-06-21 07:57, H. S. Teoh wrote: > > >we got to ask HR to first administer a technical test before any > >interviews are arranged; test results are reviewed before deciding to > >interview the candidate > > I done tests like

Re: Runtime reflection idea

2013-06-21 Thread Steven Schveighoffer
On Fri, 21 Jun 2013 08:43:15 -0400, Adam D. Ruppe wrote: On Thursday, 30 May 2013 at 15:12:57 UTC, Steven Schveighoffer wrote: I would like to see the necessary framework for RTInfo to allow expansion WITHOUT having to modify object.d. I think this can be done, and then it allows anyone

Re: TDD is BS?

2013-06-21 Thread H. S. Teoh
On Fri, Jun 21, 2013 at 11:31:22AM +0200, Jacob Carlborg wrote: > On 2013-06-21 05:32, Nick Sabalausky wrote: > > >[Snip] > > > >Bottom line is, schools are absolute garbage, and academic > >achievement is *at best* completely meaningless. > > I couldn't agree more with your post. The problem tho

Re: Undefined behaviors & Clang 3.3

2013-06-21 Thread Artur Skawina
On 06/21/13 15:48, eles wrote: > On Friday, 21 June 2013 at 10:42:32 UTC, bearophile wrote: >> qznc: >> >>> In D an integer overflow is defined, so there is no need to detect anything >>> about it. >> >> A language should offer the programmer a way to specify when an integral >> overflow is accep

Re: allMembers and getMember traits behavior

2013-06-21 Thread Artur Skawina
On 06/21/13 15:50, Martin wrote: > On Friday, 21 June 2013 at 13:42:44 UTC, Artur Skawina wrote: >>>pragma(msg, __traits(getProtection, mixin("TestClass." ~ member))); > Thanks, that sort of works. It prints "private" but then immediately gives an > error: > test.d(12): Error: class main.TestC

Re: allMembers and getMember traits behavior

2013-06-21 Thread Jacob Carlborg
On 2013-06-21 15:50, Martin wrote: Thanks, that sort of works. It prints "private" but then immediately gives an error: test.d(12): Error: class main.TestClass member value is not accessible Sigh, this is DMD 2.063.2 by the way. That sucks. Time for a bugzilla report. http://d.puremagic.com/

Re: allMembers and getMember traits behavior

2013-06-21 Thread Martin
On Friday, 21 June 2013 at 13:42:44 UTC, Artur Skawina wrote: On 06/21/13 15:27, Martin wrote: On Friday, 21 June 2013 at 13:15:43 UTC, Jacob Carlborg wrote: On 2013-06-21 15:04, Martin wrote: module test; void test() { foreach (member; __traits(allMembers, Client)) { pragma

Re: Undefined behaviors & Clang 3.3

2013-06-21 Thread eles
On Friday, 21 June 2013 at 10:42:32 UTC, bearophile wrote: qznc: In D an integer overflow is defined, so there is no need to detect anything about it. A language should offer the programmer a way to specify when an integral overflow is acceptable. Otherwise the other cases are bugs. Clang 3

Re: allMembers and getMember traits behavior

2013-06-21 Thread Artur Skawina
On 06/21/13 15:27, Martin wrote: > On Friday, 21 June 2013 at 13:15:43 UTC, Jacob Carlborg wrote: >> On 2013-06-21 15:04, Martin wrote: >>> module test; >>> >>> void test() >>> { >>> >>> >>> foreach (member; __traits(allMembers, Client)) >>> { >>> pragma(msg, member); // Prints all

Re: TDD is BS?

2013-06-21 Thread deadalnix
On Wednesday, 19 June 2013 at 11:01:05 UTC, Szymon Gatner wrote: This is not strictly D related but I am very curious about D's community opinion on the points made by non other than Jim Coplien here: http://www.tele-task.de/archive/video/flash/16130/ D is the only language (that I am aware o

Re: allMembers and getMember traits behavior

2013-06-21 Thread Martin
On Friday, 21 June 2013 at 13:15:43 UTC, Jacob Carlborg wrote: On 2013-06-21 15:04, Martin wrote: module test; void test() { foreach (member; __traits(allMembers, Client)) { pragma(msg, member); // Prints all members fine, including "value" } // This line fails

Re: allMembers and getMember traits behavior

2013-06-21 Thread Jacob Carlborg
On 2013-06-21 15:04, Martin wrote: module test; void test() { foreach (member; __traits(allMembers, Client)) { pragma(msg, member); // Prints all members fine, including "value" } // This line fails static if(__traits(getProtection, __traits(getMember, TestCl

Re: new discovery: import only if available

2013-06-21 Thread Simen Kjaeraas
On Fri, 21 Jun 2013 14:41:29 +0200, Adam D. Ruppe wrote: OMG guys this finishes the druntime extension problem! That is awesome. Make a pull request. -- Simen

Re: Undefined behaviors & Clang 3.3

2013-06-21 Thread Artur Skawina
On 06/21/13 10:20, qznc wrote: > In D an integer overflow is defined, so there is no need to detect anything > about it. See Spec: > > "If both operands are of integral types and an overflow or underflow occurs > in the computation, wrapping will happen. That is, uint.max + 1 == uint.min > and

Re: OT: CS education gone wrong (Was: Re: TDD is BS?)

2013-06-21 Thread Jacob Carlborg
On 2013-06-21 12:20, Andrej Mitrovic wrote: Oh? That's cool. Which [rpkect? I don't know if it was a particular project but at least one company was interested in several projects, DStep (convert C/Objective-C headers to D modules), Jazz (D frontend) and Orbit (D package manager). https://

allMembers and getMember traits behavior

2013-06-21 Thread Martin
module test; void test() { foreach (member; __traits(allMembers, Client)) { pragma(msg, member); // Prints all members fine, including "value" } // This line fails static if(__traits(getProtection, __traits(getMember, TestClass, "value")) == "public") {

Re: Runtime reflection idea

2013-06-21 Thread Adam D. Ruppe
On Thursday, 30 May 2013 at 15:12:57 UTC, Steven Schveighoffer wrote: I would like to see the necessary framework for RTInfo to allow expansion WITHOUT having to modify object.d. I think this can be done, and then it allows anyone to insert whatever they want for RTInfo based on their own need

Re: new discovery: import only if available

2013-06-21 Thread Adam D. Ruppe
OMG guys this finishes the druntime extension problem! Try it yourself, open up dmd2/src/druntime/import/object.di and find template RTInfo. Change it to this: template RTInfo(T) { static if(__traits(compiles, { import druntime.extensions; auto a = druntime.extensions.RTInfo!T; }))

Re: Time to split up std.datetime into a package?

2013-06-21 Thread Wyatt
On Thursday, 20 June 2013 at 18:54:20 UTC, Jonathan M Davis wrote: IMHO, the obvious split (and what I've wanted to do for some time) is std/datetime/common.d std/datetime/interval.d std/datetime/timepoint.d std/datetime/timezone.d common would primarily have the free functions; interval would

Re: OT: CS education gone wrong (Was: Re: TDD is BS?)

2013-06-21 Thread Wyatt
On Friday, 21 June 2013 at 05:59:00 UTC, H. S. Teoh wrote: In spite of it all, though, we still sometimes end up hiring people who, 6 months down the road, write code that makes you scratch your head going "huh?! that genius coder we hired wrote *this* junk?!". But maybe some hiring managers a

Re: OT: CS education gone wrong (Was: Re: TDD is BS?)

2013-06-21 Thread Paulo Pinto
On Friday, 21 June 2013 at 06:34:09 UTC, Andrej Mitrovic wrote: On 6/21/13, H. S. Teoh wrote: In spite of it all, though, we still sometimes end up hiring people who, 6 months down the road, write code that makes you scratch your head going "huh?! that genius coder we hired wrote *this* junk?

Re: Undefined behaviors & Clang 3.3

2013-06-21 Thread bearophile
qznc: In D an integer overflow is defined, so there is no need to detect anything about it. A language should offer the programmer a way to specify when an integral overflow is acceptable. Otherwise the other cases are bugs. Clang 3.3 helps find some of those bugs. Bye, bearophile

Re: OT: CS education gone wrong (Was: Re: TDD is BS?)

2013-06-21 Thread Andrej Mitrovic
On 6/21/13, Jacob Carlborg wrote: > I agree. Most interviews I have been on lately is due to my github project. Oh? That's cool. Which [rpkect?

Re: OT: CS education gone wrong (Was: Re: TDD is BS?)

2013-06-21 Thread Andrej Mitrovic
On 6/21/13, Andrej Mitrovic wrote: > On 6/21/13, Jacob Carlborg wrote: >> I agree. Most interviews I have been on lately is due to my github >> project. > > Oh? That's cool. Which [rpkect? > Looks like I rot13'ed by accident, I meant which project?

Re: Raising the bar on Phobos unittest coverage

2013-06-21 Thread Jacob Carlborg
On 2013-06-21 11:13, qznc wrote: Took that is a chance to become a contributor to Phobos and submitted a pull request [0]. Am I supposed to file something in Bugzilla or just wait for someone to look at my request? A matching bugzilla is always a good idea. The changelog is built from that. -

Re: Raising the bar on Phobos unittest coverage

2013-06-21 Thread Jacob Carlborg
On 2013-06-21 11:26, Joseph Rushton Wakeling wrote: -cov=nnn tests aren't (AFAICS) implemented as part of make unittest, nor is plain -cov. I thought that was the idea. Perhaps it's not finished yet. I think a minimum acceptable threshold is necessary but not sufficient -- say your minimum c

Re: TDD is BS?

2013-06-21 Thread Jacob Carlborg
On 2013-06-20 22:22, Walter Bright wrote: Well, it was your example :-) You got me there :) That's how you're supposed to write TDD according most strong believers. But I do some researcher about TDD and similar techniques, use my common sense, pick some pieces from here and there and use w

Re: OT: CS education gone wrong (Was: Re: TDD is BS?)

2013-06-21 Thread Jacob Carlborg
On 2013-06-21 07:57, H. S. Teoh wrote: we got to ask HR to first administer a technical test before any interviews are arranged; test results are reviewed before deciding to interview the candidate I done tests like that, they all suck. This is how it usually works: You get a problem to solve

Re: TDD is BS?

2013-06-21 Thread Jacob Carlborg
On 2013-06-21 05:32, Nick Sabalausky wrote: [Snip] Bottom line is, schools are absolute garbage, and academic achievement is *at best* completely meaningless. I couldn't agree more with your post. The problem though is that most hiring process uses the HR department, as you mentioned in an o

Re: OT: CS education gone wrong (Was: Re: TDD is BS?)

2013-06-21 Thread Jacob Carlborg
On 2013-06-21 08:33, Andrej Mitrovic wrote: Seems like nowadays it's not too far-fetched to ask for a github/bitbucket/etc username and see the work they've done, the way they write code, contribute, etc. It should give a better "feel" than any interview. I agree. Most interviews I have been o

Re: Raising the bar on Phobos unittest coverage

2013-06-21 Thread Joseph Rushton Wakeling
On 06/21/2013 09:33 AM, Jacob Carlborg wrote: > I thought that flag was supposed to make the test fail if the coverage gets > lower than specified? It would be nice to have the value printed to see if the > coverage is increased. -cov=nnn tests aren't (AFAICS) implemented as part of make unittest,

Re: TDD is BS?

2013-06-21 Thread Jacob Carlborg
On 2013-06-21 00:37, Nick Sabalausky wrote: I'm not saying that it's necessarily bad to write a function's tests before the function itself, I just don't see what it really matters to code the tests first. The important thing is that the tests get written, ideally before you move on to something

Re: Raising the bar on Phobos unittest coverage

2013-06-21 Thread qznc
On Monday, 18 March 2013 at 01:00:43 UTC, Walter Bright wrote: The current state looks like this, the percentages are the current coverage amounts. It's not bad, but there's a lot of low hanging fruit ready for pull requests! $(DMD) -cov=57 -unittest -main -run std\uri.d Took that is

Re: TDD is BS?

2013-06-21 Thread Jacob Carlborg
On 2013-06-21 00:18, Nick Sabalausky wrote: Right. It's like creating a Vacuum Cleaner or a car or a kitchen appliance by designing the case, housing and controls first, and then trying to design working internals to fit that mold. Form needs to follow function. Ever heard of Apple :) -- /Jac

Re: Raising the bar on Phobos unittest coverage

2013-06-21 Thread Jacob Carlborg
On 2013-06-20 23:19, Joseph Rushton Wakeling wrote: I've submitted a pull request raising that to 91% :-) Can I suggest tweaking the make files to print code coverage percentages when running the Phobos unittests? Would be useful to check if there are any unexpected drops or just to have a qui

Re: Undefined behaviors & Clang 3.3

2013-06-21 Thread qznc
On Thursday, 20 June 2013 at 14:28:42 UTC, bearophile wrote: Another nice post about the Integer Undefined Behavior Detection of Clang 3.3: http://blog.regehr.org/archives/963 Until these languages die, which isn’t going to happen anytime soon, our best defense against undefined behaviors is

  1   2   >