|
pokeyman posted:No, it just doesn't do so automatically. It doesn't stop you from doing so if you feel you must. My understanding is that the disclaimers in copyrighted software works because either a) you agree to the disclaimer of warranty or b) you aren't allowed to use the software. Public domain doesn't have a copyright, so you can't control its use.
|
# ? Apr 19, 2011 03:47 |
|
|
# ? Jun 5, 2024 08:42 |
|
pseudorandom name posted:My understanding is that the disclaimers in copyrighted software works because either a) you agree to the disclaimer of warranty or b) you aren't allowed to use the software. Public domain doesn't have a copyright, so you can't control its use. Well, IANAL, but my understanding is that implied warranties and copyright are orthogonal. Placing a work into the public domain literally means abandoning the copyright you hold on that work.
|
# ? Apr 19, 2011 07:48 |
|
Have any open-source licenses been tested in court? I was under the impression that there are almost no precedents for them.
|
# ? Apr 19, 2011 23:44 |
|
pokeyman posted:Well, IANAL, but my understanding is that implied warranties and copyright are orthogonal. Placing a work into the public domain literally means abandoning the copyright you hold on that work. I actually asked an IP lawyer, and his response was "yes. wait. public domain. maybe? let me think." The More You Know.
|
# ? Apr 20, 2011 01:30 |
|
The King of Swag posted:The Apple docs flat out say that exception handling is faked using setjmp() and longjmp() and thus is subject to any limitations associated with those functions. Part of the problem is that you're confusing the NextStep library (exceptions require the use of NSException) with the ObjC runtime. Now, the latest versions of the runtime do natively support exceptions, but if I understand the gcc documentation correctly, they're still broken down into setjmp.h trickery during compile-time. The exceptions situation is complicated. As was already mentioned, on x86-64 ObjC exceptions are lowered to unwind tables, which cannot be simulated in C. On i386 they're lowered to setjmp/longjmp, which are actually an absurdly brittle way of implementing exceptions; llvm-gcc uses one set of terrible hacks to make things less brittle, including some things which aren't portable C, and clang uses another, including some different things which aren't portable C. On ARM (on iOS), both ObjC and C++ exceptions use a cross-breed unwinder involving unwind tables and setjmp-like compiler intrinsics, which is actually the closest to portable C any of this gets.
|
# ? Apr 20, 2011 01:37 |
|
rjmccall posted:The exceptions situation is complicated. No kidding. So I'm curious, given the hoops being jumped through: are exceptions useful in Objective-C? The only time I've ever seen them used in application-level code is as a general "catch everything and display an error instead of just crashing and maybe try to save a document first". If that's left out, exceptions tend to either cause a crash or leave applications in an inconsistent state and you probably should've just crashed anyway. And this doesn't even work 100% when you're calling library code that doesn't bother with exceptions. Apple's docs say to use exceptions for programming errors only (and this is sometimes done, e.g. using key-value observing on property that can't be found in the object), but this seems to be more typically handled with assertions or return codes. For example, many Foundation methods return nil (and NSError as needed). So are exceptions actually used as infrequently as I think? And if so, is that because they're so complicated, brittle, and/or non-portable? This is starting to sound like C++.
|
# ? Apr 20, 2011 03:11 |
|
Scaevolus posted:Have any open-source licenses been tested in court? I was under the impression that there are almost no precedents for them. GPL has many times, the anti-Tivo clauses in GPL 3 might hit court soon though. http://gpl-violations.org/index.html http://infinityoverzero.com/bbox/
|
# ? Apr 20, 2011 03:46 |
|
pokeyman posted:No kidding. So I'm curious, given the hoops being jumped through: are exceptions useful in Objective-C? They're not all that unportable; it's mostly that performance varies a lot between platforms, and that they don't interoperate with C++ exceptions on i386. If you're willing to overlook the latter — and you really should be, because Apple hasn't shipped a non-64bit-capable machine in years — and you don't use a gratuitous number of @try/catches, then there's no ObjC-specific reason to avoid them, other than the fact that the APIs don't throw them on normal error conditions. That said, I am not convinced that exceptions are ever really useful enough as a language feature to justify the burden.
|
# ? Apr 20, 2011 06:19 |
|
rjmccall posted:That said, I am not convinced that exceptions are ever really useful enough as a language feature to justify the burden. Not that I know anything but I'm with you. Thanks for sharing.
|
# ? Apr 20, 2011 08:13 |
|
How do I fix this error? I have gcc 4.2.1 installed. unable to execute gcc-4.0: No such file or directory error: command 'gcc-4.0' failed with exit status 1 Looking in my /usr/bin/, I do not have gcc-4.0 installed. What next? Jam2 fucked around with this message at 10:22 on Apr 21, 2011 |
# ? Apr 21, 2011 10:16 |
|
Figure out what is insisting on using "gcc-4.0" instead of "gcc", and change it.
|
# ? Apr 21, 2011 14:26 |
|
Jam2 posted:How do I fix this error? I have gcc 4.2.1 installed. Make sure you don't have environment variable "CC" set to gcc-4.0. Just unset it, and find the dot-file it was set in, rather than replacing the value.
|
# ? Apr 21, 2011 15:03 |
|
pseudorandom name posted:Figure out what is insisting on using "gcc-4.0" instead of "gcc", and change it. Thanks, very helpful. (not) In case you haven't realized, I have no idea what I'm doing. covener posted:Make sure you don't have environment variable "CC" set to gcc-4.0. Just unset it, and find the dot-file it was set in, rather than replacing the value. cc is set to i686-apple-darwin10-llvm-gcc-4.2. I tried symlinking gcc-4.0 to gcc-4.2 and it got past the original error but now breaks later down in the chain as it tries to build the package in gcc-4.2.
|
# ? Apr 21, 2011 16:00 |
|
Jam2 posted:Thanks, very helpful. (not) In case you haven't realized, I have no idea what I'm doing. But you do know how to search through files, right?
|
# ? Apr 21, 2011 23:54 |
|
Here's one for you Win32 API guys. I'm in the process of writing the Windows portion of my cross-platform input handling class, and I've come to the point where I need to differentiate between left and right handed keys. Shift, Control, etc. all work fine, but Alt works as if it's toggling the state of the keys. In other words, if I type LALT RALT x 3, I'll get LALT LALT RALT RALT, but LALT LALT RALT RALT x 3, will produce LALT RALT x 3, and I have no idea what's going on, as I'm handling it in the way suggested by the docs. I've also checked the low-bit to see if it really is being toggled, but it always returns FALSE. code:
|
# ? Apr 22, 2011 08:06 |
If this is in a WM_KEYDOWN handler, try checking the 24th bit of lParam instead. As far as I can tell it should also distinguish between left/right hand keys.code:
|
|
# ? Apr 22, 2011 08:32 |
|
nielsm posted:If this is in a WM_KEYDOWN handler, try checking the 24th bit of lParam instead. As far as I can tell it should also distinguish between left/right hand keys. I should have mentioned it in my original post, but I've also tried that before and it produces the same results as my current implementation. As does the bit-shift method ((lParam >> 24) & 1)
|
# ? Apr 22, 2011 09:13 |
|
quote:usf-wifi-35-92:imaging-1.1.7 BOSX$ python setup.py build_ext -i Why _imaging.c:3017: warning: initialization from incompatible pointer type?
|
# ? Apr 22, 2011 09:19 |
|
The King of Swag posted:I should have mentioned it in my original post, but I've also tried that before and it produces the same results as my current implementation. As does the bit-shift method ((lParam >> 24) & 1) Ok, I've half-solved it. Turns out that Alt gets funky because Alt activates the window menu; this is fixed by using WS_POPUP instead of WS_OVERLAPPEDWINDOW, but that's only a viable solution for fullscreen mode, and I'd like to have Alt a viable key in windowed mode. Is there a way to disable the window menu without resorting to WS_POPUP?
|
# ? Apr 22, 2011 09:34 |
The King of Swag posted:Ok, I've half-solved it. Turns out that Alt gets funky because Alt activates the window menu; this is fixed by using WS_POPUP instead of WS_OVERLAPPEDWINDOW, but that's only a viable solution for fullscreen mode, and I'd like to have Alt a viable key in windowed mode. Are you swallowing the WM_KEYDOWN and WM_KEYUP messages (i.e. returning 0) or are you passing any at all to DefWindowProc()? I believe that if you swallow all keyboard input and don't let DefWindowProc() see it, you shouldn't get any of the menu behaviour. This of course assumes you're writing something like a game that doesn't use standard user interface. Also try skipping TranslateMessage() in your message loop, although I don't think that matters for this.
|
|
# ? Apr 22, 2011 10:03 |
|
nielsm posted:Are you swallowing the WM_KEYDOWN and WM_KEYUP messages (i.e. returning 0) or are you passing any at all to DefWindowProc()? I believe that if you swallow all keyboard input and don't let DefWindowProc() see it, you shouldn't get any of the menu behaviour. This of course assumes you're writing something like a game that doesn't use standard user interface. This fixed it; thanks for the help.
|
# ? Apr 22, 2011 10:25 |
|
Jam2 posted:Why _imaging.c:3017: warning: initialization from incompatible pointer type? You'll need to show us line 3017 of _imaging.c (and surrounding lines) to have any hope of getting an answer. I probably couldn't help even with that, but someone else might be able to pick it up. Also, it sounds like your deployment target is not set correctly: quote:/usr/include/AvailabilityMacros.h:108:14: warning: #warning Building for Intel with Mac OS X Deployment Target < 10.4 is invalid. The reason for this is that OS X 10.4 was the first version to support Intel processors, so targetting less than 10.4 on an Intel platform doesn't make sense. edit: Also your build didn't fail because of the pointer warnings (warnings don't fail the build by default), it failed because of: quote:lipo: can't open input file: /var/folders/q2/q2ZBUrfEEfe2CotAoIUFsk+++TI/-Tmp-//ccOllyOf.out (No such file or directory) I don't know enough about OS X development and GCC to know what this is all about though. rolleyes fucked around with this message at 11:36 on Apr 22, 2011 |
# ? Apr 22, 2011 11:33 |
Jam2 posted:Why _imaging.c:3017: warning: initialization from incompatible pointer type? As rolleyes points out, that isn't the reason the build fails. The reason the build fails seems to be that the setup_site module doesn't know how to call the C compiler properly and in other ways sets up a wrong build environment. I tried digging a bit in the PIL sources and its setup.py but didn't find anything conclusive for why it fails. It seems that the compiler is told to build a fat binary with both PPC and x86 code in it, but your machine doesn't have an assembler for PPC installed so it fails to generate the PPC code, and then the lipo program fails because the PPC binary is missing. (Lipo is the program used on OS X to combine multiple single-platform binaries into one multi-platform fat binary.) As for those pointer warnings, maybe the code was written against an earlier Python API version, that's my best bet. Assuming it's the 1.1.7 release version of PIL, those two lines are in static initialisers for function tables for custom types.
|
|
# ? Apr 22, 2011 11:58 |
|
I'm writing a custom system call for ubuntu and I can't locate what file the code for the open() system call is in the source.
|
# ? Apr 23, 2011 15:42 |
|
The kernel implementation is in linux/fs/open.c, the userspace stub is generated from glibc/sysdeps/unix/syscalls.list
|
# ? Apr 23, 2011 16:45 |
|
IShallRiseAgain posted:I'm writing a custom system call for ubuntu and I can't locate what file the code for the open() system call is in the source. You can use grep or find commands to recursively search for patterns inside many text files or file names. You could use it to find such things in code base
|
# ? Apr 23, 2011 18:44 |
|
Thanks for the help. -Edit Nevermind about the other thing, found it on my own. IShallRiseAgain fucked around with this message at 21:27 on Apr 23, 2011 |
# ? Apr 23, 2011 20:56 |
|
Is there anyone here who could help with the logic of writing a sketch that creates a fractal like pattern in response to music (in Processing)?
|
# ? Apr 25, 2011 04:33 |
|
Awkward Davies posted:Is there anyone here who could help with the logic of writing a sketch that creates a fractal like pattern in response to music (in Processing)? What kind of fractal do you want and how many parameters are you extracting form music?
|
# ? Apr 25, 2011 16:47 |
|
I have an XML schema question. I have an element with two attributes whose rules change together. Look at this example for what I mean: [code] <xs:element name="stuff"> <xs:complexType> <xs:attribute name="name" type="xs:string" use="required"/> <xs:attribute name="type" type="myDataType" use="required"/> <xs:attribute name="value" type="xs:string" use="required"/> </xs:complexType> </xs:element> Let's say that the custom type "myDataType" is an enumeration of strings describing variable types like int, float, or string. The situation is that I'd like to adapt the rules for the value attribute so that depending on the given type, it can validate the value more strictly. So if the data type the user gives is "int" then I was hoping to validate that the value field is indeed an integer rather than something else like a float or a string. Is there a way to do this?
|
# ? Apr 25, 2011 21:43 |
|
Rocko Bonaparte posted:I have an XML schema question. I have an element with two attributes whose rules change together. Look at this example for what I mean: Regular expressions. I guarantee you that there are a hundred examples of exactly what you want to do out there.
|
# ? Apr 25, 2011 21:46 |
|
pr0metheus posted:What kind of fractal do you want and how many parameters are you extracting form music? I figured out the major roadblock that prompted me to post that. I'm attempting to use the rules for a modified koch curve to create a fractal based on music. I'm using the BeatDetect function from the minim library to trigger 90 degree turns. I don't think its ultimately going to work out, because BeatDetect is not particularly exact, but I'm trying. edit: if you know of a better BeatDetect class out there, by all means let me know
|
# ? Apr 26, 2011 00:36 |
|
Don't know if it answers all your questions but this is probably a good place to start: http://www.geisswerks.com/ryan/FAQS/articles.html Was the first hit in google for "how to make fractal based music visualization plugin". Sounds like you might want to add open source or -winamp to it.
|
# ? Apr 26, 2011 00:46 |
|
Awkward Davies posted:I figured out the major roadblock that prompted me to post that. You could use pitch to vary angle continuously
|
# ? Apr 26, 2011 03:01 |
|
Scaramouche posted:Don't know if it answers all your questions but this is probably a good place to start: Thanks for the help, but that's a little past my skills range. Processing is my first language, and I've only been using it for a short time. I appreciate the research though pr0metheus posted:You could use pitch to vary angle continuously Yeah, I'd like the interaction to be a bit more obvious, which is why I set it to the beat. I've just got some fine tuning of the BeatDetection and the object to do.
|
# ? Apr 26, 2011 14:57 |
|
Crosspost from c++ thread since nobody answered there: I am looking for a good resource that will teach me C++ from beginner to advanced. I haven't touched or even read C++ since college 6 years ago, I consider myself an expert at C#, but I would really like to learn C++ again. Does anyone have any favorite resources (online free tutorials are a plus, books are fine too)?
|
# ? Apr 27, 2011 20:38 |
|
Orzo posted:Crosspost from c++ thread since nobody answered there: did you try the first post of the thread you abandoned? http://forums.somethingawful.com/showthread.php?threadid=2773485#post339777574 it has links to online resources and recommended books
|
# ? Apr 28, 2011 14:45 |
|
Yes, I read the opening post I just thought someone might have a more precise suggestion for someone who knows C# inside and out. I guess I'm looking for an approach that assumes the reader knows how programming works but at the same time starts from step 1 on the C++ language.
|
# ? Apr 28, 2011 15:40 |
|
Step-by-step tutorials for new languages don't seem too useful for people who already know programming generally. Maybe you could try a "hello world" just to get your environment straight and then look for some recipes for elementary data structures and I/O?
|
# ? Apr 28, 2011 15:58 |
|
|
# ? Jun 5, 2024 08:42 |
|
rt4 posted:Step-by-step tutorials for new languages don't seem too useful for people who already know programming generally. Maybe you could try a "hello world" just to get your environment straight and then look for some recipes for elementary data structures and I/O? Agree. If you're already full up on another language you don't need a backgrounder in programming, you need to be aware of the differences from what you know to what you need to know. Unfortunately no one really makes a reference like that since it'd be of such limited appeal, so the best way is to usually take up a project and run with it finding out what the differences are. One thing to suggest though is before even getting into data types and I/O though is compiler specifics, because that is going to be the one area where your experience with C# is going to be sharply divided from C++. For that I'd pick up a basic C++ manual/tutorial of some kind and read the compiler (basic operation, optimizations, data conversion assumptions, make files, etc.) section end to end, and then once you know how that shakes out, start up a project of some kind. If you want to see some examples of how compiler assumptions and modes can go wacky just read up the Coding Horrors thread, there's usually something every 5 pages or so ANSI C/C++ related.
|
# ? Apr 28, 2011 20:58 |