Chat Logs

  1. * kathadris joined #java
  2. * graves joined #java
  3. * kcomhnall joined #java
  4. * szkl joined #java
  5. dreamrealXML is not slow to parse
  6. dreamrealnor does it use a lot of memory
  7. dreamrealit *can* but it doesn't unless you choose options to create that situation (slow to parse is harder to do: it's pretty quick to parse. But you CAN make it chew through a TON of memory.)
  8. dreamrealAnd as far as a DTD/XSD... eh, free-form can have value, but you really see it pay off with a DTD/XSD if you need to know the structure is compliant
  9. cheeserkneel before xom!
  10. jreicherIn all seriousness, is it still XML if there's no schema? I'm interested in the "philosophical" aspect of that.
  11. dreamrealXOM is quite good
  12. dreamrealjreicher: sure
  13. dreamrealit's still structured, still walkable, still graphable, just not compliant with a known structure
  14. * kcomhnall joined #java
  15. * michele8 joined #java
  16. * LtHummus joined #java
  17. * kcomhnall joined #java
  18. * kcomhnall joined #java
  19. * unit86 joined #java
  20. * kcomhnall joined #java
  21. deebowe used to run several companies ecommerce on xml + xslt integrations, it's fast enough :)
  22. deebodid you know you can do jdbc in xslt!
  23. * unit86 joined #java
  24. * acidjnk joined #java
  25. * unit86 joined #java
  26. * kcomhnall joined #java
  27. * MinusSeven joined #java
  28. * fed-kaczynski_ joined #java
  29. * gjvc joined #java
  30. * xdminsy joined #java
  31. * tomboy64 joined #java
  32. * Inline joined #java
  33. * MikeBux joined #java
  34. * jreicher joined #java
  35. * gjvc joined #java
  36. ParaXML compresses really well, btw.
  37. * X-Scale joined #java
  38. jreicherNot necessarily a point in its favour, you know. :p
  39. dreamrealSure, but it's not one NOT in its favor: if you're trying to put down XML, it's not difficult to do. It IS very verbose; DOM sucks but makes sense in context; namespaces are great, *verifiability* is great, encoding is still textual in nature for the most part
  40. jreicherHonestly, I do not hate XML at all. But I wonder why it's both a serialisation format and... other things.
  41. dreamrealWhat do you mean? It's a serialization format because it contains regular data that can be annotated, verified, and expanded upon with namespaces.
  42. jreicherIn all honesty I'm not sure I know what I mean. If it's only serialisation, why would it need a schema?
  43. dreamrealRight. But it's not: it's an extensible markup language, which is where "XML" in the name comes from
  44. jreicherI've always really struggled to wrap my head around the part the schema plays. I have some thoughts, but it never seems to be what people do.
  45. jreicherWell, that's what i mean by "other things". Sometimes it's not just serialisation.
  46. dreamrealWell, suppose you have a file representing something: <?xml version="1.0"?><person><name><first>Jack</first><last>Frinkmanhoppergoodstein</last></name></person> -- does that represent a person?
  47. dreamrealThe JSON equivalent is {"name":{"first":"jack", "last": "frink"}} of course
  48. [twisti]we have a schema that does (weak, obviously) constraints, and i dont know how to feel about that
  49. dreamrealWe have a schema that does *exact* constraints, and it's hard to break :D
  50. [twisti]like, it has min/max stuff, and that actually has caught stuff in production and prevented bad data from spreading. but in the end, it means we maintain at least two different sets of constraints (because some constraints cant be expressed in schema, like min/max of something depending on the content of something else) and sometimes they drift
  51. dreamreal[twisti]: yeah, what YOU have is more than data, it's an ontology
  52. [twisti]that is json schema for us, not xml, obviously xml is more powerful in that regard, though i dont think its turing complete either, right ?
  53. dreamrealXML itself is not, no
  54. dreamreallike I said, what you have is an ontology: you wouldn't use XML/XSD for that, you'd use XML/XSD/OWL
  55. dreamrealYou wouldn't HAVE to use XML for it, OWL can leverage other formats like turtle, etc
  56. [twisti]not enough xml in my world to know my way around there; we have validation on code level, and the json schema acts like an additional net
  57. dreamrealbut what you're talking about is reasoning, data relationships, not a shadowbox: XSD is a shadowbox, OWL is "does this data make sense as a whole"
  58. dreamreal(shadowbox: "is this data rabbit-shaped?" OWL: "does this data match the definition of a rabbit?")
  59. [twisti]i guess that makes sense, though i feel reluctant to fully agree - we are still talking about single objects, not multiple objects interacting. the check i was talking about was object level consistency (i.e. we deal with road stuff, so one check is 'does amount of lanes make sense in combination with road class - 'highway' with 6 lanes makes sense, 'footpath' or 'inner city road' does not, but the latter might still have up to 3 lanes)
  60. dreamrealhttps://bytecode.news/posts/2026/05/from-stringly-to-strongly-typed-refined-design
  61. dreamrealThat would be an ontology, yes, but a simple one
  62. [twisti]ill read up when i next need to procrastinate :D
  63. dreamreal:( It's actually pretty appropriate for what you're describing
  64. [twisti]unfortunately the girlfriend is coming over and my place is a pigsty, so technically, im procrastinating right now, so i have to take off
  65. dreamrealDefinitely, enjoy
  66. [twisti]thanks for the link, i didnt mean it to sound deprecating if thats how it came over
  67. dreamrealIt did not
  68. dreamrealIf I ever want to get a party shut down I'll start talking about ontologies, peoples' eyes glaze over and they're like "oh look it's 7:45 already, time to shut everything down, so tired, good evening, please shut the door behind you, everyone else can stay"
  69. jreicherWhat do you feel an ontology is in practice? (I really do know what an ontology is, but this aspect is something more specific)
  70. dreamrealI think they're horrifically underused, mostly because A) they're scary for most people and 2) (related to A) they're hard to use
  71. dreamrealand D) nobody really cares all that much since it's easy to add code to enforce an ontology's rules without having to invest in a reasoner and the understanding to use it and intepret it
  72. dreamreali.e., "I have a road, I don't care if it's a highway or not ontologically speaking, it says it's a highway, I'll just add code to make sure it has N lanes"
  73. jreicherBut how do you think it works in practice?
  74. jreicherThe most obvious interpretation is "classes are nouns", but that's probably not correct.
  75. dreamrealpeople rarely think in ontologies explicitly: they see something turtle-shaped, they think it's a turtle, they're not going "oh is that a tortoise or a turtle" - and thus they see paleontologists, people going "oh that's not a t-rex, the forelimb for a t-rex is variegated along these lines," as being really wonky
  76. dreamrealno, it's more like "is this is a valid X because X has these characteristics and this has THESE characteristics"
  77. jreicherSo how do you find your ontology?
  78. dreamrealfind?
  79. dreamrealAn ontology is built, not found
  80. jreicherOK, that's saying something.
  81. jreicherSo the schema records that construction also?
  82. dreamrealThe SCHEMA does not, no
  83. dreamrealthe schema records the input for an ontology
  84. dreamrealyou have data in some form, and an ontology is a dataset that describes what that data is and what conclusions can be drawn from it
  85. jreicherOK. I'm struggling a bit to understand what you mean by "input" for that, as it's not a function...
  86. dreamrealsure it is
  87. jreicherIt's a description. You just said that.
  88. dreamrealokay, so: imagine a person. Is a person a terminator?
  89. dreamrealAn ontology yields a description
  90. jreicherYes, but a description is not a function AFAICT.
  91. dreamreallike, from the terminator movies. If you're unfamiliar, give me a context and I'll try to figure out a better example.
  92. dreamrealA description isn't a function, but an ontology is a data set fed to a reasoner, a reasoner has a query function and yields descriptions
  93. jreicherWell, let's use the example you started earlier. I have a Person class, and to keep it simple it contains just the name. How does that relate to a schema?
  94. dreamrealHah, picking up a cold ball, are we
  95. dreamrealOkay, a CLASS and a FILE are different things
  96. dreamrealI was describing an XML file and a JSON equivalent
  97. dreamrealAnd I was going to point out that it LOOKS like a simple expression of a person... but a *schema* might say "a person has a name, a name is made of a first and last word, and a person has a birthdate"
  98. dreamrealwhich means NEITHER ONE of those files represents a person
  99. * jreicher joined #java
  100. dreamrealWB, dunno what you saw last
  101. jreicherI think you and I have the same understanding of an ontology, but I don't think I understand what your ideas about the relationship between schema and ontology.
  102. dreamrealschema is a data-level validation of presence and simple values
  103. jreicherI've checked.
  104. dreamreala schema struggles to say "this player is a halfling, being humanoid and standing 2m tall, and is a paladin" because it can record humanoid construction, player class as "paladin", and height between 0.7m and 2.3m, but struggles to say "no, wait, this height and this player race and this class don't mix"
  105. dreamrealan ontology has no issues with the latter
  106. dreamrealit wouldn't PREVENT such a player, but would be able to say "this player's construction is an aberration"
  107. jreicherHmm. Let me put this a different way. We were talking about schemas. You mentioned ontology. I'm trying to understand why you took the conversation in that direction.
  108. dreamreal"this country road, unpaved, has seven lanes going in each direction, which is an odd definition for a country road"
  109. dreamreala SCHEMA says "a thing has these elements, and these elements have these simple definitions" and an ontology can suggest whether those relationships are valid
  110. dreamrealif you're saying "this field can have THESE values" a schema is apt. If you're saying "this field and THAT field over there have these acceptable ranges in coordination with each other" that's an ontology.
  111. dreamrealMost people express ontologies in code rather than in AN ONTOLOGY, because ontologies are wierd and hard to use and hard to build.
  112. dreamrealWe were originally talking about XML and namespaces and schema, and nobody answered the questions I was actually asking so it veered off
  113. jreicherI think you're saying an ontology will be modelled in a particular language's type system, and checked accordingly, and an equivalent ontology might be modelled in a different language, and checked differently, and schema validation in the ideal case might be the high common denominator for what can be checked for both? Something like that?
  114. dreamrealnot really. A schema is useful for saying what valid input is. an ontology is useful for saying "this schema's data represents this definition properly."
  115. jreicherWhat's the difference?
  116. jreicherYou don't have data without input
  117. dreamrealIf you had a person object, you could say "this person's data is person-shaped" by a schema: it has a name, a birth date, gender, etc etc etc, but an ontology could tell you whether that person was a fireman, a doctor, a teacher, or perhaps all three
  118. jreicherWhy couldn't a sufficiently rich schema system tell you just as much as the ontology?
  119. dreamrealWell, go back to that XML thing
  120. dreamrealIt depends on the nature of the schema! I keep bringing up examples and you keep not interacting with them
  121. dreamrealbut I actually bring them up to observe them
  122. jreicherBecause I'm trying to figure what's inherent to the nature of "schema", rather than a particular schema system.
  123. jreicherPut another way, I'm trying to figure out the difference between schema validation and type checking.
  124. dreamrealWell, the examples are meant to illustrate aspects to make their nature more clear
  125. dreamrealscope
  126. dreamrealschema validation means type checking of each field and its presence or negation
  127. dreamrealtype checking is for a field; schema is for a set of fields; ontology is for the relationship of fields in a schema
  128. jreicherYou don't think a sufficiently expressive schema could check relationships?
  129. dreamrealI was going to say that <person> xml thing wasn't a person at all, because the schema might say a person has a name and a birth date, but you flew past it. :D
  130. dreamrealI know it can't.
  131. jreicherWhy not? I'm not contesting it, but I don't understand why it's a foregone conclusion.
  132. dreamrealAgain, I keep bringing up examples :D
  133. dreamrealOkay, describe a D&D player character. Or a terminator.
  134. dreamrealOr a car. Or a book. I don't know, pick a freaking thing of interest to you, I'll figure something out, but if it's not of interest to you, you'll ignore the example again
  135. jreicherI'm not ignoring any examples. I just can't figure out how to use them to resolve my confusion. I'm happy with any example you choose.
  136. dreamrealI've tried D&D, action movies, biology, census data, all flew over
  137. dreamrealWell, pick one anyway
  138. jreicherCar
  139. jreicherI'm traditional
  140. dreamrealOkay, what is a car?
  141. jreicherFor now, let's say it's an object composed of a chassis, engine, and four wheels
  142. dreamrealOkay. Describe one in data: XML, json, doesn't matter
  143. dreamreal<thing hasChassis="true" hasEngine="true" wheelCount="4" /> ?
  144. jreicherOK
  145. dreamrealHow would a truck look?
  146. jreicherSame, but also with a trailer
  147. dreamrealA truck has a trailer? Mine doesn't
  148. dreamrealAnyway, type validation says "hasChassis" can be either "true" or "false"
  149. jreicherI'm not really fussed at the definition. I just came up with an arbitrary extension.
  150. jreicherOK
  151. dreamrealand a "thing" in this context CAN HAVE attributes like hasChassis, hasEngine, wheelCount
  152. jreicherOK
  153. dreamrealI'm working with your examples!
  154. jreicherI understand that, but I don't know what's required to answer my question.
  155. dreamrealSo field validation says wheelcount is integral or null (it might be a tank and not have wheels!) and those has* are "true" or "false" or not present
  156. dreamrealand "hasTrailer" is indeed a candidate for a truck, but a truck might also have a flat bed
  157. jreicherThat's what field validation says for a particular kind of schema system. Why are we sure there isn't a richer kind of field validation available in a different system?
  158. dreamrealso "a truck" is defined as "a thing" with at least four wheels, and EITHER a bed OR a trailer
  159. dreamrealjreicher: we are sure there IS a richer kind of field validation
  160. dreamrealit's an ontology
  161. jreicherOK, let me ask the question really weirdly. Can we have an XML document with "ontology validation"?
  162. dreamrealnot with the formal definition of an XML file, no. It has a spec; the spec precludes ontological inference.
  163. jreicherBut we can imagine a different kind for serialisation format that might admit this kind of validation?
  164. dreamrealan XML file has a structural specification (the SGML spec, which includes schema specifications)
  165. dreamrealsure: it's an ontology
  166. jreicherPerfect. I think that answers my question.
  167. dreamrealYou keep asking for the thing that's right there
  168. dreamreal<thing hasWheels="2" hasBed="true" hasChassis="true" hasEngine="true" /> is a truck, yeah?
  169. dreamrealIt has a bed, it has wheels, it has an engine...
  170. jreicherI'm OK with that
  171. * dreamreal thinks that would be a very strange truck, personally
  172. * raj joined #java
  173. dreamrealmaybe a sort of ATV, but for stability you'd want three wheels, not two
  174. dreamrealin code, you'd load that object and have some kind of validation to make sure the data made sense
  175. dreamrealbut that's exactly what an ontology does; it'd be way easier to do it in code, though, and way faster
  176. * Ragnor joined #java
  177. * hwpplayer1 joined #java
  178. * deadbeat joined #java
  179. ParaRemember to spend your tokens, kids, month is going to change and token costs will skyrocket in all subscriptions.
  180. dreamrealor thank your past selves for buying a machine you can run a model on locally :D
  181. ParaI'm going to add picture of my 64GB DDR5 to my Tinder profile.
  182. * MonsterAbyss joined #java
  183. * marcel1 joined #java
  184. ChronosPara: LOL :D
  185. * dob1 joined #java
  186. * stewi joined #java
  187. * Drixtan joined #java
  188. * dob1_ joined #java
  189. * Drixtan joined #java
  190. sweatiestFY2026 Q3 it all goes tits up, we got a month left
  191. sweatiestPara: not next month, but in July
  192. ParaGood thing I'm European, I'll be vacationing then.
  193. ParaI can come back to chaos with fresh mind!
  194. * five618480339176 joined #java
  195. * OmniRadix6 joined #java
  196. * dob1 joined #java
  197. * BSaboia joined #java
  198. * hwpplayer1 joined #java
  199. * Betal joined #java
  200. * mindCrime joined #java
  201. Drixtansweatiest: what is happening in 2026 Q3? We are all out of job (from all the previous predictions 12-18 months ago by then) ?
  202. sweatiestearnings reports
  203. sweatiestpost spacex IPO
  204. Drixtanah, those apocalypses, I can't follow all of them, my bad.
  205. * tronexte joined #java
  206. Parayour apocalypse stack is full
  207. * m joined #java
  208. * Inline joined #java
  209. * X-Scale joined #java
  210. * MonsterAbyss joined #java
  211. * GreenResponse joined #java
  212. * hwpplayer1 joined #java
  213. * dgregory joined #java
  214. * hwpplayer1 joined #java
  215. * Betal joined #java
  216. * gildarts joined #java
  217. * caryhartline joined #java
  218. jbosmansclearly, i missed a bunch and or a whole lot
  219. jbosmansk, something about motorized vehicles vs XML
  220. jbosmans'nuff said
  221. * X-Scale joined #java
  222. * mindCrime joined #java
  223. * X-Scale joined #java
  224. * danba9 joined #java
  225. danba9jer
  226. * danba9 left #java
  227. * cronos joined #java
  228. * PrimaMat1 joined #java
  229. * X-Scale joined #java