« first day (96 days earlier)      last day (2763 days later) » 

12:20 AM
What do you guys think about this implementation? paste.ubuntu.com/23326395
 
12:35 AM
@Ramy I'd say it's pretty shitty of you to take credit for someone else's code.
 
I'm not taking credits.
wrong link
was
And i don't have any reason to take credits since that guy Who maded it work for me . xD
 
@Ramy ouuhh.. sttuter
 
@sehe That link was for someone else. xD
 
So. What. I'm so done with your antics. It was never about the link. Look at the screenshot.
Unless you want to tell me "that guy who worked for you" accidentally wrote and copyrighted that piece of code the EXACT same moment that Richard Hodges did. And got everything identical down to the padding whitepace and IDE stubs
 
No, you not understand. That link was for some of my friend , yes is Richard codes. I not take credits here.
I just posted wrong link.
 
12:48 AM
FFS.
2 mins ago, by sehe
So. What. I'm so done with your antics. It was never about the link. Look at the screenshot.
You didn't post the wrong link. Because posting the wrong link doesn't make it magically exist. With the wrong copyright notice
 
@sehe If you look to my old post on Lounge was Richard credits. This link was for some of my friends. One of them, i never remove copyright to community like stackoverflow or other big community.
Where real programmers are.
Is one of my friends from school.
xD
 
@Ramy So. You're saying Pastebin magically altered the Author name? Get out, guy. We're not crazy
@Ramy so funny.
 
@Ramy lol a teenager can do all that? .. pls
 
Noo,didn't say this.
I did it.
It was just wrong link here.
Here i keep copyrhight. and etc.
@Dsafds Dude =)) Shut up.
 
@Ramy So. Recapping. You never needed our opinion because you know it came on good authority. Moreover, observer_ptr is a bit of a no-brainer and not essentially useful (except for documentation value). What the hell were you wasting our time for, had it not been for the copyright slapstick?
1 message moved to bin
 
12:54 AM
@sehe Richard said four eyes is better than two.
 
1 message moved to bin
 
I asked him before i ask here.
 
@Ramy True.
 
btw from where the *** you knew is Richard ?
I mean, that Richard.
 
You know. Does it matter?
 
12:55 AM
Just curious.
 
@Ramy This is the hallmark of a hustler. A con artist. I'm pretty convinced you would vote Trump even if you didn't have US citizenship.
4
8 mins ago, by sehe
2 mins ago, by sehe
So. What. I'm so done with your antics. It was never about the link. Look at the screenshot.
 
@sehe LOL
Thats a ... KO!
@Ramy ... that was a FATALITY
 
 
13 hours later…
1:54 PM
Hi Guys. If I set variable in cmake something like set(ROOT_VAL "777") is there any way how I could get this value from C++ code?
 
@silent_coder set is as a preprocessor definition with target_compile_definitions
 
2:09 PM
Hi @milleniumbug. Dose this means that this is impossible? I though set() is a kind of env. variable
 
It's a CMake variable - it doesn't exist elsewhere. In particular it is not an environment variable
you can propagate it to C++ code through a preprocessor definition
(IOW set the preprocessor definition to whatever this CMake variable contains)
 
I see. Maybe you could give me a hint. I'm writing tests with google test framework and I need to pass specific path to the test, this path used as prefix for converting relative to absolute. What is C++ best practices for that case?
my iniital guess was put this path to cmake as and than read it as env. variable. But this not working as I could see. And what I was able to find - google test not allow passing any custom parameters when executing tests.
 
2:54 PM
in this image shows binary representation of 123456. So and will occupy 2 bytes in memory( assuming i have 32- system).

Is that correct ?
 
nwp
@Cody maybe
the bit representation depends on the architecture and the size depends on the variable type
 
@Cody this looks wrong
 
nwp
if you use a short int you have a good chance that it is 2 bytes on a 32 bit system
 
you need to separate representations from values
13
A: Is there a way to take a series of zeros as an int input?

R. Martinho Fernandes"Three". "3". "Threeeeeeeeeeeeeeeeee". "03". "003". "0003". "00000000000000003". "III". "٣". "11". "३". "三". "Γʹ". What do all the above things have in common? They're all representations of the number three†. Are the representations different? Yes. Are the numbers they represent different? No. ...

assuming the passage above refers to either two's complement or natural binary code, it's wrong in both of them
it also can't possibly be a BCD representation
 
3:47 PM
@milleniumbug Hey man I took your advice in changing my raw pointer to unqiue_ptr and this is what I got. Tell me if it looks alright. paste.ofcode.org/gVBFMzSaxsgxuatXhV8j2K
 
if(ptr) check is unnecessary
 
anything else?
 
hi
@milleniumbug for what it is required
 
@LuisAverhoff seems fine to me otherwise
@vsmph what where
 
@milleniumbug So now I'm assuming that if I want to use any SDL function that requires a window, I'm going to have to create a separate function that returns a unique_ptr<SDL_window, SDL_Deleter> correct?
For example
something like that right?
 
3:56 PM
the second argument is unnecessary
this is a unique_ptr with a stateless, default constructible function object deleter
which means unique_ptr can instantiate it itself
IOW you don't need to pass it to the constructor
 
And it wont cause any problems even though I define windowPtr like this using windowPtr = std::unique_ptr<SDL_Window, SDL_Deleter>;
 
no it won't
 
So even if I return a unique_ptr with no deconstructor, it still knows to associate windowPtr to the deconstructor that I created for it correct?
 
