« first day (608 days earlier)      last day (4566 days later) » 

22:00
@JimNorton can't you solve it in reverse?
so you know at the time before the final position you need speed N
@JimNorton me too. Something I do (maybe you all cringe), is sharing data between several source files with a single library header into one executable. #if's and extern's all over the place.
and at the time before that M
and if you keep going like that you'll know the current speed you need
@CollinBiedenkapp what is other way?
Ok let's try. Copied libc++.
@awoodland Thanks. I will think on that approach
22:02
Hope this works. And otherwise it'll be a fucking full reinstallation.
@CheersandhthAlf What other way?
@CheersandhthAlf I confused myself I guess lol
@RadekSlupik no time machine to sooth the pain?
Got my fingers crossed for you @RadekSlupik
Yeaah baby! :D
@awoodland Nope.
Fuck I hope this isn't a debug build. xD
@RadekSlupik good luck!
22:04
@awoodland I have an external HDD but it sucks ass. It's a LaCie.
I want a WD.
If all else fails, ubuntu.com :P
@CollinBiedenkapp It works already. My system works.
@RadekSlupik great! What was the original issue?
@JimNorton decide a max speed, and program the slowdown part to slow at a rate that looks good. Then figure out how many degrees it goes from "max" to "stop" (at compile time). When you pick your endpoint, add the above number of degrees to be the "angle to stop spinning at max speed and start slowing down". Then spin the wheel at max speed until that point, then do the slowdown, and it will arrive at the prepicked destination.
@CollinBiedenkapp I tried to replace /usr/lib/libc++.1.dylib with a new version while running my system. Obviously the file was already in use so I couldn't overwrite it. I stopped the copy operation (it hanged at 2%) and the file was corrupted, preventing me from opening any application that uses that file (including sudo).
22:07
@MooingDuck yep... that's essentially what I've been doing.. I'm getting close...
@MooingDuck that's probably easier than what I suggested
ooh, I got the "caucus" badge again
Ooh. That's a pain. Sounds like a Windows issue lol. (Plz don't start a Win vs Mac war ppl)
I still don't get how some of the STack Overflow things work here yet.
@CollinBiedenkapp what like?
What is a cauucus badge?
22:08
@Quuxplusone I reinstalled libc++ and the new headers and now it works. :)
What is a caucus badge?
@CollinBiedenkapp You get it when you look at a moderator election.
@CollinBiedenkapp it's a fairly new badge that was added recently for voting in the moderator election. You get badges for doing good things
they show on your profile
ah, that makes sense.
I have a library question for everyone:
22:09
Yes, librarians are usually hot.
Hmm, my code compiles without error in clang and GCC, and ICEs MSVC10. What to do...
@ScarletAmaranth O.o
@MooingDuck is it a minimal test case? I bet they'd love more test cases
I need to create a secure socket system, and am I best using libcurl or boost, or what?
22:10
@CollinBiedenkapp what sort of sockets?
HTTP?
Raw. It will send an encrypted hashed password (salt, undecryptable), and sending messages for a chat client.
@CollinBiedenkapp curl won't be much use then I think. Boost asio is probably a reasonable choice
you can use SSL for the transport if you want too
I was going to say just use an SSL library to do your encryption/decryption
Hmm. I am just trying to avoid over complicating it. I wrote it already using <sys/sockets.h> sockets, is there any way I can avoid redoing it?
Yea
Just create the data, encrypt, send, receive, undecrypt?
Pretty much....
22:13
I think you're mixing hashing and encrypting possibly
Question: I don't suppose there's any way to have an "inheritance hierarchy" for C++11 enum types? In other words, I want

enum Base { a=1, b=2 }; enum Derived { a=1, b=2, c=3, d=4 };

but without all that repeated typing.
I would encrypt the payload of each packet.
I wouldn't re-write simple sockets stuff if it works and that's all you need
Right, only issue is there is a possibility of very large amount of people to be using it, and I don't want to leave myself open.
Let me ask this, if I am mixing up encrypting and hashing, what IS encrypting in this case?
interesting, the msdn page for visual studio 2012 predefined macros has Visual Studio 2010 samples, instead of 2012.
22:16
In cryptography, encryption is the process of transforming information (referred to as plaintext) using an algorithm (called a cipher) to make it unreadable to anyone except those possessing special knowledge, usually referred to as a key. The result of the process is encrypted information (in cryptography, referred to as ciphertext). The reverse process, i.e., to make the encrypted information readable again, is referred to as decryption (i.e., to make it unencrypted). In many contexts, the word encryption may also implicitly refer to the reverse process, decryption e.g. “software f...
hashing is the one-way bits, encrypting is an armoured van to take it from place to place
@Quuxplusone I don't think there's a trivial solution to that, even with enum class
@Quuxplusone I don't know if enum classes can handle that
@Quuxplusone union foo { Base b; Derived d; }.
I'm not sure if you can do foo = a though.
9
Q: base enum class inheritance

