Time |
Nick |
Message |
00:19 |
|
twoelk|2 joined #minetest |
00:20 |
|
lanlink joined #minetest |
00:47 |
|
MaybeDragon joined #minetest |
00:50 |
|
luk3yx joined #minetest |
00:57 |
|
whitephoenix joined #minetest |
01:28 |
|
luk3yx left #minetest |
01:50 |
|
pgimeno_ joined #minetest |
01:53 |
|
Animetrom1 joined #minetest |
01:53 |
|
Animetrom1 left #minetest |
01:54 |
|
Animetrom joined #minetest |
01:55 |
Animetrom |
Hello guys! |
01:55 |
htur |
hi |
01:55 |
BillyS |
hi |
01:55 |
rubenwardy |
yo |
01:55 |
Animetrom |
Happy New Year! (: |
01:55 |
BillyS |
same to you |
01:55 |
htur |
Happy new year :) |
01:56 |
Animetrom |
Thanks! |
01:58 |
|
EvergreenTree joined #minetest |
01:59 |
Animetrom |
Playing too much Minetest lately? |
02:00 |
|
nowhere_man joined #minetest |
02:01 |
|
Animetrom left #minetest |
02:15 |
|
nowhere_man joined #minetest |
02:22 |
|
behalebabo joined #minetest |
02:31 |
|
dax left #minetest |
02:42 |
|
SonosFuer joined #minetest |
03:27 |
|
Billre joined #minetest |
04:11 |
MinetestBot |
[git] paramat -> minetest/minetest: Mgv7 floatlands: Add exponent parameter 2aad3be https://git.io/vbjJV (2018-01-03T04:05:55Z) |
04:11 |
MinetestBot |
[git] Thomas--S -> minetest/minetest: Connected Nodeboxes: Add `disconnected` boxes f3b9d87 https://git.io/vbjJw (2018-01-03T04:05:21Z) |
04:11 |
MinetestBot |
[git] HybridDog -> minetest/minetest: Tool.cpp/.h, lua_api/l_util.cpp: Tidy up code and remove dead code 345e104 https://git.io/vbjJr (2018-01-03T04:01:15Z) |
04:11 |
MinetestBot |
[git] HybridDog -> minetest/minetest: Tool getDigParams: Fix selecting the best fitting time d7c1f6c https://git.io/vbjJo (2018-01-03T03:58:11Z) |
04:17 |
|
Hawk777 joined #minetest |
04:43 |
|
illwieckz joined #minetest |
05:00 |
|
est31 joined #minetest |
05:20 |
|
Billre left #minetest |
05:28 |
|
est31 joined #minetest |
05:35 |
|
Fritigern joined #minetest |
05:57 |
|
Cornelia joined #minetest |
05:58 |
|
StaceySerafin joined #minetest |
05:58 |
|
StaceySerafin was kicked by MinetestBot: StaceySerafin |
05:59 |
|
StaceySerafin joined #minetest |
05:59 |
|
StaceySerafin was kicked by MinetestBot: StaceySerafin |
06:02 |
|
sofarstacey joined #minetest |
06:02 |
|
sofarstacey was kicked by MinetestBot: sofarstacey |
06:06 |
Emerald2 |
o_O |
06:15 |
|
SonosFuer joined #minetest |
06:18 |
|
Akberid joined #minetest |
06:41 |
swift110-phone |
Hey Emerald2 |
06:44 |
Emerald2 |
What's up swift? |
06:47 |
Emerald2 |
Hey swift110-phone |
06:47 |
red-F00 |
have to say the new bot update is nice |
06:47 |
red-F00 |
way better then freenode anti spambot stuff |
06:48 |
swift110-phone |
How are you Emerald2 |
06:49 |
swift110-phone |
What new bot update red-F00 |
06:49 |
Emerald2 |
I'm good. You pinged me. :P |
06:49 |
red-F00 |
it kicks spambots/humans |
06:49 |
Emerald2 |
Oh you mean the MinetestBot, red? |
06:49 |
red-F00 |
spam(bots/humans) |
06:49 |
swift110-phone |
Good Emerald2 and I know |
06:49 |
red-F00 |
Emerald2, yes |
06:50 |
swift110-phone |
red-F00: is that just for here |
06:50 |
red-F00 |
yes |
06:50 |
swift110-phone |
Ok |
06:50 |
red-F00 |
-dev blocks users that aren't logged in |
06:58 |
|
VargaD joined #minetest |
07:08 |
|
GreenDimond joined #minetest |
07:31 |
|
CWz joined #minetest |
08:02 |
|
htur joined #minetest |
08:12 |
swift110-phone |
Oh |
08:16 |
|
VargaD joined #minetest |
08:23 |
Emerald2 |
So what's up swift? Just saying hi to people? Looking for me for something? Looking for the other Emerald? lol. :) |
08:55 |
swift110-phone |
I do like to say hello to folks it's a bit of a habit |
08:55 |
swift110-phone |
I'm just relaxing at the moment |
09:06 |
|
est31 joined #minetest |
09:17 |
|
lanlink_ joined #minetest |
11:00 |
|
Krock joined #minetest |
11:01 |
|
lumberJ joined #minetest |
11:26 |
|
Telesight joined #minetest |
11:28 |
|
aristotle_IRC joined #minetest |
11:28 |
lumberJ |
hey Krock, the server is backing up at the moment |
11:28 |
lumberJ |
and in general just taking a break from the annoyances of being on the public list |
11:28 |
lumberJ |
but it is alive and well. should be back up in 30-40 minutes |
11:29 |
Krock |
hi. was asking as I've looked a few times on the server list and it wasn't there |
11:29 |
lumberJ |
yeah, i just took it off for a little break. too many annoying little kids with the holiday break :P |
11:37 |
pgimeno |
red-F00: re your question in #6863, no, Minetest doesn't include LuaJIT headers; when LuaJIT is requested, it's assumed to be installed by the user |
11:41 |
swift110-phone |
Sup Krock long time no see |
11:45 |
Krock |
hi swift110-phone |
11:45 |
swift110-phone |
How are you krock |
11:46 |
Krock |
just fine. how about you, swift110-phone ? |
11:49 |
swift110-phone |
Im good Krock what are you up to |
11:49 |
Krock |
just browsing |
11:53 |
swift110-phone |
Oh cool |
12:07 |
|
YuGiOhJCJ joined #minetest |
12:12 |
|
YuGiOhJCJ joined #minetest |
12:16 |
|
Fixer joined #minetest |
12:19 |
|
YuGiOhJCJ joined #minetest |
12:21 |
|
YuGiOhJCJ joined #minetest |
13:09 |
|
eddie joined #minetest |
13:10 |
Guest5468 |
is it possible to create a map through cli |
13:10 |
Guest5468 |
im trying to setup a minetest server on a headless 'server' |
13:12 |
|
rafalcpp joined #minetest |
13:17 |
|
rafalcpp joined #minetest |
13:27 |
|
VargaD joined #minetest |
13:28 |
|
htur joined #minetest |
13:37 |
|
Gael-de-Sailly joined #minetest |
13:40 |
|
RobbieF joined #minetest |
13:41 |
|
RobbieF left #minetest |
13:42 |
|
Tux[Qyou] joined #minetest |
13:45 |
|
lanlink joined #minetest |
13:47 |
|
lanlink joined #minetest |
13:52 |
|
Beginer joined #minetest |
13:54 |
|
Gael-de-Sailly joined #minetest |
13:56 |
Beginer |
Hi, how do i install already generated levelDB map? I have no problems with sqlite3, but levelDB map is corrupted by mapgen (map is re-generated). |
13:56 |
rubenwardy |
you need to change the backend type |
13:56 |
rubenwardy |
in world.mt |
13:56 |
rubenwardy |
before opening the world |
13:56 |
Beginer |
yes, but still not working |
13:58 |
|
lanlink joined #minetest |
14:00 |
|
lanlink joined #minetest |
14:08 |
|
EvergreenTree joined #minetest |
14:10 |
|
MaybeDragon joined #minetest |
14:10 |
|
Darcidride joined #minetest |
14:16 |
|
DI3HARD139 joined #minetest |
14:29 |
|
niko joined #minetest |
14:29 |
|
lRC joined #minetest |
14:37 |
|
niko joined #minetest |
14:39 |
MinetestBot |
[git] rubenwardy -> minetest/minetest: Fix crash on can_bypass_userlimit returning non-boolean 2af47e6 https://git.io/vbjDK (2018-01-03T14:18:13Z) |
14:41 |
|
benrob0329 left #minetest |
14:43 |
red-F00 |
pgimeno, |
14:43 |
red-F00 |
https://github.com/minetest/minetest/blob/master/src/script/cpp_api/s_base.cpp#L38 |
15:02 |
|
Copenhagen_Bram joined #minetest |
15:09 |
|
illwieckz joined #minetest |
15:34 |
Beginer |
looks like map is corrupted: Corruption: corrupted compressed block contents :( |
15:36 |
red-F00 |
thats some bad luck |
15:39 |
pgimeno |
red-F00: yeah, that's detected by https://github.com/minetest/minetest/blob/master/cmake/Modules/FindLuaJIT.cmake as an external dependency |
15:40 |
pgimeno |
maybe you meant "include" as in "#include" and not as in "package" |
15:41 |
red-F00 |
how about we refer to #include as "included", and having it in our code tree as "bundled" from now on to avoid confusion? |
15:41 |
pgimeno |
yes, sorry |
15:42 |
red-F00 |
so yes we don't bundle it but I don't see why you can't include the header as long as everything is inside the right preprocessor cases |
15:43 |
pgimeno |
I meant it's not bundled. Anyway, adding cdata support requires LuaJIT internal includes that are, to my knowledge, not bundled with normal LuaJIT headers. |
15:44 |
pgimeno |
That's why caused my confusion, because unless LuaJIT is bundled, those headers are not available. |
15:46 |
pgimeno |
see e.g. https://gist.github.com/rtsisyk/6110709 |
15:49 |
pgimeno |
or https://github.com/AltraMayor/gatekeeper/blob/master/lib/luajit-ffi-cdata.c |
15:50 |
pgimeno |
(the latter is based on the above, but the includes point to ../dependencies/luajit-2.0/src/lj_* which should make it clearer that they are internal LJ headers) |
16:13 |
|
t20kdc joined #minetest |
16:18 |
|
Beginer left #minetest |
16:25 |
|
Copenhagen_Bram joined #minetest |
16:31 |
|
quater joined #minetest |
16:34 |
|
Akberid joined #minetest |
16:41 |
|
riff-IRC joined #minetest |
16:42 |
|
Jousway joined #minetest |
16:43 |
quater |
hello, can I use GMP in lua mod ? |
16:44 |
Krock |
only if there are extern C functions you can call with FFI |
16:44 |
|
AndDT joined #minetest |
16:45 |
quater |
minetest need GMP to compile, is it available for mod ? |
16:47 |
pgimeno |
not directly; if you've compiled your minetest with LuaJIT enabled, then what Krock said |
16:49 |
quater |
without LuaJIT, can I access it ? |
16:50 |
Krock |
minetest.check_password_entry and minetest.get_password_hash can be accessed from the Lua API. Always. |
16:50 |
Krock |
These use some GMP functions, if you meant that |
16:50 |
Krock |
if you want anything else, it can't be done without FFI |
16:50 |
Krock |
or an engine change, of course |
16:53 |
quater |
something like: local ffi = require("ffi") |
16:54 |
Krock |
something like that. if there was no mod security |
16:54 |
Krock |
with mod security, you'll either have to disable that or add the mod to your trusted_mods setting |
16:55 |
Krock |
then request the insecure env like this: local ie = minetest.request_insecure_environment() local ffi = ie.require("fii") |
16:57 |
quater |
ok |
16:58 |
Krock |
however, after scrolling through the bundled mini-gmp.c I think there's no function you could call from Lua, even with FFI, as they're not marked as extern ones |
16:59 |
pgimeno |
are they marked as static? if not, I don't see why they can't be called with FFI |
17:01 |
pgimeno |
using C functions through FFI is not that easy though; you need to basically replicate the C header in the Lua side, sometimes with a few changes |
17:03 |
|
htur joined #minetest |
17:03 |
quater |
I would like to use/write some cryptographic functions in a mod |
17:03 |
htur |
brb |
17:06 |
|
htur joined #minetest |
17:07 |
pgimeno |
public key? |
17:08 |
pgimeno |
quater: I mean, public key cryptographic functions? |
17:09 |
red-F00 |
what for? |
17:09 |
red-F00 |
pgimeno, can you call c++ functions if you handle the name mangling yourself? |
17:11 |
pgimeno |
ah sorry, not marked extern "C" |
17:11 |
pgimeno |
red-F00: yes, if you know the compiler and platform used |
17:12 |
red-F00 |
but I assume they also have to be extern right? |
17:12 |
red-F00 |
unless this does some next level magic |
17:13 |
pgimeno |
at this point I'm not sure, I assumed that the executable had the symbols not marked as static (unless stripped) |
17:13 |
|
whitephoenix joined #minetest |
17:13 |
red-F00 |
pgimeno, can ffi set variable values> |
17:13 |
red-F00 |
*? |
17:14 |
pgimeno |
red-F00: not sure, I haven't tried to do that |
17:15 |
pgimeno |
if you can get a pointer to a variable, certainly |
17:17 |
pgimeno |
e.g. int var; int *var_ptr() { return &var; } then in the LuaJIT side: ffi.cdef 'int *var_ptr();' local var_ptr = ffi.C.var_ptr(); var_ptr[0] = 5 |
17:18 |
pgimeno |
that sets var to 5 |
17:18 |
red-F00 |
I mean obviously it can if you know the address of the variable I was wondering if it also could get the address of extern variables by name |
17:20 |
pgimeno |
it seems you can, I haven't ever tried it though |
17:20 |
Krock |
I did some insecure stuff: https://pastebin.com/WXAydxT3 creating an uninitialized pointer array, which then gets modified by C++ to the MapNode data in the Vmanip |
17:20 |
pgimeno |
"ffi.cdef(def) Adds multiple C declarations for types or external symbols (named variables or functions)." |
17:20 |
pgimeno |
note "variables" |
17:22 |
pgimeno |
Krock: cool |
17:23 |
quater |
yes, to secure the exchanges between players |
17:24 |
rubenwardy |
it'd probably be easier to find a lua library for this |
17:24 |
red-F00 |
oh are you the guy that wrote some modifed xor-cryptr for csm> |
17:24 |
red-F00 |
*? |
17:25 |
sofar |
rot13 |
17:25 |
sofar |
kek ;-) |
17:25 |
Krock |
XOR with 0xFF |
17:25 |
quater |
no, but I am writing something more generale |
17:25 |
Krock |
* 0x7F |
17:25 |
red-F00 |
pmr 24 gq uyw zcrrcp |
17:26 |
pgimeno |
Krock: I'm not sure the double indirection is necessary. Can't the function just return it? |
17:27 |
Krock |
pgimeno, I wasn't sure whether LuaJIT/FFI would accept that as CDATA |
17:27 |
Krock |
or do you mean as #2 argument in ffi.new() ? |
17:28 |
pgimeno |
I mean in the case of MapNode **data, I think the function can return MapNode *VoxelManip_get(void **lvmp) |
17:28 |
* red-F00 |
waits for mapgens to be leaky |
17:29 |
Krock |
red-F00, that will result in amazing fast mapgens if done right |
17:29 |
Krock |
using a struct (as in using the entire MapNode data) seems to slow down LuaJIT quite much |
17:30 |
pgimeno |
maybe due to cache locality? |
17:30 |
pgimeno |
I don't know |
17:32 |
Krock |
array[index1][index2] is the same as array[index1].index2 (used in the script), which is an additional step to get the right value for each coordinate |
17:35 |
pgimeno |
hm, I expected that to be compiled to very plain code |
17:36 |
red-F00 |
quater, I don't see the point... |
17:37 |
|
EvergreenTree joined #minetest |
17:41 |
quater |
to be able to exchange a top secret between players or a mod |
17:45 |
|
AndDT joined #minetest |
17:46 |
|
Animetrom joined #minetest |
17:46 |
* VanessaE |
sighs |
17:46 |
* Krock |
looks at VanessaE |
17:46 |
VanessaE |
just got a call from the neurologist |
17:46 |
|
Animetrom left #minetest |
17:46 |
|
Animetrom joined #minetest |
17:47 |
|
Animetrom left #minetest |
17:47 |
Krock |
"madam', sadly we must come and take you to a safe place where you can't harm anyone" |
17:47 |
VanessaE |
that stroke I had? lacunar infarct. very common, caused by a physiological defect in small blood vessels. |
17:48 |
rubenwardy |
interesting |
17:48 |
rubenwardy |
what's the chance of it happening again? |
17:48 |
rubenwardy |
very small I hope |
17:49 |
VanessaE |
the infarct part, along with the MRI results, suggests I suffered some brain cell death :( |
17:49 |
VanessaE |
not a huge chance of a relapse, as long as I keep taking my aspirin and statin med. |
17:50 |
VanessaE |
so, now I'm brain damaged. I am NOT happy. |
17:51 |
VanessaE |
they said it damaged a ~15mm section of tissue |
17:51 |
VanessaE |
they consider that especially small though |
17:53 |
VanessaE |
one good bit of news though: they said, in no uncertain terms, that it was not caused by diet or lifestyle. |
17:54 |
|
Darcidride_ joined #minetest |
17:56 |
VanessaE |
at least I'll recover. at this point, my left hand is 90% functional, it's just sloppy on the keyboard and a few very fine actions. |
18:00 |
mitrom |
06:06 <sofarstacey> Tell sofar that I logged the New Years Day chat and will send it to Stacey Serafin. And to his neighbors. And to Intel. This is moving to real life, folks. Mock that. He knows what I mean. I can't imagine what he was thinking; he's fucked. |
18:00 |
mitrom |
... |
18:01 |
red-F00 |
mitrom, nothing to see |
18:01 |
VanessaE |
ssdd, mitq |
18:01 |
VanessaE |
ssdd, mitrom |
18:01 |
mitrom |
ssdd? |
18:02 |
VanessaE |
same shit, different day |
18:02 |
VanessaE |
(or s/shit/story/) |
18:03 |
red-F00 |
Keep Calm and set umode +R |
18:03 |
VanessaE |
that, too |
18:03 |
rubenwardy |
if you do that, does the sender get an error message? |
18:03 |
red-F00 |
don't think so |
18:03 |
red-F00 |
sadly |
18:04 |
rubenwardy |
I'd either want the sender to get an error message, or for the messages to be logged somewhere for records |
18:04 |
|
vanessatest joined #minetest |
18:05 |
VanessaE |
yes |
18:05 |
rubenwardy |
cool |
18:05 |
VanessaE |
there is an error msg |
18:05 |
|
vanessatest left #minetest |
18:05 |
red-F00 |
oh cool |
18:05 |
red-F00 |
they changed it |
18:05 |
red-F00 |
or I forgot idk |
18:09 |
red-F00 |
https://i.imgur.com/ELWDcLQ.png |
18:09 |
VanessaE |
I imagine that about now, He Who Has A Child Porn Obsession is getting pissed off beyond all previous measure ;) |
18:11 |
red-F00 |
The One That We Are Discussing seems to Also enjoy Random capital Letters in the middle of Sentences |
18:11 |
VanessaE |
rubenwardy: regarding the stroke, I am so thankful that I could spot the symptoms before it was too late. |
18:12 |
VanessaE |
red-F00: maybe he thinks he's a writer of the caliber of those who composed the US Constitution ;) |
18:13 |
red-F00 |
maybe he is a German immigrant |
18:13 |
VanessaE |
heh |
18:13 |
Krock |
Not All GermAn WorDs sTarT wItH CaPiTaLs |
18:13 |
BillyS |
YaY |
18:14 |
red-F00 |
#NotAllGermans |
18:15 |
rubenwardy |
that's good to hear, VanessaE |
18:15 |
red-F00 |
yeah |
18:17 |
pgimeno |
rubenwardy: sorry for neglecting to search before submitting |
18:17 |
rubenwardy |
np |
18:17 |
rubenwardy |
github search is a pain anyway |
18:18 |
sofar |
the new sourceforge |
18:19 |
pgimeno |
I have the Perlin noise LuaJIT functions almost ready (pending testing). Should I submit them to the same PR or open a new one? |
18:19 |
red-F00 |
same one |
18:19 |
pgimeno |
thanks, I wondered because there was already one approval |
18:20 |
red-F00 |
kinda funny how LuaJIT claims it means you don't have to write bindings to use FFI |
18:20 |
red-F00 |
it just means it has to be reapproved by that dev |
18:20 |
Krock |
how's that going to work? perlin noise is ~1 ... ~(-1). FFI only makes it faster when dealing with integers |
18:21 |
red-F00 |
is no-one able to review #6087 ? |
18:21 |
Krock |
https://github.com/minetest/minetest/pull/6087 |
18:22 |
red-F00 |
sorry I'm just kinda annoyed since it was ~half a year since I finished that and all I did in the meantime was rebase it like once |
18:22 |
pgimeno |
Krock: it's not so much for accelerating it, as it is for being able to do the allocation in memory not restricted by LuaJIT's limits |
18:23 |
Krock |
if so, then it's an ugly fix. can't we modify a Lua variable pointer (if existent) to our fresh generated array/data? |
18:24 |
red-F00 |
and moved a list from one part of the code to another a few months ago |
18:25 |
pgimeno |
Krock: it also uses memcpy or even directly the array, hence a bit faster to access the data (not that that should make much of a difference). I'm not aware of Lua variable pointers, besides LuaJIT cdata. |
18:26 |
|
Shara left #minetest |
18:26 |
|
Shara joined #minetest |
18:28 |
pgimeno |
also, the array is in floats, not doubles |
18:39 |
nepugia |
hey, asked this some days ago and got no response.. is there some way to tell minetest to crop textures instead of resizing them? i made some bigger textures intended to be placed in formspecs as a progress indicator, it looks rather ugly when the texture gets resized, the correct way would be to crop them imo, i dont see any reason why it schould resize them, ever |
18:41 |
rubenwardy |
I believe you may be able to do that with texture modifiers |
18:41 |
Krock |
like the furnace progress arrow? |
18:41 |
rubenwardy |
it makes sense to resize them as the element is to show an image at that position and size |
18:41 |
rubenwardy |
although stretching is ew |
18:42 |
nepugia |
well, i have no other way currently to show textures in a formspec :3 |
18:43 |
rubenwardy |
say you have an 64x16 image foo.png |
18:43 |
rubenwardy |
[combine:8x16:0,0=foo.png |
18:43 |
rubenwardy |
should be to crop, I'm not sure |
18:43 |
rubenwardy |
formspecs such generally |
18:43 |
rubenwardy |
*suck |
18:43 |
nepugia |
@krock a bar that increases in size from left to right (i attempted to code right to left aswell, but the width and height parameters or picture[ seem to operate with another scale compared to the x and y position) |
18:44 |
nepugia |
do i need to calculate the pixels for the image then? formspecs operate on inventory sizes though afaik, how would i get the correct conversion rate |
18:45 |
rubenwardy |
1 slot is 64 pixels on a standard screen |
18:45 |
rubenwardy |
a standard screen is 96 DPI at 800x600 I believe |
18:45 |
nepugia |
always? |
18:45 |
Krock |
nepugia, https://github.com/minetest/minetest_game/blob/master/mods/default/furnace.lua#L15-L16 |
18:45 |
rubenwardy |
if the DPI increases, the pixel increases |
18:45 |
Krock |
use lowpart and then rotate |
18:45 |
rubenwardy |
ah there we are |
18:45 |
rubenwardy |
Ah! |
18:45 |
rubenwardy |
I saw lowpart but didn't think to rotate it |
18:46 |
Krock |
use it after rotating again if you want to chop it from two sides |
18:48 |
nepugia |
where is this documented? i dont really understand what lowerpart is supposed to do |
18:48 |
rubenwardy |
https://rubenwardy.com/minetest_modding_book/lua_api.html#lowpartpercentfile |
18:49 |
nepugia |
http://dev.minetest.net/formspec#image |
18:49 |
nepugia |
doesnt seem to give any info on that |
18:49 |
rubenwardy |
or https://github.com/minetest/minetest/blob/master/doc/lua_api.txt#L478 |
18:49 |
rubenwardy |
you want texture modifiers |
18:49 |
rubenwardy |
they're not specific to formspecs |
18:49 |
rubenwardy |
Basically, lowpart is lower part |
18:49 |
nepugia |
hmm, my browser sais the certificate expired 13 minutes ago :3 |
18:49 |
rubenwardy |
and it copies the lower % of an image to the texture |
18:50 |
rubenwardy |
ehat |
18:51 |
nepugia |
then i would have to calculate the percentage, for which i would need to know the inventory<->pixel thingy |
18:51 |
rubenwardy |
nepugia, looks like my auto renew failed |
18:51 |
rubenwardy |
doing it now |
18:51 |
rubenwardy |
I thought it's a progress bar? |
18:52 |
rubenwardy |
nepugia, done |
18:52 |
nepugia |
yes |
18:52 |
rubenwardy |
surely you'd know the progress if it's a progress bar? |
18:54 |
nepugia |
my texture is 1080pixels wide, my progress is 30%, now how would i calculate the percentage to cut the image if the area i need to fill is much smaller than 1080px |
18:54 |
nepugia |
i already know how to tell minetest where to put it, if i now cut it in the wrong place it will be stretched or squezzed |
18:54 |
nepugia |
and both will look shitty |
18:54 |
rubenwardy |
use 30% and size the image element so it's 30% of the max (in units |
18:54 |
nepugia |
(still, beeing able to tell it to just use the image 1:1 and crop off the rest it doesnt need would be a fairly elegant solution) |
18:55 |
nepugia |
again, i have no idea how many units me image is |
18:55 |
rubenwardy |
how big is the window? |
18:55 |
nepugia |
they dont appear to have a fixed conversion rate |
18:55 |
rubenwardy |
images resize their content |
18:55 |
nepugia |
how would i know? |
18:55 |
rubenwardy |
size[w,h] |
18:56 |
rubenwardy |
sorry, window as in formspec dialog |
18:57 |
nepugia |
having to querry information about dpi window size to calculate a conversion rate just to be able to put an image into a formspec seems rather overkill to me |
18:57 |
rubenwardy |
you don't |
18:57 |
sfan5 |
news flash: formspecs suck ass and should be replaced with a better system at the next possible point |
18:57 |
rubenwardy |
that too |
18:57 |
nepugia |
i dont know how big the formspec window is either, i made a utility function to append the progress bars |
18:57 |
rubenwardy |
but you just need to decide how big the progress bar should be in formspec sizes |
18:58 |
rubenwardy |
so if the window is size[8;6] you may decide to make the progress bar 7,1 |
18:58 |
rubenwardy |
in which case the image should be of a ratio 7:1 |
18:58 |
rubenwardy |
then when making the formspec, make the progress bar size 7*progress,1 |
18:58 |
rubenwardy |
and crop using lowpart |
18:59 |
nepugia |
you dont understand me, the image has to be cropped |
18:59 |
nepugia |
it will look shtity otherwise |
18:59 |
rubenwardy |
I don't understand you |
18:59 |
rubenwardy |
what is the image? |
18:59 |
rubenwardy |
the way I say won't have any stretching, and will crop to the right |
18:59 |
nepugia |
a texture i made |
19:00 |
|
nac joined #minetest |
19:00 |
nepugia |
>news flash: formspecs suck ass and should be replaced with a better system at the next possible point |
19:00 |
nepugia |
yep, so ill retire modding mintest and come back in three years? |
19:00 |
sfan5 |
no that's not an option ;) |
19:01 |
nepugia |
@rubenwardy if i specify a percentage that is too big it will still crop the rest of the image, otherwise there is really no point in specifying a percentage |
19:01 |
rubenwardy |
well, cap at 100$ |
19:01 |
rubenwardy |
*100% |
19:01 |
rubenwardy |
then the entire image will be shown in the entire image element |
19:01 |
rubenwardy |
at 50%, the image element will be half as wide |
19:01 |
rubenwardy |
but the image will also be cropped to be half as wide |
19:01 |
nepugia |
i dont want that, i want it to fill the area 1:1 |
19:02 |
nepugia |
and crop the rest |
19:02 |
rubenwardy |
no possible |
19:02 |
Krock |
do each step in GIMP and switch the texture each time 8) |
19:03 |
nepugia |
possible surely, with way too much coding involved (at the lua side anyway).... unless someone made an image[ alternative that cropped |
19:03 |
rubenwardy |
doesn't help him though, Krock |
19:03 |
Krock |
s/texture/texture name/ |
19:03 |
nepugia |
@krock well, that would be the same approcah as animating nodes with node_swap, i dont want to spend all my time writing around stuff that the game really schould implemennt itself :/ |
19:04 |
VanessaE |
rubenwardy: no apparent cell death in that stroke. whew, thank G*d |
19:06 |
pgimeno |
yay for acting fast :) |
19:11 |
|
whitephoenix joined #minetest |
19:31 |
|
YuGiOhJCJ joined #minetest |
19:38 |
|
YuGiOhJCJ joined #minetest |
19:46 |
nepugia |
is there any way to get a callback for when a player wants to acces a blocks formspec? |
19:46 |
nepugia |
(so i can modify the formspec beforehand) |
19:47 |
sfan5 |
if that formspec is contained in the metadata, no |
19:47 |
nepugia |
.-. |
19:48 |
rubenwardy |
you can use on_rightclick to show the formspec instead |
19:48 |
rubenwardy |
but there will be latency |
19:48 |
rubenwardy |
but for your usecase that's fine |
19:48 |
nepugia |
could i then show the formspec to the players upon them rightclicking the block? |
19:48 |
rubenwardy |
yes |
19:48 |
|
soloojos joined #minetest |
19:48 |
nepugia |
there will be latency... noticeable? |
19:49 |
nepugia |
i can still use all the formspec functions then? |
19:50 |
rubenwardy |
depends |
19:50 |
rubenwardy |
in most cases no |
19:50 |
rubenwardy |
but it does depend on the player's internet |
19:50 |
nepugia |
ah, so bugs that definetely wont show up in singleplayer testing, nice |
19:50 |
rubenwardy |
also, when you use Facebook to monitor certificate registrations on your site: https://i.rubenwardy.com/62ZoeHaP6m.png |
19:51 |
nepugia |
well, the other option i have is to continiously update the formspec in the background, which seems like a huge waste of ressources |
19:53 |
nepugia |
what functions would i loose if i use it in on_rightclick then? |
19:56 |
rubenwardy |
nepugia, nothing |
19:57 |
rubenwardy |
the only difference between formspecs in meta and show_formspec is the time difference (meta formspecs are shown instantly as the client has them locally) and which callbacks are ran (meta formspecs use a node definition, normal formspecs use a global callback) |
20:00 |
nepugia |
minetest uses a lua compiler though? if i have a specific static formspec and either store it in node meta or show it as formspec on_rightclick i wouldnt really expect any difference in time |
20:00 |
rubenwardy |
in singleplayer, no |
20:01 |
rubenwardy |
only in multiplayer / on a remote server |
20:01 |
rubenwardy |
as the server needs to send a message with the formspec's content |
20:05 |
nepugia |
hmm, is there a way to see if a player still has the formspec open (as to update the content while the player still has it open) |
20:06 |
|
sy joined #minetest |
20:07 |
rubenwardy |
there's events when they close it |
20:07 |
rubenwardy |
but that's subject to network latency |
20:07 |
rubenwardy |
ie: you may sent an update just after they closed it, but before you receive a notification that it was closed |
20:07 |
nepugia |
i think i can use register fields and on_rightclick for this |
20:07 |
nepugia |
though, it could lead to some cases where it would reopen it if it was already closed :/ |
20:07 |
rubenwardy |
this is where client-side scripting will be useful, when ready |
20:08 |
* red-F00 |
complains about security PR's taking a while to review |
20:08 |
* red-F00 |
hides |
20:08 |
nepugia |
an option to show the formspec to a player only if they already have it open would mitigate this i suppose |
20:09 |
nepugia |
i might generate one formspec too much and have it discarded though that would be acceptable :3 |
20:09 |
t20kdc |
red-F00: in core or mods, though... |
20:15 |
|
soloojos joined #minetest |
20:28 |
|
riff-IRC joined #minetest |
20:31 |
|
Billre joined #minetest |
20:36 |
|
swift110 joined #minetest |
20:38 |
|
soloojos joined #minetest |
21:21 |
|
swift110 joined #minetest |
21:21 |
|
soloojos joined #minetest |
21:23 |
|
Darcidride_ joined #minetest |
21:23 |
quater |
can I copy the lua environment ? |
21:25 |
red-F00 |
quater, what do you mean? |
21:25 |
red-F00 |
if you want a reference to the globals use _G |
21:26 |
quater |
I would like a copy |
21:26 |
red-F00 |
you can't just copy tables in lua |
21:26 |
red-F00 |
quater, how about you tell me what you want to do, and not a solution |
21:28 |
red-F00 |
you can just do a deep table copy, but there is a good chance thats not what you want to do |
21:29 |
quater |
setfenv('t = 2', env); with env equals the current environment |
21:30 |
quater |
and in env, t = 2 |
21:30 |
red-F00 |
then us _G |
21:30 |
red-F00 |
quater, you trying to sandbox something? |
21:30 |
|
swift110 joined #minetest |
21:31 |
quater |
no |
21:31 |
red-F00 |
oh is this os.setenv? |
21:32 |
quater |
I can create a environment like env = { _G = _G, pairs = pairs, ... } but I would like to avoid the pairs = pairs and so on |
21:33 |
red-F00 |
why can't you just use the current enviroment? |
21:34 |
red-F00 |
quater, just loop over _G and copy stuff |
21:35 |
quater |
I would like to clean the environment if necessary for a new restart like: setfenv('t = 2', env); env = new_env() and t = nil again |
21:35 |
red-F00 |
https://gist.github.com/red-001/493937b94dcdcea867b309872325fe61 |
21:35 |
|
Tux[Qyou] joined #minetest |
21:36 |
quater |
ok |
21:36 |
red-F00 |
oh you want to store a full backup? |
21:36 |
quater |
yes |
21:36 |
|
Pie-jacker875 joined #minetest |
21:37 |
red-F00 |
well you can use table.copy |
21:37 |
red-F00 |
but really there shouldn't be any reason to do this |
21:38 |
red-F00 |
env_bck = table.copy(_G) |
21:40 |
red-F00 |
oh and make sure to change what _G points to in that table |
21:40 |
red-F00 |
env_bck._G = env_bck |
21:40 |
|
EvergreenTree joined #minetest |
21:40 |
red-F00 |
wait |
21:42 |
red-F00 |
I'm not sure if table.copy handles that |
21:42 |
rubenwardy |
table.copy looks for recursion |
21:42 |
rubenwardy |
and will reuse the copied value |
21:42 |
red-F00 |
ah |
21:42 |
red-F00 |
so no need to do that then |
21:43 |
quater |
the gist seems to work fine, I will do more tests |
21:43 |
red-F00 |
quater, why are you restoring the globals from a backup? |
21:44 |
red-F00 |
why not just stop your code from messing them up in the first place? |
21:44 |
red-F00 |
huh |
21:44 |
|
Fusl joined #minetest |
21:44 |
|
Fusl joined #minetest |
21:45 |
red-F00 |
Fusl, seems you got accidently k-lined |
21:45 |
quater |
the code must be as close as possible to the mod environment, which will allow the user to write a mod in a mod |
21:46 |
Fusl |
red-F00: oh noes |
21:46 |
red-F00 |
so you do want to sandbox then, lol |
21:46 |
Fusl |
just kidding, i /quot |
21:46 |
Fusl |
s/quot/quit/ |
21:46 |
red-F00 |
oh yeah |
21:46 |
red-F00 |
silly me |
21:46 |
t20kdc |
I'll admit it fooled me |
21:47 |
red-F00 |
forgot about the quit: prefix |
21:47 |
Fusl |
happens |
21:47 |
red-F00 |
quater, http://lua-users.org/wiki/SandBoxes |
21:49 |
pgimeno |
this is fun, btw: 1.0.0.127.in-addr.arpa.li |
21:50 |
rubenwardy |
nothing there |
21:50 |
rubenwardy |
\o/ |
21:50 |
rubenwardy |
oh wait, it's Fusl's IP |
21:50 |
pgimeno |
as in: * Fusl (fusl1.0.0.127.in-addr.arpa.li) has joined |
21:51 |
Fusl |
yes |
21:51 |
Fusl |
i'm your local horst |
21:51 |
sfan5 |
in-addr.ar.pa when |
21:51 |
JackFrost |
Needs more SASL, Fusl. |
21:52 |
red-F00 |
quater, try this https://gist.github.com/red-001/292a2b52ee18b4a92e02599b4b245674 |
21:52 |
Fusl |
sfan5: meo.ws already costs 1k€, i don't want to imagine what ar.pa costs |
21:52 |
sfan5 |
10k€ :D? |
21:52 |
Fusl |
more |
21:53 |
Fusl |
i'd say around 50k |
21:53 |
red-F00 |
you might have to redirect some minetest tables |
21:53 |
red-F00 |
huh you had a decent idea to start off with |
21:54 |
red-F00 |
if this is not meant just for running code, but for testing a mod |
21:54 |
Fusl |
a standard .pa dom already costs ~500€ |
21:54 |
red-F00 |
there really isn't a good way to test a mod at runtime |
22:06 |
|
soloojos joined #minetest |
22:07 |
|
quater joined #minetest |
22:10 |
|
YuGiOhJCJ joined #minetest |
22:18 |
|
swift110 joined #minetest |
22:31 |
|
Fusl joined #minetest |
22:41 |
|
swift110 joined #minetest |
22:46 |
|
Akberid joined #minetest |
22:54 |
|
Akberid joined #minetest |
22:55 |
|
swift110 joined #minetest |
23:09 |
quater |
is it possible to read a text file ? |
23:10 |
Calinou |
in Lua? of course, yes |
23:11 |
red-F00 |
trivial even |
23:11 |
quater |
I can't use io |
23:12 |
rubenwardy |
why not? |
23:12 |
quater |
attempt to index global 'io' (a nil value) |
23:12 |
rubenwardy |
is this on the server API? |
23:13 |
rubenwardy |
is this in the normal environment, or a custom one? |
23:13 |
quater |
local env = {} |
23:13 |
quater |
for k, v in pairs(_G) do |
23:13 |
quater |
env[k] = v |
23:13 |
quater |
end |
23:13 |
quater |
env._G = env |
23:13 |
sofar |
mod_security? |
23:14 |
sofar |
or reading from a file outside the world folder? |
23:14 |
sofar |
oh, io is unknown |
23:14 |
red-F00 |
wouldn't be a can't index error |
23:16 |
quater |
I am trying: |
23:16 |
quater |
local file = io.open(core.get_modpath('csm_lua') .. '/TODO') |
23:16 |
quater |
local text = io.read(file); |
23:16 |
quater |
core.display_chat_message(text) |
23:17 |
quater |
it is a CSM |
23:17 |
red-F00 |
no io for CSM |
23:17 |
rubenwardy |
you'll need to use mod_storage instead |
23:18 |
rubenwardy |
to store data on the client |
23:18 |
|
quater_ joined #minetest |
23:18 |
red-F00 |
see logs |
23:19 |
quater_ |
attempt to index global 'io' (a nil value) |
23:19 |
|
swift110 joined #minetest |
23:19 |
red-F00 |
<quater> it is a CSM |
23:19 |
red-F00 |
<red-F00> no io for CSM |
23:19 |
red-F00 |
<rubenwardy> you'll need to use mod_storage instead |
23:19 |
red-F00 |
<rubenwardy> to store data on the client |
23:19 |
red-F00 |
* quater_ (~lRC120-164-41-78.ripe.phibee-telecom.net) has joined |
23:19 |
|
red-F00 was kicked by ShadowBot: Paste flood detected. Use a pastebin like pastebin.ubuntu.com or gist.github.com. |
23:19 |
|
red-F00 joined #minetest |
23:19 |
sofar |
lol |
23:19 |
red-F00 |
it's 4 lines shadowbot |
23:19 |
lumberJ |
:D |
23:20 |
sofar |
where does csm mod_storage live??? |
23:20 |
sofar |
clientmods/mod_storage ? |
23:20 |
rubenwardy |
no idea |
23:20 |
sofar |
kek |
23:20 |
red-F00 |
client/??/modname.?? |
23:21 |
red-F00 |
client/mod_storage/modname |
23:21 |
sofar |
wait, csm mod_storage is persistent? |
23:21 |
red-F00 |
yes |
23:21 |
sofar |
awesome |
23:21 |
|
soloojos joined #minetest |
23:21 |
|
Gael-de-Sailly joined #minetest |
23:21 |
sofar |
can't wait to... uhh, uuuuuuuse that |
23:21 |
sofar |
ab |
23:21 |
red-F00 |
well harddrive space is cheap |
23:22 |
red-F00 |
so eh don't use minetest on an ssd |
23:23 |
red-F00 |
in all seriousness we should just let the user set a storeage size limit |
23:23 |
sofar |
csm storage should be per server |
23:23 |
sofar |
or transient |
23:23 |
rubenwardy |
no, timeout |
23:23 |
red-F00 |
you would know if you got kicked |
23:24 |
red-F00 |
sofar, not worth implementing that till we get around to having the server send the mods but yes it should be |
23:25 |
red-F00 |
also we should use a database for all modstorage |
23:26 |
red-F00 |
if we do make it per-server it would be nice to also give server guid's |
23:26 |
red-F00 |
servers* |
23:29 |
|
Fusl joined #minetest |
23:29 |
|
Fusl joined #minetest |
23:29 |
red-F00 |
Fusl, dammit stop trying to fool us all |
23:29 |
Fusl |
sorry |
23:30 |
red-F00 |
jk |
23:30 |
Fusl |
had to apt install weechat-devel-perl :D |
23:59 |
|
Cornelia joined #minetest |