« first day (787 days earlier)      last day (4146 days later) » 

user142019
2:01 AM
Memory management in Objective-C is also a piece of cake; you’re basically using std::shared_ptr everywhere, you only need to watch out for cycles.
 
user142019
But I’d never use it for anything but OS X and iOS apps.
 
@EtiennedeMartel you still there?
 
user142019
 
2:17 AM
@EtiennedeMartel If you don't want to help, please just say you won't help, Its better than keeping me in dark
 
@user1079641 He did say he was "hungry as fuck". So did you consider the possibility that's he's eating and is AFK?
 
Yes, but he is active on SO I mean. "Seen 2s ago"
 
@user1079641 That just means he has the chat window open.
It doesn't mean he's actually online.
 
@user1079641 what's the problem?
 
@cHao Its in VB. Do you want to know?
 
2:28 AM
@user1079641 long as you understand i reserve the right to care, or not, til after you tell me. :P
 
I am trying to create that ^, with the added feature of creating folders too, where if I double click those folders, I can browse inside them like you do in windows explorer
 
and...where are you stuck?
 
Adding the feature of creating and being able to browse through directories
 
oh, is that all...? :P
 
Yes
 
2:34 AM
oh, sorry...forgot the <sarcasm> tags.
does the library let you list directories?
 
what do you mean by the library?
@cHao ?
 
@user1079641 Look in QVirtualFileSystemManager.vb -- the class actually doing the reading and writing of the virtual drive. apparently it does. lets you create directories, list them, and everything. so, what's the problem?
 
If you have a look in the code for the test project, directory enumeration is already built in to the GUI. You need to add a button that lets you create directories. Look in the code that manages the virtual file system for the right functions to call, and then work out a way to drive those functions from a GUI. HTH. — Fabian Tamp 44 mins ago
 
Not sure how to make use of it.
 
kinda in way over your head, then, aren't you?
 
2:41 AM
Yes, I understand most of it, but I am still confused on this.
 
yourQVFSObject.GetList("\path\to\list") will get you a list of files in a directory
yourQVFSObject.CreateVDirectory("\some\new\path") will create a directory
should, anyway. and if you're using c#, double the backslashes. :P
 
here is the thing. I want to be able to display the directory in the listview
and if I double click it, then just like it happens in Windows Explorer window, if I double click the folder (directory), then I should be able to go inside it and look as well have the ability to add files in that directory
 
and where are you at with it?
 
no where
no jk
 
2:47 AM
...
 
I have a treeview on the left
where the folder automatically gets added when I import a new folder
When you select a new folder to add, it shows up there under the root
Open Windows Explorer, or My Documents on your computer
On the left side is treeview of all the folders and if you click any one of the folders, you automatically go to the contents of that folder, right?
I want to be able to do that, the most I have right now is that I can see the folders on the left treeview, not actually click on them view the contents of the folder
 
so, add an event handler that changes the current directory and triggers a refresh of the file list.
actually, looks like that's already there.
so...
 
what's already there?
the event handler?
 
yeah. the handler for the tree selection
so, what's it not doing?
 
3:04 AM
Hey, I'm new to C++. Does the order of member initializers in a constructor? According to my professor, they do. I disagree, rightly so?
 
I think you accidently a word there...
 
where do you see the event handler?
 
