« first day (802 days earlier)      last day (4131 days later) » 

user142019
Ah VS Express 2012 for Web
 
basically that, but instead of just a function, im telling you i have a fxn and the only use of the parameter is for a switch statement
 
@ShotgunNinja "Fear, Uncertainty, & Doubt", but it's often used to describe "fucking untrue dbullshit"
@Zoidberg'-- there's VS2012 for Windows Desktop too.
 
somebody suggested removing the "default: break" statement because then gcc warns that not all values of enum are covered? does that make sense?
 
@JGord Thinking
 
6:02 PM
@ShotgunNinja l
 
@NolwennLeGuen take your time, i've been working on the problem for about 2 days =P
 
user142019
I hope uninstalling VC RC will actually uninstall everything it installed.
 
Stop using C if you want type system that makes sense
 
user142019
And not just the IDE.
 
@Zoidberg'-- ha... ha... ha
 
6:06 PM
@Zoidberg'-- Ahahah no
 
user142019
Well, in that case... FUCK THIS FUCKING PIECE OF JUNK I'LL REINSTALL WINDOWS ALREADY
 
@CatPlusPlus and then what would you recommend i use to program my AVR microcontroller?
 
@JGord Two solutions.
 
user142019
@JGord Haskell or at least C++.
 
@Zoidberg'-- Go find me a haskell compiler for an atTiny
@NolwennLeGuen K, listening
 
6:08 PM
You can wrap your enum into a struct to make typecheck more obvious (although you're just actually moving the problem, but mistakes will be harder to do. Still ugly).
Or you could use clang that does issue a warning.
 
user142019
GHC and write your own back-end.
 
@NolwennLeGuen Yeah I saw that.
@NolwennLeGuen What is clang?
Ive never even heard of that
 
Clang is a C and C++ compiler
 
A C compiler.
 
user142019
Clang is a C, C++ and Objective-C compiler.
 
6:09 PM
It will rock your world, unless you're on Windows.
 
user142019
It's one of the major implementations, along with GCC and Microsoft's crap.
 
user142019
And ICC, I think.
 
I can't use any of that with the AVR toolchain though...
 
@JGord I don't know, and don't really care
 
user142019
Why not.
 
Ell
6:10 PM
has anyone written c++/cli here before?
 
@Ell Only a little.
 
Why do you need C++/CLI
 
user142019
If you only want warnings, you can pass -fsyntax-only to clang.
 
uh oh. The @Cat is awake
 
Ell
@CatPlusPlus you can't inject a managed dll into a process, so I have to drop down to c++/cli to get an unmanaged dll (I think)
 
6:10 PM
@JGord Point is, C type system is horrible and there's no workaround other than massively defensive programming
 
@Zoidberg'-- oooh that's an interesting idea
 
@Ell C++/CLI is managed, too
That's why it has CLI in the name
 
@CatPlusPlus yeah im slowly forming that opinion as well
 
user142019
$ clang foo.c -fsyntax-only && avr-shit foo.c
 
If you want unmanaged DLL then maybe use I don't know, C++
 
6:11 PM
@Ell You have to either inject an unmanaged DLL or inject a CLR runtime and THEN your managed DLL.
 
Ell
@CatPlusPlus yeah, but the c++ part does the unmanaged bit, the rest is a managed interface to it
 
What
What are you doing
 
user142019
Or just use an editor that uses clang for real-time diagnostics, such as Sublime Text 2.
 
Ell
right okay so I made a mistake :P
 
user142019
Or maybe Vim.
 
6:12 PM
@JGord Use C++, compile with -fno-exceptions -fno-rtti and be done with it.
 
You need some runtime support for C++ if you're compiling for freestanding environment
 
Ell
I'll try again - so I need to make a c++ dll with a c interface as it's own separate dll?
 
It's not very hard, though
 
@Ell Yes. Or load up the CLR into the target process.
 
user142019
You need at least __cxa_pure_virtual if you use GCC or clang.
 
Ell
6:13 PM
@NolwennLeGuen then use SetWindowsHookEx from... c# (preferable) or c++/cli ?
 
@Ell Then use C#. Forget about C++/CLI
 
you're all ugly and incompetent
 
time to see what Steam has on offer this fine evening
 
Ell
@NolwennLeGuen Right okay. For some reason I thought I had to use c++/cli to interface the managed/unmanaged that I wrote, but I can just use pinvoke on my native c++ library with a c interface, can't I?
 
6:14 PM
@Ell That's the whole point of pinvoke
 
hmmm
Spec Ops: The Line
The Walking Dead
 
Ell
@NolwennLeGuen Right
 
user142019
You know.
 
user142019
I want three computers, one running OS X, one running Linux, one running Windows, with three monitors and a shared clipboard, one mouse pointer and one keyboard.
 
Ell
You can have that can't you?
 
Ell
Just use a windows host & install 2 vbox
 
user142019
Well, I have three computers and three monitors.
 
Dunno about shared clipboard
 
user142019
@CatPlusPlus looks good. I'll try that soon.
 
user142019
@CatPlusPlus I can write that tool myself.
 
Ell
6:17 PM
He says ;)
 