SashaIs there a pattern where I can inherit enum from another enum in C++?? something like that: enum eBase { one=1, two, three }; enum eDerived: public Base { four=4, five, six };

@awoodland that makes sense.
@JimNorton ok. Looks like I still got my work cut out for me, but maybe not as bad as I thought.
22:18
@RadekSlupik how does that prevent redeclaring values in Derived?
You can probably find a library that will do AES or DES for you.
@KillianDS Not.
Meh.
@JimNorton, probably. Is writing my own algo a good idea?
@JimNorton boost asio has ssl (and tls iirc) built in nowadays
@KillianDS I wouldn't know... I don't use boost.
22:19
@KillianDS I've read that boost adds HUGE memory overhead and can cause compiler errors...
@KillianDS I do not speak from experience however, so take that with a grain of salt.
@CollinBiedenkapp I would stick with the well known cryptographic schemes and find a some code that implements one of them.
@CollinBiedenkapp boost can increase compile times. It doesn't affect memory overhead, nor cause compiler errors unless you misuse it, just like any other C++ code.
@CollinBiedenkapp I wouldn't write from scratch ever personally - it'd have to be a serious overhead (if it exists in any meaningful way) before it trumps my time and in the case of crypto I'd trust a library far more than I trust myself
sbi
sbi
This guy, born without arms, holds the record of hitting a far target with a bow. I think that's quite impressive.
Is there a standard function for idling? I don't want my app to consume 100% of the CPU while doing nothing.
22:21
@RadekSlupik THAT I CAN ANSWER>
lol
sbi
sbi
@RadekSlupik I usually just drop to sleep.
@sbi exactly.
I used usleep(1000) at the end of a for(;;) for socket stuff in my server program.
  for (;;) {
    std::sleep(1000);
  }
@CollinBiedenkapp SImply don't do that, very smart people have spent years developing relatively safe algorithms. It is unlikely that you will create something equally good and safety through obscurity is a really bad idea in general.
are you a cpp coder?
22:21
however
@FrankComputer me?
@KillianDS yeah, very true. I will stick to the norms.
yes collin
@FrankComputer yes
@RadekSlupik can you not arrange to block on a system call and have the OS wake you when there's work to do?
sbi
sbi
@FrankComputer C++ programmers? Here? Are you mad?! You need to look into the Java room if you're searching for such.
2
e.g. select() or some lock on linux
22:22
@awoodland I assumed he was cross threading?
@CollinBiedenkapp ok then mutex/condvar
@RadekSlupik In C++11 condition variables are an option if you're waiting for another thread.
@awoodland There is never any work to do. I have Mongoose working on a separate thread and all I need to do is making sure that my app doesn't quit.
sbi
sbi
@RadekSlupik What OS are you on?
non-blocking sockets with a sleep function don't seem to use too much of my CPU.
22:23
@sbi Mac OS X.
@awoodland I love mutex
@sbi .. well Collin mentioned boost asio, so i asked
@RadekSlupik in that case I'd waitpid() or equivalent on Mongoose
Mongoose is embedded. It's not a separate process.
I'm not sure what's going on...
sbi
sbi
22:24
@RadekSlupik Oh. I dunno how OS X works, but on windows, you just drop into some GetNextMessage() function (whatever that's called) and you won't be assigned processing time unless there actually is a next message.
@RadekSlupik what wakes mongoose then?
for (;;) idle(); would be ideal.
@RadekSlupik Why does it run in a separate thread?
@RadekSlupik yes]
Why the hell am I getting 'wx-config command not found' when running a makefile that Premake made for me? I don't need wxwidgets!
22:24
Just join on the thread handle.
@RadekSlupik You want to avoid polling functions when using for(;;)
for (;;) asm("hlt"); gives illegal instruction. :P
@KillianDS that's what I did on my server
I had int serverquit = 0;
@CatPlusPlus That's how the library is designed.
hlt is not used in ring 3.
22:25
(public)
everytime the for loop goes through, it checks if serverquit == 1, it so, it finishes up and ends.
that's when pthread_join (MSVC: WaitForSingleObject) comes in.
That is not a condition variable :p
The server never quits, that's the point. I don't need to do anything but making sure that main() doesn't return.
if it's a thread you can call join() on it rather than waitpid which is better than idle/yield/sleep
I already said that. :.
Hmm, good point.
I'll see if there's a way to find out what thread Mongoose is running on.
22:26
@KillianDS true, I thought that's where you were going with it. I guess I don't full get what you mean by condition variable.
Writing portable networking code in С++ is a problem with a long history!
@FrankComputer oh boy, is it.
For condition variable, you'd have to modify the other thread's code.
And if you could do that, you could just plop it into main thread and not bother.
22:27
@KillianDS thanks
But in this case, just joining the thread is a much better solution
@FrankComputer nothing is stl. Everyone has their own. MSVC just adds WSA to things somethings. i.e.

