Can you recommend a language to...

Discussion in 'Ruby' started by Sharon Phillips, Jul 6, 2007.

  1. Hi,

    Second question for the evening, but very closely related to the first.

    I've written some monitoring software at work, and would like to
    extend it quite a bit, including a gui with a few graphs.
    Ruby is causing me grief when it comes to distributing it (see 'Oh
    the Pain!...'), and assuming there's no way to overcome this, can
    anyone recommend a language that:
    * has a canvas with anti-aliasing, alpha-blending and double
    buffering (or binding to a toolkit with one)
    * is simple to distribute
    * is cross platform (*nix and Windows)
    * is not Java (I actually like Java, I'm just trying to get away from
    it)
    * graphing libraries a bonus. Don't mind writing my own.

    I've considered a web app, but two things stand in my way:
    * Somewhere to host it (not much here you guys can help with)
    * Graphs becoming images and constant page refreshes chewing up
    bandwidth on the LAN.
    I need to be able to update the graphs and any other displays
    regularly (every minute or so) without sending another whole page.
    Currently all I've seen of web graphs are generated on the server and
    sent out as images. I'd like the ability to make them interactive
    down the track, if possible.

    Any help, advice or war stories much appreciated.

    Cheers,
    Dave
     
    Sharon Phillips, Jul 6, 2007
    #1
    1. Advertising

  2. On 7/6/07, Sharon Phillips <> wrote:
    > * has a canvas with anti-aliasing, alpha-blending and double
    > buffering (or binding to a toolkit with one)
    > * is simple to distribute
    > * is cross platform (*nix and Windows)
    > * is not Java (I actually like Java, I'm just trying to get away from
    > it)
    > * graphing libraries a bonus. Don't mind writing my own.


    Consider JRuby,
    pth
     
    Patrick Hurley, Jul 6, 2007
    #2
    1. Advertising

  3. On 7/6/07, Sharon Phillips <> wrote:

    > Currently all I've seen of web graphs are generated on the server and
    > sent out as images. I'd like the ability to make them interactive
    > down the track, if possible.


    It is possible to do real time graphs on the web using JavaScript.

    www.okcupid.com has JS-generated graphs that seems to work everywhere;
    they're fairly slow, though.

    A quick search found this open source library for generating graphs,
    not sure if it is fully portable or not:
    http://www.liquidx.net/plotkit/

    There's a commercial component in Bindows; I've not tried them, and
    can't say if they're good or not. http://www.ejschart.com/ is a
    commercial component that specialize in this.

    I'm fairly sure I've seen other ones, too, I just don't have links handy.

    Eivind.
     
    Eivind Eklund, Jul 6, 2007
    #3
  4. On 7/6/07, Sharon Phillips <> wrote:
    > * has a canvas with anti-aliasing, alpha-blending and double
    > buffering (or binding to a toolkit with one)
    > * is simple to distribute
    > * is cross platform (*nix and Windows)
    > * is not Java (I actually like Java, I'm just trying to get away from
    > it)
    > * graphing libraries a bonus. Don't mind writing my own.


    Consider JRuby, or another of the JVM languages - there's a lot more
    to the JVM than Java, and you'll get the entire range of library
    support.

    martin
     
    Martin DeMello, Jul 6, 2007
    #4
  5. Sharon Phillips

    Peter Cooper Guest

    On 7/6/07, Sharon Phillips <> wrote:
    > the Pain!...'), and assuming there's no way to overcome this, can
    > anyone recommend a language that:
    > * has a canvas with anti-aliasing, alpha-blending and double
    > buffering (or binding to a toolkit with one)
    > * is simple to distribute
    > * is cross platform (*nix and Windows)
    > * is not Java (I actually like Java, I'm just trying to get away from
    > it)
    > * graphing libraries a bonus. Don't mind writing my own.


    Python. I hate to say it, especially since Ruby is my usual first
    choice, but Python's bindings to libraries to do the graphical things
    you mention are far more mature than those available to Rubyists.
    Python is also possibly more cross-platform (in a pragmatic sense),
    especially as it comes as default with many Unix variants.

    Cheers,
    Peter Cooper
    http://www.rubyinside.com/
     
    Peter Cooper, Jul 6, 2007
    #5
  6. Sharon Phillips wrote:
    > Hi,
    >
    > Second question for the evening, but very closely related to the first.
    >
    > I've written some monitoring software at work, and would like to extend
    > it quite a bit, including a gui with a few graphs.
    > Ruby is causing me grief when it comes to distributing it (see 'Oh the
    > Pain!...'), and assuming there's no way to overcome this, can anyone
    > recommend a language that:
    > * has a canvas with anti-aliasing, alpha-blending and double buffering
    > (or binding to a toolkit with one)
    > * is simple to distribute
    > * is cross platform (*nix and Windows)
    > * is not Java (I actually like Java, I'm just trying to get away from it)
    > * graphing libraries a bonus. Don't mind writing my own.
    >
    > I've considered a web app, but two things stand in my way:
    > * Somewhere to host it (not much here you guys can help with)
    > * Graphs becoming images and constant page refreshes chewing up
    > bandwidth on the LAN.
    > I need to be able to update the graphs and any other displays regularly
    > (every minute or so) without sending another whole page. Currently all
    > I've seen of web graphs are generated on the server and sent out as
    > images. I'd like the ability to make them interactive down the track, if
    > possible.
    >
    > Any help, advice or war stories much appreciated.
    >
    > Cheers,
    > Dave
    >
    >
    >
    >


    By monitoring, are you talking about a bunch of systems, processor
    utilization, network bandwidth, disk, memory, etc.? If so, there are
    full open-source packages that do this already! Many of them have at
    their core a marvelous invention called "rrdtool", which has bindings
    for all of the major scripting languages including Ruby. But if you're
    willing to do Perl, PHP and/or Python, there are two fairly complete
    front ends, Cricket and Cacti. I forget which languages these two use,
    but given that RRDTool is the core, you should be able to hack upon them
    in Ruby as well.
     
    M. Edward (Ed) Borasky, Jul 6, 2007
    #6
  7. Sharon Phillips

    Ari Brown Guest

    On Jul 6, 2007, at 7:29 AM, Sharon Phillips wrote:
    <snip>

    You're looking to hard!

    Assembly will do what your looking for! You just need to know a
    little more than your average assembly developer.

    aRi
    --------------------------------------------|
    If you're not living on the edge,
    then you're just wasting space.
     
    Ari Brown, Jul 6, 2007
    #7
  8. Sharon Phillips

    SonOfLilit Guest

    Firefox supports the Javascript canvas component, which can do all
    those things for you in ok speed (I think) (it's based on Cairo which
    I love).

    Hosting a web app in a LAN should really not be a problem. Just host
    it on your own box.


    That should make the web app viable.


    Aur

    On 7/6/07, Sharon Phillips <> wrote:
    > Hi,
    >
    > Second question for the evening, but very closely related to the first.
    >
    > I've written some monitoring software at work, and would like to
    > extend it quite a bit, including a gui with a few graphs.
    > Ruby is causing me grief when it comes to distributing it (see 'Oh
    > the Pain!...'), and assuming there's no way to overcome this, can
    > anyone recommend a language that:
    > * has a canvas with anti-aliasing, alpha-blending and double
    > buffering (or binding to a toolkit with one)
    > * is simple to distribute
    > * is cross platform (*nix and Windows)
    > * is not Java (I actually like Java, I'm just trying to get away from
    > it)
    > * graphing libraries a bonus. Don't mind writing my own.
    >
    > I've considered a web app, but two things stand in my way:
    > * Somewhere to host it (not much here you guys can help with)
    > * Graphs becoming images and constant page refreshes chewing up
    > bandwidth on the LAN.
    > I need to be able to update the graphs and any other displays
    > regularly (every minute or so) without sending another whole page.
    > Currently all I've seen of web graphs are generated on the server and
    > sent out as images. I'd like the ability to make them interactive
    > down the track, if possible.
    >
    > Any help, advice or war stories much appreciated.
    >
    > Cheers,
    > Dave
    >
    >
    >
    >
     
    SonOfLilit, Jul 8, 2007
    #8
  9. Hi everyone,

    Thanks for the suggestions. There's a little more detail I've put in
    the other post, 'Oh the pain!', but I've spent the last half a day
    playing with JRuby and think this may be the way to go.

    Looks like a brilliant idea and I can use swing for the gui (I'm
    quite familiar with swing, so no new learning here).

    On a related note, anyone got anti-aliasing working with JRuby? My
    code (canvas is a JPanel):
    canvas.getGraphics.setRenderingHint(RenderingHints::KEY_ANTIALIASING,
    RenderingHints::VALUE_ANTIALIAS_ON)
    runs with no errors, draws what I expect, but no anti_aliasing. I'm
    pretty sure this is due to my not understanding properly the change
    in syntax from Java to Ruby.
    [I've also posted this to the JRuby list ().
    but don't know how popular it is.]

    Cheers,
    Dave
     
    Sharon Phillips, Jul 8, 2007
    #9
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Joel Finkel
    Replies:
    0
    Views:
    1,084
    Joel Finkel
    Aug 3, 2003
  2. jmDesktop
    Replies:
    46
    Views:
    929
    Simon Brunning
    Mar 26, 2008
  3. Replies:
    3
    Views:
    237
    Ameya the ______
    Nov 2, 2010
  4. CyberSpider
    Replies:
    1
    Views:
    132
    Ray Costanzo [MVP]
    Oct 29, 2004
  5. Aston J.
    Replies:
    13
    Views:
    656
    Justin Collins
    Mar 16, 2011
Loading...

Share This Page