I assume by 'deconstructor' you mean 'deleter' instead
 
4:01 PM
It knows how to destroy the resource correctly because the info is in the type
 
it's literally the second template argument
and due to this
5 mins ago, by milleniumbug
this is a unique_ptr with a stateless, default constructible function object deleter
 
4:35 PM
@milleniumbug why ?
 
@milleniumbug is it safe to use the get function in unique_ptr and pass the raw pointer to the calle function. Here is an example paste.ofcode.org/gYRU2FV9WFFCvr9SyvYmAc
 
@Cody why what
@LuisAverhoff As long as that function doesn't destroy the resource
this is literally what I'm doing in the example I've sent you yesterday
 
@milleniumbug Thanks
 
yesterday, by milleniumbug
-1
Q: Creating two sdl window using vector emplace creates only one window

ElvisjamesWrapping the sdl window in a class and creating a vector. Then emplacing two window objects creates only one window, though two is expected. #include <SDL.h> #include <vector> class Window { SDL_Window* m_window; SDL_Renderer* m_renderer; int m_windowID; public: Window( i...

 
4:45 PM
what's the point in showing me the same exact image you've shown before
 
@milleniumbug sorry, but will you please point out the problem with it ?
 
it's bullshit
I can represent a number in a lot of different ways
but this passage implies as if there's one and only
 
How would you represent 123456 in a binary mode ?
 
see above
"binary mode" applies to files, and it means the bytes are written sequentially
once you write to the file there is no number anymore
there are bytes
if another program reads the file then it must interpret the bytes in the same way
(i.e. deserialize them)
 
i understand that
in the image bytes are stored sequentially , so atleast is it one of those possible ways in which 123456 can be stored in the me222mory ?22
 
4:58 PM
it doesn't matter whether a file describes an image or a sound
it's a file
 
I want to now this:

Is it one of those possible ways in which 123456 can be stored in the memory ?
 
look, I can store 123456 in a one bit
just let's agree that 0 refers to 123456, and 1 refers to 654321
 
5:25 PM
it amazes me that SDL_Rect does not have a constructor where you can simply enter the x,y,w,h values. Instead you have create it with the new operator and assign those values instead of just passing those values to the constructor.
 
SDL_Rect r = { x, y, w, h };
who needs dynamic allocation
 
well if I do unique_ptr<SDL_Rect>, wouldn't I have use the new operator because SDL_rect is a struct and not a pointer?
 
3 mins ago, by milleniumbug
who needs dynamic allocation
 
alright
 
also lol creating a pointer to a SDL_Rect
 
5:31 PM
:)
Oh now I remember why I used new
it was because I forward declared SDL_Rect and had to make it a pointer in order for it work.
 
don't forward declare stuff that don't belong to you
it's more trouble than it's worth
 
5:47 PM
So I should just include SDL.h?
because that is where SDL_rect is
 
Hey guys got a questoin :)
how do i do something like this?
 #include "../../../" + ARCH + ARCH_FAMILY + "/lib/stkl/printkc/printkc.c++"
ARCH and ARCH_FAMILY Being strings
 
@Dsafds Are they #defines, const char*, std::strings, something else?
 
@Rakete1111 they are not defined now.. i previously thought i can read it from a makefile , but turns out not
ima define them as a const char* i guess?
 
Nope, you need to use #define
 
6:01 PM
I cant use std::string im sure.. unless i import the string library
Oh so i can use define?
 
You can't use anything else
Jup
 
#define ARCH i386
#include "../../../" + ARCH + "whatever/"
like that?
 
Like that
 
@Rakete1111 Ok Tank you ^_^
 
#define ARCH "i386" though
@Dsafds Don't forget the quotes
 
6:03 PM
@Rakete1111 #define ARCH "i386" .. gotcha
 
hey guys, is there a c# chat anywhere? I can't find it
 

C#

General discussions about the c# language, Squirrels | gist.gi...
 
@milleniumbug if I may, what is so bad about forward declaring if I it can save you from having to include a header file? Can you give an example of how bad it could get?
 
thanks!
 
@LuisAverhoff this is totally not biased ;) , but forward declaring makes you go closer to C and makes you farther apart from the OOP Design.
Dosent seem to work..
Got a problem
../../../../lib/libc++/: No such file or directory                                        #include "../../../../lib/libc++/" + ARCH_FAMILY_S + "/" + ARCH_S + "/stkl/printkc/printkc.h"
 
6:28 PM
Is there any way I slow down the movement of my paddle? I know I can use a float variable and increase the vertical movement by 0.5 instead of 1 but the SDL_Rect struct that I'm using only accepts integer and if I were to cast 0.5 to an int, it would truncate it to 0 and the paddle wouldn't move at all.
 
7:19 PM
If anyone can answer this question
2
Q: How to use a macro in an #include directive?

amanuel2I'm confused on how to use macros in the #include directive. I've done this: #include "../../../../GlobalDefintions.h" #include "../../../../lib/libc++/" ARCH_FAMILY_S "/" ARCH_S "/stkl/printkc/printkc.h" GlobalDefintions.h: #ifndef _GlobalDefintions_ #define _GlobalDefintions_ /*Architect...

 
8:08 PM
@milleniumbug it doesn't seem like I can easily include SDL2_gfx into my windows library(I downloaded the latest version of SDL2_Gfx and it did not include any lib folder or include folder to add to my visual studio lib/include path). The only last resort I can see is opengl
 

« first day (96 days earlier)      last day (2763 days later) »