« first day (1097 days earlier)      last day (3864 days later) » 

8:00 PM
No?
 
I don't understand what you're saying. :/
 
user1804599
hi:3
 
I am working on Snake.
#4.
 
Hai
 
Which implies 1-3 failed.
 
8:01 PM
Ok.
 
if I typecast a char set as '\0' to (int), it will be zero yes?
 
I want to say yes. Why are you doing this, though?
 
because i have conditional if (ch != '\0') do something
and it do it everytime even when i know the values = null
so then I change code to if ((int)ch != 0) do something
now it works
 
It didn't work before?
 
8:04 PM
> An all-new, immersive adventure game from the award-winning creators of Myst and Riven.
 
@EwokNightmares I think it's implementation defined.
 
Ell
> $1,100,000 goal
 
@EwokNightmares And you can't do if (ch != '\0') because...?
 
@Pawnguy7 before ch would be null but the check ch!='\0' fails
 
null?
 
8:05 PM
@EwokNightmares What does it mean that a char is null?
 
Oh shit.. I dozed off, and now the robot is in the boozer before me. It's a beerpocalypse:(
 
Is this C++?
 
@Jefffrey it have null ascii value??
yes c++
 
@EwokNightmares It starts out as zero, and the cast has essentially no effect.
 
@EwokNightmares Then what's the problem with the above code?
@JerryCoffin Isn't it implementation defined though? I mean, can you be sure that \0 is 0?
 
8:06 PM
well i read a file into char buffer and every file of this format have 28 null characters in a certain spot of the file
 
@Ell That's not much for a game project honestly
 
so I check for all these to be null and if they are not my constructor aborts to empty construction
 
Ell
@Borgleader but for a kickstarter project it is, right?
 
@Jefffrey It is not implementation defined. You can be sure it's zero.
 
You are saying, it didn't work before the cast, but it does after?
 
8:07 PM
@Ell Meh, IIRC Star Citizen raised 6.7M
 
@JerryCoffin is this to do with termination of character is null?
termination of string
sry I mean that for jefffrey
 
@JerryCoffin But it is implementation-defined if a char holds negative values.
I trust you though.
 
also the values in the file is stored as unsigned int
but i can only read them with fstream with chars
 
@EwokNightmares Why are you using C-strings though?
 
@EwokNightmares Only vaguely related. '\0' creates a char with the value 0. It's effectively no different from char a = 0; except that in the latter case the`0` starts out as an int and gets converted to char (but all integer types can hold 0, so the conversion is always well defined.
 
Xeo
8:09 PM
I'm bored.
 
Ell
I'm sad :(
 
@Jefffrey Yes, that's true.
 
If you store is as unsigned, why not retrieve it unsigned?
 
@Xeo play a game
 
because when I use fstream and use any buffer otehr than char it gives me error
 
8:10 PM
@Xeo So "bored" (if that is your real name) what are you doing impersonating our friend Xeo?
 
@Pawnguy7 ^
 
@Ell Why?
 
Ell
@Jefffrey Cos I'm a creep
I'm a weirdo. What the hell am I doin' here. I don't belong here. I don't belong here.
3
 
@Pawnguy7 is there a way to read bytes of a file as unsigned integers easily?
 
@Ell What the fuck are you talking about?
 
8:12 PM
@EwokNightmares It sounds to me like you need to spend some time in a decent C++ book. Right now, I think we're going around in circles because you can't describe your code or your intent clearly enough to diagnose what's going on or how to fix it.
 
Define here.
 
@Ell looking for stars, huh?
 
Ell
@Jefffrey They are lyrics - Creep by radiohead
 
...
 
Ell
@Abyx Haha I actually wasn't :P
 
8:13 PM
@EwokNightmares To be honest, I have never written unsigned things in streams. And IO isn't really my strong suit. Haven't used it for a while.
 
I love stars. They make me happy. :)
 
@JerryCoffin Very simply I read a binary file into a char buffer with fstream read method
 
@Jefffrey Look at the stars I get :D
 
Ell
@EwokNightmares you can read unsigned chars from a streambuf then use shifts to put them into the appropriate sized integer
 
ok, 0:13 AM here, time to write some code!
 
8:14 PM
@EwokNightmares That's probably not a great idea, but I'm with you so far.
 
