Conky in C/C++ language - linux

I want to change image of my desktop in mint :)
I wan to add sth like conky to desktop but I don't know LUA language :(
Is it possible to write it in C/C++ language? (for example I want to connect with forecast server to download some png with my weather and so on:)
Anyone knows how to do it?

I'm not sure that conky supports C/C++. But you can find many sample conky/lua scripts on google. It's not hard to find something close to what your looking for in appearance and in features, and simply modify the conky and lua scripts manually through trial and error. Its really quite easy to decipher. You can also check the conky man page for info:
http://conky.sourceforge.net/docs.html

Lua is extremely easy to learn, definitely a lot easier compared to C/C++. I suggest you check out the book Programming in Lua and learn the basics. If you really want to use C, you can always call C functions from Lua and do the real work there. It is explained in the book aswell ;-)

Related

Looking for a cross-platform language

Lately, I've been looking for a good, lightweight language with these traits:
Cross-platform, at least for Windows and Linux.
Lightweight, fast, really portable and quick to setup/get running.
Most importantly, it has to have most of the stuff baked into it. I don't want to fiddle around with libraries, download anything extra and such.
I've looked into countless options already. Ruby, Tcl, Wren, Lua for example, but I fell like most of them fall short on certain areas. I know a lot of Python already and I love it, but I fell like it falls short in some of my wishes too.
Is there any language corresponding to the features I said and if not, what's the closest match?
Sorry, if I am being a bit too picky.

simple game development on linux

I'd like to develop simple 2d games on linux. Something like one below. The only decent tecnology I've found was PyGame. Is there any other worth taking a look? Is there a possibility to develop flash games on linux?
Thanks in advance.
I will have to agree with previous user , pygame is an amazing powerful and easy to use library.
Now about your flash games, there is a back door.
First forget about flash. Yes I know that this seems a bit out of topic , but no worries you can compensate for this.
Now python has something called Pyjamas, dont laugh its actually a very serious package. What pyjamas does is to convert python code to javascript code, all this happens automatically and you dont need to know a single line of javascript , even though knowing javascript could help as well. Of course the benefits of converting python to javascript means that not only you can run python apps inside any browser and any device supporting a browser including iPad, iphone, and pretty much anything else you can also use javascript libraries. Actually you can use only javascript libraries , so forget about using pygame with pyjamas.
Now HTML5 is the future, its still an ongoing project and far from finished, but YouTube already is using it with alot of success. Html5 together with the new version of javascrip offer features very similar to Flash, with the added advantage unlike Flash which is tied to Adobe , HTML5 is open source and a web standard. That means that borwser support Html5 out of the box with no need to install anything. So you could use HTML5 and Javascript to build your browser games. I think that HTML5 will replace the Flash in the near future. Remember because you will be using pyjama you will writing your code in python only, but of course you could mix it with some javascript code if you wish so.
I will advice for the time being epxlore pygame , because its dead easy to use, and when the right time comes and feel confident with python, take a look at pyjamas and fire away your browser games. The important thing to remember is that unlike other easy to lear language Python is a serious language used for almost anything, so you never run out of option. So do your coding and have fun.
Oh in case you need to check out pyjamas its right here.
Pyjamas Website
Here's a list of some open source game engines in general. You'll want to look at the cross-platform, 2D-oriented engines and see which one best meets your needs as far as programming language and features.
However, PyGame is pretty well-developed, and Python is an exceptionally easy and fun language to do anything in, including game development. I recommend you check out PyGame first, I think it would work well for your task.
As for developing flash games on Linux, there's little chance of that. To develop flash games you need Adobe's suite, and it is only compatible with Windows and Mac. So unless your computer can handle the stress of Adobe software (which is pretty high) in an emulated environment (Wine, which adds considerable hardware overhead), you'd need Windows or Mac OS X to do that. You can still play them, however.
There are flash libraries for games that work in linux. It's a but more of a pain in the ass but maybe all the hassle will teach you a thing or two ?
Here are some usefull links
http://flashgamedojo.com/go/
http://www.flixel.org/download.html (mentions some linux options)

How do I start contributing to GNOME?

