[9fans] c++

2012-11-19 Thread Steve Simon
I need to learn c++ for work - people have strong opinions on
languages I know, and not everyone likes c++ but its a requirment for me.

I really want to develop a good sence of c++ style, I learnt C at the feet of
KR and then the plan9 sourcecode so I learnt how to write clean elegant code
(I think :-). The problem I am finding is there are many c++ styles and I have
yet to find a clean and elegant one.

anyone sugest a project that I could look at that contains well written code?
failing that is there a book that teaches good style?

I am refering to things like adding a leading m_ to class member variables
(which looks horrid to me but I am willing to learn), and smart locks (mutexs
which unlock on destruct).

Thanks for any suggestions.

-Steve



[9fans] Apache portable runtime

2012-11-19 Thread Steve Simon
Somone was working on a port of the apache portable
runtime a while back but I have lost their email.

could they contact me please?

Thanks,

-Steve



Re: [9fans] Apache portable runtime

2012-11-19 Thread Jens Staal
måndagen den 19 november 2012 10.05.16 skrev  Steve Simon:
 Somone was working on a port of the apache portable
 runtime a while back but I have lost their email.
 
 could they contact me please?
 
 Thanks,
 
 -Steve

Hi

you can find my apr port at:

http://code.google.com/p/ports2plan9/


there is a binary download for i386, but I realized that it was broken during 
compilation of iconv so you are probably better off with a hg checkout.

I have unfortunately not had much time playing with porting stuff to plan9 
lately after I became a father in May. Got some fun ideas that I would like to 
explore though.

anyone wanting to join or take over governance of above project is free to do 
so.

also another warning: I am a total amateur (molecular biologist as a day job) 
so do not expect beatiful solutions ;)



Re: [9fans] c++