@EwokNightmares *member function
 
@JerryCoffin well, why is this a bad idea? it is only 2176 bytes
i know I can use seekg and tellg to nagivate through stream instead
but it is 2176 bytes and very ordered file
 
@EwokNightmares Because if you know the format, you probably want to create a struct and read into that instead of fiddling around with raw bytes.
 
I remember when I first learned about the flags.
Took me a day to figure out, operations don't work when it has an error :(
 
I am reading my bytes into the char buff and create variables with these things
 
8:16 PM
lol
 
It isn't theoretically portable (you'll probably have to ensure against padding in the struct) but in practice works pretty well.
 
Since then... my use of IO has been fairly limited.
 
I must do manipulations so it is simplest to me to read data in as bytes and do my minpulations
 
@EwokNightmares Must do manipulations of what? And in what form must you manipulate things?
 
I forget how it worked. Was it EOF is after you have read past, or before?
 
8:18 PM
well they save a seconds value in 2 bytes
 
user1804599
@Xeo Implement C++.
 
so I say seconds = lower byte + upperbyte * 256
like that
and 10 values is chars and represent a name
so I just append them to a string
I go through the file this way, bytes by bytes
 
@EwokNightmares What you've described so far is something like: struct whatever { char name[10]; short seconds; };, which you'd read something like: infile.read((char *)&my_struct, sizeof(my_struct));
 
Wow.
 
^ my experience with Google.
I think there is a way to do it, but I don't know it.
 
Ell
8:22 PM
-boost
 
Yes.
 
@Ell I love you. :3
 
user1804599
@Jefffrey Google is fucking horrible.
 
user1804599
It ignores words like “without”.
 
you can also search by site, right?
 
8:24 PM
Is boost heavy?
 
@JerryCoffin little confuse, what is my_stuct suppose to be??
 
user1804599
@Jefffrey No.
 
@Pawnguy7 Yes.
 
user1804599
Boost is mostly header-only.
 
I might just as well use boost then.
 
user1804599
8:24 PM
For serialization just use JSON. vOv
 
user1804599
Text ftw.
 
I thought I've heard boost is heavy.
 
user1804599
Boost takes about three minutes to install SO HEAVY.
 
user1804599
“serialization -boost” is something different from “serialization without boost”
 
Ell
I'd use google protobuf or yaml
 
8:26 PM
Considering that I hear a lot of things, that aren't, apparently, true, lately, I might be hearing voices.
 
user1804599
The problem is that in the latter case, Google ignores “without”, while it should actually find pages containing the phrase “without boost.”
 
"serialization without boost"
^ now you get the without
 
user1804599
But since Google is terrible, it does not do that.
 
@Jefffrey I think it's safe to guess that you are hearing voices. The only question is whether they're from real people.
 
@not-rightfold There are none actually.
 
user1804599
8:26 PM
It assumes its users are complete morons.
 
@JerryCoffin Probably not. :/
 
user1804599
(Which most are, but not me and Jefffrey.)
 
so how about them jQuery?
 
user1804599
@Jefffrey well, or something similar.
 
Awww. It's so cool that you think so. :)
 
8:27 PM
 
user1804599
But it should not a page that doesn’t contain something similar to “without boost.”
 
Random face?
 
Xeo
@not-rightfold I was thinking of starting on that Haskell game, but too lazy
5
Not feeling like doing anything right now
Maybe I should just go to sleep.
 
user1804599
@Xeo Is that a pun?
 
@EwokNightmares You create a struct that represents the layout of the data in the file, then read the data from the file into the struct. From there you can manipulate real data instead of raw bytes.
 
user1804599
8:28 PM
@Xeo Jawohl!
 
Unfortunately I gotta go, for few hours. Cyall later.
 
user1804599
I have this feeling that no matter how you design your C++ library or program, the design always sucks.
 
@JerryCoffin infile.read((char *)&my_struct, sizeof(my_struct)); does this just say read sizeof(my_struct) bytes into char pointer located at memory start of my_struct?
 
> Reddit is basically what happened when someone thought that youtube comments needed its own site.
9
 
@EwokNightmares Yes
 
user1804599
8:30 PM
@EwokNightmares ugh C-style cast.
 
