Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Search - "ambiguity"
-
So I told my wife one week ago: "Yeah, you should totally learn to code as well!"
Yesterday a package arrived, containing a really beautiful hardcover book bound in leather, with a gold foil image of a snake debossed into the cover, with the text "In the face of ambiguity -- Refuse the temptation to guess" on it.
Well, OK, that's weird.
My wife snatches it and says: "I had that custom made by a book binder". I flip through it. It contains the Python 3.9 language reference, and the PEP 8 styleguide.
While I usually dislike paper dev books because they become outdated over time, I'm perplexed by this one, because of how much effort and craftsmanship went in to it. I'm even a little jealous.
So, this morning I was putting dishes into the dishwasher, and she says: "Please let me do that". I ask: "Am I doing anything wrong?"
Wife responds: "Well, it's not necessarily wrong, I mean, it works, doesn't it? But your methods aren't very pythonic. Your conventions aren't elegant at all". I don't think I've heard anyone say the word "pythonic" to me in over a decade.
And just now my wife was looking over my shoulder as I was debugging some lower level Rust code filled with network buffers and hex literals, and she says: "Pffffff unbelievable, I thought you were a senior developer. That code is really bad, there are way too many abbreviated things. Readability counts! I bet if you used Python, your code would actually work!"
I think I might have released something really evil upon the world.29 -
Languages without a fully implemented type system.
Granted, it has been a fad for a quarter century, but everything points at one simple fact: Types matter in programming.
In dynamic languages, you tend to see that testing suites explode into thousands of tests, many of which wouldn't even be necessary if you had some type safety.
You see that languages like JS are forked into more typesafe dialects, like Typescript. Python got typehints since 3.6, and PHP added typehints for methods, then typehints for properties, and will soon even have compound types.
Maybe most languages will never reach the level of Haskell or Scala, and that's totally fine, but I think the direction languages are moving in is pretty much set in stone: No ambiguity, more safety. Code should fail before deploying, not after.36 -
I just invented a new JavaScript operator. It's named "plus with wings", and it's used to sum to numbers without ambiguity or any need of type conversion, for example:
3 -+- "2" // 5
"2.1" -+- "4" // 6.1
"-1.1" -+- "" // -1.1
So, from now, you won't have to wonder anymore what type is that variable.
Tested on all browsers25 -
I really fucking loathe StackExchange. Some poor soul had the nerve (THE NERVE!) to ask a question about something they didn't understand (HOW DARE THEY!):
"What is the difference between a ping and a get request? The goal is to see if the site is up."
And par for the course over at smarmy-fucking-smug-pedant-land, in less than three hours, the question was closed: "[C]losed as not a real question... It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form.
Allow me to indulge in some pedantic, "well actually" fuckery of my own...
Well actually, that actually is a 'real' question, because it's, you know, a fucking question. There's a question mark in there and everything! The person is asking what the difference is between two different things, and we can tell it's actually two different things because the person uses two different fucking nouns. And not only is this person asking to know what the difference is between these two different things, they even give us a use-case for why they're asking the question: they're pretty sure that they think they might know there's at least two different ways to check that their website is up, they just want to know what the difference is between those two methods -- hence the two different fucking nouns. It's almost like they're trying to give us some contextual information about why they're asking so that even if there is some vagueness to their question -- which is bound to happen IF YOU KNOW YOU DON'T KNOW EVERYTHING ABOUT THE SUBJECT, WHICH IS PROBABLY WHY YOU'RE FUCKING ASKING -- then a reasonable, decent, helpful person who is making a good-faith effort to be helpful can infer from that context enough information that clarifies the question enough to remove any vagueness or ambiguity and thus provide a helpful answer. AND THAT'S WHAT FUCKING HAPPENED!
And what just fucking galls me to no end... the question was answered (SUCCINTLY, INFORMATIVELY, SIMPLY, AND CORRECTLY!) and even marked as accepted in less than fifteen minutes after being asked.
And that didn't stop some smug fuck from being an asshole and closing the question because "fucking scrub noobfags need to git gud."
https://serverfault.com/questions/...
If MySpace was a place for friends,
then StackExchange is the place for insufferably elitist smug cunts.4 -
"We should use ambiguity-driven development using co-domain model sockets, anfractuous horizontal scaling, and recursive async testing"
"What even is that"
"I found some words I like in the dictionary, and used it as the title for a medium article. I thought that's how we play the game as devs these days"6 -
Tried javascript coming from Java and C++, i know not a lot of people agree with me but holy fucking shit i hate non-typed variables they introduce so much ambiguity it drives me insane!!!9
-
This is what happens when you make style more important than function.
Pop quiz: when you lift the handle, what temperature water do you expect to come out? (This isn’t a trick question; assume you have an awesome water heater with instant warm-up time)
“Hot,” you might say, because the “H” is pointed towards you and aligned with the faucet.
“Cold,” you might say, because the handle is turned in the direction of the “C”.
There wouldn’t be any ambiguity if the H/C markings were on an immobile part of the fixture so that the relative position of the handle made the answer obvious.
(If you instinctively answered “cold” then congrats this is the perfect faucet for you.)14 -
A couple of weeks ago, I got to the second stage of a recruitment process with a relatively big fintech in the crypto space (I know) - all went well and although I did not think much of it at first, with all the information I had gathered I came to realize this might as well be the best opportunity I've had in my pursuit of finding a new job (i.e looking for high technical challenges, unsure of where I see myself in 5 years, wanting to give full-remote work a try, etc.).
Cue to the end of the interview;
"That's great! I really enjoyed speaking with you, your technical background seems excellent so we would like to move to the next stage which is a take-home test to do in your free time.", said the interviewer.
"Wow! Much amaze, well of course! What's it gonna be?", said the naive interviewee.
"I'm sending you the details via email, please send it back in 48 hours, buhbye now", she hangs up.
...
"48 hours?? Right, this should be easy then, probably some online leetcoding platform, as usual.", thought the naive interviewee, who evidently went through this sh*t numerous times already.
A day later I receive the email: this was the whole deal. The take-home test supreme with bacon and cheese. A full-blown project, with tests, a project structure, a docker image, testing and bullet points for bonus points! The assessment was poorly written with lots of typos and overall ambiguity, a few datasets were also provided but bloated with inconsistent comments and trailing whitespace.
What the actual fck??? Am I supposed to sleep deprive myself to death while also working my day job? What are you trying to assess? How much of my life I'm willing to sacrifice for your stupid useless coding challenge? You are not all Google, have some respect, jeez.
I did not get the job.2 -
TLDR: Scope creep.
Fuck it! I hate scope creep! 2 days before the deadline is due, slip in a little scope creep to bolster your already ambiguous as fuck scope! Of course, more fool me for taking on a project with a scope as ambiguous as this one. Or for accepting the 'just do x and y and your done' as gospel. But then again I enjoy paying my bills and you know, eating from time to time!
Fuck 'em! Fuck Clients! Fuck Scope Creep! Fuck Ambiguity to it's very Fucking core! Fuck it! Fuck me! Fuck code! I'm venturing under my table for a little cry and a sulk, then back at the god-damned grindstone to finish the project and all it's creepy scopy bits before the deadline tomorrow! FUCK!rant fuckitall fuck! clientsarewankers fuckme fuckthechainofcommand ambiguity fuckfreelancing scopecreep2 -
The "stochastic parrot" explanation really grinds my gears because it seems to me just to be a lazy rephrasing of the chinese room argument.
The man in the machine doesn't need to understand chinese. His understanding or lack thereof is completely immaterial to whether the program he is *executing* understands chinese.
It's a way of intellectually laundering, or hiding, the ambiguity underlying a person's inability to distinguish the process of understanding from the mechanism that does the understanding.
The recent arguments that some elements of relativity actually explain our inability to prove or dissect consciousness in a phenomenological context, especially with regards to outside observers (hence the reference to relativity), but I'm glossing over it horribly and probably wildly misunderstanding some aspects. I digress.
It is to say, we are not our brains. We are the *processes* running on the *wetware of our brains*.
This view is consistent with the understanding that there are two types of relations in language, words as they relate to real world objects, and words as they relate to each other. ChatGPT et al, have a model of the world only inasmuch as words-as-they-relate-to-eachother carry some information about the world as a model.
It is to say while we may find some correlates of the mind in the hardware of the brain, more substrate than direct mechanism, it is possible language itself, executed on this medium, acts a scaffold for a broader rich internal representation.
Anyone arguing that these LLMs can't have a mind because they are one-off input-output functions, doesn't stop to think through the implications of their argument: do people with dementia have agency, and sentience?
This is almost certain, even if they forgot what they were doing or thinking about five seconds ago. So agency and sentience, while enhanced by memory, are not reliant on memory as a requirement.
It turns out there is much more information about the world, contained in our written text, than just the surface level relationships. There is a rich dynamic level of entropy buried deep in it, and the training of these models is what is apparently allowing them to tap into this representation in order to do what many of us accurately see as forming internal simulations, even if the ultimate output of that is one character or token at a time, laundering the ultimate series of calculations necessary for said internal simulations across the statistical generation of just one output token or character at a time.
And much as we won't find consciousness by examining a single picture of a brain in action, even if we track it down to single neurons firing, neither will we find consciousness anywhere we look, not even in the single weighted values of a LLMs individual network nodes.
I suspect this will remain true, long past the day a language model or other model merges that can do talk and do everything a human do intelligence-wise.31 -
Github 101 (many of these things pertain to other places, but Github is what I'll focus on)
- Even the best still get their shit closed - PRs, issues, whatever. It's a part of the process; learn from it and move on.
- Not every maintainer is nice. Not every maintainer wants X feature. Not every maintainer will give you the time of day. You will never change this, so don't take it personally.
- Asking questions is okay. The trackers aren't just for bug reports/feature requests/PRs. Some maintainers will point you toward StackOverflow but that's usually code for "I don't have time to help you", not "you did something wrong".
- If you open an issue (or ask a question) and it receives a response and then it's closed, don't be upset - that's just how that works. An open issue means something actionable can still happen. If your question has been answered or issue has been resolved, the issue being closed helps maintainers keep things un-cluttered. It's not a middle finger to the face.
- Further, on especially noisy or popular repositories, locking the issue might happen when it's closed. Again, while it might feel like it, it's not a middle finger. It just prevents certain types of wrongdoing from the less... courteous or common-sense-having users.
- Never assume anything about who you're talking to, ever. Even recently, I made this mistake when correcting someone about calling what I thought was "powerpc" just "power". I told them "hey, it's called powerpc by the way" and they (kindly) let me know it's "power" and why, and also that they're on the Power team. Needless to say, they had the authority in that situation. Some people aren't as nice, but the best way to avoid heated discussion is....
- ... don't assume malice. Often I've come across what I perceived to be a rude or pushy comment. Sometimes, it feels as though the person is demanding something. As a native English speaker, I naturally tried to read between the lines as English speakers love to tuck away hidden meanings and emotions into finely crafted sentences. However, in many cases, it turns out that the other person didn't speak English well enough at all and that the easiest and most accurate way for them to convey something was bluntly and directly in English (since, of course, that's the easiest way). Cultures differ, priorities differ, patience tolerances differ. We're all people after all - so don't assume someone is being mean or is trying to start a fight. Insinuating such might actually make things worse.
- Please, PLEASE, search issues first before you open a new one. Explaining why one of my packages will not be re-written as an ESM module is almost muscle memory at this point.
- If you put in the effort, so will I (as a maintainer). Oftentimes, when you're opening an issue on a repository, the owner hasn't looked at the code in a while. If you give them a lot of hints as to how to solve a problem or answer your question, you're going to make them super, duper happy. Provide stack traces, reproduction cases, links to the source code - even open a PR if you can. I can respond to issues and approve PRs from anywhere, but can't always investigate an issue on a computer as readily. This is especially true when filing bugs - if you don't help me solve it, it simply won't be solved.
- [warning: controversial] Emojis dillute your content. It's not often I see it, but sometimes I see someone use emojis every few words to "accent" the word before it. It's annoying, counterproductive, and makes you look like an idiot. It also makes me want to help you way less.
- Github's code search is awful. If you're really looking for something, clone (--depth=1) the repository into /tmp or something and [rip]grep it yourself. Believe me, it will save you time looking for things that clearly exist but don't show up in the search results (or is buried behind an ocean of test files).
- Thanking a maintainer goes a very long way in making connections, especially when you're interacting somewhat heavily with a repository. It almost never happens and having talked with several very famous OSSers about this in the past it really makes our week when it happens. If you ever feel as though you're being noisy or anxious about interacting with a repository, remember that ending your comment with a quick "btw thanks for a cool repo, it's really helpful" always sets things off on a Good Note.
- If you open an issue or a PR, don't close it if it doesn't receive attention. It's really annoying, causes ambiguity in licensing, and doesn't solve anything. It also makes you look overdramatic. OSS is by and large supported by peoples' free time. Life gets in the way a LOT, especially right now, so it's not unusual for an issue (or even a PR) to go untouched for a few weeks, months, or (in some cases) a year or so. If it's urgent, fork :)
I'll leave it at that. I hear about a lot of people too anxious to contribute or interact on Github, but it really isn't so bad!4 -
Does anyone else find it super-confusing how Microsoft refers to SQL Server versions by both product year and version number?
For instance, we primarily use SQL Server 2012, 2014, and 2017, which are versions 11, 12, and 14 respectively.
The slight mismatch between the product year and the version number creates a lot of ambiguity. If someone refers to SQL Server "14," we always have to double-check: do you mean 14 as in version 14 as in 2017, or 14 as in 2014 as in version 12? Does SQL Server "12" mean 12 as in version 12 as in 2014, or 12 as in 2012 as in version 11? It's ridiculous!3 -
Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than *right* now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!1 -
I am at a complete loss as to what each button is actually supposed to do, if they do the same, or if anything will actually happen at all!
-
Egad! An actual rant is revealed!
Lamers who insist that informal or oversimplified stuff be written are damn annoying.
God forbid the appropriate use of a four-syllable word.
In what world is "uncanny" a strange word?
Is "blessed are the authors of good documentation" such a difficult sentence? Call the linguist; this shit can only be interpreted by an expert!
"U WRITE LIEK A ROBOT!!!!!!!!!"
Piss off, trog. Some men like succinctness and just wish to communicate without a great deal of ambiguity. A bit of clunkiness is preferable to a bit of ambiguity.
Pants are apparently shat when proper sentences are encountered.
If writing coherently and correctly implies being pretentious, then the world is beyond repair.
Also annoying are lamers who insist on wasting other men's time by asking questions which are perfectly suited for search engines.
Reaching through the monitor and beating the crap out of people sometimes seems a bit tempting. But doing such a thing is infeasible... and would probably result in felony charges if such a thing were feasible.13 -
I really hate PHP frameworks.
I also often write my own frameworks but propriety. I have two decades experience doing without frameworks, writing frameworks and using frameworks.
Virtually every PHP framework I've ever used has causes more headaches than if I had simply written the code.
Let me give you an example. I want a tinyint in my database.
> Unknown column type "tinyint" requested.
Oh, doctrine doesn't support it and wont fix. Doctrine is a library that takes a perfectly good feature rich powerful enough database system and nerfs it to the capabilities of mysql 1.0.0 for portability and because the devs don't actually have the time to create a full ORM library. Sadly it's also the defacto for certain filthy disgusting frameworks whose name I shan't speak.
So I add my own type class. Annoying but what can you do.
I have to try to use it and to do so I have to register it in two places like this (pseudo)...
Types::add(Tinyint::class);
Doctrine::add(Tinyint::class);
Seems simply enough so I run it and see...
> Type tinyint already exists.
So I assume it's doing some magic loading it based on the directory and commend out the Type::add line to see.
> Type to be overwritten tinyint does not exist.
Are you fucking kidding me?
At this point I figure out it must be running twice. It's booting twice. Do I get a stack trace by default from a CLI command? Of course not because who would ever need that?
I take a quick look at parent::boot(). HttpKernel is the standard for Cli Commands?
I notice it has state, uses a protected booted property but I'm curious why it tries to boot so many times. I assume it's user error.
After some fiddling around I get a stack trace but only one boot. How is it possible?
It's not user error, the program flow of the framework is just sub par and it just calls boot all over the place.
I use the state variable and I have to do it in a weird way...
> $booted = $this->booted;parent::boot();if (!$booted) {doStuffOnceThatDependsOnParentBootage();}
A bit awkward but not life and death. I could probably just return but believe or not the parent is doing some crap if already booted. A common ugly practice but one that works is to usually call doSomething and have something only work around the state.
The thing is, doctrine does use TINYINT for bool and it gets all super confused now running commands like updates. It keeps trying to push changes when nothing changed. I'm building my own schema differential system for another project and it doesn't have these problems out of the box. It's not clever enough to handle ambiguous reverse mappings when single types are defined and it should be possible to match the right one or heck both are fine in this case. I'd expect ambiguity to be a problem with reverse engineer, not compare schema to an exact schema.
This is numpty country. Changing TINYINT UNSIGNED to TINYINT UNSIGNED. IT can't even compare two before and after strings.
There's a few other boots I could use but who cares. The internet seems to want to use that boot function. There's also init stages missing. Believe it or not there's a shutdown and reboot for the kernel. It might not be obvious but the Type::add line wants to go not in the boot method but in the top level scope along with the class definition. The top level scope is run only once.
I think people using OOP frameworks forget that there's a scope outside of the object in PHP. It's not ideal but does the trick given the functionality is confined to static only. The register command appears to have it's own check and noop or simply overwrite if the command is issued twice making things more confusing as it was working with register type before to merely alias a type to an existing type so that it could detect it from SQL when reverse engineering.
I start to wonder if I should just use columnDefinition.
It's this. Constantly on a daily basis using these pretentious stuck up frameworks and libraries.
It's not just the palava which in this case is relatively mild compared to some of the headaches that arise. It's that if you use a framework you expect basic things out of the box like oh I don't know support for the byte/char/tinyint/int8 type and a differential command that's able to compare two strings to see if they're different.
Some people might say you're using it wrong. There is such a thing as a learning curve and this one goes down, learning all the things it can't do. It's cripplesauce.12 -
!rant
Going through my graduate program I have come to realize that there is more to A.I than just machine learning algorithms. As if ML was not complicated enough, we add more to it such as KRR and other topics that border on the areas of Cognitive Science, Boolean Algebra, Logic and even Philosophy and you know what? I dig it. I dig it because finding some of the information in the course that I am getting is damn near impossible to see in other items. Such is the case as a method for fucking signature unit propagation which afuckingparently was developed by one of my instructors(not complaining, just really fucking impressed)
The thing is, most of these items would normally have a parallel in software development that we use on our day to day basis, all of us, no matter if you do web, systems development, database development whatever, the general concepts are the same: you represent real world concepts, such as that of logic and knowledge in programatic/mathematical representations.
I am really amazed at the content of these items, I really am. I just wish for some clarification on ambiguity, seems like most things are left better if it where explained in a programmer's point of view. Most of the items that I have seen could have easily been summarized in a programmers logic if only they would have preferred to take the time to do it, and I get that there needs to be mathematical intuition formulated before anything, it is better sometimes to learn concepts from an outside point of view, a mathematical point of view, but shit is just strange sometimes.1 -
I've been trying Flutter the past 2days. I liked how amazing Flutter framework is but I also hated how UGLY the Dart language is. First of all, I've been doing Java(Android) and JSX(React). So, after coming from these languages, Dart seems awful. Here are the things that I hated the most:
1. JSON parsing: The worst part of Flutter/Dart. No GSON/Jackson equivalent. not even possible to make one as described in the doc
2. Redux for flutter. I tried and I hated it. So, Tried some other state management libs
3. the way static functions are written in a class
4. Widgets hiarachy
5. Ambiguity - "this context is not the context we need, we need that one to make it work. so, pass that even when you don't have it" (if you have used flutter, you will know what I mean)4 -
The analytics guy just sent me updated tracking specs for a web site.
There are two sheets in the file: "Custom Events LATEST" and "Custom Events updated". This is already confusing enough.
One of them has comments like "I'd like this to be amended", but the event specs described are the same as the ones implemented.
I asked him for clarification, turns out he wants the ones marked in black to be updated, the ones that don't have any label saying they don't need to be updated.
This is also a guy who for at least 2 years has been making columns in spreadsheets wider not by just widening them, or merging multiple cells, but by just letting text overflow into other cells.
I do wonder how some people manage to keep a job. -
Does learning C++ really involve as much ambiguity of resources as I think it does, or am I overthinking it? Should I just try to start somewhere? Because it's been weeks now and I still get conflicting examples everywhere...3
-
#Suphle Rant 3: Road to PHP8, Flow travails
Some primer: Flows is a feature that causes the framework to bypass handling the request now but read it from cache. This cache entry is meant to be populated without warming, based on the preceding request. It's sort of like prefetching but done on the back end
While building Suphle, I made some notes on some chapters about caveats and gotchas I may forget while documenting. One such note was that when users make the Flow request, the framework will attempt to determine who user is, using authentication mechanism defined on the first module (of the modular monolith)
Now, I got to this point during documentation and started wondering whether it's impossible for the originating request to have used a different authentication mechanism, which would result in an empty entry for returning user. I *think* it's possible cuz I've got something else called "route mirroring", where web based routes can be converted to API routes. They'll then return JSON, get served under defined API path, use JWT, all automatically. But I just couldn't connect the dots for the life of me, regarding how any of this could impact authentication on the Flow request
While trying to figure out how to write the test for this or whether it was even necessary (since I had no use case), it struck me that since Flow requests are not triggered by an actual user, any code attempting to read authenticated user will see nothing!
I HATE it when I realize there's ambiguity or an oversight, after the amount of attention and suffering devoted. This, along with a chain of personal troubles set off despondency for a couple of days. No appetite for food or talk. Grudgingly refactored in this update over some days. Wrote some tests, not all passed. More pain. May have to convert them to unit tests
For clarity, my expectation is, I built this. Nothing should be impossible for me
Surprisingly, I caught a somewhat lucky break –an ex colleague referred me to the 1st gig I'm getting in 1+ year. It's about writing a plugin for some obscure forum software. I'm not too excited cuz it's poorly documented and I'll have to do a lot of groping, they use arrays instead of objects etc. There's no guarantee I'll find how to implement all client's requirements
While brooding last night, surfing the PHP subreddit, stumbled on a post about using Rector to downgrade a codebase. I've always been interested in the reverse but didn't have any incentive to fret over it. Randomly googled and saw a post promising a codebase can be upgraded with 3 commands in 5 minutes to PHP 8. Piqued my interest around 12:something AM. Stayed up all night upgrading it, replacing PHPSTAN with Psalm, initializing the guy's project, merging Flow auth with master etc. I think it may have taken 5 minutes without the challenge of getting local dev environment to PHP 8
My mood is much lighter than it was, although the battle is not won yet –image tests are failing. For some weird reason, PHP8 can't read generated test images. Hope I can ride on that newfound lease on life to study the forum and get the features working
I have some other rant but this is already a lot to digest in one sitting. See you in rant #4 -
There an ambiguity between VS2019 and VS2022
VS2019 simply works, and VS2022 is slow and full of bugs and MS keep telling they don't see the problem.
So I did nothing to this file, except adding one more test method and all of a sudden when code was broken elsewhere VS started to hard complain, fixed elsewhere compilation, but stuck with this1 -
That I don't know it.
[The ambiguity is on purpose - actually that would hold for any computer language: that it will never have the flexibility, precision, metaphorical power, somnambulistic confidence in dealing with ambiguous constructs or meanings that natural languages have.] -
#Suphle Rant 6: Deptrac, phparkitect
This entry isn't necessarily a rant but a tale of victory. I'm no more as sad as I used to be. I don't work as hard as I used to, so lesser challenges to frustrate my life. On top of that, I'm not bitter about the pace of progress. I'm at a state of contentment regarding Suphle's release
An opportunity to gain publicity presented itself last month when cfp for a php event was announced last month. I submitted and reviewed a post introducing suphle to the community. In the post, I assured readers that I won't be changing anything soon ie the apis are cast in stone. Then php 7.4 officially "went out of circulation". It hit me that even though the code supports php 8 on paper, it's kind of a red herring that decorators don't use php 8 attributes. So I doubled down, suspending documentation.
The container won't support union and intersection types cuz I dislike the ambiguity. Enums can't be hydrated. So I refactored implementation and usages of decorators from interfaces to native attributes. Tried automating typing for all class properties but psalm is using docblocks instead of native typing. So I disabled it and am doing it by hand whenever something takes me to an unfixed class (difficulty: 1). But the good news is, we are php 8 compliant as anybody can ask for!
I decided to ride that wave and implement other things that have been bothering me:
1) 2 commands for automating project setup for collaborators and user facing developers (CHECK)
2) transferring some operations from runtime to compile/build TIME (CHECK)
3) re-attempt implementing container scopes
I tried automating Deptrac usage ie adding the newly created module to the list of regulated architectural layers but their config is in yaml, so I moved to phparkitect which uses php to set the rules. I still can't find a library for programmatically updating php filed/classes but this is more dynamic for me than yaml. I set out to implement their library, turns out the entire logic is dumped into the command class, so I can neither control it without the cli or automate tests to it. I take the command apart, connect it to suphle and run. Guess what, it detects class parents as violations to the rule. Wtflyingfuck?!
As if that's not bad enough, roadrunner (that old biatch!) server setup doesn't fail if an initialization script fails. If initialization script is moved to the application code itself, server setup crumbles and takes the your initialization stuff down with it. I ping the maintainer, rustacian (god bless his soul), who informs me point blank that what I'm trying to do is not possible. Fuck it. I have to write a wrapper command for sequentially starting the server (or not starting if initialization operations don't all succeed).
Legitimate case to reinvent the wheel. I restored my deleted decorators that did dependency sanitation for me at runtime. The remaining piece of the puzzle was a recursive film iterator to feed the decorators. I checked my file system reader for clues on how to implement one and boom! The one I'd written for two other features was compatible. All I had to do was refactor decorators into dependency rules, give them fancy interfaces for customising and filtering what classes each rule should actually evaluate. In a night's work (if you're discrediting how long writing the original sanitization decorators and directory iterator), I coupled the Deptrac/phparkitect library of my dreams. This is one of the those few times I feel like a supreme deity
Hope I can eat better and get some sleep. This meme is me after getting bounced by those three library rejections