Re: Learning With D

2011-05-22 Thread Emil Madsen
On 22 May 2011 22:26, bearophile bearophileh...@lycos.com wrote:

 Jesse Phillips:

  We all know D would make a very good first language, and I want to
 provide some material that makes this possible.

 This is a very interesting experiment, thank you for writing it.

 Regarding languages to be used as first language for adults or near-adults,
 I think there is no very good language for this purpose (for children the
 situation is better, there are many Logo variants, some graphical languages,
 etc). And even if you invent a language very good for this purpose, probably
 no one uses it, there are no libs and ecosystem for it, so it keeps being a
 mostly useless and buggy toy. I don't see many ways out of this situation.

 Bye,
 bearophile


Well about learning a programming language as your first; I really think its
worth considering that several universities (AU atleast) introduces their
students to programming, using java, simply because it offers several
pedagogical learning tools alike; Greenfoot, that makes the introduction
more of a game than really an exercise.

I honestly think, it would make D more attractive as a first language to
learn, if it had these 'pedagogical' teaching tools.

-- 
// Yours sincerely
// Emil 'Skeen' Madsen


Re: D Article Contest - win an iPad2

2011-03-30 Thread Emil Madsen
On 30 March 2011 07:40, Walter Bright newshou...@digitalmars.com wrote:

 D Article Contest!

 First Prize: iPad 2 wifi 16Gb

 Write an article about the D programming language. The articles submitted
 will be voted on by the participants in the digitalmars.D newsgroup. Vote
 tallies determine the winners!

 Article submission deadline: before June 1, 2011, GMT
 Voting deadline: before June 8, 2011, GMT


 Author Rules

 1. Article is submitted under the Creative Commons License
 2. Digital Mars may submit the article on your behalf to publishers like
 DDJ and Artima.com
 3. You will receive any proceeds from those submissions in addition to any
 prize money
 4. Digital Mars may post the submitted articles on the
 d_programming_language.org web site
 5. You may post article drafts at any time, collect feedback, and revise up
 until the submission deadline
 6. Article must be about the D programming language
 7. You may submit as many articles as you wish
 8. Anyone may enter
 9. Final submissions are to be posted to the digitalmars.D newsgroup with
 [Submission] in the Subject line


 Voting Rules

 1. You must have used your handle to post to the digitalmars.D newsgroup
 prior to this announcement
 2. One vote per handle
 3. Voting will be done on the digitalmars.D newsgroup


 Winner Rules

 1. Ties split the cash equivalent
 2. Optional cash equivalent
 3. Winner is responsible for any taxes on prize



Lets hope its not a tie, such a shame to split an iPad ;)

-- 
// Yours sincerely
// Emil 'Skeen' Madsen


Re: QtD is suspended

2010-09-27 Thread Emil Madsen
Is there a partly complete release? - that just basic stuff available?

On 26 September 2010 19:04, Max Samukha spam...@d-coding.com wrote:

 On 09/26/2010 05:36 PM, Emil Madsen wrote:

 Just curious about QtD, how far did the design process go in terms of %
 before it got suspended?
 10% - 25% - 50%? - and what would the time approximations be to finish it?

 On 16 September 2010 16:22, Max Samukha spam...@d-coding.com
 mailto:spam...@d-coding.com wrote:

After a good amount of hesitation, we have decided to put the QtD
project on hold. QtD has a potential to become a complete and
effective development platform for D but it is not going to happen
soon (unless people with harder hearts take it over). We have spent
half of the day hunting yet another dmd bug-o-feature and that is
the last straw.

We offer our apologies to people who put their hope upon the
project. Please come back in a year or two when the language has a
stable compiler with the features fully specified, implemented and
debugged.




 --

 // Yours sincerely
 // Emil 'Skeen' Madsen


 I guess it is about 67%. Basic stuff is in place, including cross-language
 virtual dispatch, partially meta-object system, signals/slots etc, but more
 advanced features like Q_PROPERTY are to be implemented. A couple of months
 (very roughly) before we have a stable and feature-compete version.




-- 
// Yours sincerely
// Emil 'Skeen' Madsen


Re: the bit[] type

2010-09-24 Thread Emil Madsen
Now I'm just curious, how does D represent a bool type as false and true, I
take it that false is 0b, is true anything but that? - or will the
compiler make sure, that its always 0b or would it be 0b0001?
(as 0b would be -1 if signed) - is there a given standard for this,
or is this up to the implementer of the compiler?

