Re: [OT] quoting text

2009-06-18 Thread Jarrett Billingsley
On Thu, Jun 18, 2009 at 11:15 PM, Steven Schveighoffer wrote: > On Thu, 18 Jun 2009 19:16:46 -0400, Stewart Gordon > wrote: > >> Steven Schveighoffer wrote: >>> >>> On Sat, 13 Jun 2009 10:51:56 -0400, Stewart Gordon >>> wrote: >> >> If I want to read the whole message you're replying t

Re: [OT] quoting text

2009-06-18 Thread Steven Schveighoffer
On Thu, 18 Jun 2009 19:16:46 -0400, Stewart Gordon wrote: Steven Schveighoffer wrote: On Sat, 13 Jun 2009 10:51:56 -0400, Stewart Gordon wrote: If I want to read the whole message you're replying to, I can open up the mesasge you're replying to in my newsreader. Yes, but there are so

Re: [SO] Modifing local class instance in pure function

2009-06-18 Thread Steven Schveighoffer
On Thu, 18 Jun 2009 18:16:36 -0400, div0 wrote: Pure functions are not allowed to alter global state. That's what you doing when you create a new object. http://en.wikipedia.org/wiki/Functional_programming I once thought as you do. You are wrong. Memory allocation is a necessary funct

Re: [OT] quoting text

2009-06-18 Thread Stewart Gordon
Steven Schveighoffer wrote: On Sat, 13 Jun 2009 10:51:56 -0400, Stewart Gordon wrote: If I want to read the whole message you're replying to, I can open up the mesasge you're replying to in my newsreader. Yes, but there are some issues there: 1. the newsgroup/newsreader sometimes doesn't c

Re: [SO] Modifing local class instance in pure function

2009-06-18 Thread BCS
Reply to div0, Pure functions are not allowed to alter global state. That's what you doing when you create a new object. http://en.wikipedia.org/wiki/Functional_programming Based on that, cons makes lisp not functional.

Re: Expanded source code

2009-06-18 Thread Paul D. Anderson
Paul D. Anderson Wrote: > Is there a way to see the source for a D program after the mixins and > templates, etc., are expanded? > > I get occasional error messages saying I've got incompatible types, for > example, but the error message only makes sense when I mentally instantiate a > templat

Re: [SO] Modifing local class instance in pure function

2009-06-18 Thread div0
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jesse Phillips wrote: > http://stackoverflow.com/questions/1008803/how-to-use-pure-in-d-2-0 > > class TestPure > { > string[] msg; > void addMsg( string s ) > { >msg ~= s; >} > }; > > pure TestPure run2() > { >TestPure t = new TestPur

Re: bitfields

2009-06-18 Thread Jarrett Billingsley
On Thu, Jun 18, 2009 at 10:28 AM, novice2 wrote: > Jarrett Billingsley Wrote: > >> It's entirely possible to have two different C compilers >> output different code for the same bitfield definitions.  For that > > Dut how is include files for interfacing is published officialy? For example > Sun J

Re: bitfields

2009-06-18 Thread novice2
Jarrett Billingsley Wrote: > It's entirely possible to have two different C compilers > output different code for the same bitfield definitions. For that Dut how is include files for interfacing is published officialy? For example Sun Java SDK .h files have bitfields to interfacing with java VM

Re: bitfields

2009-06-18 Thread bearophile
Jarrett Billingsley: > Practically speaking, sure. Most C compilers will take the path of > least resistance and just pack all the bitfields together as tightly > as they can starting with the LSB, and that is - AFAIK - what > std.bitmanip's bitfield support does. But there are no guarantees. Th

Re: bitfields

2009-06-18 Thread Jarrett Billingsley
On Thu, Jun 18, 2009 at 9:16 AM, novice2 wrote: > does anyone know: is D2 std.bitmanip compatible with C bitfields? > can i use it, if i need translate .h file with something like this: > > typedef struct { >    unsigned int can_compress : 1; >    unsigned int can_uncompress : 1; >    unsigned int

bitfields

2009-06-18 Thread novice2
does anyone know: is D2 std.bitmanip compatible with C bitfields? can i use it, if i need translate .h file with something like this: typedef struct { unsigned int can_compress : 1; unsigned int can_uncompress : 1; unsigned int can_get_info : 1; unsigned int : 7; unsigned int :