« first day (178 days earlier)      last day (3678 days later) » 

01:36
@Kamiccolo do you have any suggestion about it?
 
1 hour later…
Qix
Qix
02:43
helloc all
03:00
Morning @Qix
@carpetjar The exception that allows char * and const char *, is 'strict' in the sense that it doesn't address the case of multiple indirections
@carpetjar I'm afraid the only workaround you have, is a cast
C11 6.5.16.1 Simple assignment ... (nothing is simple about it)
Btw, it's so strict, that it wouldn't even allowed in the opposite direction:
Assigning a 'const type' object to a 'non-const type' object is an error, unless you use a cast. Once you use a cast it's perfectly valid
ASR
ASR
04:15
@DrorK. hi good morning
04:51
Morning
ASR
ASR
05:16
@DrorK. do you know about google phone number validation?
What there is to know about it?
ASR
ASR
@DrorK. if you know i will ask you some help :)
Then I guess I don't know
 
5 hours later…
10:36
helloc all;
'sup guys? what have I missed in the last few days?
finally I managed to install and make everything working on my main machine here at work => I will be back with full throttle! ;)
11:28
helloc @PeterVaro;
@PeterVaro cool ^_^
heya @Kamiccolo -- 'sup?
@PeterVaro pus' xD
@Kamiccolo in hungary we say pusz => which means kiss(es) ;)
@PeterVaro crap, that wasn't what I've intended xD
(it is a shortened form of the word :P)
11:30
because the beard, You know xD
btw, about Hungary... last news I've saw: bbc.com/news/world-europe-30086497
about choosing the proper teaching language opinion and arguments about C,Python, ideas of Java, etc.
11:47
@Kamiccolo Java is even worth than teaching C for newbies.. blog.plover.com/prog/Java.html
@Kamiccolo yeah -- but still nothing happens.. they still did not left their positions.. and the worst part is: we don't have normal alternatives either :(
helloc;
I run a program that I wrote and I printed the following
printf("%p", A[j].f[position].r);

and I get 0xb102f0

What does this mean??

Does this mean that it is NULL??
@MaryStar Could you use printf to print NULL, and see whether the two are the same?
@PeterVaro Hello World
@DrorK. I printed NULL and I got 0x0.

That means that the previous is not NULL, right??
@MaryStar Correct. You could simply use a simple if (p == NULL) { puts("p is NULL"); }
12:06
@DrorK. Ok!! Thank you!!
helloc all;
The day is really dynamic... sometimes it's sunny but after 10 seconds it might be cloudy
@DrorK. I have also an other question...

printf("%p", A[j].f[position].r);

for(i=0; i<position; i++){
printf("\n %p", A[j].f[i].r);
}

At the printf before the for loop I get: 0xb802f0
and at the printf of the for loop I get: 0x0

Could tell me why the results are different??
@MaryStar because you are accessing different memories
In the for loop, i loops from zero to position-1
12:22
@Apoorv So, should I write it as followed:

printf("%p", A[j].f[position].r);

for(i=0; i<=position; i++){
printf("\n %p", A[j].f[i].r);
}
So the last printf that will execute in the loop is like: A[j].f[position-1].r which is different
yeah but is there any specific reason you are doing it?
because this doesn't looks like something you wanna do
helloc @im_infamous; // welcome here
@Apoorv I got a segmentation fault and I wanted to see if get it because A[j].f[i].r is NULL.
helloc @Apoorv
@Apoorv it's not that bad, isn't it?
helloc @im_infamous && @MaryStar;
@MaryStar I expected it because you are accessing memory which is before position
12:26
@PeterVaro hello!
@PeterVaro holy mother of multitasking!
:)
ahh.. I have 4 workspaces with just as many windows as you can see here :)
Those window decorations.. not as attractive as the dock
not yet -- but I will use compiz at some point
and I want to create my own emerald-theme for that
but still -- this is my first everyday Arch installation for work ;)
Does anyone worked with C wrapper on VMware VIX API? I have wasted three evenings without solving the problem.
12:29
@PeterVaro cool :)
@im_infamous I didn't :(
@im_infamous please ask your question.. there are chances that it might not be problem of the API
allready asked, but nobody answered
0
Q: VMware VIX API interaction opaque behaviour

im_infamousI'm poking around automation of routine tasks using VMware VIX C API. Right now I've built the sample project, but could not even understand, why the code does't work(i.e. execution starts and ends without VM to be powered on). I've read documentation on this API but it didn't clarified anythin...

