« first day (982 days earlier)      last day (3957 days later) » 

12:33 AM
I hate when I get into a "all answers regarding <topic> sucks" and feel like actually taking time in writing a good answer
this time it has to do with std::weak_ptr, why can't people write appropriate answers!? WHY DO I HAVE TO DO IT!? I'm hungry.
 
user142019
1:22 AM
Speak.
 
FCUK YOU.
I've spoken.
 
BE NICE. while(7){ cout << "I'M NICE"; } . //is that correct C++ me not sure :\
 
user142019
Yes, sadly that's correct.
 
user142019
Sadly, because of the moronic implicit integer-to-Boolean conversion that makes no sense at all.
 
Is robot around? /cc @R.MartinhoFernandes
 
user142019
1:34 AM
He's not on the avatar list.
 
dammit
 
@Mysticial Sleeping, I believe.
 
Linux is somehow barfing shit when I try to convert L"\r\n" into UTF-16 and writing it to disk.
I'll try to follow it byte-by-byte.
 
notepad++ has a convert function
convert text between different systems
 
1:52 AM
@Mysticial Remember that Linux compilers make wchar_t 32-bit.
 
@CatPlusPlus I know. But I also know, but I'm not using any characters outside of ASCII.
 
user142019
Use char16_t! :>
 
And for some reason, an std::copy from std::wstring to std::u16string is scrambling up my newlines, L"\r\n".
 
Don't do that.
 
So far I can't repro it in a small program. So now I'm trying to insert debug prints into the program itself.
@CatPlusPlus Even when all the characters are guaranteed to be ASCII?
 
1:54 AM
Yes.
 
user142019
Heeeeeeeeeeeeeeeeeeeey sexy lady!
 
The best way to deal with Unicode is forget wchar_t or whatever other crappy inventions C++ has exist.
And then use ICU.
 
user142019
Haskell.
 
Wait, so even if all the characters are guaranteed to be lower-ASCII (< 127), this will not work?
wstring str = something...
u16string str16(str.begin(),str.end());
 
1:58 AM
Oh is that iterator trying to be smart?
 
Shouldn't even compile but :cplusplus:
 
@CatPlusPlus Compiles in both VS2012 and GCC.
 
@Mysticial Right.
Oh, even. Wait a tick.
@Mysticial Are you in binary mode?
 
I thought the iterator is just a character-by-character cast and then copy. Which is what I want.
@LucDanton When I write to the file?
 
2:01 AM
lemme check
 
You shouldn't be writing char16_t either. Use char for encoded binary blobs.
 
@CatPlusPlus I'm using wchar_t and wstring internally. But all text written to disk is UTF-16.
 
UTF-16 is encoded bytes, therefore char.
 
@Mysticial Tbh there's a lot that could be done wrong with such a setup.
 
Most of the cases, the characters are guaranteed ASCII (< 127), so I'm just using direct character casts in those cases. I haven't started tackling the unicode cases.
 
2:03 AM
What do you use for the file?
 
Just use ICU.
 
@LucDanton I'm checking right now.
@LucDanton fopen(path_a,"wb+");
 
Oh dear, C.
You're on your own.
 
lol
 
user142019
ITT: Mysticial doesn't know Unicode.
 
2:04 AM
Nah just kidding. What datatype do you write out?
 
It's just binary right? So it shouldn't mess with the encodings.
 
If you're writing char16_t with that then endianness will be wrong.
Well, might be wrong. Seriously, just use ICU.
 
Something like this: fwrite(m_str.c_str(),1,m_str.size() * sizeof(char16_t),filehandle)
 
@Mysticial What if you get file orientation wrong?
 
@CatPlusPlus They fuck with the endian?
 
2:05 AM
@Mysticial uh
 
@LucDanton All the stream orientations are wide.
 
What's m_str?
 
@LucDanton std::u16string m_str;
 
Also copying raw wchar_t into char16_t doesn't make it UTF-16. :cripes:
 
@CatPlusPlus I realize that, but I would've thought everything was one-to-one when it was all ASCII to begin with.
 
