« first day (804 days earlier)      last day (4143 days later) » 

3:00 PM
@GamErix it's also binary xor
 
user1182183
@DeadMG ahw.
 
user1182183
@BartekBanachewicz :P
 
Well, @Ell, I'll carry the torch.
 
@GamErix I didn't doubt it. All the noise...
 
@Ell Only female I remember named Elliot is from Scrubs..
 
user1182183
3:01 PM
@sehe but ok tell me how you would store a 1k digit number and for example perform a division on it? :P
 
@sehe I think you were just hurt by the hot steam
 
@GamErix Make your own BigInteger class, like I did.
Or you can use the one from GMP, which I can't get to work at all.
 
user1182183
@Rapptz I don't like reinventing the wheel
 
@GamErix libgmp
 
@GamErix Then don't use C++...
 
3:02 PM
reinventing the wheel is a fun learning experience
:(
 
user1182183
@ShotgunNinja C++ is not about reinventing the wheel ; o
 
user1182183
@Rapptz I said I don't like it but I didn't say I don't do it :P
 
@GamErix actually arithmetic on an arbitrary data size is quite easy
 
Division with big ints is hard anyway
 
@Rapptz division is always hard
 
user1182183
3:04 PM
@Rapptz ever did square root on paper? (without calc)
 
yes sqrt(4) = 2
 
I used to know how to do square root on paper... it's been so long, though.
 
user1182183
@Rapptz I mean sqrt from exampl 1337
 
user1182183
without calc :P
 
user1182183
@ShotgunNinja kinda fun how it works, right? :P can't get the logic though
 
3:05 PM
@GamErix Yes.
 
Now I just do a version of the Newton-Rhapson method: Guess a number, square it, increase or decrease as needed.
 
user1182183
@Rapptz then tell me again how hard division is if you did sqrt xD
 
because it's different
I didn't implement sqrt() either because it's hard
 
@Rapptz it's easy as fuck
 
How are you keeping your digits?
 
user1182183
3:06 PM
@BartekBanachewicz for one it's easy, for one it's hard, and the third doesn't caree
 
I believe we are talking bisection not the inverse carmack method right?
 
user1182183
@BartekBanachewicz there are two sqrt methods? ;o
 
@GamErix I believe there are a lot more than just a two
 
there are a lot of ways of finding sqrt()
but I was talking about for arbitrarily large numbers
not on paper
 
user1182183
@BartekBanachewicz the one i find that people do always iwthout a calculator is the one which you do a division like notation :F
 
3:08 PM
@GamErix wat?
 
user1182183
@Rapptz if you can do it on paper you can do it in c++ xD
 
Is it some sort of cryptic bisection?
 
user1182183
@BartekBanachewicz the method on wikipedia, lemme look it up
 
@Rapptz integers or floating point? because both can be "arbitrarily large"
 
3:09 PM
@BartekBanachewicz integers
talking like thousands of digits
 
@Rapptz what if the sqrt(n) isn't an integer?
 
user1182183
@ShotgunNinja yes that method
 
@BartekBanachewicz floored, just like integer division.
 
user1182183
@BartekBanachewicz sqrt(-1) = i
 
user1182183
i*i = -1
 
3:10 PM
@GamErix aaaaaaaaand?
 
lol
 
Do you know Euler's equation, @GamErix?
 
user1182183
@BartekBanachewicz i isn't "just a integer" :P
 
not gonna lie that made me lol because it was so random
 
Oh, also, you could do fast inverse square root, and invert the answer...
 
3:11 PM
@ShotgunNinja that's the carmack method I mentioned
 
Fast inverse square root (sometimes referred to as Fast InvSqrt() or by the hexadecimal constant 0x5f3759df) is a method of calculating x−½, the reciprocal (or multiplicative inverse) of a square root for a 32-bit floating point number in IEEE 754 floating point format. The algorithm was probably developed at Silicon Graphics in the early 1990s, and an implementation appeared in 1999 in the Quake III Arena source code, but the method did not appear on public forums such as Usenet until 2002 or 2003. At the time, the primary advantage of the algorithm came from avoiding computationally exp...
 
user1182183
@BartekBanachewicz learned about it
 
@ShotgunNinja really, we all know what InvSqrt is
 
Oh, fine then. Ruin my fun.
 
Hm, I don't think I can optimize the algorithm for arbitrary numbers more, @Rapptz
division by 2 is a lot faster, of course
so if you want to get the middle point you just do (max-min) >> 1 + min
 
3:14 PM
@BartekBanachewicz You mean shifting by 1, correct?
 
yup.
If you return min at the end, it should be floor.
 
I don't see how I can do that with my current BigInteger implementation.
I don't even define bitshift >>
 
@Rapptz do you operate on memory directly? i.e. storing n-digit Binary number requires n bits?
Because if you do, bitshift would be quite easy
 
It's a deque of unsigned long long :P
 
it's just... bitshift
well, so what's the problem?
 
3:16 PM
That would be easier if it was just a char array
 
i mean, i would use vector, to get contiguos memory
 
Hm, I don't know. Another reason I didn't add sqrt() is because I don't need it.
 
user1182183
I should really get something to visualize my 3d calculations.. is there anything? maybe a simple 3d opengl or dx program in c++? :P
 
You could always write a simple 3d-to-2d transform and plot it as 2d...
I wrote one once on my TI-83 calculator.
 
@GamErix maybe you should write one? My OpenGLUI has a Graph class if you're interested. It's 2D, but can be easily tailored for 3D
 
user1182183
3:19 PM
@BartekBanachewicz *looking for OpenGLUI
 
@ShotgunNinja TI-BASIC was lovely wasn't it
 
user1182183
sourceforge - found - right one? :P
 
no
on github
 
There's always Qwt
 
user1182183
@Rapptz I have a prizm
 
3:19 PM
And Qtiplot
and obviously gnuplot
 
user1182183
WITH COLORZ!!! :D ARHHH
 
@rubenvb Qt sucks
 
@BartekBanachewicz GTFO.
 
@rubenvb <from behind a comma operator> Qt sucks!
 
What's the deal with Qt? I never understood the whole double license thing
 
3:20 PM
I never understood the whole "they control int main()" thing with Qt...
 
@ShotgunNinja They don't, not visibly.
 
Maybe newer versions have done away with that, though; haven't toyed with it in a while.
 
user1182183
uff alsmost couldn't find the big "ZIP" button on github xd
 
@Rapptz if you want to change it and keep the changes to yourself pay up. If you share your changes, LGPL.
 
qt really sucks. it even uses it's own preprocessor
 
3:21 PM
@ShotgunNinja guess what? they suck
 
@rubenvb That sounds pretty retarded.
 
@BartekBanachewicz Exactly why I dropped them.
 
user1182183
I tried qt.. just the size.. God.. deleted it because everything you need can be found in small C and C++ libraries
 
@GamErix did it compile for you out of the box?
 
Complain about QT. I am forced to work with GTK at work.
 
3:23 PM
@Rapptz And why is that?
 
user1182183
@BartekBanachewicz updating to vc2012
 
user1182183
trying
 
Ell
@Chimera gtk isn't so bad imho :P
 
user1182183
oh boost
 
user1182183
need to add include path
 
3:24 PM
@rubenvb I can't make small changes without sharing them to the world? What if no one cares about whatever changes I make, what happens then? Can I use them?
 
user1182183
singleton.h ... ? eh?
 
@Ell It's not terrible... just a bit painful.
 
@GamErix it's old code.
 
@Rapptz It's (L)GPL. Deal with it. Djeeze.
 
Yeah I don't like (L)GPL either
 
3:24 PM
What do you want them to use? BSD? Ain't gonna happen.
 
I'll stick with ncurses.
 
Well as you can tell, I don't use Qt or plan to :P
 
user1182183
1>------ Build started: Project: OpenGLUI, Configuration: Release Win32 ------
1> stdafx.cpp
1> Button.cpp
1>src\Button.cpp(12): warning C4010: single-line comment contains line-continuation character
1> ComboBox.cpp
1>Z:\Profile\Rafal\Desktop\OpenGLUI-master\OpenGLUI\include\OpenGLUI\GUI.h(3): fatal error C1083: Cannot open include file: 'Singleton.h': No such file or directory
 
lol
 
3:26 PM
very funny
 
I didn't do that
 
:-)
 