@sudorm-rf you mean the : member1(param), member2(other_param) stuff before the {? those run in the order the members are declared, afaik. their order at the constructor doesn't matter.
@user1079641 Form1.cs, line 245?
 
@cHao: Yeah, for example: Class(int foo, int bar) : b(bar), f(foo) {} is still correct, right?
 
@sudorm-rf correct and pretty much irrelevant, afaik
 
3:08 AM
245?
 
@user1079641 245.
 
My form goes up to line 164
 
@cHao: I'm just wondering because I got this answer wrong on a test because I claimed there was no difference. The correct answer was that supposedly code similar to above is wrong.
I was kinda upset about that because I knew it not to be the case.
Thanks anyway!
 
?
@cHao ?
 
Ooooohhh Oooohh sometimes....
int* a = 0; std::cout << *a;
I get a good feeling....
yeah....
 
3:17 AM
You mean undefined behavior?
 
"Please don't come in if you are high." I better go to bed then...
 
So @cHao leaves and @EtiennedeMartel comes back?
 
Hei @EtiennedeMartel, how you doin'?
 
@Jeffrey Bad, you just posted UB on this fucking chatroom.
 
Does UB mean Uber Bullshits?
 
3:18 AM
@sudorm-rf C++11 §12.6.2/10 says members are initialized in the order they're declared in the class, regardless of the order the initializers are declared
 
@Jeffrey Uh oh. I just got here and I'm already confused about who is who? :D
 
@Jeff, I'm you, just don't worry
 
@Jeff I was gonna say, I'm the newbie who has no idea how to program :D
 
@user1079641 your file is not the same one that's on the site, it seems. did VS ask you if it could upgrade your project to work with it?
 
@Jeff, neither do I.
 
3:20 AM
yes
 
@Jeffrey hopefully someone in here does. cuz i need help.
 
@Jeff, tell me.
 
can someone show me how to initialize an array to zeros if I don't know how big it's going to be at compile time? I had my code like this:
#define N 8
static void somefunction() {
realtype z[2*N];
}
whoops. wait. not done with that yet
ok, now you all can read that ^ ^
 
int* arr[N]; for (int i = 0; i < N; i++) arr[i] = 0;?
 
@Jeffrey i don't want to take the time to do that loop each time into the function.
 
3:24 AM
@Jeff If you don't know its size at compile time, use a vector.
 
I'm not sure, but I think the for loop does actually nothing. Theoretically speaking arr is a pointer to sizeof(int) N allocations in memory which can contain anything really.
 
Oh crap, that code above is still wrong :(. It used to be like this:
#define N 8
static void somefunction() {
realtype z[2*N]={0};
}
 
Maybe int* arr[N] = {0};? Try that!
 
@sudorm-rf Now, i imagine some compilers will try and be helpful and remind you of that fact, perhaps by issuing a warning about the order of initializers. But it's technically correct either way.
 
My god. What is up with all that crappy code?
 
3:26 AM
@EtiennedeMartel I don't know but it scares me...
 
You should listen to @EtiennedeMartel, he has surely more experience... std::vector is the way to go.
 
yep. unless you have a very good reason to use an array (and if you have to ask, you don't), vectors are less trouble all around.
 
@EtiennedeMartel I've never used a standard (or any other type) of vector. what's the actual name so I can look it up?
@jeffrey realtype* z[2*N] = {0}; did not compile.
 
@Jeff std::vector
 
3:28 AM
That's assuming you're doing C++. Your use of #define seems to indicate you're doing C.
 
@Jeff, and the error was...?
 
it's basically like a resizable array that initializes stuff for you and everything.
 
Is there an equivalent in C?
 
eww. c.
lol
 
3:29 AM
error: variable-sized object may not be initialized
warning: excess elements in array initializer
warning: (near initialization for 'z')
@jeffrey ^ ^
 
Really? Isn't 2*N a scalar value?
 
@Borgleader so you think i'm forced to make a loop?
 
@Jeff Why are you talking about C in a C++ room?
 
@Jeff I don't have a clue, I didn't follow the conversation. But I do know there is no equivalent to vector in C. Because C sucks.
 
@Jeff, if you want to try to make something like a std::vector try to use the node data structure...
 
3:30 AM
why not just memset(z, 0, 2*N*sizeof(realtype))?
 
@EtiennedeMartel cuz there is no C room :(
 
It ight be not the best idea though... I've enjoyed trying...
 
@cHao Aaaah. that makes sense! Thank you.
 
@cHao, there is still nothing showing in the listview when I add a new file
 
Why is that that when you are drunk your brain just turn off and you all like "I'll do what I really feel to do without thinking about the consequences"?
 
3:36 AM
@cHao I'm reading about memset now. that's a dangerous function, eh? :D
 
So is a lot of stuff in C...
 
@Jeff only if you use it stupidly. :) If you know what your pointers are pointing at, it's not a big deal
 
<-- is beginner (likely to use it stupidly) :D
 
lol
 
And then you can always throw out that lame excuse "I don't remember anything of that night"...
While everybody knows that alchool does not damage your memory....
It's just you refusing to remember...
 
3:39 AM
@Jeffrey Do you always type out your inner monologue?
 
@Borgleader, only when I drink tequila...
 
@user1079641 i'd download the source to try it out, but it's on codeproject and i don't feel like giving them my email address :P
 
@Borgleader, it's mostly because I lack of some serious discussion with my friends... The last one I remember of is like two years ago...
 
Wow I just noticed that the animation of people falling off the chatroom list is now more festive...
 
3:42 AM
Always listening to others problems and none listening to mine. :(
 
@Borgleader So slow man.
 
@Jeffrey @Jeffrey :(.
 
evening sirs
 
Ah nothing like the double ping.
 
@emartel Heyyooo
@Rapptz But but... I'm busy studying...
 
3:46 AM
@Borgleader how's it going?
 
good good
you?
 
"Should I break with him?" "Should I do a diet?" "Did I do the wrong choice?" "What should I do?"....
 
very tired but good :) eating christmas cookies now :P
 
Fuck you! What about what the fuck are we all doing in a terminal life? Eh? No answer fker...
 
@user1079641 and how do i add a directory?
 
3:47 AM
@cHao memset worked! (yaaay). but even though the doc says memset returns a pointer to the memory area just set, it doesn't compile when I try z=memset(.... I had to just call memset(....
That's not a problem for me, so long as it works correctly.
 
You click "Add Files" button. I messed up on the names
 
@Rapptz in the math room, if you click on the right of the message you're replying to, it replaces what's already in there if it's the same person. :D
 
@Rapptz me? yeah. mathematics
 
Evening everyone...
 
3:50 AM
Hi
 
@Jeffrey bye.. .thx for help
 
@Jeff, of nothing really. bye
 
Writing WordPress plugins is really no fun at all
 
Why are you writing WordPress plugins?
 
cause I tried answering a question on SO about something stupidly simple... and after google'ing for an answer, it appears that a) wordpress doesn't support replacing a picture in a post and b) there's no plugin that does it at the moment
 
3:53 AM
Oh I see
 
by replacing I mean, keeping settings of the old media, upload a new one, replace only the "image" part
you need to delete the old one and insert a new one, wtf
 
@cHao, are you still there?
 
@emartel yeah... wtf?
 
@user1079641 the code in that zip file doesn't have any of the spiff that's in the article's code
 
Why am I even watching this?
 
4:00 AM
the event handler's not there
no wonder it doesn't work :P
 
@emartel sometimes i think the programmers of some apps never use their own apps
 
@cHao Yes, cause its edit and simplified, a lot.
like the designer code isn't there
 
@Jeff I know... in my industry this happens a lot... but I thought WordPress was developed as an internal project for their team and they ended up putting it online, not sure though
 
it went inside the designer.vb file
 
yeah, well, you cut out the code that should freaking work. lol
the code i was looking to test.
 
4:02 AM
oh, well see if you can get anything then
 
@Jeffrey cuz you were bored after leaving here? :D
 
I used a converter to convert C# code to vb and then put all the designer stuff in the designer.vb file
 
@Jeff, yeah kinda
 
@cHao are you actually still on this, or you just left it?
 
I'll leave this link here like yesterday, just to let people be happy...
 
@Borgleader i see...
 
Two of the most popular things on the internet, in one video
 
@user1079641 i'm messing around with it a little, but at this point just for shits and giggles
dunno if anything will come of it
 
ok, so I shouldn't really expect anything?
 
Just this 11 seconds part makes me smile everytime
 
4:17 AM
I guess I'm not into men dancing, cause ... well... no reaction on my side? :P
@user1079641 what are you working on?
 
@emartel, wait till the end
 
trying to get directories to show up
 
@Jeffrey you said 6 secs
 
@emartel, wat? where?
 
on your current problem? eh...lemme refactor a bit first...lol
 
4:19 AM
@Jeffrey I see what you did there
@user1079641 I don't know on what to click not to download their ilivid crap
 
Click the button that says download in the bottom
 
@Jeffrey so humm... you're talking about the female at the end that's there for like less than half a second? :P
 
Quick question: Is there a reason why a reinterpret_cast would fail to compile?
 
Yes, if it's not an allowed cast.
 
@user1079641 I seriously see nothing else than a download for a crappy movie player
 
@LucDanton So how would I cast a struct sockaddr_in* to a struct sockaddr*?
 
THere are three buttons
Download
 
The other option I can think of is to use memcpy to copy the pointer.
 
Play
Download
 
4:23 AM
oh, I see
 
click the second download button
 
@Borgleader I know :)
 
@Mysticial static_cast via void*, but that's already what reinterpret_cast would do here.
 
@user1079641 so uh... what's up with your VB?
 
@LucDanton So two casts?
 
4:24 AM
Yes.
 
DO I really need to explain this all over again
 
@emartel, you don't have to be such a sex-starved (is that how you say it?)... you should just be happy for those people enjoying themself and making other people smile...
 
ah ic. lemme try that.
I'm obviously trying to compile some C socket code as C++.
:)
 
@Jeffrey actually, a video of kittens has more chances of making me smile than random people dancing in random places, I guess I have different taste than you that's all :)
 
@emartel, right now, I want to be able to add in directories that I can browse through inside of that app. Essentially its a virtual file system.
 
4:25 AM
@emartel, yeah that's probably it...ù
 
@user1079641 are you looking for help or not? why are you even complaining when people online are willing to download your code and try to help you? :)
 