2012-11-19 Thread iainws
I would definitely use the new features of c++0x. Autos and Lambdas are the 
biggest noticeable change, so using them could be good style. Apparently the 
new constant expression offers optimisations from the compiler (probably 
equivalent to Java's final). Initialisation save's a couple of lines now. I'd 
also be interested in any books on the new threading part. Good luck.



Re: [9fans] c++

2012-11-19 Thread Aram Hăvărneanu
RE2 is very good code, but it doesn't contain any modern C++
features, and it's not written in standard style. That is part of
what makes it good, I guess, but it might not help Steve.

-- 
Aram Hăvărneanu



Re: [9fans] c++

2012-11-19 Thread Balwinder S Dheeman

On 11/19/2012 03:29 PM, Steve Simon wrote:

I need to learn c++ for work - people have strong opinions on
languages I know, and not everyone likes c++ but its a requirment for me.

I really want to develop a good sence of c++ style, I learnt C at the feet of
KR and then the plan9 sourcecode so I learnt how to write clean elegant code
(I think :-). The problem I am finding is there are many c++ styles and I have
yet to find a clean and elegant one.

anyone sugest a project that I could look at that contains well written code?
failing that is there a book that teaches good style?

I am refering to things like adding a leading m_ to class member variables
(which looks horrid to me but I am willing to learn), and smart locks (mutexs
which unlock on destruct).


I think, one should use proper design regardless of program size; keep 
in mind that the small programs tend to become large programs.


In my view this means adhering to the OO (object oriented) programming 
paradigm making full use of established design patterns. In essence this 
boils down to programming against interfaces (pure virtual classes in C++).


The best books in the best practice category I've come across are:

1. C++ Coding Standards by Sutter and Alexandrescu, and
2. API design for C++ by Reddy.

The best OO design pattern introductory book I come across unfortunately 
uses Java as model language but it's still worth reading for the insight,


3. Head First Design Patterns by Freeman  Freeman.

and a few of the must read books:

1. C++ Annotations by Frank B. Brokken
   http://www.icce.rug.nl/documents/cplusplus/

See also:

1. http://www.cplusplus.com/

The best projects in the best/clean coding style I've come across are:

1. http://yate.null.ro/
2. http://qt.digia.com/

Hope that helps.

--
Balwinder S bdheeman Dheeman
(http://werc.homelinux.net/contact/)



Re: [9fans] c++

2012-11-19 Thread Aram Hăvărneanu
 1. C++ Coding Standards by Sutter and Alexandrescu, and

Haven't read this book, but I read Modern C++ Design by Alexandrescu,
and it was one of the worst books on programming I have ever read,
pretty much the antithesis of what we consider good in this group, so
caveat emptor.

 The best projects in the best/clean coding style I've come across are:

 1. http://yate.null.ro/

Bhaha. No.

-- 
Aram Hăvărneanu



[9fans] iwp9

2012-11-19 Thread erik quanstrom
thanks to eric jul for leading a great conference!

the proceedings are now up on iwp9.org.  the permanent
address of this site will be 7e.iwp9.org.

coraid plan to host iwp9 next year in athens, ga.
tenative plans are for late october to take advantage
of fall in georgia.

hope to see you all soon!

- erik



Re: [9fans] iwp9

2012-11-19 Thread Aram Hăvărneanu
No video recordings?

-- 
Aram Hăvărneanu



Re: [9fans] iwp9

2012-11-19 Thread erik quanstrom
On Mon Nov 19 08:05:31 EST 2012, ara...@mgk.ro wrote:
 No video recordings?
 

ah, no, sorry.  i invite you to come next year and do the honors.  :-)

- erik



Re: [9fans] iwp9

2012-11-19 Thread Bence Fábián
I wonder if there's an Athens in the country Georgia.
That would make the confusion whole.


2012/11/19 erik quanstrom quans...@quanstro.net

 thanks to eric jul for leading a great conference!

 the proceedings are now up on iwp9.org.  the permanent
 address of this site will be 7e.iwp9.org.

 coraid plan to host iwp9 next year in athens, ga.
 tenative plans are for late october to take advantage
 of fall in georgia.

 hope to see you all soon!

 - erik




Re: [9fans] iwp9

2012-11-19 Thread erik quanstrom
On Mon Nov 19 08:11:25 EST 2012, beg...@gmail.com wrote:

 I wonder if there's an Athens in the country Georgia.
 That would make the confusion whole.

athens, georgia, united states of america.  nearest airport ATL.

- erik



Re: [9fans] iwp9

2012-11-19 Thread Brantley Coile
The full ICAO code for Atlanta, Georgia, USA, includes a K as in  KATL.
As we say here in the south, ya'll come see us.
bwc

sent from my ipad

On Nov 19, 2012, at 8:22 AM, erik quanstrom quans...@quanstro.net wrote:

 On Mon Nov 19 08:11:25 EST 2012, beg...@gmail.com wrote:
 
 I wonder if there's an Athens in the country Georgia.
 That would make the confusion whole.
 
 athens, georgia, united states of america.  nearest airport ATL.
 
 - erik
 



Re: [9fans] c++

2012-11-19 Thread Robert Raschke
The only C++ book that I ever found to be worth it, is Ruminations on C++
by Andrew Koenig.

Robby
On Nov 19, 2012 10:01 AM, Steve Simon st...@quintile.net wrote:

 I need to learn c++ for work - people have strong opinions on
 languages I know, and not everyone likes c++ but its a requirment for me.

 I really want to develop a good sence of c++ style, I learnt C at the feet
 of
 KR and then the plan9 sourcecode so I learnt how to write clean elegant
 code
 (I think :-). The problem I am finding is there are many c++ styles and I
 have
 yet to find a clean and elegant one.

 anyone sugest a project that I could look at that contains well written
 code?
 failing that is there a book that teaches good style?

 I am refering to things like adding a leading m_ to class member variables
 (which looks horrid to me but I am willing to learn), and smart locks
 (mutexs
 which unlock on destruct).

 Thanks for any suggestions.

 -Steve




Re: [9fans] iwp9

2012-11-19 Thread Eric Jul
Thanks to Erik for the compliments concerning iwp9 :-)
I am glad you enjoyed the workshop and thank you for your comments throughout 
the workshop.

As I like flying, I would actually consider flying into the local Athens 
Airport, IATA:
AHN, ICAO: KAHN
(IATA uses 3 letter codes - that is the codes used, e.g., on your baggage tags. 
All
commercial airports have an IATA code. ICAO uses a 4 letter code, which is used 
to identify
airfields, e.g., in flight plans. All airports and most smaller airfields have 
an ICAO
code. Farm strips and often do not.)

Pacific Wings has two daily flights between the local airport and Atlanta 
Hartsfield.

-- Eric



Re: [9fans] c++

2012-11-19 Thread cinap_lenrek
this is the problem. c++ programs follow a different
definition of clean code than idiomatic c programs.

by clean, they dont mean elegant or simple...

