|
b0lt posted:
What a method name This is what I get for being out of C++ for so long and not having a reason to play with the new standard.
|
# ? May 22, 2013 00:47 |
|
|
# ? Jun 7, 2024 22:51 |
|
hackbunny posted:Ugggh gross, use a condition variable, you monster but but but... syscall!
|
# ? May 22, 2013 01:09 |
|
b0lt posted:Parallel fizzbuzz: This is art.
|
# ? May 22, 2013 01:58 |
|
Flobbster posted:What a method name C++11 is really good, you can finally write C++ without being forced to use C-isms anywhere. I only wish MSVC implemented more of it, or that LLVM supported PDB debugging information, or that the Microsoft debugger supported DWARF symbols (I should try Wine's dbghelp.dll some time...) e: and I wish clang actually implemented __try/__except/__finally as something other than purely syntactical black holes (clang really likes to delete code without warning, doesn't it?) hackbunny fucked around with this message at 02:31 on May 22, 2013 |
# ? May 22, 2013 02:23 |
|
hackbunny posted:C++11 is really good, you can finally write C++ without being forced to use C-isms anywhere. What a shame.
|
# ? May 22, 2013 02:37 |
|
hackbunny posted:C++11 is really good, you can finally write C++ without being forced to use C-isms anywhere. I only wish MSVC implemented more of it, or that LLVM supported PDB debugging information, or that the Microsoft debugger supported DWARF symbols (I should try Wine's dbghelp.dll some time...) On some level, that's on me. A lot of our MSVC compatibility code was initially contributed by people who just wanted to parse to an AST for various reasons, so they've specifically wanted us to not complain about it. Those people generally only implement enough for us to parse and make ASTs for those constructs. I try to get them to at least ensure the compiler complains about generating code for unimplemented features, but there's a problem: that tends to block some people who manage to have code containing that construct but don't really care. For example, I'm sure there's plenty of code in headers that contains __try statements to handle some obscure corner case, but in practice users of those headers don't run into that condition. Ultimately, given that I feel that people generally know that clang targeting Windows (for C++ or any of the weirder Windows features) is extremely alpha, if a contributor pushes back hard enough, I'd rather encourage them to keep contributing than be a hard-rear end. When we're closer to feature-complete, that'll change. Although... SEH support specifically might be pretty long coming.
|
# ? May 22, 2013 04:08 |
|
rjmccall posted:On some level, that's on me. It's on me too, I guess . I am some sort of SEH "expert", no, more like a SEH buff, and a MSVC internals buff as well. My single biggest credential in this field is an embarrassing implementation of SEH constructs for GCC (which contains such terrifying constructs as "A no-op side effect that scares GCC" and "GCC doesn't know that this equals zero", and an inline function trampoline disassembler so as not to require an executable stack), which was nevertheless good enough that ReactOS is still using it after 5 years (in kernel mode too, no less) and only a few months ago was considered for replacement My biggest regret is trying, and failing, to add SEH support to GCC (in my defense, the GCC code is impenetrable), but it's objectively hard considering that both the API and ABI of SEH are fundamentally incompatible with Unwind: not just different, more like irreconcilable, what with SEH unwinding the stack in one big shot and Unwind doing it frame by frame; SEH calling unwind blocks as nested functions and Unwind as inline code; SEH exceptions being restartable (in fact, the most useful use cases of SEH involve restartable exceptions); and SEH requiring the generation of code, not just unwind data, on x86 (code that is, inexplicably, patented) I actually downloaded the LLVM source code some time ago (and was very impressed that it compiles cleanly in Visual Studio, by the way), with the intention of at least trying to add SEH support, but eh, if it turns out I have to make changes the backend or, god forbid, the intermediate language, I doubt that would be received well. Sooo, I'm not making promises or anything, but does anyone care enough about SEH?
|
# ? May 22, 2013 08:45 |
|
I think we're still a bit sensitive about some of the legal issues around SEH (it's still under patent); I would email Chandler Carruth at Google (privately) and ask his opinion. Technically, I think the right approach would be a late-staged LLVM pass (there's an analogous one for DWARF exceptions) that does the sub-function extraction, inserts the appropriate runtime calls, and maintains the context index. It's possible, maybe even likely, that you'll need to add some new intrinsics to handle some of the peculiarities of the runtime interaction there; I only know the main thrusts of the design, not the specifics like how to register stuff with the runtime.
|
# ? May 22, 2013 11:13 |
|
rjmccall posted:I think we're still a bit sensitive about some of the legal issues around SEH (it's still under patent); I would email Chandler Carruth at Google (privately) and ask his opinion. Ludicrously simple, I think it was specifically designed so that it could be implemented in MASM macros or even inline assembler for backwards compatibility with compilers that didn't natively support it *. You just build a singly-linked list entry on the stack and push it on top of the SEH frame stack; you pop it in the function epilogue, and that's pretty much 50% of the whole ABI right there. That's what makes the Borland patent such horseshit, and I would be surprised if similar mechanisms like pthread_cleanup_push/pthread_cleanup_pop didn't toe the line of infringement e: * in fact, the MSVC implementation quacks just like an ascended inline asm implementation. For example, __except() expressions and __finally blocks are emitted as labels followed by a RET, not true nested functions, and they don't bother making a closure of the local variables they actually use, they just restore EBP and call it a day. Super hacky stuff. For contrast - and I know this for a fact having personally disassembled PowerPC, MIPS and Alpha executables - on all other architectures SEH is implemented like you'd expect, with proper nested functions (named, even) and closures hackbunny fucked around with this message at 12:36 on May 22, 2013 |
# ? May 22, 2013 12:27 |
|
Are we still talking fizzbuzz?php:<?while($i++<100)echo$i%3?!$$i=$i:Fizz,$i%5?$$i:Buzz,~õ?>
|
# ? May 22, 2013 14:37 |
|
hackbunny posted:Ludicrously simple, I think it was specifically designed so that it could be implemented in MASM macros or even inline assembler for backwards compatibility with compilers that didn't natively support it *. You just build a singly-linked list entry on the stack and push it on top of the SEH frame stack; you pop it in the function epilogue, and that's pretty much 50% of the whole ABI right there. That's what makes the Borland patent such horseshit, and I would be surprised if similar mechanisms like pthread_cleanup_push/pthread_cleanup_pop didn't toe the line of infringement IIRC the patent is specific to its use to implement exceptions. Is pushing onto the SEH frame stack done inline in the frame? I guess it's presented as some thread-local variable — ah, yes, apparently it's fs:0. If you're really interested in working on this, we sold probably take this to llvm-dev (but CC me; I can't keep up with that list normally).
|
# ? May 22, 2013 20:15 |
|
bobthecheese posted:Are we still talking fizzbuzz? The ~õ is perfect.
|
# ? May 22, 2013 20:24 |
|
This horrible thing that just got made public is apparently what powers Instagram on the web, and Facebook contributes to it too. http://facebook.github.io/react/ code:
code:
This is a joke, right?
|
# ? May 30, 2013 02:13 |
|
Flobbster posted:
What, you haven't seen Facebook's XHP? php:<?php $list = <ul />; foreach ($items as $item) { $list->appendChild(<li>{$item}</li>); }
|
# ? May 30, 2013 03:50 |
|
Any hints as to the particulars of why React is so awful, for those of us who can't spot it quite as readily?
|
# ? May 30, 2013 04:17 |
|
McGlockenshire posted:What, you haven't seen Facebook's XHP? To be fair, Scala also has XML literals and I think Marcel Laverdet (creator of XHP) left Facebook ages ago. Not sure if it's enjoyed much usage internally since it's been a couple of years.
|
# ? May 30, 2013 04:22 |
|
Doctor w-rw-rw- posted:To be fair, Scala also has XML literals and I think Marcel Laverdet (creator of XHP) left Facebook ages ago. Not sure if it's enjoyed much usage internally since it's been a couple of years. scala's xml literals make the language a colossal pain to parse
|
# ? May 30, 2013 16:04 |
|
code:
|
# ? May 30, 2013 16:58 |
|
Wait, what?
|
# ? May 30, 2013 17:05 |
|
It makes slightly more sense untrimmed - the only thing in the catch block is some logging and the server being periodically unreachable is expected.
|
# ? May 30, 2013 17:11 |
|
In the spirit of things:code:
code:
|
# ? May 30, 2013 18:01 |
|
McGlockenshire posted:What, you haven't seen Facebook's XHP? Actually XHP owns. Static guarantees that strings are escaped properly depending on context while using a very natural syntax is totally a good thing.
|
# ? May 30, 2013 18:24 |
|
Plorkyeran posted:the server being periodically unreachable is expected. Why would this be a good thing?
|
# ? May 30, 2013 20:00 |
|
Probably so that you don't spam the log files thousands of times a second with the same error, now it'll only spam HUNDREDS of times a second!
Hughlander fucked around with this message at 02:00 on May 31, 2013 |
# ? May 31, 2013 01:57 |
|
I was cleaning out a development folder and I found a file called MP.java. I had no recollection until I opened it and it all came rushing back to me. I suppose this falls under the category of code that makes you laugh. When I was a younger buck working at Morgan Stanley, I thought I would die from the boredom of writing loan reporting applications. My boss sat directly behind me so I couldn't slack off and read the internet. To pass the time I would try to code things that would keep me entertained. So I created this little work of art. If you have a Java IDE, run it as a java application and watch the console - but the console needs to be sized correctly. Shrink it down until you can only see one square frame. Enjoy. http://imadp.com/static/MP.java
|
# ? May 31, 2013 02:45 |
|
That's amazing. For the lazy set your console window to 65x17 and run java -jar MP.jar.
|
# ? May 31, 2013 03:11 |
|
code:
Does this require Java 7? Surprisingly I only have Java 6 in my shell, but Java 7 in my browser.
|
# ? May 31, 2013 06:01 |
|
Oh gently caress, probably. I compiled and built the jar using Java 7. You should be able to compile the source in any version of Java.
|
# ? May 31, 2013 06:55 |
|
FateFree posted:I was cleaning out a development folder and I found a file called MP.java. I had no recollection until I opened it and it all came rushing back to me. I suppose this falls under the category of code that makes you laugh. Ephphatha posted:That's amazing. For the lazy set your console window to 65x17 and run java -jar MP.jar. Your tree was planted in the very soul of the 1 minute I spent downloading and running this artistic masterpiece.
|
# ? May 31, 2013 13:35 |
|
zergstain posted:
edit; oh wait javac is only in the JDK I am dumb. The Gripper fucked around with this message at 14:27 on May 31, 2013 |
# ? May 31, 2013 14:23 |
|
It's MongoDB time! User-triggerable NULL pointer dereference due to utter plebberyquote:Steps to reproduce:
|
# ? May 31, 2013 16:48 |
|
MononcQc posted:It's MongoDB time! User-triggerable NULL pointer dereference due to utter plebbery I'd probably care more if he wrote it up seriously and didn't come off like a 14 year old/JeffK. "LOLLERSK8Z WEB 3.9", jesus christ
|
# ? May 31, 2013 16:52 |
|
Ithaqua posted:I'd probably care more if he wrote it up seriously and didn't come off like a 14 year old/JeffK. "LOLLERSK8Z WEB 3.9", jesus christ Yeah, seriously. The biggest horror here is that somebody has to work with that guy.
|
# ? May 31, 2013 17:07 |
|
Foiltha posted:Yeah, seriously. The biggest horror here is that somebody has to work with that guy. And the bug is fixed now. So the timeline is: 5/31: Guy discovers a bug and is a douchebag about it 5/31: Bug is fixed That was nowhere near as fun as the maintainer of Calibre repeatedly defending bad practices and being a prick in the face of overwhelming evidence.
|
# ? May 31, 2013 18:00 |
|
I'd be pretty petulant about that at the end of a legitimate ~20 hour workday, too, assuming that stuff about it being 4 AM wasn't bullshit.Ithaqua posted:That was nowhere near as fun as the maintainer of Calibre repeatedly defending bad practices and being a prick in the face of overwhelming evidence.
|
# ? May 31, 2013 18:12 |
|
Ithaqua posted:And the bug is fixed now. On the other hand, it was refreshing to see the comments stay civil despite the douchey report (and the report's author even apologized for his tone).
|
# ? May 31, 2013 18:18 |
|
The Gripper posted:You should just be able to do javac MP.java && java MP$Life if that there .jar doesn't work! Don't worry, I have the JDK. Just not JDK 7. I thought I did.
|
# ? May 31, 2013 18:21 |
|
MononcQc posted:It's MongoDB time! User-triggerable NULL pointer dereference due to utter plebbery That was painful to read
|
# ? May 31, 2013 18:43 |
|
Ithaqua posted:That was nowhere near as fun as the maintainer of Calibre repeatedly defending bad practices and being a prick in the face of overwhelming evidence. And, unfortunately, some of that personality is owed to part of the Linux mentality. Part of his argument was that "I can't depend on udisks because users asked for it to not be a dependency", which is like a Windows software developer saying "I can't depend on user32.dll because some customers delete it from the base install". It's an unfortunate state because Linux app developers can't depend on any base system library being there, and if they do, users will complain.
|
# ? May 31, 2013 18:44 |
|
|
# ? Jun 7, 2024 22:51 |
|
DaTroof posted:On the other hand, it was refreshing to see the comments stay civil despite the douchey report (and the report's author even apologized for his tone). It's kind of a stretch to call quote:Apologies to anyone offended by this report. Thanks for your effort! Mongo catches a ton of poo poo but it can be really hard to suss out when it's well-deserved since the complaints are often phrased as tirades, are hardly substantiated, or contain complaints that have been addressed in newer versions of mongodb than the author is using.
|
# ? May 31, 2013 19:38 |