@JerryCoffin but this typecasts all bytes as chars?
 
user1804599
No.
 
user1804599
It casts a decltype(my_struct)* to char*.
 
user1804599
It touches the pointer, not the pointee.
 
Good point.
 
Xeo
8:32 PM
It reinterprets the memory block that my_struct occupies.
And pssst: There's a special cast for it, with the surprising name reinterpret_cast
 
@Xeo oh?
 
Ell
ahh java y u no have lambdas :(
 
user1804599
infile.read(reinterpret_cast<char*>(&my_struct), sizeof(my_struct));
 
@Xeo That's such a bad name.
 
Xeo
It has anonymous classes! That's just as good, right?
 
8:34 PM
A better choice would have been potato_cast.
 
Xeo
@not-rightfold Ew that space.
@EtiennedeMartel belgium_cast
5
 
@Xeo so originaly the memory block of my_struct is interpreted as 10 bytes of char type and then a short int of 2 bytes?
 
@Xeo Good point -- unless you're an old fart like me, you're not allowed to use old-fart casts like I do.
 
user1804599
template<typename T>
T belgium_cast(T x) {
    union { T y; T z; } w;
    w.y = x;
    return w.z;
}
 
user1804599
Belgium ain’t Belgium.
 
8:35 PM
@Ell Java 8, right?
 
user1804599
@Ell Because you don’t use Clojure or Scala.
 
user1804599
Just write a Lisp interpreter in Java and use that. vOv
 
Xeo
@not-rightfold ... "or Java"?
Was that supposed to be "Scheme"?
or that
 
user1804599
@Xeo I need to go fap and sleep.
 
Beh Clojure
 
user1804599
8:37 PM
Better than Java. vOv
 
@not-rightfold Fap to Java.
 
user1804599
@EtiennedeMartel Javanese women.
 
I need to start downloading VS2013 in 20 minutes because my Internet quota is abysmally low and I get free downloads at night o-o
 
Xeo
Thinking of lambdas, learning Haskell made me appreciate lambda calculus.
 
@not-rightfold "Better than Java" seems like just a long-winded way of saying "!PHP".
5
 
Xeo
8:39 PM
Maybe I'll go watch some videos about Haskell or lambda calculus or something.
Still got about an hour before I should start heading to bed.
 
user1804599
@JerryCoffin That would imply Java is better than Java.
 
user1804599
@Xeo Try Erlang.
 
Xeo
Anybody got some suggestions (on the videos)?
 
@Xeo did you watch Erik Meijer's series on Channel9 already?
or are his shirts too loud for you?
 
Xeo
@TemplateRex Nope
 
@Xeo I suggest some text: cs.utexas.edu/users/EWD
 
I can still hear porn clearly when the volume is 1. Best. Investment. Ever. ;_;
 
> the real scandal is that you have access to a computer
 
@Xeo Erik's lectures follow this book, not sure if you know this stuff already
 
I got to use that someday.
 
8:49 PM
@JerryCoffin Jerry is this my problem in my code then?
aside from the bad way i read bytes into buffer
when i check if a char is '/0' it will not know what to do but it does if i check '0'?
 
@EwokNightmares Having seen neither the code nor the data, I can't really even formulate a reasonable guess about the problem.
 
@Xeo here's a talk specifically about lambda calculus (by Erik Meijers) channel9.msdn.com/Series/Beckman-Meijer-Overdrive/…
(the other one was a 13-part series on Haskell )
 
@CatPlusPlus Oh please... no ribbon interface!!. You asked, I delivered.
 
Oh hey, VS2013 is already on TPB. ;|
 
> it takes too much workspace, it's inefficient and can make thinks more confusing to use. (There are a few studys out there which proof this) It's ugly as fuck an it makes blender looks like a m$ application for retarded.. but that's just my 2 cents. As long i'm able to customize my interface and remove those things.
 
8:51 PM
@MohammadAliBaydoun lol no shit
 
Ahahahaha
 
@Borgleader I'd usually expect a 2-3 day delay :/
 
@JerryCoffin say I have a file with all bytes = NUL characters in text reader and then i load 1 of these characters into char variable in c++ and then i check if it is == '\0'
it will say not equal?
but it will say equal if i just use == 0
 
@MohammadAliBaydoun Not with VS imo. The more popular/pricey it is, the faster it seems to come out on torrent sites.
 
Xeo
@TemplateRex sweet
 
8:53 PM
i know the 2nd is true, but the compiler does not know that '\0' is equivalent to 0 for char?
 
@EwokNightmares If you read a zero byte correctly, then comparing to '\0' or just to 0 should produce identical results.
 
Ell
@EwokNightmares it does
 
@JerryCoffin okei that is good to know
so now I must understand why '\0' does not work while 0 does work
in my code
 
user1804599
SSCCE.
 
@Borgleader The only version I can find seems to be a regular uncracked one :P (It says 'Untouched' in the title)
 
user1804599
8:54 PM
Also try a clean build.
 
Xeo
just use desktop express version
 
@MohammadAliBaydoun Never said it was cracked ;)
 