You can use hardware KVM too, but this seems more convenient
 
Ell
oh gawd this is really confusing me >.<
 
user142019
STUPID .NET I DON'T WANT TO REBOOT WINDOWS
 
@Zoidberg'-- The only 100% way to do that is use a mac and install Windows and Linux in a VM.
 
My character won't stop dying stupid forest
 
6:21 PM
@Zoidberg'-- How did you manage to type that?
 
user142019
@rubenvb I'd need a 12-core for that and 16 GB RAM at least.
 
@Zoidberg'-- 2GB per VM is more than enough.
 
user142019
@irrelephant Windows runs in VM.
 
Ell
@NolwennLeGuen does only the callback function of the SetWindowsHookEx call need to be in the dll?
 
user142019
So there are a thousand Microsoft SQL Server 2012 things installed. Is there a way to remove them all at once?
 
6:23 PM
@Ell It depends how you do your thing... You can put the entire callback in your dll or just a stub to forward the call to the managed world.
 
@Zoidberg'-- You need them or everything will mess up (especially debugging)
 
@Ell I'm still not entirely sure why you're not setting the hook from C#.
 
user142019
@rubenvb I want to remove everything and reinstall VS.
 
user142019
I am uninstalling the RC version.
 
oh
just uninstall them one by one.
 
Ell
6:24 PM
@NolwennLeGuen Because the function can't be a managed one?
 
no easy way out.
 
user142019
Okay. :P
 
@Ell What was it you were hooking again?
 
Ell
@NolwennLeGuen WH_CALLWNDPROCRET - but I'll tell you what I'm trying to do - when a particular window (I will provide a hWnd) receives a WM_PAINT message, then I want a c# function to be called like OnPaint(IntPtr hWnd)
 
user142019
What is Prerequisites for SSDT? Is it part of VS?
 
Ell
6:29 PM
I'll open a question proper
 
are all FP languages lazy-evaluation or are there strict ones?
 
@Ell Okay. What you can do then is register your hook in the C++ DLL. The C++ hook just calls a C# function that you passed from P/Invoke.
 
user142019
Erlang is strict.
 
user142019
I think Clojure is also strict.
 
At least that's how I would do it.
 
6:30 PM
ic
 
user142019
There is a dialect of Haskell that is strict.
 
user142019
CoffeeScript is partially FP and it's strict.
 
Ell
@NolwennLeGuen are you sure that works? SetWindowsHookEx takes a handle to a module containing the callback function - I can't pass it a handle to the c# module because that is unmanaged
 
user142019
Hurray I managed to uninstall everything!
 
@Zoidberg'-- I suppose strict vs lazy has big impact on what the programs look like...
 
6:31 PM
@Ell You create 2 functions in your DLL. One that is a hook (you register it in SetWindowsHookEx), and one that accepts as parameter a C# function. Your hook calls the C# function.
@Ell Send me your code I'll do it :) I'm bored
 
Ell
@NolwennLeGuen I don't have any code anymore :P Basically I was aiming for the managed interface of a class called WindowHooker which has a constructor taking an IntPtr, and an event called OnPaint
 
user142019
500 MB download. T_T
 
@Ell D: Use EasyHook then XD
 
