Minetest logo

IRC log for #minetest-docs, 2022-01-02

| Channels | #minetest-docs index | Today | | Google Search | Plaintext

All times shown according to UTC.

Time Nick Message
00:00 MTDiscord <Jonathon> coughs in ?remindme
00:00 MTDiscord <Benrob0329> I guess I can do that now, it won't touch my current file
00:02 MTDiscord <Benrob0329> once again, Github's preview won't respect the include but the VSC extension does
00:04 MTDiscord <Benrob0329> Any objections to #9?
00:05 MTDiscord <Benrob0329> @wsor
00:05 MTDiscord <Jonathon> yes yes, im getting there patience
00:05 MTDiscord <Jonathon> done
00:06 MTDiscord <Benrob0329> ?
00:17 MTDiscord <luatic> I'm starting to doubt that grouping is of any use
00:18 MTDiscord <luatic> hmm, well it probably is
00:18 MTDiscord <luatic> but the current example sucks
00:21 MTDiscord <josiah_wi> Assigning things to groups is useful for recipes that accept any type of wool for example.
00:21 MTDiscord <luatic> lol I'm speaking of texmod grouping
00:21 MTDiscord <josiah_wi> Ah.
00:22 MTDiscord <luatic> Very WIP: https://github.com/minetest/minetest_docs/pull/10
00:23 MTDiscord <luatic> Texture Modifiers are a hot mess as I have said
00:25 MTDiscord <Benrob0329> I'll take a look at that after I finish vector
00:26 MTDiscord <luatic> take only a brief look / glance, as said, very WIP
05:00 MTDiscord joined #minetest-docs
09:21 MTDiscord joined #minetest-docs
09:57 MTDiscord <j45> morning
10:30 MTDiscord <Sublayer plank> good morning
10:30 MTDiscord <j45> is there anything (relatively)simple that i could start documenting?
10:37 appguru joined #minetest-docs
11:09 MTDiscord <j45> btw, given the license, are we allowed to copypasta phrases from lua_api.txt ?
11:15 MTDiscord <exe_virus> No copypasta, don't even bother reading lua_api.txt
11:16 MTDiscord <exe_virus> The plan is to read the source code directly and document that. Plus then it'll be documented better ?
11:16 MTDiscord <exe_virus> If we read from source, then our documentation is a transformative work, and therefore not subject to copyleft derivative issues
11:27 MTDiscord <j45> ^
11:36 MTDiscord <j45> am i correct in saying all the things in https://github.com/minetest/minetest/blob/master/src/object_properties.h#L31-67 are in the lua api?
11:55 MTDiscord <luatic> adoc == Storage options  === Key-value store  ==== Configuration files  The `Settings` object allows you to operate on configuration files, getting & setting key-value entries and saving the file. The main `Settings` object `minetest.settings` can be used to persist a few settings "globally" - bleeding everywhere. This is horribly abused by the mainmenu to store stuff like the last selected game. Don't be like the mainmenu.
11:55 MTDiscord Configuration files are presumably easy to edit for users, but so is Lua.  slightly opinionated :trollface:
11:55 MTDiscord <j45> :trollface:
12:10 MTDiscord <j45> i have been reading the source code for a while and i already regret signing up to this
12:17 MTDiscord <j45> hmmm https://github.com/minetest/minetest/blob/master/src/script/common/c_content.cpp#L196-L204 isnt hp_max only meant to be for players?
12:39 MTDiscord <luatic> well, yes, but both players and objects have it
12:39 MTDiscord <luatic> objects just don't care
12:39 MTDiscord <j45> ahh i see
13:09 MTDiscord <j45> "automatic_face_movement_max_rotation_per_sec" lmao why is that so long
13:52 MTDiscord <luatic> Also document the overall format (table that is indexed; additional keys don't matter; __index metamethod is supported)
13:53 MTDiscord <j45> Sure thing
13:55 MTDiscord <luatic> It is nice that you are documenting the value ranges
14:25 MTDiscord <josiah_wi> I did read the API file to enumerate field names, which I can then use as keywords for searching engine code quickly. The problem would be if there are fields that aren't documented at all, but I kind of doubt it.
14:27 MTDiscord <josiah_wi> j45 if you want to work together on whatever you started on I'd be interested, since I don't mind reading engine code and it sounds like you don't particularly savor it.
14:27 MTDiscord <j45> sure
14:27 MTDiscord <luatic> Just edit https://github.com/minetest/minetest_docs/pull/12
14:27 MTDiscord <j45> ^
14:28 MTDiscord <josiah_wi> I will get started as soon as I get back from church.
14:29 MTDiscord <j45> also i completely forgot about examples so we will need to add those, and, as luatic mentioned, how to format the table overall
14:42 ROllerozxa asciidoc tables are really cool and more advanced than markdown, but the source text still ends up a mess... :/
14:43 ROllerozxa I've been writing a page about the file formats (images and models mostly) the engine supports and structured it as a table
14:45 MTDiscord <luatic> ooh nice
14:48 ROllerozxa so the table contains, for instance with images, if they can be programmatically encoded/decoded by the engine either built-in or with a third-party library, and then there's a list of libraries below categorized by format below the table
14:49 MTDiscord <luatic> sounds nice, waiting for your PR - are you classifying how much of a file format is supported?
14:49 MTDiscord <luatic> we only support part of obj, for instance (no mtl or curved surfaces)
14:51 ROllerozxa hm, yeah, I was thinking that for models there should be two columns for whether it supports static or animated models of said format, but there maybe should be more in addition to that
14:51 ROllerozxa wait is it models or meshes? not much of a modeler, haven't dabbled much in it
14:52 ROllerozxa a model can have several meshes right
14:57 MTDiscord <luatic> We use "model" and "mesh" interchangeably here AFAIK
14:57 MTDiscord <luatic> How can I link a section in AsciiDoc?
15:22 ROllerozxa like, linking to headers in the same document?
15:22 MTDiscord <luatic> yeah
15:41 ROllerozxa looks to be done with anchors. invisible element denoted with [[square-brackets]] using an ID you then reference with <<angle brackets>> from what I can tell in the asciidoc cheatsheet
15:42 ROllerozxa https://powerman.name/doc/asciidoc#anchor-1 some more info
15:47 MTDiscord <luatic> BTW the AsciiDoc docs use Antora too
15:50 MTDiscord <Benrob0329> https://docs.asciidoctor.org/asciidoc/latest/macros/inter-document-xref/
15:52 MTDiscord <luatic> @Benbob0329 could you finish up the vector PR?
15:54 MTDiscord <Benrob0329> I can later today, I'll be busy throughout the afternoon though.
15:55 MTDiscord <luatic> alright
16:08 appguru1 joined #minetest-docs
17:11 MTDiscord <Jonathon> https://github.com/minetest/minetest/pull/11918
17:44 appguru Alright, we should open a "document facedir" issue?
17:44 appguru Although I consider it rather intuitive...
17:45 appguru You have an axis and an angle. The angle must be a multiple of 90°, the axis must be +/-XYZ
17:53 MTDiscord <josiah_wi> Back.
18:25 MTDiscord <j45> oh my thanks for pointing this out i need to start drinking coffee
18:25 MTDiscord <j45> https://cdn.discordapp.com/attachments/926231483155378176/927266298692505700/unknown.png
18:25 MTDiscord <josiah_wi> I'm making some fairly large changes to the doc BTW.
18:25 MTDiscord <josiah_wi> So expect merge conflicts might show up if anything changes.
18:26 MTDiscord <j45> are you fixing the things appguru pointed out in my PR?
18:26 MTDiscord <josiah_wi> Does anyone know whether I can use an attribute as part of another attribute? I'm trying to sequentially "build" URLs and the way I'm doing it isn't working.
18:26 MTDiscord <j45> i am too but if u are, ill leave it
18:26 MTDiscord <josiah_wi> No, j45, I'm changing the way data types are documented, and I included the header so that INFO blocks show up correctly etc.
18:27 MTDiscord <luatic> @j45 why don't you review https://github.com/minetest/minetest_docs/pull/14 so I can hit the shiny merge button?
18:28 MTDiscord <josiah_wi> I have for example :new-url: {base-url}/something/extra and then I do {new-url}/more-extra, but the result doesn't display as expected.
18:28 MTDiscord <j45> i had a quick look at it earlier
18:28 MTDiscord <j45> i dont know much about VoxelArea but LGTM
18:28 MTDiscord <j45> ill say that in the pr to avoid confusion later on
18:29 MTDiscord <j45> you want to hit it or should i?
18:29 MTDiscord <luatic> hmm, maybe wait, I want to elaborate a bit
18:30 MTDiscord <j45> sure
18:32 MTDiscord <luatic> alright, done
18:33 MTDiscord <luatic> now you can hit the merge button
18:33 MTDiscord <j45> ok
18:34 MTDiscord <luatic> our docs are growing steadily :)
18:35 MTDiscord <luatic> maybe the pomegranate example should include a "WARNING: if you do not have to use WARNING:, you're doing something wrong, or the engine is surprisingly doing something right"
18:37 MTDiscord <j45> https://github.com/minetest/minetest_docs/pull/12#discussion_r777213272 do you mean when another object (player???) looks at it?
18:38 MTDiscord <luatic> when a player points at it, they will be shown the infotext
18:38 MTDiscord <j45> ok ty
18:38 MTDiscord <luatic> pointing != looking though
18:38 MTDiscord <luatic> pointing uses selection boxes and is limited in range through the current tool
18:40 MTDiscord <luatic> I wonder when the docs team will notice that I have been sneaking in tiny fixes without opening PRs
18:46 MTDiscord <j45> lol
18:46 MTDiscord <j45> anyways, time to monospace all properties welp
18:58 MTDiscord <j45> https://github.com/minetest/minetest_docs/pull/12#discussion_r777243048
19:00 MTDiscord <josiah_wi> I had to eat lunch. Time to resume work.
19:00 MTDiscord <josiah_wi> Whoops, hobby*, it's Sunday. ?
19:01 MTDiscord <j45> xD
19:02 MTDiscord <josiah_wi> Are you monospacing the properties? I'll avoid changing that then.
19:02 MTDiscord <j45> yea i have pushed that already
19:06 MTDiscord <josiah_wi> OK, hopefully I don't have merge conflicts.xD
19:06 MTDiscord <j45> yea those will be annoying lmao
19:12 MTDiscord <josiah_wi> OK, my only issue now is the URLs.
19:13 MTDiscord <josiah_wi> Aand merge conflicts!
19:13 MTDiscord <josiah_wi> I warned you. ?‍♂️
19:14 MTDiscord <josiah_wi> I have to merge every single property now.
19:14 MTDiscord <josiah_wi> Every single one.
19:15 MTDiscord <josiah_wi> I'm also confused about where these blocks are supposed to start and stop.
19:16 MTDiscord <josiah_wi> What's the purpose of the ======= blocks?
19:17 MTDiscord <josiah_wi> @j45
19:17 MTDiscord <josiah_wi> Well bruh, some stuff is even out of order.
19:17 MTDiscord <josiah_wi> IDK if this is worth merging. I might just redo my work.
19:19 MTDiscord <josiah_wi> Ohh the ==== stuff was put in by git.
19:19 MTDiscord <Benrob0329> A block delimited by ==== on the top and bottom is an example block
19:19 MTDiscord <josiah_wi> Yeah, everything here is out of order.
19:19 MTDiscord <josiah_wi> And I do not know how to copy paste in vim.
19:20 MTDiscord <Benrob0329> d == delete/cut, y == yank/copy, p == paste iirc
19:21 MTDiscord <Benrob0329> Again, I use kak these days (except now I'm finding VSC's preview plugin really nice) so my Vim knowledge is a bit faded
19:22 MTDiscord <josiah_wi> ?
19:22 MTDiscord <josiah_wi> Ohh I remember now, I can yank a specific amount.
19:23 MTDiscord <Benrob0329> You can also double tap to get the current line, or use visual mode
19:23 MTDiscord <josiah_wi> This isn't a very powerful computer, and I feel very at home on the command line.
19:24 MTDiscord <josiah_wi> IDEs have a lot of setup required that I haven't learned.
19:24 MTDiscord <Benrob0329> I get that, I might add a save hook to generate an asciidoc in /tmp to make previewing easier
19:26 MTDiscord <Benrob0329> Then again, I like having a file tree and git overview
19:28 MTDiscord <Benrob0329> https://github.com/minetest/minetest/pull/11919
19:28 MTDiscord <Benrob0329> We're helping ?
19:35 MTDiscord <josiah_wi> OK, finally pushed.
19:37 MTDiscord <josiah_wi> @Benbob0329 If you look at the very top of the properties documentation you can see that one of the links is bad.
19:37 MTDiscord <josiah_wi> Any idea how I can fix it?
19:38 MTDiscord <Benrob0329> Don't make it a URL macro?
19:38 MTDiscord <Benrob0329> ie, remove the trailing []
19:39 MTDiscord <josiah_wi> That was accidentally left in, but it didn't work without that either.
19:39 MTDiscord <Benrob0329> Also don't expect GitHub to make any preprocessor stuff work right
19:39 MTDiscord <Benrob0329> GitHub previews are pretty much as-is and nothing more
19:40 MTDiscord <josiah_wi> I ain't lookin' at GitHub sir.
19:40 MTDiscord <josiah_wi> I'm testing all of this in my browser during development.
19:40 MTDiscord <josiah_wi> So I see exactly how it renders.
19:40 MTDiscord <Benrob0329> Browser plugin or running asciidoctor?
19:40 MTDiscord <josiah_wi> AsciiDoctor.
19:41 MTDiscord <Benrob0329> Alright, well I'm on my phone right now so I'll take a closer look later
19:41 MTDiscord <Benrob0329> Back to moving snow for now
19:41 MTDiscord <josiah_wi> https://cdn.discordapp.com/attachments/926231483155378176/927285509313658961/unknown.png
19:41 MTDiscord <josiah_wi> OK, talk later then.
19:43 MTDiscord <josiah_wi> Ugh, I had messed something up with the config lol.
19:43 MTDiscord <josiah_wi> Sorry about that.
19:47 MTDiscord <josiah_wi> I also notice that there's no table of contents.
19:49 MTDiscord <josiah_wi> Fixed.
19:49 MTDiscord <josiah_wi> I'm going to take a break. ? I'll load up the engine code though so I'm ready to read through it.
19:50 MTDiscord <josiah_wi> Hehehe, default max HP is 0. ?
20:17 loggingbot_ joined #minetest-docs
20:35 loggingbot_ joined #minetest-docs
20:49 MTDiscord <j45> *is ?
20:53 MTDiscord <Jonathon> ignore aboce
20:54 MTDiscord <Jonathon> what is our policy on csm documentation? do we include it, dont, seperate files, etc?
20:55 MTDiscord <j45> IMO for now we dont document as we have so many other things to do but possibly in the future
20:55 MTDiscord <Jonathon> i think its easier to include it in the respective topics
20:57 MTDiscord <Benrob0329> Luatic mentioned things that weren't in the client API for the environment doc
20:58 MTDiscord <Jonathon> so mentioning csm specifics is ok?
21:00 MTDiscord <Benrob0329> Sure, we can always decide to separate it out later
21:00 MTDiscord <Jonathon> i mean im documenting modchannels, so its kinda stupid in my opinion to not include it
21:02 MTDiscord <Jonathon> also @Luatic https://github.com/wsor4035/minetest_docs/blob/modchannels/doc/environment.adoc?plain=1#L244 is broken in github rendering at least
21:03 MTDiscord <Benrob0329> GitHub is just being stupid
21:03 MTDiscord <Benrob0329> It won't apply the preprocessor macros properly
21:04 MTDiscord <Benrob0329> Someone should probably make an issue about allowing in-repo include:: macros
21:12 MTDiscord <Benrob0329> alright, I'm free for a bit now
21:13 MTDiscord <Benrob0329> Sidenote, we should probably link to the appropriate source file(s) in the docs
21:20 MTDiscord <j45> im gonna stop for today, #12 is somewhat near done (i hope i can finish it tmr :D)
21:20 MTDiscord <j45> *near completion
21:21 MTDiscord <Jonathon> isnt this supposed to be more api documentation for game/mod creators than engine documentation?
21:22 MTDiscord <Benrob0329> Yes, but linking the relevant source code can still be helpful.
21:42 MTDiscord <j45> ^Yea, i think we should link the relevant lua_api.txt line and engine code either at the top or bottom of each page
21:43 MTDiscord <Benrob0329> I don't know about lua_api.txt (if we're doing our job right we're providing better info than it) but a github link at the top pointing to the relevant file is simple enough
21:50 MTDiscord <j45> I think it would be good to link lua_api.txt untill later on, when this is more complete and reliable
21:51 MTDiscord <Jonathon> lua api.txt is a moving target, source files not so much
22:06 MTDiscord <Benrob0329> @Luatic This would be the "correct" way to write the vector length equation in AsciiMath? tan^-1(|bar a xx bar b|, bar a * bar b)
22:09 MTDiscord <luatic> what
22:09 MTDiscord <luatic> whis there an atan
22:09 MTDiscord <luatic> why is*
22:09 MTDiscord <Benrob0329> lua function vector.angle(a, b)     local dotp = vector.dot(a, b)     local cp = vector.cross(a, b)     local crossplen = vector.length(cp)     return math.atan2(crossplen, dotp) end
22:10 MTDiscord <Benrob0329> I probably shouldn't assume the implementation is equivalent when I don't know the formula off the dop of my head
22:10 MTDiscord <luatic> what the cinnamon toast fuck
22:10 MTDiscord <luatic> angles are usually implemented over only the dot product
22:11 MTDiscord <luatic> because that is dot(a, b) = cos(angle between a and b) |a| |b|
22:11 MTDiscord <luatic> so you have dot(a, b) / |a| / |b| = cos(angle between a and b)
22:11 MTDiscord <luatic> then you just do acos to obtain angle = acos(dot(a, b) / |a| / |b|)
22:12 MTDiscord <luatic> this looks like a different, less efficient formula
22:12 MTDiscord <Benrob0329> Remind me to watch that kahn academy video on trig sometime so that I can suck less at it
22:12 MTDiscord <luatic> instead of computing the length of both vectors, it uses the cross product?
22:12 MTDiscord <Benrob0329> anyways, do I put in the normal formula, none, or the one the engine actually uses?
22:13 MTDiscord <luatic> hmm, put in the engine formula
22:13 MTDiscord <luatic> I do wonder why it was chosen though, I believe it is slower
22:14 MTDiscord <luatic> OFC the cross product can be used, as it contains the angle as well (in a sin)
22:15 MTDiscord <luatic> https://stackoverflow.com/questions/21483999/using-atan2-to-find-angle-between-two-vectors
22:49 MTDiscord <josiah_wi> Lol, so if you don't specify a breath_max it gets set to 0.
22:49 MTDiscord <josiah_wi> Does that automatically kill you, or does a value of 0 disable breath or something?
22:49 MTDiscord <Benrob0329> those have default settings somewhere I'm pretty sure
22:50 MTDiscord <josiah_wi> Which override the internal defaults?
22:50 MTDiscord <Benrob0329> I wouldn't be supprised
22:50 MTDiscord <josiah_wi> Aren't there objects with these properties that the settings wouldn't apply to?
22:50 MTDiscord <josiah_wi> It'd make sense if the settings applied to the player, ofc.
22:51 MTDiscord <josiah_wi> Like, what happens if I make a mob with a breath_max of 0?
22:51 MTDiscord <Benrob0329> What portion of the API are you looking at? The internal object handling, the Lua functions, or the registration?
22:51 MTDiscord <josiah_wi> I'm looking at object properties.
22:51 MTDiscord <josiah_wi> RN I'm looking at the internal C struct.
22:52 MTDiscord <Benrob0329> make sure that the part exposed to Lua for the registration functions doesn't have it's own defaults
22:52 MTDiscord <josiah_wi> I'm doing that at the same time.
22:52 MTDiscord <Benrob0329> ?
22:52 MTDiscord <josiah_wi> It's basically "If the field exists overwrite the struct field otherwise leave it be."
22:53 MTDiscord <josiah_wi> So the internal struct defaults end up being the actual defaults for the properties.
22:53 MTDiscord <josiah_wi> Which might... be bad, but what can we do about that hehe.
22:53 MTDiscord <josiah_wi> There could be another place where they're initialized to defaults or something.
22:53 MTDiscord <josiah_wi> Finding that will be a pain.
22:54 MTDiscord <josiah_wi> Does it make sense to you to order the fields the same way they're ordered in the source code? Or is that not really helpful.
22:55 MTDiscord <Benrob0329> I suppose that depends, are they ordered in a logical order in the source code?
22:56 MTDiscord <josiah_wi> I would say so. Related properties appear to be grouped together.
22:57 MTDiscord <josiah_wi> And the properties are handled by the API in the same order.
22:58 MTDiscord <Benrob0329> then I'd say keep the source code order
22:58 MTDiscord <josiah_wi> Ah, we already have them in that order actually.
22:58 MTDiscord <josiah_wi> Ours is just a little different because we listed player-only properties separately. ?
22:58 MTDiscord <josiah_wi> I wonder whether that's the best way to do it.
22:59 MTDiscord <josiah_wi> Lol this is hilarious.
23:00 MTDiscord <josiah_wi> I guess it's so that it's enabled if physical is turned on.
23:00 MTDiscord <josiah_wi> Yeah, nevermind.
23:06 MTDiscord <josiah_wi> Oh, stuff is nil by default in Lua.
23:06 MTDiscord <josiah_wi> What does nil end up as in C++?
23:06 MTDiscord <josiah_wi> The defaults in the struct are going to be overwritten by nil I think.
23:06 MTDiscord <Benrob0329> probably null or 0
23:08 MTDiscord <josiah_wi> I'll need to look into this more. I'm not sure either of these functions are actually responsible for setting the properties.
23:08 MTDiscord <josiah_wi> They're just utility functions for once the properties are set.
23:16 MTDiscord <josiah_wi> I'm sorry about the git messup I made, I guess this is why the engine repo squashes commits before merging.
23:16 MTDiscord <Benrob0329> They don't always, it depends
23:17 MTDiscord <josiah_wi> I was messing around with vim and accidentally duplicated the entire file without realizing it.
23:17 MTDiscord <Benrob0329> Honestly I didn't quite catch the whole git snafoo that happened, so I have no idea how much of a pain it was to fix.
23:18 MTDiscord <josiah_wi> I just had to revert a commit and redo it. It's annoying to have that stuff in the commit history, though.
23:18 MTDiscord <Benrob0329> ¯_(ツ)_/¯
23:18 MTDiscord <Benrob0329> reverts happen
23:19 MTDiscord <josiah_wi> I'll check more carefully in the future before committing, even for what I believe to be small changes. Just in case.
23:21 MTDiscord <Benrob0329> Where are you committing to? Should only be into your own fork, and then we merge via PR so that we can catch these things.
23:21 MTDiscord <josiah_wi> I'm committing to j45's branch.
23:21 MTDiscord <Benrob0329> ahh
23:21 MTDiscord <josiah_wi> https://github.com/minetest/minetest_docs/pull/12
23:22 MTDiscord <Benrob0329> if it's on a branch you can always rebase and drop faulty commits
23:22 MTDiscord <Benrob0329> Just don't push until you've made sure it's right ?
23:22 MTDiscord <josiah_wi> True. Maybe we'll do that, I just need to talk to him before doing anything massive.
23:22 MTDiscord <josiah_wi> I would normally just have amended, but I know he's working on the same branch, so I don't want to footshoot us both.
23:23 MTDiscord <Benrob0329> git is the best and worst thing sometimes, having a visual of your changes is super helpful
23:23 MTDiscord <Benrob0329> Anyways, back to documenting vector

| Channels | #minetest-docs index | Today | | Google Search | Plaintext