Time Nick Message 01:20 Pilcrow hello, #minetest! 01:21 VanessaE hi. 01:23 Pilcrow is there a way for a minetest mod to create a new directory? I know io.open can create files, but I'm tossing around an idea that could potentially make a LOT of files, and I'd like to keep them seperated out - in a directory within the world folder - if possible... 01:24 Pilcrow hello est31 :) 01:28 Pilcrow I mean, I know I could do something like os.execute("mkdir " .. dirname), but that comes with its own problems. plus, does os.execute even work any more? I know there were some security changes talked about. not sure if they were implemented. 01:29 est31 they arent merged yet 01:29 est31 so what do you exactly want to do? 01:35 Pilcrow est31: well, I've been thinking about making a certain mod that will potentially create a LOT of seperate files (io.open, etc). I'd like my mod to create a directory within the world folder, and then create the new files in there. it's just an organisation thing; if there's no easy way to do this, I can make do without... 01:36 est31 every file allocates around 4 kb 01:36 est31 know what you do :) 01:36 est31 and no, there is no better way than os.execute 01:36 est31 currently 01:37 est31 what exactly are those files for Pilcrow? 01:43 Pilcrow est31: basically my idea is to create something like a simplified version of minecraft's ME system (from the Applied Energistics mod). I want to make a server node you can fill with hard drive items. these hard drives should be percieved to "contain" items (i.e. if someone steals a drive and sticks it in their own server, they have your items). 01:43 Pilcrow since, afaik, there's no way to store metadata within an inventory item, I want the drives to each have a unique ID and a file associated with that id (I'm planning to register the drives as tools so that a wear value can be used as the id)... 01:45 est31 you are abled to set metadata 01:45 est31 https://github.com/minetest-technic/technic/blob/master/wrench/init.lua 01:45 est31 ^ thats a good example 01:46 est31 I'd suggest to do that instead of creating files 01:47 Pilcrow but only a node can have metadata, right? you can't make, for example, a chest item that is opened/accessed from within your inventory and doesn't need to be placed as a node... right? 01:48 Pilcrow hmm, I just looked at your link. maybe I'm wrong. 01:53 Pilcrow But I also have another reason for doing it as files: I want the servers to be accessed remotely by terminal nodes that may not even be in the same chunk (compare to the storage boxes in the pokemon games, with the server being at bill's house or something). This means that the server node, and any drives therein, may not actually be in a loaded chunk. In order to still be able to change the files, I think I'd need a detached inve 01:55 Pilcrow Which would mean saving into files in order to prevent the loss of all those detached inventories on server shutdown... 01:58 est31 still I suggest making one single table 01:58 est31 s/still/then/ 01:58 RealBadAngel items can have meta too 01:58 est31 which is saved on server shutdown 01:59 RealBadAngel many technic tools use items meta to store data 01:59 RealBadAngel metadata can be a table, able to store anything 02:00 RealBadAngel with items you dont have to worry about saving/loadin your data 02:00 VanessaE ..but you have to worry about /clearobjects and related 02:00 VanessaE better to store the meta in a node instead, and use it to call forth whatever entities you need. 02:01 RealBadAngel only then item is on the ground 02:01 RealBadAngel *when 02:01 RealBadAngel same applies to dropped node btw 02:02 Pilcrow RealBadAngel: est31 already pointed out the fact that items can have metadata, by linking me to the wrench in technic. Still, thanks for your input. As stated, there's more than one reason I am thinking to use files. Though using one table, as est31 suggests, might be best anyway. 02:02 VanessaE engine has big problems with entities again lately 02:03 est31 ghost entities bug is ols 02:03 est31 old* 02:04 VanessaE indeed. 02:04 RealBadAngel pilcrow, you can also try this: https://github.com/minetest-technic/datastorage 02:04 RealBadAngel it allows to save player related data in single file (per player) 02:05 Pilcrow although, since items can have metadata, I will probably end up storing the drive ids as metadata within the items, rather than using a wear value (since certain things may apply extra wear and screw up the drive) 02:05 est31 weird stuff 02:05 est31 what do I need to enable too to get pvp working? 02:05 est31 i have set enable_pvp = true 02:05 est31 something else too? 02:06 est31 damage is enabled 02:06 VanessaE that's all you should need 02:06 est31 and yet when players punch each other, nothing happens 02:06 VanessaE jeez 02:08 Pilcrow RealBadAngel: that datastorage mod looks like it'd be very useful for this project. thanks! :) 02:09 Pilcrow just a random question related to that link though: does depends.txt even need to exist if it's blank? :P 02:11 VanessaE no. 02:11 VanessaE if you don't depend on any other mods (not even default), you can omit depends.txt entirely if you want. 02:13 Pilcrow VanessaE: that's what I thought, thanks. I was just confused for a minute; the file exists in the datastorage mod RBA just linked, but it contains only whitespace... :P 02:17 Pilcrow anyways, I'm bookmarking the technic wrench and datastorage pages for future reference. I'm still in the planning stages for this mod at the moment, but hope to have something to show for it soon. I've actually thought about this mod quite a bit; I even put placeholder functions for it into my hoverbot mod, which was started much earlier... the currently useless "Send item to DigiBank" and "Retrieve item from DigiBank" commands we 02:33 Pilcrow speaking of hoverbot, VanessaE, I've stopped trying to modify or use the mesh for now, as my heat problems keep getting worse in the other laptop (it often shuts down when I'm trying to edit the model), and I still haven't gotten Blender to work in this one. I'm sticking with the nodeboxes until I have money for some thermal paste... :\ 02:33 VanessaE damn 02:34 VanessaE well a tube of AS-5 is only about $8 or so 02:34 Pilcrow $8 is a lot for someone with no job; I need to save all I can for gas and cat food, lol. 02:35 Hijiri what about the bloodthirst of heatsinks 02:35 VanessaE oh heh 02:35 Pilcrow Hijiri: um.. what? 02:35 Hijiri i-it's a meme 02:36 Pilcrow Hijiri: heh, not one I've ever heard, but ok. :P 02:37 Hijiri it's not usually worded like that 02:37 Hijiri heatsinks have been known to give people cuts 02:37 Pilcrow ahh. that's what you meant. 02:37 * Pilcrow is slow tonight :P 02:39 exio4 hi 02:40 Hijiri hi 02:40 Pilcrow hello exio4! 02:40 Pilcrow huh. I think newegg is having problems. it won't load for me. :P 02:42 exio4 how is everything going Pilcrow / Hijiri 02:42 Hijiri it has been going sleepy 02:44 Pilcrow exio4: eh, some bad things have been going on for me, but I'm getting through it. on a positive note, I'm finally starting on a mod I've been thinking about forEVER... :P 02:44 exio4 sad thing for both 02:44 exio4 today I woke up at like 4:30AM 02:45 Pilcrow exio4: today *I* woke up at like 4:30PM! :P 02:45 exio4 rude 02:46 Pilcrow but, I also went to bed around 8AM... 02:47 * Pilcrow miiight be nocturnal... :P 02:48 exio4 I went to around 7PM 02:50 Pilcrow wow. I haven't gone to bed that early since middle school! 02:52 Pilcrow even in high school, I'd usually go to bed around 10 or 11 (and get up at 7AM; the bus came at 7:45)... 02:52 exio4 that's because you are not a lazy ass 02:53 Pilcrow exio4: no, I am definitely a lazy ass, lol. just also a night person. The sunlight! it BURNS! haha 02:54 exio4 did I ever say I did anything at day? 02:54 exio4 I also woke up at 11AM yesterday 02:54 Pilcrow :P 02:54 Pilcrow "are you ready to get up at the crack of noon?" -- Jack Black 02:55 VanessaE "We leave at dawn! .... Noonish." -- John Candy 02:55 VanessaE :) 02:55 exio4 it's also late 02:56 Pilcrow only 10pm here. 02:56 exio4 I think it's nearly midnight here 02:56 exio4 I don't know 02:57 exio4 I just assume it is late if I am tired 02:57 Pilcrow heh. 02:57 Pilcrow if I did that... it'd always be late. :P 02:58 exio4 I like you 02:58 exio4 Pilcrow: I am not tired _ALL_ the time 02:59 exio4 just past 1PM and before 11AM 03:01 Pilcrow right now, my tiredness is on the back-burner, as I sit here trying to decide if my "hungry" is stronger than my "lazy" yet... 03:02 Pilcrow ^ does this happen to everybody? :P 03:02 VanessaE yep 03:02 VanessaE all. the. time. 03:02 VanessaE usually lazy wins :) 03:06 Pilcrow lol. Sometimes "obsessed with " wins out over all, though. I once was working on a linux project all day and then a friend came over and I passed out in front of them. Turns out I hadn't eaten or drank anything in about 12 hours. I wasn't trying to starve, just didn't even notice... :P 03:09 VanessaE that's me with homedecor of late. 03:09 VanessaE wish I could go 12 hours without eating or drinking. maybe I'd finally lose this weight :P 03:16 Pilcrow VanessaE: jeez. I just looked at homedecor. Looks like you've been making about one commit per hour. Seems like a lot of work... :P 03:16 VanessaE Pilcrow: heh, well not quite THAT busy but yeah, I've been busting ass on it :) 03:17 VanessaE thankfully, the vast majority is done 03:18 Pilcrow well, I just saw the fact that you've personally made 11 commits in the last 11 hours (and kilbith has done a lot in that time as well). So yeah... @_@ 03:20 Pilcrow (oh, my mistake; kilbith has done 1 commit in that 11 hour timeframe. still, a lot of work has been done) 03:22 VanessaE a lot of what's been done lately is thanks to kilbith's help either directly or indirectly 03:24 Pilcrow yeah, I figured that. not trying to belittle anyone's work... :) 03:24 Pilcrow speaking of homedecor, it just keeps getting bigger and bigger, doesn't it? not that that's a bad thing; it's one of the better 'big' mods to have installed, anyway... 03:25 Pilcrow s/mods/modpacks/ 03:25 * Pilcrow remembers when it used to be a single monolithic mod... :P 03:26 VanessaE actually, 03:26 VanessaE it has shrunk significantly in total size 03:26 VanessaE kilbith and I went through and put it on diet :) 03:27 VanessaE something like 300 textures dropped in the past ~3 months 03:27 Pilcrow oh really? did you get rid of nodes, or just simplify things? 03:27 VanessaE simplifying things, eliminating redundancy, using mesh nodes where possible to improve texture usage, etc. 03:29 Pilcrow ah. I didn't actually check the file sizes; I meant bigger in node-count, lol 03:29 VanessaE oh heh not really 03:29 VanessaE it's probably a wash 03:30 VanessaE 2+node-sized mesh eliminates redundant "head"/"tail"/"bottom"/"right" etc nodes, then some new unique node is added later 03:30 VanessaE etc 03:30 VanessaE the whole pack is 10MB now 03:31 VanessaE (not including git history) 03:31 Pilcrow oh. yeah. didn't even think about that. perhaps I should've just said more useful, rather than bigger. ;) 03:31 FreeFull VanessaE is secretly a 1mx1mx1m block 03:31 VanessaE heh 03:32 VanessaE wow. 3 MB of textures, 2.6 MB of models 03:32 VanessaE another 1.6 MB of "extra fonts" for signs_lib 03:34 FreeFull I wish I could play Android Minetest on my tablet without the screen randomly turning black and then the app eventually closing 03:34 VanessaE no idea about that, FreeFull 03:35 technomancy developing on android is a huge PITA; I'm not surprised they have a harder time finding hackers to improve it vs the PC version 03:36 FreeFull At least anyone can develop for Android, for iOS you need OS X 03:36 technomancy sure; could be worse 03:38 Pilcrow Yeah I have my own gripes with Android Minetest, too. Wish I could play it on my nVidia Shield and actually use the built-in gamepad. Speaking of which, is there any support in minetest for pc game controllers and the like yet? i.e. using a joystick to turn the camera? 03:38 VanessaE nope, don't think so 03:38 FreeFull I don't think there is any built in support at all 03:38 FreeFull Although you can use software to translate joystick input into mouse movement 03:39 FreeFull I don't think PC Minecraft has any support either 03:40 Pilcrow well, I know there was some discussion about usb gamepads when the remappable keyboard controls were implemented, but it was all future-talk. maybe some day... 03:43 MinetestBot 02[git] 04paramat -> 03minetest/minetest: Mapgen v5/6/7: Cleanup node resolver and aliases 1302805af http://git.io/vUu8Z (152015-05-12T04:40:53+01:00) 03:47 Pilcrow whelp, time for food. 03:50 VanessaE bbl 04:14 MinetestBot 02[git] 04est31 -> 03minetest/minetest: is_player() is no player-only function 13b4c3ff6 http://git.io/vUu0w (152015-05-12T05:52:49+02:00) 06:24 TheWild hello 06:24 TheWild are we still messing with licence problem of gsmapper? 06:37 Thron Hi all, what is the BEST IRC client for androind phones? 08:28 TenPlus1 Hi folks 08:29 TenPlus1 would using swap_node be technically faster than add_node since it doesn't touch metadata ??? 08:30 nore I think it isn't 08:30 TenPlus1 was just curious since metadata in node was kept... 08:32 TenPlus1 :) always looking for ways to speed up things ... 08:41 TenPlus1 cya 09:09 JamesTait Good morning all; happy International Nurses Day! 😃 09:47 * CWz thinks Redcrab server is down for good. both worlds are gone 13:34 ADFENO Hi, how do I reference all nodes or entities from a given mod? Is "modname:*" enough? 13:34 RealBadAngel yes 13:34 RealBadAngel like defaut:wood for example 13:35 ADFENO Let me see... Could I reference all itens from default mod as "default:*"? 13:36 RealBadAngel not so easy 13:36 RealBadAngel you should get list of all registered nodes and browse it 13:37 ADFENO I'm trying to use "PlzAdm"'s clean mod to clear all entities from Simple Mobs [mobs]. 13:38 ADFENO I have tried to open the server and do /clearobjects, but the server times out everytime, and I'm forced to terminate it (not to kill it, just terminate). 13:42 sfan5 ADFENO: just wait until some time and try to connect later 13:43 ADFENO Oh, thank you very much.... :D 13:43 sfan5 the /clearobjects command keeps doing it's work even when you time out 13:43 ADFENO Hm... 13:45 ADFENO OK... (so good to know that, now I can sleep well), :D 13:45 ADFENO Thank you, thank you very much.... I must be going now... Bye... :D 13:51 CWz does minetest use TCP or UDP 13:51 sfan5 udp 14:23 technomancy so if I'm making a toy OS for computers in minetest, is it completely tacky if files don't have permissions but only directories do? 14:24 MinetestBot 02[git] 04paramat -> 03minetest/minetest_game: Default/mapgen: Add mapgen aliases for sandstone brick and sandstone brick stair, to enable sandstone dungeons 13ab4485f http://git.io/vU2U0 (152015-05-12T16:23:09+02:00) 14:53 MinetestBot 02[git] 04Novatux -> 03minetest/minetest_game: Fix problems with TNT 134bd1094 http://git.io/vU2ce (152015-05-12T16:53:04+02:00) 14:53 MinetestBot 02[git] 04Wuzzy2 -> 03minetest/minetest_game: Make TNT respect on_blast, implement on_blast for some nodes 138bc8dd6 http://git.io/vU2cv (152015-05-12T16:32:52+02:00) 15:20 Sokomine sometimes it's annoying if some variables are local.... 15:47 * twoelk looks out of the window and thinks thinks the weather is annoying - it should be apple blossom weather not rainy wind 16:08 * Sokomine nods to twoelk 16:35 Krock c'mon forum moderators, there's some work to do 17:25 TheWild minetest.line_of_sight(pos1, pos2, stepsize) wtf? 17:26 TheWild If you could do better math, devs, you could get rid of stepsize you know? 17:28 exio4 Calinou: you are everywhere aren't you 17:52 Megaf !server Megaf 17:52 MinetestBot Megaf: Megaf Server v4.0 | mt.megaf.info:30003 | Clients: 0/6, 0/2 | Version: 0.4.12-Megaf / MegafXploreNext | Ping: 7ms 17:52 Megaf o/ 18:12 exio4 RealBadAngel: I can understand your thoughts on threading, multithreading is so painful in C++ that I wouldn't want it either 18:13 Calinou viva Go/Rust :p 18:13 exio4 lol Go 18:14 exio4 Calinou: Go has a crappy static type system, and it doesn't help that much when it comes to multithreading 18:14 exio4 but yeah, green threads are cool 18:19 exio4 Calinou: any reason to prefer Go? 18:19 Calinou I don't know 18:26 est31 go has a garbage collector 18:27 est31 which makes it a NIH of java 18:28 est31 but yea threading is better 18:28 Calinou Go is native, though… 18:28 est31 and that 18:29 est31 but still garbage collectors require you to have tons of RAM 18:29 est31 so its ok for companies like google who have their whole index in RAM 18:30 est31 but not for devices where its RAM-critical 18:31 Krock do memset on any pointer variable then it can use very much ram 18:31 est31 ? 18:37 exio4 est31: garbage collector alone doesn't mean that 18:38 est31 exio4, why? 18:38 exio4 est31: and you could still have deterministic resourceswith a GC 18:38 exio4 est31: how why? 18:39 exio4 est31: having a garbage collector basically means you can rethink lots of things, and add lots of sharing when needed, too 18:39 est31 exio4, have you read that blog post about garbage collectors on the mobile? 18:40 est31 its basically mostly about gc on low ram environments 18:40 exio4 which kind of garbage collectors were tried, and which kind of ... ah, well 18:40 exio4 I am pretty sure using a garbage collector with 32kb of ram available isn't going to end that well 18:40 est31 exio4, http://sealedabstract.com/rants/why-mobile-web-apps-are-slow/ 18:41 exio4 ah, that post 18:41 exio4 garbage collectors aren't slow by default 18:41 exio4 just sayin' 18:41 Calinou people should use FastClick.js 18:42 exio4 people shouldn't use JS at all 18:42 Calinou JS is love, JS is life 18:42 exio4 JS is crap 18:42 exio4 est31: that doesn't say anything 18:42 exio4 est31: having a crappy language doesn't mean a GC is evil 18:43 est31 gc is evil everywhere 18:44 est31 why is JS crap 18:44 exio4 because it's uni/dynamic typed, has weak typing, and forces you to do stupid things? 18:45 est31 you mean === ? 18:45 exio4 garbage collection sure is evil if you need hard-real-time-constraints on resources and memory (aka microcontrollers) 18:45 exio4 est31: I am talking about the language as a whole, it's a bunch of nice concepts in a sea of stupid dumb things 18:46 est31 exio4, still though, it has adoption, and very fast implementations 18:46 Calinou dynamic typing makes stuff easier, especially for newcomers 18:46 exio4 it doesn't 18:46 exio4 it just means you don't catch errors 18:46 Calinou did you take a look at ES6? 18:47 Calinou https://babeljs.io/ to convert ES6 to ES5 (transpiler) 18:47 exio4 but I will agree, a dynamic typed language to a stupid static type system is a fair fight where dynamic typed language wins 18:47 exio4 transpiler is such a hipster word, too 18:47 exio4 dude, it's just a compiler 18:48 Calinou :D 18:48 exio4 Calinou: ES6 doesn't offer anything worth it, AFAIK 18:48 exio4 it's just adding silly things like "real" OOP to a language where OOP is the least thing it needs 18:48 Calinou it makes the language much better, and makes CoffeeScript obsolete 18:49 exio4 Javascript is obsolete tech still being used by people thinking it's cool and by the fact that you are forced to use it if you want to be a webdev 18:49 MinetestBot 02[git] 04Novatux -> 03minetest/minetest: Add code to support raillike group names 1375622c3 http://git.io/vUVsN (152015-05-12T20:48:55+02:00) 18:49 exio4 node.js though, please, that doesn't need to exist 18:49 exio4 Calinou: have you ever _tried_ to learn to program with a decent typed type system? and how long did it take to you to learn "to program" from scratch? 18:50 Calinou I still haven't finished 18:50 exio4 Calinou: how many months of "programming" did you need before you could say "I can write, somewhat, code that works and I can understand"? 18:50 Calinou exio4, Node.js is async 18:50 LittleJoe you never finish XD 18:50 Calinou makes it very useful in some scenarios 18:50 exio4 being async is really cool obviously 18:50 est31 ^ 18:50 exio4 specially when that's just a library in your language 18:50 Calinou which languages are better than JS to you? you really think Web pages should use C or Go? 18:51 exio4 no, anything with a decent type system would do it 18:51 exio4 Calinou: how long have you been programming 18:52 Calinou maybe 5 years now 18:52 TheWild should be: node.js is async (don't confuse with multithreading) 18:52 exio4 Calinou: if you learn a whole new paradigm, you should expect not to learn it in a whole day, but maybe have to learn stuff for a whole year or so 18:52 Calinou it takes 10 years to be a “good programmer”™ :P 18:52 exio4 TheWild: it's also not even concurrent 18:52 exio4 Calinou: it doesn't 18:52 exio4 Calinou: you can be a good programmer after 5 years, or a shitty programmer after 25 18:53 exio4 TheWild: green threads are a decent solution for concurrency 18:53 exio4 TheWild: guess what, Node.JS doesn't offer you green threads 18:53 Calinou I don't spend 8 hours a day learning programming, that's all 18:53 Calinou it's more a hobby currently, than a job 18:53 Calinou I still wrote More Blocks :D 18:54 Calinou Lua is cool, but I understand it doesn't get bigger 18:54 exio4 Calinou: which languages with static types do you know/have heard of (and tried to learn)? 18:54 exio4 Calinou: my guesses are going to be languages with type systems that don't even try to infer things by default, right? 18:55 exio4 Calinou: or languages without proper 'generics' or parametric polymorphism 18:55 exio4 Calinou: also, with subtyping, which is extremely complicated 18:55 Krock -> brainfuck 18:55 est31 lol 18:55 exio4 I said static types 18:55 Krock you can make static stuff with brainfuck.. maybe 18:55 est31 brainfuck is an assembler language 18:56 est31 its no high level programming language 18:56 * Krock shuts up 18:56 exio4 Krock: do you know what it means to be "static" typed in this context? 18:57 Krock exio4, "int", "float",they're static 18:57 exio4 Krock: ('a -> 'b) -> 'a list -> 'b list // (a -> b) -> [a] -> [b] 18:58 exio4 polymorphic types! yay! 18:58 Krock dafuq 18:58 exio4 polymorphic types is basically "for all a, this has type something" 18:58 exio4 that means 18:59 exio4 forall a. [a] -> [a] can unify with the types 18:59 exio4 [Int] -> [Int] 18:59 exio4 [Double] -> [Double] 18:59 exio4 etc 18:59 exio4 that also means the implementation can't do stupid things like first-element + second-element 18:59 exio4 because it has to work on ANY type, [Bool] too, and what does it even mean to have + in Bool? 19:00 Krock there might be some special situations... 19:00 MinetestBot 02[git] 04Novatux -> 03minetest/minetest_game: De-duplicate code in doors mod in make_on_blast 1381259e9 http://git.io/vUVlY (152015-05-12T20:55:46+02:00) 19:00 exio4 Krock: like? 19:00 nore ('a -> 'b) -> 'a list -> 'b list <-- yay! OCaml! 19:01 exio4 ML syntax, yeah 19:02 Krock exio4, good question. I know too less about those types but if you want to debug a bool, just output it :3 19:02 exio4 Krock: we have typeclasses for thatQ! 19:02 exio4 Show a => (a -> b) -> [a] -> [b] 19:03 exio4 Krock: also, "printing" is a side-effect :p 19:03 Krock God, please spare me from that 19:08 MinetestBot 02[git] 04SmallJoker -> 03minetest/minetest: Build and link gmp correctly on MSVC 13ecc514f http://git.io/vUVBO (152015-05-12T21:07:46+02:00) 19:08 MinetestBot 02[git] 04Novatux -> 03minetest/minetest_game: Copy pos before giving it to on_blast because it can modify it; also remove a debug print that had nothing to do here 13aaa6c26 http://git.io/vUV47 (152015-05-12T21:03:02+02:00) 19:11 exio4 est31: 'Fewer objects created mean less-frequent garbage collection, which has a direct impact on user experience.' 19:12 exio4 est31: some garbage collectors are heavily optimized for things like 'short-term objects', and makes the posibility of "allocating" gigabytes of data per second extremely cheap 19:12 est31 so exio4 you want to have a language where you cant create objects? 19:15 exio4 Still not convinced? Let’s ask an actual Garbage Collection engineer. Who writes garbage collectors. For mobile devices. For a living. You know, the person whose job it is to know this stuff. 19:15 exio4 that doesn't link to something that relates to what he is quoting 19:15 est31 so? 19:16 exio4 he linked to a post where the dude actually works on the concept of a garbage collector that doesn't suffer from the quote 19:16 est31 ah ok 19:16 est31 bad 19:17 exio4 it's like 19:17 exio4 "A is bad, see this" 19:17 exio4 link talks about "here's a 'solution' to A" 19:17 exio4 (I know I know, you can't easily "solve" the problem, but still) 19:18 est31 still gc can come in at bad moments 19:18 exio4 est31: having a language where manual-ish management of resources is easy is what we want, not basically being "OMG IT SUCKS, LET'S REMOVE IT" 19:18 exio4 est31: easy and correct, checked by our compilers 19:18 est31 exio4, so you like rust then? 19:19 exio4 probably, haven't played with it that much 19:19 exio4 est31: another thing 19:19 exio4 garbage collectors are a fancy thing that _suffer_ from the fact that you can mutate things 19:19 est31 how do you mean that? 19:20 est31 you certainly have to mutate things 19:20 est31 I mean OOP is all about that 19:20 est31 (when we're in a java context) 19:20 exio4 generational garbage collection needs a hack to work with mutable data 19:20 est31 interesting, tell me more 19:21 exio4 as it assumes "new things" can only reference old things, and that old things can only be referenced by "older things" 19:21 exio4 when you break that, the GC has to work harder 19:22 est31 I guess there are multiple approaches to GC 19:22 exio4 est31: there are 19:23 est31 all of them share that weakness? 19:24 exio4 it depends a lot on how they handle objects 19:24 exio4 lemme try to find one of the original papers on generational GC 19:32 exio4 est31: http://web.media.mit.edu/~lieber/Lieberary/GC/Realtime/Realtime.html 19:32 exio4 est31: and http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.41.5815 19:34 est31 ah thanks 19:35 est31 so according to that abstract, what you said affects mostly "generational gc" 19:36 exio4 yes 19:37 exio4 the JVM has a generational gc, and most languages now go with those. as the logic behind them is pretty much "what applies to real world" 19:37 exio4 having lots of mutable data means you need to deal a lot with corner-cases of it, though, it's still an improvement 19:39 exio4 est31: if you want to see a small example of a generational GC being extremely fast, I have some example HS (microbenchmark) code that basically generates lots of garbage and also keeps data 19:40 exio4 CPU time: 5.62s 19:40 exio4 547,534,344 bytes allocated in the heap 19:40 est31 still I wonder how you dislike dynamic typing on one hand and like gc on the other 19:41 est31 I mean it requires people to know gc in order to be efficient 19:41 exio4 guess the GC time (in %) and the real maximum "allocated memory at one moment" 19:41 exio4 est31, those concepts are totally unrelated 19:42 est31 whats bad about dynamic typing 19:42 Jordach tl;dr exio is a troll 19:42 exio4 that you can't assume anything about the code? 19:42 exio4 and that you basically suffer from being forced to have TDD if you want to have shit that works? 19:42 exio4 (TDD taken to an extreme, as needed for dynamic typing, is basically crap) 19:44 est31 javascript hasn't been invented to run codebases with millions of lines of code 19:44 exio4 (a small side-note, dynamic typing just means you can't easily refactor lots of code, unless you're kamikaze) 19:44 est31 its been invented to play around with websites 19:44 proller weekly lang comparsion evening 8) 19:44 Jordach inb4 java best lang 19:45 exio4 est31: most languanges weren't designed with more than "we need something working tomorrow" POVs 19:45 exio4 if they were designed at all 19:45 exio4 I am talking about Python, PHP, Javascript, [...] 19:45 est31 I agree js more evolved than it was designed 19:45 Jordach really? you're comparing tools that do the same function 19:45 exio4 it has a small subset designed decently 19:46 est31 exio4, ? 19:46 est31 dont say asm.js 19:46 exio4 est31: no, I am talking about having high order functions and basically some parts of it's way to do OOP, and whatnot 19:46 exio4 but it's basically things disliked by the modern hipster that prefer ES6 classes 19:47 exio4 prefers* 19:47 est31 so you say js is good dependent on which features you use? 19:47 exio4 no 19:47 exio4 I am saying a relatively small subset of JS is decent, and I already said it previously 19:48 exio4 it's a few good things in a sea of broken things 19:48 est31 most languages are that way 19:48 est31 who wants to use wchar these days 19:48 exio4 wut? 19:49 est31 its a c type 19:49 exio4 I know, but I am talking, how is it related? 19:49 est31 perhaps it made sense at the time it was introduced, but now its just obsolete by unicode 19:49 est31 its a bad language feature 19:49 exio4 unicode doesn't specify any particular encoding? 19:49 est31 every lang has that 19:50 est31 those* 19:51 exio4 has what? :p 19:51 est31 bad features 19:51 est31 ugly ones 19:51 exio4 ah, obviously 19:52 exio4 languages aren't perfect 19:52 exio4 I am pretty sure we want something that doesn't suck that badly though 19:55 TheWild goto 19:56 exio4 goto makes sense in a language where you don't have tail-recursion 19:56 exio4 :> 19:56 est31 you mean arbitrary deep tail recursion? 19:57 exio4 ehm, "arbitrary deep"? 19:57 est31 c does have methods and such, so it knows the concept of recursion 19:57 est31 however, the stack grows 19:57 est31 every invocation 19:58 exio4 est31: well, yeah, TCO is what I meant 19:58 est31 with goto, the stack doesnt grow 19:59 exio4 http://draketo.de/light/english/recursion-wins 20:02 est31 TCO is a feature of the implementation, not the language 20:02 est31 of course the lang can say "implementations must support TCO" 20:02 exio4 the language may force a complaint implementation to support TCO 20:03 exio4 if the spec doesn't allow you to rely on recursion, it means you can't write code that uses it and doesn't fuck up on "other compiler/interpreters" 20:04 est31 depends on whether you write for a compiler or for a language 20:05 exio4 yeah, but if it is just an optimization, that means you can't rely on it either 20:06 exio4 because "oops, compiled without certain optimization, and now the code doesn't work after 130ms" 20:07 est31 whatever 20:07 exio4 http://draketo.de/light/english/free-software/tco-debug#sec-4 20:08 exio4 the only way to rely on an 'optimiation' that changes the asymptotic complexity that bad (from linear to constant), is that the specification of your language or your compiler ALWAYS do it, which normally isn't the case, 20:09 est31 so then dont use TCO in c 20:09 est31 and use loops instead 20:09 exio4 that gets you to the first link 20:09 est31 ah sorry not TCO but tail recursion 20:09 exio4 Tail Call Optimization includes the tail recursion optimization 20:10 exio4 TCO is basically ``return f(x);'' can be replaced with a goto 20:10 est31 yes but tail recursion optimization != tail recursion 20:11 exio4 being tail-recursive if your language doesn't do TCO is pretty much useless 20:11 est31 so, that page basically sais that a simple for loop with an if is more complicated than throwing gazillions of modules and python-own concepts at a trivial problem? 20:12 exio4 ? 20:12 exio4 it's an argument against modularity, in some sense 20:12 est31 http://draketo.de/light/english/recursion-wins 20:12 exio4 "a tail-recursive function isn't trivially converted into a loop" 20:13 est31 modularity isn't always good 20:13 exio4 ? 20:13 exio4 he is giving a small example of how a for loop is overly complicated in some sense 20:13 exio4 and also harder to reason about 20:14 exio4 and how it relies on lots of implicit state 20:14 est31 that for loop is very easy to understand 20:14 est31 the other code is just a lot of "use this cool python module" 20:14 exio4 ? 20:14 est31 use-modules : srfi srfi-71 20:14 exio4 ... ? 20:15 est31 and then this senseless string-take 20:15 exio4 ; first get SRFI-71: multi-value let for syntactic support for what I 20:15 exio4 ; want to do 20:15 exio4 est31: string-take and string-drop are pretty clear 20:15 est31 yes 20:15 exio4 take N characters from a string 20:15 exio4 or drop N chars from a string 20:15 exio4 and that is not a python module 20:15 exio4 it's just a multi-valued let 20:15 exio4 instead of doing let A = B; let C = D; let E = F; it is let A = B; C = D; E = F 20:16 est31 ah I see 20:16 est31 ok some sugar here 20:16 exio4 he said that in the comment 20:16 est31 but still that sugar inside " for letter in text: " is in fact really cool 20:16 est31 so he abandons it 20:17 est31 and makes the code much more harder to read 20:17 est31 also why is there that linebreak between process-text and : res 20:17 est31 its just stupid code 20:17 exio4 that's just his syntax 20:17 exio4 you don't need that specific syntax 20:18 exio4 and if what you're worrying about is that the syntax is too complicated.. 20:18 exio4 I am talking about the semantics of it 20:18 exio4 not if (a b) looks nicer than :a , b or not 20:19 est31 I still dont like it 20:19 est31 also, its not optimal 20:19 exio4 what isn't optimal? 20:19 est31 because there are two calls to string-take 20:19 est31 which means extra overhead 20:19 est31 it doesnt make it clearer at all 20:19 est31 horribly ugly code 20:20 exio4 that is not "production-code", it was code for showing a case where a for loop means relying on an implicit state change between loop calls 20:20 exio4 est31: there shouldn't be "more" string-take calls than the ones in the loop 20:21 exio4 est31: also, separate string-take 1; string-drop 1 is obviously not "lovely" as it could be, but it can be easily reduced to (x,xs) = some-"less-obvious-function-while looking-at-the-code-if-you-don't-know-the-languag-of-the-whole-paradigm" 20:22 est31 state change based parsers are simple to understand 20:22 exio4 are they? 20:22 exio4 surely, if those are the ones you have used and know about 20:22 exio4 it's obviously harder to learn than to use something you already kno 20:22 exio4 w 20:23 exio4 I have to go afk for a little bit 20:23 est31 you know that method stuff is ok and nice 20:23 est31 but the moment you want to change something about your parser, you get into problems 20:24 est31 what you basically did is use the language's stack for simulating the " stack 20:24 exio4 there's no language stack used 20:24 est31 also works well for ( and { and such 20:25 est31 I mean the " case is simple by just having one level you can go down 20:26 est31 the command to go up is basically " again 20:27 est31 yeah I agree it basically boils down to what you've learned and what you are accustomed 20:40 exio4 est31: no, there's no go up or go down there 20:40 exio4 est31: there's no nesting 20:40 exio4 it's either 0 or 1 level 20:40 exio4 being inside a string, or not 20:40 exio4 a thing that could be helpful to catch there, is the \ 20:41 exio4 inside a string you "escape" the next character 20:41 exio4 that's a special condition that needs a little bit of care in the for loop 20:41 exio4 in the tail recursive 'loop', it's just an if and recursing with the next "two characters away" instead of the next one 20:43 exio4 ohh, neat 20:43 exio4 I just realized this was a FSM 20:43 exio4 (+ extra work) 20:43 exio4 being inside a string, or not, being different functions 20:45 exio4 encoding finite state machines with different tail-recursive function isn't a new thing either :D 20:57 TheWild minetest.line_of_sight seems to be poorly done - it accepts stepsize what isn't always perfect since it sometimes misses the nodes when line crosses their corners. 21:01 TheWild A nice implementation would be to calculate line-and-plane crossing points and then bring proper node positions. 21:05 TheWild No big idea for today that does not involve floating point multiplications/divisions, maybe tommorow. 21:05 TheWild I'm sure it can be chopped down into just integer comparisions and additions 21:06 TheWild especially if you're concerned about performance 22:10 kahrl est31: the way I read that article, it seems like the point is that once a parser gets more complicated, it should be split into lexer and parser 22:11 kahrl which of course you can do in both an iterative and a recursive variant, so that distinction doesn't really matter 22:15 MinetestBot 02[git] 04est31 -> 03minetest/minetest: Fix compiler warning about sign comparison 13b70e67d http://git.io/vUw1h (152015-05-13T00:04:30+02:00) 22:33 MinetestBot 02[git] 04paramat -> 03minetest/minetest_game: Default/mapgen: Add sandstone alias for sandstone biome detection 13dd34dff http://git.io/vUwQT (152015-05-12T23:31:38+01:00) 22:55 exio4 kahrl: the idea is that if it you do something (in this specific case, as an example) with a naive "loop", you end with somewhat complex (as-in, having to carry more mutable state on your head) algorithm than if you did it with a tail-recursive function, as the changes in the state are going to be explicit and also mean you can lookahead if needed, and/or do similar fancy things 23:10 kahrl exio4: well, I think he should have a used a different example because here he just ends up making a simple thing more complex than it needs to be 23:18 exio4 yeah, I think that example isn't that nice 23:18 exio4 if it was more concrete 23:19 est31 yes, the example is bad 23:25 exio4 well, is it? 23:27 Hijiri which example? 23:28 Hijiri (sorry I wasn't here for the conversation) 23:28 est31 yes, I agree a for loop that spans thousands of lines has to be split up 23:29 est31 even hundreds 23:29 est31 but that example is too simple 23:29 est31 then he throws this weird package in 23:31 exio4 "weird package in'? he didn't? 23:32 est31 that let a = b : c = d : e = f stuff 23:32 exio4 Hijiri: http://draketo.de/light/english/recursion-wins 23:32 exio4 est31: that's just syntatic sugar 23:32 est31 its just not related to that issue at all 23:32 exio4 the syntax is not related at all 23:32 exio4 talking about syntax in a semantics discussion doesn't make sense either 23:32 est31 I mean sure, he can install it in his own package if he wants 23:32 exio4 it's his own syntax 23:33 Hijiri exio4: thanks 23:33 est31 but if he can't even write a blogpost without that package, then he's clearly a syntactic sugar junkie 23:33 exio4 wtf? 23:33 exio4 it's an alternative syntax for a lispy language 23:33 exio4 the idea was that his code _works_ after you pass it thru the 'compiler' 23:34 est31 usually when you talk about language features, you use a mostly "vanilla" configuration, not the one you're most comfortable with 23:34 exio4 est31: ? 23:34 est31 If he just even used pseudocode 23:35 est31 so thats my first point 23:35 exio4 would it have been better if he wrote that example code in Haskell? 23:35 exio4 that's not a point 23:35 est31 the second point is what kahrl said 23:35 exio4 that's being annoying about unfamiliar syntax 23:35 est31 does haskell even have something procedural as for loops? 23:35 exio4 no, it doesn't 23:35 exio4 I am not talking about the python code 23:36 exio4 but the "tail recursive" code 23:36 est31 that makes it even worse 23:36 est31 when I read it I have the feeling that that person wants me to convince to use that sugar package 23:37 est31 "look how convenient" 23:37 exio4 ?? I hope you are trolling 23:37 exio4 that's not even close to the point he is discussing 23:43 est31 no this time its serious 23:44 est31 its like "and while we're on it, let's use ABC, which is completely unrelated" 23:44 exio4 he wrote it in a language that supported the feature he was talking about 23:45 exio4 I find that somewhat related 23:45 est31 both were python 23:45 est31 so why does he have to include that package? 23:45 exio4 no, the second one isn't.. 23:45 exio4 PPS: This example uses wisp-syntax for the scheme-examples to avoid killing Pythonistas with parens. 23:46 exio4 http://draketo.de/light/english/wisp-lisp-indentation-preprocessor 23:47 exio4 est31: are you still serious? 23:47 est31 ah I see scheme 23:57 est31 what are "parens" 23:57 Hijiri (((()))) 23:57 est31 ah 23:59 clever [] brackets 23:59 clever {} braces 23:59 est31 for me its "parenthesis" but nvm