Ell
@NolwennLeGuen EasyHook? :P
heh
 
Ell
6:39 PM
@NolwennLeGuen I shall attempt to figure that out :L
@NolwennLeGuen I'm stuck... I guess I have to use EasyHook.LocalHook.Create(something, my_hook, null)?
 
lol, EasyHook is in Unreal Engine 3>
 
user142019
Hurray VS is done installing!
 
6:55 PM
@Ell Yeah, where something is probably the target proc address ?
 
Ell
@NolwennLeGuen yeah, I don't know what the target proc address should be though
WndProc is a user defined function, iirc?
 
How about hooking GetMessage from User32?
 
Ell
or even some kind of paint thing
Maybe I'm going about this the wrong way
Maybe this won't even work. Duh this most likely won't even work. I'm retarded :3
I wanted this to update every time the game screen updated, save me having to run a tight loop of getting the screen of the game, interpreting it then doing something (I'm writing a bot)
 
The game uses DirectX?
 
Ell
I'm not sure. It's puzzle pirates :P it's written in java
I will try and find a way to get an associated graphics context of some kind
 
7:01 PM
Written in wot, mate?
 
Ell
java :3
 
.......
Just decompile the fucking game then!!
 
Ell
I have done
Dec 22 at 14:54, by Ell
41,878 errors... gawd this is not happening
 
lol @Ell, that sucks
 
I got 40k lines of errors once... ...when I ran g++ with -fno-implicit-templates
 
user142019
7:10 PM
Hurray my ASP.NET MVC 4 application works!
 
I'm sorry, @Zoidberg'--, I can't let you do that.
 
user142019
?
 
Talk about ASP.NET MVC 4 in a C++ chatroom :P
 
Hi guys
 
7:16 PM
is there a software that, if I scan a document, changes the text from the scanned file to... text?
 
user142019
@JosephPotts look for OCR software.
 
Oh yeah, thanks.
 
Yeah, OCR was the classic means of doing scan-to-text conversion.
 
I was trying to remember what they're called.
 
Optical character recognition, usually abbreviated to OCR, is the mechanical or electronic conversion of scanned images of handwritten, typewritten or printed text into machine-encoded text. It is widely used as a form of data entry from some sort of original paper data source, whether documents, sales receipts, mail, or any number of printed records. It is a common method of digitizing printed texts so that they can be electronically searched, stored more compactly, displayed on-line, and used in machine processes such as machine translation, text-to-speech and text mining. OCR is a field ...
 
user142019
7:18 PM
I am now using three OS's at once. xD
 
OSX, windows, Linux?
 
user142019
Yea.
 
That makes no sense.
 
You got a mac then?
 
user142019
I have two Macs both running OS X, and one runs Windows in a VM and the other one runs Arch Linux in a VM.
 
7:20 PM
That makes even less sense.
 
user142019
This week I'll write shared clipboard daemon which I fhandy.
 
Oh, himself doesnt make sense, griwes
 
None of you are making any sense.
 
Im sleepy as hell, been reading Mitnick autobiography till 2am
Wat
 
user142019
I'm liking C# so far.
 
7:23 PM
Even more wat
 
@Zoidberg'-- Oh finally you're talking sense.
 
user142019
Except
 
user142019
Ticket ticket = db.Tickets.Find(id);
 
Its nice in terms of shooting yourself in the leg
 
user142019
Didn't C# have something like auto?
 
7:24 PM
var
 
user142019
Ah yeah thanks.
 
user142019
Nice.
 
user142019
Now I like it even more!
 
user142019
lol
 
before the language dies? I guess.
They did just put out a new version, which adds a lot of stuff for event-driven processing and parallelization.
Indeed. I'm liking it; too bad I work with Java professionally... T~T
 
7:27 PM
@ScottW Why would it die?
 
@ScottW So? They've been notoriously difficult to kill off over the last 30 years.
Personally, I feel that C# was the one best thing that Microshit ever created.
 
I'd have to agree with that.
 
Ell
@ShotgunNinja yeah c# is great
 
C# is an amazing language and very parser-friendly.
It's got some weird quirk rules but it's probably the most powerful managed language there is.
 
Ell
shame people don't like vb.net
It's the .net library that is the real power
 
7:34 PM
@Ell But the syntax... Everytime I look at VB I wanna cry
 
@Ell That's not a shame at all. There's a name for people who like VB.NET -- DBA's.
 
Ell
haha why dba's?
 
Have you ever met a DBA that wasn't at least 30 years old, with experience in Visual Basic?
 
Ell
I've never met a DBA :P
 
If so, tell me where you live so I can move there.
 
7:36 PM
What's a DBA...?
 
Database Administrator.
 
Oh.
 
It's a job description of the chiefly-Windows era of the late 90's, when databases for in-house applications ruled the world.
My managers at two of my three software internships have been former DBAs with VB experience.
The other guy was a hand-me-down CEO at an industrial engineering company, who had no idea what he was doing with software development. I quit that job.
 
I've one out file and 3 in files. I need to append contents of 3 files into one
Can I use std::istream_iterator
and ostream_iterator ?
orback_inserter ?
 
If you're appending contents of files, can't you just write a shell script for that?
:P
 
7:48 PM
nope that would be simple. but I cannot :(
It will look awful If I run a character loop instead of using iterators
if its doable with iterators
 
For what purpose/application is this being done?
 
stitching splitted paragraphs
 
std::copy(std::istream_iterator(x), std::istream_iterator(), std::ostream_iterator(thingy)); should append from x to thingy.
 
okay So std::istream_iterator() will act as end position ?
 
Xeo
Yes
Default constructed stream iterators represent the end iterator.
 
7:53 PM
yes I understand now
Thanks I was searching for something.end()
 
Xeo
Depending on how you opened thingy I think.
 
yes x is opened with ios_base::in and thingy is opened with ios_base::out
But Its asking for template parameter
should I give <char> ?
 
Xeo
@NeelBasu I think you need ios::out | ios::app
 
@NeelBasu Yes, I think so.
 
Xeo
@NeelBasu Yea, you're only dealing with chars, the bytes not representing anything bigger.
 
7:59 PM
Hmm. but thingy is a new file. and I need it to be rewritten if program is ran on them again
 
Xeo
You could also use std::{i,o}streambuf_iterator<char>, which I like more for just dealing with the raw bytes.
@NeelBasu Oh, ok, then you want ios::out | ios::trunc to always truncate it :)
 
yes thanks
even std::istream_iterator<char> should work for binary files ?
If what I want isjust to copy ?
 
Xeo
I'd think so.
But still, I'd use the raw buffer iterators.
 
hmm
 
sbi
If anyone of you knows his way around std::bind and is after some easy rep, this is just for you.
 
8:03 PM
@sbi Can you post the complete failing sample?
 
@DeadMG According to his post, that's probably a no.
At least not on the SO question.
 
he has a complete non-failing sample?
 
sbi
@DeadMG No. This is hundreds of LoC, and I think I gave a good rendering of it. Boiling it down to a compiling 20 lines repro will likely be silly and evoke lots of comments saying so.
 
No, but he gave good reason in the thread for not posting the complete sample.
 
ok
 
sbi
8:05 PM
@ShotgunNinja Did I now? That must have been unconsciously, then.
 
"This actually works, but in reality there are way more functions and doing this as a tedious copy'n'paste effort insults my sense of dignity and produces smelly code." -sbi
@ScottW Microsoft.
 
sbi
@ShotgunNinja Ah, that. Well, this is just a list of functions, and that#s easy to boil down — you just cut it. But there's much more code involved in this.
For example, I'd have to post all those traits, and they really are a mess.
 
Xeo
    register_call<MAGIC_FOO>(&Y::foo    );
    register_call<MAGIC_BAZ>(&Y::bar, _1);
    register_call<MAGIC_FBZ>(&Y::baz, _1);
That seems wrong. :P (The tags, that is)
 
MAGIC_FOO
 
sbi
???
 
8:10 PM
MAGIC_POO, FTFY
 
right
for the server::register_call function template
what is the significance of the traits involved?
because I have no idea what the argument to that is actually supposed to be
I mean, you seem to act like funct_type can be virtually any function object of the appropriate signature ?
 
sbi
@DeadMG The traits is just a means to specify the function type for every call to register.
 
ok
so it's basically std::tr1::function<magically_deduce_signature>
 
sbi
@DeadMG Yep. All return int. Two take arguments (though not int and std::string), the rest take none.
 
ok
well
 
sbi
8:16 PM
The server stores the functions using type erasure. It is implemented atop a dreadful C RPC API. The server does all the cracking of the arguments (if any) and the creation of the proper results, using the traits. Outside it's all nice C++ functions, compile time-checked.
 
ok
well
the first thing I'm noticing is you have two bind calls, and I'm not sure what the second one is for
 
Xeo
The "problem" with nested std::binds is that they perform composition, this means your problem code in the question tries to call the result of std::bind( &Y::call_it, this, function) with a reference to x_, aka this->call_it(function)(x_).
I think, anyways.
 
you bind call_it with this and the function
 
Xeo
@DeadMG Also, this.
 
and then... the result produces int when you call it
but you are attempting to call the result of that with a reference to X?
call_it does not return a callable object.
 
sbi
8:18 PM
@Xeo There's no nesting in what you wrote, so I thought it would invoke this->call_it(function)?
 
Xeo
@sbi I only posted the nested part.
 
@sbi Whenever you have bind(bind(...), ...) that's nested.
 
Xeo
somewhere->register_call<MagicCode>( std::bind( std::bind( &Y::call_it
                                                         , this
                                                         , function )
                                              , std::ref(x_) );
 
sbi
@DeadMG "There's no nesting in what you wrote..."
@Xeo Looking at this now, I think I have that inside out. But really, do not worry about my bad code.
Just gmme teh rihgt codez!
 
look
 
Xeo
8:20 PM
@sbi Also: "tries to call the result of std::bind( &Y::call_it, this, function) with a reference to x_"
 
split up the expression and it's more obvious
 
Xeo
@sbi How could we if we don't understand what you actually want?
 
fobj returns an integer, and then you attempt to call this integer with an X&. That makes no sense.
 
sbi
@Xeo What I want is the server to invoke call_it() and call it to invoke x_.foo() or bar(), or whatever. Is that not clear?
 
right
right, right
I think you've just bound the arguments incorrectly
 
sbi
8:23 PM
@DeadMG Yeah, as I said, now it seems I did this inside out. I have, however, been banging my head against this since the evening two days ago, and tried numerous ways, All wrong, obviously.
 
if register_call is given &X::foo, then the first argument should be X.
but you have bound this as the first argument
 
sbi
@DeadMG Yes, of course, I did. Erm, did you say "just"?
Like so?
somewhere->register_call<MagicCode>(std::bind( &Y::call_it
                                             , this
                                             , std::bind( function
                                                        , std::ref(x_) ));
 
yes
 
sbi
Lemme try this...
 
I was just about to finish thinking through which arguments go where
 
user142019
8:26 PM
Are methods in C# virtual by default like in Java or must I explicitly mark them virtual? There is a virtual keyword but I'm confused.
 
@Zoidberg'-- I think they are non-virtual like C++.
 
@Zoidberg'-- Methods must be explicitly marked virtual to be virtual.
 
user142019
I see. Thanks.
 
You must also explicitly override abstract or virtual methods.
 
user142019
You must override virtual methods?
 
8:27 PM
no, they have to be explicitly marked as override, I believe.
 
Xeo
@sbi That seems correct. It will, in the end, call an_y.call_it(some_x_function).
@Zoidberg'-- public virtual override R foo(...)
IIRC
 
user142019
OOOOOOOOOOOOhhh :P
 
user142019
Thanks guys.
 
@sbi Yeah, that kind of game. Where their most glaring flaw is that you have to eat and sleep at one point.
 
lol @EtiennedeMartel
 
sbi
8:29 PM
Damn, I heard music from my laptop via the stereo, and you guys plinking me must have made the people on the street turn their heads. (And I live on the fourth floor!) Also, I need a new set of ears now, as mine seem to be unable to stop ringing.
 
Xeo
Just how loud do you have your sound set by default?
 
sbi
@Xeo Level 1 of 25.
 
Xeo
That's not Windows' master volume.
 
sbi
@Xeo It is.
 
Master volume @ 179%
 
Xeo
8:32 PM
Wat, that one goes up to 100. Must be your laptop software.
 
Well, with Linux...
 
sbi
how did the new bind expression go?
 
sbi
@DeadMG Failed. Analyzing the error.
@Xeo What does this matter? Yes, it's some overlay my laptop imposes when I use the keyboard keys. But it has 25 steps, and I usually have it at the first. That's <5%, obviously.
Um. When I split the expression into several ones, those compile. If I throw it into one statement, it spits an error message at me.
 
show?
 
sbi
Again: I cannot just paste the code. I need to prep it first. And for that I need to have a few lines that do not immediately make you ask for more code.
 
8:42 PM
sorry
 
Wait what the hell is with the flags?
 
sbi
Damn! Wasn't there something here the other day about how the result std::bind misses the result_type typedefs it needs?
@Insilico Some idiot. As soon as everybody here (but me) has voted against them, they#ll be gone.
 
@sbi I think that std::bind's result expression should have the relevant typedefs.
 
Xeo
Who the fuck is that.
@DeadMG You'd think so, but this is C++ we're talking about after all.
 
nested bind simply would never work otherwise, and bind has to know it's result types in order to be callable.
 
sbi
8:45 PM
@Xeo That will likely be the guy that @TimPost earlier dealt with, coming here under a new user name.
 
@sbi I'll be on the lookout for them then.
 
Xeo
@DeadMG Maybe nested bind did not work for TR1?
 
it did.
 
sbi
@DeadMG I'd expect that, too, but didn't we have some discussion here the other day where the someone tried to tell me this wouldn't work in C++03, because it lacks traits?
 
@sbi It wouldn't happened to be DiscreteGenius, no? I happened to see there's a new entry in the Ministry of Shame.
 
8:46 PM
decltype and no
that is where C++03 has to do this typedef malarky
because no decltype
 
sbi
@Insilico I don't think anybody bothered to enter that guy on some shitlist. He came in this morning, dumped an off-topic question, and when being called out on it, replied with "fuck you". And he did the same in other rooms. We had him flagged and locked out pretty soon, and when he came back with a sockpuppet we called the mods, and Tim sorted it out. It can be really anyone on the list of users in the room who isn't a known regular.
 
@sbi Eh. Sounds like business as usual.
 
sbi
@DeadMG Ah, ISTR now. The problem was that I have to provide the correct typedefs when passing in my own stuff, right?
 
yes
you have to tell bind the return type, either through the appropriate typedef or explicit template parameter
 
sbi
I am still puzzled. This compiles just fine:
function<bool()> f1 = bind(&X::foo, ref(x_));
function<int()> f2 = bind( &Y::call_it, this, f1 );
server->register_call<MAGIC_FOO>(f2);
This fails:
function<int()> f3 = bind( &Y::call_it
                         , this
                         , bind(&X::foo, ref(x_)) );
server->register_call<MAGIC_FOO>(f3);
no match for call to '(_Mem_fn<int (Y::*)(function<int ()()>)>) (Y*&, bool)'
note: candidates are: _Res _Mem_fn<_Res (_Class::*)(_T1)>::operator()(_Class&, _T1) const [with _Res = int, _Class = Y, _T1 = function<int ()()>]
note:                 _Res _Mem_fn<_Res (_Class::*)(_T1)>::operator()(_Class*, _T1) const [with _Res = int, _Class = Y, _T1 = function<int ()()>]
 
Ell
8:55 PM
this is just hilarious: youtube.com/watch?v=XtQTwy-ykvs
 
int()() again? that's strange.
 
sbi
@DeadMG I did some experimenting today, to better understand the error messages, and I think T()() is just the alternative to T(CLass::*)() for free functions. ICBWT.
 
also
bind should not require any typedefs or explicit return type communication when dealing with member function pointers
 
user142019
I'm going to write Hexapoda in C#. I love it.
 
Ell
@Zoidberg'-- woo the rise of c#
 
8:59 PM
@sbi Any more error messages?
 
ehehehe, my insidious plan is working.
 
user142019
What insidious plan?
 

« first day (802 days earlier)      last day (4131 days later) »