About the bit type, and the bitarray, if I'm interresting in doing anything
alike this, I'm off to allocating an array of chars? - and bitwise accessing
them, to change them?

And now another piece of curiousity, how did this align in memory, would the
compiler couple up bit types, to fill out a byte? - and if so, in how large
a scope would it do this? - current scope?

On 23 September 2010 19:32, bearophile bearophileh...@lycos.com wrote:

 jcc7:

  As you can see from the links to newsgroup threads at the bottom of the
 first
  page, the topic was discussed over many years. Perhaps the discussions
 have
  tapered off in recent years because the current approach is right.

 It's an interesting read, thank you (I was present only at the tail of it).

 It's a good example of how even an obviously simple feature like a
 bool/bit type may hide complexities, design difficulties, requires
 engineering trade-offs, and in the end may produce something with some
 inevitable design defects.

 ~bool is forbidden, but in DMD a bool is represented with 8 bits, so it has
 255 ways to be true and 1 to be false. A boolean like this:

 bool b = void;

 May contain something different from 0 or 1, this may cause some surprise.

 In those discussions I have seen Walter against the usage of bool as return
 type for opEquals, because a cast(bool)some_int is equivalent to:
 n ? 1 : 0
 That requires some instructions, so it isn't fully efficient.

 In the pages (operatoroverloading.html and hash-map.html) about the D2
 language I have seen different signatures for the struct opEquals, so I may
 add a little documentation bug report about it:
 int opEquals(ref const S s);
 const bool opEquals(ref const KeyType s);

 P. 258 of TDPL shows a struct opEquals that returns a bool, so I presume
 the efficiency considerations have left space for a more semantically clean
 implementation. Isn't DMD able to optimize away (when inlining is present)
 the slowdown caused by the n?1:0 ?

 Bye,
 bearophile




-- 
// Yours sincerely
// Emil 'Skeen' Madsen


Re: the bit[] type

2010-09-24 Thread Emil Madsen
Just because my last message, wasn't long enough I wanted to add more:

The real issue for me, is that the debate about bool and bit, has been about
if one of the other should be implemented, thats not the debate for me, as I
really do think, these types are quite different, even tho they represent
the same thing.

Now what I'm interested in knowing, is if it's really worth implementing
arrayslicing and such for the bit type, because in my opinion I think the
trade-off between usage and implementation cost of the feature, might not be
worth it, but if all of the features has been developed, when it was in use,
then I think its a shame, not allowing us application writes from using it.
- and in case its not stable or whatever, wouldn't it be possible to have it
in a snapshot version, till its stabile?

-- 
// Yours sincerely
// Emil 'Skeen' Madsen


the bit[] type

2010-09-22 Thread Emil Madsen
Okay I'm interresting in getting more infomation about the bit[] type;
- is it still implemented in D1? - and why was it removed?
- is it possible to get a link to the design considerations of removing it,
and such?
- any source of info, on the design phase about it, will be in my interrest

-- 
// Yours sincerely
// Emil 'Skeen' Madsen


Re: the bit[] type

2010-09-22 Thread Emil Madsen
Didn't knew about D.learn :) - I'll head over there, to ask questions alike
this one, instead of polluting here.
the bit type in D1, is just an alias for bool I take it, for backwards
compatibility`? - is it deprecated?

Yet again, thanks you :)

On 23 September 2010 00:32, bearophile bearophileh...@lycos.com wrote:

 Emil Madsen:

  Okay I'm interresting in getting more infomation about the bit[] type;
  - is it still implemented in D1? - and why was it removed?
  - is it possible to get a link to the design considerations of removing
 it,
  and such?
  - any source of info, on the design phase about it, will be in my
 interrest

 D.learn is a better place to ask such questions.
 In D1 now the bit type exists just as an alias.
 I think it was removed because you can't get the address of a bit. D1
 Phobos has functions in std.intrinsic to manage bit arrays, and D2 Phobos
 has a module that implements a bit array and a way to build struct bit
 fields.

 Bye,
 bearophile



-- 
// Yours sincerely
// Emil 'Skeen' Madsen


Re: Sept. 15 - The Many Faces of D

2010-09-07 Thread Emil Madsen
Would love to see it :)
However for at student in europe, its quite far.
Hoping for availablity of it, on youtube :)

On 7 September 2010 20:16, Walter Bright newshou...@digitalmars.com wrote:

 Mike James wrote:

 For those of us on different continents - will it be available on youtube
 :-)


 I don't know.



-- 
// Yours sincerely
// Emil 'Skeen' Madsen