Besides, I couldn't care less about torrenting VS. I have access to MSDNAA (at least until december)
 
user1804599
Just use FOSS.
 
But I like shiny things
 
this is amazeing just 1 condition in code checks if my char != 0 and if it is 0 it does not execute its condition code but just change the 0 to '/0' in the condition statement with nothing else change and it executes the condition code
 
then within condition code i print char, then (unsigned int)char, then (int)char, and first is blank and other two is 0
 
@Griwes Welcome to the Asylum.
 
9:08 PM
> I intend to use C++ as a "bridge language" across programming languages when needed.
Ahaha
Have fun with that
 
Well, I agree that the original problem exists, but the way that someone attempts to solve it... brrr.
 
hm... I feel like I need mocks or fakes library for my unit-tests. in C++.
life is a tough thing...
 
> Since C++ supports external linkage specifying the source language
whut
 
C++ Y U NO REFLECTION?!
@LightnessRacesinOrbit extern "lang"
 
First people thinking extern "C" is about calling conventions, then this...
 
9:17 PM
DMD could support extern "D" btw
 
@Griwes extern "C" does involve a calling convention.
 
Uh, does it?
 
@Griwes It is...
 
well, it could define ABI, not only mangling
 
Mangling is ABI
 
9:18 PM
a part of it, maybe
 
^
a part of it, certainly
 
@Griwes Yes. Strictly speaking, a void(*)() and an extern "C" void(*)() are two different types.
 
@Griwes What do you think it is?
 
I don't even know the syntax for an extern "C" function pointer.
 
to me mangling is how you encode type to string
 
9:19 PM
Ok, I stand corrected.
 
however
there are virtually no existent platforms where different types are actually used.
I think.
 
Yet I fail to find it anywhere in the latest draft.
 
I know for sure that MSVC does not implement it.
GCC and Clang can do, I think, for some targets.
 
oh
Found it.
 
chat, what do you use for mocks/fakes in C++ ?
 
9:21 PM
extern "C" typedef void FUNC();
FUNC f2;    // the name f2 has C ++ language linkage and the
// function’s type has C language linkage
eh
 
I fear for extern "Java" {}
 
lol
 
I still think that extern "lang" is not generic enough.
 
are you bullshitting?
it's way too generic.
 
You can't swap implementation languages at runtime.
 
9:23 PM
Wut
 
>_<
 
lol
 
you could have just said "yes".
 
And I hope never to see anything else than "C" and "C++" after extern.
 
9:23 PM
There's no extern "C++" afaik
 
extern "g++" and "vc++" would be great btw
 
Now Cat is wrong.
 
hmm
I'm not sure about extern "C++".
 
We just need Bartek to be wrong today and it'll be Polish Wrongness Day.
 
I don't believe I've ever seen it in any real code.
 
9:24 PM
@DeadMG it's default
 
oh except maybe in D.
but who gives a shit about D
 
Oh, there is; who cares though, it's not useful for anything
 
Anyway, just wait those 50 years for me to implement my awesome dynamic linker that can link different languages together with glue code at runtime.
 
Bridging with C++ is a pain in the ass
 
9:26 PM
But that's only after those 50 years it'll take me to write the best OS ever.
 
Like most things about C++
 
I'd be dead in 50 years.
 
Too bad for you, you'll miss awesomeness.
 
And C++ would probably be what Fortran is today or something.
 
