Page 3 of 3 FirstFirst 123
Results 21 to 28 of 28

Thread: Programming under ubuntu

  1. #21
    Join Date
    Feb 2008
    Location
    readlink("/proc/self/exe"
    Beans
    1,120
    Distro
    Ubuntu Development Release

    Wink Re: Programming under ubuntu

    I'll second the motion on wxWidgets, that is, if you like C++.

    But as a sidenote to the recommendations on Java, Perl and Python, why don't you try C# / VB.NET ?


    MonoDevelop is a wonderful IDE (with a few shortcomings), but you can seemlessly exchange files between MonoDevelop and Visual Studio.

    Also, you can write web applications just as well as desktop application with these languages.
    For Linux compatibility reasons, I recommend you stick to C# instead of VB.NET.
    If you go down that route, it might be useful to learn GTK (instead of wxWidgets or QT), because Mono promotes GTK# for .NET GUI applications that work across platforms.


    The funny things is, Mono has a VM called IKVM, which is a Mono VM wrapper around the OpenJDK/JRE.
    This means you can start to mix Java and .NET, getting the best of both worlds )

    Another good things is there is IronPython, with which you can run Python functions and libraries in managed code !

    Is some functionality/library not available in C# ?
    For example a WikiMedia Markup parser ?
    No problem, use IronPython and reference a Python rendering library for this.
    Then call the IronPython function from C#. And zong, you can use this functionality from .NET...
    Last edited by WitchCraft; September 9th, 2011 at 09:11 PM.
    In a world without walls and fences, who needs Windows and Gates?
    Linux is like a wigwam.... no Gates, no Windows but Apache inside!
    http://www.debianadmin.com
    apt-get install libstdc++6-4.3-doc

  2. #22
    Join Date
    Apr 2007
    Location
    (X,Y,Z) = (0,0,0)
    Beans
    3,715

    Re: Programming under ubuntu

    Quote Originally Posted by tomazzi View Post
    WxWidgets are the best multi-platform toolkit. In comparison to QT or GTK it's way faster, produces less overhead and allows to use (almost) the same GUI code for gdi32/win API and linux API's based on QT and GTK. Thanks to that GUI looks "native" on any platform, unlike in case of GTK/QT. Furthermore wxWidgets offers excelent DateTime class, very fast and convenient object arrays, advanced event system, universal threads (both detached and joinable), and one of greatest things: hit statistics from memory allocators for strings - allows to extremely speed up strings operations wihtout wasting too much memory.

    My favorite
    Wait. wxWidgets is just an abstraction layer which operates on the native GUI toolkit, whichever that is. So I don't believe it's faster... if that makes any sense in GUI programming, where the program will be most of the time idling for user input.

    All other features you mention are useful only when used on C++, because of its limitations. They provide little more than what higher-level languages already provide natively, so that advantage doesn't count for wxPython, e.g.

    What wxWidgets is amazingly good at is at what it was designed for: an abstraction layer to easy cross-platform GUI development. But be aware that both GTK+ and Qt are also cross-platform!
    Last edited by nvteighen; September 9th, 2011 at 09:22 PM.

  3. #23
    Join Date
    Jun 2010
    Beans
    181

    Re: Programming under ubuntu

    Quote Originally Posted by nvteighen View Post
    Wait. wxWidgets is just an abstraction layer which operates on the native GUI toolkit, whichever that is. So I don't believe it's faster... if that makes any sense in GUI programming, where the program will be most of the time idling for user input.

    All other features you mention are useful only when used on C++, because of its limitations. They provide little more than what higher-level languages already provide natively, so that advantage doesn't count for wxPython, e.g.

    What wxWidgets is amazingly good at is at what it was designed for: an abstraction layer to easy cross-platform GUI development. But be aware that both GTK+ and Qt are also cross-platform!
    To some point You're right, but first try, then talk.
    1. GTK and QT on windows are deadly slow in comparison to wxWidgets, because they implement whole rendering engine while wxWidgets are just very thin layer on windows-native and hw-accelerated gdi.
    2. using wxWidgets as wrapper for (f.e.) GTK (makes sense only on linux/unix) is also faster, because most of internal wx-classes are independant and faster than GTK.
    3. You should read more about wxWidgets, then maybe You'll get interested in C# for wx.

  4. #24
    Join Date
    Apr 2007
    Location
    (X,Y,Z) = (0,0,0)
    Beans
    3,715

    Re: Programming under ubuntu

    Quote Originally Posted by tomazzi View Post
    To some point You're right, but first try, then talk.
    1. GTK and QT on windows are deadly slow in comparison to wxWidgets, because they implement whole rendering engine while wxWidgets are just very thin layer on windows-native and hw-accelerated gdi.
    First, speed at GUIs is almost irrelevant when they're correctly written, because GUIs are most of the time idling for user input. If your program does heavy computation, you usually put the GUI on a different thread than the heavy work.

    Second, Skype isn't deadly slow on Windows and it uses Qt. My GTK+ on Windows example is even better, the SuperTux level editor, because it works at a very acceptable speed even though it's written in Mono C#. Ok, GTK+ and Qt may be slower than wxWidgets because of what you say, but I deny its relevance and my experience tells me that if there's any delay, it's completely neglegible.

    2. using wxWidgets as wrapper for (f.e.) GTK (makes sense only on linux/unix) is also faster, because most of internal wx-classes are independant and faster than GTK.
    Impossible for the exact same reasons you say. The more abstraction you use, the slower everything gets because there's more to call. By definition, wxWidgets can't be faster than GTK+: 1) C++ is slower than C, specially when virtual tables are around, 2) wxWidgets has to convert its data structures into GTK+ ones, 3) all of this is irrelevant because the GUI will be idling anyway, so the supposed speed advantage of one toolkit over the another would be lost.

    3. You should read more about wxWidgets, then maybe You'll get interested in C# for wx.
    You should read more about Qt, GTK+, understand the abstraction vs. speed trade-off, learn what the "I/O bottleneck" is and why it makes speed measurement completely irrelevant for any program that has a user interface.

    Sorry for my tone, but you've been one of the first posters that has made me lose my patience on these forums.

  5. #25
    Join Date
    Jun 2010
    Beans
    181

    Re: Programming under ubuntu

    Quote Originally Posted by nvteighen View Post
    First, speed at GUIs is almost irrelevant when they're correctly written
    Yeah, If You have one button named "Next". But If You have some graphics (f.e. charts) or data grids then it clearly shows which interface is faster.
    F.e. last year I've written GUI for database management that was able to display/sort/search/adaptive filtering trough several milions of records and display results in wxGrid and wxChart - such big amount of data needs huge amount of processing power to just generate view. I've compiled it under GTK and gdi with modified multithreaded wxGrid and in both cases it was equivalently fast. GTK/QT on windows is slow even when only refreshing toolbars/buttons.

    (btw. reason was that Excel or even Access is just crap when it comes to real and fast data management)

  6. #26
    Join Date
    Apr 2007
    Location
    (X,Y,Z) = (0,0,0)
    Beans
    3,715

    Re: Programming under ubuntu

    Quote Originally Posted by tomazzi View Post
    Yeah, If You have one button named "Next". But If You have some graphics (f.e. charts) or data grids then it clearly shows which interface is faster
    F.e. last year I've written GUI for database management that was able to display/sort/search/adaptive filtering trough several milions of records and display results in wxGrid and wxChart - such big amount of data needs huge amount of processing power to just generate view. I've compiled it under GTK and gdi with modified multithreaded wxGrid and in both cases it was equivalently fast. GTK/QT on windows is slow even when only refreshing toolbars/buttons.

    (btw. reason was that Excel or even Access is just crap when it comes to real and fast data management)
    My point was 1) that I doubt that wxWidgets could be faster than GTK+ on GNU/Linux, 2) that in my experience GTK+ and Qt are not noticeable slow, even when it comes to GTK# on Mono.

    Sincerely, I don't get quite get the point of your post. Was it Excel the reason why everything got slower or was it really GTK+ on Windows? Have you measured this?

    OK. Of course, if you're showing a complex data grid, it might require time to show up. But what is it what requires time? Drawing the chart or processing the data? The former is just drawing stuff into the screen and if the library is well-designed, it shouldn't have any noticeable critical delay (gnome-system-monitor, e.g.). If the data is complex, then the issue is at the backend, I guess, and even a console ncurses-based UI would lag in that case. In that latter case, all you can do is to tell the user to wait, I think, but it'd be very rare that the issue was the chosen GUI toolkit. If it was, it should be reported as a bug.

  7. #27
    Join Date
    Sep 2006
    Location
    BC, Canada
    Beans
    347
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Programming under ubuntu

    Quote Originally Posted by mandza View Post
    for beginning i thinking to make a very small program that will display something like "hello world" on screen. but it will listenin port something like 3723 and it will be posible to send data to explorer with this program.

    For Example: when i write in explorer 192.168.1.18:3723 it will display "Hello world"

    How can i do this?

    in the next stage i want to make two separate program one of them will be transmitter and another receiver, and receiver will have interface but transmitter not.

    Thank you a lot for your replays Idefix82 and sanderd1. it was helpfull.

    Edit: transmitter program will work on ubuntu only. so i just need help for linux now.
    You may also want to look at Golang. There are tutorials/Youtube videos for doing this very thing in Go. It's original design was for web servers but works well as a general, all-purpose language. Writing a "hello world" server is as simple as about 5-6 lines of code (excluding newlines) in Go. A good intro might be this video.

  8. #28
    Join Date
    Jun 2010
    Beans
    181

    Re: Programming under ubuntu

    Quote Originally Posted by nvteighen View Post
    My point was 1) that I doubt that wxWidgets could be faster than GTK+ on GNU/Linux, 2) that in my experience GTK+ and Qt are not noticeable slow, even when it comes to GTK# on Mono.

    Sincerely, I don't get quite get the point of your post. Was it Excel the reason why everything got slower or was it really GTK+ on Windows? Have you measured this?

    OK. Of course, if you're showing a complex data grid, it might require time to show up. But what is it what requires time? Drawing the chart or processing the data? The former is just drawing stuff into the screen and if the library is well-designed, it shouldn't have any noticeable critical delay (gnome-system-monitor, e.g.). If the data is complex, then the issue is at the backend, I guess, and even a console ncurses-based UI would lag in that case. In that latter case, all you can do is to tell the user to wait, I think, but it'd be very rare that the issue was the chosen GUI toolkit. If it was, it should be reported as a bug.
    I'm sorry it's not that was avoiding the answer - I just had a lot of work and in fact forgot this topic...

    Ganerally: I've just wanted to point to wxWidgets as an alternative, truly multiplatform toolkit. What we were discussing here was the aspect of term "truly" - so I'll try to explain what I meant...
    1) So it seems that You agree that GTK is slower on windows - the problem is GTK on Linux/Unix. The explanation is simple: It's the same situation like on windows - where wxWidgets are thin layer over complex, but native and thus fast API. To be more precise: every API has lower (faster but less convenient) and higher level functions - wxWidgets are wrapping low-level GTK functions (like drawing rectangles, lines, GL surface, etc) while using its own wxGrid class to manage the data for fields, methods of refreshing/redrawing, render-prefetch, scrolling (my example) - in other words native, higher level classes can be slower in such case.
    2) "Not noticably slow" is exactly matter of complexity of GUI. AUI is just one example where dockable toolbars/windows are realised with less CPU load and memory requirements than in GTK (I mean GTK3 here).

    Excell record/row number limit is only 0xFFFF. Access is different animal, but when there's possibility to get result of filtering with 300+ different filters at a time that can have f.e. 800 thousands of rows (or even more), then Access will die - at least, it will freeze for long time on a laptop with 4GB RAM and dual core 3GHz CPU. My app is able to process and display 1.4x10^6 records in about 4secs, scroll it smoothly and draw charts in a microsecond - using wxWidgets - tests were made with exactly 300filters active.
    To be honest - wxWidgets App class is single threaded - it needs some modifications for GUI-multithreading, but it's very easy tweakable, most of what You need is available trough #defines.

Page 3 of 3 FirstFirst 123

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •