|
|
Subscribe / Log in / New account

Poettering: Revisiting how we put together Linux systems

Poettering: Revisiting how we put together Linux systems

Posted Sep 2, 2014 1:48 UTC (Tue) by mathstuf (subscriber, #69389)
In reply to: Poettering: Revisiting how we put together Linux systems by roskegg
Parent article: Poettering: Revisiting how we put together Linux systems

Patches welcome[1]; I certainly don't care all that much about plan9 personally. There can certainly be comments in the default config file for things like this (or a config.plan9 example file if it is extensive enough). Uzbl already has Xembed support (used in uzbl-tabbed so presumably it works).

[1]https://github.com/uzbl/uzbl


to post comments

Poettering: Revisiting how we put together Linux systems

Posted Sep 2, 2014 2:41 UTC (Tue) by roskegg (subscriber, #105) [Link] (25 responses)

Thank you. If C++ support comes to plan9, I'll look into porting Webkit and then uzbl itself. Why oh why wasn't webkit written in C... The pain of writing a fully compliant HTML5/CSS3/JavaScript rendering stack is blocking a lot of interesting development in new operating systems. Network effects as barrier to entry.

Imagine if every new operating system had to implement PL/I and COBOL and FORTRAN to be usable. It's kind of like that.

The pcc compiler was a valiant effort, but network effects defeated it. Network effects are so strong that the top coders, even those who invent the technology, can't make much headway. Backward compatibility is a corker.

How hard is it to write an html5 renderer anyway? I mean, parsing HTML5 is easy. Parsing CSS is easy. But rendering... really, how much C code would it take? Seriously, why is C++ creeping into and infecting everything.

Poettering: Revisiting how we put together Linux systems

Posted Sep 2, 2014 7:44 UTC (Tue) by ncm (guest, #165) [Link]

How hard is it to make a plan9 c++ runtime? Or, more aptly, an llvm target? Clearly the hurdle is ideological, not technical.

C++ exists and grows because it *uniquely* meets a real need. It's far from a perfect solution to that need, but it persists because hardly else seems to be trying. Rust seems to be trying, but it's a decade or two away from sufficient maturity. Worse, it could make some fatal mistake any day, not recognize it for a little too long, and then never get there. (Might have done already, I haven't kept up.)

Poettering: Revisiting how we put together Linux systems

Posted Sep 2, 2014 10:49 UTC (Tue) by mathstuf (subscriber, #69389) [Link]

> parsing HTML5 is easy. Parsing CSS is easy

You say this, forgetting that both specify what happens when the syntax is broken (e.g., <i><b><p>text</i></b>) and that CSS is such a mess in the semantics department. Take a dive into the WebKit codebase sometime and tell me how C would have been simpler, easier to read, and shorter. I'm sure the world would be thrilled to get that monstrosity simplified.

Poettering: Revisiting how we put together Linux systems

Posted Sep 2, 2014 10:51 UTC (Tue) by ibukanov (subscriber, #3942) [Link]

> parsing HTML5 is easy. Parsing CSS is easy. But rendering... really, how much C code would it take?

10 man-years is a minimum if you want to render substantial portion of the web...

Poettering: Revisiting how we put together Linux systems

Posted Sep 2, 2014 13:04 UTC (Tue) by jwakely (subscriber, #60262) [Link]

> Seriously, why is C++ creeping into and infecting everything.

Maybe developers choose to use it. You know, the people who are actually doing the work not just complaining and criticising.

But no, probably not that, it's probably some kind of fungal infection like ophiocordyceps unilateralis that corrupts them away from your idea of purity.

Poettering: Revisiting how we put together Linux systems

Posted Sep 2, 2014 13:53 UTC (Tue) by mpr22 (subscriber, #60784) [Link]

Seriously, why is C++ creeping into and infecting everything.

An assortment of reasons, frequently involving one or more of the features that your tone suggests you think should be set on fire, indented six feet down, and covered with dirt.

Poettering: Revisiting how we put together Linux systems

Posted Sep 2, 2014 15:28 UTC (Tue) by JGR (subscriber, #93631) [Link] (18 responses)

> Seriously, why is C++ creeping into and infecting everything.

Because it enables developers to get more done for less effort than C, with minimal performance penalties, better type safety/compile-time checking and less bugs (or at least, different bugs).
In particular, memory management and string handling are fairly key activities in a browser engine, and in C these are labour-intensive and therefore error-prone. (Not that C++ is some language of perfection, but it is better in this regard).

Poettering: Revisiting how we put together Linux systems

Posted Sep 2, 2014 22:05 UTC (Tue) by zlynx (guest, #2285) [Link] (8 responses)

Oh, FAR better!

Anyone who has ever seen shared_ptr implemented in pure C will run to C++ and grab it with open arms.

Sure it is done in Python and Perl runtime interpreters. And it sucks. Macros, macros everywhere, and so very easy to make mistakes. So very easy to forget an increment or decrement at some important point or use the wrong macro.

And GObject. Come on. GObject is an argument in favor of C++ if I've ever seen one!

Poettering: Revisiting how we put together Linux systems

Posted Sep 3, 2014 9:50 UTC (Wed) by dgm (subscriber, #49227) [Link] (7 responses)

> shared_ptr implemented in pure C

I would be interested in seeing some example of this. Really. I'm tempted to say it's simply impossible, because C lacks destructors.

Unless... you mean plain old reference counting, which is rather trivial and easy to understand. Much easier than, for instance, the subtle differences between all the smart pointer templates in the STL. And you can add BOOST and/or Qt or Microsoft's for extra fun. Easy-peasy.

Poettering: Revisiting how we put together Linux systems

Posted Sep 3, 2014 18:26 UTC (Wed) by Trelane (subscriber, #56877) [Link]

The nearest I know of its the gcc/clang extension to add function to be automatically called when an automatic various goes out of scope (is an Attribute: cleanup)

Poettering: Revisiting how we put together Linux systems

Posted Sep 3, 2014 18:52 UTC (Wed) by zlynx (guest, #2285) [Link] (2 responses)

I meant plain old reference counting. I've seen it done a lot in script language interpreters. It's done manually, it's prone to mistakes and is buggy as hell.

Poettering: Revisiting how we put together Linux systems

Posted Sep 5, 2014 8:56 UTC (Fri) by quotemstr (subscriber, #45331) [Link] (1 responses)

> It's done manually, it's prone to mistakes and is buggy as hell.

I don't agree that manual reference counting is particularly hard. Practically the entire world does it, and it works fine.

I've read my share of interpreters. Reference counting isn't particularly hard, although you want to use tracing GC if you don't want your users ripping their hair out over cycles.

I've seen far more problems with shared_ptr.

Poettering: Revisiting how we put together Linux systems

Posted Sep 5, 2014 18:13 UTC (Fri) by zlynx (guest, #2285) [Link]

Ah then, tell me if adding a value to a Python list increments the ref count or not. What about if you add it to a list?

Poettering: Revisiting how we put together Linux systems

Posted Sep 4, 2014 5:25 UTC (Thu) by jra (subscriber, #55261) [Link] (2 responses)

Look at the talloc library we use in Samba. It's written in C. It has destructors. Helps keep the Samba C code sane :-).

Poettering: Revisiting how we put together Linux systems

Posted Sep 23, 2014 13:05 UTC (Tue) by dgm (subscriber, #49227) [Link] (1 responses)

I'm looking at it right now and, the only thing I can think of is: Clever. Very clever.

Thanks for the pointer (pun intended).

Poettering: Revisiting how we put together Linux systems

Posted Sep 23, 2014 16:56 UTC (Tue) by rahulsundaram (subscriber, #21946) [Link]

Poettering: Revisiting how we put together Linux systems

Posted Sep 3, 2014 10:47 UTC (Wed) by jb.1234abcd (guest, #95827) [Link] (8 responses)

@ncm
"C++ exists and grows because it *uniquely* meets a real need."

@jwakely
"Maybe developers choose to use it. You know, the people who are actually doing the work not just complaining and criticising."

@mpr22
"An assortment of reasons, frequently involving one or more of the features that your tone suggests you think should be set on fire, indented six feet down, and covered with dirt."

@JGR

Why do you spread misinformation ?
This LWN.net site has some ambition to become a source of good technical
knowledge about Linux, UNIX, and Computer Science in general.

Now, to support your claims:
http://imagebin.org/318679
C++ popularity as a language of choice has declined from 18% in 2004 to
4.7% as of today.
If anything, this is a disaster !

jb

Poettering: Revisiting how we put together Linux systems

Posted Sep 3, 2014 11:29 UTC (Wed) by jb.1234abcd (guest, #95827) [Link] (4 responses)

This has happened despite an assult from C++ Standards Committee and other
apologists who for more than 10 years tried to cover C with dirt (C++, misinformation, and politics) in order to deny it improvements where needed and make it ready for a graveyard.

Well, the market has spoken thanks to minority of people in the know.

Now be nice, and please the last one turn off the light -:)

jb

Poettering: Revisiting how we put together Linux systems

Posted Sep 3, 2014 23:22 UTC (Wed) by nix (subscriber, #2304) [Link] (3 responses)

Simple question: do you actually *know* anyone on the C++ committee? These are not particularly political animals, and many of them are extremely knowledgeable about C as well: a good few of them use it often. The likelihood of such people trying to "cover C with dirt", at least unjustified dirt is... low. They know perfectly well that C has its place, as does C++.

(Given that you clearly have no idea even how long the committee has been in existence -- hint, it's more than twice as long as you suggested -- the likelihood of this seems low.)

Poettering: Revisiting how we put together Linux systems

Posted Sep 4, 2014 10:14 UTC (Thu) by jb.1234abcd (guest, #95827) [Link] (2 responses)

Why do not you educate yourself a bit in facts that are available in public
domain, but obviously require some mental effort to do it ?
Otherwise you will not understand what people are talking about and react like a cat whose tail was stepped on.

Firstly, a C++ Standards Committee is a technical, but also a political body.
You should understand the origin of the term "designed by committee".

Secondly, you have to understand what C++ is, and its history.
C++ was built on C; Stroustrup originally called it "C with Classes".
What it means is that majority of C became a "subset" and a hostage of C++.
So, it is clear that C++, thru its governing body C++ Standards Committee,
suffers from a split personality disorder - letting C evolve would shake C++ boat. It would create C and C++ incompatibilities (C99 anybody ?) that are not desired. This works both ways.

Thirdly, there is an interesting inverse relationship between an expansion of semantics and syntax of C++ (C++11, soon C++14), called "featurism" by some, and a rapid decline in C++ acceptance as shown on chart I quoted. The OOP part of "a new paradigm" contributed to it as well.
According to Stroustrup, there is another language trying to emerge from C++. The question is: with or without C "subset" hostage of C++ ?

jb

Poettering: Revisiting how we put together Linux systems

Posted Sep 4, 2014 14:29 UTC (Thu) by nix (subscriber, #2304) [Link]

OK, so it's pretty clear that you don't know anyone who attends committee meetings and thus you're calumnifying people when you have no idea who they even are. (Hint: some of them read LWN.)

Parrotting bits of D&E at me would be more impressive if there were any sign you'd understood it -- Stroustrup doesn't exactly display any signs there of wanting to cover any parts of C with dirt (other than decrying the use of the C preprocessor in C++ programs, which is pretty justified, I'd say).

btw, C *has* evolved since C++ was created: you even mention one example. Nobody much likes having the languages drift into incompatibility, but not because of some nefarious plot on the part of either committee: rather because nobody wants 'extern "C"' and link-compatibility to break.

If the C++ committee wanted to cover C with dirt, would the two committees really have spent so much time and effort making sure their newly-formalized memory models were to some degree compatible? And yes, though C11 did incorporate the model from C++11 rather than the other way round there was definitely attention paid on the part of the people defining the C++11 memory model to make sure they weren't specifying something that made no sense for C.

Poettering: Revisiting how we put together Linux systems

Posted Sep 5, 2014 14:03 UTC (Fri) by jwakely (subscriber, #60262) [Link]

Erm, C has it's own standards committee, WG14, who are not held hostage by the C++ committee and do their own thing. The fact that WG14 don't make many changes to the language nowadays is nothing to do with the C++ committee.

Poettering: Revisiting how we put together Linux systems

Posted Sep 3, 2014 11:32 UTC (Wed) by niner (subscriber, #26151) [Link] (1 responses)

Because some graph from an unknown origin, made from an unknown source of data with an unknown methodology showing that _all_ languages except Objective-C are on a decline on an undefined "Ratings" axis really makes an argument...

Poettering: Revisiting how we put together Linux systems

Posted Sep 3, 2014 11:59 UTC (Wed) by jb.1234abcd (guest, #95827) [Link]

OK, I understand you want to be "in the know" group ...
http://www.tiobe.com/index.php/content/paperinfo/tpci/ind...

Now please spread the knowledge instead of misinformation.

jb

Poettering: Revisiting how we put together Linux systems

Posted Sep 4, 2014 7:04 UTC (Thu) by Wol (subscriber, #4433) [Link]

> C++ popularity as a language of choice has declined from 18% in 2004 to
4.7% as of today.
> If anything, this is a disaster !

Is that because of all the new web script kiddies that have appeared? Really, I don't know. But a shrinkage in %age can easily hide a rise in absolute numbers. And if the target audience hasn't grown, then those stats are lying.

"Statistics tell you how to get from A to B. What they don't tell you is that you're all at C."

Cheers,
Wol

Poettering: Revisiting how we put together Linux systems

Posted Sep 2, 2014 18:38 UTC (Tue) by daniels (subscriber, #16193) [Link]

No matter; since all these problems are already solved for you much more elegantly, and they're the obvious choice of those who _really_ know UNIX, they'll surely have all these features any day now as developers come flocking.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds