00:05 < CuBe_> I want to host multiple websites, also for people who pay for it, so not online mine 00:05 < CuBe_> not only * 00:17 < CuBe_> @eeeee: :P 00:21 < eeeee> i guess it depends on website, like you can usually host static content or simple php crap for free 00:22 < eeeee> for more advanced stuff you'll have to get some vps or a PaaS specific for your technology stack 11:55 <@matricks> minus: y0 dude 11:55 <@matricks> minus: ever setup a http connnect proxy? 11:58 <@minus> Not even once 11:58 <@matricks> k 11:58 <@minus> Only socks andvpn magic 12:00 <@minus> What are you planning 12:00 < EastByte> setting up squid isn't hard iirc 12:01 <@matricks> I've setup a jabber server, and some wifi networks etc doesn't allow communication on 5222 12:01 <@minus> Ic. You can use BOSH too 12:02 <@minus> Or just use a tunnel too 12:02 <@minus> Bosh is xmpp over http 12:03 <@minus> Typing on phone sucks 12:03 <@matricks> but then the client has to support bosh right 12:06 < JulianAssange> use nginx or varnish 12:06 <@matricks> JulianAssange: nginx doesn't support http connect 12:07 < JulianAssange> why don't u just use ssh to make a socks proxy? (-D port) 12:07 <@matricks> JulianAssange: bitch todo on the phone 12:07 < JulianAssange> oh 12:07 < JulianAssange> probably not possible on the phone tbh 12:08 < JulianAssange> unless it's rooted, idk 12:08 <@minus> Ssh port forwarding was easy for me with connectbot 12:08 <@matricks> still a bitch to manage when you move around from network to network 12:09 < EastByte> then you should set up a vpn in general on your phone 12:09 <@matricks> perhaps yeah 12:10 <@minus> Openvpn works on Android easily? 12:10 < EastByte> ^ I had prolems setting it up 12:10 < EastByte> problems* 12:10 < EastByte> but should be easy 12:10 < EastByte> android >4.0 required 12:12 <@minus> Got 4.4 12:12 <@minus> Moto g2 12:20 < JulianAssange> help 12:20 < JulianAssange> i'm doing homework 12:20 < JulianAssange> and it has a joke i have to analyze but i don't get it 12:20 < EastByte> me too :) 12:21 < JulianAssange> Knock, knock 12:21 < JulianAssange> Who’s there? 12:21 < JulianAssange> A little old lady. 12:21 < JulianAssange> A little old lady who? 12:21 < JulianAssange> I didn’t know you could yodel. 12:21 < JulianAssange> what's the joke 12:21 <@minus> Your face 12:21 < EastByte> ! 12:21 < JulianAssange> ;( 12:21 < JulianAssange> i cry every time 12:26 <@matricks> JulianAssange: HAHAHAHAH!!! <# 12:27 <@matricks> JulianAssange: best joke ever :D 12:27 < JulianAssange> no 12:27 < JulianAssange> i don't get it 12:27 < JulianAssange> ffs 12:27 < JulianAssange> fuck you matricks 12:28 < JulianAssange> you suck 12:28 <@matricks> A little old lady who == say that fast and it sound like a yodel 12:28 < JulianAssange> i live in australia 12:28 < JulianAssange> we don't yodel 12:28 <@matricks> I live in sweden, do you think we yodel? 12:28 < JulianAssange> yes 12:28 <@matricks> well, you are wrong :D 12:29 <@matricks> it comes from rural europe along the alps 12:29 < JulianAssange> australia isn't in europe 12:29 < JulianAssange> we left the euro a long time ago 12:30 <@matricks> it comes from the central alps and is a form of communication 12:30 <@matricks> but thats the joke 12:30 < JulianAssange> o well 12:30 < JulianAssange> i'll just skip it 12:31 < EastByte> you got the answer and just skip it? 12:31 < JulianAssange> i need to do more than just understand the joke 12:32 < EastByte> okay 12:32 < JulianAssange> i need to which "subsystem" it is, and explain how the humour is created 12:32 < EastByte> btw. teeworlds on raspberry pi 2 runs with ~5fps without graphics acceleration 12:33 <@matricks> dunno what you call jokes that are based apun things sounding the same 12:34 < JulianAssange> you're not funny 12:34 < JulianAssange> v2 12:35 <@matricks> I'm very punny 12:36 < JulianAssange> https://books.google.com.au/books?id=oqvrBQAAQBAJ&pg=PA32&lpg=PA32&dq=trimmets++treacle+puddings&source=bl&ots=vN___PD_1B&sig=1SOQjqJhypgeifJiv1RHMzqNCxo&hl=en&sa=X&ei=rjDfVIjoHaSxmwXFo4Bw&ved=0CCIQ6AEwAQ#v=onepage&q=trimmets%20%20treacle%20puddings&f=false 12:36 < JulianAssange> that's the one i'm doing now 12:36 < JulianAssange> atleast i get that one 12:38 <@matricks> bah, not nearly as funny 12:38 < JulianAssange> that's why i get it : 12:38 < JulianAssange> :< 12:38 < JulianAssange> :> 12:38 < JulianAssange> https://books.google.com.au/books?id=3XBLGxvNOT4C&pg=PT51&lpg=PT51&dq=%22Is+a+buddhist+monk+refusing+an+injection+at+the+dentist%27s%22&source=bl&ots=nw8-o7bVF6&sig=oaYFBFVBcqheyEIW8FKuTVR0yTI&hl=en&sa=X&ei=bDPfVNymJ4vo8AWt54K4Bg&ved=0CB0Q6AEwAA#v=onepage&q=%22Is%20a%20buddhist%20monk%20refusing%20an%20injection%20at%20the%20dentist%27s%22&f=false this is the third one, which I kind of get 12:39 <@matricks> thats the same kind of joke as the yodel one 12:41 < JulianAssange> i thought it was just a pun 12:41 < JulianAssange> medication/meditation 12:42 <@matricks> transcendal dental medication sounds like transcendental medititation 12:42 <@matricks> same with with the yodel one 12:43 <@matricks> A little old lady who == sound like a yodel 12:43 < JulianAssange> o 12:43 < JulianAssange> ok i gt it now 12:43 < JulianAssange> i said it correctly 12:43 < JulianAssange> and it kind of sounds the same i guess 12:44 < JulianAssange> @yodel 12:44 <@matricks> AAA little old ladiiii whoooooo 12:49 < JulianAssange> b. The second example is a pun on the pronunciation of "Little old lady who", since it sounds similar to a yodel when spoken quickly. 12:49 < JulianAssange> that's what i wrote anyways 12:50 <@matricks> A little old lady who 12:55 <@minus> Matricks jodelmeister 12:56 <@matricks> you are closer to the home of the yodel 13:06 <@minus> yes, they do that here 13:08 * matricks slaps minus with a rather large ballon hammer 13:09 < JulianAssange> h-happy valentines day g-guys.. 13:09 * matricks is workin' 13:09 * minus is at home after getting his wisdom teeth removed 13:09 <@minus> actually, it's weekend too 13:09 <@matricks> https://www.youtube.com/watch?v=RTq66KIag9Y 13:09 < Nimda3> [YouTube] Title: Why should they be happy? | Rating: 5.00/5.00 | Views: 44,448 13:09 <@matricks> relevant 13:10 < JulianAssange> 14:09 * minus is at home after getting his wisdom teeth removed 13:10 < JulianAssange> i'm getting mine out in a few weeks 13:10 <@minus> hf 13:10 <@minus> how many? 13:10 < JulianAssange> bottom ones 13:10 < JulianAssange> so 2 i guess 13:10 < EastByte> awesome 13:10 <@minus> got all 4 removed 13:11 < EastByte> me too, at once 13:11 <@minus> the bottom ones had to be cracked 13:11 <@matricks> so the doctor was a cracker? 13:11 < JulianAssange> i have a meeting on monday with the guy 13:12 < JulianAssange> alright, who's buying this for me? https://i.imgur.com/SGzV4we.gifv 13:13 < EastByte> how about posting sfw only stuff here? 13:14 < JulianAssange> that is sfw 13:14 <@matricks> well, nsfw... ish.. 13:14 <@matricks> it's sexual 13:14 < JulianAssange> what's the guy holding? 13:14 < JulianAssange> looks like a really thin cucumber 14:01 < JulianAssange> think i might ask to get my top wisdom teeth out too tbh 14:01 < JulianAssange> my teeth seem very tight 14:01 * matricks has braces 14:02 < JulianAssange> wat 14:02 <@matricks> rails or what they are calle 14:02 < JulianAssange> how old are you 14:02 <@matricks> called 14:02 <@matricks> 31 14:02 < JulianAssange> wot 14:02 <@matricks> got them a couple of weeks back 14:02 < JulianAssange> i had braces when i was 11 14:02 < JulianAssange> until like 13 14:02 <@matricks> never had em, and I kinda need em :) 14:02 <@matricks> I started to chew up my own teeth 14:03 < JulianAssange> lol 14:04 < JulianAssange> but i hate it because it always feels like they're somethings inbetween my teeth 14:06 <@matricks> btw, if you have missed this movie, you should see it, https://www.youtube.com/watch?v=uHCd9YwVrCo 14:06 < Nimda3> [YouTube] Title: ‪‪Steven Seagal The Onion Movie Trailer‬‏ | Rating: 0.00/5.00 | Views: 44,759 14:09 < JulianAssange> oo 14:09 < JulianAssange> that's where the neck thing is from 14:09 <@matricks> yah 14:10 < JulianAssange> i hope that's not a real movie btw 14:11 <@matricks> cock puncher? no 14:11 < JulianAssange> no 14:11 < JulianAssange> the onion movie 14:11 <@matricks> it's a movie 14:11 <@matricks> http://www.imdb.com/title/tt0392878 14:18 < JulianAssange> gaaaaaaaaaaay 14:18 < JulianAssange> but i'm gonna watch a movie now 14:18 < JulianAssange> The Lazarus Project 14:18 < JulianAssange> it has paul "no-longer" walker in it 15:11 <@minus> didn't know there was an onion movie 15:12 <@matricks> it's nice :D 15:32 < JulianAssange> http://pastebin.com/6npEHC1x 15:32 < JulianAssange> is this good code 15:33 < JulianAssange> any suggestions? 15:33 <@matricks> never ever static in a function 15:34 <@matricks> C89? 15:34 < JulianAssange> 99 15:34 <@matricks> for(unsigned i then 15:35 < JulianAssange> why not unsigned? 15:35 <@matricks> for(unsigned i = 0; i < .... 15:35 <@matricks> etc, move the declaration of i 15:35 < JulianAssange> oh 15:35 <@matricks> static unsigned short int oPort[sizeof(ports)]; 15:35 <@matricks> that line is bullshit 15:35 < JulianAssange> before of the sizeof? 15:35 <@matricks> the sizeof is bullshit 15:36 < JulianAssange> yes 15:36 <@matricks> the static. just remove that 15:36 < JulianAssange> because i can't count to 3 15:36 <@matricks> JulianAssange: because that sizeof will return 6 15:36 <@matricks> not 3 15:36 < JulianAssange> yes 15:36 < JulianAssange> because it's *sizeof(unsigned short int) 15:36 < JulianAssange> times 15:37 <@matricks> and don't return a static stack variable 15:37 <@matricks> don't do static stuff 15:37 <@matricks> in general 15:37 < JulianAssange> " address of stack memory associated with local variable" 15:37 < JulianAssange> i get that error in clang fi i don't have the static 15:37 < JulianAssange> warning* 15:37 < JulianAssange> and invalid reads in valgrind 15:38 <@matricks> yes, you shouldn't return stack variables as they go out of scope 15:38 <@matricks> what does the declaration of the function look like? 15:38 <@matricks> btw, the memset is bullshit as wlel 15:39 < JulianAssange> indeed 15:39 < JulianAssange> changed those memsets to 's' 15:39 <@matricks> that is wrong 15:39 < JulianAssange> how come? 15:39 <@matricks> memset takes number of bytes, not elements 15:39 < JulianAssange> so it is fine? 15:39 <@matricks> it's not needed 15:40 <@matricks> or do oPort[] = {0}; instead of memset 15:40 <@matricks> JulianAssange: how does the function declaration look like? 15:40 < JulianAssange> unsigned int s = sizeof(ports) / sizeof(unsigned short int); 15:40 < JulianAssange> unsigned int e = 0; 15:40 < JulianAssange> unsigned short int oPort[s]; 15:40 < JulianAssange> memset(oPort, 0, s)); 15:40 < JulianAssange> whoops 15:40 < JulianAssange> unsigned short int *QPS(const char *network) { 15:42 <@matricks> can you show the complete function? 15:42 < JulianAssange> http://pastebin.com/69dr6AMs 15:43 < JulianAssange> (not updated) 15:43 <@matricks> yeah... 15:43 <@matricks> almost everything is wrong :D 15:45 <@matricks> http://pastebin.com/a5dtCnhB 15:45 <@matricks> something like that 15:46 < JulianAssange> see, that's how i have all of my other functions 15:46 < JulianAssange> in void-like methods, with returns being the end size/result whatever 16:21 < JulianAssange> the memset is required btw 16:21 < JulianAssange> well 16:21 < JulianAssange> kind of 16:34 <@matricks> JulianAssange: why? 16:41 < JulianAssange> i need all non-open ports to be set to nul 16:41 < JulianAssange> i mean 16:42 <@matricks> why? 16:42 < JulianAssange> because later it's going to be used with the string functions 16:42 < JulianAssange> which requires a nul terminator 16:43 <@matricks> erh... 16:43 <@matricks> wat 16:43 < JulianAssange> ye idk 16:43 < JulianAssange> i'm too tired to think atm 16:44 <@matricks> JulianAssange: Whats better than roses on a piano? 16:45 < JulianAssange> tulips on my organ 16:45 <@matricks> damn it 16:46 < EastByte> matricks: does {0} generate code for zeroing all elements or are the zeros copied from a readonly section? 16:46 <@matricks> EastByte: how it's done isn't specified I think 16:46 < EastByte> hm 16:46 <@matricks> EastByte: I suspect many compilers will do a memset 16:46 < heinrich5991> EastByte: will likely be the best available 16:47 <@matricks> also will depend on where you do it I guess 16:47 <@matricks> stack vs heap 16:47 < EastByte> well memset would zero all the memory even padding in structs 16:49 <@matricks> why don't do a test-case and see how it behaves? :) 16:49 < JulianAssange> i ended up just doing that variable as static 16:49 <@matricks> NOOOOOOOO 16:49 < EastByte> YEESSS 16:49 * matricks hits JulianAssange with a stick 16:50 * minus np: Dream Theater - Only A Matter of Time 16:52 <@matricks> JulianAssange: why did you make it static? 16:53 < JulianAssange> because i don't want to malloc it 16:53 <@matricks> ... w... why did you have to malloc it? 16:53 < botnik> http://en.wikipedia.org/wiki/Ellipsis 16:53 < heinrich5991> EastByte: that's faster than selectively zeroing 16:53 <@matricks> what was wrong with my function? :(( 16:53 < JulianAssange> ... w... why did you have to malloc it? 16:53 < botnik> http://en.wikipedia.org/wiki/Ellipsis 16:53 < JulianAssange> ... w... 16:53 < botnik> http://en.wikipedia.org/wiki/Ellipsis 16:53 < EastByte> ._. 16:53 < botnik> http://www.urbandictionary.com/define.php?term=._. 16:53 < EastByte> heinrich5991: yea, right 16:53 < JulianAssange> ... 16:53 < botnik> http://en.wikipedia.org/wiki/Ellipsis 16:54 < JulianAssange> i liked your function matricks but i want it to return the data 16:54 <@matricks> JulianAssange: why? 16:55 <@matricks> the function becomes dangerous as you did it 16:55 <@matricks> with side-effects 16:56 < JulianAssange> like what? 16:56 <@matricks> you can't call the function twice for an example 16:57 < JulianAssange> o 16:57 <@matricks> second call will ruin the return value of the first call 16:57 <@matricks> severe side-effect 16:58 < heinrich5991> (even if it still keeps the pointer) 16:59 < JulianAssange> i'll think about this function when i wake up 17:00 < JulianAssange> i've only ever needed to return a char pointer 17:00 < EastByte> JulianAssange: think about all the cstring format functions, how do they return "data"? 17:01 < JulianAssange> what do you mean? 17:02 < EastByte> strncpy() for example, you pass a pointer to a buffer so strcpy can store its data in it 17:02 < JulianAssange> how about i just don't return an array, but a "," seperated string 17:02 < EastByte> like matrick's version of the function 17:03 < EastByte> what?!! 17:03 < JulianAssange> :^) 17:03 < heinrich5991> JulianAssange: why not return a pre-free-d dynamic allocation 17:03 < heinrich5991> so the user doesn't have to bother 17:03 < heinrich5991> with the deallocation 17:04 < JulianAssange> what? you can do that? 17:06 <@matricks> heinrich5991: what? 17:06 < heinrich5991> matricks: /s 17:06 < JulianAssange> k 17:06 < JulianAssange> time to sleep 17:06 < JulianAssange> then i think of what i want to do 17:06 <@matricks> heinrich5991: pre-free-d dynamic allocation? is that what I think it is? 17:06 < heinrich5991> yes :) 17:06 <@matricks> heinrich5991: aka a horrible idea 17:07 < EastByte> heinrich5991: freeing the memory and using it after it? 17:07 < JulianAssange> uninitalized memory ftw 17:07 < JulianAssange> well, not really uninitalized, but whatever 17:07 < heinrich5991> yes. I know it's hard to convey a joke over the interwebs :) 17:07 < heinrich5991> and apparantly I failed 17:07 < EastByte> :p 17:08 < heinrich5991> and yes, this was about 17:08 * minus silently places a shared_ptr in the room and observes 17:09 < heinrich5991> char *strcpy_cool(const char *zero_terminated) { char *result = strdup(zero_terminated); free(result); return result; } 17:09 < heinrich5991> minus: why no unique_ptr? 17:09 < JulianAssange> kek 17:09 < heinrich5991> minus: because you like atomic instructions? 17:10 < JulianAssange> call it "memory roulette" @ that function heinrich5991 17:10 < heinrich5991> JulianAssange: :D 17:13 <@minus> heinrich5991: what's that got to do with atomic instructions? 17:14 < heinrich5991> minus: shared_ptr needs atomic instructions to do thread-safe reference counting 17:16 < JulianAssange> matricks: your function is good actually 17:16 < JulianAssange> i will then just make a third function to do port 22,25,53 17:16 < JulianAssange> (or whatever I choose later, since 22,25,53 are just for tests) 17:44 < JulianAssange> http://pastebin.com/SB72icMg matricks 17:44 < JulianAssange> that was the end result 17:46 < JulianAssange> i guess I could rename it a void 17:47 < JulianAssange> st", b, 2, output); <- should be 'l' instead of output 17:50 < JulianAssange> i guess i could get rid of the pointer 'b' and join use 'a', but whatever 17:51 < JulianAssange> alright but really time for sleep. cya 17:52 <@matricks> wtf 17:53 <@matricks> still, dor for( unsigned i,... 17:53 < Learath2> you could simply pass a to the function 17:53 <@matricks> unsigned short output[sizeof(a)] = {0}; 17:54 <@matricks> that line is wrong 17:54 < JulianAssange> how come? 17:54 <@matricks> yeah, you need to work on your pointer arethmetic 17:54 < JulianAssange> that's what i have it as actually Learath2 17:54 < EastByte> sizeof() is the number of bytes, not the number of elements 17:54 <@matricks> that while-loop should be an for loop 17:55 <@matricks> the return value of MultiPortScan is wrong 17:55 < JulianAssange> no, it's meant to be while() 17:55 <@matricks> why when you are looping over an integer? 17:55 <@matricks> ARGH! 17:55 <@matricks> that code ... ARGH!@$! 17:56 < EastByte> let him take a sleep please :> 17:56 < Learath2> Wouldnt sizeof fail if the number of elements isnt known at compile time 17:56 < JulianAssange> it is known at compile time 17:56 < JulianAssange> i just can't count to 3 17:57 <@matricks> there are so many errors in that code... 17:57 <@matricks> JulianAssange: go and sleep and fix it when you wake up 17:57 < heinrich5991> Learath2: c99 can have variable-length array 17:58 < EastByte> ^ sizeof() would fail there right? 17:58 < Learath2> heinrich5991: but im not sure if sizeof would work runtime 17:58 < heinrich5991> yes it does work 17:58 < Learath2> afaik it is evaluated at compile time 18:00 < heinrich5991> yes 18:00 < heinrich5991> if it's not a variable len gth array 18:00 < EastByte> lol why does that work 18:00 < JulianAssange> btw, the function works well. j/s 18:01 < EastByte> char array[argc]; 18:01 < EastByte> printf("size: %u\n", sizeof(array)); 18:01 < EastByte> so sizeof() is doing stuff at runtime there? 18:03 < EastByte> "If the type of the operand is a variable length array type, the operand is evaluated; otherwise, the operand is not evaluated and the result is an integer constant." 18:03 < EastByte> okay 18:04 < Learath2> does work if its a vla 18:04 < EastByte> wondering why dynamic allocation on stack is used so rarely 18:05 < JulianAssange> ok nvm, i see what you mean about the pointer arithmetic 18:06 <@matricks> EastByte: support issues 18:07 < Learath2> [18:55:35] <@matricks> why when you are looping over an integer? 18:08 < Learath2> what should be looped on ? 18:08 < JulianAssange> i assume he means it should be l++;, not *l++; 18:08 < JulianAssange> but idk 18:09 < JulianAssange> because the while() will just keep going until it reaches the end of the pointer, no? 18:09 <@matricks> Learath2: he loops over the pointer instead of a number 18:10 <@matricks> the output array is twice the size of the input which isn't needed 18:10 < EastByte> JulianAssange: end of the pointer?! 18:10 < EastByte> there is no boundary 18:10 <@matricks> he modifies the output while he is iterating over it for no reason 18:10 <@matricks> everything is just unnessary long and complex 18:10 < Learath2> how does it even work out at the end :D 18:11 < JulianAssange> it works 18:11 <@matricks> it "works" 18:11 < JulianAssange> :^) 18:11 <@matricks> it's just.. well.. very ugly 18:11 < Learath2> how could it "work" if he is boggling his data while iterating over it 18:11 < EastByte> "if it works, you did something wrong" 18:11 <@matricks> you can see at the code that the programmer really doesn't know what he is doing 18:11 <@matricks> his intent isn't clear 18:12 <@matricks> unnessesary operations and wrong kind of operations 18:12 < Learath2> that return oPort seems unnecesary isnt it 18:12 <@matricks> it's kinda luck that it works 18:12 < JulianAssange> yes Learath2 18:12 <@matricks> Learath2: well, yes 18:12 <@matricks> Learath2: he should return e 18:12 < JulianAssange> or change it to a void 18:12 < JulianAssange> but i changed it to return e 18:13 <@matricks> and the whole while should be an for loop 18:13 < JulianAssange> whyyyy 18:13 <@matricks> and output should be the same size as a 18:13 < JulianAssange> what is wrong with the while(*pointer) 18:13 < EastByte> it's just wrong 18:14 <@matricks> that just works because the output array is twice the size of a 18:14 < Learath2> yeah if it was the same size after you go over the boundry it would be garbage but you'd keep going 18:14 <@matricks> and also, if you are looping over an pointer, do it with a for loop 18:14 < Learath2> as *l != NULL 18:14 <@matricks> for(byte *p = init; *p; p++) 18:15 <@matricks> shows the intent of the loop and contains the iterator in the loop-scope 18:15 <@matricks> variables should only live as long as they have to 18:16 < Learath2> if i were to write this it would be full of ints instead of all those specific types would that be bad ? 18:16 < JulianAssange> they're all handling port numbers, so no need for 2.14b 18:16 < EastByte> depends on the hardware you are using 18:17 < EastByte> JulianAssange: handling normal integers should be faster though 18:18 < JulianAssange> probably 18:18 < JulianAssange> unsigned short c = MultiPortScan("localhost", a, 5, output); 18:18 < JulianAssange> for(unsigned int i=0; i } 18:18 <@matricks> http://pastebin.com/j3742EuP 18:18 < JulianAssange> http://pastebin.com/YL7XX5Mj 18:19 < EastByte> looks the same 18:19 < JulianAssange> line 20 on matricks' doesn't exist on mine 18:20 < JulianAssange> i changed it to unsigned short output[sizeof(a)/sizeof(a[0])] = {0}; however 18:20 < Learath2> matricks: unsigned count = MultiPortScan("localhost", a, 2, output); shouldnt the 2 be replaced with num 18:20 < JulianAssange> yes 18:21 <@matricks> wrote it quickly, didn't check 18:23 < JulianAssange> that while() loop, that could be used if you allocate +1 to it though, no? for a mandatory nul at the end 18:23 < JulianAssange> it wouldn't e very robust, but it would work, yes? 18:25 <@minus> JulianAssange: how about using C++? could make things easier 18:28 <@matricks> still needs to know how pointers and arrays work 18:31 < JulianAssange> this is the only time i've ever used an int array tbh 18:32 < JulianAssange> everything else has been strings 18:33 < JulianAssange> ok srsly i'm going to sleep now 18:34 < JulianAssange> but while i'm gone, take a look at the only other while() in my code: http://pastebin.com/tHTTSUTi any problems with it? 18:34 < JulianAssange> night! 18:34 < EastByte> funny guy 18:39 < fstd> 15:36:20 < matricks@> JulianAssange: because that sizeof will return 6 18:39 < fstd> sizeof doesn't return anything, stop treating it like a function 18:40 < EastByte> ^ does it work like a function on variable length arrays? 18:40 <@matricks> fstd: returns, evaluates.. whatever :) 18:42 < fstd> it's bad enough that people keep adding redundant parenthesis to it to make it look even more like a function 18:42 < fstd> EastByte: sure it evaluates is operand if it's a VLA 18:42 < EastByte> but in definition it's still not a function? 18:42 < fstd> still a far cry from 'works like a function' because a function who is given a VLA still acts differently 18:42 <@matricks> those are usually added for clearaty 18:42 < fstd> it's a function nowhere 18:42 < EastByte> okay 18:43 < fstd> matricks: i never understand how that's any clearer, tbh 18:44 < Learath2> whats the operator precendence of sizeof ? 18:44 < fstd> when i see parens on sizeof, i first assume they're there for a reason 18:44 < fstd> Learath2: pretty high 18:44 < fstd> only () [] -> and . bind stronger 18:44 <@matricks> fstd: sizeof MyClass * 2 just looks a bit wierd :) 18:44 < Learath2> how would sizeof x + 2 be evaluated ? 18:45 < fstd> Learath2: (sizeof x) + 2 18:45 <@matricks> syntax wise there are so many things that are fucked up in c/c++ so 18:45 < fstd> matricks: "weird" because of you being used to the parens, i think. i think it's clearer that way 18:45 < Learath2> see i would have said sizeof(x + 2) 18:45 < fstd> Learath2: so? 18:45 <@matricks> fstd: what is worse I think is where people put const and volatile 18:46 < Learath2> having parens makes it unambiguous for everyone i think 18:46 < fstd> Learath2: having parens makes it easier to read for people who don't know their C, and more difficult to read for people who do 18:46 <@matricks> const int * 18:46 <@matricks> const int const * 18:47 <@matricks> const int * const 18:47 < fstd> matricks: but volatile makes everything magically thread-safe ;) 18:47 <@minus> you can't expect everyone to know the operator precedence by heart, it doesn't even matter in 99.9% of cases 18:47 <@matricks> that is more of a problem however 18:47 < fstd> the first two are the same... 18:47 <@minus> matricks: better than not putting const anywhere 18:47 < Learath2> const int const * const for the win 18:47 <@matricks> minus: well, the thing is that the exception is the common case which people use it 18:47 <@matricks> minus: which causes problems 18:48 <@matricks> putting volatile on the wrong thing for example causes some nice bugs 18:48 <@minus> like what 18:48 < fstd> i daresay that is quite unlikely unless the code w/o volatile depends on UB or something 18:49 <@matricks> UB? 18:49 <@matricks> oh 18:49 <@matricks> well, no 18:49 <@matricks> there are loads of threading-stuff you can do with only some volatile and atomic read and writes 18:50 <@matricks> but yeah, the memory model in c/c++ isn't well defined so to speak, but it's kinda agreed apun 18:50 < fstd> volatile isn't for threading 18:50 <@minus> what does volatile do exactly? 18:50 <@matricks> fstd: I use it for threading :) 18:50 <@matricks> minus: it forces read and writes to that variables 18:50 <@matricks> *variable 18:50 <@matricks> minus: tells the compiler that something else might read, write or react on it 18:51 <@minus> instead pf using register-cached values? 18:51 < Learath2> it makes the compiler not optimize out the continuous reads 18:51 <@matricks> more commonly used on low-level hardware stuff 18:51 <@matricks> minus: yes 18:51 < fstd> minus: it causes access to the object in question to be performed strictly by the rules of the abstract machine 18:51 < fstd> is how the standard puts it 18:51 <@minus> but doesn't prevent cpu caching 18:51 <@matricks> minus: no :) 18:51 <@matricks> that why you need volatile + barriers todo threading more or less 18:52 <@matricks> syncs or whatever your platform calls em 18:52 <@matricks> fences 18:52 <@minus> i invalidate my L1 cache after every instruction 18:52 < fstd> only place i ever use volatile is when something is changed by an interrupt serice routine 18:53 < fstd> in threading, withj some actual synchonization in place, there's no need for it, at least AFAIK 18:53 <@matricks> fstd: you can see it in wait-free threading structures 18:53 <@matricks> think there are some in teeworlds :) 18:53 < Learath2> CJob has one 18:54 <@minus> i was looking for it recently, did not find it 18:54 <@matricks> master branch doesn't have it 18:54 < Learath2> 0.6 does maybe oy threw it out 18:55 <@matricks> fstd: https://github.com/matricks/teeworlds/blob/ressys/src/base/tl/ringbuffer.h 18:55 <@matricks> fstd: there you have some 18:55 <@matricks> fstd: the mwsr version isn't wait-free but the swsr is 18:56 <@matricks> the mwsr is mostly wait-free ;) 18:56 < fstd> but only the mwsr has volatile 18:56 < fstd> maybe i misunderstood you before 18:56 <@matricks> oh yeah, the srwr doesn't need it >.< ;D 18:56 <@matricks> just needs the barrier 18:57 <@minus> how sensible is using that stuff on android? 18:57 <@minus> and iOS? 18:57 <@matricks> well, very 18:57 <@matricks> very lightweight and quick, but there are some stuff with it that should be fixed 18:58 <@matricks> the put,write,get should be 64/128bytes big 18:58 <@minus> so you wouldn't expect any issues? 18:58 <@matricks> minus: no 18:58 <@matricks> the ringbuffers should also be aligned to 64/128 18:58 <@matricks> for some added performance :) 18:59 <@minus> alignment to cache rows, yes 18:59 <@matricks> ya 18:59 * minus knows 18:59 * minus knows it all 18:59 <@minus> hardly 18:59 <@matricks> if put,write,get is on the same cache line, well, they will compete more then they need 19:00 <@matricks> and depending on the arch this can be very bad, if archetectures that only have one cache line reserve for example 19:00 * matricks glares at the ps3 19:02 < Learath2> why are all consoles so limited on memory matricks 19:02 <@matricks> Learath2: what do you mean? 19:03 <@matricks> quick! hide the sheep! 19:03 < Learath2> Ps3 has 256mb of ram iirc 19:03 <@matricks> 256mb ram, 256mb vram 19:04 <@matricks> wasn't that bad 19:04 <@matricks> the console is like 10 years old 19:04 <@matricks> sorry... 9 19:04 <@minus> close enough 19:05 <@matricks> how much memory did you have in your computer at home 9 years ago? 19:05 < Learath2> i was far too young to check the memory of my computer :D 19:05 <@minus> 384MB iirc 19:05 <@minus> upgraded from 128MB 19:05 * minus just ordered a second 8GB stick 19:05 <@minus> 8GB is too little! 19:06 <@matricks> Learath2: well, there is your answer, it has not a lot of memory due to the fact that it's very old :) 19:06 <@matricks> Learath2: gonna ask about the current generation next? :) 19:06 <@minus> 3.8G in use, and i'm not even running an IDE 19:06 < Learath2> matricks: didnt quite remember ps3 being that old 19:07 < Learath2> i think ps4 has 256 mb of ram too tho 19:07 <@matricks> lol, no 19:07 <@matricks> 8gb 19:07 <@matricks> which is more then most pcs 19:07 < Learath2> thought that was just vram 19:07 <@matricks> no 19:07 <@matricks> ps4 doesn't have vram 19:07 <@matricks> :) 19:08 < heinrich5991> wats vram? 19:08 <@minus> video ram 19:08 <@minus> matricks: is the ps4 better to handle than the ps3? 19:08 < Learath2> matricks: ps4 shares it all ? :D 19:08 <@matricks> Learath2: yeah, it's a unified memory system like the 360 19:08 <@matricks> minus: yup 19:09 <@minus> no more silly cell arch :D 19:09 <@matricks> Learath2: which has some really nice benefits 19:09 <@matricks> minus: the cell arch is really cool, but a bitch to work with :) 19:09 <@minus> having unified memory makes sense when the GPU is on the same die as the CPU, right? 19:09 <@matricks> minus: well, not just that 19:09 <@minus> matricks: ya 19:10 <@matricks> you can be more flexible, not as much transfers needs to happen etc 19:10 <@minus> obv yeah 19:10 <@matricks> cpu can generate stuff directly to the gpu 19:10 <@matricks> the problem current is storage media actually 19:10 < Learath2> does it make a lot of difference that the transfer time is eliminated between gpu and cpu ? 19:10 <@matricks> Learath2: a bit yes 19:11 <@matricks> PC is lagging behind _HARD_ when it comes to storage media now 19:11 <@minus> optical media slooooooooow 19:11 <@minus> and harddisks aren't much better 19:11 <@minus> are SSDs not good enough? 19:11 <@matricks> minus: speed isn't the problem 19:12 <@matricks> minus: it's the amount of storage you have 19:12 <@matricks> which is becoming the pressuring issue 19:12 <@minus> generate your high detail textures in memory then 19:12 <@matricks> the issue is delivering the game to the buyer 19:13 <@matricks> and here PC sucks ass at the moment 19:13 <@minus> downloads? 19:13 <@matricks> downloads are nice yes, but you can't rely on it 19:13 <@matricks> and you can't release on bluray, because the installbase is terrible, so you are stuck with DVDs 19:13 <@minus> well, downloading 100G isn't exactly nice either 19:13 <@matricks> hence, the problem 19:14 < EastByte> so texture generation isn't an option? 19:14 <@minus> solution: ship HDDs 19:14 <@minus> EastByte: hard to do good textures and slow, i'd say 19:14 <@matricks> EastByte: well, you need data to generate from.. and generated stuff.. well. looks generated :) 19:14 <@minus> generated stuff doesn't contain much information 19:15 < EastByte> 3d models are heavy aswell 19:15 <@matricks> there are tricks to artifically increase texture fidelity, but it kinda sucks 19:15 <@matricks> EastByte: meh kinda 19:15 <@matricks> EastByte: texture + sounds are easily a bigger problem 19:15 < EastByte> really? 19:16 <@matricks> yah 19:16 <@matricks> sound takes up a lot of space as well 19:16 <@matricks> even the 50gb blurays are kinda tight 19:16 <@matricks> we could deliver a game that takes 200gb if we just had a way to deliver it 19:17 <@matricks> with really nice textures etc 19:17 < EastByte> is the ram suitable for such textures? 19:17 <@matricks> EastByte: what do you mean? 19:18 < EastByte> is there enough space 19:18 < EastByte> or do you need to load / unload the textures all the time 19:18 <@matricks> textures are streamed always 19:18 < EastByte> huh? 19:18 < EastByte> from harddrive? 19:18 <@matricks> or disc yah 19:18 < EastByte> wow, sounds horrible slow 19:19 <@matricks> all games does it more or less 19:19 <@matricks> like the textures in rage/wolfenstein.. the texture for the levels are usually 128kx128k 19:19 <@minus> in tiles? 19:19 <@matricks> in pixels 19:19 <@minus> i mean, divided into tiles on disc? 19:19 <@matricks> into pages on disc yes 19:20 <@matricks> one of those textures.. raw, in memory would be roughly 300gb 19:21 <@minus> either i just made a mistake or that's 45G of uncompressed image data 19:21 <@matricks> minus: that is correct 19:21 <@minus> (24bit) 19:21 <@minus> sweet baby jesus 19:22 <@matricks> and we could easilly generate bigger ones :) 19:22 <@minus> "generate" 19:22 <@matricks> but.. well, no way of delivering that one 19:22 < EastByte> you generate them to store them afterwards? :D 19:23 <@minus> ffffffffff 19:23 <@minus> i want to brush my teeth 19:23 <@matricks> the texture is created by a lot of other textures, so during development we render the big 128kx128k using the source textures.. and during that process we scrap a lot of texture data to fit 19:23 <@matricks> the full resolution of the source data isn't used 19:24 <@minus> do you have a SAN? 19:24 < Learath2> matricks: couldnt you ship a readonly usb or smth ? :D 19:24 <@matricks> Learath2: costs to much 19:24 <@matricks> *too 19:24 <@matricks> minus: dunno, loads of storage at work, thats for sure 19:24 <@minus> that'd like double the price, Learath2 19:25 < Learath2> generate the textures at install time ? 19:25 <@matricks> Learath2: lol, no 19:25 <@matricks> Learath2: the source material is even bigger 19:25 <@matricks> thats several terabytes of data 19:26 <@minus> terror bites 19:26 < EastByte> matricks: have you faith in new stuff like this? http://www.extremetech.com/gaming/178166-1tb-per-disc-sony-and-panasonic-team-up-on-next-gen-blu-ray 19:26 < Learath2> felt stupid i assumed it was some kind of algorithm generating the textures 19:27 <@matricks> EastByte: well... 19:28 <@matricks> EastByte: thats like 8 years away... 19:28 <@minus> just ship on HDDs 19:29 < Learath2> Hdds are cheaper per gb arent they ? 19:29 <@matricks> yah, still not cheap 19:30 < Learath2> 0.03$ per gb and thats considering you arent buying in bulk how is that expensive ? 19:31 <@matricks> moar like 0.04$, problem is that you can't get a drive that is 100gb :) 19:32 <@matricks> to get those cheap prices per gb, you have to go up to >3TB discs 19:33 < Learath2> tell seagate that X game studio will buy around 3 million 100gb hdds from you theyd prolly consider that 19:33 <@matricks> don't think they can make em that cheap 19:33 <@matricks> it doesn't scale like that 19:33 <@matricks> there is a fixed cost for the circut boards etc 19:33 <@matricks> motors 19:34 < Learath2> how much is a bluray ? 19:34 <@matricks> next to nothing :) 19:35 <@matricks> discs you can buy is like 0.6$ USD 19:36 < Learath2> Ship on 3 blurays 19:36 <@matricks> Learath2: on consoles, sure.. and on pc? 19:36 <@matricks> thats the problem.. pc users 19:36 <@matricks> they don't have bluray, stuck to release on DVDs 19:37 < Learath2> didnt know many didnt upgrade to bluray i indeed did upgrade to bluray 19:37 < Learath2> well if every game studio releases only on bluray and download would people give up playing games ? 19:38 <@matricks> you go a head and make that step :) 19:38 <@matricks> hmm.. steam hw survay doesn't list optical drives :/ 19:38 < Learath2> Learath inc. is now releasing games in blu ray !!! 19:38 < chsk> it does 19:38 < chsk> it doesn't recognize bluray though 19:38 <@minus> hey chsk 19:38 < chsk> o/ 19:39 <@matricks> chsk: huh? 19:39 <@minus> how's it going 19:39 < chsk> http://puu.sh/fUJG1/02f1891cb4.jpg 19:39 <@matricks> oh.. if I check windows only it does 19:39 <@matricks> ahh 19:39 <@matricks> so. if you are lucky.. 14%? :D 19:39 < chsk> way worse 19:39 < Learath2> undetermined is prolly bluray :D 19:40 < chsk> people that take the survey usually are the more competent pc users 19:41 < chsk> and it doesn't include chinese users at all 19:41 <@minus> actually it does ask 19:41 <@minus> i just started steam and it's asking me to take the survey 19:42 <@matricks> that reminds me, I should play some games 19:42 < chsk> 8gb is the standard then? 19:42 <@matricks> ish, or less 19:42 < chsk> also wow valve went full-retard with their recent dota event 19:42 <@matricks> huh? 19:42 <@minus> oh, i have the most prominent graphics card 19:43 <@matricks> minus: that is most likely :D 19:43 <@minus> hm actually no, i have the HD 4400 19:43 < Learath2> matricks: still hon? 19:43 <@matricks> some times 19:43 < chsk> basically there's this special variation of the usual game mode that can only be queued for within 10-minute windows that are announced an hour before 19:43 < chsk> so far, whenever they did that (every 4 hours), their network died 19:43 <@minus> :D 19:44 < Learath2> what were they expecting :D 19:44 <@matricks> well, I'm gonna try this game out now 19:45 < Learath2> matricks: what are you trying out ? 19:45 <@matricks> This war of mine 19:45 < chsk> also, there's a bunch of games that were never distributing physically, and they sold successfully 19:46 <@matricks> chsk: yes, but they are probably a lot less then a 50gb download :) 19:46 < chsk> correct 19:46 <@minus> matricks: are you coming to germany during the easter weekend? 19:46 <@matricks> minus: don't think so :D 19:46 < chsk> although i liked that i could download wolfenstein instead of buying 4 dvds. 19:46 <@minus> :P 19:47 <@matricks> chsk: you still had to download like 10gb more 19:47 < chsk> even with those dvds? 19:47 <@matricks> yah 19:48 <@matricks> too much data 19:48 < chsk> tbh i had to download a day 1 patch anyway 19:48 <@minus> 10 gigs.. takes like 3-4 hours 19:48 < chsk> wot 19:48 <@matricks> now, gaming 19:48 <@minus> hf 19:48 * minus np: Marcel Donné - Knucklebusters 19:48 < chsk> where do you live 19:48 < chsk> :v 19:48 <@minus> god damn this tune is annoying 19:49 <@minus> ok, let's say 2 hours 19:49 < chsk> would be half an hour for me 19:50 < Learath2> 10g for me is around 5 hours on a good day 19:50 * minus np: Jonathan Coulton and GlaDOS - 12 - Still Alive 19:50 <@minus> better \o/ 19:50 < chsk> how do i np spotify 19:50 < chsk> from remote irssi 19:51 <@minus> write a script that does dbus magic 19:51 < Learath2> When the science is done and you make a neat gun for the people who are still alive :) 19:51 < chsk> spotify on windows* 19:51 <@minus> either with some serious magic or just do it like make, make it copy to clipboard 19:51 <@minus> ouch 19:52 < chsk> o, xposed for 5.0 19:52 < chsk> cool