Time Nick Message 00:01 rubenwardy doesn't look too hard to fix, really 00:01 rubenwardy it's definitely just a misuse of the API 00:30 rubenwardy LOOOOL 00:30 rubenwardy oops, caps 00:31 rubenwardy someone made a stackoverflow post 5 days ago title:" Could I host a Minetest Server on a Webserver" 00:31 rubenwardy but they've deleted it since 10:04 nerzhul rubenwardy: heh i just downloaded part of my town and it's quit enice 11:06 IcyDiamond rubenwardy: ngx-minetest :DD 12:39 rubenwardy IcyDiamond: sounds like this https://github.com/andrewvy/knot 12:54 IcyDiamond xD 16:12 ircSparky has anyone here worked much with python and its file opening and writing? 16:19 ircSparky Im having an issue where its writing in such a way that when i open it with notepad++ and such, it looks fine, but when i copy and paste it somewhere else, or if minetest tries to read it, it's only partially there 16:24 rubenwardy Lua won't lock things well 16:24 rubenwardy don't use files to communicate, use sockets or HTTP 16:26 sfan5 I don't know of any programming language / standard library that implicitly locks files when you open them 16:26 ircSparky i guess that would be a lot better, how do you do that with a lua mod? (also the issue seems to be with the python writing, the decimal characters dont seem to be writing normally) 16:26 ircSparky it does it in the file its writing as well as the log 16:26 sfan5 how do you write the file and how do you read it back? 16:26 ircSparky f.write(id + " " + context + "\n") 16:27 ircSparky local input = io.open(minetest.get_worldpath().."/mumble.txt","r") 16:27 sfan5 that's not enough context 16:28 ircSparky k, getting a pastebin 16:29 ircSparky https://paste.ubuntu.com/p/F9QTc2GKRG/ writing 16:29 ircSparky https://paste.ubuntu.com/p/cTD2zfZ6Nw/ reading 16:30 sfan5 you're not closing the file 16:30 ircSparky you mean in lua? I try to close it in like 19 16:31 sfan5 no, python 16:31 ircSparky oh 16:31 sfan5 line 32 should read f.close() 16:33 ircSparky ill try it 16:34 ircSparky it dosnt change it 16:35 ircSparky Elkien Minetest 16:36 ircSparky thats what i can copy, it looks like "Elkien Minetest 127.0.0.1:30000" in the word editor 16:36 rubenwardy just use with 16:36 rubenwardy with open(a, b) as f: 16:36 rubenwardy will close uaotmagically 16:37 sfan5 trying to empty the file after reading it might be problematic 16:37 ircSparky the space between Minetest and the ip seems to be the cause of the issue 16:38 ircSparky probably an invalid character 16:38 sfan5 sockets/HTTP or pipes are a better solution for these kind of things 16:39 ircSparky is there a mod that uses that? 16:39 ircSparky i guess irc probably does 16:41 nerzhul in python use the with operator keyword when you open a file 16:42 ircSparky "a+" you mean that? or something else? 16:48 ircSparky https://cdn.discordapp.com/attachments/264960789436301312/535137911973216258/Screenshot_87.png that NUL is the issue, it probably would also be the issue if i did http/sockets 16:55 ircSparky i guess its with the program that sends the context to the mumble server 16:55 ircSparky ill let you know what i find out 16:57 sfan5 you could replace null byte with a space before writing 17:44 ircSparky sfan5, how would i do that? 17:50 ircSparky nvm i got it, sorry for the ping 19:00 Fixer lol, """"compact"""" interface 19:00 Fixer sorry, random offtopic 19:00 Fixer but i was triggered 19:40 rdococ hmm 20:04 Fixer ignore my messages 20:11 rdococ I want to implement a programming language within a Minetest mod so that I have more control over it, but I'm not sure how to get started 20:12 rdococ with a luacontroller, you have limitations - you have to use the debug library to detect timeouts, can't implement arbitrary control structures, etc. 20:38 sofar http://lua-users.org/wiki/LuaInterpreterInLua 20:43 rubenwardy how about a C interpreter that can run Lua 21:17 benrob0329 what about a C compiler in Lua that can compile the Lua Runtime and then compile C code from within that? 21:18 benrob0329 rdococ: seems to me you could probably use coroutines and raw Lua 21:18 benrob0329 with the sandboxing that mesecons does 21:19 benrob0329 http://lua-users.org/wiki/CoroutinesTutorial 21:22 sofar that requires that MT can create a lua context for you and grants you control handles over it 21:22 sofar in itself not a weird idea 21:30 rdococ benrob0329: I did try to add support to the luacontroller for "yielding" by running it in a coroutine, but it didn't really work out. 21:31 rdococ The idea is that you would be able to yield to get the next event at any point in the code, instead of having to deal with the event at the start of the next execution. 21:42 benrob0329 I'd think that you would probably have to design a completely different even structure than mesecons has. 21:42 benrob0329 probably registering callback functions or returning a table with them 21:43 benrob0329 then run those inside a corutine 22:08 * Sokomine reprograms the official mt so that it creates screenshots in a much smaller format... 22:09 sofar I think you can set the format, right? 22:09 sofar maybe I'm just imagining it, though 22:09 Sokomine yes. but i'd like to set it for all other players as well (my net is slow :/) 22:10 * Sokomine distracts sofar a bit while changing some config values in all installed versions of mt everywhere.... 22:10 benrob0329 Sokomine: PNGs on maximum compression? 22:10 benrob0329 or JPGs on maximum quality? 22:13 sofar netpbm 22:13 sofar 16 bytes for a single pixel 22:13 sofar no compression 22:16 Sokomine rather jpegs on minimum quality :-) 22:17 Sokomine people who build impressive may be allowed slightly larger pictures though :-) 22:17 Sokomine (the .mts even for large structures seems to require far less space than any screenshot of it) 22:18 sofar considering the screenshots posted in the screenshot thread on the forum, people have wildly varying ideas about what constitutes an "acceptable" quality level 22:19 Sokomine hmm. you might be right about that 22:20 Sokomine we might add a voting system :) screenshots voted up are allowed to be re-posted in higher quality :) 22:20 * Sokomine ducks and hides behind a convenient tree 22:20 sofar for ITB I kept a 1080p standard which I think is reasonable nowadays 22:22 Sokomine i recently read an article about graphic cards used for gaming. it appears they target 4k resolution now? i don't quite understand that. modern phones also have crazy resolutions 22:23 sofar so 22:23 sofar think about it 22:23 sofar if you enable e.g. fsaa/aliasing 22:23 sofar you're already calculating more pixels 22:23 sofar might as well disable fsaa/aliasing and just, do 4x the pixels 22:23 sofar it'll actually look better 22:25 sofar (I'm sure I've made somone frown there) 22:29 Sokomine i'm not sure what i've enabled. transparent tree leaves - for sure, yes. those are on, even though they cost fps on my setup 23:14 IcyDiamond https://gitlab.icynet.eu/evert/towny/commit/82c7c9d694a6b79a5a00a7fad7085ac369d0d881 apparently areas mod's getAreasIntersectingArea modifies positions 23:14 IcyDiamond thats odd 23:14 rubenwardy ah yeah 23:14 rubenwardy those sort of things are the worst 23:15 rubenwardy I wish Lua had support for C.O.W 23:15 IcyDiamond i like cows 23:15 rubenwardy also, btw - vector.new(v) may be more efficient 23:15 rubenwardy idk 23:15 rubenwardy lol 23:15 IcyDiamond eh its basically the same imo 23:15 rubenwardy yeah 23:16 rubenwardy nice commit message, lol 23:16 IcyDiamond :P 23:16 IcyDiamond yeah because my areas were vertically flipped for some reason and it confused me 23:17 IcyDiamond i dont know how to deter 11's protector mod from being used inside towns tho 23:17 IcyDiamond lack of api functions 23:18 rubenwardy :'( 23:18 rubenwardy yeah, areas is quite hackable because a lot of the functions are in the global table 23:18 IcyDiamond yeah 23:19 IcyDiamond https://gitlab.icynet.eu/evert/towny/blob/master/towny_hud/init.lua 23:19 IcyDiamond #noharddeps 23:21 rubenwardy 'yay 23:22 IcyDiamond https://gitlab.icynet.eu/evert/towny/commit/f77d754b5ffd8626396b3374466fa97e42442153 commit message fail 23:22 rubenwardy ohhh 23:22 rubenwardy I thought it was supposed to be a face with two arms waving 23:22 IcyDiamond :D 23:22 rubenwardy \(o-o\) 23:22 IcyDiamond nah i thought i needed to escape the ()'s 23:22 IcyDiamond but apparently not 23:23 rubenwardy it's not a regex law 23:23 rubenwardy *lol 23:23 IcyDiamond dealing with bash weirdness has made me come to this conclusion 23:23 IcyDiamond but i forgot that string literals are a thing i guess 23:24 IcyDiamond i commit using git commit -m "message" 23:24 Sokomine i do it the same way, icydiamond 23:25 rubenwardy so do I 23:25 rubenwardy it's pretty standard :) 23:25 IcyDiamond some people use guis or just git commit which opens an editor 23:25 IcyDiamond ¯\_(ツ)_/¯ 23:26 IcyDiamond https://i.lunasqu.ee/Screenshot_19-01-17-01:26:08.png bit patchy activity 23:26 IcyDiamond i do pretty nice streaks from time to time tho 23:27 IcyDiamond dont worry my real name is public on purpose, im not afraid to use it 23:40 IcyDiamond Wait, intllib is basically getting included in minetest 5.0? 23:40 rubenwardy no 23:40 IcyDiamond I need to make my mods support translations 23:41 rubenwardy there's a client-side translation support 23:41 rubenwardy I think that may be in 0.4.16 23:41 rubenwardy basically, translation languages per-player 23:41 rubenwardy whereas intlib is for the whole server 23:42 IcyDiamond Aha, very cool 23:43 IcyDiamond Towny already has a lot of strings >.> 23:43 IcyDiamond Mostly command feedback 23:44 rubenwardy :D 23:44 rubenwardy tbh, translation is unfortunately quite low on my priorities :( 23:44 rubenwardy it would be nice if Minetest forced you to have translation support 23:44 rubenwardy like Android does 23:44 IcyDiamond Minetest does have a lot of foreign players though 23:44 rubenwardy would also be nice if a certain someone did a tutorial on translation 23:44 rubenwardy yeah 23:45 rubenwardy btw, what about areas being made over towny 23:45 rubenwardy ie: after towns are made 23:47 IcyDiamond That part I haven't done anything about yet 23:47 IcyDiamond :P 23:47 IcyDiamond I plan on trying to stop protection mod collisions as much as I possibly can 23:52 IcyDiamond Is world.mt combined with the minetest.conf in use? 23:52 IcyDiamond Or is it something completely different 23:52 GreenDimond When modstorage is accessed is the entire file loaded to find the key in question? 23:53 sofar I think actually the files are only read at startup 23:53 IcyDiamond Is it not loaded into memory on load? 23:53 IcyDiamond Yeah 23:53 sofar but, ask nerzhul 23:53 GreenDimond thats not possible 23:53 IcyDiamond How so 23:53 GreenDimond Mods need to be able to write to and read from at runtime 23:54 IcyDiamond mod storage is saved periodically 23:54 GreenDimond Mod storage should be saved whenever it is written to 23:54 IcyDiamond That's a bit inefficient 23:54 rubenwardy mod storage is a backed by a JSON file 23:54 rubenwardy the JSON file is written out every map save interval, which is at least 10 seconds 23:54 rubenwardy I forget 23:55 rubenwardy so not every time it's written to 23:55 IcyDiamond You can always make a flat file storage driver if you don't like modstorage 23:55 IcyDiamond But you have been warned, it gets inefficient 23:55 GreenDimond The problem is I need to save upwards of thousands of lines in a file that can access each line individually efficiently 23:55 GreenDimond currently I am just scrubbing a text file 23:56 GreenDimond but if I can use some other method of storage that can read indexes like a table that would be great 23:56 rubenwardy don't use mod storage for that 23:56 rubenwardy databases 23:56 IcyDiamond Nobody answered my question tho 23:56 rubenwardy or you could use seek 23:56 GreenDimond I am using seek right now 23:57 rubenwardy IcyDiamond: world.mt is something different 23:57 rubenwardy so you can't put world specific settings in there 23:57 rubenwardy except specific ones 23:57 GreenDimond The other problem is I need to read the file backwards, which I am already doing, but it is a pain :) 23:57 rubenwardy like damage etc 23:57 sofar one of my mods writes json files from an external process into the world folder 23:57 sofar that's not too difficult 23:57 sofar reading json is easy in MT too 23:58 GreenDimond So if I write to the database I can then read it by index later? 23:59 sofar do you have 2 writers? 23:59 GreenDimond ? 23:59 sofar who reads the "data"? 23:59 sofar MT? 23:59 GreenDimond Yes 23:59 sofar who writes the data?