it usualy boils down to lots and lots of structure,
delegation and micro management and obsession with
consistency and patterns. there will be proxy classes
and visitor and mvc patterns and all that stuff and
a c++ programmer will call it clean code because it
follows constentent camel case naming and the funky
patterms can be looked up in some book, tho its
very hard to read or understand what the whole thing
is even supposed todo with all that indirection and
boiler plate.

--
cinap

PS: i think this is relevant:

Sometimes, the elegant implementation is just a function.
Not a method. Not a class. Not a framework. Just a function.
-- John Carmack



Re: [9fans] c++

2012-11-19 Thread Calvin Morrison
On 19 November 2012 04:59, Steve Simon st...@quintile.net wrote:

 I need to learn c++ for work - people have strong opinions on
 languages I know, and not everyone likes c++ but its a requirment for me.

 I really want to develop a good sence of c++ style, I learnt C at the feet
 of
 KR and then the plan9 sourcecode so I learnt how to write clean elegant
 code
 (I think :-). The problem I am finding is there are many c++ styles and I
 have
 yet to find a clean and elegant one.

 anyone sugest a project that I could look at that contains well written
 code?
 failing that is there a book that teaches good style?

 I am refering to things like adding a leading m_ to class member variables
 (which looks horrid to me but I am willing to learn), and smart locks
 (mutexs
 which unlock on destruct).

 Thanks for any suggestions.

 -Steve


Isn't all C code valid C++? problem solved.


Re: [9fans] c++

2012-11-19 Thread tlaronde
It was not the question (since it is not a matter of taste but of
professional need), but I find quite significant that nobody has
cited a book of the author of the language as a good reading.

I'm sorry to say that, for me, this says something about the language
itself...
-- 
Thierry Laronde tlaronde +AT+ polynum +dot+ com
  http://www.kergis.com/
Key fingerprint = 0FF7 E906 FBAF FE95 FD89  250D 52B1 AE95 6006 F40C



Re: [9fans] c++

2012-11-19 Thread Kurt H Maier
On Mon, Nov 19, 2012 at 09:56:33AM -0500, Calvin Morrison wrote:
 On 19 November 2012 04:59, Steve Simon st...@quintile.net wrote:
 
 Isn't all C code valid C++? problem solved.


As of c99, they have diverged.



Re: [9fans] c++

2012-11-19 Thread Bence Fábián
If i remember correctly

void foo();

in C++ is equivalent to

void foo(void)

in C.  And the type of 'x' (character literal) in C++ is char. Apart
from that C++ is a superset of C.

But i think it hardly helps him. In the end he will have to follow the
conventions the others use. So I'd recommend reading the code you will
work on.  We use C++ too. And sadly it is hardly consistent since it is
written by loads of people and noone bothers to check. But it's mostly
readable. No template metaprogramming voodoo. Thankfully i work on some
internal tools right now so i can get away with C and yacc. I'm even
using plan9 right now to write documentation for one of them :)



2012/11/19 tlaro...@polynum.com

 It was not the question (since it is not a matter of taste but of
 professional need), but I find quite significant that nobody has
 cited a book of the author of the language as a good reading.

 I'm sorry to say that, for me, this says something about the language
 itself...
 --
 Thierry Laronde tlaronde +AT+ polynum +dot+ com
   http://www.kergis.com/
 Key fingerprint = 0FF7 E906 FBAF FE95 FD89  250D 52B1 AE95 6006 F40C




Re: [9fans] c++

2012-11-19 Thread cinap_lenrek
no, its not.

--
cinap



Re: [9fans] c++

2012-11-19 Thread Bence Fábián
Then it's not. And if it were it still wouldn't do any good. Just check the
code of the others.


2012/11/19 cinap_len...@gmx.de

 no, its not.

 --
 cinap




Re: [9fans] iwp9

2012-11-19 Thread Andrés Domínguez
2012/11/19 Bence Fábián beg...@gmail.com:
 I wonder if there's an Athens in the country Georgia.
 That would make the confusion whole.

Nearly all Athens are in the United States (wikipedia)
http://en.wikipedia.org/wiki/Athens#Other_locations_named_after_Athens
Greeks should be proud being so famous. Without sign of Athens in
Near East's Georgia.

This days GPS coordinates are a must ;-).

Andrés



Re: [9fans] iwp9

2012-11-19 Thread erik quanstrom
; cat /lib/sky/here
33.96 83.375  246.3

the second field should be -83.375; the sign is inverted.

- erik



Re: [9fans] iwp9

2012-11-19 Thread Bence Fábián
Americans aren't really creative with their city names.
They should learn from the welsh. :)


