16:11 < gurun> funny how you seem to think RAID will speed things up? 16:12 < gurun> you must mean SSD drives? 16:12 < gurun> i have that on my laptop. And it's probably the single best boost to Visual Studio you can buy for money. Cut's the compile time down to a minimum. 16:13 < morfin> C# compiles not so long time 16:14 < morfin> at least i was compiling some server it took not so much as i expected 16:14 < gurun> lol 16:14 < morfin> C++ code would compile waaaay longer ) 16:14 < gurun> "how long is a string" 16:15 < morfin> because of templates, lots of preprocessor directives and when compiled linking is long 16:16 < gurun> hehe. 16:17 < gurun> well, SSD helps with the IO operations during compile .. not with bad code :-) 16:17 < morfin> =) 16:17 < morfin> i was interested how Minecraft usually save changes 16:17 < gurun> like .. making sure that your anti-virus doesn't pick it up too .. after all you are creating DLL's .. they tend to dissagree and inspect. 16:18 < gurun> how MC save changes. You mean .. like how it writes it to disc? 16:18 < morfin> does it store changes in memory and just commit in some periods? 16:21 < gurun> if i would tell you that they store it straight to disc on every change, would you learn something from that? 16:22 < morfin> i am not sure only in one thing 16:23 < morfin> rollback for 5 minutes in case on emergency sounds like a very bad thing 16:23 < gurun> ok. turn it around then. If i would tell you that they store it independently, what would you learn from that? 16:23 < gurun> i'm not trying to be evil. Just pointing to the obvious. It doesn't matter how they do it. 16:24 < gurun> but as a comersial entity, if i would be Mojang, i would be a bit careful about wasting stuff in case of a crash. So i would probably try to store it safetly. 16:25 < gurun> but the question about this is probably best considered like this; while the disc is busy storing stuff, what can you do while waitin? 16:25 < gurun> that's when threading come in. 16:25 < morfin> btw that's not very common situation when server in data-center just turn off 16:26 < morfin> of course if you have server on your PC ) 16:26 < gurun> hehe, they crash all the time for us :-) 16:26 < morfin> you will have some issues if have no APC etc 16:26 < gurun> but that's why we also let the db handle the transactions :-P 16:27 < morfin> but loosing 5 minutes in Minecraft is not bad as loosing 5 minutes in banking 16:27 < gurun> well, imagine my company loosing 5 min of global trading? 16:27 < morfin> as example 5 minutes of transactions between databases 16:27 < morfin> :D that's a different case 16:28 < gurun> you can build a shitload of stuff in MC in 5 minutes you don't want to loose. But it's not the end of the world, no. 16:28 < morfin> btw if you want to change block you have to serialize whole chunk 16:28 < gurun> So you would ask you *users* what they rather have. Realtime performance, or realtime safe data. 16:29 < morfin> hmm 16:29 < morfin> so you think saving every block after every change is a good idea? 16:30 < gurun> the problem could be a bit more sever, if you have your "ipad" playing with another "ipad" .. and the "server ipad" crashes. And you loose 20 min of game-play. 16:30 < morfin> lol 16:30 < gurun> i think most would find that hard to accept. 16:30 < morfin> let's imagine i will explode 1000 TNT on your crappy ipad server) 16:31 < gurun> so, yeah. For all scenarios i think it is absolutley best to have the rule of thumb to always secure the transactions. 16:31 < gurun> who knows, it could very well be that you just bought a diamond armour from a store in a multiplayer hosted server. 16:31 < morfin> so you would try to calculate every explosion and write changes to disk 16:31 < morfin> "storage" 16:32 < gurun> so, if you would exploade 1000 TnT on my even very good server, it would most likely create an issue yes. But a rather small one to be honest. 16:32 < morfin> but so save you would have to serialize every changed chunk each time 16:33 < gurun> morfin, that really depends on how you store stuff, right. Do you think that everytime we do a new trade, we store the milions of trades happening before that, in a chunk too? 16:33 < morfin> what do you mean? 16:34 < gurun> how you store stuff is entirely up to you as an implemeter right. 16:34 < gurun> maybe you have a database that stores block by block. 16:34 < gurun> and chunks is just a matter of a foreign key that you can group it by, and use in queries. 16:35 < gurun> or maybe you write a file to disc for every single block. 16:35 < gurun> i mean .. it is really totally up to you. 16:35 < gurun> again, ask your users; what do you want more, performance or save disk space? 16:36 < morfin> btw i think i know what i can do 16:36 < morfin> but i will have to use more memory hmm 16:36 < gurun> do you have a server up and running already? 16:36 < morfin> no 16:36 < gurun> ok. 16:37 < gurun> i cash everything in memory .. but it's not exactly a problem. 16:37 < morfin> just use chunk cache 16:37 < morfin> so i will have compiled NBT in memory 16:37 < gurun> i have even the serialized packets in memory so i just send them again. 16:38 < gurun> but you do know that if you have lots of changes, a cache can become counterproductive too. 16:38 < gurun> and even worse, having a cache introduce a layer of complexity in design that likely would make transaction safety a bit difficult. 16:38 < gurun> you have to ensure that the state of the cache always reflect the state of the persistent store. 16:39 < gurun> stuff that SQL server does, but not us humans. 16:39 < morfin> hmm 16:40 < gurun> Here is some history to get you started. 16:40 < gurun> When i did MiNET, i couldn't deal with even 50 users. 16:40 < gurun> and then 70 16:40 < gurun> and then 120 16:40 < gurun> and then suddely 500., 16:40 < morfin> but did you write changes instantly? 16:40 < gurun> it's a learning processes. Even for me doing coding 24/7 as a professional. 16:41 < morfin> ow 16:41 < gurun> i started with the most fundamental things of it all. Making it work. 16:41 < gurun> i could easily sit down and design in my head a super performant storage, but up till today, the need has not yet arised :-P 16:42 < gurun> so any thought given to that, would take the CPU of my brain from somethin else. It's always running at 100% and i can never have enough threads. It's a single core 386 at best. 16:43 < gurun> ..and i promise, there is no math-processor in it. 16:43 < gurun> ..but the GPU is great for processing naked gfx. 16:44 < gurun> i can just promise you this; that by the time you are able to spawn the players, read the chunks, send the chunks, your mind will be elsewhere, not on IO on write. 16:45 < gurun> you have to be able to do explosives before trying to store the aftermath, right. 16:45 < gurun> if you don't do water or lava, you don't have to store the changes either. 16:58 < barney_> I always thought PVP minigames would be a first good milestone for a server implementation 16:58 < barney_> it allows you to conceivably ignore things like plant growth or mob AI 16:58 < barney_> but you still need to get the basics right 17:21 < gurun> barney_: couldn't agree more 17:21 < gurun> so that's how it starts, and then you get derailed :-) 17:22 < gurun> ..and soon after that you realize just how massive a game it is, and then you give up. Join the world of RIP MC-clone servers. 17:24 < gurun> .. and as a final chapter you start hanging out in IRC #mcdevs giving bad advice to kids that can't code (occationally they work for Mojang too - not the kids), and dream of the days when Minecraft was simple. Occationally writing something to blame Mojang for further development of the game and bash them for adding new features while you can hardly keep up implementing the chunk-loading. 17:26 < gurun> The other route is of course that you succeed, end up having 20k followers on Twitter, all under 10y. 18:28 < nickelpro> gurun, morfin: you guys have code up anywhere? 18:30 < gurun> nickelpro, no we decided that the minecraft protocol is so bad that it is no idea to start. 18:31 < nickelpro> The protocol has been implemented a dozen times over in as many languages, you don't have to implement it yourself 18:32 < nickelpro> Java, Python, C#, C++, JavaScript, take your pick 18:34 < gurun> yeah, i just think you need to re-read that discussion again. 18:35 < gurun> it started as a discussion around permance and design around the protocol, and then to the real problem; IO writes on world-saves. 18:35 < gurun> and in the end the question i had was the same, did you actually start writing any code? The answer is of course no. 18:45 < techkid6> Hey, I'm trying to decode mc protocol's "position" type, I think my issue is in encoding and not decoding, but, I can't tell wht is wrong. I encode it and get a long, then when i decode i get back the x and y coords but the z returns as the original value... 18:46 < Xor_Boole> code 18:46 < Xor_Boole> pls 18:46 < techkid6> I'm in python, let me get my source http://pastebin.com/y4nsYnkf based on the spec from wiki.vg 18:46 < techkid6> Xor_Boole: hold your horses i'm pastebinning it :P 18:46 < techkid6> <3 18:46 < techkid6> that is essentilly a copypaste from.. http://wiki.vg/Protocol#Position here 18:47 < techkid6> >>> position.encode(100, 256, 100) 18:47 < techkid6> 27504970563684 18:48 < techkid6> >>> position.decode(27504970563684) 18:48 < techkid6> (100, 256, 27504970563684L) 18:52 < techkid6> I found it weird in the spec that we move 38 to the right then 38 to the left, but, maybe thats just me 18:52 < techkid6> rather left then right 18:54 <+Fador> from the encoding you can see that z = pos & 0x3FFFFFF 18:56 < techkid6> Ah 18:56 <+Fador> the shifting works if the value is limited to 64 bits ;) 18:57 < techkid6> Ok, so after decoding with the 0x3FFFFFF/// 18:57 < techkid6> (100, 256, 100L) 19:02 < techkid6> and i got rid of the bit shifting and it is all better 19:04 < techkid6> win 72 19:07 < techkid6> Fador: Thanks for that, I feel quite silly now 19:15 <+Fador> You're welcome =) That example code in the wiki is a bit strange in the way it handles the z value ;) 19:46 < Thinkofdeath> Fador: pretty sure thats to keep negatives working correctly (moving the sign bit into the correct place) 19:48 <+Fador> Thinkofdeath: oh right, makes sense =) 19:49 <+Fador> so that has to be handled differently in python ;) 19:53 < techkid6> Fador: Yeah, python likes handling things oddly :) whatever, my code still likes to not work but now its for a completely different reson xD at least the position bit works 19:56 <+Fador> techkid6: you should try with negative x and z ;) 19:57 < techkid6> OH GOD WHY 19:57 * techkid6 sobs 19:58 < techkid6> wow that s totally awful 20:01 < techkid6> Fador: you know what? screw it. I am using this code for one little script so i can read and write sign dataa 20:01 < techkid6> because using x y z as athree doubles is bad? 20:05 <+Fador> you could also do something like if(pos & 0x2000000) z = -pos & 0x3FFFFFF else z = pos & 0x3FFFFFF .. 20:06 <+Fador> hmm wait that does not work =b 20:06 <+Fador> z = -(pos & 0x3FFFFFF) maybe 20:07 < techkid6> maybe, and with x the same but bitshifted? 20:07 <+Fador> if(pos & 0x2000000) z = -(-pos & 0x3FFFFFF) else z = pos & 0x3FFFFFF 20:08 <+Fador> ok, this might even work ;D 20:08 <+Fador> yeah, the same with x 20:08 < techkid6> Righto, ill add that to position.py 20:09 < techkid6> i might just make a gist out of this and share it 20:18 < Bibl> eww python :( 20:18 < Bibl> (puke) 20:33 < gurun> it might be worth pointing out that how shift works with negative numbers is rather language depenedent. 21:23 < nickelpro> techkid6: https://github.com/SpockBotMC/SpockBot/blob/master/spock/mcp/datautils.py#L73-L90 21:26 < nickelpro> Python uses sign-and-magnitude-ish integers, not 2's-complement like the rest of the world. It gets a little weird dealing with data packed in more traditional languages 21:27 < techkid6> nickelpro: Thank you, I would have never thought of that. 21:29 < nickelpro> Ya I actually don't know why casting to int before the boolean and causes those values to return as signed 21:29 < nickelpro> But it works 22:34 <+Amaranth> morfin: What would use you use to store blocks in memory if not a flat array? 22:52 < morfin> hm at least 2 dimension array maybe hmm 22:52 < gamingrobot> 4d array just to be safe :P 22:52 < morfin> lol? 22:52 < morfin> why 4d 22:52 < gamingrobot> im kidding 22:52 < gamingrobot> why 2d over 1d though 22:55 < morfin> btw that does not change anything 22:55 < morfin> but if i use 3d array i can use x y and z 23:14 < morfin> how you get proper block from plain array? 23:37 < gurun> you iterate it, usually i think it is in x,z,y order. 23:38 < gurun> or, iterate is the wrong word. you directly address it of course. 23:46 < morfin> anyway that's very strange idea 23:48 < gurun> lol --- Day changed dim. mars 01 2015 00:11 < gamingrobot> morfin: https://github.com/SpockBotMC/SpockBot/blob/master/spock/mcmap/smpmap.py#L45 00:11 < gamingrobot> its not all that strange 00:14 < gurun> morfin, and in that tradition gamingrobot so kindly remind us of (code talks). Here is another strange one: https://github.com/NiclasOlofsson/MiNET/blob/master/src/MiNET/MiNET/Worlds/ChunkColumn.cs#L35 00:15 < gamingrobot> :3 00:16 < gurun> gamingrobot: funny how similar all our strange code looks in the end :-) 00:47 < woder> how long does the minecraft client have before it gets kicked for flying? 01:09 < Thinkofdeath> woder: 80 movement packets 01:09 < Thinkofdeath> ~4 seconds for a normal client 01:32 < woder> well I might have just found my problem 01:32 < woder> probably sending wayyyy too many movement packets 01:37 < woder> Thinkofdeath: just wanted to let you know that you have just solved a problem I've spent weeks trying to fix :P 01:37 < Thinkofdeath> \o/ 01:37 < Thinkofdeath> yeah keep the movement packets at 20 a second, it'll break more than flying otherwise 01:38 < Thinkofdeath> you'll take cactus damage faster, regen faster etc 01:38 < woder> yeah I didn't know that, I thought the more I sent the smoother it would be 01:38 < woder> (looked really choppy) 04:52 < Fenhl> how does http://wiki.vg/Protocol#Display_Scoreboard behave when a display slot is cleared? 04:56 < Fenhl> also what does http://wiki.vg/Protocol#Camera do 05:03 <+md_5> never seen it 05:03 <+md_5> probably something to do with spectator mode 05:05 < Fenhl> ah, good point 05:22 < Fenhl> md_5: the Name field in http://wiki.vg/Protocol#Login_Start is the username, right? 05:52 <+md_5> Fenhl I presume 08:05 < morfin> interesting 08:06 < morfin> if i do something to let user select playermodel, how would i handle that model on server-side 09:13 < morfin> cmon wtf 09:13 < morfin> every implementation of Minecraft server i saw(C++) is using new standard 09:20 <+md_5> morfin yes 09:21 <+md_5> c++11 is amazing 09:56 < nickelpro> so completely unrelated to Minecraft, but officially the weirdest bug fix I've ever done 09:57 < nickelpro> Autorotate stopped working on my Nexus 5. Checked the accelerometer and sure enough the Y-Axis is pegged for some reason 09:58 < nickelpro> Go online and a couple guys suggest smacking the fucker around a bit. I mean, cmon, this isn't the Russian space program that shit doesn't work in real life 09:58 < nickelpro> 5 hardy smacks to my phone later and the accelerometer works again. wtf google 11:04 < Fenhl> the Nexus 5 is a weird little piece of technology 11:05 < Fenhl> NFC doesn't work? Don't worry, just apply pressure to the lower part of the back (between the LG logo and the “n”) 11:05 < Fenhl> ¯\_(ツ)_/¯ 13:38 < morfin> lol 13:39 < morfin> my shitty Huawei Honor 2 does not have NFC,4G, etc but it works 13:39 < morfin> md_5 i know C++11 is amazing but require new compiler :( 13:43 < morfin> i am using boost to replace some features 14:40 < Paprikachu> my god 14:40 < Paprikachu> why wont minecraft let me give it more memory 14:43 < Paprikachu> i have a computer with 32 gigs of ram and minecraft is like "nope, even though you gave me 1 gb, im gonna ignore that and put a cap at 500mb and run out of memory" 14:45 < Paprikachu> also gotta love the stuttering thanks to gc pauses 14:55 < morfin> lol? 14:56 < morfin> wait there is -XMX and -XMS options 14:56 < morfin> to specify memory 14:56 < Paprikachu> Picked up _JAVA_OPTIONS: -Xmx512M 14:56 < Paprikachu> http://i.imgur.com/F2NXRt9.png 14:56 < Paprikachu> = ??? 14:58 < Paprikachu> and i dont even have a system variable _JAVA_OPTIONS 14:58 < Paprikachu> i'd say minecraft is full of shit 14:58 < Paprikachu> but that's just me 15:09 < Paprikachu> oh great 15:09 < Paprikachu> it was razers synapse program 15:09 < Paprikachu> for fucking real 15:09 < xehbit> wut XD .. 15:10 < Paprikachu> http://www.aliacraft.net/threads/psa-razer-synapse-software-limits-java-memory-to-512mb.4815/ 15:10 < Paprikachu> https://bugs.mojang.com/browse/MC-74465 15:13 < Paprikachu> fucking insane 19:05 < nickelpro> Oh wow wtf Razer --- Day changed lun. mars 02 2015 07:34 < nickelpro> The documentation for Entity metadata is way out of date, anyone familiar with the accurate behavior and know what all the values mean? 07:34 < nickelpro> For example the documentation says the metadata type 6 (Int, Int, Int) doesn't appear, but for me it appears all over the place 08:01 < nickelpro> I dunno what's doing this :-\ 08:01 < nickelpro> More investigation eventually 08:19 < morfin> hm 08:22 < morfin> am i right that server can forcibly open any window using it's id? 08:22 < morfin> but id should be probably registered in client(i think) 08:26 < morfin> not sure what will happen if i try to open nonexisting window 08:35 < morfin> hey gun 09:03 < morfin> gurun, i think i know one thing layer between workers and sending can do: control who should receive packets, rewrite packets(?) etc ) 11:28 < bgale> nickelpro, update the entity metadata page when you're done 17:44 < MrARM> Anyone here knows how is block light calculated? 17:45 < MrARM> *sky 17:47 < MrARM> nvm 18:22 < morfin> how vanilla send some events? 18:22 < morfin> does it check radius and send to players in it only? 22:41 < Gjum> i'm wondering why slot dropping never works for my client, the server always sends click not accepted, anyone able to help? 22:42 < Gjum> that's how i'm doing it atm: https://github.com/Gjum/SpockBot/blob/master/spock/plugins/helpers/inventory.py#L324 --- Day changed mar. mars 03 2015 00:21 < Gjum> if anyone is interested, clients have to respond with the non-confirming packet, like with "Player Position and Rotation" 02:19 < Xor_Boole> anyone know any nice shell-based clients? 02:27 < dx> Xor_Boole: minecraft clients written in shell script? :D 02:28 < Xor_Boole> dx no, clients that will run on any unix machine from the shell =p 02:28 < Xor_Boole> though... a shell script client would be cool... 02:28 < Xor_Boole> ^ challenge for anyone with too much time on their hands 02:28 < dx> the insane kind of cool 02:29 < dx> man i actually like that idea 02:29 < dx> but i don't like the fact that i like that idea 02:29 < dx> this is dangerous 02:30 < nickelpro> Define "shell" you mean a bash based client? 02:30 < nickelpro> Can bash even do sockets? 02:30 < Xor_Boole> I just want a text-based client that can live in my term =p 02:30 < Xor_Boole> like my irc client =D 02:30 < Xor_Boole> #irssimasterrace 02:30 < dx> there's /dev/tcp// which is not a real device 02:31 < nickelpro> Xor_Boole: Spock has a curses interface 02:31 < dx> nickelpro: nice! 02:31 < Xor_Boole> nickelpro link? 02:32 < nickelpro> https://github.com/SpockBotMC/SpockBot-Contrib/blob/master/plugins/CursesCommand.py 02:32 < nickelpro> It's very much a work in progress, as is all of spock 02:32 < nickelpro> contributions welcome :-P 02:32 < Xor_Boole> > python 02:32 < Xor_Boole> nope 02:32 < nickelpro> lol what you want C? 02:32 < Xor_Boole> no 02:32 < Xor_Boole> scala 02:32 * Xor_Boole runs 02:33 < dx> so you not only want a terminal client, you also want a terminal client written in a language very few people use \o/ 02:34 < dx> do you want to extend your fitler to only apply to projects licensed under the perl artistic license 2.0? 02:35 < nickelpro> GPLv1 without the forward licensing clause 02:39 < nickelpro> so I have a valid email address [first_name]@[last_name].email, but all around the web there are services that tell me it's not a valid email address and I have to give them a gmail 02:39 < nickelpro> WHY THE FUCK DONT YOU TRY SENDING ME AN EMAIL 02:39 < dx> .email as in a new generic TLD? 02:39 < dx> lol regexps 02:40 < nickelpro> It's not really that new 02:40 < nickelpro> Just incompetent web programmers trying to validate email addresses 02:41 < nickelpro> Just send the damn email, and if I get the email and validate the address, wha-la it's a valid email 02:41 < dx> i call all the generic TLDs "new" 02:42 < Xor_Boole> at this point we should just assume anything is TLD 02:43 < dx> Xor_Boole: we were past that point when the first generic ones were announced 02:43 < Xor_Boole> "(.+?)@(.+)\\.(.+)".r is how you should be doing it 02:43 < Xor_Boole> well... 02:43 < dx> email regexps are hard 02:44 < nickelpro> Just assume everything is valid, there is no reason not to just send a validation email (especially if you're going to do that anyway) 02:44 < Xor_Boole> "(.+?)@([\\w\\-^_]+)\\.([\\w\\-.^_]+)".r might be better. 02:45 < Xor_Boole> I know too many idiotic we developers anyways 02:45 < nickelpro> The only reason I bring it up is because I was applying for a lease today, and they sent me an email to that address (which recieved it fine). Then, later in the process I got an error for an invalid email 02:45 < nickelpro> And I'm sitting here wondering how incompetent you can possibly be 02:46 < Xor_Boole> too many of them think that `!!i` is saner than `i==0` 02:46 < Xor_Boole> i!=0* 02:46 < Xor_Boole> like who the fuck thinks !!i is a sane way to cast to boolean 02:46 < Xor_Boole> +b is also dumb 02:47 < Xor_Boole> I'm in college and a theoratical math major and even I know it's not a sane practive 11:38 < morfin> nickelpro :) 14:18 < toqueteos> where is the Chat type actually used? i'm getting Chat Message (0x01) from client and they are just ascii text, no json bloat 15:05 < bgale> toqueteos, server -> client chat message (0x02) uses it 15:05 < toqueteos> bgale: thanks! i'm actually fixing it haha 15:05 < bgale> it's used in a few places, e.g. for sign text 15:06 < bgale> anywhere where coloured text is supported, basically 15:11 < toqueteos> i just tested it and plain text works for 0x02 s->c 15:11 < toqueteos> custom server, vanilla client 15:11 < toqueteos> so it supports both? 15:12 < bgale> That's strange. I thought it only supported json 15:12 < bgale> You're not wrapping the string in quotes? 15:13 < toqueteos> nope 15:16 < toqueteos> it works with hardcoded json too, haha nice 15:23 < Thinkofdeath> toqueteos: pretty sure vanilla parses in 'lenient' mode 15:35 < toqueteos> Thinkofdeath i'm guessing JSON is prefered to plain text right? 15:35 < Thinkofdeath> yep 15:36 < toqueteos> i'm worried about the note on http://wiki.vg/Protocol#Chat_Message "While Position 2 accepts json formatting it will not display, old style formatting works" 15:36 < Thinkofdeath> if you send "[hello]" (without quotes) from server->client you'll just get 'hello', json is the way to go :P 15:37 < Thinkofdeath> toqueteos: by that it means the colors/formatting wont display 15:37 < Thinkofdeath> the text will 15:37 < toqueteos> wait what, what is "[hello]" then? isn't chat supposed to be an object? 15:38 < Thinkofdeath> That was an example of where treating that packet as plain text would go wrong, since gson's lenient mode will treat that as a valid json array 15:39 < Thinkofdeath> nothing to do with position 2 15:39 < Fenhl> first of all, Notchian uses a weird JSON parser that accepts all sorts of things like unquoted strings 15:39 < toqueteos> understood 15:40 < Fenhl> also, Chat can also be a string or array. "foo" and ["foo"] are both sugar for {"text": "", "extra": ["foo"]} 15:40 < Thinkofdeath> unless they haven't fixed the bug with arrays 15:41 < Fenhl> not sure about that actually 15:41 < Thinkofdeath> [{"color":"red","text":"A"},"B"] would have both as red 15:41 < Thinkofdeath> {"text":"", "extra":[{"color":"red","text":"A"},"B"]] would have only A as red 15:42 < toqueteos> Thinkofdeath: second one crashes 15:42 < toqueteos> oh wait 15:43 < toqueteos> that final ] is a } 15:43 < Fenhl> ]} instead of ]] 15:43 < Fenhl> yea 15:43 < Thinkofdeath> yep whoops :P 15:43 < Fenhl> can you still crash clients with /tellraw? 15:43 < toqueteos> confirmed, fist both red, second just first letter 15:43 < toqueteos> this is nice for tests 15:44 < Thinkofdeath> Fenhl: don't think you ever could? 15:44 < Thinkofdeath> pretty sure the server parses it first 15:44 < Fenhl> I thought it was a thing in the snapshot it was introduced or something 15:44 < Thinkofdeath> maybe 15:44 < Thinkofdeath> back in 1.7 you could crash clients with bold due to a wrapping bug or something 15:45 < Fenhl> the client still parses § escapes inside of tellraw, too 15:46 < Fenhl> (I keep calling the JSON-based chat format tellraw because that's what it's called in my previous main project's codebase) 15:47 < toqueteos> Thinkofdeath: btw i sometimes get some emails about minero and netherrack, do you? 15:47 < Thinkofdeath> nope o.O 15:48 < toqueteos> weird.. i forward people to netherrack because it was way more complete than minero's 15:48 < Thinkofdeath> netherrack is dead :P 15:48 < toqueteos> yeah i know, you are on glowstone now aren't you? 15:48 < Thinkofdeath> has been for about 2 years 15:48 < Thinkofdeath> spigot 15:48 < toqueteos> or sponge 15:48 < toqueteos> or spigot 15:48 < toqueteos> whatever hahaha 15:48 < Thinkofdeath> :P 15:49 < toqueteos> still java, booooo 15:49 < Thinkofdeath> you get used to the pain 15:49 < toqueteos> nah, it's awesome spigot got past the bukkit thing 15:49 < toqueteos> a bit sad how it all ended but.. 15:50 < Fenhl> bukkit died so that over 9000 new projects could be spawned from its ashes 15:58 <+Amaranth> "got past" 15:59 <+Amaranth> They're attempting a legal loophole and just to make sure people don't stir up trouble over it they're hosting in a country that ignores copyright violations 15:59 <+Amaranth> Well, "hosting", it's probably just a proxy 16:06 < morfin> wtf is tellraw? 16:08 <+Amaranth> A vanilla server command you can use to spew raw mojangson at clients 16:08 <+Amaranth> Meant for command blocks 16:09 < morfin> hmm sounds like a bad idea 16:09 < morfin> badly formed JSON can crash client i guess 16:09 < morfin> oh wait wtf is gson 16:10 < toqueteos> morfin: gson is google's json library 16:10 < toqueteos> isn't it? 16:10 < Xor_Boole> netherrack is dead :P 16:10 < bgale> I thought it was a json superset 16:10 < morfin> ow 16:10 < Xor_Boole> well yes, your fault for using Go 16:10 * Xor_Boole runs 16:10 < toqueteos> hahahahahhaa 16:10 < bgale> No, I'm wrong. 16:10 < toqueteos> no https://code.google.com/p/google-gson/ ? 16:10 < morfin> nevermind 16:11 < morfin> but i think that can crash client if something bad was send 16:11 < morfin> *nset 16:11 < toqueteos> yes you can 16:11 < toqueteos> try [} 16:11 < morfin> lol 16:11 < MrARM> anyone here ever made a client with a GUI here? 16:12 < MrARM> Basically getting back into the lighting stuff - how does client calculate it? 16:12 < MrARM> It seems like it both recalculates it but... doesn't fully ignore the values it's given 16:13 < MrARM> (I'm talking about PE now; but I think it's same in PC) 16:27 < morfin> not sure how should i act if nobody on server 16:37 < pushrax> MrARM: the client has to respect va 16:37 < morfin> anybody can tell me one thing: how Minecraft send events to clients? 16:37 < pushrax> lues given to it by the server 16:37 < morfin> does it check radius etc? 16:38 < pushrax> morfin: not afaik, all players know where other players are 16:38 < MrARM> yeah, but it partly recalcs it 16:38 < pushrax> MrARM: until it gets an update it uses its own calculation 16:38 < pushrax> to prevent delay when blocks change 16:38 < morfin> lol 16:38 < MrARM> not actually 16:38 < MrARM> well 16:38 < MrARM> not in pe 16:39 < pushrax> hm, I haven't used pe before 16:39 < pushrax> when I was writing a server that's the behaviour I saw though 16:39 < MrARM> Hmm 16:39 < MrARM> I think I know 16:39 < MrARM> it does recalculation 16:39 < pushrax> though if the server doesn't send the skylight info properly you get totally black squares sometimes 16:40 < MrARM> but doesn't clear the arrays maybe? 16:40 < MrARM> pushrax: actually, that's empty skylight is what I'm getting right now. And PE accepts it 16:40 < MrARM> thing is 16:40 < MrARM> Light is also 0 most of the time 16:40 < MrARM> but I can set it to 15, and it'll be bright 16:40 < morfin> delay where? 16:41 < morfin> delay because of checks? 16:41 < MrARM> why is my lighting code so slow D: 16:41 < MrARM> reducing calls now 16:41 < pushrax> morfin: network delay 16:41 < morfin> hm? 16:42 < pushrax> I might have misremembered, I think the server might only calculate sky light and not do the flood fill 16:42 < MrARM> Ah, maybe 16:42 < pushrax> this was the code we used to generate it, and afaik it worked fine https://github.com/frustra/fracture/blob/master/chunk/storage.go#L99-L123 16:42 < morfin> but should not i send chunks when user come closer? 16:42 < MrARM> I think it's what PE does too 16:43 < MrARM> Anyway, anyone here has writen ALL the lighting code? 16:43 < MrARM> with flood fill and stuff? 16:43 < morfin> so if he is far away and will come closer i should send him chunk and he will see changed data 16:44 < pushrax> I did smooth lighting in MyCraft before MC had it, but I don't actually remember how it worked lol 16:44 < pushrax> it was quite a while ago now 16:44 < MrARM> I mean the spreading only 16:44 < MrARM> Smooth isn't that hard I think 16:45 < MrARM> Just set the light on edges to surrounding blocks light 16:45 < MrARM> may be that I'll actually have to do some magic, but nah 16:45 < MrARM> Wait 16:45 < morfin> i don't get where you can have network delays 16:45 < MrARM> I may understand what caused this 16:46 < morfin> when sending not to everybody 16:46 < pushrax> I'm not sure how the flood fill is complicated 16:46 < MrARM> nvm 16:46 < pushrax> morfin: I was responding to MrARM when I said that 16:46 < morfin> ow 16:46 <+Amaranth> MrARM: On desktop at least I'm pretty sure the client also does the "random block relighting" hack 16:46 < MrARM> Nah, PE doesn't do it 16:46 <+Amaranth> Where it picks a block near the player and recalculates nearby lighting based on that block's lighting value 16:47 < MrARM> Amaranth: I get completly no skylight, can't do that 16:47 < MrARM> As I'm not having the vanilla server as server 16:47 < morfin> so is there anything bad in sending events to users only in some radius? 16:47 <+Amaranth> morfin: The server does that all the time 16:47 <+Amaranth> That's how sounds work 16:49 < pushrax> MrARM: why not calculate skylight? 16:49 < morfin> ow 16:49 < pushrax> it's really simple 16:49 < morfin> i meant everything 16:49 < MrARM> I must do that client-side 16:49 < morfin> entity moving, block updates etc 16:49 < MrARM> So yeah, I have to calc skylight 16:49 < pushrax> morfin: that should be fine 16:50 < pushrax> as long as you send events within the view radius there shouldn't be any difference 16:50 < morfin> only thing i should decide how would i keep thread(s) alive if no users on servers 16:53 < MrARM> problem is I'm doing this client in js/webgl 16:56 < MrARM> and doing the flood fill itself is simple 16:57 < MrARM> optimizing it is not 16:57 <+Amaranth> morfin: entity movement and such is also only in a radius already in vanilla 16:57 <+Amaranth> block updates are too, that's called the view-distance setting 16:58 <+Amaranth> If you mean a smaller radius than vanilla that's okay for everything except blocks, those get very noticeably out of sync 17:00 < MrARM> Uhhh, I'm supposed to flood fill every block while iterating over air? 17:00 < Thinkofdeath> Xor_Boole: nothing wrong with Go :3 17:01 < jast> it's very much a matter of taste 17:06 <+Amaranth> Things wrong with Go: non-optional GC, shitty type system 17:06 <+Amaranth> The shitty type system makes it suck for large projects in all the ways scripting languages do 17:09 < Thinkofdeath> Like GCs and the type system hasn't really been an issue for me 17:09 < Thinkofdeath> What do you prefer, rust? :P 17:10 <+Amaranth> Rust is what I'd like to use but I have no experience making anything large (or at all useful) with it 17:10 <+Amaranth> So conservatively I'd say C++ 17:12 < Thinkofdeath> Haven't really enjoyed C++ when i've used it, although thats been mostly from uni work 17:12 <+Amaranth> The duck typing and lack of generics mean it's hard to reason about what methods something in Go has unless your program is small enough to fit all that information in your head 17:12 < Thinkofdeath> Rust on the other hand I find unreadable 17:13 <+Amaranth> So you need a ton of unit tests which are basically doing through manual testing what some type annotations should have done for you 17:16 < Thinkofdeath> I'll give you the generics point, the interface system on the otherhand I like 17:16 < pushrax> I actually like Go's type system 17:16 < pushrax> it produces some really nice APIs 17:16 < pushrax> Rust's is more expressive but also more confusing 17:17 < pushrax> why does the lack of generics make it hard to reason about "what methods something has"? 17:19 <+Amaranth> Well, that's actually solvable in Go, you can just make an interface that is the combination of all the interfaces you want to use and make your API only take that 17:19 <+Amaranth> At least I think that's a thing you can do 17:20 <+Amaranth> When I was talking about generics there I was comparing to Rust's trait bounds on generics (aka Haskell typeclasses or C++ concepts) 17:20 <+Amaranth> But the lack of generics does mean you end up with void* which is, no debate, a sign your type system has failed to let you express yourself 17:20 < pushrax> yeah you can embed interfaces in interfaces (the go stdlib does this a lot, e.g. an io.ReadCloser is an io.Reader and an io.Closer) 17:21 < pushrax> you don't quite end up with void*, but yeah sometimes it would be cleaner to have generics 17:22 < Thinkofdeath> theres a 17 page document about different ways Go could implement generics, still haven't found one they like 17:22 < pushrax> I don't think that dismisses the entire value of Go's type system though 17:22 <+Amaranth> Rust's equivalent of void* or interface {} would be having to use an unsafe block which is usually only when implementing foundational stuff 17:22 <+Amaranth> pushrax: Go's type system has nothing to offer 17:22 <+Amaranth> It doesn't do anything interesting and it doesn't do enough to be fully useful 17:22 < Thinkofdeath> https://docs.google.com/document/d/1vrAy9gMpMoS3uaVphB32uVXX4pi-HnNjkMEgyAHX4N4/edit?pli=1# found it 17:22 <+Amaranth> I mean, that's the point, but they went too far 17:23 < pushrax> it is totally useful, we use it at work and so do many other companies 17:23 <+Amaranth> Thinkofdeath: They won't find one they like 17:23 < pushrax> it's a good intermediate between fully dynamic and really strict type systems 17:23 <+Amaranth> They just don't want to say "fuck you, we aren't doing generics" because the community would get upset 17:23 < pushrax> and it's ridiculously simple which makes it easy to reason about 17:23 <+Amaranth> Better to say they disagree with all the known ways to do it and are looking for something better first 17:25 < pushrax> the only time I have actually missed generics is when implementing abstract data types 17:25 < pushrax> but you don't do that so often in most applications 17:25 <+Amaranth> You implemented ADTs in Go? 17:25 <+Amaranth> Typical Go people would say you don't need those either 17:25 <+Amaranth> :P 17:27 <+Amaranth> Wait I'm thinking of the wrong A here 17:27 < pushrax> no that's the right A 17:30 <+Amaranth> Yeah but I was thinking of algebraic data types, something completely different 17:30 < pushrax> oh 17:30 <+Amaranth> You were just talking about a queue or something and I went of in to tagged union heaven 17:31 < pushrax> yeah 17:31 < pushrax> Go is an extremely pragmatic language 17:31 < pushrax> it is elegant in its lack of features, not in its perfect expressiveness lol 17:31 < pushrax> not a language suitable for academics 17:31 <+Amaranth> It's a great language if you're doing what Rob Pike is doing at Google 17:32 < pushrax> or what tons of other developers are doing at thousands of other web companies :P 17:32 <+Amaranth> That's the key, web 17:33 <+Amaranth> If you're making an HTTP server Go is great for that and then you can just write the other bits there too 17:34 <+Amaranth> coroutines are better than callback hell 18:18 < Bibl> i got an email: http://hastebin.com/osajeduxig.vhdl 18:18 < Bibl> the guy is from a company called consolparnters 18:18 < Bibl> partners* 18:18 < Bibl> does it look legit to your guys? 18:18 < Bibl> you* 18:19 < jast> let's put it this way 18:21 < jast> assuming it *is* legit, you just received an e-mail from someone who didn't bother personalizing the mail in any way, nor giving you _any_ detail whatsoever about the prospective employer 18:21 < jast> so either the prospective employer just selected a random recruiter without looking into what they do, or that's the kind of recruiting process they think is a good idea 18:22 < jast> with that in mind, where do you think you're going to end up? 18:23 < Bibl> i think he got my email from github 18:23 < Bibl> and it only has the name Bibl on there 18:23 < Bibl> i'm only 16, i'm not looking for a job lol 18:23 < jast> my point is, this is borderline spam, even if it's legit... presumably sent to millions of people 18:24 < Bibl> aight, i sent an email back asking for more info 18:24 < Bibl> thanks for the advice 18:24 < jast> ten virtual bucks says you're not going to get anything worthwhile 18:24 < jast> also, I gotta go. good luck ;) 18:25 < Bibl> thanks cya 18:33 < TkTech> Bibl: It's 99.9% never worth responding to those. 18:34 < Bibl> oh ok 18:34 < TkTech> I get several a week, and although a few are genuine the vast majority are just head hunter tools auto searching github based on queries. 18:34 < TkTech> They have 3 requests to find a Java programmer, so they search for Java repos and spam emails. 18:35 < TkTech> They can be agressive and very invasive if you respond, they make their money off of finding a body to fit a position. 18:38 < TkTech> As an example, https://gist.github.com/TkTech/0ec75852dda4ea5631ec 18:38 < TkTech> This is an obvious head hunter (doesn't try to hide that fact at least), and has continued to send templated emails once every few days. 18:39 < TkTech> https://gist.github.com/TkTech/f7beaa96cc0478b4b874 18:39 < TkTech> This one would be significantly more worthwhile to respond too, mostly because it actually came from someone associated with the company that's hiring - they aren't a head hunter, they don't get money regardless of how well or how poorly you do at the job. 18:40 < TkTech> Still not grand, especially because it's someone in HR. Typically these don't go anywhere because HR doesn't really know what to look for in a dev. 18:41 < TkTech> Bibl: Anyways, just be careful who you respond to and be very careful giving out details, even simple things like a phone number. They can be very, very aggressive. 18:47 < Bibl> TkTech: thanks for the advice man 18:47 < Bibl> do you get a lot of those emails? 18:52 < TkTech> Yes, and most likely a lot of people here do as well. 18:52 < TkTech> For the most part, they're just automated with a customized blurb thrown on top. 18:52 < TkTech> Occasionally, you'll get more personal ones from people involved with the companies. For these, I would recommend you respond and politely decline. Keeping those doors open is a good thing to do. 18:53 < TkTech> https://gist.github.com/TkTech/ae451fab0a58a7ccb420 18:54 < TkTech> Here's a more personal one. You would 150% respond to this and politely decline, as well as find Steven's email and politely thank him. 18:55 < TkTech> The hardest part of your career will be the first 5 years, because you have no network. Building up your network as you work and get good relations with individuals will make the following years of your career far safer and give you a good safety net if things get rough. 18:56 < TkTech> Especially in a city that's full of startups, where employement is fluid and people move around all the time. Your company gets bought or closed, and now you have doors into 50 other companies as your collegues get hired. 19:00 < bgale> "surface level conversation" 19:01 < Bibl> TkTech: im thinking of going into medicine or engineering so im not really interested in any programming jobs anyway 19:05 < gurun> ok, lesson learned: never ask bukkit people what happend to bukkit and it's people. 19:05 < Bibl> lol what happened 19:05 < Bibl> ntn 19:05 < Bibl> oops 19:06 < Bibl> brb 19:06 < gurun> what happened? You end up in an IRC discussion with 20 people, all expert on the digital legal system. But 20 different versions of it. 19:07 < TkTech> Welcome to the internet. Also, they could all be right. People keep forgetting there's more than one country on Earth. 19:07 < gurun> TkTech: being from sweden is all the legal background you need. 19:09 < gurun> Here is the problem. Pirate bay was convicted for linking to copyrighted material. They didn't host the content themselves, but nevertheless was convicted. 19:09 < gurun> based on "intent" 19:10 < gurun> now, being from sweden, i have to ask myself this. If someone would take MiNET and create a hosted service making money from that, how will swedish law apply to me? 19:19 < gurun> i have build an near fully functional MC server, with the specific aim to have enteprise grade performace and scalability. Could i argue that the intent was not comersial? 19:22 < TkTech> gurun: I have no idea how your local laws are sturctured, but here you cannot patent a protocol. 19:22 < TkTech> Don't use Mojang's art assets and you're in the clear. 19:23 < TkTech> Even then, you can find and use the art assets from the users locally installed Minecraft. 19:24 < gurun> TkTech: well, it 19:24 < gurun> ..it is that small matter of EULA too, remeber. 19:26 < TkTech> Which is also not enforcable. 19:26 < TkTech> They could terminate your Mojang account and prevent you from using their services, that's their right. 19:26 < TkTech> Nothing beyond that. 19:28 < TkTech> The general international rule of thumb is that an EULA can be used to explicitly allow something that may be otherise criminal, such as authorized access to Mojang's authentication servers and to use their art assets. 19:31 < TkTech> gurun: Software in particular suffers from shrink-wrap EULAs - http://en.wikipedia.org/wiki/Shrink_wrap_contract 19:31 < TkTech> gurun: Say you purchase a copy of Minecraft in a store from a box. You can't agree to the EULA until you've paid for it, opened the box, and starting installing it. 19:32 < TkTech> gurun: That's utterly uneforcable in most modern nations, like Canada and Germany 19:34 < gurun> EULA overules fair use. 19:34 < TkTech> Further in the context of Minecraft, wiki.vg was built as a chinese wall. (http://en.wikipedia.org/wiki/Chinese_wall#Reverse_engineering) 19:34 < TkTech> gurun: You're not getting my point, in almost no case is a software EULA enforcable. 19:35 < TkTech> gurun: It doesn't matter what it tries to overrule, it's non-binding beyond the basic terms of non-party contract law. 19:35 < TkTech> wiki.vg works as a chinese wall. You can claim you've never accepted Mojang's EULA nor have you ever looked at their source. 19:36 < TkTech> Instead you read the specification from wiki.vg. 19:36 < TkTech> (As a bonus, numerous Mojang employees including Notch have contributed corrections to wiki.vg, validating its operations) 19:36 < gurun> well, actually, i don't need to look at their code. I just look at all the other codes that port their code. 19:37 < TkTech> That you cannot do. Because it can still be claimed that it's a 2nd or 3rd degree derivative work. 19:37 < gurun> but, a chinees wall with login and autiding on changes .. is not really a good wall, is it? 19:38 < TkTech> Pardon? 19:38 < gurun> if i add a packet description "SuperJumpPacket" to the wiki, with fields "doJump" and "doSuperJump". 19:38 < gurun> and that happens to exactly match the name of the source-code of Mojang. 19:39 < gurun> would you then argue that i'm somehow protected from having it on a wiki when the wiki fully well know who i am, and when i added it. 19:40 < TkTech> We have stated many times that you shouldn't view the source and then contribute to the wiki. If someone tried to raise the point, we would claim ignorance and erase the offending portions. 19:40 < TkTech> We have automated tools, like Burger, that were used to extract information from the project for a long time. 19:43 < gurun> in regards to the PE protocol, i find it rather funny that the only part that is truly open (RakNet) is also one of the few i think the protocol likely is not following reverse engineered source from the client. 19:43 < TkTech> Keep in mind that current Mojang employees *use* the wiki, and prior Mojang employees contributed to it, including naming corrections. Thanks to this, Mojang would never be able to successfully contest its existence. 19:44 < TkTech> By using and contributing to it, they've implicitly authorized it. 19:45 < gurun> well, i will never cast doubt about the fairness and openness of any of the Mojang employed coders. Especially not the once on this channel. 19:45 < gurun> they have been nothing but helpful even explaining the cryptic algorithms of their own .. code derivatives. 19:46 < TkTech> Yes, the fact that they participate in the community is huge. I think it's partly due to the fact that they were hired out of the broader community. 19:46 < TkTech> Something very rare for game devs to (openly) do. 19:51 < gurun> TkTech: thanks for your insight. With some googling on what you say/claim i feel a bit more at ease. And to be really fair with Mojang, they didn't issue the DMCA, the "offender" did. 19:51 < gurun> it's probably the weirdest situation in digital rights law i have ever experienced. 19:58 < gurun> TkTech: btw, the EULA in question is for the MCPC server distributed by Mojang, right. 20:05 < gurun> read the EULA (helps when it is actually in Swedish). And, nah that is not realy that bad, at all. --- Day changed jeu. mars 05 2015 17:29 < morfin> guys 17:31 < morfin> i was right about opening window when server send to client notification 17:31 < morfin> ? 17:35 < xehbit> wut :P ? 17:35 < morfin> i asked before if i push to client open window packet would client open inventory for that 17:40 < gurun> uh, yes? 17:41 < gurun> actually, i don't know .. what a SW plugin would do .. other than general game-handling .. that's why i'm looking at it. 17:41 < gurun> (wrong channel) 17:48 < morfin> but then server remember which chest/furnace/etc i opened? 17:55 < gurun> don't understand what the question actually is? 17:56 < gurun> maybe this will help: https://github.com/NiclasOlofsson/MiNET/wiki/Chests 17:56 < gurun> it is for PE .. but i expect the "concept" to be fairly similar. --- Day changed ven. mars 06 2015 23:45 < gurun> Feedback more than welcome: https://github.com/NiclasOlofsson/MiNET/wiki/API-Documentation 23:45 < gurun> damn, wrong channel. --- Day changed sam. mars 07 2015 17:28 < CodeMonkey99> I'm working on a map analysing tool for minecraft. But when I read the map chunk bulk packet from the connection I'm getting more chunk data than my parser is reading (over 3000bytes more than I need), but the data I read matches with the map. Also The byte ammount in my chunkdata array is sometimes odd or way less then needed. 18:45 < nuvasuper> Hello, I'm working on a client in Java, and I'm having some trouble swapping the contents of two inventory slots. What I've got so far seems works, but only on the first attempt after each login. If anyone could take a look at my code, that would be fantastic. Here's the Gist: https://gist.github.com/nuvasuper/e73730243aa9f58f977b 21:29 < Gjum> nuvasuper: Are you not updating the clicked slots until you are done swapping? 21:29 < Gjum> If so, clickSlot(b) sends the server the wrong clicked slot 21:33 < Gjum> also you could make the lines 10-13 much more readable by creating temporary vars for c.invhandle.inventory.get(a) and ...(b) 21:33 < gurun> hihi 21:37 < Gjum> ^^ 21:38 < gurun> Gjum: sorry. I just see the pain in that line. 21:40 < Gjum> ikr 21:45 < nuvasuper> Gjum: you are entirely right! Adding in an assignment for when slotA becomes empty fixed the issue. Thank you a bunch! 21:49 < Gjum> no problem. had the same issue recently 22:37 < Gjum> dang 22:38 < Gjum> anything I can do if I lost my wiki.vg password? I'm still logged in fortunately 23:09 < Deanveloper> Hey guys, does anyone here know how to detach an entity through packets? --- Day changed dim. mars 08 2015 01:05 < nuvasuper> Deanveloper: I think that would involve the "Use Entity" packet: http://wiki.vg/Protocol#Use_Entity because in previous versions right clicking would dismount a player. But I'm also quite new to this, so its very possible I'm wrong. 01:05 < Deanveloper> nuvasuper, that's in previous versions, I'll see if it works though. 01:21 < Deanveloper> Anyone else know how to unmount an entity through packets? 01:28 < Deanveloper> Oh figured it out 01:36 < Deanveloper> Send an entity attach packet, but with the rider as null 01:36 < Deanveloper> I thought I tried that, apparently not 01:40 < Fenhl> Deanveloper: what's null in this case? 01:41 < Deanveloper> The entity id 01:41 < Deanveloper> of the rider 14:26 < gurun> Anyone here doing professional hosting of MC servers. If so, please msg me in private. 19:42 < Deanveloper> The thing I posted yesterday about dismounting a player through packets doesn't work. Anyone know how to dismount through packets in 1.8? 19:42 < Deanveloper> What doesn't work: null value and same id as vehicle 19:43 < Deanveloper> I'll try setting it to -1 19:48 < Deanveloper> Works ^^ 20:35 < Gjum> Deanveloper: are you talking about Attach Entity? 20:35 < Deanveloper> Yes 20:35 < Gjum> ok, I'll add that info to the wiki then 23:29 < Fenhl> Deanveloper: no I meant, how is this “null” encoded 23:29 < Fenhl> oh nvm 23:31 < Fenhl> Deanveloper: which id is set to -1? 23:31 < Deanveloper> The Rider 23:31 < Fenhl> thanks 23:31 < Deanveloper> The vehicle stays as whatever ID it's supposed to be 23:32 < Fenhl> updated wiki 23:32 < Deanveloper> Cool cool --- Day changed lun. mars 09 2015 09:10 < Fenhl> so… it seems that http://wiki.vg/Plugin_channel is somewhat outdated as well 09:11 < Fenhl> why are REGISTER and UNREGISTER channels described as two-way? 09:17 < Fenhl> the rest of the documentation suggests that they are only Client→Server 09:29 <+Amaranth> Fenhl: I think it's meant to be two-way so the client won't bother sending information it knows the server doesn't support 09:30 <+Amaranth> And the server won't bother sending any the client doesn't support 09:30 <+Amaranth> I've never looked at how client mods implement it though, maybe they all decided to not do that 09:30 <+Amaranth> I don't remember if Bukkit sent the message to the client or not 09:32 < Fenhl> so it's supposed to be something like client sends a REGISTER request with all the channels it registers and server responds with REGISTER for those it supports and UNREGISTER for those it doesn't? 09:32 <+Amaranth> No, just sending REGISTER back and forth 09:32 < Fenhl> ??? 09:32 * Fenhl opens the Dinnerblog post 09:33 <+Amaranth> UNREGISTER is stupid 09:33 <+Amaranth> afaik it only exists because Bukkit allowed unloading plugins at runtime 09:33 < Fenhl> how does vanilla react to REGISTER? 09:33 <+Amaranth> It ignores it, just like every other plugin message 09:33 < Fenhl> ah okay 09:34 <+Amaranth> Unless you're writing a client and connecting to Bukkit servers you really should never see an UNREGISTER 09:34 < Fenhl> so the server just responds with REGISTER for channels it knows and ignores the rest 09:35 <+Amaranth> No, pretty sure both sides are just supposed to send a REGISTER for everything they know about 09:35 <+Amaranth> No filtering for what the other side said 09:35 < Fenhl> ah 09:36 <+Amaranth> I don't think such filtering would break anything but who knows since this wasn't implemented consistently 09:36 <+Amaranth> Also I'm not sure who ends up sending REGISTER first 09:37 < Fenhl> probably doesn't matter because both do asap? 09:41 < Fenhl> now the question is, do these still use UTF-16 as indicated on other articles? 09:43 <+Amaranth> Well, the rest of the protocol moved to UTF-8 but as far as the actual protocol is concerned these messages are just bytes 09:44 <+Amaranth> And I don't remember switching Bukkit to UTF-8 before we stopped working on it 09:44 <+Amaranth> So it at least is still UCS-2/UTF-16 for these 09:46 < Fenhl> ok so the channel name is UCS-2/UTF-16 in REGISTER/UNREGISTER and VarInt-prefixed UTF-8 when used as the first field of a Plugin Message packet 09:46 < jast> which of the two is it, actually? I haven't really ever looked into it 09:56 <+md_5> <+Amaranth> It ignores it, just like every other plugin message 09:57 <+md_5> not true, vanilla uses plugin messages for books and a few other things :p 09:57 <+Amaranth> Oh yeah, forgot those goofy things 09:57 <+Amaranth> Well, it doesn't register for them so the rest is still true unless that's changed now too 10:02 < Fenhl> Dinnerblog says plugin channels are limited to 16 chars, is that still true? 10:02 < Fenhl> er, channel names 10:03 <+Amaranth> I think only Bukkit has that limit, iirc that has caused issues with Forge before since they just allow whatever 10:04 <+Amaranth> Plugin channel names are a part of the packet so those are going to be UTF-8. However the contents of the message are up to the mod which means the ones in REGISTER are going to be UTF-16 10:04 <+Amaranth> Whee 10:05 <+Amaranth> So you'll get REGISTER in UTF-8, it's contents will be UTF-16, and those will be used to match against future channel names that are UTF-8 :D 10:20 < Fenhl> wat 10:20 < Fenhl> okay I don't understand any of this, someone else needs to clean up the wiki 10:23 < Fenhl> has MC|RPack been replaced by the Resource Pack Send (Play, 0x48, clientbound) and Resource Pack Status (Play, 0x19, serverbound) packets? 17:43 < nickelpro> Fenhl: afaik, yes --- Day changed mar. mars 10 2015 00:01 < SnowDapples> Does anyone happen to know what values the server is sending to the client by default for 0x39 Player Ablilities? 00:32 < toqueteos> SnowDapples: 0.05 flying speed, 0.1 walking speed 00:32 < toqueteos> flags whatever you like 00:34 < toqueteos> source: https://github.com/GlowstoneMC/Glowstone/blob/c061facfed82710dff442f96e35138a41048b4c0/src/main/java/net/glowstone/entity/GlowPlayer.java#L988 00:34 < toqueteos> flySpeed and walkSpeed are on lines 241 and 246, values work pretty nice 00:34 < toqueteos> hope that helps SnowDapples! 01:18 < Enelar> Hi guys. I was ignored on #minecraft@esper so let me ask first. Could i ask about minecraft protocol here? 01:19 < Enelar> oh, i just read rules. sorry. let me reask 01:20 < Enelar> Im developing yet another C++ server, and right now i trying to reach 'PLAY' state. Im sending 'Login Success (0x2)' packet without compression or encryption enabled 01:21 < Enelar> i compare it with traffic sniffed from spigot server. and packets strictly equal 01:22 < Enelar> But minecraft crash with 'packet was larger than i expect'. https://pp.vk.me/c622917/v622917398/23247/FJs7fqrd53M.jpg 01:22 < Enelar> And packet larger exactly on a size 'VarInt(size_of_nickname) + nickname_string' 01:23 < Enelar> But when i remove that nickname field, i get https://pp.vk.me/c622917/v622917398/23259/NCrm1ZUXRP4.jpg 01:23 < Enelar> So i assume that i still should send nickname back, but whats i doing wrong? 01:24 < Enelar> For me its just a magic, but seems that minecraft have power to smell that data origin is not composed in java, and then crash 01:25 < Enelar> What i found next, that i cant pass invalid sizeof(nickname), so i assume that check 'packet was larget than i expect' is going AFTER he actually parsed with netty 01:25 < Enelar> i spend few hours on it, and i really appreteate if someone will advice me 01:29 < Enelar> And btw i learned that i could use empty UUID as result from there https://github.com/Bukkit/mc-dev/blob/master/net/minecraft/server/PacketLoginOutSuccess.java#L28 01:29 < Enelar> but for me it crash connection with 'invalid UUID' error. if it might help you 01:49 < nickelpro> Obviously not equal or it wouldn't crash, unless Minecraft has a special bit of hate for you 01:49 < nickelpro> Code up somewhere? 01:53 < Enelar> well, weird thing, i used sniffed data and completely replayed it, and client still crashed 01:54 < Enelar> thats why i begging for help here, and not solve by myself :((( 01:54 < Enelar> look here https://pp.vk.me/c622917/v622917398/23247/FJs7fqrd53M.jpg 01:56 < Enelar> Right now my main guess that minecraft client abadon connection if stream not filled fast enough during login: https://pp.vk.me/c622917/v622917398/236fb/RycAiaBQj9M.jpg 01:57 < Enelar> as you may see, it already passed packet 0x2 and began parsing 0x1 (Join Game) 01:58 < Enelar> i am too shy to share code on public, but here it is: https://github.com/Enelar/ed.minecraft/blob/4fd38cd221c2289c26c902e3b9cf613489b06883/ed.minecraft/protocol_handshake.cpp#L32 02:48 < Enelar> nickelpro, looks like minecraft has that bit 03:55 < Enelar> Oh man i was so dumb. After 20 hours of debugging i found the issue 03:56 < Enelar> it was there https://github.com/Enelar/ed.minecraft/blob/master/ed.minecraft/main.cpp#L101-L107 03:56 < Enelar> after sending data, i do not clear buffers, so them sending over and over again 03:56 < Enelar> and because 0x2 packet is differ from LOGIN state, client crash 03:57 < Enelar> sorry for taking your time 08:36 < Not-dca0> [mineflayer] roblabla pushed 10 commits to master [+0/-0/±14] http://git.io/p4fb 08:36 < Not-dca0> [mineflayer] deathcap 2f89a25 - Update for player_info (0x38) packet list item changes pre-1.8, this packet was sent one for each online player: player_info: {id: 0x38, fields: [ { name: "playerName", type: "string" }, { name: "online", type: "bool" }, { name: "ping", type: "short" } ]}, as of 1.8, it now includes a list: http://wiki.vg/Protocol#Player_List_Item and instead of a 'online' bool, an 'action' integer: 0: add player 1: update gam 08:36 < Not-dca0> [mineflayer] deathcap 91113b9 - Update for map_chunk/_bulk packets, no longer compressed individually Compression is now handled at a higher layer by the protocol, instead of special-cased in these map chunk packets 08:36 < Not-dca0> [mineflayer] deathcap 4caf063 - Update for multi_block_change record packet change Instead of a raw .data buffer, this packet now has a .record array with various data members unpacked and partially decoded 08:36 < Not-dca0> [mineflayer] ... and 7 more commits. 08:48 < gurun|work> Enelar, it's not like you are the first to make mistakes like that here :-) Obviously THAT never happens to ME .. but... 08:49 < Enelar> yeah. just imagine hairs at my head when i clearly see that packets equal 11:23 < SnowDapples> is mcdevs.org dead? 18:13 < TkTech> SnowDapples_: Domain name was murdered awhile ago and all the topic links updated 18:13 < TkTech> SnowDapples_: It was just a CNAME for mapping to http://wiki.vg/MCDevs/rules 18:34 < SnowDapples_> ah, ok, Thanks, TkTech 18:34 < SnowDapples> and Thanks, toqueteos 18:35 < toqueteos> np did it help? 18:35 < SnowDapples> Yea, I tried some corner-cases and 0.1 looked fine for walk speed, so I wanted to see what the server actually uses. 18:36 < SnowDapples> We initially had it set to 1.0, but it looked like playing on FOV setting 30 18:36 < SnowDapples> What I don't quite understand, tho 18:36 < SnowDapples> this value doesn't seem to effect the actual speed, just the FOV the client uses. 22:05 < nickelpro> Client does its own physics last I checked. Doesn't care what speed you tell it to go, it does its own thing 22:16 < SnowDapples> huh, that's interesting. 23:46 < Not-dca0> [mineflayer] roblabla pushed 1 commit to master [+0/-0/±1] http://git.io/pzfc 23:46 < Not-dca0> [mineflayer] roblabla c26c226 - Use minecraft-protocol on npm. Git dependencies tend to break the world due to compiled assets. --- Day changed mer. mars 11 2015 01:01 < Not-dca0> [mineflayer] roblabla pushed 3 commits to master [+0/-0/±5] http://git.io/pzRZ 01:01 < Not-dca0> [mineflayer] rom1504 11e3d32 - fix sendPositionAndLook (remove stance), fix bot.entity.onGround, fix sending of packet settings. echo example now works 01:01 < Not-dca0> [mineflayer] rom1504 b6f619d - fix indentation 01:01 < Not-dca0> [mineflayer] roblabla b41fece - Merge pull request #196 from rom1504/master Fix echo example 19:40 < TkTech> Holy crap 19:40 < TkTech> Someone updated burger 19:42 < dx> whoa 19:44 < dx> noice https://github.com/mcdevs/Burger/pull/12 20:50 < Cubixmeister> hi guys, we're working on a new service for map makers, it would be cool if you could take a look and say what you think - http://craftures.com/ 20:59 < rom1504> fun --- Day changed jeu. mars 12 2015 01:30 < nickelpro> dx: Holy fuck I thought burger was dead forever. If it comes back to life that would be huge for mineflayer and spock's maintenance burden 01:30 < dx> nickelpro: the author of that PR is doing it specifically for mineflayer 01:31 < dx> linked from there https://github.com/andrewrk/mineflayer/issues/193 01:32 < nickelpro> Ya I just read it, good for him. Burger is a much missed tool 01:49 < nickelpro> what happened to tktech's solum lib? Can't find where it lives 02:38 < Not-dca0> [mineflayer] roblabla pushed 2 commits to master [+0/-0/±2] http://git.io/p6Lz 02:38 < Not-dca0> [mineflayer] roblabla 4437486 - Fix map handling 02:38 < Not-dca0> [mineflayer] roblabla 1db4be9 - Merge pull request #200 from roblabla/bugfix-map-handling Fix map handling 10:18 < rom1504> yeah we are trying to make mineflayer work again at #prismarineJS/node-minecraft-protocol@irc.gitter.im :) 10:21 <+Fador> I also have a node.js project.. https://github.com/Mineserver/mineserver.js ;) 10:22 < gurun> Funny, i was just saying on #mcpedevs that i'm looking for MC node.js projects :-) 10:23 < rom1504> you can look at https://github.com/PrismarineJS/ too ;) they're trying to build a minecraft server on top of node-minecraft-protocol 10:32 < gurun> looks like that protocol implementation would be a performance killer, not? 10:33 < rom1504> huh no ? 10:33 < rom1504> is your protocol implementation faster ? 10:33 < gurun> well, the packages are like dictionaries or? 10:33 < rom1504> node-minecraft-protocol has all the protocol 10:34 < gurun> yes looking at that one 10:34 < gurun> { name: "experienceBar", type: "float" }, 10:34 < gurun> it's that kind of construct i'm not sure about. 10:34 < gurun> looks like template objects of sort. 10:34 < gurun> but maybe it's a JS thing i don't understand. Does it convert to real JS objects perhaps? 10:35 < rom1504> hmm I don't know the exact implementation details, but basically yes it does 10:35 < rom1504> roblabla: has more info 10:36 < rom1504> it's fairly fast afaik 10:37 < gurun> yeah, looking at the parsePacket stuff 10:37 < gurun> hehe, can't help thinking JS is a different beast :-) 10:37 < gurun> if (!!!lengthField) return null; 10:37 < gurun> it's like "if not, really not, for sure not lenghtField". What the heck is !!! ? 10:38 < rom1504> node-minecraft-protocol is used by several projects so it's easier to maintain (several people want it to work) 10:38 < Frigolit> lol !!! 10:38 < rom1504> :D I don't know 10:38 < gurun> like in PHP === .. yes, really really sure i want it to be equal :-) 10:39 < rom1504> but I bet there's a good reason, that's the worst of it :p 10:39 < Frigolit> *shrug* php... 10:39 < Frigolit> JS also has the === 10:39 < gurun> !== not really sure if i want it or not .. PHP monster syntax :-) 10:39 < gurun> well === has a purpose for sure. 10:39 < rom1504> http://stackoverflow.com/questions/21154510/the-use-of-the-triple-exclamation-mark meh 10:39 < Frigolit> it does, but it's still stupid :P 10:40 < rom1504> apparently it's the same as !lengthField 10:40 < Frigolit> PHP and JS are horribly flawed with their data types by design 10:40 < gurun> hihi, for a developer used to strict C based constructs, it does make you stop and think a bit 10:40 < Frigolit> yeah 10:42 <+Fador> bitwise operations are also funny in js, everything except >>> return int32 10:42 < Frigolit> ^^ 10:42 <+Fador> so >>>0 can be used to convert integer to uint32 =b 10:42 < gurun> rom1504: Yeah, it appear as if the dictionary stuff is basically just a way of implementing reflection (type info and field info). 10:43 < Frigolit> also hate that ints becomes floats when performing division ;3 10:43 < Frigolit> best way to get it to an int again? a|0; 10:44 < rom1504> gurun: yeah, that makes it easier to use packets afterwards 10:44 < Frigolit> ie. bitwise or 0, cause performing a bitwise operation makes it an int again _-_ 10:45 < gurun> yeah, i generate the code based on XML, so that would be similar in concept. Just a runtime version of it in node.js. 10:46 < gurun> JS is different for sure when it comes to type declarations. 10:46 < Fenhl> I thought JS didn't have integers? 10:47 < gurun> uh? 10:47 < rom1504> gurun: I think roblabla wanted to somehow put it in json instead but that didn't work out 10:47 < rom1504> not sure why 10:47 < jast> well it doesn't have specific types for int values 10:48 < gurun> well, JSON wouldn't be the right thing in this case i think. I should be JS objects (not the same). 10:48 < jast> just a general Number class... and special implementations of Array 10:48 < rom1504> yeah I mean, store the protocol in json, then read it in the JS 10:49 < rom1504> anyway it has to be in the js at some point 10:49 < rom1504> and yeah it's runtime 10:49 < rom1504> do you generate js based on xml ? 10:49 < gurun> no, i generate C# based on XML. 10:49 < rom1504> oh right 10:49 < jast> using PHP's == in combination with unserialize() on a cookie value made for an awesome security issue in phpBB once 10:50 < gurun> but since node.js is supposed to be super fast on communication i'm a bit interested in it 10:51 < gurun> like someone told me "node.js" is what happens when you let internet develop a framework and not a single company. 10:51 < jast> I don't think that makes sense 10:51 < jast> the same thing could have been conceivably developed by a single company 10:52 < gurun> i think they are refering to JS not having a "socket API" and them doing themselves. 10:53 < gurun> But to be perfectly honest, stuff like node.js has as little place in the world as PHP outside of the web-world. Or perl as a "programming language", or etc etc. 10:53 < jast> my day job is a perl application :} 10:54 < gurun> haha 10:54 < gurun> (sorry) 10:54 < gurun> i wrote a db once in perl. One my first projects before we learned how to use real databases. 10:54 < jast> it's okay... I don't mind if you stay clear of my segment of the market ;P 10:54 < gurun> with an emphasis on "once". We wrote it once and NEVER looked back. We couldn't :-P 10:55 < jast> anyway, all software sucks, so I kind of don't get excited about most "OMG REVOLUTIONARY" stuff anymore 10:55 < gurun> we had our winter holidays at the university and when we came back, we couldn't understand our own code anymore.. 10:55 < jast> you can write unmaintainable code in any language... perl just happens to be particularly supportive of you ;) 10:56 < gurun> jast, still waiting for that next generation OMG language too. I don't see it coming yet. 10:56 < jast> I think Rust is interesting 10:56 < gurun> i jumped on Java immediately. Jumped on C# and .NET immediately.. but haven't found anything really new after that. 10:56 < gurun> Rust is cool. 10:56 < jast> Java is something you can use to chase me away :) 10:57 < gurun> haha 10:57 < gurun> well, java is dead now. 10:57 < gurun> and have been for 5 years or so 10:57 < jast> nah, not any time soon 10:57 < jast> too many existing systems that depend on it 10:57 < gurun> jast, you are right. Just like cobol :-P 10:58 < jast> I mean, for client-side web stuff it's definitely dead, it just doesn't know it yet 10:58 < jast> oracle is helping that along, thankfully 10:58 < rom1504> there's java8 10:58 < jast> with each new update of JRE some new security check breaks 80% of everything 10:58 < gurun> yeah, oracle have been doing a great job killing it :-) 10:59 < gurun> but they didn't succeed quite as good with MySQL .. good thing. 10:59 < jast> which is great for us because we get lots of support requests we can charge people for 10:59 < rom1504> huh of course java is dead for client-side, I don't want to see any applet 10:59 < jast> but I'm not entirely serious about that, so it's not _actually_ that great 10:59 < rom1504> but server-side or not-web it's still useful 10:59 < gurun> rom1504, java was never born on the client-side. 10:59 < gurun> but it was surperior on the web. And still is. 11:00 < jast> I think client-side java helped it get a lot more attention 11:00 < gurun> if you see web as "enterprise apps". 11:00 < gurun> .NET still struggling to catch up on "EAR" hosting. 11:00 < jast> well I've got this perl-based enterprise app here... 11:01 < gurun> .NET still doesn't have a real application server. Microsoft got stuck in COM and DTC thinking. 11:01 < jast> most application servers I've seen are way overengineered 11:02 < jast> one of our backend components is java-based 11:02 < rom1504> it would be nice to use ocaml or haskell for real stuff (and not just compilers), but not any libraries/people using them 11:02 < rom1504> *enough 11:02 < jast> I dunno. I want to like ocaml and haskell, used to in fact, but at this point I don't think I do 11:03 < gurun> haskell, isn't that in he "logical language paradimes" ? 11:03 < jast> functional 11:03 < rom1504> functional yeah 11:03 < gurun> oh, fuctional. 11:03 < gurun> remeber learning that in school. 11:03 < rom1504> prolog is ~logical 11:03 < jast> it's probably the most well known *pure* functional language 11:03 < gurun> and thats all i remeber about it. 11:03 < jast> in short... monads 11:03 < gurun> yeah, i was thinking about prolog. 11:04 < gurun> we did SML and UML for functional. And then you have F# and i just feel so sorry for the guy maintaing that. 11:04 < jast> and ocaml is a grab bag of almost everything :} 11:04 < rom1504> ocaml is mainly functional 11:04 < rom1504> it has objects but nobody use them 11:04 < jast> it has imperative stuff, too :) 11:04 < gurun> oh, ocaml sound close to F# 11:04 < rom1504> yeah but nobody (should be) use them :p 11:04 < gurun> a mix 11:05 < jast> F# was very strongly inspired by ocaml afaik 11:05 < gurun> these languages are very popular in university for one single reason. ANd on only. 11:05 < gurun> It makes a whole class of university students reset to same "level of ignorance" regardless of their background. 11:06 < jast> there's a lot you can learn from functional programming 11:06 < gurun> hence, functional is usually the first lang you learn. 11:06 < jast> we started out with java, then haskell and prolog 11:06 < rom1504> many "not functional" languages are adding functional stuff these days though 11:06 < jast> I think for java they did the worst job teaching it 11:07 < rom1504> we did ocaml -> c -> java/c++, with some web in between 11:07 < jast> one of the most awesome inventions from functional land is list comprehensions 11:08 < jast> way more languages need to support that please 11:08 < gurun> we did functional (UML/SML) and then logical (prolog and that other one) and then imperative (unix C only) and finally all kinds of dialects of assembler. 11:08 < jast> list comprehensions are what allows you to implement a readable naive quicksort in two lines of code 11:09 < gurun> you mean.. that "list" is a native thing to functional languages or? 11:09 < gurun> like "list awareness" ? 11:09 < rom1504> no 11:09 < jast> no, list comprehension is a specific tool for working on lists 11:09 < jast> quicksort example from Erlang: 11:09 < jast> qsort([]) -> []; 11:09 < jast> qsort([Pivot|Rest]) -> qsort([Front || Front <- Rest, Front < Pivot]) ++ [Pivot] ++ 11:10 < jast> qsort([Back || Back <- Rest, Back >= Pivot]). 11:10 < jast> ignore extra line break 11:10 < jast> the [x || y] syntax is a list comprehension 11:11 < jast> where x is a list, and y is conditions and transforms on the list elements 11:11 < gurun> ah, i understand (well, i know what you mean, i don't really understand that stuff anymore) 11:11 < jast> [Front || Front <- Rest, Front < Pivot] means: iterate over Front (where each Front is an element of Rest), and select those Front that are less than Pivot 11:12 < gurun> to me .. func lang feels like doing recursive VB where you are forced to only use variants. 11:13 < jast> VB variants are the hacky cousin of dynamic typing, right? 11:14 < gurun> yeah 11:14 < gurun> dynamic and runtime binding thingy 11:14 < rom1504> functional language are usually typed 11:14 < gurun> like JS 11:14 < rom1504> well not all of them 11:14 < rom1504> but haskell and ocaml (and erlang I think ?) are 11:14 < jast> yeah. haskell and SML have pretty rigorous typing 11:15 < jast> the cool thing is that they infer the right types automatically 11:16 < jast> so ideally you get the comfort of not having to manually tag types onto everything, but still get type safety and extensive compile-time checks 11:16 < gurun> well, they can convert to and from lists of types dynamically, can't they? I thought that was kind of where the power is. 11:17 < gurun> like, functionl programming in a nutshell "Apply this to this thing util it's not a list anymore, and then do some checking on that" 11:17 < gurun> hehe, maybe a bit simplified :-P 11:17 < jast> that's not really the way I think about it 11:18 < jast> and, really, functional programming isn't always about lists 11:18 < jast> that's just the bulk of all examples because list processing is so extremely easy when using functional principles 11:18 < gurun> yet the first thing we was thought was "functional programming is all about lists" 11:19 < gurun> but we didn't really learn to do anything serious about it. It was just used as a tool to help us think "algorithms" about problems. 11:19 < rom1504> I think one of the main thing is you don't use loops 11:19 < rom1504> (and don't have them at all in some of these languages) 11:20 < jast> at the heart of functional programming is that you express many things as functions transforming one thing into another and then just use functions, instead of tons of control structures 11:20 < gurun> no, does real functional programming have loops at all? I don't think so? 11:20 < jast> most of the time you use iterations over lists instead of loops 11:21 < gurun> jast, yeah that way of "expressing" is what they tried to tech us. Express things in a way that a computer can determenistically understand and process. 11:21 < gurun> it's one of the best courses I attended, i rember that much. 11:21 < gurun> i aced the exam, that much i remeber. 11:21 < jast> I never write stuff like this anymore: foreach (key k in array) { array[k] = foo(array[k]) } 11:21 < jast> because I can just write this: array = map(foo, array) 11:22 < gurun> up until the day before the exam i didn't really "get it". The coin simply refused to fall down. 11:22 < jast> yeah, funny how that goes sometimes 11:22 < jast> same thing happened to me with some of the exams 11:22 < gurun> but then i had a two hour session with the guy that wrote UML (he was a teacher at my institution). So he explained to me how the interpreter was implemented in Java. 11:22 < gurun> and then it all came to me .. like Jesus or somethin.. 11:23 < jast> see, that's what functional programming means. it's literally jesus. 11:23 < gurun> it was a remarkable experince. 11:23 < jast> so repent now, while you still can 11:23 < gurun> yeah, i bet it can walk on water .. if you just make water into a list :-P 11:23 < jast> from your evil imperative/object-oriented ways 11:24 < jast> two other common themes in functional programming: (a) variables are mutable. this means you always know that a value can't magically change somewhere in the bowels of your call stack. 11:24 < gurun> guess that's where MC come into play. It turned flowing water into a list of blocks. And then . ahhhh shit! I should rewrite my water stuff to use F# instead. Wow, that should work great. 11:24 < jast> (b) you can use matching on structure to easily extract stuff from data structures 11:26 < gurun> but i think i will stick to imperative programming for now. As i used to say in my CV after university "I know funtional, logical and imperative languages. And if you need to ask what that is, i'm not interested in working for you". 11:27 < gurun> eh .. and then i got kids and family and have to comply to imperative only. 11:28 < gurun> Today my CV says "I'm rather programming language indifferent, but usually work with languages that emphesize delivery of business value". 11:28 < gurun> that kinds of rule out functional and logical ... 11:32 < jast> not really 11:32 < jast> certain types of implementations are heaps easier in functional languages 11:33 < jast> the one Haskell program I've written at this point solved an optimization problem 11:34 < jast> a friend of mine implemented the same thing in C at the same time 11:34 < jast> mine was 200 lines of code in the end... his was... quite a bit more 11:35 < jast> so it really comes down to what kind of business value you're after 11:45 < gurun> the kind that is easy to get and pays for the food on the table :-) 11:45 < jast> well duh 11:46 < jast> thing is, if one language makes it easier to express your solution, you can create value faster 11:46 < jast> the most popular languages/systems tend to give you more to stand on, so it's highly likely they'll allow you to achieve your ends more quickly 11:47 < jast> but when you're in a domain where there's nothing to stand on, suddenly popularity doesn't help you anymore