> Let's hear from all of you here on the list (or in private to me and Michael
> if you'd rather that), so we can split up the development between all of
> us in the most optimal way!
I'm interested in helping but am tied up too much right now with other
things, so I will content myself with helping Michael every now and then
as needed.
> Regarding the programming language, the reasoning went something like this:
I agree that this topic has an enormous potential to spark off flames
and religious discussions. It's therefore important that we keep ourselves
to facts, both positive and negative.
> I really think that the application should be able to be run as a native
> application in Windows (although not ONLY in Windows), due to the huge
> userbase potential. Thus, languages like Python and Java are out the
> Window. Not counting some more obscure languages, that practically only
> leaves us with C and C++.
Yes.
I heavily tend towards the C option right now but I'm open
to be convinced otherwise. :)
> On the other hand, I guess C++ has the potential to create more elegant
> solutions,
Would you elaborate on that?
> if you just handle it correctly and carefully stay away from the
> luring messy side of the language.
And that?
> It's practically down to a "religious" discussion from there I think,
> but since Michael is the one offering to do the most actual work on it
> so far, I think that his preference for any of these languages should
> weight in relatively heavy.
Yes, it's an important point but I don't think it necessarily has
to be emphasized that heavily. Reasons:
* C isn't that hard when you know C++
* Exploration is part of a Master's Thesis
* Choices affecting the project as a whole must be balanced
against single developer experience and preferences, even
if the developer in question takes on a huge chunk of it.
> Also, C++ applications can quite easily use modules/subsets that are
> written in C, as long as we keep a good abstraction, which we absolutely
> intend to do, and that in turn takes away even more of the possible
> "bad" properties of using C++,
Unfortunately there's another side to this and an important argument
for me: the option to call Phantom functions via a foreign function
interface. It's simple with C but can be quite cumbersome with C++
due to non-standardized name mangling/ABI and private semantics
(e.g. the object system).
This -- i.e. the ability to easily code modules in another language
-- is a large advantage of C.
I hope others will chime in and state their analysis so we can
solve this issue quickly.
Leslie
The object orientation often results in somewhat more intuitive or
easily read code (again, if used the right way), and the functionality
you get "for free" along with the object orientation and its built-in
aspects and features might somewhat reduce the size and complexity of
the code you have to write yourself.
>> if you just handle it correctly and carefully stay away from the
>> luring messy side of the language.
>
> And that?
I'm not sure if what you mean "And that is?", referring to which are the
messy sides, but if you do, well, C++ has a _lot_ of features that you
can use to make the code extremely messy if you want to (or don't know
how to do the opposite), that's what I meant.
> * C isn't that hard when you know C++
>
> * Exploration is part of a Master's Thesis
Exploration and learning is one thing, but if Michael finds the entire
development process to be more tedious during the lenght of the work, it
will result is less being done, that's what I'm mostly concerned about.
Also, the learning and exploration at a master thesis level should
normally be aimed at a little higher level than learning or exploring a
programming language (I have a Master's degree in computer science
myself), i.e. it will be better invested in exploring/completing the
protocol itself.
>> Also, C++ applications can quite easily use modules/subsets that are
>> written in C, as long as we keep a good abstraction, which we absolutely
>> intend to do, and that in turn takes away even more of the possible
>> "bad" properties of using C++,
>
> Unfortunately there's another side to this and an important argument
> for me: the option to call Phantom functions via a foreign function
> interface. It's simple with C but can be quite cumbersome with C++
> due to non-standardized name mangling/ABI and private semantics
> (e.g. the object system).
>
> This -- i.e. the ability to easily code modules in another language
> -- is a large advantage of C.
I'm not extremely familiar with exactly _how_ cumbersome C++ would make
this, but I'm quite sure it won't be unsurmountable, not to mention all
the juicy master thesis "exploration" it will involve. ;-)
Again, I agree that C is "cleaner", but with clean you also get to do
more of the work yourself. I can only come to the same conclusion as
before, that I trust that the best results will come out of the main
developers (i.e. Michael so far) making this choice, after their own
careful consideration of the arguments presented here.
Regards,
Magnus
I would like to get involved later on, maybe with some tangents like
connecting any string resources with a web based translation interface
to facilitate internationalisation, and/or writing documentation.
I've just moved internationally and am starting a new job so I'm really
too busy to dedicate much time right now (and though I can follow
code, my C/C++ skillset is 'inexperienced' at best).
> I agree that this topic has an enormous potential to spark off flames
> and religious discussions. It's therefore important that we keep ourselves
> to facts, both positive and negative.
My input here is limited to 'common courtesy' - whoever's writing it
should have the final choice themselves, and everyone else should be
thankful they're writing it at all!
- Walter
> The object orientation often results in somewhat more intuitive or
> easily read code (again, if used the right way), and the functionality
> you get "for free" along with the object orientation and its built-in
> aspects and features might somewhat reduce the size and complexity of
> the code you have to write yourself.
There are nice, clean and mature object systems for C like GObject.
> I'm not sure if what you mean "And that is?", referring to which are the
> messy sides, but if you do, well, C++ has a _lot_ of features that you
> can use to make the code extremely messy if you want to (or don't know
> how to do the opposite), that's what I meant.
I would have liked a more detailed explanation of what of C++
you'd consider messy and which not.
> Exploration and learning is one thing, but if Michael finds the entire
> development process to be more tedious during the lenght of the work, it
> will result is less being done, that's what I'm mostly concerned about.
> Also, the learning and exploration at a master thesis level should
> normally be aimed at a little higher level than learning or exploring a
> programming language (I have a Master's degree in computer science
> myself), i.e. it will be better invested in exploring/completing the
> protocol itself.
I agree, it's mainly a scientific exercise after all.
> Again, I agree that C is "cleaner", but with clean you also get to do
> more of the work yourself.
Alright, but for most of the functionality (e.g. array/buffer/string
management, object orientiation) there are good libraries.
> I can only come to the same conclusion as
> before, that I trust that the best results will come out of the main
> developers (i.e. Michael so far) making this choice, after their own
> careful consideration of the arguments presented here.
Again I agree. It's our job to present the options as best as possible
so Michael (and others who decide to invest large amount of time right
away) can make an informed decision.
Leslie
> I have talked to some more cs students of my university and they gave
> me good arguments against using Java or Python and other scripting
> language. The main reason for that is, that they require a runtime
> environment, which leads to a couple of problems like: if we want
> Phantom to be adopted by the masses, even something simple as
> installing Java or Python on their computer would drastically limit
> out target group. Even if we'd somehow include all things we'd need in
> the binary / install package, this might lead to problems when runtime
> environments are already installed.
Then you seem to have arrived at the same conclusion as we in this
group. ;)
> We ruled languages like Prolog (which I am very good at) and Lisp out,
> because there are too less OpenSource programmers out there, being
> firm in these, which could continue and maintenance the project after
> me.
Sorry for being slightly off-topic, but I must disagree here for the
sake of truth. I don't know about Prolog but Lisp (Scheme and
Common Lisp) rather disqualifies for the same reasons as Python
does, surely not for lack of popularity among Open Source
programmers -- although it has to be admitted that Lisp
communities haven't yet attracted as many followers as Python
or Perl.
> That brings us down to C and C++.
> For some tasks that might lie ahead of us, like low level hardware /
> kernel programming and efficiency critical methods/classes, C seems
> the best choice.
> For modeling, object orientation, structuring and code readability, C+
> + seems the best choice (at least for me, since I'll be doing the
> structuring, modeling etc.).
For this to be really useful it would be nice to have a clean
separation between the two parts -- maybe two libraries?
In what way do you think hardware programming is necessary?
> So for me it seems a good choice at this point to use C++ as main
> language for the project, but to use C where it makes sense. As far as
> the people I talked to informed me, using C in a C++ project is very
> easily done and basically is broken down to some casts of objects to
> structures. Also someone suggested to produce a generic library that
> would allow people to program their own high level GUI and stuff in
> any language they like.
Yes, I strongly agree here.
Leslie
> Even before doing any interfaces (C++) I would propose to layout the
> protocol itself:
> such as data structures,
Yes. It's helpful to do data-driven development but it's important
not to get carried away with it.
> wire format
Why would we care about the protocol at the wire level?
Even if we'd care, how would we influence this?
> little/big endian format,
> is it a binary protocol or a more "human readable" (like XML ;-) ).
Those are implementation details and I advise against caring
about them at this stage.
> Also there should be some definitions about the crypto algorithms,
> hash algorithms (key length for example, which streaming crypto (AES
> in
> CFB mode?) ) etc etc.
Again I'd advise against this.
Write stubs for make_hash(octets) and encrypt(octets)/decrypt(octets)
and that's it.
> Also define some schematic protocol flows (similar to SIP call flows,
> for
> example) that also show which information is transfered, and which
> information each node uses.
Yes, very good.
> During development, test and interop-tests of ZRTP this was extremely
> important and uncovered quite some problems.
I agree that tests are important; we'll see whether there are enough
interested parties and effort to make shared testing possible before
the end of Michael's work.
Leslie