no idea, sorry
it's ok
really tricky question, though
12:35
@PeterVaro what is the notes widget you are using called?
it is the built-in one for xfce
Accessories => Notes
I edited the font, set the tabs, etc => it became pretty useful
(and good-looking too)
never noticed it was there :P
I am the kinda guy who clicks on everything just to see what that does :)
btw, I installed another copy of Arch in my VM so I can test out several things before I destroy my own system
:)
@PeterVaro, where did you find so pretty system monitor for archlinux? can you please share package or widget name?
(I also want ti install Mac OS X (hackintosh) in a virtualbox -- just in case)
@im_infamous it is called conky
and I created my own settings for it ;)
wait a sec..
from line 188 => 319
those are my settings => in some cases (based onyour monitors DPI, you have to adjust the voffset by -1 or +1)
12:40
it would be cool if task-warrior could be somehow connected to the notes app
@PeterVaro thank you! That's I was passively looking for a long time. Plasmoid monitor widgets are really awful-looking.
I tried conky but it looks like those floating widgets are not made for laptop screens :)
well -- in almost all cases a nice big 27" (or two of them) is/are always better ;)
@PeterVaro, by the way, did you tried to set up dmcrypt?
not really -- i don't want to encrypt my disks at this moment
13:01
helloc all;
helloc @karim;
@Apoorv When I print printf("%p", StarS[j].ffplan[ffplanpos].ff); I get 0xb802f0 .

But when I print printf("%p", StarS[j].ffplan[0].ff); I get 0x0.

Why is the position 0 NULL but not the position ffplanpos=1??
maybe because that's the way it is initialized
@Apoorv
int ffplanpos=0;
int function(int solid, int gap){
.......
if(ffplanpos<max){
StarS[j].ffplan[ffplanpos].fp=solid;
ffplanpos++;
}

if(ffplanpos>=max){
return -1;
}
.......
}

Doesn't this mean that the first element will be inserted at the position 0??
@MaryStar the offset one in you array contain surely grabage value that were left by another program, you must initilize it before using its value
13:10
@MaryStar nothing is being created here... it is just setting the value to a variable that should already exist
@karim @Apoorv Do you mean that I have to set

StarS[j].ffplan[i].ff=NULL;
i have no idea what i, j and ff are
@Apoorv Should I post the whole function?
no offense but i think you should read some more tutorials/books/etc about C before writing a big program
@karim @Apoorv Here is the function: pastebin.com/5baUqnjV
13:27
@MaryStar Please let us help you. Any C book would've given you the answers to all of the questions you've spent days trying to seek 'help' with.
So instead of wasting your time trying to guess what's what, or wasting our time- asking to be spoon-fed, please get a C book and learn the basics.
@Apoorv Took you less than a day :)
@PeterVaro How about a new rule to the guidelines, no unsolicited highlightings?
@DrorK. I could see his/her struggle which would be easily solved by patiently reading
btw @MaryStar why are you using C for the job? IMHO you'd be better off writing your simulation in a higher-level language
13:47
@DrorK. gimme mo', I was lunching, now smoking and having coffee bb in a 10-15
Add another rule: No smoking!
lol :)
@DrorK. naah.. maybe no cigarettes.. but smoking with a pipe is awesome..
ofc I cannot do that at work (it takes at least an hour) but still..
13:58
Excuses... :)
yeah.. well.. you know me :P
14:10
@PeterVaro ha, some of my colleagues used to take a laptop into smoking room, for others not to say a word of staying an hour or something... :}
that's probably cool, when you have a smooking room -- we have a back-yard, where we are smoking :P
@PeterVaro we do have both xP
but do you have a workshop full of machines and tools, or a full-featured kitchen, or a room for 3D printers?
14:25
what's the best way to get my forks to share an array of values?
shm?
user3079266
14:43
helloc all;
helloc @Mints97;
how's life there?
user3079266
@PeterVaro fine, thanks! Doing homework for cryptography and discreet mathematics. The latter is extremely fun: we're studying algorithms theory, and, as homework, we've been given a binary logical function of 3 parameters and told to implement it with a Turing machine, a Post-Turing machine, Markov's algorithms and Kleene's partial μ-recursive functions.
user3079266
I've finished with Turing and Markov, now tackling Kleene
it is soo good to see that enjoy the uni that much :)
I hope they won't ruin your entusiasm after some time..
@PeterVaro full-featured kitchen requires license which isn't that easy to get for non-restaurant. BUT... our HR brought electric oven and been making steaks for last couple of days :} and yeah, room for hardware. Now it's even 3 rooms. Full of stuff like robots, robotic hands, different mills and stuff. Myself working at one. And fully featured shower!
14:51
@Kamiccolo we have showers as well.. but robot hands? grr.. you won :P
@PeterVaro what about osciloscope, frequency-generator and couple of hundreds different ultrasounds sources, from which like quarter is hand made? xD
best thing of all... we do have some women engineers xP
@Kamiccolo nfw :P
helloc;
@Kamiccolo @PeterVaro @ZachSaucier
When I have to delete a list from an array, do I have to delete all the nodes of the list? Or do I have to do also something at the array?
@MaryStar are we talking about an array of linked-lists?
or what is a "list" here?
@PeterVaro Yes, it is an array of linked-lists
14:58
@MaryStar You know better, what have You allocated and coppied. I suppose, that all of the copies must be destroyed too.
and you want to destroy the linked list as well, right?
@PeterVaro Have 30 seconds for IRC?
I have to agree with @Kamiccolo => if all the items of a list has been separately alloc'd and the list object itself too (if there is any) then you have to free each item + the list object and remove the pointer to the list from the array
(or something like that :P)
@DrorK. sure
ping me @DrorK.
@PeterVaro @Kamiccolo There is a list, I have to seperate this list into two others and delete the initial list from the array.
@PeterVaro @Kamiccolo I wrote a function to deallocate the list. What else should I do??
enjoy the sweet process of deallocation :)
15:05
@PeterVaro So, don't I have to do anything else??
(you don't have to ping me, if only you and me are talking in the room)
if not, please read it -- otherwise I cannot help you
15:26
@MaryStar usually... count of malloc`s is the same as count of free's.. and You know Your code better :}
15:48
goto home;
home:
    goto work;
 
2 hours later…
Qix
Qix
17:39
helloc all;
user3079266
helloc @Qix;
user3079266
@Qix how are these selected?
Qix
Qix
@Mints97 It's the new, unreleased Recommended tab.
They just added filters.
rep > 1000, score >= 2, without answers, not under review
Favoring those with tags that you've favorited.
user3079266
wow, that's cool!
Qix
Qix
17:45
Yeah
Qix
Qix
@Kamiccolo Yep!
18:33
I feel like new people will get much less help now with that
only repwhores will answer and they don't provide great answers
@ZachSaucier relevant pic:
 
1 hour later…
20:03
I'm still having trouble getting my forks to share memory
ugh... such an unproductive day.
goto die;
I spent hours finding out I had accidentally removed the port number line
@Kamiccolo How can I share memory between forks?
 
1 hour later…
21:18
@Mints97 Hello!! I read that you take the course cryptography. Could you give me some information about that course? What is it about? What knowledge is required?
21:30
I have int *pointer and I need the value, as in if(pointer < 0). How can I get the value?
I know I'm re-reading it now :P
just wanted a quick answer
ughhh
@PeterVaro I have the following code
    int shm = shmget(42, 100 * sizeof(int), IPC_CREAT | 0666);
    int shm2 = shmget(43, sizeof(int), IPC_CREAT | 0666);
    if(shm < 0 || shm2 < 0)
        DieWithError("shmget() failed");
    pids = (int *) shmat(shm, NULL, 0);
    current = (int *) shmat(shm, NULL, 0);
    //pids = shmat(shm, NULL, 0);
    if(pids < (int *) NULL || current < (int *) NULL)
        DieWithError("shmat() failed");
    *current = 0;
it updates the value of current correctly, printing *current afterwards gives 0
however, later on, it gets some absurd value, -521007104, when I do the same thing
any idea what's up?
I'm thinking it's something with it not actually being written to shared memory with smh
shm so confusing
22:11
I'm trying to use them for an int array and just an int. Everything I see on it just shares a string xD
22:31
@ZachSaucier usually sharing the memory between processess is kind a tricky. That's why we do have d-bus and stuff like that. Furtunetly (or not) it comming to kernel (kdbus).
agh... my bad, it might not be that tricky xD
I'm getting it to work more or less
I've looked at that and several other posts :P
stackoverflow.com/a/19673681/2065702 was the most helpful in my case
what they did works great for a regular int
now I'm trying to get it to work with an int array as well
Would it be something like this?

int * shared[100] = mmap(...)
*shared[1] = 1;
22:53
nvm, I can just do the same thing
now it's trying to send my message to the correct socket, but the forks made sooner cannot sent it the ones sent later - only the opposite works (old send to new)
do I have to make the sockets shared in memory as well? I thought since the sockets are different it wouldn't matter so long as the info is correct
helloc all
How is the chat application coming along? This seems to be the topic of interest the last 24 hours in here.
that's because I'm working on it :P
does it have a GUI?
23:04
no, it's by the command line
biggest problem ATM is it's not sending from people who have been in new chat to those who have joined more recently
works fine the other way around
Are you using TCP or UDP?
nice
So is it a binary protocol or text based? sorry for all the questions I'm just really interested
ummm
from my understanding of those terms it's text based
you're probably just sending a const char* pointer in the send() function, I presume, then.
23:08
an int, but yes
my confusion is that it's trying to send to the correct port of the more recently created user, but fails
when I accept() people I save the pointer to an array in shared memory, when I send it uses the array
inet_ntop(their_addr.ss_family,
            get_in_addr((struct sockaddr *)&their_addr),
            s, sizeof s);
never heard of it
So that basically just gives you the remote peer address of the client.
his get_in_addr is a little obfuscated, I have a reduced snippet
seems to be a much smarter way of doing it, lol
to get the IP of the client you just have to call inet_ntoa(<sockaddr* struct>.sin_addr) and it will return a string
int accept_sd = accept(sock, (struct sockaddr *) &client, &client_len);
inet_ntoa(client.sin_addr)
23:22
I have to use send/recv/listen/etc.
Oh is this for class?
yes, sadly
otherwise I'd just use one that someone made and mod it
23:37
ughhhh, I don't know what's wrong :(
23:57
why it's going wrong* I should say

« first day (178 days earlier)      last day (3678 days later) »