linux:
int err = errno;
if(err == EWOULDBLOCK) {
}

Windows
int err = WSAGetLastError();
if(err = WSAEWOULDBLOCK) {
}
for (;;) { ::sleep(1000); } works fine. There is no way to find out which threads Mongoose starts, unfortunately.
@RadekSlupik sleep takes miliseconds on Max?
a friend recently fuzz-tested and found several vulnerabilities with boost asio
22:29
*Mac?
@FrankComputer do tell
Can someone tell me if this ideone.com/ZR4kK compiles/errors/ICEs in MSVC12?
I'll do it, han gon
@CollinBiedenkapp seconds.
@RadekSlupik Why are you using crappy libraries.
What is it, anyway?
> The sleep() function suspends execution of the calling thread until either seconds seconds have elapsed or a signal is delivered to the thread and its action is to invoke a signal-catching function or to terminate the thread or process.
22:30
@CatPlusPlus lightweight http server
Okay. Why are you embedding HTTP server, if you're not doing anything else?
@CatPlusPlus my code is supposed to be an expression template answer to a question, but it makes MSVC10 ICE for reasons I don't know
Use maybe just a regular HTTP server?
@CatPlusPlus I want to have a web interface to my application.
What is it written in?
22:31
C++
Why are you a crazy person.
@MooingDuck it compiles and runs.
@RadekSlupik You're writing a web interface in C++?
Wait, if you're not doing anything in the main thread, what does the application do?
@CollinBiedenkapp Yeah.
@RadekSlupik When did that change? When I used it it was a C library.
22:32
Well, the back-end.
The front-end is in HTML, Sass and CoffeeScript.
Code goes to ideone.
has IRC been dead for 15+ minutes or did I DC again?
Nobody said anything.
22:33
sorry, cliked wrong button
Why is my internet slow.
Argh.
@KillianDS It is still a C library, but that doesn't prevent me from using it in a C++ application.
@CollinBiedenkapp curses
@MooingDuck what is that for?
@RadekSlupik Ever consider using select()?
22:34
@JimNorton That's irrelevant. Mongoose handles it.
I just need to make sure main() doesn't return after calling mg_start() (which is non-blocking).
@CatPlusPlus.. internet is lagging cuz its friday evening, busiest time of the week!
oh ok :-)
Anyway, I'm out for a bit. If you mention me, I"ll hear it. Anyone have a skype?
gotcha
so my code refuses to compile in the compilers I have with debuggers, works fine in the compilers I don't have or without debuggers
22:36
@MooingDuck hmm.
What was the exact error before I go?
@CollinBiedenkapp Do you mean: What was the exact error before I went?
@RadekSlupik Can't you still send a generic option variable to start? You could sneak in a condition_variable to signal the main thread to quit when necessary.
*no, no, I am about to go, I was wanting to see if I could help before I left.
Just being silly..
:D
22:38
@KillianDS It never has to quit. :)
@RadekSlupik IT NEVER DIES
See everyone later
Cya Collin
Später
22:39
51 mins ago, by Mooing Duck
1>f:\code\utilities\exprtemplate\exprtemplate\main.cpp(47): fatal error C1001: An internal error has occurred in the compiler.
1>  (compiler file 'msc1.cpp', line 1420)
1>   To work around this problem, try simplifying or changing the program near the locations listed above.
1>  Please choose the Technical Support command on the Visual C++
1>   Help menu, or open the Technical Support help file for more information
so what does the code look like near line 1420?
@MooingDuck I find Linux's approach to installing new software way easier than Windows'. sudo apt-get install desired_package_name. But maybe that's just me.
@FrankComputer 1420? You should run, they're after you!
And it's nice that you RARELY have to reboot a Linux system after an update. Heck now you can even update parts of a running Kernel without having to reboot.
updating parts of a running kernel is dangerous, it could crash
@FrankComputer protip: msc1.cpp is microsoft's code, not mine. My only code is in main.cpp
22:47
@DomagojPandža x87 even has a fldpi instruction if I'm not mistaken.
@FrankComputer oh, but I'd determined that the code in question was something in the decltype of this class:
template<class lhs, class rhs_given>
class expression_multiply :private lhs {
    rhs_given rhs;
public:
    template<class T>
    auto operator()(const T& v) const
                -> decltype(std::declval<lhs>()(v)*std::declval<rhs_given>()(v))
        {return lhs::operator()(v)*rhs(v);}
};
@FrankComputer "updating parts of a running kernel" sounds like a war story told by a doctor. "I replaced his arm while they were shooting at us, it's a miracle we're still alive".
Not nearly as scary as you'd think. The Linux Kernel has extensions to support it. See en.wikipedia.org/wiki/Ksplice
Ksplice first freezes execution of a computer so it is the only program running.
22:52
@MooingDuck That's the joy of being bleeding edge!
Even so, part of the kernel must still be executing to allow Ksplice to do it's work?
@MooingDuck I'm not really a C++ developer, but that code snippet hurts my brain.
@Jim .. still risky business!
@FrankComputer Suppose so... but if you are for example running a hosting company and have guaranteed uptime then it can be worth it.
cld b unpredictable depending on what's running.. what if it takes a long time to install the update?
@FrankComputer kernel is only so big, and there's no contention to worry about, it'd be fast.
23:02
best practice is to schedule downtime for updates and maintenance
can you guarantee the update wont crash the system?
Ksplice seems to have a good record of reliability..
@Jim I'm a skeptic.. murphy's law is still alive and kicking!
Murphy was an optimist.
23:23
broadcast motd:: "Updates which will modify the kernel will now be installed!.. If your application freezes up, aborts or the system crashes you will know why it happened.."
Your resident pundit is going to bed. Have fun
did it say "cynic"?
TIL: Don't fuck with /usr/lib.
It's a waste of time
@sehe Don't waste your time!
Oh you already figured that out yourself.
23:27
...
…
Ah well, but I don't fuck with /usr/lib in bed ;)
Nor do I.
Fucking is a waste of time; it's unproductive.
Good. That would be a ginormous wast of time
but its fun :)
23:29
@RadekSlupik I can't agree with the latter part :)
Fun sucks.
Serious business > fun.
@sehe :P
My informatics teacher last year said that he hated fun.
eating, taking a dump and sleeping are also fun!
Kids are serious business...
Everything must be serious.
@FrankComputer Not at the same time…
Everything is serious, so we don't have to act like it is as well
23:30
This is about the twelfth attempt at Hexapoda.
Dodecapoda
just pulling your leg :)
In C++, this time. :P
Pentapoda?
If you pull a leg off, it's pentapoda.
which leg, the middle one?
@RadekSlupik dodeca = 12
I know.
23:32
@FrankComputer There are 2 middle ones on a hexapoda
@FrankComputer Bugs have two middle ones.
@RadekSlupik ideone.com/Clg3Y -- so mongoose... also using mongodb?
ticks are octopoda
@sehe Jup, but they are unrelated.
@RadekSlupik I know. I didn't see mongo in there so I asked
23:33
Mongoose is a web server, MongoDB is a DBMS.
@RadekSlupik A lot of people will cringe when you call mongodb a DBMS
It's a DBMS, just not an RDBMS.
And people who dislike RDBMS' because they are "unscalable" or "slow" are the ones I don't care about.
hierarchical?
I'm sure the devs will still avoid the acronym
I don't care. It's still a DBMS.
It's a system that manages a database.
23:35
Agreed. Look closely: "a lot of people will"... just saying
GTFO
mongo is nosql, document based storage. Just google it
The reason I use MongoDB for Hexapoda is because it's damn easy to store maps and arrays, both of which I need a lot.
Also tickets /are/ docs in most senses
23:37
@FrankComputer You store BSON (similar to JSON) objects (called documents) in MongoDB. There are no schemas and no columns. You can store whatever you want.
what about joomla?
@sehe have you used mongo?
@FrankComputer Joomla is a CMS, that's totally different and has nothing to do with DBMS'.
lol MongoDB != CMS
@TonyTheLion I have.
23:39
oh nice
well, I might need to use it someday, if I get confused, I'll find you :P
I develop Informix-based apps
I'm currently writing a bug tracker that uses MongoDB.
@TonyTheLion a tiny tiny bit. just for checking it out. I got sidetracked with more exciting stuff (javascript, especially compiling c++ into javascript and using it in the browser)
Fortunately, MongoDB has a nice C++ API, which I'll need.
I'm going to bed guys.
Be right back.
Hi.
23:46
@sehe woah C++ into Javascript, sounds a bit crazy
but yea
It would be cool to have a JavaScript back-end for LLVM.
That way, you can compile Ruby to JavaScript too, an C, and Objective-C, and C++, and whatnot. :P
@RadekSlupik That's what emscripten is
Oh. xD cool
Seriously cool
So we can now compile Ruby to JS! That's awesome.
23:50
@RadekSlupik compile C++ to JS?
@MooingDuck ask @sehe.
I want bacon.
19 mins ago, by sehe
@TonyTheLion a tiny tiny bit. just for checking it out. I got sidetracked with more exciting stuff (javascript, especially compiling c++ into javascript and using it in the browser)
I love bacon.
BACON
Wrap bacon in bacon.

« first day (608 days earlier)      last day (4566 days later) »