2:08 AM
Ye that looks right. If you isolated that in your small program and it doesn't reproduce it then I think it's fine(ish).
 
Yeah... I'm still looking into it right now. Its only breaking on the L"\r\n" line endings.
But only in the full program and not the SSCCE.
 
user142019
Maybe you have UB somewhere.
 
user142019
I'm so bored what can I do.
 
Shit takes forever to compile. lol
Since my Linux build-chain doesn't separate the program into modules.
 
C++ question! Is it at all possible to make it such that something like std::array or boost::array can deduce the size of an array at initialization?
Like how it's possible with int b[] = {1, 2, 3, 4}; // array with 4 elements
 
2:22 AM
No.
 
I figured as much.
 
make_array, maybe?
A factory function could help.
 
Yeah.
 
Traditional 'solution' is to define make_array.
 
=[
 
2:27 AM
So something like auto arr = make_array({1, 2, 3, 4}); or something?
 
I think Luc has me plonked
 
That just seems really hacky.
 
It does, but I think it's the only way to make it work.
 
user142019
template<typename... T>
std::array<T, sizeof...(T)> make_array(T... xs) {
    T arr[] = { xs... };
    return std::array<T, sizeof...(T)>(std::begin(arr), std::end(arr));
}
 
No, make_array(1, 2, 3, 4).
 
user142019
2:28 AM
:>
 
auto arr = make_array(1, 2, 3, 4);. That's better. I guess that's the best one can get
 
template<typename T, typename... Args>
std::array<T,sizeof...(Args) + 1> make_array(T&& t, Args&&... args) {
    return std::array<T, sizeof...(Args) + 1>{{t, args... }};
}
 
Decay<CommonType<Args...>> :v
 
Hopefully the compiler's optimizer can deal with that
 
@LucDanton Yeah.
Too verbose for chat.
 
user142019
2:30 AM
T[] make_array(T)(T[] xs...) {
    return xs.dup;
}
 
@LucDanton Decay or Unqualified?
 
Definitively Decay.
 
Lads
 
I guess.
 
Can't store T[N] or void().
 
user142019
2:31 AM
Time to get something to drink and then sleep.
 
:lol: My IM is taking 900MB of RAM.
 
So it looks like my conversion from wstring to u16string is fine. Now to check the file writing part.
 
I think it decodes every emoticon ahead of time and keeps it in memory.
Nobody ever accounts for my usage.
 
oh wth, now it doesn't repro at all. lol
the output file is correct
 
2:58 AM
It really seems like I fixed the bug some time ago and forgot about it. lol
 
Well done.
 
3:22 AM
I was looking at my output traces from an older binary.
And noticed the borked newlines.
I recompile today, and it works.
 
@Mysticial To quote the Bard, "much ado about nothing."
 
Lol.
 
3:37 AM
Question: Is dll injection the same thing as hooking?
 
@moonbeamer2234 DLL injection is a mechanism. Hooking is one of the things you can do that can use DLL injection to do its job.
 
@JerryCoffine know any good sources I wanna learn more :P
 
@moonbeamer2234 About hooking or DLL injection or both?
 
both
i just learned about dlls today and i was reading some stuff about stuxnet and it got me interested in hooking and dll injection(malicious or not, i don't care)
 
@moonbeamer2234 Might want to look at Jeffrey Richter's books, especially: amazon.com/Windows-via-Pro-Jeffrey-Richter/dp/B00B9ZFGRW/…
 
3:43 AM
aweomse Jerry Ill check it out
 
@moonbeamer2234 At least you're honest.
 
@etiennedeMartel Malware really fascinates me, not because I want to be illegal but just because of all the cool stuff it can do :X
 
@moonbeamer2234 You can't be illegal per se with malware. Doing illegal things with malware, on the other hand, is quite possible.
 
Malware is illegal by definition.
 
@CatPlusPlus distribution is, not creation
 
3:48 AM
@CatPlusPlus No.
 
@moonbeamer2234 Hmm...most malware is actually pretty lame. There's a lot more cool constructive stuff to do than destructive.
 
Barring overreaching laws which are not the norm in every jurisdiction.
 
@moonbeamer2234 Also, a lot of malware is really badly written.
 
> Malware, short for malicious software, is software used or programmed by attackers to disrupt computer operation, gather sensitive information, or gain access to private computer systems.
 
Yeah i would be sad if i got a kernel bug cause some dumb ass wrote a poorly developed kernel level virus and just messed up my computer. Steal my information, but don't kill my computer lol
 
3:49 AM
WIKIPEDIA QUOTES :frogsiren:
 
@JerryCoffin ive heard that before. like what?
 
A lot of Mods for games and other programs work through some of the same avenues as malware.
 
@moonbeamer2234 Like not writing malware?
 
I think developing hacks for games would be fun too, but that's kinda destructive too haha
 
It's fun for about 2 years tops.
 
3:51 AM
@CatPlusPlus So what?
 
thats pretty much just hooking though right?
 
@moonbeamer2234 Like making people's lives better. Virtually every time I use any commercial software, I end up frustrated because most of it has all sorts of useless crap, but does the basic job fairly poorly.
 
Not really.
 
@JerryCoffine AMEN.
 
Lol, commercial software not just doing useless crap.
It's a nice through.
 
3:53 AM
@LucDanton So I don't know what you mean. I sorta imply that undistributed malware is hard to classify as malware.
 
Some jurisdictions do have laws that make such software illegal to write or have much it can be illegal to carry thieves' tools on your person. I honestly don't think it's that common though.
 
Unless you have split personalities and steal from the other one I guess.
 
It's only illegal here if it takes banking information, IIRC anyway.
 
Bypassing security is probably illegal by itself.
 
3:54 AM
@CatPlusPlus Software X is written by person A. Person A commits crime with software X just as they intended to use it -- would you agree that software X is malware? Person B acquires software X lawfully. Did person B commit a crime?
 
@LucDanton So what's the definition of "thieves' tools" in these laws you allude to?
 
@LucDanton Most have laws against intentionally destroying people's data, or things on that order -- and whether you do it via malware, or breaking into their house and taking a hammer to their hard drive doesn't really matter (though, of course, breaking into their house is also usually illegal in itself).
 
Breaking and Entry and Breaking.
 
@Insilico I'm not sure honestly.
 
Whatever. Malware is malware because it's written to do illegal shit.
 
3:56 AM
@JerryCoffin Unfortunately laws tend to be literally decades behind the current state of the art. It's not at all consistent IMO.
 
Hey is there a way to get a list of functions from a dll if you don't know any of the info about it like the .def file? Or am i getting in to the realm of reverse engineering? e.e
 
Exports are part of the header.
 
@Insilico To clarify I wanted to refer to lockpicks. Had some trouble with the terms here.
 
Anyway. I'm liking Castle.Windsor.
 
3:58 AM
@Insilico That's sort of true. Worse, the "up to date" laws are often worse than the "out of date" ones.
 
@CatPlusPlus illegal isn't always bad
 
There's no part of malware that isn't bad.
 
@CatPlusPlus Wikipedia says rootkits can be used to bypass Microsoft activation, thereby crippling Internet explorer by one person at a time. Ill take anything I can get to hurt I.E
Rootkits are considered a part of malware :P
 
Malware research?
 
@CatPlusPlus Sure there is. I'm sure the PE headers inside the EXE aren't evil in particular. :-P
 
4:00 AM
@insilico whats a pe header
 
The Portable Executable (PE) format is a file format for executables, object code, DLLs, FON Font files, and others used in 32-bit and 64-bit versions of Windows operating systems. The term "portable" refers to the format's versatility in numerous environments of operating system software architecture. The PE format is a data structure that encapsulates the information necessary for the Windows OS loader to manage the wrapped executable code. This includes dynamic library references for linking, API export and import tables, resource management data and thread-local storage (TLS) data. O...
It's a bunch of bytes at the beginning of every EXE that the OS uses to load your program properly.
 
@moonbeamer2234 Makes perfect sense.
 
> In Poland according to Article 129/1 of the Criminal Code: possessing, producing or obtaining a lock pick by a person whose profession and occupation does not require it; [...] is punishable with arrest, freedom limitation or fine.
@CatPlusPlus I'm sending you a present!
 
@CatPlusPlus Hmm...Back Orifice is actually a pretty decent remote admin program -- but it's also been used as malware to take control of somebody's computer without their knowledge.
 
Ive considered writing malware that can Hijack a webcam and than I could watch people and sell porn.
than when somebodys like "I don't remember recording that" Ill be like...Of course you don't remember...shhh.
 
4:03 AM
@moonbeamer2234 So you're into people typing away at computers all day?
 
@moonbeamer2234 Instead of attacking IE, why not do some work on WebKit or FireFox (or whatever) to improve the alternatives. Attacking IE doesn't hurt IE -- it hurts the user who's too ignorant to install something else.
 
@moonbeamer2234 Quite honestly that would get you one of the most boring videos ever.
 
@Insilico I have a keyboard fetish OK. DONT JUDGE ME.
 
lol wdf. Im reading this article on Rootkits. Apparently there is a Security Ring -1.
 
4:08 AM
@CatPlusPlus It has everything but the kitchen sink.
 
I mean the sound effect.
 
Wtf the sound effect changes.
 
....I sometimes wonder what a computer is incapable of with the right mind behind it
 
4:32 AM
making you a meal for example, no matter how capable your computer is ...
 
maybe there will be a usb attatchment one day.
it has the capacity. it just hasn't been done yet
 
bluetooth controlled robot you mean ...
 
mind controlled robot*
there should be a device where you can plug your head into the computer and it reads your mind.
 
what prevents others from hacking into it then?
 
its not programmed in any known language.
 
4:39 AM
The Neural Impulse Actuator (NIA) is a brain–computer interface (BCI) device developed by OCZ Technology. BCI devices attempt to move away from the classic input devices like keyboard and mouse and instead read electrical activity from the head, preferably the EEG. The name Neural Impulse Actuator implies that the signals originate from some neuronal activity; however, what is actually captured is a mixture of muscle, skin and nerve activity including sympathetic and parasympathetic components that have to be summarized as biopotentials rather than pure neural signals. As of May 27, 2011,...
 
fuck. you win @JerryCoffin
 
@moonbeamer2234 Not about winning -- just seemed like something you'd find interesting.
 
That's almost as scary as HAARP
How does it work o.O
 
@moonbeamer2234 Senses the electrical impulses flowing through nerves (or something like that -- I'm aware of its existence, but not an expert in its internals).
 
4:43 AM
My mind cant even begin to fathom this.
 
There are other videos of enterprising people using such an interface in tandem with Lego.
 
how can an electronic pick up on the electric signals in our mind? aren't they incredibly weak?
 
Hence why they say focus really, REALLY hard.
 
@moonbeamer2234 Amplification?
 
@moonbeamer2234 Maybe yours. :smugdog:
 
4:49 AM
Lol.
 
@moonbeamer2234 Sensitive sensors, very low noise amplification.
 
@CatPlusPlus Ahahaha!
 
@ThePhD then your head explodes, one piece (0.6kg) travel NE at 30 degrees from the sky at 80KM per hour, one piece (0.8) travel South horizontally at 100 KM per hour. Hoiw fast and in which direction does the last piece travel?
 
@Telkitty猫咪咪 As fast as it needs to to hit you in your eye socket and cause your brain to explode. :D
 
chain reaction I see :p
 
4:52 AM
There was actually a car accident like that.
One guy didn't have his seatbelt on, and his head ricocheted around the car when they got into an accident.
He literally skull-bashed his two best friends to death.
I'm wondering why he didn't die too, though.
 
@ThePhD He was really stubborn (hard headed).
 
Not enough brain to cause any noticeable damage.
 
@ThePhD Beats those people who claimed that they tried to commit suicide when they swung into the incoming traffic, killing everyone in the other car but survived themselves.
 
@Telkitty猫咪咪 That's a horrible feeling to have for the rest of your life.
"You suck so much you can't kill yourself, and managed to kill a handful of other people."
 
I am not too sure those people sincerely tried to kill themselves though
 

« first day (982 days earlier)      last day (3957 days later) »