sepp2k's Profile User Rating: *****

Reputation: 2271 Grandmaster
Active Posts:
3,499 (2.22 per day)
21-June 11
Profile Views:
Last Active:
User is offline Private

Previous Fields

OS Preference:
Favorite Browser:
Who Cares
Favorite Processor:
Who Cares
Favorite Gaming Platform:
Who Cares
Your Car:
Who Cares
Dream Kudos:
Expert In:
C/C++, Functional Programming, Java, Python, Computer Science
Icon   sepp2k has not set their status

Posts I've Made

  1. In Topic: How to get dot product of two sparse vectors in O(m+n).

    Posted 25 Sep 2015

    Don't iterate over the entire second vector each time. Instead only iterate up to the first element whose index is >= the current index of the left vector. And then continue from that point when you get to the next element.

    PS: Just to be clear, the vectors are represented as lists of index-value pairs for each non-zero element of the vector, right? Otherwise the runtime requirement does not seem achievable to me.
  2. In Topic: Multi-platform OOP languages?

    Posted 15 Sep 2015

    What you're looking for does not exist. A native executable for one OS will not run on another OS (without the help of another application like wine). And another form of executable (like a bytecode file) will always need some kind of application to run it.
  3. In Topic: Linux Programming Resources

    Posted 11 Sep 2015

    View PostBBeck, on 11 September 2015 - 11:44 PM, said:

    I mean: to learn operating system programming and specifically XWindows (I think that's what you call it since I'm brand new to Linux although not to programming). In theory I suppose this is not language dependent but I would be leaning towards coding in C++.

    What exactly do you mean by "operating system programming"? Just from that phrase I would assume "programming an operating system", but that doesn't make sense in the context of the post. Next guess would be something like programming drivers or other kernel modules or anything else that directly interacts with the OS, but again that doesn't gel with the rest of the post.

    As for the X Window System: Unless you're trying to write a window manager (which I suppose could be what you meant by "operating system programming") or something that requires similar low-level access to the windowing system, I would not recommend programming for X directly for the following reasons:

    • The X API is quite low level and not very pleasant to program against. It's also not the best documented API out there.
    • There's an alternative to X, named Wayland, being developed, which does not use the same API. If you program using the X API, your applications won't directly run under Wayland (and if you use Wayland's API, they won't work under X, which is still the standard and will probably be in use for quite some time).
    • If you're writing a normal GUI application, you probably want it to have a native look and feel (most notably meaning that it adheres to the desktop theme and thus looks like most other GUI applications). This won't be the case if you write plain X applications as X does not have a concept of themes. Rather in most desktop environments, picking a desktop theme really means picking a GTK theme. Both GTK and Qt (when running in a GTK Desktop) respect GTK themes, so applications using those toolkits will look native.


    It doesn't seem like there are many recent books published on Linux programming especially in a GUI environment.

    Programming a GUI for Linux usually means programming a cross-platform GUI (as all common GUI toolkits that support Linux also support the other big operating systems). Well kinda, it's still perfectly possible to end up with applications that won't run on other OSs because you made OS-specific assumptions (like file paths, existence of certain environment variables etc.), but it usually won't be for GUI-related reasons. So what I'm trying to say is that it would likely make more sense to look for resources on cross-platform GUI platforms (Qt, GTK, Wx) than anything Linux-specific.

    View PostBBeck, on 11 September 2015 - 11:52 PM, said:

    Just read through this post recommending Qt and GTK. I've heard talk about Qt recently although I have no idea what it is.

    Qt and GTK are cross-platform GUI libraries.


    The thread is almost a decade old though. So things change a bit over decades, especially in the IT world.

    They really didn't here though. I mean both Qt and GTK have had new versions in that time, but they're still by far the most used GUI libraries that target Linux/X11 (or anything/X11 really).
  4. In Topic: orphaned default

    Posted 18 Aug 2015

    Switch (area1); is a method call to a non-existent method named "Switch". It is not the start of a switch statement. That would be switch(area1) {.

    case1: etc. are label definitions. They are not cases of a switch statement. That would be case 1: etc. with a space after the case keyword.

    So you get an error about default being "orphaned" because it's not inside a switch statement (because you didn't correctly write a switch statement). You don't get the same error about your previous uses of case because you didn't actually use case. If you had spelled the cases correctly (i.e. with a space), you'd have gotten the equivalent error (i.e. "orphaned case") for them as well.
  5. In Topic: im reviewing a structure walkthrough

    Posted 17 Aug 2015

    x->r is a shortcut for (*x).r, so what is happening is that x, which is an A pointer, is dereferenced and then the field r is accessed on the resulting A. And then the value of the field is stored in the variable i.

My Information

Member Title:
D.I.C Lover
Age Unknown
Birthday Unknown
Years Programming:
Programming Languages:
Haskell, Ruby, OCaml, SML, F#, Scala, Racket/Scheme, Vala, C#, C++, Java

Contact Information

ICQ  205544826