How do I start contributing to GNOME? I can program in C++ and Python, but have never touched C. I am not familiar with GTK even.
To be honest, I have no idea how GNOME works. All I have is a deep desire to somehow contribute to it.
Where do you recommend do I start? Any tutorial, mailing list or anything. I am ready to do the hard work, I just need a direction.
PS: I could have googled for the problem, but nothing beats the experience I have seen since Google returns SO for most of the questions.
Visit Join GNOME.
Figure out what you want to do for them
If it's development, then:
learn C and GTK
checkout the source code
browse through the bug-tracker to find a reasonably sized task and ask for help of more senior committers to tell you what is at your level
fix it and submit a patch
wait for roses and glory
But maybe you can help with other things, as mentioned on Join GNOME
Translations
Design / Artworks
Technical Documentation (review, proofreading)
Best of luck and thank you for trying to contribute.
Be sure to check out GNOME Love as well. It's a site aimed at getting people started with GNOME.
You may find it handy and useful by creating new extensions for Gnome shell.
There are a lot of extensions on https://extensions.gnome.org/. It requires JavaScript programming. It will also give you insights of how things work in Gnome.
start simple program with below manual.
The GTK+ tutorial
GTK+ 2 Reference Manual
GTK+ 3 Reference Manual
show your program here: http://www.gtkforums.com/ (Project Showcase)
also to note:
you don't have to learn C (even though it's a good idea). You can use PyGtk for GTK development in python (but i won't recommend that because of the speed of python).
GTK bindings for c++ also exit it's called gtkmm. It have binding for many other librays (Cluttermm, Cairomm, Pangomm).
there are bindings for A LOT of languages but native C is the best solution.
I would recommend learning vala because of it's ease of use but also because of it's speed (but that's just personal preference).
also check the gnome-devel-demo out. can be useful

Linux programming - getting started, how?

I've taken the plunge and installed Linux (Linux Mint 9 if that's important) on one of the boxes - and I'd like to start some small-time programming... but where to start.
My background:
Mostly LOB-applications in C#/WPF
Some XAL-basic
A wee bit of VB/VBA and SilverLight
I would like to turn to a new programming language - but still focused on desktop applications.
What I need:
An editor - preferably with good intellisense
A programming languages and the resources to get started
If anyone can point me in the right direction, I'd be happy for a little push...
EDIT:
Thanks for all the advice - I've come up with the following:
I'll start out with Python - and use Vim for the editor
I'll definetly try out Vala and Perl later and have MonoDevelop as backup editor - and if all else fails, I'll turn to C++. I've upvoted all answers as they all helped me.
EDIT2:
Okay - Vim was a bit too hardcore... Installed Cream on top.
Unlike the Windows world, where everything is designed to be Windows-only, I think it is quite typical to find that the rest of the world designs software to specifications, not to implementations. If you are developing in Java, then it doesn't matter what platform you intend to use, and Eclipse and NetBeans provide excellent tooling for Java on all platforms, Linux included. If you are developing in C++, then Boost and Qt provide excellent cross-platform support. If you need to go outside of Boost or Qt, then before delving into Linux-specific features, it is best to target the Single UNIX Specification also known as IEEE Std. 1003.1 POSIX, which will ensure that your application not only runs on Linux, but also on any UNIX-compliant operating system (including Mac OS X, FreeBSD, Solaris, and others).
As for IDEs and other editors... I think most programmers on UNIX platforms build from the commandline (using CMake, Make, scons, or some other standard build tool); however, there are plenty of IDEs with support for those that can run such tools automatically. Anjuta C++ and KDevelop are probably the easiest IDEs to use on Linux. Emacs (emacs, emacs-gtk, xemacs) and Vim (vim, gvim) provide a great deal of power and flexibility, but take a little bit more time to get used to. You might also want to consider a basic text editor such as GEdit (Gnome) or Kate (KDE); GEdit, though billed as a simple text editor, supports some more advanced coding features via a number of plugins. I don't recall whether it supports autocompletion, but it does support line numbers, automatic indenting, using spaces instead of tabs, commenting a block of code en-masse, and executing a Makefile with a shortcut.
Depends on how much you want to learn (from the easiest option to the hardest one):
Just use C# via Mono - that gives you access to most of the POSIX interfaces via Mono.UNIX, access to GTK# so you can do desktop apps, access to many linux libraries, so you can do more advanced stuff / integrate better. (you can program in Monodevelop - it's a Sharpdevelop clone, kind of VS-ish)
Learn Vala - it's a language compiled down to C, very similar to C# but closer to the bare minimum. It's gathers anti-MS people who wanted a response to C# IMHO. (never really used it, but apparently there's a Vala plugin for Monodevelop and the language itself is becoming more popular)
Learn Python - it's a scripting language. It's got bindings to most popular libraries (also GTK and QT) (IDE: anything that can edit text - you won't get good intellisense from a dynamic language anyways)
Learn C++ and QT, or C and GTK - although those are very low level languages where you will spend a lot of time just getting used to the environment. (IDE: Anjuta, Kdevelop, Monodevelop with C++ plugin, Eclipse+CDT, emacs, vim, etc. - anything goes really)
If you want "something new", but don't want to spend loads of time learning a completely new environment, I'd recommend trying out Vala. If you're more curious about different styles, go for Python, which I think has a very good tutorial for new people (but not new to programming): Tutorial or Beginner's Guide. With Python you also have an advantage of having the whole environment available in packages in any distribution, no such luck with Vala (yet).
Try perl and python and see what appeals to you. Learn bash to get around happily at the command-line. If you're feeling adventurous, give C/C++ a shot.
As for editors, this will probably spark up a holy war, but if you're using at the command line, check out vim and emacs, pick one, and lament never making friends of those in the "enemy camp." :-)
I say Python + Emacs or gEdit (what ever suits you)
Linux Mint is a KDE environment, right? That would make it pretty convenient for you to get started writing KDE apps in C++. The Qt toolkit which KDE is based on is widely considered to be relatively developer-friendly, which should make it easy for you to get started.
If you want to go on that route, I'd suggest downloading KDevelop, which is KDE's IDE (optimized for developing KDE programs, but it can handle several different languages). Alternatively, you could use Eclipse, which has C++ capability. You can find tutorials on how to develop KDE apps at http://techbase.kde.org/Development/Tutorials. (Unfortunately I think those are not as good as the documentation they used to have before KDE 4 came out, but it should be enough to get you started.)
EDIT: Come to think of it, you may want to try your hand at writing some C++ console (non-GUI) applications first, since it's probably easier to get comfortable with basic C++ before you jump into GUI programming. Given your experience, it shouldn't be too hard to pick up. Unfortunately I don't know of any particularly good resources to learn C++ with, but I'm sure that information is somewhere on this site, and KDevelop or Eclipse would work fine as an IDE for simple C++ console apps as well.
Weird that nobody suggested ALP, even if it is a bit outdated, it teached me a lot of things regarding the UNIX way of programming.
First, Learning C is a MUST!
Perl is underused for most stuff and you'll want to learn BASH Shell Scripting instead.
Grock the C code of existing (stable, well-written software) example is the Linux kernel itself! Google "Linux LXR"
Once you learn the basics to C (in Linux) the manpages are an invaluable resource. Just do man printf for information on writing characters to the screen, for example.
If you are talking GRAPHICAL GUI Programs, you need to learn GTK+ or one of the many cross-platform GUI toolkits (e.g. wxWidgets). Do not learn to program the X Windows System directly unless you are crazy.
For text editors, I like Komodo Edit and SciTE.

Developing for Linux

I want to develop multimedia encoder for Linux.
I want to make use of ready command line codecs like ffmpeg.
I want to build nice GUI for that & pass arguments to command line encoders.
I am thinking to use Qt. (Is it possible?)
I don't know anything about Linux programming, but I have been an Ubuntu user for 8 months.
Please provide me with links to tutorials. (I've tried the Ubuntu forums but it's all beginners stuff in there!)
I am in need of tips from you guys. I am ready to learn everything about it!
I am ready to learn new languages.
Thank you!
Funny story, actually. Two years ago, I developed this for a GTK frontend. You can grab the code at vive.sourceforge.net. I since abandoned it when nobody was using it and I had no need for it, anymore, but the code is still there and you're absolutely free to go tear it apart, laugh at my mistakes, and take what you can from it.
I will warn you, that code is fairly laughable. I was learning C and GTK at the time, so be easy on me :)
If you'd like to take it over, I'd be glad to turn it over!
It looked like this:

Resources