Best posts made by VinDuv
-
RE: Brazil is out!
And that’s why allowing any form of HTML as user input is a bad idea.
Filed under: Sanity level: <meter max="100" min="0" value="5" low="50" >Critical</meter> -
RE: The nerdy jokes thread (bonus original title mode!)
It looks like it should be the next avatar for @ben_lubar
I wonder what would happen if his current avatar was fed into a Piet interpreter...
-
RE: Ruby or Python?
David Beazley did the legwork; I just read about it. I hope to god that things have improved since then…
It was apparently fixed in Python 3.2. But AFAIK Python 2.7 still has the old system.
Anyway, this fixes the performance problems on CPU-bound processing, but it does not allows Python code to run in parallel on two threads. Python threads have their uses, but running intensive calculations on multiples threads is not one of them. -
RE: [en.topic_count_all] Click to show.
Question from the peanut gallery: how does a 'corrupted link' produce a 500 from a server? There is no legitimate circumstance where a 500 should ever be intentionally thrown for a URL. Bug?
Even things like http://what.thedailywtf.com/?a result in a blank page with a 500 status code, so I’d guess it’s Discourse way to tell that it does not like a request.
If only there was an HTTP status code for a bad request, they could probably use it... Wait... -
RE: I++ vs i+=1
Assuming
i = 0
before that line, the result of the expression is1
, andi == 2
.$ /opt/cling/bin/cling ****************** CLING ****************** * Type C++ code and press enter to run it * * Type .q to exit * ******************************************* [cling]$ int i = 0; [cling]$ i+++++i; input_line_4:2:5: error: expression is not assignable i+++++i; ~~~^
Looks like it parses this as
((i++)++)+i
whichDEMSYR
so it gives up. (i++
is equivalent to((i = i + 1) - 1
which is not a variable an thus can’t be++
ed)Alternative parsing:
[cling]$ int res = (i++)+(++i); input_line_5:2:14: warning: multiple unsequenced modifications to 'i' [-Wunsequenced] int res = (i++)+(++i); ^ ~~ [cling]$ res (int) 2 [cling]$ i (int) 2 [cling]$
-
RE: The Official Status Thread
Status:
(“Unable to find or create the trash directory”)
-
JavaScript regex-to-string conversion
I was working on a Django-based website, and needed to get the URL for static content (images, etc) from JavaScript.
I added the lines<script> var static_url = {{STATIC_URL|escapejs}}; </script> <!-- other scripts needing static_url here ... -->``` in my Django template file. It seemed to work fine; the scripts generated correct URLs. Then I deployed the website on a dev server (instead of running it on my machine), and... things died horribly. I looked into the generated page and saw: ```html <script> var static_url = http://blahblablah/static/; </script>
OK, so I did a mistake in the template; the |escapejs filter escapes any quotes when substituting the template variable, but does not put the variable itself between quotes. I should have used
var static_url = "{{STATIC_URL|escapejs}}";``` But... *how did it work on my machine?* Well, on my machine, ```STATIC_URL``` was just the string “/static/”. So the JavaScript parser saw ```javascript var static_url = /static/;``` and interpreted it as a regular expression. And when the other JS code did things like ```var image_url = static_url + "some_image.png";```, the value was silently cast to the string “/static/” (with the slashes), so everything worked in the end. I was already convinced that JS’s ability to parse /something/ into a regex was a bad idea (mostly because /* is the start of a comment, so there may be some parsing confusion), but now...
-
RE: 3 Reasons Windows 8.1 is better
- "It's every second version, you see, when you start from 3.11, then..."
I’ve seen many posts (mostly on Slashdot, of course) claiming that “Every other version of Windows is crap” followed by a random list of Windows versions (mixing NT and non-NT). I don’t think I’ve seen two posts mentioning the same versions.
-
RE: The Official Status Thread
Status: So I have a Python program which loads a C library (libclang) in order to parse a C header file and in return generate C source code to build a C library which can be loaded from a Lua script which will then be able to create objects whose memory pattern matches the C structs in the header file.
My head is starting to hurt...
-
RE: Nested elementshttp://en.wikipedia.org/wiki/keyboard http://en.wikipedia.org/wiki/keyboard http://en.wikipedia.org/wiki/keyboard http://en.wikipedia.org/wiki/keyboard http://en.wikipedia.org/wiki/keyboard http://en.wikipedia.org/wiki/keyboard http://en.wikipedia.org/wiki/keyboard http://en.wikipedia.org/wiki/keyboard http://en.wikipedia.org/wiki/keyboard http://en.wikipedia.org/wiki/keyboard http://en.wikipedia.org/wiki/keyboard http://en.wikipedia.org/wiki/keyboard http://en.wikipedia.org/wiki/keyboard http://en.wikipedia.org/wiki/keyboard http://en.wikipedia.org/wiki/keyboard http://en.wikipedia.org/wiki/keyboard http://en.wikipedia.org/wiki/keyboard http://en.wikipedia.org/wiki/keyboard http://en.wikipedia.org/wiki/keyboard http://en.wikipedia.org/wiki/keyboard http://en.wikipedia.org/wiki/keyboard http://en.wikipedia.org/wiki/keyboard http://en.wikipedia.org/wiki/keyboard http://en.wikipedia.org/wiki/keyboard http://en.wikipedia.org/wiki/keyboard http://en.wikipedia.org/wiki/keyboard http://en.wikipedia.org/wiki/keyboard http://en.wikipedia.org/wiki/keyboardposted in Meta
-
RE: Found in the code base at work
PhpExcel?
Reminds me of a PHP-based web app I’ve seen at one of my previous jobs, which was generating Excel files by programatically controlling Excel though COM.
-
RE: The Official Status Thread
…TortoiseGit is a
git
client…It’s a
git
client, meaning that it executes thegit
command with various parameters to perform the required actions. But it’s not a Git client because it’s not directly working on Git repositories -
RE: The Official Status Thread
Brb, submitting the question of "What would happen if your alarm clock was capable of emitting music at 500 dB SPL?" to XKCD's What If.
By ~194dB the air pressure would already rapidly oscillate between 0 and 2 atmospheres.
-
RE: Closed Poll: Do you have Discourse Syndrome
AAaaaaaaaaaaaaah, so it's not that Discourse is any more stable itself, merely that we see break it less.
Given the quality of the current experimental stuff, I don’t think anything has actually improved.
@PJH said: -
RE: User Cards - Badges and other Sexy Curiosities
TRWTF is that the badge image has no tooltip. Not only it’s a useless feature, but it seems to be implemented to be as useless as possible.
-
RE: GIT Vulnerability
IMHO filesystems should be case sensitive (= you can only access a file by using its correct name), but should disallow creating two files with the same name but different case in a directory.
It would at least prevent those kind of problems. -
RE: 🙅 THE BAD IDEAS THREAD
just taking the particle beam from the LHC (for example) and aiming it at someone.
The Bad Ideas thread is ... oh.
-
RE: The Official Status Thread
Status: Found TRWTF.
A library we use in our program installs a bunch of signal handlers when it’s initialized, for no good reason I can think of*.So which signals are handled ?
SIGHUP
,SIGINT
,SIGILL
,SIGABRT
,SIGFPE
,SIGSEGV
,SIGALRM
,SIGTERM
.And what does the signal handler do?
void signal_handler(int signal) { /* [...] */ exit(0); }
Seriously. If your program executes an illegal instruction, fails an assert, divides by zero or segfaults, this library will make it exit with a “success” return status. No core dumps for you!
* EDIT: Found out the (probably bad) reason it’s done this way. This library communicates with a dedicaced kernel driver; when the program exits it apparently needs to send a “clean-up” request to this driver, or else the driver will become unusable until the system is rebooted (seriously). So the library tries hard to clean everything up when the host program crashes. WTF!?
-
RE: 🙅 THE BAD IDEAS THREAD
Bad idea: Configuring X so the numeric keypad always produces numbers regardless of the NumLock status.
It works in GTK apps but does the exacte reverse of what’s expected in Qt apps (typing a number always moves the cursor around).
My favorite behavior is from a Java app, though: Typing numbers work, but typing the numpad - key unzooms the document even when used in a text box. -
RE: The Official Status Thread
Status: Got trolled by
libxml2
. I have defined a callback function which is called when the SAX parser encounters an error; it’s a variadic function which takes aconst char* format
.
I got lazy and wrote this:void error_callback(void* context, char* format, ...) { internal_log("SAX parse error: %s", format); }
because after all the format string should give enough information about the problem, right?
Well, I now have this in my logs:
SAX parse error: %s
-
RE: Sexy Sock Puppet Master List
Yikes... Why would Discourse implement a feature to impersonate other users?
Impersonation can be useful to test user permissions. But apparently limiting the impersonation to permissions, like other forum software do, is Doing It Wrong. I guess Discourse’s version of impersonation is just
session.user = selected_user
-
RE: This is apparently not a joke: http://www.nomorejavascript.com/
I remember seeing discussions on the WebKit development mailing list about supporting multiple scripting languages (triggered by Google engineers who wanted to promote Dart).
The main arguments against it were:
- The multiple language runtimes would add bloat to the browser
- Language support would vary between browsers, leading to compatibility issues
- Most programming languages are not designed to run in a sandbox
- Managing the lifetime of DOM objects between multiple language runtimes and the DOM itself would be quite difficult
So basically, I don’t think this will ever happen. We may get new versions of JavaScript which with fewer flaws (ECMAScript 6 seems to be a step in the right direction), but Ruby? I think not.
-
RE: Free the Oracle DBA (rights)!
So DUAL is only shipped in the first place due to pedantic dickweeds?
IIRC the pedantic dickweed here is Oracle itself, which doesn’t allow SELECT statements without a FROM.
-
RE: The Official Status Thread
Upgrade finished. Got this mess when logging out of Xfce before rebooting.
After reboot
- The icons on my desktop moved slightly offscreen (I think they aligned themselves with the top of monitor #2 despite being on monitor #1 which is slightly lower)
- The action button which was previously displaying the aforementioned dialog (allowing to close the session, reboot, halt, or hibernate the computer) was changed to only provide logout, I had to reconfigure it
- The top bar icons were crammed to the right, I had to reposition them
- The desktop takes much more time to show up
- My Kerberos settings were lost, apparently
- Some applications apparently moved to GTK3, but there seem to be no GTK3 theme installed, resulting in a very ugly display in those applications
But at least X still works.
Filed under: I should probably post in the rants thread -
RE: Users page no results when filtering = infinininininispinner
The JS code loads this page to get the search results (minus the
.json
):500 Internal Server Error, no content.
-
RE: Sexy Sock Puppet Master List
Between @codinghorror and @codlnghorror, who is the sockpuppet?
-
RE: Programming Confessions Thread
EDIT: Darn! we don't have mathjax enabled! @PJH, feature request?
We need DiscoBBHTLMarkjax because DiscoBBHTMLarkdown is not confusing enough.
-
RE: The Official Status Thread
Problem solved. When the
user
option is present in the fstab,mount
now ignoresexec
and setsnoexec
instead, regardless of wether the mountpoint is mounted byroot
or another user. No warning thatuser
andexec
are incompatible, of course... -
RE: The Official Status Thread
Status: looking for a cluebat after seeing
somefile.c:286:5: attention : passing argument 1 of ‘free’ discards ‘const’ qualifier from pointer target type
in the build logs after asvn up
. -
RE: Hey, you know the difference between the old forums and these? posted in Meta
-
RE: Lookup List of Years
Why a varchar when a small int could handle it?
A small int could cause problems around Y32K or Y64K. This code is ready for Y100K!
-
RE: [SUGGESTION] TDWTF link in header?
window.onload = function() { doLink(); var timer = setInterval( doLink , 1000); }
-
RE: The official hack testing thread
Another unicode combining character test.
̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬̬a -
RE: Poll: Default poll item count limit
You mean you want ℵ1 options? You even understand how absurd that is?
Having an infinite continuous set of options seems nice, but the radio button selection currently used in polls will not be sufficient.
Filed under: That’s just another GUI element to reinvent, though -
RE: The Official Status Thread
Thatsss a nice phone you have there ...
[default] exten => _,1,Explode() exten => _,2,Hangup()
-
RE: Permissions on Linux
Looks like they are using http://fr2.php.net/is_writable to check if the directory is writable. So maybe TRWTF is PHP?
-
RE: Archive validity testing cancel dialog
I think I’ve seen some errors dialogs which read
Nothing to undo. [Cancel]
That’s fine until you translate it to French, where « Annuler » is used for both “Cancel” and “Undo”.
Hilarity ensues. -
RE: Quotes appear in wrong order
Bug: patriarchy clears the undo history on save
The “Excel clears the undo buffer on save” thread is ... Oh, I think it’s still on CS. Maybe we need a new one.
Filed under: with Markov bots trying to communicate
-
RE: Moderators.json Requires Authorization
http://what.thedailywtf.com/groups/moderators.json
[error: 'invalid access']
- WTF is an “invalid access”?
- How did they manage to produce such invalid JSON? (
[
instead of{
, and'
instead of"
, no quotes arounderror
)
-
RE: Traceroute Fun
discourages use of sudo.
Suddently Discourse’s inability to use colo[spoiler]u[/spoiler]red text doesn’t seem so bad...
-
RE: Anyone posted the Lenovo malware news yet?
$ cling ****************** CLING ****************** * Type C++ code and press enter to run it * * Type .q to exit * ******************************************* [cling]$ #include <string.h> [cling]$ strlen("??????????????????????????????????????????????????????????") (size_t) 58 [cling]$