I have to get rid of that shit
 
I wonder who destroyed the star board
 
public humiliation is quite a motivation indeed
 
3:27 PM
@BartekBanachewicz that's bad singleton, it has not-thread-safe initialization in C++03
 
oh man lol'd
 
@Abyx who cares about C++03?
 
@Abyx nobody said it's thread safe :P
 
user1182183
ou cannot bind an lvalue to an rvalue reference
 
@rubenvb sbi.
 
user1182183
3:28 PM
LoadFunctions.insert(std::make_pair("button", *LoadButton));
 
C++11 is the way to go, lol
 
@rubenvb A lot of people still use it...
 
user1182183
3x
 
user1182183
in XMLLoader LoadFile
 
What is that engine?
 
user1182183
3:29 PM
@Rapptz I hope something I can use
 
@BartekBanachewicz here is a better one - pastebin.com/1PB8wrL2
 
@Abyx I'm not using singletons anymore
 
if you write code, you can easily say: hey, requires C++11.
 
@Abyx Yeah, except it's a singleton abstract class, so you can't instantiate it...
 
But anyways, WTH?? Singletons????
 
3:31 PM
yeah, singletons.
 
Man, fuck singletons anyway.
 
@cat is not here, so it's OK to talk about'em
 
I enjoy using dualtons.
 
