|
I can't seem to find the project settings I need in KDevelop. It couldn't find the includes it needed so it prompted me to edit the custom include path, which I did, but now I can't get back to that menu. I like the stuff I have figured out much better than Eclipse.
|
# ? Dec 10, 2013 22:41 |
|
|
# ? Jun 6, 2024 16:20 |
|
Edison was a dick posted:In my experience, most don't, instead opting to use their preferred text editor, make and GDB. To me, Linux itself is my IDE, though I've heard good things about Kdevelop recently. This is the way I program. The text editor in KDevelop is an embedded Kate window. It acts as a frontend for make and gdb, with code completion, project management, source control, patch reviewing, integrated Okteta (if you need hex editing), etc. It's a great convenience for someone who already treats Linux itself as an IDE.
|
# ? Dec 10, 2013 23:25 |
|
Dren posted:I can't seem to find the project settings I need in KDevelop. It couldn't find the includes it needed so it prompted me to edit the custom include path, which I did, but now I can't get back to that menu. The best thing about KDevelop is that you don't need project settings. Everything you need is in the CMakeLists.txt file. You add include folders there, linking libraries, etc.
|
# ? Dec 11, 2013 02:07 |
|
rhag posted:The best thing about KDevelop is that you don't need project settings. Everything you need is in the CMakeLists.txt file. You add include folders there, linking libraries, etc. I found what I was looking for, there is a dot file in my top level directory with the settings. I found it sort of weird that they'd have a GUI that pops up situationally but doesn't say "hey dummy edit this in the text file we're making because this GUI isn't coming back". I guess include paths are the only extra setting I need but I have an auto tools project not a cmake one so I won't get to experience whatever goodness you are describing.
|
# ? Dec 11, 2013 03:37 |
|
Interesting! So does this mean that if I have an existing CMake project, I can just point KDevelop at it and it'll just work? I usually just use Emacs, but the various semantic/autocompletion modes always seem limited or hard to set up. KDevelop looks interesting, if it's not too much effort to try. Can I configure it to use Emacs key bindings in the editor?
|
# ? Dec 11, 2013 03:59 |
|
Tetraptous posted:Interesting! So does this mean that if I have an existing CMake project, I can just point KDevelop at it and it'll just work? Yes, it should "just work". As for Emacs mode, i don't know if it supports that (or what exactly this mode would mean to you), but you can configure the shortcuts. Another decent IDE is QT Creator (which also supports CMake files, among other things). Version 2.8.1 found in Fedora 20 is actually surprisingly nice. I tried it some few years back and it sucked, but now i am actually using it for a week and all is fine and dandy.
|
# ? Dec 11, 2013 05:19 |
|
So brief question on the subject of types and unions in C++11. I'm attempting to pack several types to be no more than 16 bytes each (memory is extremely limited) on a 64-bit platform. These types are recursive (that is the union-like class that stores these possible values is in fact a possible object located within the classes it holds), so it is best to save space here, as otherwise I end up wasting 7 bytes per boost::variant. Additionally, the packed attribute breaks for GCC, and clang doesn't like it either for some reason, so I'm taking a different route. So far each type that isn't an number looks something like code:
My question is, if I were to add the bitset to each type (and wrap the integral types so that they are properly aligned), is it legal to access the 'bitset' member of each type directly, whether that specific type has been initialized? I was able to find this stackoverflow which gave me some hints that in this case, all the types would in fact meet the requirements in that the std::bitset<8> was always initialized and could therefore be accessed regardless of type as a member, and not invoke undefined behavior. For safety's sake I'm going to assume no, as the compiler could technically reorder each type's location of std::bitset, and then I'd be boned, but I would like just a little bit of confirmation.
|
# ? Dec 11, 2013 06:02 |
|
types that can go into unions are PODs, which guarantees they have the same memory layout as C. If your bitset is at the start of each type, it will be accessible from all types when type-punning. EDIT: to be pedantic, c++ unions accept some things which aren't PODs. Whatever your types are probably PODs EDIT2: So you were unable to get something like C++ code:
FamDav fucked around with this message at 07:46 on Dec 11, 2013 |
# ? Dec 11, 2013 07:37 |
|
FamDav posted:types that can go into unions are PODs, which guarantees they have the same memory layout as C. If your bitset is at the start of each type, it will be accessible from all types when type-punning. That was a data example, but these types are not PODs, nor are they trivial or standard layout. Additionally, I'd prefer to put the bitset at the end as everything else is taking up 15 bytes at the front. I'm worried about type punning within a union-like class with the relaxed C++ rules regarding unions.
|
# ? Dec 11, 2013 08:43 |
|
More KDevelop love, here - its code completion/ navigation for C++ is really very good indeed. Plus (plug, plug) - it has a pretty capable Vim emulation mode, if that floats your boat.
|
# ? Dec 11, 2013 12:20 |
|
I learned C++ back in college many years ago and pretty much never used it again once I left school. Most of my work, I'm just a hobbyist now, is done in Lua and C#. Is there a book that teaches C++ that is for folks who already know how to program? Is there one written from the ground up for C++11? Most of the books I've browse so far seem like new editions that just have a few chapters teaching C++11's new features.
|
# ? Dec 11, 2013 18:16 |
|
DSauer posted:I learned C++ back in college many years ago and pretty much never used it again once I left school. Most of my work, I'm just a hobbyist now, is done in Lua and C#. Is there a book that teaches C++ that is for folks who already know how to program? Is there one written from the ground up for C++11? Most of the books I've browse so far seem like new editions that just have a few chapters teaching C++11's new features. From the blurb, it sounds like the 4th edition of Bjarne's own "The C++ Programming Language" might fit the bill - it's definitely aimed at programmers, and seems to have been re-written entirely to make use of C++11 (quote: "Throughout, Stroustrup presents concise, 'pure C++11' examples"). I've not read it myself, though.
|
# ? Dec 11, 2013 18:58 |
|
The C++ Primer was also rewritten entirely for C++11.
|
# ? Dec 11, 2013 19:28 |
|
Posting Principle posted:The C++ Primer was also rewritten entirely for C++11. This one is better than Bjarne's IMO.
|
# ? Dec 11, 2013 19:52 |
|
DSauer posted:I learned C++ back in college many years ago and pretty much never used it again once I left school. Most of my work, I'm just a hobbyist now, is done in Lua and C#. Is there a book that teaches C++ that is for folks who already know how to program? Is there one written from the ground up for C++11? Most of the books I've browse so far seem like new editions that just have a few chapters teaching C++11's new features. I grabbed the Bjarne's latest book 6 months ago and really liked it. I knew what loops and variables were but was(am) in no way a programmer, wasn't even a painful read through even though it's probably more of a technical reference.
|
# ? Dec 11, 2013 20:04 |
|
Both recommendations sound good; I'll check them out. Thanks folks.
|
# ? Dec 11, 2013 20:07 |
|
SAHChandler posted:That was a data example, but these types are not PODs, nor are they trivial or standard layout. Additionally, I'd prefer to put the bitset at the end as everything else is taking up 15 bytes at the front. I'm worried about type punning within a union-like class with the relaxed C++ rules regarding unions. Disregard my previous message, I forgot I have to support custom allocators, so this whole thing falls apart
|
# ? Dec 11, 2013 20:24 |
|
I have been coding in KDevelop for while today. Its code navigation and autocompletion are stellar and I am so glad I'm using it and not Eclipse with the CDT. KDevelop would be pure excellence if it had emacs key bindings but they have keyboard driven column editing (they call it block selection mode it's ctrl+shift+b) so they are forgiven. Basically this thing is awesome so thanks for recommending it.
|
# ? Dec 11, 2013 21:13 |
|
As a (more or less) beginner programmer, what are some differences I would notice/appreciate between NetBeans, Eclipse, and KDevelop? I've been using NetBeans this last semester at least once a week for labs and checking that what I've written in Visual Studio will run as expected on a Linux box.
|
# ? Dec 11, 2013 21:21 |
|
hooah posted:As a (more or less) beginner programmer, what are some differences I would notice/appreciate between NetBeans, Eclipse, and KDevelop? I've been using NetBeans this last semester at least once a week for labs and checking that what I've written in Visual Studio will run as expected on a Linux box. Haven't used netbeans. Eclipse is slower than kdevelop. Eclipse's code parsing fails on more complicated stuff that works in kdevelop. I don't think eclipse even has auto completion but kdevelop is constantly offering to autocomplete stuff (If you feel that it's autocompleting too much you can configure it to only autocomplete when you hit a button). KDevelop has a rad object hierarchy browser that shows you inheritance relationships (eclipse has nothing even remotely like this). KDevelop looks like it has a lot more stuff too, like it might actually function with the custom make system in our project though I probably won't use that feature. If you let Eclipse auto-build for this project it will get all hosed up and be building forever because it can't figure out the make system. If you're not working on a big project you probably don't need to be in an IDE. If I were working on an isolated component that I knew well or a from scratch component I'd probably use emacs instead of KDevelop because I like emacs as a text editor. But since I'm doing some work with code I'm not really familiar with having all the code navigation tools and autocompletion of the IDE is super helpful.
|
# ? Dec 11, 2013 21:47 |
|
Thanks for the information. I just installed it to check it out. Made a C++ terminal program called "Hello world", and the drat thing was already written for me. Except it wouldn't build because evidently it's looking somewhere for a directory called "world".
|
# ? Dec 11, 2013 22:36 |
|
Dren posted:Haven't used netbeans. Eclipse is slower than kdevelop. Eclipse's code parsing fails on more complicated stuff that works in kdevelop. I don't think eclipse even has auto completion but kdevelop is constantly offering to autocomplete stuff (If you feel that it's autocompleting too much you can configure it to only autocomplete when you hit a button). KDevelop has a rad object hierarchy browser that shows you inheritance relationships (eclipse has nothing even remotely like this). I make embedded Linux firmware. Every time I hit compile, I'm building an entire operating system using a cross compiler. Because everything I do is in C with a cross compiler, all of my custom code use custom Makefiles. I found that if I use the standard variables in the Makefile (CC, CFLAGS, etc.), KDevelop can find the proper directories. If I type: C code:
It's nice to see what I'm actually using when I'm coding to uClibc but my PC is using glibc.
|
# ? Dec 11, 2013 23:11 |
|
contrapants posted:I make embedded Linux firmware. Every time I hit compile, I'm building an entire operating system using a cross compiler. It's nice that KDevelop can infer from your makefiles what needs to happen. You can usually get that in other IDEs (KDevelop too) by messing about with include paths. My project builds inside a chroot so I have a non-standard way to get to the system headers/stl headers that can only really be solved by setting the include path.
|
# ? Dec 12, 2013 02:09 |
|
Edison was a dick posted:In my experience, most don't, instead opting to use their preferred text editor, make and GDB. To me, Linux itself is my IDE, though I've heard good things about Kdevelop recently. QTcreator is pretty decent and even supports darker colour schemes. It's used primarily by the juniors. I'm a grumpy old man so I use vi(m) with NerdTree and ctags.
|
# ? Dec 17, 2013 22:34 |
|
Is there any reason an error, specifically a divide by 0 error, would halt a thread instead of just crashing\actually throwing an error while debugging in vs2012? The following code would very rarely result in a divide by 0, but would never say so. That particular thread would just freeze up. After compiling for release it would crash every time, which is what led me to discover it. The exact same code is found elsewhere, but in the main thread, and would throw an exception. code:
|
# ? Dec 20, 2013 22:16 |
|
e: Oops those are ints, not float, ignore me.
OneEightHundred fucked around with this message at 03:25 on Dec 22, 2013 |
# ? Dec 21, 2013 12:02 |
|
bobua posted:Is there any reason an error, specifically a divide by 0 error, would halt a thread instead of just crashing\actually throwing an error while debugging in vs2012? Possibly unrelated data point: a failing assert when using the multithreaded CRT: a) stop that thread while a modal dialog is displayed b) not stop other threads c) not stop the process until the modal dialog is dismissed But under debugging this should be different: you should get a SEH EXCEPTION_INT_DIVIDE_BY_ZERO raised.
|
# ? Dec 21, 2013 14:54 |
|
I think this might be the best place to ask, what's the cross-platform UI toolkit of choice these days? I want to write a Gerber viewer (gerbv frustrates me sometimes), and I figure I can vastly increase my potential userbase if it runs on Windows, Linux and OS X. My initial plan was to write it in C#, because I love Visual Studio and I'm pretty familiar with Windows development, but I don't know if Mono would be suitable to run it on OS X and Linux because I want to use some HW accelerated graphics stuff also. I do know though, without a doubt, that I want to try and use the native widgets on every platform when possible (unlike GTK apps on Windows). wxWidgets, Qt? Or structure my code such that I have a core Gerber library in vanilla C or something, and then re-write the UI for each platform (eeek)?
|
# ? Dec 22, 2013 21:45 |
|
movax posted:Or structure my code such that I have a core Gerber library in vanilla C or something, and then re-write the UI for each platform (eeek)? This has really been the only workable approach. UI conventions differ between platforms, and that's why "cross-platform widget toolkits" always seem cheap. It's easy to abstract over a Button widget, but it's harder to abstract over Human Interface Guidelines.
|
# ? Dec 22, 2013 22:06 |
|
From an end-user standpoint I've been happier with stuff made using Qt than stuff made using Gtk. A ton of stuff uses Qt, and yeah, the experience might not be piss-perfect compared to giving yourself 3x the UI work, but so many things use it and it works out pretty well. See also https://en.wikipedia.org/wiki/Category:Software_that_uses_Qt When I was trying to do this wxWidgets seemed immature to me and Qt seemed mature, and if there's a trade-off I suspect it would be a heavier up-front learning curve of Qt (didn't seem bad to me, though) versus the long-running risk that wxWidgets isn't good enough (for what it's worth, my Gtk on Windows user experiences might have been partly caused by the fact that I only see Gtk on Windows used because the software was originally made for Linux). Somebody could probably come along to contradict me who has way more experience than me, all I was trying to do way-back-when was to get a not-too-complicated program wrapping OpenGL.
|
# ? Dec 22, 2013 22:38 |
|
shrughes posted:When I was trying to do this wxWidgets seemed immature to me For a user's perspective, GTK is terrible everywhere but Linux. wxWidgets is the best cross-platform option on Windows, but it's worse than Qt everywhere else. Qt is okay everywhere (except KDE-based linux, where it's native). Anyone who tries to tell you that you can write a good OS X GUI without using Cocoa via Objective-C is probably trying to sell you something. Mono doesn't support WPF, so even if you only care about the program being runnable and not necessarily nice to use it's not a good plan for a GUI (gently caress winforms). A core library with as much of the functionality as possible that's wrapped by a GUI is a pretty good design for an application even if you aren't going to write multiple UIs for it.
|
# ? Dec 23, 2013 00:17 |
|
wxWidgets is a really bad wrapper trying to implement MFC on other platforms. Its documentation is littered with "this only works on PocketPC" (yes, it prides itself on its PocketPC port) and "this doesn't work on OS X", etc. all over the place. Qt is really three or four different projects, all for building different kinds of UIs and on various kinds of systems. GTK+3 works on Windows/Mac (we have three people maintaining it now), but it's a bit of a pain to compile right now, and we don't ship supported binaries. We do have some unsupported binaries over here. However, it's not going to make a native-looking UI on all platforms. You do have to do your own work to follow the platform's HIG for every port. We do ship CSS themes for Windows and Mac that make them look more integrated, though.
|
# ? Dec 23, 2013 00:40 |
|
Problem I've always had with Qt is how large and all-in it is; it provides its own implementation of everything and as such can be annoying to integrate with an existing codebase, and will bloat the absolute poo poo out of your build times / add tons of DLL dependencies. Wx has tons of problems, but it's a lot slimmer. For a standalone project I think Qt is by far the best option out there, but wx has a niche for projects where you're making a tool using some existing code.
|
# ? Dec 23, 2013 02:51 |
|
Hmm, looks like I need to some research into how to strap a given library to various UI frameworks; conceptually it makes sense, but I'm not sure how to write the exact Obj-C or C# to say "hey, dude clicked Open File, pass byte stream over to libgerber for threaded parsing". Need to do more research in that arena.
|
# ? Dec 23, 2013 05:11 |
|
Thanks to the advice of some of you I picked up Stroustrup's "The C++ Programming Language" and I've been plowing through it. Unbelievable how much has changed since I last used C++ in the mid 90s. For the heck of it I refactored some of my ancient Win32 code using lambdas and function objects and it "just works". Huge amounts of boiler plate code in my event handling methods just vanished! No point in doing that since there's no reason for me to ever use Win32 again, but it was still a fun mental project in using new features. RIP class member function pointers. No real need to learn C++ for my day to day hobby work but its still refreshing to learn what is effectively a new language, keeps things fresh. Thanks again for the recommendation. Sauer fucked around with this message at 08:05 on Dec 23, 2013 |
# ? Dec 23, 2013 07:50 |
|
movax posted:Hmm, looks like I need to some research into how to strap a given library to various UI frameworks; conceptually it makes sense, but I'm not sure how to write the exact Obj-C or C# to say "hey, dude clicked Open File, pass byte stream over to libgerber for threaded parsing". Need to do more research in that arena. Hm, so I just realized, could this be a web app? You can get the user to upload a file using an input form and FileReader, parse it in a Web Worker, and then render the view using HTML5 canvas. — (I wrote some stuff for GTK+ below, if you want to do a native desktop app) The only potentially tricky thing about opening files is that users might want to load from the network, or from the their Google Drive, or from any number of "virtual" sources, so a lot of toolkits integrate a virtual filesystem layer. In GTK+ (the toolkit I know the most), at least, you can turn that feature off and say "please give me a filename on disk". In GTK+, at least, this would be fairly simple. Get a simple app up, then wire up a GtkFileChooserDialog, then send the result of that over to libgerber. In order to not block the main UI thread, if libgerber doesn't do anything complicated with a thread yourself, you can use GTask to launch a blocking task on a worker thread and get notified when it completes. If you need to do any custom rendering (rendering your PCB, for instance), you can use cairo together with a GtkDrawingArea.
|
# ? Dec 23, 2013 08:14 |
|
Suspicious Dish posted:Hm, so I just realized, could this be a web app? You can get the user to upload a file using an input form and FileReader, parse it in a Web Worker, and then render the view using HTML5 canvas. I thought about making it a web-app, but there's a security concern from the user side of uploading their design files to a remote server. Only way around this is if I eventually come out with a version that can be instanced & deployed internally on a corporate network or something like that, but I am not sure if I want to open-source just yet. Re: File opening, I definitely want to use native widgets when possible for the reasons you've described; on Windows if they have Google Drive or Network drives, I want them to drag and drop the files in, or open the file using the Windows dialog; ditto for OS X/Linux. Maybe gerbv uses some rear end-old version of GTK+ (it doesn't do drag and drop at all, doesn't store recently used paths, etc), sounds like the newer one, while not actually calling the native dialog from shell32/etc, still delivers a pretty usable solution?
|
# ? Dec 23, 2013 18:27 |
|
There doesn't need to be a server at all. You can make the webapp entirely client-side.
|
# ? Dec 23, 2013 18:38 |
|
Suspicious Dish posted:There doesn't need to be a server at all. You can make the webapp entirely client-side. Ah, client-side JS/HTML5? (I am not a web-app guy at all) So the source would be exposed on their side right? I'm looking around for resources re: cross-platform development, and got a decent set of rules here so far, still looking around for more resources & examples.
|
# ? Dec 23, 2013 18:43 |
|
|
# ? Jun 6, 2024 16:20 |
|
movax posted:Ah, client-side JS/HTML5? (I am not a web-app guy at all) So the source would be exposed on their side right?
|
# ? Dec 23, 2013 19:48 |