2012/11/19 Andrés Domínguez andres...@gmail.com

 2012/11/19 Bence Fábián beg...@gmail.com:
  I wonder if there's an Athens in the country Georgia.
  That would make the confusion whole.

 Nearly all Athens are in the United States (wikipedia)
 http://en.wikipedia.org/wiki/Athens#Other_locations_named_after_Athens
 Greeks should be proud being so famous. Without sign of Athens in
 Near East's Georgia.

 This days GPS coordinates are a must ;-).

 Andrés




Re: [9fans] c++

2012-11-19 Thread Andrés Domínguez
2012/11/19 Steve Simon st...@quintile.net:
 I need to learn c++ for work - people have strong opinions on
 languages I know, and not everyone likes c++ but its a requirment for me.

C++ Annotations is good for C programers, in my opinion.
http://www.icce.rug.nl/documents/cplusplus/

 I really want to develop a good sence of c++ style, I learnt C at the feet of
 KR and then the plan9 sourcecode so I learnt how to write clean elegant code
 (I think :-). The problem I am finding is there are many c++ styles and I have
 yet to find a clean and elegant one.

I don't think that an elegant c++ style exists, not even a usual c++
subset. Every
project uses his own c++ subsets and styles, so I think that adapting to every
project style is the key.

Andrés



Re: [9fans] iwp9

2012-11-19 Thread Andrés Domínguez
2012/11/19 Andrés Domínguez andres...@gmail.com:
 Without sign of Athens in
 Near East's Georgia.

Maybe I was wrong http://en.wikipedia.org/wiki/Pontic_Athens.

Andrés



Re: [9fans] iwp9

2012-11-19 Thread Brian L. Stuart
 Americans aren't really creative with their city
 names.  They should learn from the welsh. :)

Yeah, we probably do need more where half of the
consonants are silent :)  On the other hand, I
always thought Bucksnort, Tennessee was pretty
creative...  Well, maybe creative is too strong
a word---unusual, at least.

BLS




Re: [9fans] c++

2012-11-19 Thread Jeff Sickel
Steve,

A lot will depend on the target compiler and toolchain you'll
be using.  There's a big push in certain circles to go to Clang
and C++11

n.tufnel
Well, it's one louder, isn't it? It's not ten. You see, most
blokes, you know, will be playing at ten. You're on ten here,
all the way up, all the way up, all the way up, you're on ten
on your guitar. Where can you go from there? Where? 
/n.tufnel

though on the other hand there are a lot of groups trying to
boost Boost.  I don't recommend looking at the Boost
implementation, it will make your compiler churn and your head
spin.  And then once you understand it a bit, you'll have to
code tons of workarounds to slice out pieces of Boost.

Google's protocol buffers source has a decent C++ implementation
and should be a good example of writing relatively clean C++ code.
Also take a look at (http://www.250bpm.com/blog:4) for a few
pointers what not to do.

-jas




Re: [9fans] iwp9

2012-11-19 Thread Kurt H Maier
On Mon, Nov 19, 2012 at 08:26:32AM -0800, Brian L. Stuart wrote:
 
 Yeah, we probably do need more where half of the
 consonants are silent :)  On the other hand, I
 always thought Bucksnort, Tennessee was pretty
 creative...  Well, maybe creative is too strong
 a word---unusual, at least.
 

Bucksnort is a gas station and a porn shop.  When we get creative, we
wind up with Toad Suck Park, Arkansas and Intercourse, Pennsylvania.  I
live not too far away from Crapo, Maryland.



Re: [9fans] iwp9

2012-11-19 Thread Jack Johnson
Traditional names always have the edge:

http://en.wikipedia.org/wiki/Kwigillingok,_Alaska

I think the Yup'ik are half-Welsh. ;)

-Jack


On Mon, Nov 19, 2012 at 7:53 AM, Kurt H Maier kh...@intma.in wrote:

 On Mon, Nov 19, 2012 at 08:26:32AM -0800, Brian L. Stuart wrote:
 
  Yeah, we probably do need more where half of the
  consonants are silent :)  On the other hand, I
  always thought Bucksnort, Tennessee was pretty
  creative...  Well, maybe creative is too strong
  a word---unusual, at least.
 

 Bucksnort is a gas station and a porn shop.  When we get creative, we
 wind up with Toad Suck Park, Arkansas and Intercourse, Pennsylvania.  I
 live not too far away from Crapo, Maryland.