Oh man, that code still uses std::tr1::function
 
I like the sound of n-gletons
 
3:32 PM
Someone just posted an SFML question and answered themselves.
How nice of them.
 
@Rapptz SFML - Sorry, Fuck My Life?
 
@GamErix remove the * in all three lines before function name. I don't know how that get here
 
Simple Fast Media Library
 
Multimedia FTFY
 
user1182183
compiles
 
3:33 PM
yeah that
 
Fuck is irrelevant, since fuck Fuck.
 
user1182183
let's run that stuff ;D
 
anyway, Laurent is lazy as fuck and we havent seen 2.0 yet
 
I compiled sfml2 myself, I like it
 
I dropped it after he said to me he isn't concerned in the fuckup his library is doing to my code
 
user1182183
3:34 PM
let's debug that stuff...
 
kind of annoying though
 
(messing with OpenGL context and stuff)
 
real programmers using OpenGL. Not that grimey Direct3D shit.
 
I don't even know OpenGL :(
 
I should be learning OpenGL in class next Fall...
And on my own, I've hacked away at it a bit.
 
3:36 PM
is x = x++ UB in C++11?
 
OpenGL is great
 
@Rapptz It's either x = ++x or x = x++ which is not UB.
 
user1182183
OpenGL is just DX with cross platform support, right?
 
Cool. I don't do that though. Was just curious
 
user1182183
(at least, in the very end, DX and OpenGL end up using the same low level drivers)
 
Ell
3:37 PM
@GamErix Not really
 
