Posts made by VinDuv
-
RE: WhyTF am I putting my Node in The Intern?
now i think they should have gone the other way with their backwards compatibility, but they didn't and we're stuck with it.
They should have taken a hint from MySQL and defined a
SQLITE_REAL_FOREIGN_KEY
keyword that would provide actual foreign keys... -
RE: WhyTF am I putting my Node in The Intern?
I wrote them for shits and giggles right?
You’re using a database which ignores column data types. You should probably assume that most constraint checks are nonexistent or disabled by default.
-
RE: WhyTF am I putting my Node in The Intern?
According to the documentation, foreign keys constraints need to be explicitely enabled when opening the database:
Maybe that’s the problem?
-
RE: I++ vs i+=1
The only one I can think of, doesn't have pre/post operators.
It’s probably for the best. Having--
for both comments and the decrement operator would create ambiguity in a lot of situations.(FYI
--
is also used for comments in Lua and AppleScript) -
RE: The Official Status Thread
Status: Started
meld
in a terminal, got annoyed by the debugging output$ meld . ** (meld:20524): WARNING **: Couldn't connect to accessibility bus: Failed to connect to socket /tmp/dbus-ndBY5F7jbH: Connexion refusée (meld:20524): dconf-WARNING **: failed to commit changes to dconf: L'exécution du processus fils « dbus-launch » a échoué (Aucun fichier ou dossier de ce type) (meld:20524): dconf-WARNING **: failed to commit changes to dconf: L'exécution du processus fils « dbus-launch » a échoué (Aucun fichier ou dossier de ce type)
(Usual Frenglish gibberish of course...) so I tried to restart it with stderr redirected to
/dev/null
:$ meld . 2>/dev/null Trappe pour point d'arrêt et de trace $
...
SIGTRAP
? Seriously?Fortunately, it worked when I restarted it. Looks like it’s going to be one of those days...
-
RE: Discuss: Daylight Savings Time is stupid
where's the fun in only having one thread?
Well, if you really want multiple threads, maybe I can create another one in two weeks when the DST switchover occurs here…
-
RE: The Official Status Thread
An 11-deep call stack? That's nothing; in the managed world, when you take into account the unmanaged code underneath it, it's not uncommon to see call stacks 30, 40, even 50 calls deep!
That’s not the full call stack, that’s just the part in the vendor library and driver. And that’s for a quite simple operation (take a lock, put message on queue, release the lock). I don’t even want to imagine what it does for more advanced operations.
I have also found that the driver assigns a
int some_func(some_type* ptr, Uint32 timeout)
function to aint ()(void*, Uint32)
function pointer by first casting the function pointer to aUint32
and then casting it to the correct type. AFAIK, the conversion would have worked without any casts. -
RE: The Official Status Thread
Status: Trying to construct the call chain of one function used by our program to send a message to a DSP.
It goes like this:
- Our program calls
func1
infile1.c
in our abstraction layer, which calls func2
infile2.c
in the vendor library, which callsfunc3
infile3.c
in the vendor library, which callsioctl
which (after some functions calls in the C library I guess) results in a call tofunc4
infile4.c
in the vendor driver, which callsfunc5
infile5.c
in the vendor driver, which callsfunc6
infile6.c
in the vendor driver, which callsfunc7
infile7.c
in the vendor driver, which calls through a function pointerfunc8
infile8.c
in the vendor driver, which callsfunc9
infile8.c
(same file) in the vendor driver, which callsfunc10
infile9.c
which finally adds the message to the pending messages list.
And there is a latency problem somewhere in this call chain...
I also have briefly looked at the implementation of message reception. It looks like it uses a kernel task, a semaphore, and two arrays of function pointers for callback registration. There are probably twice more indirection levels.
I’m amazed that this thing actually mostly works. - Our program calls
-
RE: They say it's been phased out. I hope.
And leaves Word open, and hangs SQL Server if it can't find "Excel" until the MessageBox is dismissed. On the <i>server</i>.
Are you sure this code runs on the database server? Given the
<script>
tags in the output I’d assume the result is pasted into an HTML page and sent to a user’s browser for processing...EDIT: Hanzo’d
-
RE: Request :frystare: emoji
it turns
:(
into:frowning:
.And that at least is hardcoded into the Discourse code:
Also notice that this list has
:p
,:P
,:-P
but not:-p
, for some reason.
Filed under: non-potable water -
RE: Request :frystare: emoji
Which is great for all those out there who's systems don't have fonts that contain emoji characters
You’re Doing It Wrong™ -
RE: Request :frystare: emoji
Especially since emojis are Unicode characters and can be used directly in text...
-
RE: Atwood's Law
This one?
Looks like somebody needs to learn about JavaScript’s
eval
statement...
Filed under: but `eval` is EEEEEEVIL!!!!!1111!!!!oneone -
RE: The Official Status Thread
Status:
(“Unable to find or create the trash directory”)
-
RE: Snipping tool and window borders
it's always black in screenshots
I wonder if depends on the screen capture tool used... I triedxfce4-screenshooter
andscrot
. Maybe the KDE screen capture tool is more intelligent...it's always black in screenshots and nothing can go there; anything attempting to go from bottom right on the left screen ends up bottom left on the right screen
In my case, if I drag a window to the offscreen region, its contents are captured in the screenshot:
It even renders the drop shadow!Amusingly, dragging the window restores the garbage pixels behind it (regardless of whether “Display Compositing” is enabled or not)
-
RE: Discourse deliberately breaks FTP links, even ones manually made in HTML
But why does it look like a link?
The Discourse HTML sanitizer tends to REMOVE ALL THE THINGS it doesn’t like, so
<a href="ftp://something">
(either typed directly, or from the Markdown parser) is sanitized to<a href="">
which gets sanitized to<a>
.<a>
alone is deemed acceptable, so it stays as it is. -
RE: Quoted markdown lists don't render correctly. Why Does Discourse keep breaking stuff that used to work?
Reply:
"But the method I chose had a greater guarantee attached."Or: “I couldn’t find the
Reopen
button on your bug tracker”. -
RE: Quoted markdown lists don't render correctly. Why Does Discourse keep breaking stuff that used to work?
aaaaaand CLOSED-DUPLICATE
that didn't take long
Not sure if it’s a actual duplicate, though. @abarker’s bug was about full quoting, but the linked bug report seems to be about partial quoting...
-
RE: Snipping tool and window borders
Speaking of proper clipping on screenshots, my Linux work machine has a Z-shaped dual-monitor setup, and the Xfce screenshot tool doesn’t bother removing the parts of the screen buffer that aren’t actually visible on the screen, so it shows garbage:
(I have blurred some parts of the upper right garbage because is suspiciously looks like a window I had on my screen some time ago)
-
RE: Snipping tool and window borders
Maybe that’s an issue with Chrome’s custom border drawing code... Do other windows work normally ?
-
RE: <details> shim issues
The shim is only required for Firefox (WebKit-derived browsers support <details> natively), and is only applied on page load:
The best way to fix this would probably to remove the shim’s
load
event listener and instead calldetails_shim
every time Discourse adds a post to the DOM. -
RE: Discourse deliberately breaks FTP links, even ones manually made in HTML
URL protocols handlers have been source of security problems (I remember
telnet://
links launching arbitrary programs on OSX), so I understand why Discourse has a whitelist of allowed ones.
FTP could probably be whitelisted, though. Even though it’s TRWTF. :p -
RE: Cooldown WTF
On most other languages, using
+
with an object and an integer will raise an error (either because the language is strongly typed -- Python, or because+
is only used to add numbers, not concatenate strings -- PHP). -
RE: JSONx is Sexy LIESx
I noticed that on WTFirefox,
new Boolean(false).toString()
returns"false"
, just likefalse.toString()
.
So you can’t even differentiate them when logging to the console. Brillant! -
RE: Broken Poll: What database engine should I use?
Why is Discourse not an option? Clearly for a Discoursebot to store data the only solution enough is to (ab)use Discourse.
Filed Under: each new user gets a topic in a local Discourse etc.
Also Filed Under: mad ideas go into some topic...The obvious solution is to use an in-memory SQLite database, and after each write dump the whole database into the bot’s
Gender
profile field. When the bot starts up, just read the data back and there you go!
Filed under: This way you can use the bot on embedded systems without a filesystem -
RE: The Official Status Thread
Status: I really should lose this habit of pressing Ctrl-S in LibreOffice every time I make a trivial change. Especially since the file I’m editing is on a slow NFS server and doing so makes LibreOffice freeze for 5 seconds.
-
RE: Broken Poll: What database engine should I use?
Your own engine written in pure assembly that stores values on raw disk sectors
So, APDB?
-
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...
Status: So I eventually gave up trying to use this thing and rewrote the parts I needed from scratch. Doing this took me less time than the time I spent trying to get this framework to work.
Also, TRWTF is
ctypes
doing arrays bound checks, which makes accessing a C variable-length structure quite cumbersome...
Filed under: `ctypes.cast(self.items, ctypes.POINTER(Item))[index]` -
RE: The Official Status Thread
The Bourne Again Shell?
^Z
handling is not done bybash
but by the kernel’s TTY layer. -
RE: TIL (about the Dark Arts of HTML)
TIL that GNU Make automatically removes some “intermediate files” after building.
I also learned that it has some built-in intermediate rules which for instance allow the creation of file
a
from fileRCS/a.S,v
.
Filed under: At least there is an option (`-r`) to disable them, making the output of `make -d` a bit more readable -
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]$
-
RE: Geoplotting...
Looks like my work IP is misdetected; ip-to-location says “Rueil-malmaison, Ile-de-France, France” which is ~700km from where I am. Not sure why it doesn’t show up on the map...
-
RE: Use key to get itself
I wonder if
Ret_Integer
is usually equal toDropdowns_ID
... It looks like nothing would work if that wasn’t the case. -
502 Success
Presented without comment:
(yes, the HTTP response code was “502 Success”, too)
-
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: 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: Have to catch a bus but... this article
Don't think so.
You forgot
&sticky=true
at the end of this link.
Filed Under: Evil Ideas Thread , Why does Discourse says “Saving...” when I’m posting a reply? -
RE: Firefox Asinine Grinning Balloon Crap
I didn’t even notice this new icon before reading this thread. Granted, I use the classical menubar (how long will it last?), so I tend to ignore the top right corner of Firefox windows...
-
RE: The Official Status Thread
Status: Trying to define a
fnmatch(3)
pattern to filter file names#define NAME_PATTERN "????-??-??_??-??-??.??????_*.dat"
and thus learning about a never-used C feature called trigraphs...
Filed under: #define NAME_PATTERN "??~~??\_~~??.??????_*.dat" -
RE: Need some not-coding help
http://jsfiddle.net/nsjdmg7z/
I don’t know exactly why, but running this in Firefox (after removing the
-webkit-
prefixes) produces weird results. That may be because Firefox runs the animation at something like 2 FPS, though. -
RE: :fa_twitter: Tweed :fa_twitter:
Which then raises the question of why allow setting it between 0 and 100 in the first place?
Probably because the actual volume range depends on the sound card.
-
RE: "Hurr durr I'ma sheep" AKA Linux 4.0
When Linux 3.0 went out, it broke a number of kernel drivers which were checking versions numbers like this:
if (major < 2 || minor < 6) { /* kernel version < 2.6... or is it? */ }
I wonder what will break this time...
-
RE: Do not compare Strings
&^= is an operator in Go.
Surprisingly, according to
perlop(1)
, it’s not a valid operator in Perl.