Time |
Nick |
Message |
00:21 |
|
Gustavo6046_ joined #minetest |
00:22 |
|
Gustavo6046 joined #minetest |
00:23 |
|
AliasAlreadyTake joined #minetest |
00:27 |
Parnikkapore_m |
^ re yggdrasil the lag can get up to ~300ms if you're connecting to a server across the world, also the occasional ping spike |
00:35 |
|
Gustavo6046 joined #minetest |
00:54 |
|
Lesha_Vel joined #minetest |
01:19 |
Yad |
luatic: is there a way to convert a table to a string? In standard Lua there appears to be a `to_string()` function. |
01:21 |
Yad |
There seems to be a global `tostring()` function in Minetest. |
01:21 |
Yad |
And I do get some hexidecimal as a string when I use `minetest.chat_send_all(tostring(this_player:hud_get_flags()))` |
01:22 |
MTDiscord |
<Jonathon> if your debuging, use dump() |
01:22 |
MTDiscord |
<Jonathon> minetest.chat_send_all(dump(cursed_table_that_is_causing_me_trouble)) |
01:22 |
Yad |
Oooh, thanks! |
02:01 |
Yad |
Is there currently only possible to have one moon? |
02:01 |
|
queria^clone joined #minetest |
02:02 |
Yad |
(Or could I theoretically rig the skybox to have more than one object move across the sky at night?) |
02:02 |
Yad |
I suppose the whole sky moves, so I could simply paint a single moon texture across the whole sky, the multiple moons simply would be unable to move at different speeds for different orbital radii. |
02:03 |
Yad |
*single texture showing multiple celestial bodies |
02:19 |
erlehmann |
Yad or you switch the skybox like a boss |
02:19 |
Yad |
erlehmann: :D :D :D |
02:19 |
erlehmann |
not sure how jarring that would be |
02:19 |
Yad |
hahahaha, we shall see |
02:19 |
Yad |
shall see what the skybox framerate is >:D |
02:20 |
|
v-rob joined #minetest |
02:20 |
erlehmann |
yes do it |
02:20 |
Yad |
^^ |
02:20 |
erlehmann |
also please tell x2048 that you want shadows to respect this |
02:20 |
Yad |
heheheheh |
02:20 |
Yad |
and patch Irrlicht while I'm at it to allow colored light sources :P |
02:21 |
Yad |
(probably my top feature desire is colored light sources) |
02:27 |
Yad |
erlehmann: I get a strange error about trying to perform arithmetic on a boolean when I use `minetest.chat_send_all(dump(this_player:get_sky()))` |
02:27 |
Yad |
as though `dump()` isn't compatible with the data structure? |
02:28 |
erlehmann |
i have no idea why you ask me, but try dump2 |
02:28 |
erlehmann |
like if dump() is not good enough, try dump2() |
02:28 |
erlehmann |
the dumpening |
02:28 |
erlehmann |
this is not a joke btw |
02:29 |
erlehmann |
also use minetest.debug() for debug stuff srsly |
02:29 |
Yad |
Oh, I asked you because you're active in the chat. :) I try to put names in my messages so I don't assume people are having a sound effect or other notification every time there is a message |
02:29 |
Yad |
And thank you, I was not familiar with `dump2()` |
02:30 |
MTDiscord |
<Jonathon> doesnt get_sky return multiple args? |
02:30 |
MTDiscord |
<Jonathon> and dump2 is for objects |
02:30 |
Yad |
Jonathon: "`get_sky()`: returns base_color, type, table of textures, clouds." |
02:30 |
MTDiscord |
<Jonathon> i can read the api as well as you can |
02:30 |
Yad |
Jonathon: Of course you can but I didn't want to assume you had it open. :) |
02:31 |
Yad |
Also reading it into the logs here. |
02:31 |
Yad |
As I hope there will be a more descriptive description in future versions of Lua_API.txt ^_~ |
02:31 |
Yad |
Which I will be happy to contribute once I understand better the function. :) |
02:31 |
MTDiscord |
<Jonathon> pack it in a table |
02:32 |
Yad |
Ooooh, yeah! |
02:32 |
MTDiscord |
<Jonathon> minetest.chat_send_all(dump({this_player:get_sky()})) |
02:32 |
Yad |
Indeed. ^^ So subtle, yet so effective. |
02:35 |
MTDiscord |
<Jonathon> if you get to be lazy like me, just have debug statement pasted at the top of your mod that is like function cout(...) minetest.chat_send_all(dump({...})) end and then you can be lazy testing in game with //lua and do //lua cout(thing) |
02:36 |
MTDiscord |
<Jonathon> obviously remove before commiting |
03:10 |
Yad |
Jonathon: Good point. :) |
03:28 |
|
queria joined #minetest |
03:33 |
|
Hawk777 joined #minetest |
03:34 |
|
queria joined #minetest |
04:02 |
|
lemonzest joined #minetest |
04:14 |
|
v-rob joined #minetest |
04:49 |
Yad |
It's harmless but funny that dump() outputs color tables as r,b,a,g instead of r,g,b,a heheheh |
04:49 |
Yad |
I mean r g b can be in any order I suppose, but alpha is clearly a separate concept from primary colors |
04:50 |
Yad |
so to have it in the midst of them is an oddity |
04:50 |
MTDiscord |
<Jonathon> its dumping them in the order it finds the keys |
04:50 |
MTDiscord |
<Jonathon> there named so there is no defined order as compared to numerical keys |
04:50 |
Yad |
Jonathon: oooh, so the anomaly is in the C++ of Minetest? |
04:51 |
Yad |
Yeah, the labeling is what I meant by harmless :) |
04:51 |
Yad |
since they get addressed by label usually i'd imagine |
04:51 |
MTDiscord |
<Jonathon> there is no anomaly, and it would be in the C of lua |
04:54 |
MTDiscord |
<Jonathon> https://github.com/minetest/minetest/blob/master/builtin/common/misc_helpers.lua#L124-L168 |
04:54 |
MTDiscord |
<Jonathon> (i)pairs iterator |
05:00 |
|
MTDiscord joined #minetest |
05:08 |
Yad |
Jonathon: Thank you for the definition citation :) |
05:09 |
Yad |
Jonathon: Speaking of defined functions (or events) is there an equivalent of the `on_step` event for players? I only see it for entities. |
05:09 |
MTDiscord |
<Jonathon> on |
05:09 |
MTDiscord |
<Jonathon> *no |
05:09 |
MTDiscord |
<Jonathon> you have to use a globalstep and loop through all the players |
05:10 |
Yad |
Oooh, okay. Well that's better than having to attach an entity to the player to track steps. :) |
05:10 |
Yad |
(of course I do mean program steps not "footsteps" or something) |
05:10 |
MTDiscord |
<Jonathon> honestly, best way to do it depends on your usecase |
05:10 |
Yad |
yep, but thank you now I know there is a `minetest.register_globalstep(function(dtime))` |
05:11 |
MTDiscord |
<Jonathon> if your a game and multiple parts want to do stuff on step, your probably best building a core globalstep that adds in a on_step, and then every mod after that adds onto that on_step method |
05:12 |
Yad |
interesting |
05:13 |
Yad |
something I will probably understand better as I continue to experiment :) |
05:39 |
|
Yad joined #minetest |
05:58 |
Yad |
Would this make any sense for checking if an entity is attached? `on_step = function(self) if self.ref:get_attach() ~= nil then` |
06:01 |
|
riff-IRC joined #minetest |
06:36 |
Yad |
Of of course! It's supposed to be `self.object` just as when using `set_attach()` hahah |
07:03 |
|
calcul0n joined #minetest |
08:30 |
|
proller joined #minetest |
08:45 |
|
Lesha_Vel joined #minetest |
08:49 |
|
proller joined #minetest |
09:19 |
|
olliy joined #minetest |
09:48 |
|
est31 joined #minetest |
10:25 |
|
specing joined #minetest |
10:45 |
|
appguru joined #minetest |
11:19 |
|
GNUHacker joined #minetest |
11:24 |
|
mrgreymatter joined #minetest |
11:43 |
|
tech_exorcist joined #minetest |
11:50 |
|
Wuzzy joined #minetest |
12:13 |
|
appguru joined #minetest |
12:35 |
|
libredev joined #minetest |
12:58 |
|
appguru joined #minetest |
13:08 |
|
proller joined #minetest |
13:09 |
|
kabou joined #minetest |
14:43 |
|
grouinos joined #minetest |
14:47 |
|
kamdard_ joined #minetest |
15:12 |
|
GNUCracker joined #minetest |
15:17 |
|
proller joined #minetest |
15:37 |
|
Yad joined #minetest |
15:39 |
Yad |
Anybody know of a good learning example for custom skyboxes? I suppose it's my own weakness in Lua which makes it challenging to keep track of all the nested properties tables. xD |
15:40 |
Yad |
Apparently colors need to be defined as their hexadecimal strings? |
15:40 |
|
Fixer joined #minetest |
15:40 |
Yad |
less `this_player:set_sky({day_sky = {r=0,g=0,b=0}}` and more `this_player:set_sky({base_color = "#000000",})` ? |
15:40 |
ShadowBot |
Yad: Error: That URL raised <HTTP Error 404: Not Found> |
15:42 |
|
lemonzest joined #minetest |
15:42 |
erlehmann |
Yad look at skybox handling in mcl2 or some better-written weather/dimension mods |
15:42 |
Yad |
I thought it would be effective to study MineClone2 because that has different skyboxes depending on y-coords, but it has so much of its on infrastructure built on top of the base Lua API...oh hhahah hey :D |
15:42 |
Yad |
erlehmann: ...so much built on top of the base Lua API that I struggle to trace any sense of it. |
15:43 |
erlehmann |
mcl2 code is generally a big ball of mud |
15:43 |
Yad |
erlehmann: heheheh, I'm glad we understand each other :D |
15:44 |
erlehmann |
Yad check out some weather mods then |
15:44 |
erlehmann |
i think there is one that makes cool skyboxes, wait |
15:44 |
Yad |
erlehmann: Yep. |
15:44 |
erlehmann |
i search it |
15:44 |
Yad |
Thanks :) |
15:44 |
erlehmann |
https://content.minetest.net/packages/sofar/skybox/ |
15:44 |
erlehmann |
this thing is p epic |
15:45 |
Yad |
Yay! Thank you erlehmann |
15:45 |
erlehmann |
:) |
15:46 |
|
MTDiscord joined #minetest |
15:49 |
|
GNUHacker joined #minetest |
15:50 |
|
grouinos joined #minetest |
15:57 |
|
Fixer_ joined #minetest |
16:09 |
|
Guest216 joined #minetest |
16:10 |
|
appguru joined #minetest |
16:14 |
|
RayManD joined #minetest |
16:43 |
|
Yad joined #minetest |
16:49 |
|
sobkas joined #minetest |
17:04 |
MinetestBot |
[git] sfan5 -> minetest/minetest: Fix segfault with autoscale_mode (again) f2d1295 https://github.com/minetest/minetest/commit/f2d1295fe646105f1b98b0c204f47f781336e211 (2022-03-02T16:49:45Z) |
17:25 |
|
libredev joined #minetest |
17:35 |
|
libredev joined #minetest |
17:36 |
|
libredev joined #minetest |
18:09 |
|
Talkless joined #minetest |
18:17 |
|
___nick___ joined #minetest |
18:29 |
|
___nick___ joined #minetest |
18:33 |
|
___nick___ joined #minetest |
18:42 |
Yad |
erlehmann: the skybox mod you suggested, has things like `player:set_sky("white", "regular")` |
18:42 |
Yad |
set_sky actually able to take words as colors like that? |
19:00 |
erlehmann |
not for long if zughy gets their will lol |
19:00 |
erlehmann |
i think then it will take a table? |
19:00 |
erlehmann |
Yad i know literally nothing about this topic |
19:00 |
erlehmann |
please ask the author of the mod, sofar |
19:01 |
MTDiscord |
<luatic> set_sky now has a more advanced parameter format, but I guess the old format is still supported |
19:01 |
MTDiscord |
<luatic> you should use the new format though, in case they decide to remove the (possibly deprecated?) old format |
19:01 |
erlehmann |
luatic, yeah, but zughy is in the “make it backwards-incompatible even if you can afford to keep the 4 lines that implement it forever” club |
19:01 |
MTDiscord |
<luatic> about the colors: colorspecs can be colorstrings; colorstrings can be named colors |
19:02 |
erlehmann |
do we have a list of those colors? |
19:02 |
erlehmann |
i mean i have used them |
19:02 |
erlehmann |
but mor like |
19:02 |
erlehmann |
black and red and white |
19:02 |
MTDiscord |
<luatic> this makes them slightly awkward to implement (you need a CSS named colors lookup table) but it's fine |
19:02 |
|
GNUHacker left #minetest |
19:02 |
erlehmann |
wait it is css named colors? lol |
19:02 |
MTDiscord |
<luatic> https://github.com/appgurueu/modlib/blob/master/minetest/colorspec.lua#L9-L158 |
19:08 |
|
Fixer joined #minetest |
19:15 |
Teckla |
For those interested, here's how I replaced that complex and dodgy regular expression. https://www.irccloud.com/pastebin/XEujz2TH/ |
19:15 |
Teckla |
Ack! Wrong channel. I'm sorry. |
19:27 |
MTDiscord |
<luatic> I want to know your RegEx now |
19:28 |
MTDiscord |
<luatic> Because if a RegEx can be applied, it is usually preferable over replicating RegEx functionality in code |
19:28 |
MTDiscord |
<luatic> Teckla ^ |
19:28 |
MTDiscord |
<luatic> NVM, in this case not using a RegEx is reasonable |
19:37 |
Teckla |
luatic: User supplied JS expression, it might be designed purposefully malicious, to cause a DoS in the regex (stack overflow, memory overflow, CPU pegged, etc.) |
19:56 |
erlehmann |
luatic you are missing rebeccapurple https://drafts.csswg.org/css-color/#valuedef-rebeccapurple |
19:56 |
erlehmann |
Teckla a user supplied expression should NEVER be able to confuse a regular automaton |
19:57 |
erlehmann |
Teckla if that is even possible, you are probably using the wrong approach entirely |
19:57 |
erlehmann |
Teckla are you sure that the computational power is regular and not more? |
19:59 |
|
Guest47 joined #minetest |
19:59 |
Guest47 |
hola |
20:09 |
|
grouinos joined #minetest |
20:09 |
Teckla |
I am but a small cog in a big, big, big, big, BIG organization/company, none of this was designed or written by me, originally, heh |
20:09 |
Teckla |
I am just fixing this one, narrow issue, so that customers cannot accidentally DoS the system |
20:26 |
Calinou |
ReDoS is very much a real issue, people are still regularly patching it out in modern regex libraries |
20:27 |
|
debiankaios joined #minetest |
20:27 |
debiankaios |
hi somebody here |
20:31 |
Calinou |
debiankaios: yes, ask your question :) |
20:34 |
debiankaios |
hi |
20:35 |
debiankaios |
er yes |
20:35 |
debiankaios |
my wiki account requst got deleted but i got no e-mail |
20:38 |
debiankaios |
Calinou, ↑ |
20:38 |
MTDiscord |
<savilli> why would you allow users to set their own regexps? |
20:40 |
debiankaios |
what mean you with that, savilli? |
20:43 |
Calinou |
debiankaios: can you send me a message (/query Calinou) with your desired wiki username? |
20:43 |
Calinou |
ah, I see it |
20:49 |
MTDiscord |
<savilli> doesn't "user supplied JS expression" mean users supply them? |
20:50 |
MTDiscord |
<savilli> or do you mean a dos attack on a specific server regexp? |
20:52 |
|
clavi joined #minetest |
20:52 |
|
clavi joined #minetest |
20:57 |
|
Gustavo6046 joined #minetest |
20:58 |
|
clavi joined #minetest |
20:58 |
|
clavi joined #minetest |
21:01 |
debiankaios |
bye guys |
21:03 |
|
Gustavo6046 joined #minetest |
21:09 |
MTDiscord |
<luatic> erlehmann: lol I guess that's a newer version |
21:09 |
MTDiscord |
<luatic> MT doesn't have it either |
21:09 |
MTDiscord |
<luatic> what |
21:09 |
MTDiscord |
<luatic> is MT missing a color? |
21:10 |
erlehmann |
yes please add rebecca black to minetest hahaha |
21:10 |
erlehmann |
^^ |
21:10 |
MTDiscord |
<luatic> https://drafts.csswg.org/css-color/#changes-from-3 |
21:10 |
erlehmann |
yes minetest is apparently missing a color |
21:10 |
MTDiscord |
<luatic> Looks like in CSS 3 it wasn't a thing |
21:10 |
erlehmann |
if you copied from minetest |
21:10 |
MTDiscord |
<luatic> sfan5 the docs should pinpoint a version instead of linking to the dev thing |
21:10 |
MTDiscord |
<luatic> because that is updated |
21:11 |
MTDiscord |
<luatic> while MT is not updated |
21:11 |
erlehmann |
noooo, the docs said it was allowed! |
21:11 |
MTDiscord |
<luatic> but it didn't work |
21:11 |
erlehmann |
well, that's the joke |
21:12 |
erlehmann |
i was kinda making fun of the “only if it is in the docs you can rely on it” line that is given so often when something is changed |
21:12 |
erlehmann |
:P |
21:13 |
sfan5 |
the docs of what? where? |
21:14 |
|
independent56 joined #minetest |
21:14 |
erlehmann |
luatic is wrong |
21:14 |
erlehmann |
the docs say that colors are equivalent to CSS colors module level 4 |
21:14 |
erlehmann |
not level 3 |
21:14 |
erlehmann |
and have been saying that for a long time |
21:15 |
MTDiscord |
<luatic> Because that's what is in fact implemented |
21:15 |
independent56 |
Does minetest take mods and just stores it all in memory? If textures are stored as well, i'll go into panic. I can see a mod with loads of textures slowing servers. |
21:15 |
independent56 |
I hope textures are taken as needed and stored in the client's memory. |
21:15 |
MTDiscord |
<luatic> sfan5: the docs say https://github.com/minetest/minetest/blob/f2d1295fe646105f1b98b0c204f47f781336e211/doc/lua_api.txt which contradicts the state of the implementation, which is level 3 |
21:15 |
erlehmann |
independent56 do not worry about it |
21:16 |
MTDiscord |
<luatic> the difference seems to basically be "rebeccablackpurple" |
21:16 |
independent56 |
Why not? |
21:16 |
MTDiscord |
<luatic> No, Minetest does not fully load mods into memory? Why would it? |
21:16 |
erlehmann |
luatic well i do agree with you that the docs are wrong, i disagree that the fault was to “link to the dev version” |
21:16 |
sfan5 |
okay but why are you pinging me on this |
21:17 |
MTDiscord |
<luatic> Because either the docs or the code needs a fix ^^ |
21:17 |
MTDiscord |
<luatic> (and depending on what the fix will be, I might have to update modlib) |
21:19 |
MTDiscord |
<luatic> independent56: There's media, and then there's code. I'm not quite sure whether the server loads all media into memory - it probably does - but that doesn't really matter as long as it stays in the megabyte range. Code size is negligible compared to that; compiled "chunks" will obviously reside in memory until Lua garbage collects them. Now what about textures? Texture modifiers are indeed generated as needed (and then cached forever). Not |
21:19 |
MTDiscord |
sure whether the same applies to base textures. |
21:19 |
MTDiscord |
<luatic> (the latter is clientside) |
21:19 |
independent56 |
Cool |
21:20 |
independent56 |
I forgot textures aren't 100*100 |
21:20 |
sfan5 |
the server loads no media into memory |
21:20 |
independent56 |
Thank god |
21:20 |
erlehmann |
sfan5 luatic please do not update the code, but the docs, unless someone used this unwittingly |
21:21 |
|
Verticen joined #minetest |
21:21 |
erlehmann |
independent56 the server loads GIGACHUNKS into memory of ma |
21:21 |
erlehmann |
map |
21:21 |
erlehmann |
just use htop to see how intensive map is |
21:21 |
MTDiscord |
<luatic> sfan5: so it reads from disk every time it has to send it? |
21:21 |
MTDiscord |
<luatic> no caching? |
21:21 |
sfan5 |
that's the kernels job |
21:22 |
MTDiscord |
<luatic> erlehmann: I suggest we throw a warning if rebeccapurple is used lol |
21:22 |
MTDiscord |
<luatic> (jk) |
21:32 |
|
wolfshappen_ joined #minetest |
21:58 |
|
grouinos joined #minetest |
22:11 |
|
proller joined #minetest |
22:19 |
|
sagax joined #minetest |
22:24 |
|
specing_ joined #minetest |
22:49 |
|
Lesha_Vel joined #minetest |
23:23 |
|
redquasar joined #minetest |
23:31 |
|
olliy joined #minetest |