Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Simple HTML Renderer / Browser?

Reply
Thread Tools

Simple HTML Renderer / Browser?

 
 
Detlef Reichl
Guest
Posts: n/a
 
      02-26-2005
On Fr, 2005-02-25 at 09:33 +0900, Luke Graham wrote:
>Just remember the simple rhyme:
>stay away from gtk
>qt is a cutie
>

absolute bullshit...

Ruby-gtk+/gnome are very nice bindings to Gtk+ / GNOME wich provide
almost all widgets you need.

before you ever else write such things you'll take a look at the
advantages of the alternatives.

cheers
detlef



 
Reply With Quote
 
 
 
 
Alexander Kellett
Guest
Posts: n/a
 
      02-26-2005
On Feb 26, 2005, at 10:34 PM, Detlef Reichl wrote:
> Ruby-gtk+/gnome are very nice bindings to Gtk+ / GNOME wich provide
> almost all widgets you need.
>
> before you ever else write such things you'll take a look at the
> advantages of the alternatives.


dear good sir.

it was a joke.
lighten up.

either that or i could get
started on about my experiences
with gtk



 
Reply With Quote
 
 
 
 
Randy Kramer
Guest
Posts: n/a
 
      02-27-2005
On Saturday 26 February 2005 02:39 pm, you wrote:
> next time use a distribution with a prebuilt package
> (we simply don't have the man power to build these ourselves,
> too many distributions too little time )


Thanks:

Just wanted to come back and thank Alexander Kellet again for pointing me to
the Ruby/Qt/KDE tutorial at
http://developer.kde.org/language-bi...ial/index.html it is
very helpful. Thanks also to the authors of the tutorial . (So far I've
mostly just copied and pasted the code to run the examples, now I need to go
back and understand them.

Bugs:

I did run into a few bugs (iiuc) in the 9th example program
(http://developer.kde.org/language-bi...rial/p9.html):

* First of all, in the line:

"Original Developer/Mantainer"),"",

the ) is not required (and it should be Maintainer)--this created the error
message:

bash-2.05b$ ./p9.rb:96: syntax error
"Original Developer/Mantainer"),"",
^

