Time |
Nick |
Message |
00:10 |
|
agrecascino joined #minetest |
00:11 |
|
DMackey- joined #minetest |
00:14 |
|
lordfingle joined #minetest |
00:14 |
agrecascino |
https://forum.minetest.net/viewtopic.php?f=7&t=15388 |
00:14 |
agrecascino |
help |
00:17 |
|
DMackey joined #minetest |
00:19 |
|
STHGOM joined #minetest |
00:19 |
|
STHGOM joined #minetest |
00:29 |
|
Robby joined #minetest |
00:37 |
|
TGminer joined #minetest |
00:57 |
|
TheReaperKing joined #minetest |
00:59 |
|
sherkaton[m] joined #minetest |
01:21 |
|
TheReaperKing1 joined #minetest |
01:29 |
|
Resurgence joined #minetest |
01:29 |
Resurgence |
Hi |
01:29 |
Resurgence |
It's me Bakfast |
01:30 |
|
Dolus joined #minetest |
01:30 |
|
Desum joined #minetest |
01:31 |
Resurgence |
Does anyone know bakfast |
01:34 |
Resurgence |
Hello why is no one talking |
01:36 |
|
Xenomorfo joined #minetest |
02:05 |
|
segfault22 joined #minetest |
02:06 |
segfault22 |
Does anyone have a copy of 0gb_us mod Land Claim (the original one)? |
02:11 |
|
Chinchou joined #minetest |
02:12 |
Chinchou |
Do get_look_yaw() and get_look_horizontal() return identically? |
02:12 |
Chinchou |
Or is there some difference that needs to be taken into account when switching? |
02:17 |
|
jonasbits joined #minetest |
02:28 |
segfault22 |
haha multicraft got DMCA'd |
02:30 |
|
est31 joined #minetest |
02:32 |
segfault22 |
Overhook Double-legtrip DMCA TakeDown |
02:35 |
segfault22 |
MultiCraft is a minetest clone; Minetest is not a Minecraft clone because it is substantially different - only the mods are too much like Minecraft, by implementing the same concepts as in Minecraft, but the mods can be changed and are not really part of the core. There is really only one thing that Minecraft is "known for" and is implemented in the minetest core - the node system - but in some time that will also change... |
02:37 |
|
GunshipPenguin joined #minetest |
02:41 |
segfault22 |
Surely there's some kind of mineral that can be mixed with water to form a gas that ignites on contact with air, allowing a practical way to make furnaces require fire to work; then it is only a matter of time before they also use a heat-system where the cooking time and result is determined by the temperature of the furnace (cooking eggs should take less heat than smelting steel) |
02:42 |
|
est31 joined #minetest |
02:45 |
segfault22 |
Do you think furnaces should use a source of ignition to burn fuel, so long as said source of ignition is readily-available early in the game? |
02:46 |
segfault22 |
for example, it makes no sense that the only fire-starting method be flint and steen, then require it to be used, because to make steel you need to use the furnace and to use the furnace you need steel for the flint and steel (catch 22) |
02:46 |
segfault22 |
steel |
02:50 |
segfault22 |
like a bow-drill to start fire, then you use that to make a "burn pile", then you take a stick that's burning on the end and use it to ignite the furnace |
02:52 |
segfault22 |
We would need some way to implement fuel types having an ignition temperature, because you can't just light coal (mineral) without significant heat - maybe the fuel-section of the GUI should have four slots, and the furnace also stores a metadata value "temperature", which determines if a fuel-item can be consumed to add to the fire |
02:52 |
segfault22 |
This and the other stuff I have been talking about here and on the forums is all necessary before I can start a server, because I want it to be cool and revolutionary |
02:57 |
segfault22 |
is this reasonable, or have I finally gone off the deep end? |
02:59 |
segfault22 |
have I gone totally insane with these delusions of over-complex in-game methods? |
03:09 |
|
Freejack joined #minetest |
03:17 |
|
DMackey joined #minetest |
03:17 |
Chinchou |
segfault22, I like the idea, intellectually, but even I acknowledge that there's a balance to be struck between fun and "realism". That said, that balance is different for different people - I'm quite interested in seeing temperature differences. With temperature differences in furnaces, Technic could finally have a way to mimic the different methods of smelting/forging iron... |
03:17 |
Chinchou |
I guess the point is that you might be trying for too much with that. |
03:19 |
Chinchou |
Hrm... Still, there's charcoal, and you mentioned a bow drill. It may be reasonable to require burning wood into charcoal before being able to use coal. |
03:19 |
segfault22 |
I don't want it to be too realistic, just less like minecraft. It could still be easy to get started, by making the crafting for a bow firestarter or something easy and the usage, that way it isn't too realistic (processes for making the bow string easier than real-life) but it isn't Minecraft either |
03:20 |
Chinchou |
I'm not sure how the step from charcoal to bituminous coal/lignite would be done. |
03:20 |
Chinchou |
s/done/implemented |
03:20 |
segfault22 |
As long as it's not too much like minecraft, it doesn't have to be any closer to realism |
03:21 |
segfault22 |
I figure that the heat from burning enough wood (or enough charcoal, but requiring less of it) would eventually be enough to ignite the coal, but the furnace has to be hot enough for that to hppen The coal could be beneath the other fuel items in the input-slots (also unlike reality, more heat is put into the stuff when it's over the burning material) and it would still work |
03:23 |
segfault22 |
charcoal would be enough to smelt basic metals like copper/tin/bronze or iron/steel, which are used to get lots of coal which can be used to smelt more difficult metals like iridium, tungsten, adamantium, and so on |
03:24 |
segfault22 |
in real life it takes like a whole ton of charcoal to smelt a single ingot of copper-ore, which is how ancient civilizations justified mass deforestation and ended up converting huge patches of land to barren desert in just a few generations |
03:30 |
Chinchou |
What I'd like to see, but am currently too incompetent to implement, is an Archimedes' Screw pump. |
03:30 |
Chinchou |
Then I could start crossing DF with MT... |
03:30 |
Chinchou |
Excuse me. |
03:33 |
|
DI3HARD139 joined #minetest |
03:33 |
DI3HARD139 |
@segfault22 Any luck in finding a copy? Or did you decide to just port it over? |
03:34 |
segfault22 |
I haven't found a copy yet, but I also haven't decided to port it over yet. I guess that while I wait to see if anyone has a copy, I can work on my other mods instead of waiting around |
03:56 |
|
Miner_48er joined #minetest |
04:05 |
|
behaleba- joined #minetest |
04:33 |
|
alkotob_ joined #minetest |
05:07 |
|
lumidify joined #minetest |
05:09 |
|
swift110 joined #minetest |
05:11 |
|
swift110 joined #minetest |
05:19 |
|
GunshipPenguin joined #minetest |
05:19 |
|
GunshipPenguin joined #minetest |
05:20 |
|
GunshipPenguin joined #minetest |
05:20 |
|
GunshipPenguin joined #minetest |
05:21 |
|
GunshipPenguin joined #minetest |
05:21 |
|
DMackey- joined #minetest |
05:21 |
|
GunshipPenguin joined #minetest |
05:41 |
segfault22 |
max sendq exdeeded? |
05:41 |
segfault22 |
vurt deh furk |
06:21 |
|
sonicpp joined #minetest |
06:21 |
|
DMackey joined #minetest |
06:25 |
|
DMackey- joined #minetest |
06:30 |
|
SmugLeaf joined #minetest |
06:35 |
|
CWz joined #minetest |
06:45 |
|
lumidify joined #minetest |
06:46 |
|
Nosrick_ joined #minetest |
06:48 |
|
roboman2444 joined #minetest |
06:48 |
|
Yst joined #minetest |
06:48 |
|
xSmurf joined #minetest |
06:56 |
segfault22 |
I found some force-op hack tool for Minecraft... it's probably BS, but if it really works (MicroSh!t is known for security vulnerabilities, so it's possible) I'm going to go grief some popular servers, help subtract their ratings >:D |
06:57 |
segfault22 |
Not sure if that would really help increase the Minetest ratings at all, but it would at least start to make it look like Minecraft is reaching its peak and falling down off the other end |
06:58 |
segfault22 |
who doesn't want to see Minecraft turn into "oh you mean that old stupid game nobody plays any more? lol n00b" |
06:58 |
|
roboman2444 joined #minetest |
07:00 |
|
basxto joined #minetest |
07:11 |
|
shamoanjac joined #minetest |
07:17 |
swift110 |
lol |
07:19 |
segfault22 |
it's in a .rar file but no password, so maybe it's legit |
07:19 |
segfault22 |
it doesn't ask for your username AND password, just username |
07:19 |
Chinchou |
Is a RAR archive /ever/ legitimate? Just, ew. |
07:20 |
segfault22 |
but it looks like it's BS because it has an option to "delete all backups", yet there's several ways to backup the files, so how can it know which one is being used, if it's even a conventional method? |
07:20 |
segfault22 |
SOmetimes I put my files in .rar archives, it saves space on lesser storage media and file sharing sites with limits... |
07:21 |
|
aheinecke joined #minetest |
07:21 |
Chinchou |
So does bzip2, XZ, LZMA2... |
07:22 |
|
Trustable joined #minetest |
07:23 |
segfault22 |
yes but those are generally harder to set-up in windows systems, or just not available |
07:23 |
lumidify |
7zip? |
07:23 |
segfault22 |
minecraft kiddos almost always use windows |
07:24 |
segfault22 |
okay, so there's other methods of archiving files, does it make them totally illegitimate by default just for using RAR? |
07:24 |
Chinchou |
LZMA2 is actually /easier/ than RAR on a 'dows system, as it is what 7-zip uses. |
07:24 |
segfault22 |
there's lots of other fudge-factor in this supposed hack tool, least of which being the archive format it is stored in on the file-server |
07:24 |
segfault22 |
That's why I said it's probably BS |
07:25 |
Chinchou |
It generally indicates illegitimacy and/or incompetence, but it isn't a surety, no. |
07:26 |
Chinchou |
Still yeah, a "hack tool" on a 'dows system is more of a red flag for "this is fake" than being stored in a RAR archive. |
07:26 |
segfault22 |
the double-adfly links are the most suspicious, but I've had to go through that to download hack clients like Wurst which work on any system and has neat XRAY, so it's also not a surety.... |
07:26 |
segfault22 |
There's only one way to find out - run it |
07:27 |
lumidify |
Maybe try it in a virtual box? |
07:27 |
Chinchou |
The last time I tried to develop on 'dows, I ended up getting nowhere. The system itself is horribly unfriendly. |
07:27 |
segfault22 |
windows virtualbox? |
07:27 |
lumidify |
Just so you don't infect your main os |
07:28 |
lumidify |
Yeah, windows is terrible for developing, but of course it's just terrible in general... |
07:28 |
Chinchou |
^ |
07:28 |
Chinchou |
Aye, that it is |
07:28 |
segfault22 |
right, there's no way to infect Linux unless you configured something stupidly and made your system vulnerable, only windows is vulnerable by default, so I should run it in a VM |
07:29 |
Chinchou |
Why should I /need/ 20+ GB of disk space for the "OS"? |
07:29 |
lumidify |
You *can* infect Linux, but it's a whole lot more difficult. |
07:29 |
Chinchou |
^ |
07:29 |
Chinchou |
Linux systems are far from foolproof |
07:29 |
Chinchou |
They're generally far more secure, but nothing can be completely foolproof |
07:29 |
lumidify |
Indeed |
07:30 |
lumidify |
I have a copy of windows on an external hard drive which I keep shut away in a cupboard all the time :D |
07:30 |
|
davisonio joined #minetest |
07:30 |
Chinchou |
Pfft |
07:31 |
|
Ronsor joined #minetest |
07:31 |
Chinchou |
Wine has it's problems too - like the exploit in the image-handling stuff. Was it for JPEGs? |
07:32 |
Chinchou |
I don't recall too well, but it mirrored the vulnerability that is present on 'dows. |
07:32 |
lumidify |
I dunno, I've just tried to use programs that work natively on Linux |
07:32 |
Chinchou |
Why, I don't know. |
07:32 |
Chinchou |
Aye, same. The only reason I use Wine is to run old games. |
07:33 |
|
Dolus joined #minetest |
07:40 |
|
eliotJ joined #minetest |
07:53 |
|
Miner_48er joined #minetest |
07:54 |
|
Tux[Qyou] joined #minetest |
07:54 |
|
Miner_48er joined #minetest |
07:55 |
|
raingloom joined #minetest |
07:56 |
|
Ronsor joined #minetest |
08:00 |
|
namach joined #minetest |
08:20 |
|
swift110-phone joined #minetest |
08:29 |
|
Darcidride joined #minetest |
08:33 |
|
Ronsor joined #minetest |
08:33 |
|
LNJ2GO joined #minetest |
08:39 |
|
Szkodnix joined #minetest |
08:43 |
|
nnnn20430 joined #minetest |
08:46 |
Calinou |
<lumidify> You *can* infect Linux, but it's a whole lot more difficult. |
08:46 |
Calinou |
this is true even with Wine :P |
08:47 |
lumidify |
Yeah, I guess :P |
08:49 |
|
eliotJ joined #minetest |
08:49 |
|
LNJ2GO left #minetest |
08:49 |
segfault22 |
Does minetest override/remove the lua debug.*() functions? |
08:50 |
segfault22 |
I have to use debug.getinfo() to determine what function called the current function, so that if an incorrect value is passed, we know "who did it" |
08:57 |
segfault22 |
so it's debug.getinfo(n).name which puts a string, otherwise it tries to put a table, and if you try to concatenate that with " > " you get a bork |
09:04 |
segfault22 |
Is it okay to set all of my registering functions to empty/nil via minetest.after(0,<set the values to nil here>)? |
09:06 |
segfault22 |
said functions are only intended to be used when mods are loading, and any use of them during the game may try to call minetest.register_*() functions, which may crash the server, and if I leave the functions "open", someone will try to use them to deliberately crash the server through their mod for whatever reason they want (compiled mods where the source code is invisible) |
09:07 |
|
SylvieLorxu joined #minetest |
09:09 |
|
davisonio joined #minetest |
09:15 |
|
alkotob joined #minetest |
09:24 |
segfault22 |
Is there any way to put lua code inside a variable or some other reference other than a function, such that when it is referenced, the code will be run as if it were written in place of the reference? |
09:25 |
segfault22 |
I would go bug people on minetest_dev or minetest_delta about it, but there's likely even less people online there, if any at all... |
09:28 |
segfault22 |
it's almost as bad as looking for a copy of 0gb_us land claim mod |
09:28 |
|
davisonio joined #minetest |
09:28 |
segfault22 |
welcome |
09:42 |
|
xunto joined #minetest |
09:46 |
segfault22 |
I really don't like debug.getinfo(2).name.." > "..debug.getinfo(1).name code blocks taking up so much space in my mod files,... I would rather just keep it in a separate spot and reference it with a short variable or something |
09:47 |
segfault22 |
maybe I'll just make a function, increase the stack numbers so that it ignores said function, and insert code to check and make sure debug.getinfo(n).name is not nil, and if it is, replace the nil with "init" or something... |
09:54 |
|
IhrFussel joined #minetest |
09:55 |
|
FirePowi joined #minetest |
09:55 |
|
PseudoNoob joined #minetest |
09:57 |
segfault22 |
I figured it out, nevermind |
10:25 |
|
Markow joined #minetest |
10:29 |
|
DMackey joined #minetest |
10:32 |
|
lumidify joined #minetest |
10:40 |
segfault22 |
From now on I'm using the GPL license for my mods |
10:42 |
segfault22 |
is that bad? |
10:53 |
segfault22 |
"Every morning just before breakfast, I don't want no coffee or tea; Just me and good buddy Weiser, That's all I ever need" |
10:56 |
|
PseudoNoob joined #minetest |
10:58 |
|
davisonio joined #minetest |
11:01 |
Calinou |
[12:39:40] <segfault22> From now on I'm using the GPL license for my mods |
11:01 |
Calinou |
this makes them not mergeable in Minetest core without your permission |
11:02 |
Calinou |
LGPLv2.1+ is fine, LGPLv2.1-only, LGPLv2-only, GPLv2 (only or +), GPLv3 (only or +), are not OK for us |
11:03 |
|
alkotob joined #minetest |
11:04 |
Chinchou |
GPL is rather restrictive |
11:05 |
|
Fixer joined #minetest |
11:19 |
Calinou |
Chinchou: still better than proprietary licenses :P |
11:20 |
Calinou |
I tell people to choose GPL/CC BY-SA rather than a non-commercial clause, always |
11:31 |
|
DMackey- joined #minetest |
12:02 |
|
raingloom joined #minetest |
12:24 |
|
rubenwardy joined #minetest |
12:26 |
|
Tristit1a joined #minetest |
12:26 |
|
ploop joined #minetest |
12:27 |
|
exoplanet joined #minetest |
12:28 |
|
Robby joined #minetest |
12:30 |
|
prrmypx joined #minetest |
12:32 |
|
HoloIRCUser3 joined #minetest |
12:43 |
|
bulldozer joined #minetest |
12:44 |
|
raingloom joined #minetest |
12:52 |
|
Jordach joined #minetest |
12:59 |
|
GrimKriegor joined #minetest |
13:07 |
|
imr joined #minetest |
13:09 |
|
LNJ2GO joined #minetest |
13:12 |
|
HoloIRCUser2 joined #minetest |
13:24 |
|
LNJ2GO left #minetest |
13:27 |
|
arecascino joined #minetest |
13:27 |
|
jojoa1997 joined #minetest |
13:36 |
|
DMackey joined #minetest |
13:49 |
|
prrmypx joined #minetest |
13:52 |
|
raingloom joined #minetest |
13:55 |
aix |
Hi everyone! |
13:59 |
|
Out`Of`Control joined #minetest |
14:00 |
|
STHGOM joined #minetest |
14:00 |
|
STHGOM joined #minetest |
14:00 |
|
Out`Of`Control joined #minetest |
14:06 |
|
Not_a_Robot joined #minetest |
14:11 |
|
TGminer joined #minetest |
14:17 |
|
whitephoenix joined #minetest |
14:24 |
|
Void7 joined #minetest |
14:26 |
|
Not_a_Robot joined #minetest |
14:37 |
|
DMackey- joined #minetest |
14:45 |
agaran |
Hello |
14:51 |
|
Tuxedo[Qyou] joined #minetest |
14:53 |
|
swift110 joined #minetest |
14:54 |
|
Ronsor joined #minetest |
15:00 |
|
Megaf joined #minetest |
15:17 |
|
LNJ2GO joined #minetest |
15:21 |
|
LNJ2GO left #minetest |
15:24 |
|
prrmypx joined #minetest |
15:35 |
|
Calinou joined #minetest |
15:40 |
|
tpe joined #minetest |
15:47 |
agaran |
hi Calinou |
15:49 |
|
H-H-H joined #minetest |
15:55 |
|
Darcidride joined #minetest |
16:07 |
|
powi_ joined #minetest |
16:07 |
|
powi__ joined #minetest |
16:09 |
|
segfault22 joined #minetest |
16:10 |
|
Miner_48er joined #minetest |
16:11 |
|
betterthanyou710 joined #minetest |
16:12 |
segfault22 |
does minetest modify or omit the lua builtin debug.*() functions? |
16:12 |
|
FirePowi joined #minetest |
16:18 |
|
Nosrick__ joined #minetest |
16:22 |
|
shamoanjac joined #minetest |
16:23 |
|
Yst_ joined #minetest |
16:32 |
|
lumidify joined #minetest |
16:32 |
|
xeranas joined #minetest |
16:34 |
|
alkotob_ joined #minetest |
16:34 |
|
rubenwardy joined #minetest |
16:39 |
sfan5 |
segfault22: yes |
16:39 |
segfault22 |
which one, modify or omit? |
16:40 |
segfault22 |
thank you |
16:40 |
sfan5 |
omit i think |
16:40 |
segfault22 |
That's no good. I will have to include the missing library file(s) in my mod, or make them a required dependency. My mod can not work without debug.getinfo() |
16:41 |
sfan5 |
go bug ShadowNinja about thaqt |
16:41 |
sfan5 |
it makes things much more secureâ„¢ |
16:41 |
segfault22 |
So it was recent? |
16:42 |
sfan5 |
mod security was added last year iirc |
16:42 |
segfault22 |
There isn't any way the debug functions can be abused in the lua modding api is implemented properly. |
16:43 |
sfan5 |
there is |
16:43 |
sfan5 |
it's not about implementing properly |
16:43 |
|
KaadmY joined #minetest |
16:43 |
segfault22 |
then it's not implementted properly, ie. sandboxed |
16:43 |
sfan5 |
removing some debug functions is part of the sandbox |
16:44 |
segfault22 |
otherwise you would be able to take-over a server that has the luacontrollers mod, which has yet to be accomplished by many people who have tried |
16:44 |
|
lisac joined #minetest |
16:44 |
segfault22 |
debug.getinfo() is harmless |
16:44 |
sfan5 |
luacontrollers uses a different kind of sandbox |
16:44 |
sfan5 |
no it's not |
16:44 |
sfan5 |
actually |
16:44 |
sfan5 |
have you verified that minetest omits debug.getinfo() |
16:45 |
|
prrmypx joined #minetest |
16:46 |
segfault22 |
Not yet, I came here to ask before I resort to that option, but I guess it won't hurt to give it a go since we really don't kno |
16:46 |
agaran |
anyone knows if spurious teleporting to -max,current-y,-max coords has some fix? |
16:50 |
sfan5 |
agaran: recompiling the client sometimes helps |
16:50 |
rubenwardy |
segfault22, why does you mod need debug.getinfo() to work? |
16:51 |
rubenwardy |
other than for debugging |
16:51 |
segfault22 |
It's so that we can determine what function called the current function, when putting entries to the log, so that in the case of an error you know exactly what caused it |
16:52 |
rubenwardy |
so it's for debugging |
16:52 |
segfault22 |
Otherwise, it's guesswork until you happen upon the spot where something is spelled wrong or the wrong data type |
16:52 |
rubenwardy |
in order to support sandboxed more, you could do: |
16:52 |
agaran |
sfan5: it never occurs when I play over lan/localhost server but it does over internet, okay, recompile to same version or git head? |
16:52 |
segfault22 |
Are you saying debug.getinfo() is disabled? |
16:52 |
rubenwardy |
local debug_getinfo = debug and debug.getinfo or (function() return "?" end) |
16:53 |
rubenwardy |
not sure if it is |
16:53 |
rubenwardy |
could find out if you give me a few mins |
16:53 |
sfan5 |
agaran: same version |
16:53 |
rubenwardy |
if it is though, use that line ^ |
16:54 |
rubenwardy |
replace any calls to debug.getinfo with debug_getinfo |
16:54 |
rubenwardy |
then it will just return "?" when in sandbox mode |
16:54 |
rubenwardy |
alternatively, use error("") to cause a hard crash and a stack traceback |
16:55 |
rubenwardy |
that way you'll still get a nice traceback in sandboxed mode |
16:55 |
segfault22 |
It's useless if it doesn't return the name of the functions in the stack, without crashing the server |
16:55 |
rubenwardy |
but the mod will crash the server |
16:55 |
rubenwardy |
segfault22, your logic really shouldn't depend on debug.getinfo |
16:55 |
rubenwardy |
debug.getinfo should only be for debug |
16:55 |
segfault22 |
This is debugging |
16:56 |
rubenwardy |
then it doesn't matter if the debug isn't as good in sandbox mod |
16:56 |
rubenwardy |
+e |
16:57 |
sfan5 |
segfault22: if you look here https://github.com/minetest/minetest/blob/48b3bb980d4a026d32739acc1982f16e3c303c5b/src/script/cpp_api/s_security.cpp#L108 |
16:57 |
sfan5 |
you can see that debug.getinfo is whitelisted |
16:57 |
rubenwardy |
well, you don't need that code then :P |
16:57 |
segfault22 |
The only reason it is used is so you can tell where an error occurred, even if it doesn't crash the server. if the server owner screws up something and a whole bunch of nodes turn to unknown, they can either search through the files looking closely for any bad spot, possibly more than once - or just look in the log-file to see which function caused the error |
16:57 |
rubenwardy |
* :) |
16:57 |
segfault22 |
If it is not disabled, then it's all good and this will work fine. Good. |
16:57 |
segfault22 |
thank you sfan5 |
16:58 |
rubenwardy |
segfault22, you may be interested in debug.traceback() as well |
16:59 |
segfault22 |
is there a way to fix the minetest client not creating a window-bar in the window-panel, when the window appears? I end up with the minetest client minimized and I can't get it back because there's no bar to click on to maximize it again :/ |
16:59 |
rubenwardy |
"returns a string with a traceback of the call stack" https://www.lua.org/manual/5.2/manual.html#pdf-debug.traceback |
16:59 |
rubenwardy |
segfault22, os? |
16:59 |
segfault22 |
linuxmint-17.3 |
17:00 |
rubenwardy |
try alt + left click and drag on the window |
17:00 |
rubenwardy |
I had this problem when I used to use Unity |
17:00 |
segfault22 |
it appears to be related to the hide-all-windows thing in the corner of my screen, because if I minimize the other windows the good-ol' way, it works fine |
17:02 |
|
jojoa1997 joined #minetest |
17:03 |
segfault22 |
apparently debug.getinfo() doesn't work because it causes "attempt to index a nil value"; there's one way I could have done this wrong, so I'll go verify. |
17:04 |
rubenwardy |
awesome, didn't know that lua had coroutines https://www.lua.org/pil/9.1.html |
17:05 |
|
hmmmm joined #minetest |
17:08 |
|
raingloom joined #minetest |
17:10 |
|
octacian joined #minetest |
17:10 |
|
alex77224 joined #minetest |
17:10 |
segfault22 |
I set-up an if-then to catch the condition that debug.getinfo(<n>).name == nil, if so then the local variable is simply set to "MAIN", otherwise use debug.getinfo(<n>).name as a string, but it fails on "attempt to index nil value" |
17:12 |
|
Telesight joined #minetest |
17:12 |
rubenwardy |
debug.getinfo(<n>) == nil? |
17:14 |
segfault22 |
the <n> is a number, 2 or 3 |
17:14 |
segfault22 |
.name is to get just the function name field, a string type |
17:16 |
segfault22 |
Okay I just caught it - when I try to run the function in Minetest, all of the debug.getinfo(<n>).name values are nil/empty; when I run it in the lua demo at lua.org/cgi-bin/demo, it works fine and does exactly as expected. Therefore, I conclude that debug.getinfo() is NOT "whitelisted", it is disabled. |
17:17 |
sfan5 |
it is whitelisted |
17:17 |
segfault22 |
define "whitelisted" in your context... |
17:17 |
sfan5 |
...you can use the function? |
17:17 |
segfault22 |
try |
17:18 |
|
Nosrick_ joined #minetest |
17:20 |
sfan5 |
segfault22: works for me |
17:24 |
|
Krock joined #minetest |
17:24 |
|
Krock joined #minetest |
17:31 |
rubenwardy |
segfault22, I understood that <n> is a number |
17:31 |
|
moparisthebest joined #minetest |
17:31 |
rubenwardy |
but does the function ever return nil |
17:31 |
rubenwardy |
the error message means that you've tried to do (nil).some_key |
17:32 |
rubenwardy |
so either it returns nil, or the error is elsewhere |
17:45 |
|
GrimKriegor joined #minetest |
17:51 |
segfault22 |
Well it seems to work only outside the mod... |
17:51 |
|
namach joined #minetest |
17:52 |
segfault22 |
there's a problem somewhere but it isn't obvious |
17:57 |
segfault22 |
I tricked it! the variable names and the mod name are different, but everything else is the same, and it works. But when I use the variable names and mod name of the real mod, it doesn't work. |
17:57 |
segfault22 |
There isn't a problem with my code, there's something wrong in the engine' |
17:58 |
segfault22 |
and NOW it's working using the code I had before... wtf... |
17:58 |
segfault22 |
I didn't change anything except the mod name for a short test mod, and now it works... |
17:59 |
segfault22 |
so if debug.getinfo(2).name is nil, then debug.getinfo(3).name crashes the game... |
18:01 |
segfault22 |
when I have a function call the debug.getinfo().name handling function, and it has the calling_function.." -> "..called_function block, the calling_function is the variable that it is set to if calling_function is nil; but when I decrease the stack by one level, all of a sudden both of them are set to the nil-replacer value, and it crashes on "attempt to index nil value" which is wrong |
18:03 |
|
Robby joined #minetest |
18:03 |
segfault22 |
it's only when I call debug.getinfo(3).name inside a function, without a different function calling that function. This does not work like the Lua devs said it should! |
18:04 |
segfault22 |
either they lied, or they don't know their code is broken |
18:09 |
|
lumidify joined #minetest |
18:10 |
segfault22 |
If you do debug.getinfo(1).name outside a function, it returns nil. If you do debug.getinfo(2).name, you get the error because debug.getinfo(2) is entirely nil... |
18:11 |
segfault22 |
So I have to figure out how to detect when either debug.getinfo(2).name is nil OR debug.getinfo(2) is nil, and the same for debug.getinfo(3).name and debug.getinfo(3)... |
18:11 |
segfault22 |
this is stupid |
18:11 |
segfault22 |
Lua is too hipster we should have used java or something for mods |
18:11 |
segfault22 |
but would that just be worse? |
18:12 |
agaran |
then minetest would barelly run on my work toys.. |
18:12 |
segfault22 |
Maybe Lua wouldn't be so bad if the Lua devs didn't screw up the debug.getinfo() function |
18:12 |
agaran |
now it sometimes need 2G mem.. for server.. with java, toys having 128G may not suffice.. |
18:13 |
segfault22 |
fine no java, but Lua is no good if you need debug information, because the debug.getinfo() function is screwed up |
18:13 |
segfault22 |
even without minetest it's screwed up |
18:13 |
|
Void7 joined #minetest |
18:13 |
agaran |
I'd prefer perl if you ask me.. but we have lua and we need to live with that.. |
18:17 |
segfault22 |
fork time |
18:17 |
agaran |
nope |
18:17 |
segfault22 |
why not? |
18:17 |
agaran |
day has only 24h.. |
18:18 |
segfault22 |
it would be difficult to port everything over to perl, right? we would have to redo everything, mapgen code being only part of the hard part |
18:18 |
agaran |
dunno if difficult, but a lot had to be changed indeed.. |
18:18 |
agaran |
thats why I'd rather spend time on my mod instead of forking minetest.. |
18:19 |
segfault22 |
because lavaflow development instead of the language developers making their functions do what they are documented to do in the first place |
18:20 |
agaran |
well, lavaflow canbe used to make nice lava-stream-lamp |
18:20 |
segfault22 |
why worry about something like debug.getinfo() sometimes returning nil and screwing up debug.getinfo().name? it only causes developers down the line to have to write 2x the code to get a single function done, why bother fixing it right? |
18:20 |
agaran |
segfault22: oh, then fix lua? |
18:21 |
segfault22 |
not possible |
18:21 |
segfault22 |
this should have been fixed in lua 5.1, it won't be fixed even in lua 5000.1 |
18:21 |
segfault22 |
if it even lives long enough to get that far, that is |
18:22 |
agaran |
well... lua 5k is not that bad.. I worried it won't be fixed even in lua2^128 |
18:22 |
segfault22 |
offtopic: what would lua version 5000 be like (since it's usually several years between updates, that's beyond the year 10000) |
18:23 |
segfault22 |
will we even write it with a keyboard any more? will it even use letters? |
18:23 |
agaran |
well.. we may be using cobol instead.. after some degradation of civilization.. then getting back to 1960 |
18:24 |
segfault22 |
lol and the kiddos on here be all like "derp civilization rulez it'll never fall apart, derp teh internet iz forever!!!!1!oneone" |
18:25 |
agaran |
well.. |
18:26 |
segfault22 |
at the rate we are destroying the world and wasting abundant resources into damaging pollutants, civilization might not be sustainable on earth for another few million years in just a few more years |
18:26 |
segfault22 |
"we" as in the GC's and their budds in corporate high-up positions |
18:27 |
segfault22 |
not "us" as in you and me |
18:27 |
segfault22 |
and the other people who use the game, and are stuck as "underlings" while the high-ups do as they please to our fragile world |
18:28 |
segfault22 |
maybe we should port minetest's Lua API to Cobol and make a fork |
18:28 |
agaran |
don't get on that topic.. we might agree and nothing will change anyway, better to do thing you can affect actually.. |
18:30 |
segfault22 |
well I guess I'll just have to handle the case where debug.getinfo().name returns nil as well as the case debug.getinfo() itself returns nil and would cause an error if you try to get the .name field |
18:31 |
agaran |
.name can be nil if node got wiped out from memory I guess.. |
18:31 |
segfault22 |
2x the code, 1x the intended return value |
18:34 |
segfault22 |
it's okay if debug.getinfo().name returns nil because I invented a way to catch that, but if debug.getinfo() itself returns nil, attempting to fetch the .name field causes an error because debug.getinfo() = nil and nil doesn't have a .name field |
18:35 |
agaran |
can't you just local dinfo = debug.getinfo() if dinfo and dinfo.name..... ? |
18:37 |
segfault22 |
yeah, something like that |
18:38 |
segfault22 |
I was thinking, "if debug.getinfo(n) = nil then calling_function = "main" elseif debug.getinfo(n).name = nil then calling_function = "main" else calling_function = debug.getingo(n).name end" |
18:38 |
segfault22 |
damn keybpoardsfdgeugtfeuihfkhqgrwjuejhnbioe |
18:39 |
rubenwardy |
ew perl |
18:39 |
|
Darcidride joined #minetest |
18:39 |
agaran |
I saw note somewhere to not use =nil, but instead if value, also this way you call few times debuginfo.. |
18:40 |
segfault22 |
? |
18:40 |
agaran |
rubenwardy: I like it :-) |
18:40 |
agaran |
segfault22: to not do if a = nil then foo() end but do if a then foo() end |
18:40 |
rubenwardy |
local info = debug.getinfo(3); info_name = info and info.name |
18:41 |
agaran |
rubenwardy: heh, I forget that you can use this way and as sort of terenary operator.. |
18:41 |
rubenwardy |
also, == nil |
18:42 |
rubenwardy |
also, not x |
18:42 |
segfault22 |
oh, so "if debug.getinfo(n) then if debug.getinfo(n).name then calling_function = debug.getinfo(n).name else calling_function = "main" end else calling_function = main end" |
18:42 |
agaran |
you know what I mean.. |
18:43 |
segfault22 |
I can't use the whole table returned by debug.getinfo(n); I just need the string for the .name field |
18:43 |
rubenwardy |
segfault22, https://gist.github.com/rubenwardy/6610c533777c59330407817e0cb30370 |
18:44 |
|
raingloom joined #minetest |
18:44 |
segfault22 |
yeas I did mean "main" sorry |
18:44 |
rubenwardy |
you shouldn't call debug.getinfo(n) multiple times, really |
18:45 |
segfault22 |
"main" is just a placeholder string for the case when the calling function is nil and the rare case when the called function is also nil; it should probably be something else, like "unknown", but idk |
18:46 |
rubenwardy |
I understand |
18:46 |
rubenwardy |
that's what I guessed |
18:47 |
segfault22 |
Okay, maybe I should do something like "local info = debug.getinfo() if info == nil then calling_function = "main" elseif info.name = nil then calling_function = "main" else calling_function = info.name end" |
18:47 |
rubenwardy |
ew |
18:47 |
rubenwardy |
just use my code |
18:47 |
segfault22 |
but you said I shoudn't call debug.getinfo(n) multiple times |
18:48 |
rubenwardy |
"and" isn't that readable, so maybe use if info then return info.name or "main" else return "main" end |
18:48 |
rubenwardy |
I CALLED IT ONCE |
18:48 |
rubenwardy |
https://gist.github.com/rubenwardy/6610c533777c59330407817e0cb30370#file-sdsd-lua-L4 |
18:48 |
segfault22 |
oh you put "instead of" |
18:49 |
|
NoNamesLeft_ joined #minetest |
18:50 |
segfault22 |
I thought you knew I can't use debug.getinfo(n) or debug.getinfo(n).name if either are nil; the goal is to REPLACE either of those with a place-holder string if they return nil, otherwise just use the valid string from debug.getinfo(n).name |
18:50 |
segfault22 |
Maybe I didn't make it clear enough |
18:51 |
|
xeranas joined #minetest |
18:51 |
segfault22 |
basically your code at the end does "return nil and nil or "main"" if debug.getinfo(n) is nil or if debug.getinfo(n).name is nil |
18:51 |
segfault22 |
sorry |
18:52 |
rubenwardy |
for god's sake, learn lua |
18:52 |
rubenwardy |
"a" and "b" returns "b" |
18:52 |
rubenwardy |
"a" or "b" returns "a" |
18:52 |
rubenwardy |
nil or "b" returns "b" |
18:54 |
segfault22 |
So the "and" keyword has different functions for different context... what a hack |
18:54 |
rubenwardy |
http://hisham.hm/2011/05/04/luas-and-or-as-a-ternary-operator/ |
18:55 |
segfault22 |
Lua really is hipster |
18:55 |
rubenwardy |
nope, and always work like that |
18:55 |
rubenwardy |
Javascript does the same thing |
18:55 |
rubenwardy |
because true and true returns true |
18:56 |
segfault22 |
so any value that is not nil or false is also true? wtf |
18:56 |
Calinou |
is 0 true in Lua? |
18:56 |
segfault22 |
a number shouldn't be a boolean |
18:56 |
rubenwardy |
yeah, if "blehbleh" then |
18:57 |
rubenwardy |
> if 0 then print("true") else print("false") end |
18:57 |
rubenwardy |
true |
18:59 |
rubenwardy |
tbf, I don't like "and" very much |
19:03 |
segfault22 |
Your code appears to catch the case that debug.getinfo(n) is nil as well as when debug.getinfo(n).name is nil... HOWEVER, it fails to catch the condition when debug.getinfo(n).name is a valid string value. "for god's sake learn lua" huh? |
19:04 |
rubenwardy |
.... |
19:04 |
segfault22 |
Now go test it and see if I'm wrong |
19:04 |
rubenwardy |
> info = {name="bleg"}; print(info and info.name or "main") |
19:04 |
rubenwardy |
bleg |
19:06 |
rubenwardy |
anyway, sorry for snapping :P |
19:08 |
|
raingloom joined #minetest |
19:19 |
segfault22 |
Regardless, there is a fault, though it isn't really important: "return info and info.name or "main"" may return a table if info.name is nil or false but info isn't nil or false - this usually shouldn't happen, because you would expect the table "info" to have a .name field if it is not nil or false; but it is possible, and in that case it will cause a crash later if an attempt is made to concatenate the returned value (in this case, a table) as a |
19:19 |
segfault22 |
string value. |
19:22 |
rubenwardy |
> local info={}; print(info and info.name or "main") |
19:22 |
rubenwardy |
main |
19:22 |
|
Markow joined #minetest |
19:24 |
|
lumidify joined #minetest |
19:25 |
segfault22 |
That appears to be so when I run it, but it contradicts the explanation for how OR works because the table, first argument, is true, yet it eturns the second argument. it should only return the second argument when the first is false. |
19:26 |
segfault22 |
I'm done fooling with hack code; I'll make something more reliable and human-readable, even if it is technically taking longer to process. bye |
19:28 |
rubenwardy |
not that he'll see this, but it runs like (info and info.name) or "main", so if the brackets return nil then it will return "main" |
19:32 |
rubenwardy |
also, hacks are things that run on an unstable base - this is literally using a language feature |
19:33 |
|
raingloom joined #minetest |
19:34 |
rubenwardy |
run on an unstable base -> makes the code unstable, inefficient, or hard to read, or the logic is floored |
19:34 |
rubenwardy |
*flawed |
19:41 |
agaran |
readability can be questionable as long as it is stable/efficient and properly working |
19:46 |
rubenwardy |
Well, code should be maintainable above efficient imo |
19:46 |
|
Passant joined #minetest |
19:47 |
rubenwardy |
Well, |
19:47 |
rubenwardy |
If the code is O(FMG) then maybe that doesn't apply |
19:47 |
Passant |
hellooo everyone! is it possible to create a permanent particlespawner wich is visivble for every player and also for new joined players? |
19:48 |
Passant |
*which is visible |
19:48 |
rubenwardy |
I personally find return a and b or c easier to read a bigger if statement doing the same thing |
19:52 |
agaran |
rubenwardy: well.. :) |
19:58 |
|
swift110 joined #minetest |
19:59 |
|
davisonio joined #minetest |
20:00 |
|
swift110 joined #minetest |
20:05 |
|
segfault22 joined #minetest |
20:05 |
|
Ronsor joined #minetest |
20:07 |
|
alkotob joined #minetest |
20:08 |
segfault22 |
rubenwardy: just to clarify, when I said I don't care, I mean I don't care if you want to apologize because it doesn't really matter - you don't just say something on accident without actually believing it is so. I do care if you're having some kind of trouble in life, because I would not wish that on anyone really. At least, not anyone who isn't in with/working with the people trying to destroy civilization by wasting our abundant resources into p |
20:08 |
segfault22 |
ollution and the like |
20:09 |
segfault22 |
you're not a GCer, if you were then you would be too rich to be having anything to do with this game in the first place |
20:09 |
segfault22 |
none of the people here are, most likely |
20:10 |
Calinou |
agaran: "computer time is cheap, human time is not" |
20:10 |
Calinou |
that's IT motto pretty much |
20:11 |
|
lisacvuk joined #minetest |
20:26 |
APNG |
computer time is cheap... |
20:26 |
APNG |
chinese time is cheaper |
20:26 |
APNG |
(note that I don't condone such behaviour) |
20:27 |
APNG |
<rubenwardy> If the code is O(FMG) then maybe that doesn't apply |
20:27 |
APNG |
don't you mean O(MFG)? |
20:33 |
|
davisonio joined #minetest |
20:34 |
|
DMackey joined #minetest |
20:40 |
|
FirePowi joined #minetest |
20:44 |
sofar |
neat, I just ran minetest on a Minnowboard Max at 1080p |
20:45 |
APNG |
a what? |
20:45 |
sofar |
http://wiki.minnowboard.org/MinnowBoard_MAX |
20:46 |
APNG |
oh cool |
20:48 |
|
powi_ joined #minetest |
20:50 |
|
FirePowi joined #minetest |
20:53 |
agaran |
sofar: ethernet is native or usb-ethernet? |
20:53 |
sofar |
native ethernet |
20:53 |
sofar |
2 usb ports, sata port, micro hdmi (all native) |
20:57 |
agaran |
nice |
21:03 |
|
DMackey- joined #minetest |
21:05 |
|
AntumDeluge joined #minetest |
21:12 |
|
whitephoenix joined #minetest |
21:20 |
Ronsor |
https://forum.minetest.net/viewtopic.php?f=10&t=15403&p=231067#p231067 |
21:51 |
|
DMackey joined #minetest |
21:55 |
|
Megaf joined #minetest |
22:01 |
rubenwardy |
yeah, APNG, O(MFG) |
22:03 |
Ronsor |
APNG? |
22:03 |
APNG |
rubenwardy, yes, O(MFG) code is bad |
22:04 |
APNG |
at least it's not O(unbounded) |
22:05 |
APNG |
https://en.wikipedia.org/wiki/Bogosort |
22:05 |
APNG |
"Worst case performance Unbounded (randomized version)" |
22:06 |
rubenwardy |
true |
22:12 |
|
DMackey- joined #minetest |
22:22 |
HoloIRCUser2 |
Hello |
22:23 |
|
rubenwardy joined #minetest |
22:25 |
sofar |
hi |
22:27 |
|
Ronsor joined #minetest |
22:29 |
|
xunto joined #minetest |
23:02 |
|
Void7 joined #minetest |
23:02 |
|
est31 joined #minetest |
23:18 |
|
AntumDeluge joined #minetest |
23:26 |
|
kaeza joined #minetest |
23:26 |
kaeza |
Greetings. |
23:46 |
|
swift110 joined #minetest |
23:49 |
|
swift110 joined #minetest |
23:53 |
|
DMackey joined #minetest |
23:59 |
|
Makyuu joined #minetest |