Post AhycugSOUtmLm7Zzd2 by nevali@troet.cafe
 (DIR) More posts by nevali@troet.cafe
 (DIR) Post #AhyctYKrCw9oITVzA8 by nevali@troet.cafe
       2024-05-04T22:27:21Z
       
       0 likes, 0 repeats
       
       behold, i have spent months engineering an extremely complicated way of storing one (1) single bit of data.
       
 (DIR) Post #AhyctZWwlTQE0GB9e4 by nevali@troet.cafe
       2024-05-04T22:44:22Z
       
       0 likes, 0 repeats
       
       actually i can go one better, i have a class which enables you to store zero bits of data
       
 (DIR) Post #AhyctafqVs8PY9Lm9g by nevali@troet.cafe
       2024-05-05T14:12:55Z
       
       0 likes, 0 repeats
       
       i also generate JSON schema from the same sources, because that means every type of object i define also has at least one but in most cases several defined data storage formats, for which codecs can *also* be autogeneratedhowever, i don't know why VScode warns about every single one of schema files, they don't do anything silly
       
 (DIR) Post #AhyctbTpW27K3Ajh44 by nevali@troet.cafe
       2024-05-05T14:19:20Z
       
       0 likes, 0 repeats
       
       and you might say "oh but why would you ever need to be able to serialise the contents of a process or a thread object as JSON?" (auditing and accounting next question) but in any event the overhead of being able to is basically nilsame deal with LDAP, XML, and RDF schemaso for every class defined there are multiple data interchange schemas *and* COM interfaces which in turn specify both an API and an ABI (although i only generate C and C++ bindings *so far*)
       
 (DIR) Post #Ahyctc7t769y3PTgVE by nevali@troet.cafe
       2024-05-05T15:55:04Z
       
       0 likes, 0 repeats
       
       so right now my lump of python auto-generates interface definitions from class definitions, and also includes methods for property getting & setting in those definitions for the benefit of lower-level languageshowever, i don't think you should need to construct FFI bindings or parse some compiled blob in order to get or set a property on an object from a higher-level language or a command-line, and so my base class provides named property-get/set methods as well
       
 (DIR) Post #Ahyctct2HnsEPdXKzY by nevali@troet.cafe
       2024-05-05T15:59:39Z
       
       0 likes, 0 repeats
       
       i'll also extend this concept to what i've called "verbs", which are high-level (user-facing) actions which can be performed on objects of a given class, with detailed information about the parameters and returnsthere's a "perform" method in the same base class which takes a verb name and a dictionary of parameters and attempts to… perform itthere's no real magic, i'll just lean on code-generation for things like parameter validation, it's much like decoding an RPC message really
       
 (DIR) Post #AhyctdreeQMZRdtkTg by nevali@troet.cafe
       2024-05-05T16:01:46Z
       
       0 likes, 0 repeats
       
       i don't plan on writing many *normal* methods for most of the classes' instance interfaces - they'll largely either be property accessors or performable verbsonce i have the ability to instantiate object instances from filesystem paths implemented, a command-line interface that lets you manipulate properties and perform "verbs" on those instances becomes feasible and potentially-interesting
       
 (DIR) Post #AhyctepZ3gHkRRvarI by nevali@troet.cafe
       2024-05-05T16:03:38Z
       
       0 likes, 0 repeats
       
       (there are some hurdles before i get to that, i need to define exactly how, for example, an executable file in the filesystem can result in you getting an object you can spawn a subprocess with, or how a JPEG file can give you a bitmap image object… none of which again is magic but it's as yet not fully defined)
       
 (DIR) Post #AhycthO1YX2QMu48qe by nevali@troet.cafe
       2024-05-06T18:22:49Z
       
       0 likes, 0 repeats
       
       a slight snag with my development approach is that it involves going through the LDAP RFCs section by section and transcribing the formal definitions they contain into a pile of files my processing system can understand, and consequently produce output files that (semantically) match what's in those RFCsexcept, of course, where the RFCs are wrong
       
 (DIR) Post #AhyctjIQSJkSI7ShOq by nevali@troet.cafe
       2024-05-06T18:55:36Z
       
       0 likes, 0 repeats
       
       oh look all of the LDAP classes i define automatically have JSON schemas almost as if i planned it this way(although i can afford to fine-tune the type definitions)and also, natch, IDLalthough the IDL is incorrect because (a) strings and (b) this is just automatic mapping from properties and not the most useful programming interface for interacting with a user account object, but one step at a time
       
 (DIR) Post #AhyctlQIY1EYt7A0wq by nevali@troet.cafe
       2024-05-06T19:05:36Z
       
       0 likes, 0 repeats
       
       i think i'll maybe not generate method prototypes for obsolete attributes though, nobody needs what is essentially a helper method to retrieve a telex number
       
 (DIR) Post #AhyctnKLT7f0nEOHwm by nevali@troet.cafe
       2024-05-06T23:55:16Z
       
       0 likes, 0 repeats
       
       in theory i could use pyasn1 to parse the X.500 definitions and integrate them all automaticallybut i feel like this would be a bridge too far when the LDAP defs have barely changed in 20 years
       
 (DIR) Post #AhyctpVPMxhLY7a9T6 by nevali@troet.cafe
       2024-05-07T17:57:17Z
       
       0 likes, 0 repeats
       
       incidentally the microsoft version of the thing i'm building is called Active Directory Service Interfaces (ADSI) and is a layer of COM interfaces and back-end providers that match up with the classes and attributes Microsoft defines for Active Directory, which tbh i've only just this moment thought about looking at how it works (and immediately discover their base interface name, IDirectoryObject, is named identically to mine, ho ho ho)https://learn.microsoft.com/en-us/windows/win32/adsi/adsi-objects-of-ldap
       
 (DIR) Post #AhyctrSe6Cg1c8IyRM by nevali@troet.cafe
       2024-05-07T17:59:08Z
       
       0 likes, 0 repeats
       
       i say "the thing i'm building", i mean "the small part of the thing i'm building that i happen to be doing this week"what Microsoft *ended up* doing with Active Directory, which wasn't really the original vision, was providing a set of Windowsy APIs on top of an LDAP database which you interacted with in a sort of hybrid-directory kinda way depending on which APIs you usethat's not what i'm trying to do
       
 (DIR) Post #AhycttpPIY4WxIyBCC by nevali@troet.cafe
       2024-05-07T18:01:13Z
       
       0 likes, 0 repeats
       
       what i'm trying to do is define and then implement a complete systems model which is defined wherever possible with reference to existing domain-relevant specifications — and for enterprise objects and anything related to TLS, that's the descendants of X.500thus, i want to define a *strict* superset of the LDAP attributes and classes (amongst other things), and use that as the model for the whole OSthat is, these IDL interfaces will be THE user-facing API
       
 (DIR) Post #AhyctvrFkejlFbqgLo by nevali@troet.cafe
       2024-05-08T20:22:37Z
       
       0 likes, 0 repeats
       
       you don't want to know how many attempts it just took me to turn a fully-qualified C++ identifier into a properly-quoted, properly-indented, typedef statement as the one hereit wasn't the decomposing of the identifier that was the problem, it was VScode auto-inserting quote marks without me noticing every 5 seconds
       
 (DIR) Post #AhyctxwzyGWNk0YIaG by nevali@troet.cafe
       2024-05-08T22:01:16Z
       
       0 likes, 0 repeats
       
       back in C++-land, i spent ten minutes integrating a week's worth of model changes(although my list of "classes yet to implement" has grown by several orders of magnitude…)
       
 (DIR) Post #AhyctzsommMjjcbzLU by nevali@troet.cafe
       2024-05-08T22:04:40Z
       
       0 likes, 0 repeats
       
       it did in fact not work the first time because of a bug in the generated code which is now fixed, but despite rearranging both the interface hierarchy and the filesystem layout things remain as they werei need to spend time (not tonight) properly implementing the basic type classes (string, locator, datetime, array, dictionary, boolean, nothing) whilst i ponder how *exactly* object deserialisation needs to work
       
 (DIR) Post #Ahycu2RdGJOzgAuot6 by nevali@troet.cafe
       2024-05-09T22:08:06Z
       
       0 likes, 0 repeats
       
       pro(ish) tip: if you must include last-modified timestamps in generated files (because that is often quite useful), you may want to derive it from the modification times of the source files if you're going to re-generate them frequently, or else you'll need to arrange for your version control system to ignore that bit of texta commit consisting of several hundred one-line /* Automatically generated at ... */ changes is generally unhelpful, it turns out
       
 (DIR) Post #Ahycu5JEbzT2Z00eiO by nevali@troet.cafe
       2024-05-09T22:11:53Z
       
       0 likes, 0 repeats
       
       anyway, i have mapped and crossreferenced every attribute type and object class from the COSINE X.500/Internet project, the Heimdal LDAP Kerberos mappings, and RFC2307 NIS/LDAP mappingsi'm nearly at the point where i can test those schema files with OpenLDAP (their contents is in the wrong order atm)i need to finish off the core standard LDAP object & attribute set though — well, i've got (nearly) all the attributes, but not all of the classes, and inetOrgPerson is MIA
       
 (DIR) Post #Ahycu8XWbJgGaBibuC by nevali@troet.cafe
       2024-05-09T22:16:59Z
       
       0 likes, 0 repeats
       
       there's a lot to be said for the X.500, LDAP, RDF, knowledge-management approach of defining a property/attribute, giving it a global name, and then assembling classes from those properties — it means a property *has* to have the same definition in every class that uses it, you can't have it be a string in one place and an integer in another, for examplein contrast, in most programming languages, property definitions are scoped to their containing class
       
 (DIR) Post #AhycuBMI7XTfKDUBJQ by nevali@troet.cafe
       2024-05-11T11:54:12Z
       
       0 likes, 0 repeats
       
       you know i think it's Quite Funny, Actually that there does not exist a meaningful machine-readable repository of LDAP attribute types and object classes, despite them all essentially being specified as ASN.1, besides "the OpenLDAP source tree" and "scraping RFCs"there is no standard web service you can call or bucket you can probe which will give you the exact definition of the LDAP attribute type with the OID 2.16.840.1.113730.3.1.2 defined in RFC2798fascinating, really
       
 (DIR) Post #AhycuEDBVqyYAqFS2C by nevali@troet.cafe
       2024-05-11T11:55:02Z
       
       0 likes, 0 repeats
       
       (of course if you have an LDAP server which already knows about it, you can ask it, they [the mysterious amorphous "they"] got that bit right)
       
 (DIR) Post #AhycuH0X7LdcqTLtEO by nevali@troet.cafe
       2024-05-11T14:06:22Z
       
       0 likes, 0 repeats
       
       coming up with a unified XML format that handles all of this stuff was a reasonable ideawriting validation logic into the parser from the outset has saved me hours of problem-solving time from stupid typos and the likei do not yet confirm which things are labelled/described/documented properly, and in which of the various flavours are the definitions complete enough to generate code from (e.g., i can define a type and not provide the information to generate a typedef and it won't complain…)
       
 (DIR) Post #AhycuJyW5Io835Qp0K by nevali@troet.cafe
       2024-05-11T23:48:41Z
       
       0 likes, 0 repeats
       
       i use URIs internally to identify all of my entities, and then i define URI namespaces which map to different prefixes (and file paths) depending upon the flavour being generatedwhich is cool except that anything LDAP will also have an OID as its "globally-unique" definition, plus a non-clashing name in a local context; COM interfaces ditto but with UUIDsin many contexts things can have multiple equally-applicable names, as long as they don't clashi now check this all, and generate indexes
       
 (DIR) Post #AhycuMkRm4KseJs7zU by nevali@troet.cafe
       2024-05-11T23:50:53Z
       
       0 likes, 0 repeats
       
       all the clever mapping logic and config in the world is no substitute for eyeballing the results to make sure you're not for example attempting to define a C global symbol in something you expect other people to one day use, called, bemusingly enough, "C"like yes it's strictly valid but you definitely don't want to be doing it
       
 (DIR) Post #AhycuPazBhYBTqT7A0 by nevali@troet.cafe
       2024-05-12T00:07:22Z
       
       0 likes, 0 repeats
       
       i'm not a great deal better in my first language than in my second, so far
       
 (DIR) Post #AhycuSSaXNcEMfYwzI by nevali@troet.cafe
       2024-05-12T00:12:40Z
       
       0 likes, 0 repeats
       
       i need to tweak my LDAP schema generator to output in dependency order (which an older PHP implementation of much the same thing did do) and then i can actually test what it's spitting outin *theory*, if i specify the base types correctly, that will also give me JSON schema documents for all of the standard LDAP/X.500 object classes (because i've already written the JSON schema generator itself)and that's just a hop, skip, and a jump from the XML and RDF schema docs
       
 (DIR) Post #AhycuVD6JQ0etVL7lQ by nevali@troet.cafe
       2024-05-12T00:17:42Z
       
       0 likes, 0 repeats
       
       back in COM-land, you will (...) be able to get the metaclass objects by either their assigned https URI, objectClass OID, or the OID or UUID encoded *in* a URI, alongside the current UUID-based lookup that happens nowthat's largely dependent on my implementing the 'Locator' class which encapsulates URIs and things that can be losslessly mapped to URIs like filesystem paths and UUIDs, which i'll get around to in a bit
       
 (DIR) Post #AhycuXyg1VFpTdc9CK by nevali@troet.cafe
       2024-05-12T00:26:45Z
       
       0 likes, 0 repeats
       
       but tbh that's just a fun aside, the main purpose of the Locator class is to turn URLs into actual object instances — class objects are just a particular breedfrom a programmer's pov, it shouldn't feel at any point like "loading or saving a file", but getting access to an object which may or may not already be in memory, manipulating it as required, and then relinquishing it when done — whether that's a JPEG image or a script or a git repository or a DASH media stream
       
 (DIR) Post #AhycuaqzKXt2Of2Y88 by nevali@troet.cafe
       2024-05-12T00:29:58Z
       
       0 likes, 0 repeats
       
       i haven't fleshed out the specifics of the required interactions between client code, middleware and registry, and the codecs and translators that would be able to provide an implementation of a particular interface for a certain type of encoded data or directory structure — or at least, i haven't figured out two things: 1 - making it elegant without violating the COM specs, and 2 - making it efficient without horrendous caching requirements
       
 (DIR) Post #AhycudYfH80omhUSUC by nevali@troet.cafe
       2024-05-12T00:32:00Z
       
       0 likes, 0 repeats
       
       in my (considerable) favour is the fact that it's 2024 and when these ideas were being first implemented in anger was about thirty years ago
       
 (DIR) Post #AhycugSOUtmLm7Zzd2 by nevali@troet.cafe
       2024-05-12T00:43:46Z
       
       0 likes, 0 repeats
       
       the advantage (to me) of defining everything as RPCable interfaces is that i can funnel object instances into a WASM environment with relative ease, which together with the other pieces of the chain allows for highly-controlled workload execution environments which can be granted access to any specific objects (and which may canonically exist on another node, another system, or somewhere else in the enterprise entirely)