Hopefully it'll be dead and buried
 
9:27 PM
@CatPlusPlus Bridging native with managed will be the real pain in the ass, virtual machines will need some special APIs in place for this to work.
 
extern "Managed C++" {}
 
~managed~
 
no, really, extern "g++" void __stdcall f(int&) would allow to link against mingw stuff in VC++
 
@MohammadAliBaydoun I think my vaporware linker can successfully link Fortran with anything.
 
@Griwes Ken I use taht 2 make MMO
 
9:29 PM
@MohammadAliBaydoun You seem to have a typo in your extern "Mangled C++" declaration.
 
@JerryCoffin Oh you~~
 
@MohammadAliBaydoun Yes, and you can write every function in different language!
 
I love you Jerry ;_;
 
And they will all link seamlessly together!
...except you'd need lots of headers to compile them first.
:P
 
i think my compiler do not understand what '\0' means
 
9:31 PM
@MohammadAliBaydoun Just don't put on that purple dinosaur costume and start singing "I love you. You love me. ..."
@EwokNightmares What compiler are you using?
 
@JerryCoffin visual studio 2010
my tests:
 
@Abyx modules and a fixed ABI would be far greater
 
@EwokNightmares It definitely does.
 
@EwokNightmares you are wrong :/
 
@sehe yeah =(
 
9:32 PM
(a) char != '\0' (b) char != 0, (c) char != NULL
my tests
b and c works
 
@EwokNightmares syntax errors
 
@JerryCoffin Sure thing! (Pay no attention to my avatar)
 
@EwokNightmares post what gives you trouble on ideone.com (and preferrable word a question on Stack Overflow)
 
and the byte is 00 in the file
 
@EwokNightmares "00"?
 
9:33 PM
@sehe the 2 nibbles in the byte
in hex
 
1 min ago, by sehe
@EwokNightmares post what gives you trouble on ideone.com (and preferrable word a question on Stack Overflow)
@EwokNightmares ^ let's not waste time :/ here, a start: ideone.com/IwAISf
 
@sehe i asked in SO
 
I can visualize a two-dimensional array easily, it's like a table with rows and columns. But how you visualize a 3-dimensional array. Something like: int anArray[5][4][3];
 
@JohnMerlino A cube (or rectangular prism).
 
@JerryCoffin thanks now it makes sense
 
9:46 PM
your question was already nuked
 
@EwokNightmares But you failed to post what gives you trouble. IOW, you wasted time. The first commenter showed you exactly what code you need to try. The other commented basically duplicated my effort above:
Why is it so hard for you to actually write what it takes?
 
ah just let the help vampire suck some air
 
God damn it, why is tesseract not in Google's dictionary? :(
Where is Misty
 
In the gorilla forest
 
@JohnMerlino Now do int x[5][4][3][2];
 
9:50 PM
@EvgenyPanasyuk I don't think i'll ever need 4-dimensions
 
@JohnMerlino problem fixed
 
@DeadMG you have invented a novel spelling for "eggs" :/
 
I have?
since when?
 
@EvgenyPanasyuk You are too easy
@DeadMG The message that was in reply to :/
 
@sehe That message does not contain any references to or spellings of "eggs".
 
@sehe "eggs"? did you mean "balls"?
 
Ell
"suck eggs" the phrase maybe
@EtiennedeMartel you really like majora's mask don't you? ;)
 
@Ell It's a fucking masterpiece.
 
eh
I preferred OoT
but then, I was only about eight.
 
Of course you did, MM's strength was in the story department.
3, 2, 1...
 
9:56 PM
@sehe ok, then visualize this
 
Sorry I was slow.
 
@sehe this is why i dont ask the question takes so long
 
@DeadMG You're so slow.
 
Heh
 
12 seconds too late, you're fired
 
9:56 PM
I'm torrenting and on a swamp connection that means 15,000ms ping.
 
@RyanRies Greetings and welcome! The link to our very own rules has been nuked, so I understand if you were unaware of how things work around here.
Looking at your profile, it seems you've been here before, though.
 
@RyanRies I'd just write a program and test it.
 
Ow. You really meant to say "air" then?!
(bah-duhm-tzzzzzj)
 

« first day (1097 days earlier)      last day (3864 days later) »