/srv/irclogs.ubuntu.com/2012/10/18/#ubuntu-app-devel.txt

IDWMasterHi. Is there a version of Quickly for C++?01:17
IDWMasterI've been working on a C++ project for Ubuntu for a while; and I realized it would be nice to introduce people (especially those who are new to development on POSIX systems) to app development on Ubuntu; specifically dealing with the build system (GNU make, GNU autotools, libtools, etc). When I started I had to get data from several different sources; there wasn't a nice tutorial in one place like there is for Python.01:19
IDWMasterWhy is this?01:19
IDWMasterOr is there a nice tutorial somewhere that I wasn't aware of?01:19
IDWMasterIn my opinion providing Linux developers with C++ tools right away could improve the quality of the platform, as native languages typically (though not always) lead to higher quality applications. Unless I'm mistaken and Python has a fast, ahead-of-time native compiler now01:22
IDWMasterPersonally I think app developers should not just be able to create a Python app for Ubuntu in under five minutes, but also a C++ app in under five minutes, which is why I've been working on some libraries to make it easier to develop in C++, and create cross-platform apps.01:23
IDWMasterLibrary is open-source and is available on Launchpad under the GPL license01:24
IDWMasterhttps://launchpad.net/crosslibs01:24
IDWMasterGoal is to allow people to "quickly" create C++ apps01:24
zoopsterIDWMaster: hit up dpm during Spain office hours...he'd be interested in this.01:25
IDWMasterWho's dpm?01:25
zoopsterdavid planella...he does a lot for developer relations in the ubuntu community team01:26
IDWMasterDo you have any contact information for him; or at least a Launchpad account URL?01:26
zoopsterhttps://launchpad.net/~dpm01:27
IDWMasterThanks01:27
IDWMasterWow. Sure a lot of e-mail addresses registered with that one account!01:27
zoopsterhe's a geek01:27
IDWMasterGood. It's hard to find good geeks these days.01:28
IDWMasterEspecially in the US it seems like -- I'm a computer science major and most of my class isn't even interested in programming!01:28
IDWMasterThey're just taking it to satisfy requirements for biology, math, or physics.01:28
IDWMasterI was going to start an app developers' club at my school but there was absolutely no interest.01:29
zoopsterhe's on during central european time so in ~5 hours or so you'll see him in this channel01:29
zoopsterwow...really?01:29
IDWMasterYeah01:30
zoopsteri can't believe that...there has to be some interest...even the smallest schools have IEEE clubs or others where programming is of interest01:30
IDWMasterNot Augsburg College01:30
zoopsteroh. ok.01:30
IDWMasterI've tried to start one up but it just hasn't gotten any traction. I'll keep trying though :)01:31
IDWMasterLots of people have negative pre-conceptions about programming in general, and especially C++01:31
zoopsterwell...Minneapolis is big enough...there's bound to be some interest outside of school.01:32
IDWMasterI gave a speech at a major university (University of Minnesota) recently about how C++ can actually simplify common development, and how to properly abstract things. Most of the people at my speech were graduate students, professors, or professionals though, not many undergrads.01:33
zoopsterI can see that...it can be daunting compared to python01:33
IDWMasterOne new addition I made is called StdVal in my library01:33
IDWMasterFor example01:33
zoopsteris it they don't want to work hard?01:33
IDWMasterThink they're just frightened by the mere mention of pointers01:34
IDWMastereven when it's a friendly std::shared_ptr<T>01:34
IDWMasterauto somevalue = StdVal(5)+StdVal("Hello world!");01:34
IDWMasterConsole->WriteLine(somevalue);01:34
IDWMaster/Above line prints "5Hello world!"01:34
IDWMasterText is always stored in Unicode format in the platform locale01:34
IDWMasterI use ICU when writing to a file though01:34
IDWMasterExample:01:34
IDWMasterstd::shared_ptr<Stream> filestream = inst->Open("somefile.txt",ReadWrite);01:35
IDWMasterstd::shared_ptr<IDataBuffer> utftext = parser->GetBytes(somevalue);01:36
IDWMasterstd::shared_ptr<IParallelTask> task = filestream->WriteAsync(utftext,utftext->sz);01:36
IDWMaster/Above line gets an asynchronous operation for writing to a file01:36
IDWMaster/we can run this operation now using task->Run and pass in a completion callback01:37
IDWMastertask->Run([=](std::shared_ptr<IManagedObject> returnvalue) {01:37
IDWMasterstd::shared_ptr<StreamRetVal> rval = CastShared(returnvalue,StreamRetVal);01:37
IDWMaster}01:38
IDWMaster);01:38
IDWMasterwhere rval is an error code for the asynchronous write operation01:38
IDWMasterAll of my library functions are thread-safe, except for IC80FS functions01:38
IDWMasterAll I/O is done asynchronously by default01:38
IDWMasterparser (an instance of a std::shared_ptr<IDataParser>) is a platform-independent data formatter01:39
IDWMasterIt writes data in standardized formats which can be readable by nearly any modern computer system01:39
IDWMasterIt takes Endianness, byte sizes, and string encodings into account, and abstracts all of these concepts for the developer01:40
IDWMasterAlso; memory allocation is cheap in my library because I wrote a custom memory allocator for it; so you don't have to worry about how many times you can call "new" in a tight loop without slowing down your application.01:40
IDWMastermalloc (called by new) is faster in Linux than Windows, but I chose to still use a custom allocator because I want it to be portable to other platforms like Windows, where malloc is very slow.01:41
IDWMasterMemory pool is also thread-safe and supports multiple pools for different threads, but also allows sharing of objects between threads.01:42
IDWMasterAlthough I've recently ran into a very annoying bug which I will probably get to fixing this weekend.01:42
IDWMasterIt's a random segfault when calling a method in a lambda function passed by value across a thread boundary.01:42
IDWMasterI've determined the problem is somehow related to my allocator but haven't figured out exactly what the problem is yet.01:43
IDWMasterCurrently only affects my IC80FS libraries (normal file system support still works just fine).01:43
IDWMasterBUG FOUND: Quickly doesn't work on computers with small monitors!01:45
IDWMasterAnyways; I'm probably the only one who uses a netbook to code anyways.01:47
mhall119IDWMaster: still around?02:07
IDWMasterYes02:07
mhall119https://launchpad.net/quickly-community-templates I think has a quickly template for C++ and Qt02:08
mhall119you can make a quickly template for pretty much anything02:08
IDWMasterThanks02:09
mhall119np02:09
mhall119also, what do you mean quickly doesn't work on computers with small monitors?02:10
mhall119it's all CLI02:10
=== duanedes1gn is now known as evilduanedesign
=== davidcalle_ is now known as davidcalle

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!