(Caret doesn't show in proper place except in a fixed width font.)

* Even after fixing that line, I get the error:

kparts: ERROR: No such XML file /home/rhk/work/ruby/qt/p9ui.rc

I haven't spent much time looking for the problem, maybe it is a BKAC
error--maybe I am supposed to create that file?

I probably won't pursue this for a few days, so I thought I'd mention thosse
things.

Observations:

I am going to continue to look for some lighter weight HTML widgets. (I do
like the khtml rendering, and I like the signal / slot communication method
(vs. callbacks), but most of the widgets take 4 to 7 seconds to appear on my
screen. (Some of that may be general program startup overhead, maybe
creating a 2nd similar widget will not take nearly as long, but I would think
there are some lighter weight alternatives. All I have to do is find some
simple Ruby examples for using them.

regards,
Randy Kramer


 
Reply With Quote
 
Alexander Kellett
Guest
Posts: n/a
 
      02-27-2005
concealed at the bottom of
http://developer.kde.org/language-bi...torial/p9.html
is the following:
> <!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
> <kpartgui name="p9" version="1">
> <MenuBar>
> <Menu name="file"><text>&amp;File</text>
> <Action name="set_default_page"/>
> </Menu>
> </MenuBar>
> <ToolBar fullWidth="true" name="mainToolBar">
> <Action name="add_to_bookmarks"/>
> <Action name="back"/>
> <Separator/>
> <Action name="file_quit"/>
> </ToolBar>
> </kpartgui>

i suppose a tarball with the entire example
would be really useful for people that just
like looking at code (e.g, me )

i guess richard can commit the additional )
fix in the near future. i forgot my cvs
password

strange that its so slow. my 2000-ish line
application (rubberdoc) only takes a second
or so to start here. widget creation should
be basically instantaneous. (note, i don't
have a fast computer)

did u just try running once? second time load
should be *much* faster. the bindings library is
fairly big unfortunately as its the only way
to allow for subclassing as gcc doesn't provide
anything useful

qt also has a rich text view. subset html.
not sure if thats useful enough

see:
http://doc.trolltech.com/3.3/qtextbrowser.html

Alex

On Feb 27, 2005, at 4:26 PM, Randy Kramer wrote:
> On Saturday 26 February 2005 02:39 pm, you wrote:
>> next time use a distribution with a prebuilt package
>> (we simply don't have the man power to build these ourselves,
>> too many distributions too little time )

>
> Thanks:
>
> Just wanted to come back and thank Alexander Kellet again for pointing
> me to
> the Ruby/Qt/KDE tutorial at
> http://developer.kde.org/language-bi.../kde3tutorial/
> index.html it is
> very helpful. Thanks also to the authors of the tutorial . (So far
> I've
> mostly just copied and pasted the code to run the examples, now I need
> to go
> back and understand them.
>
> Bugs:
>
> I did run into a few bugs (iiuc) in the 9th example program
> (http://developer.kde.org/language-bi...rial/p9.html):
>
> * First of all, in the line:
>
> "Original Developer/Mantainer"),"",
>
> the ) is not required (and it should be Maintainer)--this created the
> error
> message:
>
> bash-2.05b$ ./p9.rb:96: syntax error
> "Original Developer/Mantainer"),"",
> ^
>
> (Caret doesn't show in proper place except in a fixed width font.)
>
> * Even after fixing that line, I get the error:
>
> kparts: ERROR: No such XML file /home/rhk/work/ruby/qt/p9ui.rc
>
> I haven't spent much time looking for the problem, maybe it is a BKAC
> error--maybe I am supposed to create that file?
>
> I probably won't pursue this for a few days, so I thought I'd mention
> thosse
> things.
>
> Observations:
>
> I am going to continue to look for some lighter weight HTML widgets.
> (I do
> like the khtml rendering, and I like the signal / slot communication
> method
> (vs. callbacks), but most of the widgets take 4 to 7 seconds to appear
> on my
> screen. (Some of that may be general program startup overhead, maybe
> creating a 2nd similar widget will not take nearly as long, but I
> would think
> there are some lighter weight alternatives. All I have to do is find
> some
> simple Ruby examples for using them.
>
> regards,
> Randy Kramer




 
Reply With Quote
 
Randy Kramer
Guest
Posts: n/a
 
      02-28-2005
On Sunday 27 February 2005 10:46 am, Alexander Kellett wrote:
> concealed at the bottom of
> http://developer.kde.org/language-bi...torial/p9.html


Ahh, thanks, that's (part of) what I needed! (more below)

> i suppose a tarball with the entire example
> would be really useful for people that just
> like looking at code (e.g, me )


Yes, that would be helpful, or additionally/alternatively, make it a little
more obvious in the text that you must also create file p9ui.rc. I had
skimmed the text, but even reading it more carefully after knowing I have to
do that, I'm not sure it would be clear to someone reading it for the first
time. Maybe a note at/near the top of the page like, "To run this example
you must create two files, ... and also for full effect, you must run an
instance of p8 as well." (starting it first, iirc, or does it matter?)

More comments (as always

* I feel like I must apologize again for not having thoroughly studied this
tutorial, but it seems like the concepts demonstrated here will meet a lot of
my needs, so I've tentatively moved on to figuring out how to "parse" TWiki
markup.

* For the sake of completeness, it seems there is still an error (or
another EBKAC)--p7 and p8 work fine together as a pair, but p8 and p9
don't--from p9 I can save bookmarks to p8, but choosing a bookmark in p8 does
not cause it to be loaded in p9.

* Which reminds me to thank everyone responsible for these tutorials
again--they are helpful and demonstrate some useful functionality of the type
I need! Part of what I intend is to have a "supervisory" window that knows
what "pages" are open in any number of "subsidiary" windows. I'm fairly
certain the signals and slots mechanism will make that fairly easy to do.
(Note though that the subsidiary windows will all be independent "instances",
so a crash or closure of one will not close any of the others.)

I guess what that part of what I'm trying to say is that not only is the
tutorial a good way to start learning how to use Korundum and (Ruby)Qt (??),
it is a good demonstration of some of the power of Qt!

> strange that its so slow. my 2000-ish line
> application (rubberdoc) only takes a second
> or so to start here. widget creation should
> be basically instantaneous. (note, i don't
> have a fast computer)


There is no significant improvement for opening the same program
(experimenting with p8 and p9) a 2nd time (after closing it). Also, I tried
opening the same program a 2nd time when it is already open. It won't open a
2nd copy (does this mean the programs are somehow singletons--something else
for me to learn), but it still takes a significant amount of time (3-4
seconds) for the "focus" to shift to the already open instance.

Just to try to put the 3 to 6 seconds in context, perhaps some of this is
because I have a heck of a lot of things loaded (kmail, konsole with 6
"sessions", epiphany with ~10 tabs, 3 instances of konqueror with a total of
~35 - 40 tabs, top, samba (etc.), 5 instances of Nedit, 4 instances of gjots)
and not all that much memory and swap space: 384 KB of RAM (all this MB can
handle), ~1 GB of swap (often up to half in use, and (aside) I do notice a
general slowdown when over half of my swap starts being used), and a 500 MHz
processor. (But, this is the environment the program will typically run in
(for me).)

> qt also has a rich text view. subset html.
> not sure if thats useful enough
>
> see:
> http://doc.trolltech.com/3.3/qtextbrowser.html


That's good to know!

regards,
Randy Kramer


 
Reply With Quote
 
Luke Graham
Guest
Posts: n/a
 
      02-28-2005
How long does it take to open a roughly equivalent pure-C Qt program?


On Mon, 28 Feb 2005 23:14:13 +0900, Randy Kramer <> wrote:
> On Sunday 27 February 2005 10:46 am, Alexander Kellett wrote:
> > concealed at the bottom of
> > http://developer.kde.org/language-bi...torial/p9.html

>
> Ahh, thanks, that's (part of) what I needed! (more below)
>
> > i suppose a tarball with the entire example
> > would be really useful for people that just
> > like looking at code (e.g, me )

>
> Yes, that would be helpful, or additionally/alternatively, make it a little
> more obvious in the text that you must also create file p9ui.rc. I had
> skimmed the text, but even reading it more carefully after knowing I have to
> do that, I'm not sure it would be clear to someone reading it for the first
> time. Maybe a note at/near the top of the page like, "To run this example
> you must create two files, ... and also for full effect, you must run an
> instance of p8 as well." (starting it first, iirc, or does it matter?)
>
> More comments (as always
>
> * I feel like I must apologize again for not having thoroughly studied this
> tutorial, but it seems like the concepts demonstrated here will meet a lot of
> my needs, so I've tentatively moved on to figuring out how to "parse" TWiki
> markup.
>
> * For the sake of completeness, it seems there is still an error (or
> another EBKAC)--p7 and p8 work fine together as a pair, but p8 and p9
> don't--from p9 I can save bookmarks to p8, but choosing a bookmark in p8 does
> not cause it to be loaded in p9.
>
> * Which reminds me to thank everyone responsible for these tutorials
> again--they are helpful and demonstrate some useful functionality of the type
> I need! Part of what I intend is to have a "supervisory" window that knows
> what "pages" are open in any number of "subsidiary" windows. I'm fairly
> certain the signals and slots mechanism will make that fairly easy to do.
> (Note though that the subsidiary windows will all be independent "instances",
> so a crash or closure of one will not close any of the others.)
>
> I guess what that part of what I'm trying to say is that not only is the
> tutorial a good way to start learning how to use Korundum and (Ruby)Qt (??),
> it is a good demonstration of some of the power of Qt!
>
> > strange that its so slow. my 2000-ish line
> > application (rubberdoc) only takes a second
> > or so to start here. widget creation should
> > be basically instantaneous. (note, i don't
> > have a fast computer)

>
> There is no significant improvement for opening the same program
> (experimenting with p8 and p9) a 2nd time (after closing it). Also, I tried
> opening the same program a 2nd time when it is already open. It won't open a
> 2nd copy (does this mean the programs are somehow singletons--something else
> for me to learn), but it still takes a significant amount of time (3-4
> seconds) for the "focus" to shift to the already open instance.
>
> Just to try to put the 3 to 6 seconds in context, perhaps some of this is
> because I have a heck of a lot of things loaded (kmail, konsole with 6
> "sessions", epiphany with ~10 tabs, 3 instances of konqueror with a total of
> ~35 - 40 tabs, top, samba (etc.), 5 instances of Nedit, 4 instances of gjots)
> and not all that much memory and swap space: 384 KB of RAM (all this MB can
> handle), ~1 GB of swap (often up to half in use, and (aside) I do notice a
> general slowdown when over half of my swap starts being used), and a 500 MHz
> processor. (But, this is the environment the program will typically run in
> (for me).)
>
> > qt also has a rich text view. subset html.
> > not sure if thats useful enough
> >
> > see:
> > http://doc.trolltech.com/3.3/qtextbrowser.html

>
> That's good to know!
>
> regards,
> Randy Kramer
>
>



--
spooq


 
Reply With Quote
 
Randy Kramer
Guest
Posts: n/a
 
      03-01-2005
On Monday 28 February 2005 06:17 pm, Luke Graham wrote:
> How long does it take to open a roughly equivalent pure-C Qt program?


Well I'm not sure how to judge, so I tried the following:

konsole ~3 seconds
konqueror ~6 seconds
kedit ~4.5 seconds
kwrite ~5 seconds

for comparison:

nedit ~2 seconds

Retrying p7, p8, and p9

p7 ~5.5 seconds
p8 ~5.5 seconds
p9 ~6 seconds

Randy Kramer


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
html renderer Robert kebernet Cooper Java 2 06-28-2005 09:06 AM
Serializing HTML document and resources to the HTML renderer unbending Java 0 12-17-2004 04:58 AM
HTML to Text renderer Ian Bicking Python 0 11-02-2004 11:07 PM
Looking for HTML Renderer Xiaolei Li Java 7 10-07-2004 07:15 PM
html renderer Michele Simionato Python 2 11-17-2003 04:27 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57