Re: [9fans] iwp9

2012-11-19 Thread erik quanstrom
i've always named machines after interesting
place names.  i've got a very long list of names
to pick from.

minooka, tyty, dupo, trion, kibbiee, blue earth, etc.

our current file server is named wrens, after wrens, georgia.

- erik



Re: [9fans] iwp9

2012-11-19 Thread Kurt H Maier
On Mon, Nov 19, 2012 at 02:37:14PM +, Eric Jul wrote:
 As I like flying, I would actually consider flying into the local Athens 
 Airport, IATA:
 AHN, ICAO: KAHN

I also recommend flying direct to Athens, since the Athens police have
devoted many man-hours and dollars to making sure there is absolutely no
way to drive a ground vehicle within a 50-mile radius without getting
some kind of citation.



Re: [9fans] iwp9

2012-11-19 Thread Skip Tavakkolian
the main reason i subscribe to 9fans is the geography lessons.

how about: Tacoma, Puyallup, Enumclaw, Sealth (Seattle) and George all
in Washington state.

-Skip

On Mon, Nov 19, 2012 at 8:09 AM, Bence Fábián beg...@gmail.com wrote:
 Americans aren't really creative with their city names.
 They should learn from the welsh. :)



 2012/11/19 Andrés Domínguez andres...@gmail.com

 2012/11/19 Bence Fábián beg...@gmail.com:
  I wonder if there's an Athens in the country Georgia.
  That would make the confusion whole.

 Nearly all Athens are in the United States (wikipedia)
 http://en.wikipedia.org/wiki/Athens#Other_locations_named_after_Athens
 Greeks should be proud being so famous. Without sign of Athens in
 Near East's Georgia.

 This days GPS coordinates are a must ;-).

 Andrés





[9fans] iwp9: lightweight nonhierachical navigation

2012-11-19 Thread Bakul Shah
Thanks for putting up the proceedings.

The extension described in a light-weight non-hierarchical filesystem 
navigation extension paper sounds a bit like zsh's ** extension. In zsh a/**/b 
matches all existing paths with prefix a and suffix b, where a and b can be 
arbitrary subpaths. So for example
  wc sys/src/**/*.[ch]
To wc all .c and .h files under sys/src. Zsh added many more extensions to pick 
files but ** is the most useful one.



Re: [9fans] iwp9

2012-11-19 Thread cinap_lenrek
some pages in the procedings pdf took like
5 minutes to render in ghostscript on my t23.
i was disappointed when the resulting image
did not show a complete quantum double slit
exact photon traced map of the whole internet.

--
cinap



Re: [9fans] iwp9: lightweight nonhierachical navigation

2012-11-19 Thread cinap_lenrek
marge simpson globbing.

--
cinap



Re: [9fans] iwp9

2012-11-19 Thread tlaronde
On Mon, Nov 19, 2012 at 07:29:38PM +0100, cinap_len...@gmx.de wrote:
 some pages in the procedings pdf took like
 5 minutes to render in ghostscript on my t23.
 i was disappointed when the resulting image
 did not show a complete quantum double slit
 exact photon traced map of the whole internet.

It was. This is simply because this is so accurate that the combination
of a high density of photon render with day light color, that is
white...

-- 
Thierry Laronde tlaronde +AT+ polynum +dot+ com
  http://www.kergis.com/
Key fingerprint = 0FF7 E906 FBAF FE95 FD89  250D 52B1 AE95 6006 F40C



[9fans] I would like to apologize

2012-11-19 Thread Alex Handy
I would like to apologize for inaccuracies in the article I wrote about
9Front and Plan9. I incorrectly attributed quotes to aiju, which he never
said. The article has been deleted from our archives.

-- 


Alex Handy
Senior Editor
Software Development Times
http://www.sdtimes.com
510-282-4840
763 15th St.
Oakland, CA 94612
aha...@bzmedia.com


Re: [9fans] I would like to apologize

2012-11-19 Thread hiro
at least they did foresee that he writes file systems, it's called hjfs.



Re: [9fans] c++

2012-11-19 Thread Jeff Sickel

On Nov 19, 2012, at 4:48 PM, steve st...@quintile.net wrote:

 ps i am studiously not reading anything about go in case it distracts me... 
 :-)

Oh good, that saves room for a new build of rust.

-jas




Re: [9fans] c++

2012-11-19 Thread Matthew Veety
How do you studiously not do something? Doesn't the imply working
hard at something?

-- Veety