@danixdefcon5 Huh. TIL.
(for reference)
Best posts made by Medinoc
-
RE: Marginal Lusers
@Zecc What did you change between the two screenshots? Did you click something, change an option, or simply scroll?
-
RE: WTF Bites
@loopback0 said in WTF Bites:
Or if it's a folder:
mklink /d C:\Name\Of\Link C:\Path\To\Thing\Being\Linked
Isn't
mklink /J
better for directories? -
RE: WTF Bites
@ben_lubar OK. Does the other part of my comment (as in being obtained in batches rather than on-demand) remain valid though?
-
RE: Azure bites
@Unperverted-Vixen Could be... Does VS Community require logging in?
-
RE: Epic Store (and other "Occupy Steam" movements)
@loopback0 said in Epic Store (and other "Occupy Steam" movements):
On PC everyone complains there are too many options. On mobile too few. So we need to legally mandate precisely the right amount of competing stores.
Reminds me of Microsoft mandating that manufacturers of x86-based PC set UEFI to allow installing other OSes, and manufacturers of ARM-based devices to disallow it. To me it really sounded like "we allow installing other OSes on PC because we're forced to, we disallow it on ARM stuff because (due to not being a monopoly there) we can get away with it"
-
RE: WTF Spam!
What kind of person would ever want to "need protection"?
...oh. -
RE: Abode unCreative Suite (includes hoodie!)
Did the installer delete itself after use?
-
RE: A Telltale Meltdown
An article I've seen mentioned poor sales of GotG and Batman as main causes of Telltale's troubles. I haven't seen anything of Batman, but what I've seen of GotG (which I found graphically ugly and its French-language subs were poorly translated) leaves me unsurprised at its fate.
-
RE: A pet project game. Pen and paper themed twist on snakes and ladders, kind of.
@xaade said in A pet project game. Pen and paper themed twist on snakes and ladders, kind of.:
@medinoc said in A pet project game. Pen and paper themed twist on snakes and ladders, kind of.:
GM it paranoia-style
Frack, you led me to TV-tropes. I'll never figure out what this is and I'm already 24 links in.
I was talking about the RPG Paranoia, which is mainly for getting your characters to die in hilarious ways (which is why everybody starts with six "lives").
-
RE: Git git git git git git git git heroku git git heroku git git git git git
The next git thread should be named "I'm gonna git you sucka".
-
RE: How to exploit a developer (article)
I have the same problem with the "thumbs up" in Not Always Right. At least FSTDT has its own labels "WTF" and "Meh" for the votes.
-
RE: Thedailywtf.com WTFs
Actually I like how the threaded replies work. That way, it shows both the logical and chronological orders.
I agree wholeheartedly on the subject of infinite pages, however.
-
RE: A pet project game. Pen and paper themed twist on snakes and ladders, kind of.
What do you mean by
padded feat
?Also, gameplay-wise: 1/6 chance of auto-critfail will make players hate you unless you're planning to GM it paranoia-style. Better make it a regular auto-fail, and/or require a "confirmation" roll to make it critical.
-
RE: Windows 9 (And Pandora) appreciation thread
Except the "original meaning" is a mistranslation.
-
RE: CCG for total n00b
For the sake of your son's piggy bank (and your wallet), you should avoid "real" CCGs and use a card game with fixed "sets" instead (Netrunner and Game of Thrones are such games, but I don't know if there's any such game that fits the criterion "can be played with my 6yo").
-
RE: Temporary paths
Furthermore, the documented semantics of tmpfile() in the MSVCRT are useless -- it creates the file in the root directory, which clearly is not the place to do temporary business!
Wow, that... both hilariously and infuriatingly stupid. And I checked in the CRT source from VS2010, what the documentation says is true: It does create the file in the root directory (of the current drive, apparently). The only difference between
tmpfile
andtmpfile_s
, beside the way they return errors, is that the former creates the file with full sharing rights (allowing another process to open it), while the latter opens it exclusively. -
RE: This systemd thing is really out of hand.
What do you mean by "NFP" here?
-
RE: Windows has security holes too ("single bit" exploit)
Saying "a single bit of Kernel memory" would have been more accurate.
Still, that doesn't make it much easier to turn this into an actual attack. I don't understand how they go from "we can now misreport the size of a heap-allocated structure by one 16-byte block" to "arbitrary code execution".
-
RE: Windows has security holes too ("single bit" exploit)
You're right I guess.
I just have no idea how a heap buffer overflow can cause ACE (unlike stack buffer overflows which I understand without problem).Edit: Ah, just thought of something, such as messing with the next object's vtable pointer.
-
RE: Firefox Asinine Grinning Balloon Crap
And they also changed how the search bar works, and made it fucking retarted as shit.
This can be disabled in about:config, setting "browser.search.showOneOffButtons".
Which is good for us computer-savvy people, but Granny will... no wait, Granny just googles Google in the address bar anyway.
-
RE: User-Agent based on URL path
Given the "smooth" in both names, I'd guess Samsung uses a specific piece of code to download and process
.ism
files; a piece of code that comes with its own agent (or at least its own download routine with an hard-coded agent string). -
RE: Am I the only one who knows what "strongly-typed" even means anymore???
How about the classic
'4' - '0' = 4
?Edit: In fact thinking of it, arithmetic operations between char and int should be the same as between int and pointer: You can subtract two chars and get and int as result, add/subtract an int to a char, but not add two chars together.
Edit2: Whoops, it appears @flabdablet said it all before me.
-
RE: Am I the only one who knows what "strongly-typed" even means anymore???
From what I've read somewhere (probably some documentation of
strxfrm()
), locale-based comparisons actually transform the string first. Such as a comparison of"Møøse"
to"moose"
would actually compare something like"moose#Ulllll#_//__"
to something like"moose#lllll#_____"
. Case-insensitive, accent-insensitive comparisons would then ignore the rest.Edit: Of course, the actual result is something much more arcane. Here is the result of my test on Windows: I called
wcsxfrm()
with the locales"French"
and"English"
on the three strings"Møøse"
,"moose"
and"MOOSE"
, and wrote them on separate lines in a UTF-16 text file. The result is a mess of control characters, looking like this in hex:FF FE 0E 00 51 00 0E 00 7C 00 0E 00 7C 00 0E 00 91 00 0E 00 21 00 01 00 02 00 02 00 21 00 21 00 01 00 12 00 01 00 01 00 0D 00 0A 00 0E 00 51 00 0E 00 7C 00 0E 00 7C 00 0E 00 91 00 0E 00 21 00 01 00 01 00 01 00 01 00 0D 00 0A 00 0E 00 51 00 0E 00 7C 00 0E 00 7C 00 0E 00 91 00 0E 00 21 00 01 00 01 00 12 00 12 00 12 00 12 00 12 00 01 00 01 00 0D 00 0A 00
There isn't any character left untransformed!
Note that in the default locale (
"C"
), the strings are not transformed at all. -
RE: What the fork, Java?
Enough with this one, it's more correct than the logical fallacy name anyways.
-
RE: Why my friend had to retake his C++ course with a different professor
I think Cygwin devs did this for two reasons:
- Assuming most people working with Cygwin will work on
UNIX-line-terminated files anyway (stuff from *n?x servers, FTP etc.) - Application Compatibility, the same thing that attaches anchors to
Microsoft. Since POSIX makes little to no difference between opening
in binary or text mode, I bet a lot of *n?x programs (i.e., the kind
of programs Cygwin is supposed to make work) get it wrong; therefore,
Cygwin needed to be bug-compatible and mimics the *n?x behavior for
this reason.
ETA: Remember, in Windows
open()
is not a system call. It's not even a Win32 API function. The system call isNtCreateFile()
, the Win32 API function isCreateFile()
; andfopen()
and_open()
are actually part of Microsoft Visual C++'s C Run-Time Library (alias MSVCRT.DLL in good ol' Visual 6), and so is the text/binary distinction in Windows:CreateFile()
doesn't know, or care, what text mode is: It's purely a C concept, so it's implemented in the CRT. Cygwin probably uses CreateFile() directly, or always calls the CRT functions in binary mode.Edit2: It's quite funny that the platform for which text/binary mode is an OS-level concept makes no difference between modes, while the platform for which the difference is relevant doesn't implement it at OS level.
- Assuming most people working with Cygwin will work on
-
RE: Why my friend had to retake his C++ course with a different professor
Oh yeah, especially strlen().
Yes, in fact.strlen()
is not actually for determining the number of glyphs that will be drawn on the screen when you output the string. It's for determining how manychar
s (not counting the terminating null character) a string contains, and how big a buffer must be to hold it.That's why people call strlen() : to know how many
char
s they are working with. This as no bearing on how many symbols are drawn, not only because of multi-byte code points, but also because of combining characters (diacritics etc.). Oh, and control characters too (CR screws up the count anyway, BEL usually doesn't output any glyph, etc.)Which means, strlen() still works just fine with UTF-8.
-
RE: Process exit on Windows and Linux
@dcon said:
SysInternals Process Explorer shows a tree of processes, so it would appear that it is possible to know the children a process has spawned.
Yes, it does this by reading the process creation metadata, which I have been told is not used for anything other than being meta. Unfortunately I am having a hard time finding the source of this info, I don't remember what I was searching for at the time that led me to this possibly not true statement.
Yeah, and the main problem with this is that in Windows, processes can be orphaned, because unlike unixoid systems, the existence of a child process doesn't prevent the termination of a process, not even the destruction of a process object.
This is, of course, a blessing, because otherwise it would be impossible for a program to explicitly wait for its parent to terminate (as is required for, say, an automatic update mechanic).
-
RE: Latest StackOverfart Brainflow: Attribute all the things
Uhmm, reading more into the subject, attribution is already required by the current license (cc-by-sa).
Apparently it's listed under "changes" because it's a change to the previous proposal, which recommended removing that clause.
-
RE: The Official Funny Stuff Thread™
@PleegWat I know it's old, but I've finally watched this vid.
Also, this ensured I'll never try Go if at all can be avoided. -
RE: Ways to troll speedrunners
@pie_flavor said in Ways to troll speedrunners:
Make a special 'speedrunner mode' which removes cutscenes and some of the annoying animations. Unbeknownst to anyone, bump up the difficulty but in a way that is not easily realized.
In some ways, it's pretty much what the ALTTP randomizer does. Except for the "unbeknownst" part.
-
RE: The abhorrent 🔥 rites of C
As opposed to a line for a { to open a scope, a line for a } to close the scope
Now you're just arguing in bad faith, you need two of each when you use try/finally! -
RE: The abhorrent 🔥 rites of C
You can't use RAII when you need a variable of an abstract/partial class.
@powerlord said:Say I have a class named BuiltinVoteStyle_Base that has 9 methods defined in its header file, but only implements 4 of those methods in its .cpp file. The other 5 are declared as
virtual
.I then have 3 classes that extend that class that each implement the 5 missing methods.
You can't declare
BuiltinVoteStyle_Base voteStyle;
because that's a compiler error. You must declare it as some sort of pointer and set it to an instance of the correct class at runtime.
But you can use an
unique_ptr<BuiltinVoteStyle_Base>
. -
RE: The abhorrent 🔥 rites of C
Function call is two operations.
- Store return value
- Branch conditionally, condition being "always"
Function return, again, is two operations
- Retrieve return value
- Branch conditionally, condition "always"
Admittedly, certain instruction sets roll these up into single dedicated instructions, but guess what's happening at the silicon level?
In fact, at the opcode level, an ordinary unconditional branch is a conditional branch with "always" as condition on at least one platform: The 68k. The fun part is that on this platform, the opcode for a "branch to subroutine" is the one for an unconditional branch with "never" as condition: As that wouldn't make sense, they reused the opcode for something that does.
-
RE: The abhorrent 🔥 rites of C
Ah, forgot
volatile
? Had the same problem too back as a student, trying to busy-wait on a variable assigned in an interrupt handler. -
RE: PSA: don't use TI-nspire calculators for encryption
@tsaukpaetra are you sure the
int()
is necessary? As I remember it,rand(8)
already produces an integer...
Edit: I just tested, in fact not only doesrand(8)
already produce an integer, it's an actual integer rather than a float with an integral value (which is whatint()
returns, hence the dot in the output) -
RE: PSA: don't use TI-nspire calculators for encryption
This was done after a reboot each time?
-
RE: Lets ensure this global variable gets deleted
@Bulb said:
Now that the byte settled on 8 bits, C99 added thestdint.h so you can use the fixed sizes when you need. But most code still does not, because most code still does not want that, but usually still wants "platform default integer".
Great, and if they have an overflow because they just assumed an int was 16-bit and on that platform it's 8-bit, it's their own goddamn fault.
Except the standard demands that
int
s be able to contain at least all the values from -32767 to +32767, which implies they must always have at least 16 bits.
(the standard does not demand -32768 because it does not mandate 2's complement)However, assuming an
int
can contain 1,000,000 just because one used to code on a 32-bit platform can and has bit people in the rear. -
RE: Lets ensure this global variable gets deleted
(note: I removed my previous post because I didn't read your last paragraph right and it turns out my previous post is content-free)
@Medinoc said:
machines where the smallest addressable unit is a 16-bit word.
which I am claiming don't exist -
RE: After reading some UX stuff on Medium
@blek I notice the image on @dkf's post has a "simple" tab, which I guess would contain none of this "expert" clusterfuck. Sounds like good enough UI for me: One way to get the normal shit done, one way to access "everything the software can do"...
-
RE: Juniors on side projects say the darndest things...
@CarrieVS said in Juniors on side projects say the darndest things...:
@Groaner said in Juniors on side projects say the darndest things...:
I mean, I have this method that takes 33 parameters..."
I have a coworker who likes to take a class that's nothing but a holder for a couple of dozen pieces of data and give it a constructor that takes every single one of those fields. Then he writes code calling it and when I have to work with that code I waste hours deciphering which of the ten different parameters with the same datatype is which.
Then we need to include another piece of data in this object and he updates the constructor to include it, and everything he's written breaks.
Yes, I know it takes a bit more typing and quite a few more lines to call object.setFoo(); object.setBar(); object.setWhatjamacallit() a couple of dozen times, but I promise you'll like it if you try.
Which is why I love C# 3.0 and above, this is one of the features I miss the most when I go back to my old .Net 2.0 project on Visual 2005.
-
RE: Completely Undocumented DOM Class: dispHTMLElementCollection
@anotherusername said in Completely Undocumented DOM Class: dispHTMLElementCollection:
@Medinoc said in Completely Undocumented DOM Class: dispHTMLElementCollection:
normally,
obj instanceof SomeInterface
returnstrue
for any class that implements itIsn't that basically what I said? But it requires the class to be named
SomeInterface
, otherwise the result will befalse
.In this case, it's not the library that's broken, it's the entire language. I can't think, or even imagine, any other language that would have this ridiculous requirement (and how is it even possible to give the same name to an interface and a class?)
ETA: And it would also prevent a class from implementing several interfaces. -
RE: Symantec email exploit bites Symantec
@anotherusername said in Symantec email exploit bites Symantec:
@anonymous234 said in Symantec email exploit bites Symantec:
@Maciejasjmj said in Symantec email exploit bites Symantec:
UAC is generally bypassable via Task Scheduler shenanigans
Really? That would be a major Windows vulnerability.
I'm probably not the first one to say this, but this requires to be running with administrative permissions in the first place...
-
RE: Symantec email exploit bites Symantec
@blakeyrat said in Symantec email exploit bites Symantec:
@Medinoc said in Symantec email exploit bites Symantec:
I'm probably not the first one to say this, but this requires to be running with administrative permissions in the first place...
Well duh but the point of it is it doesn't require elevation.
But setting it up does, so it's not in and of itself a security flaw.
It's just the equivalent of making a programsetuid root
on Unix systems: it's only unsafe is the program is (which it automatically is if it wasn't designed specifically forsetuid root
in the first place). -
RE: How not to copy a zero
This reminds me a lot of Raymond Chen's article on someone trying to pass a LPDWORD to a function: There's more to calling a function than just getting the types to match
-
RE: Pressure to upgrade to Windows 10 ratchets up. AGAIN.
@LB_ said in Pressure to upgrade to Windows 10 ratchets up. AGAIN.:
@Medinoc Did you reply to the wrong person? Sounds like you meant to reply to the conversation about Edge prompting where to save downloads, which I was not a part of.
The first paragraph of my post was for you. I should probably have made two separate posts.
-
RE: Pressure to upgrade to Windows 10 ratchets up. AGAIN.
@FrostCat said in Pressure to upgrade to Windows 10 ratchets up. AGAIN.:
Funny you should mention that
This is what I meant by "checkbox that's not actually there in the 'regular' version of Edge". The page I found had a similar screenshot, but when I looked into Edge's advanced settings on my machine, this checkbox (for lack of a better word) was nowhere to be found. Thankfully, the registry key works anyway.