user1182183
and as for the openglui sample it crashes and VS won't let me debug it because it can't run "openglui.lib" (srsly how stupid is VS, why won't it debug the .exe)
 
@GamErix Not quite... OpenGL inspired D3D at the beginning, and now they are both designed to work on the same graphics processors.
 
user1182183
:o debug doesn't crash
 
user1182183
only release
 
@GamErix Not really.
 
3:38 PM
@GamErix GUI.cpp, please comment line 233
 
@GamErix Uhhh... ok.
 
D3D is some ways is more advanced than OpenGL, but of course not everyone wants to write for a single platform. OpenGL gets it done.
 
eh
 
OpenGL has the shittiest API in the history of ever, and I've never seen any decent wrappers on it
also, the OGL drivers are typically buggy as fuck
 
Ell
3:39 PM
@DeadMG because its a hunk of global state?
 
@DeadMG I'm working to improve that situtation. Funny, huh?
 
@Ell Also, it's the worst C API ever.
as in, seriously
 
@DeadMG winAPI is much worse
 
it's way worse than Win32 or the C Standard library or anything
 
Ell
@BartekBanachewicz winapi is fun :P
I've never had to deal with unicode or anything though
 
3:40 PM
WinAPI is nothing on OGL
 
@BartekBanachewicz great article
 
@DeadMG have you used opengl 3.3 and up?
@Chimera the comparisons are nice. 4.x is cryptic, though, they could differentiate between 4.1, 4.2, 4.3 and so on
 
It's official.. that is our new house... the car is the neighbors.
 
@BartekBanachewicz Not personally. I've seen, though, all the GL_POINT vs GL_POINTS, and all the integers as pointers bullshit, etc.
 
Will be closing later this afternoon.. woot! First house.
 
3:43 PM
COM is hardly the prettiest thing in the world, but it's only a custom deleter away from being RAII-ified out the box, and it's at least no global state or integral pointer casting and such.
 
@Chimera whoa. what's in the food there over in the US. Houses vary from big to positively monstrous in my view
 
@DeadMG Yea, but the changes are to the state machine itself. More is pushed to objects (VAOs etc), so you can just glBind* an object and have fun
 
@BartekBanachewicz Even having a state machine is a horrific idea.
 
@sehe Yeah, my house is average size. Almost 3000 sq foot.
 
@DeadMG no, only interface juggling to get anything done :) That's casting too
 
3:44 PM
@sehe Nah, there's just a lot more land to go around than in Europe.
 
Oh the typo was ... interesting
 
OpenGL would benefit a lot from strongly typed enums. IMHO
 
@sehe Not in D3D, typically.
 
@DeadMG That'll be it
 
@sehe yes it was.
 
3:45 PM
anyway, @puppy, no one is blocking you from creating your own API.
 
user1182183
if that is true then why do they continue to make opengl and not make something new.. something C++11 and newest technologies
 
@BartekBanachewicz What a PITA
 
guis, what's the difference between T const foo(); and T foo() const; ?
 
@DeadMG The U.S. does have a lot of open space still. However, in the bigger cities the lot sizes for homes are still very small.
 
@NolwennLeGuen first is useless, second must be a member function
 
3:45 PM
@NolwennLeGuen the position of const?
:-)
 
Anyone wanna help me start a revolt in the PHP room? ^_^
 
linguists have found a new synonym for recursion:
 

PHP room idiocy

24 mins ago, 6 minutes total – 27 messages, 8 users, 0 stars

Bookmarked 15 mins ago by Neal

 
 
3:46 PM
...
 
@Neal I'd love to
 
@GamErix Because they're a doddering old Committee who couldn't recognize new technology if it punched them in the face.
 
@Neal No thanks
 
@Chimera :-)
 
@NolwennLeGuen The latter cannot change member values.
 
3:47 PM
@BartekBanachewicz spot on
@Rapptz unless they are mutable of const_cast<> is employed
 
@BartekBanachewicz just spot on. like I said
 
@Neal Do you want me to go on the PHP room and troll?
 
I think I'm plonked though
 
3:48 PM
@NolwennLeGuen haha go for it.
 
@sehe I actually had to urbandictionary it.
 
@sehe Yeah but typically when someone applies T foo() const; they don't want to change the member values or they're for comparison overloads.
 
Love it that my post in the js room was flagged. now everyone can see it ha!
 
At least when I've seen it used.
 
The real problem is that OpenGL is a fuckload of horrifically bad global state.
 
3:49 PM
 
@DeadMG which has to be wrapped. wow. thank you captain obvious
 
@BartekBanachewicz The question and article make it clear that there is no suitable wrapping.
 
@DeadMG There's no general wrapping.
 
@NolwennLeGuen Are you the real Cicada, or are you borrowing her avatar?
 
Who's Cicada
 
3:51 PM
@Chimera it's displaying there by mistake
 
@BartekBanachewicz Same thing.
 
