|
does our resident stan.yaml consider themselves an experienced yaml engineer?
|
# ? Jan 14, 2023 05:03 |
|
|
# ? May 2, 2024 06:44 |
|
no, it's not possible to "engineer yaml" because it is just a markup language. it doesn't do anything by itself person who authored this article is likely just a dumbass although i don't recall that part of it so maybe mocking yaml engineers is the 1 correct thing in it
|
# ? Jan 14, 2023 06:20 |
|
html
|
# ? Jan 14, 2023 06:20 |
|
I updated some appveyor yaml today and it was a breeze. just copy pasted chunks from another project ezpz
|
# ? Jan 14, 2023 06:22 |
|
this guys name is Ruud Van Asseldonk e: I hadn't actually read the article until now and wow that is the dumbest poo poo I ever read Powerful Two-Hander fucked around with this message at 09:51 on Jan 14, 2023 |
# ? Jan 14, 2023 09:46 |
|
a perfectly cromulent Dutch name
|
# ? Jan 14, 2023 09:47 |
|
12 rats tied together posted:what's the difference between the yaml 1.1 schema assuming implicitly that nn:nn is for time, and your ideal scenario here? ????? by “schema” I mean like an xml schema or a json schema. a thing that defines the content for a particular type of document, like what keys are valid and what types their values have. it may be named in the document but ideally the application will know which schema to apply because it’s the one that describes the data the application knows how to use. it may even be generated automatically from the objects being serialised, but if so it will still be provided to the parser to ensure values are parsed correctly, or at least to identify and explain cases where something was not the expected type. yaml per se does not have a schema at all. a document with explicit types like you use has an implicit single-use schema, but that’s worthless for validation because it just describes what’s there, not what *should* be there. use a drat schema, whatever serialisation format you choose.
|
# ? Jan 14, 2023 12:03 |
|
12 rats tied together posted:i have good news for you then, the failsafe schema in yaml 1.2 (2009) only has string, sequence, and mapping Genuinely glad to hear that, but we don't ingest yaml and 3rd party places that do use various incompetent libraries
|
# ? Jan 14, 2023 13:49 |
|
12 rats tied together posted:no, it's not possible to "engineer yaml" because it is just a markup language. it doesn't do anything by itself
|
# ? Jan 14, 2023 14:47 |
|
Bloody posted:I would simply use xml hell yeah brother
|
# ? Jan 14, 2023 15:48 |
|
Powerful Two-Hander posted:this guys name is Ruud Van Asseldonk lol
|
# ? Jan 14, 2023 15:58 |
|
matti posted:lul Fixed
|
# ? Jan 14, 2023 17:26 |
|
Soricidus posted:????? A rare example of a good yaml lib, the crystal stdlib has an entire namespace for interacting with YAML schemas and instructions for registering your own types, in a handy macro. But even PyYAML, widely regarded as absolute dogshit, provides these instructions in the section "Constructors, representers, resolvers", sadly with a much worse API. If your definition of "a schema" is "a file that defines a schema", these absolutely exist in YAML, but they are of course the same thing. How else would an XML parser load additional schema machinery from an xsd file? Is it schema files all the way down?
|
# ? Jan 15, 2023 00:32 |
|
(editing to be more precise) I don't see a user-defined schema used in that crystal-lang url: the other poster is talking about the reverse of: code:
12 rats tied together posted:If your definition of "a schema" is "a file that defines a schema", these absolutely exist in YAML, but they are of course the same thing. How else would an XML parser load additional schema machinery from an xsd file? Is it schema files all the way down? Dijkstracula fucked around with this message at 00:57 on Jan 15, 2023 |
# ? Jan 15, 2023 00:44 |
|
Ultimately, the type that a piece of data should be is not defined by the config file itself - it's defined by what the application intends to do with that data. Sometimes that's explicit in the form of a schema, sometimes that's implicit in that the application will just do the wrong thing if it's not the data type that the application author intended. If you allow your parsing library to choose data types for a parse based on what's in the file being parsed rather than based on what the application intends to do with that data, the only thing you gain is the possibility for type mismatches causing undesired behaviour. There's no upside.
|
# ? Jan 15, 2023 01:20 |
|
Dijkstracula posted:By contrast, here's an example of an XML schema validating a particular class of XML document. Some ways you might produce a file that defines an additional set of types (in yaml: "application specific tags") and restrictions on values for these types would be: json-schema, kwalify, rx, yamale. There are a bunch of others in various levels of popularity. Most of them are not very popular, none of them are YAML in the same way that XSD is not XML. edit: I guess json-schema is pretty popular actually. Jabor posted:Ultimately, the type that a piece of data should be is not defined by the config file itself - it's defined by what the application intends to do with that data. Sometimes that's explicit in the form of a schema, sometimes that's implicit in that the application will just do the wrong thing if it's not the data type that the application author intended.
|
# ? Jan 15, 2023 01:29 |
|
12 rats tied together posted:As the link indicates, this is an XSD file, which is XML that can be interpreted to configure machinery (additional types, and restrictions on values for those types) for other XML documents. There used to exist other ways of validating XML than XSD, some of them might even be around still.
|
# ? Jan 15, 2023 01:31 |
|
12 rats tied together posted:`<first-name>Benjamin</first-name>' and '!first-name Benjamin'. Why is one of these bad and one of them is good? Do you actually think those are equivalent in how they're used?
|
# ? Jan 15, 2023 01:34 |
|
Dijkstracula posted:this is fine but I don't think it's invalidating anything we're saying
|
# ? Jan 15, 2023 01:38 |
|
there's a turtle underneath your turtle and just because you stopped looking at this one does not make it the bottom
|
# ? Jan 15, 2023 01:43 |
|
Jabor posted:Do you actually think those are equivalent in how they're used? If OPs assertion was "the way that yaml is typically abused by morons and the freedom of the grammar that enables it, is bad" I would have simply posted the emoji.
|
# ? Jan 15, 2023 01:48 |
|
12 rats tied together posted:As the link indicates, this is an XSD file, which is XML that can be interpreted to configure machinery (additional types, and restrictions on values for those types) for other XML documents. There used to exist other ways of validating XML than XSD, some of them might even be around still. the equivalent yaml to <first-name>Benjamin</first-name> is ‘first-name: Benjamin’. in both cases that is how you represent the value ‘Benjamin’ being assigned to the first-name field. idk how the hell ‘!first-name Benjamin’ would be used. do you really have a dedicated first-name type that can be used for any value of any field?
|
# ? Jan 15, 2023 15:10 |
|
https://github.com/marciniuk/undertale/blob/master/scripts/SCR_TEXT.gml
|
# ? Jan 16, 2023 17:28 |
|
oof thats like the code i wrote when i was 12
|
# ? Jan 16, 2023 20:16 |
|
Carthag Tuek posted:oof thats like the code i wrote when i was 12 game maker is a truly horrible language. it's like it's designed by someone who'd only ever used javascript, but didn't really understand even that.
|
# ? Jan 16, 2023 20:30 |
|
that's "decompiled" code and not actually the code in its original form. the giant switch is it packing all of the separately editable screens into a state machine and all the magic numbers were hopefully named constants
|
# ? Jan 16, 2023 20:48 |
|
|
# ? Jan 16, 2023 21:01 |
|
Soricidus posted:the equivalent yaml to <first-name>Benjamin</first-name> is ‘first-name: Benjamin’. in both cases that is how you represent the value ‘Benjamin’ being assigned to the first-name field. no, i was being terse, if i were to reproduce the XSD example i would have !bookstore probably. i used to work on a video game that has "what happens when someone uses an ability" expressed in a 200k LoC switch case statement. i dont recall the case count because it was "case skill_id" and the skill_ids had a firewall-rule-like system where ids 0 through 16k were reserved for patch 1, and so on games are moments away from falling apart basically all the time. even the ones that look like they arent
|
# ? Jan 16, 2023 21:27 |
|
i have bad news about how the sausage is made lads
|
# ? Jan 16, 2023 23:27 |
|
tef posted:i have bad news about how the sausage is made lads yeah the casing is pretty gross
|
# ? Jan 17, 2023 00:07 |
|
I only use artificial sausage cases to test my spaghetti code
|
# ? Jan 17, 2023 00:29 |
|
mystes posted:I only use artificial sausage cases to test my spaghetti code drake no: mockFoobar drake yes: impossible™Foobar
|
# ? Jan 17, 2023 05:13 |
|
i thought it was widely well known that many game code bases are horrors because a lot of it gets generated by (usually custom, but sometimes game maker and unity) tooling
|
# ? Jan 17, 2023 17:38 |
|
Who cares if undertales code is bad. It’s a good game.
|
# ? Jan 17, 2023 17:42 |
|
Share Bear posted:i thought it was widely well known that many game code bases are horrors because a lot of it gets generated by (usually custom, but sometimes game maker and unity) tooling it's because indie/small dev games are developed experimentally, regularly testing out new ideas and chunks. so investing in a big "correct" architecture ends up being a huge time sink, even though random people can look at the final process and go "i could do it neater than that" i mean, so could the gamedev, if they knew they were going to write that in the first place. the other thing is that games are rolled up like a big ball of mud. what starts as a two condition switch for events turns into a hundred as things get added to the game, and there really isn't much benefit to cleaning it up. when the game's done, you move on. it's only when people write their own engines that the tradeoff for better code up front makes any sense well, it would if the people who write game engines ever get around to writing a game
|
# ? Jan 17, 2023 17:51 |
|
FlapYoJacks posted:Who cares if undertales code is bad. It’s a good game. 10x programmer spotted
|
# ? Jan 17, 2023 17:52 |
|
tef posted:it's because applications are developed experimentally, regularly testing out new ideas and chunks. so investing in a big "correct" architecture ends up being a huge time sink, even though random people can look at the final process and go "i could do it neater than that"
|
# ? Jan 17, 2023 17:56 |
|
tef posted:
It'd be awesome if Epic made a single player game to show off their awesome engine. Maybe they could even name the game after the engine?
|
# ? Jan 17, 2023 17:56 |
|
I bet it would take them about a fortnite
|
# ? Jan 17, 2023 18:01 |
|
|
# ? May 2, 2024 06:44 |
|
if you work at a place that has their own engine where they've done it "right" the engine will be so much code that you can't possibly check it all out at the same time or understand more than a fifth of it at once. also they wont have done it all right, some of it will be wrong, and other parts of it will be a different, mutually exclusive type of wrong
|
# ? Jan 17, 2023 18:03 |