No i am sorry
I didn't mean it that way.
I just had trouble explaining before. I apologize
 
What does "down and out of pussy" means?
 
oh wow, I'm an idiot.
I was casting it back to the same type instead of the new type...
 
@user1079641 ok, and where are you stuck?
 
4:27 AM
lol
That's why it wasn't compiling.
Yay! now it compiles. Thx @luc.
 
So it is a virtual file system, thats the point of it. When the user adds a new directory, it gets added under the root directory, as it can be seen in the treeview. But it is also suppose to show up in the listview on the right. Open My Computer or My Documents on your computer. Notice how when you click on a treeview folder on the left, its contents appear on the right, correct? That is what I am trying to achieve.
 
Turns out it works with just a normal cast. I was really just casting back to the old type. lol
 
@Mysticial Identity conversions are allowed for reinterpret_cast!
 
@user1079641 ok, but, my question still stands, where are you stuck?
 
Getting the directory to show in the listview
 
4:30 AM
or... you're simply looking for one of us to code it for you?
 
@LucDanton Originally it was this: sendto(sockfd, buf, strlen(buf), 0, &serveraddr, serverlen);
 
@Mysticial welcome to the club! :D
 
It didn't compile. I tried doing this:
 
No, I mean there is not much to code, so I can't expect you to write everything
 