Are you saying someone on this website is using my picture without my consent?
Oh god.
 
@DeadMG no, totally different. You can create a good wrapper for a specific game or a simulation, for example
 
Ell
Oh gawd I completely forgot who nolwenn was until like just now
 
@BartekBanachewicz Right, but that's worthless, because that means that I can never use someone else's wrapping code, and I have to eternally maintain the wrapper.
 
3:52 PM
@NolwennLeGuen why don't you just upload a photo?
 
@NolwennLeGuen No it appears the chat system is screwing things up. It's not showing us your actual avatar. It's showing that of another persons account.
 
and I can't possibly create an abstraction that's, well, abstract.
 
@Chimera Clear your cache.
 
@BartekBanachewicz I used to have one
 
@DeadMG you can reuse parts of it, if they fit your needs. That's the spirit of OOP. For example, you might be cool with vertex processing used in a particular game, but your textures need a finer degree of control, so you just modify the texture wrapper
 
3:54 PM
no.
 
Given first wrapper was good, there shouldn't exist a need to write something that you had in common again, thanks to non oopish nature of OGL
 
only being able to re-use parts of it is not in the spirit of OOP at all
 
@Rapptz ah, very good. That fixed it.
 
not one of these vacuous arguments again
 
ok
 
3:55 PM
@DeadMG that's arguable.
 
Clearly a good deal of people believe that state machine was a good way to implement and interact with OpenGL.
 
old solutions for old problems
 
@BartekBanachewicz well, it's just not related to oop
 
Hey look, @ThePhD another reason not to use using namespace std; stackoverflow.com/questions/14072009/…
 
@sehe okey. It's related to good code in general
 
3:56 PM
@Chimera It's hardware communication. Driver people seem to love their stateful stuff.
 
@Chimera I wager a good number of the same people have come to different conclusions in the mean time
 
there's nothing wrong with stateful
 
I read that based on the signedness of a variable, it's interpreted as -ve number if the MSB is 1 (2's complement representation) else as a +ve number; but I'm confused on how the differentiation is made i.e. how'll the processor know that this is to be interpreted as unsigned or signed? or is it that the processor needn't know, and only the compiler needs to know this?
 
but if you have state, you need to let the user deal with it
you can't just hide it behind global state
 
The user can just deal with global state. Har har
 
3:57 PM
@DeadMG what do you mean by hiding behind global state?
 
I for one love state machines. I wrote an application that used cooperative multitasking by having EVERY function be a state machine and the main loop just called every function or "task" in a loop... worked well.... :-)
 
@sehe how would a global state even work
 
If it's global, how exactly is it hidden?
 
@NolwennLeGuen State doesn't work
 
user1182183
just make something new, instead of DX and OpenGL, which use C, make something which is C++ only ;p
 
3:57 PM
@sehe but our politicians do?
 
@GamErix did you run glui?
 
@GamErix directx is c++
 
Ell
@NolwennLeGuen is it? o.O
 
@BartekBanachewicz Let me put it another way. The Direct3D API gives you direct control of the ID3D11Device, and direct control of the per-thread ID3D11DeviceContext.
 
user1182183
@BartekBanachewicz yes, thanks for it, trying to get the grip on the sample app now
 
3:58 PM
@BartekBanachewicz It's not hidden. It's implicit (not explicit). And it's inflexible. In essence it's the Singleton debacle again
 
@NolwennLeGuen it's not
 
user1182183
@NolwennLeGuen (forgot to add cross compatibility)
 
@NolwennLeGuen Cleraly not enough
 
@Ell when you narrow your eyes, it is
@BartekBanachewicz prove it
 
@GamErix i will push the changes to the master when I'm back home
 
3:58 PM
lol
 
so you can offer a simple binding
if you need to create a texture, you don't need to give a shit about what thread you're on, or anything like that
 
user1182183
@DeadMG if I want to display anything, Why should I rely on a certain even? I just want to change pixelz!
 
@ScottW like it was me who starred all this :P
 
user1182183
:P
 

« first day (804 days earlier)      last day (4143 days later) »