sendto(sockfd, buf, strlen(buf), 0, (struct sockaddr_in*)(&serveraddr), serverlen);
and then this:
 
4:31 AM
Right, but the cast itself would compile here lol.
 
sendto(sockfd, buf, strlen(buf), 0, reinterpret_cast<struct sockaddr_in*>(&serveraddr), serverlen);
 
I just opened a random file on my system and I got "File is already in use by another program"?
 
But it turns out all I needed was sendto(sockfd, buf, strlen(buf), 0, (struct sockaddr*)&serveraddr, serverlen);
Notice how I got the type wrong in the cast.
 
there is a problem
 
Similar names... ugly C API.
 
4:32 AM
Add Files = open directory
Add = files
 
11 mins ago, by Mysticial
Quick question: Is there a reason why a reinterpret_cast would fail to compile?
 
First you have to click Create to initiate a new virtual file hard disk
 
Post error messages next time!
 
then, you have to select the "\" node on the left and then click "Add Files"
 
@Mysticial Even among C APIs, this one sticks out as uglier than most (though not quite as bad as strtok).
 
4:33 AM
and then choose some random folder
when added, it comes up under the root folder in the tree view, but not in listview
 
Why is strtok being mentioned this early in the morning? I haven't even showered yet.
2
 
@user1079641 I can't "open" a folder, it seems to want a file
 
you have to click on "Add file" button
 
yes, which crashes
and refresh, which crashes
etc... :)
and yes I do "create" your test.qfi or whatever
Add Files crashes on treeView1.SelectedNode.Nodes.Add(input)
Add crashes on vfm.AddNewVFile(Me.openFileDialog1.FileName, Me.treeView1.SelectedNode.FullPath + "\" + System.IO.Path.GetFileName(Me.openFileDialog1.FileName), True)
 
@R.MartinhoFernandes Hmm...showering after there mere mention of strtok may not be necessary, but it certainly can't hurt!
 
4:37 AM
and open throws Throw New Exception("File is already in use by another program")
 
one sec
 
@R.MartinhoFernandes Good. Now you can shower it off.
 
@user1079641 be quick, I'm losing interest pretty fast :)
 
funny
I don't get that error at all
Let's do this step by step
run the app
tell me when done
 
are you kidding me?
 
4:40 AM
Can't you guys solve the Visual Basic whatever in some other room?
 
@emartel, no. Something is being misunderstood
I am using the same code you have, and I don't get it at all
 
@user1079641 as @R.MartinhoFernandes said, isn't there a VB chat were you can get it fixed?
 
You really think I would be here annoying you guys if I was able to receive help there?
 
FWIW "I am stuck" is not a valid problem description.
We all know you are stuck, that's why you are asking for help.
Same goes for "I don't get it".
 
I told you the problem
 
4:45 AM
@R.MartinhoFernandes first they should go to a board where they can post the "how do i make good subjects" question!
 
Me and @emartel are not even on the same page
 
@user1079641 ok first crash, there's no guarantee that there's a "SelectedNode" on your treeView when "Adding Files", now that I clicked the root I was able to load a folder..., there's only 1 layer of folders that gets loaded, nothing displayed on the right
 
If you cannot explain your problem in terms of code, you are in the wrong place.
 
Which is the problem, "/" has a folder underneath it, then when you click and/or select it, the folders inside it should show up in the listview on the right
 
Im going to bed anyway, but I think you still have a long way before adding anything to your app...
 
4:47 AM
That's a good explanation of requirements.
It's not a good explanation of a problem.
You need to do some debugging.
And discuss it not in this room.
 
goodnight folks
 
@user1079641 You're getting slightly annoying.
 
It's morning, and I need to be at work in three hours, and I am grumpy.
 
Collisions between C++ objects...
 
5:17 AM
@R.MartinhoFernandes o.O I find it weird that I was here when you left to go to bed and I'm still here after you woke up...
I need to get a life.
 
5:36 AM
@Borgleader same here. And I'm in the same timezone as him :p
 
lol
Anyway, now it's time for me to go to bed. gn
 
 
2 hours later…
7:37 AM
@melak47 You guys are bad and you should feel bad. /cc @R.MartinhoFernandes
At least I did get some sleep today. Half, since the youngest was having a rough night, coughing and crying
@Mysticial That's actually C's idea of 'OO', with a bit of imagination. beej.us/guide/bgnet/output/html/multipage/sockaddr_inman.html It is largely like a variant/union but one where you have to manually keep track of the actual address type stored...
 
7:57 AM
mawning
 
8:17 AM
-2
Q: I need to learn Data Sturctures using C++ , and i have 20 days in EXAM

Asad IrfanPlease help me to learn Data Sturctures using C++ , and i have 20 days in EXAM , tell me any site that uses simple language or any online pdf that explains the things in easy language with code implementaiton. I am trying to figure out with the book but i dont understand when the new node is crea...

^^ aww...
 
If anyone is up for a review, I have a first draft of my next blog post up here
2
...
 
I guess 20 days is better than 20 hours.
 
@R.MartinhoFernandes Can't find the server, sez the browser. Although I'm on a new connection so there might be something up on my end.
 
Oh, link got borked.
 
8:19 AM
Firefox seems to bork the link.
 
lol
 
It clearly shows :8000 for the port, but it decides to URL encode the :. Go figure.
 
> // we need to get an rvalue reference, so we use std::move
In the context of writing a get that delegates to get, I think that's one 'get' too many.
"we need to pass on the rvalue we got as an rvalue still, so we use std::move" or something to that effect perhaps?
 
Ah, actually, the link is borked in the Markdown. Fuck Markdown.
0
Q: Markdown borks URLs with port numbers

R. Martinho FernandesIf you link to a URL with a port number, Markdown will eagerly percent-encode the colon the separates the host name from the port number. Example: http://chat.stackoverflow.com/transcript/message/6639235#6639235

 
Damn Gruber and Swartz.
 
8:38 AM
@R.MartinhoFernandes Yeah that forward_index thing is triggering alarms in my head. In particular because the description "Let’s start by writing a helper function that forwards the element at a given index." is kinda non-specific.
The 'wtf is going on' kinda alarms. Either something is deeply wrong, or I don't get it at all.
 
That needs a better name. And yeah, I might need to give some motivation.
 
-3.5 Celcius here
 
@TonyTheLion I doubt it.
 
What happens if I pass in a const std::tuple<halp>?
 
@R.MartinhoFernandes I do mean outside, not inside where I'm sitting. Silly
 
8:41 AM
@LucDanton You don't :P That is part of the implementation details and we intend to pass only tuples of references.
@TonyTheLion Still doubt it.
Now that your two minutes are up: s/c/s/
 
You asshole
 
So it really is a worse std::get?
@R.MartinhoFernandes How sensitive of you.
 
@LucDanton Not really. std::tuple<int&&> t; auto&& x = std::get<0>(t); gives you int&. It's actually more like std::get<0>(std::move(t)), except without the weird looking non-moving move in there.
 
So it's that way because you plan on using forward_shuffled_tuple with something else than the result of std::forward_as_tuple and/or won't std::move inside its implementation?
Because auto&& x = std::get<0>(std::move(t)); or auto&& x = std::get<0>(std::forward_as_tuple(whatever_rvalue)); do yield an int&&.
 
Hmm. Good point.
 
8:49 AM
By the way did you know that T {}.member is an lvalue when member is U&&?
It's a different behaviour from that of std::tuple.
 
Yeah.
@LucDanton I think I'll just replace it with get(forward<>()).
 
It's kinda awkward but defensible in that it's in the spirit of *T {}.hi_im_a_pointer, we can't assume that the referee is related to the superobject. But at the same time std::forward_as_tuple is very much worth having (such that it works out of the box with std::get).
 
I refactored that out the old implementation, which was rushed as fuck.
 
On the other hand it makes me feel awkward about my comment that explains what Qualifying<X, Y> means.
@R.MartinhoFernandes But you end up with std::get, with a different name, that only really works with tuples of references, no?
 
@LucDanton I'll just inline that and get rid of the extra function.
 
8:54 AM
return f(forward<T>(t)...) might as well just be f! (return type trickery notwithstanding).
Ah
I hope explicit tuple(T const&... t); is correct, not in the state to check.
Ya it's not I think.
 
You mean the interface, or the implementation?
The interface is just copy-pasted from the standard.
 
Interface.
Um.
 
user142019
We dont have girls in our class and if they are all of them are muslims and cover themselves not like yours with no self respect. @paxdiablo.and secondly its part of our final term course whose limit is 4 weeks, 2 weeks have passed and after 2 weeks or so its paper time. Moreover our teacher was just discussing theory with us and was not implementing any code. The topics are: sinlgy linked lists,Circular and doubly linked list, My main problem is code implementation. how i give address of each new node the address of the next one when it is not yet created. — Asad Irfan 20 mins ago
3
 
user142019
^ wat
 
@LucDanton §20.4.2.1, paragraphs 6 and 7 (signatures are not numbered, for some reason :/).
 
8:57 AM
Oh you have both constructor explicit. First time around I read the other one as implicit.
 
@Zoidberg'-- schizophrenia
 
@Zoidberg'-- wow...
 

« first day (787 days earlier)      last day (4146 days later) »