|
leper khan posted:Imagine not getting angry about programming languages Programming is work, and IDGAF about work.
|
# ? Jul 1, 2022 19:14 |
|
|
# ? Apr 26, 2024 06:53 |
|
heres some fun friday evening anger about python, the conan package manager and the brain worms that make people go like "what if we developed a aaa game with the same kind of clownshoes approaches used in web development" so we have this project where pulling and building all the required packages from internal repositories (mostly conan but there are also git repos and nuget packages and who knows what else nested in there) and then generating the visual studio solution takes literally hours from an empty cache, and a couple days ago they added an internal tool that serves as a front end for conan onto the pile (I dunno what for). that new thing have its own cache in the user directory and runs a "sandboxed" conan cache in there and long story short me and some other guy have slightly longer user names than most people so some path deep in the bowels of the process became longer than 260 characters and caused a build failure and we couldn't work all day meanwhile the russians just put everything on perforce
|
# ? Jul 1, 2022 19:46 |
|
Zlodo posted:heres some fun friday evening anger about python, the conan package manager and the brain worms that make people go like "what if we developed a aaa game with the same kind of clownshoes approaches used in web development" Sounds like your studio has a team that's bigger than the necessary size to support their work, so they build things to fill the time. Resulting in productivity losses because people don't like doing nothing or telling people to do nothing. So instead you invent problems that don't need to be solved, and iterate on existing processes where problems are found instead of evaluating why those problems exist and resolving the root issues. Unfortunately most organizations are like that. If you find a scalable solution to that let me know, I'd love to deploy it.
|
# ? Jul 1, 2022 19:59 |
|
toiletbrush posted:I've just started working on a C# codebase that has nullability checking turned on, and it seems a bit...poo poo. Like, first off, it seems that 'null' for reference types vs 'null' for value types is handled completely differently by the language, which makes it impossible to return 'null' from a method generic in T, even if the T in the return type is optional, unless you constrain T to be either a struct or a class, which is obviously a bit of a dealbreaker if you want the class to be generic over any T. Otherwise you have to return 'default', which doesn't work if you want to tell the difference between, say, null and zero. it is a bit poo poo, it's a set of compile-time guardrails bolted onto the language decades after the problem it's trying to fix was created. imo it does a good job balancing between making new programs better and not getting in the way of old ones but there are always going to be warts. as to your specific question, you might consider something like C# code:
Shaggar posted:! is a hack to work around the compiler not being able to understand certain null checks. Like imagine you have IEnumerable<Butt?> butts. If you try to iterate the content you're gonna have to null check everything, so a simple way to avoid nulls would be var nonNullButts = butts.Where(_=>_!=null). However, the compiler cant really understand that and will treat nonNullButts as still being IENumerable<Butt?>. As a workaround you can change it to butts.Where(_=>_!=null).Select(_=>_!) which will force the compiler to treat the output as IEnumerable<Butt>. cool linq tip: in simple cases you can use OfType to avoid having to use !
|
# ? Jul 1, 2022 20:12 |
|
i would simply create null objects that log a warning when actuated, and return them instead of an actual null
|
# ? Jul 1, 2022 20:54 |
|
Shaggar posted:! is a hack to work around the compiler not being able to understand certain null checks. Like imagine you have IEnumerable<Butt?> butts. If you try to iterate the content you're gonna have to null check everything, so a simple way to avoid nulls would be var nonNullButts = butts.Where(_=>_!=null). However, the compiler cant really understand that and will treat nonNullButts as still being IENumerable<Butt?>. As a workaround you can change it to butts.Where(_=>_!=null).Select(_=>_!) which will force the compiler to treat the output as IEnumerable<Butt>. whats frustrating is I'm trying to find a way to tell if an optional property of a deserialised object is 'null' because it was explicitly set to null, or because it was missing. if it wasn't for the nullability of int? and string? being represented in a totally incompatible way, it would be pretty easy.
|
# ? Jul 1, 2022 20:57 |
|
Zlodo posted:some path deep in the bowels of the process became longer than 260 characters and caused a build failure and we couldn't work all day iirc this is a windows group policy thing that has nothing to do with python. i would probably use perforce though, agreed
|
# ? Jul 1, 2022 20:59 |
|
raminasi posted:
ah yes, OfType, anders hejlsbergs handmaid
|
# ? Jul 1, 2022 21:29 |
|
12 rats tied together posted:i would simply create null objects that log a warning when actuated, and return them instead of an actual null don't forget to overload the == operator to make them compare true when compared to an actual null also make it really expensive for no good reason if you can
|
# ? Jul 2, 2022 05:09 |
|
12 rats tied together posted:i would simply create null objects that log a warning when actuated, and return them instead of an actual null nice, the worst of both worlds
|
# ? Jul 2, 2022 06:47 |
|
12 rats tied together posted:iirc this is a windows group policy thing that has nothing to do with python. i would probably use perforce though, agreed Enabling long paths didn't fix it. I don't think python was the culprit though, it looked like the microsoft compiler itself not dealing with long file paths because Microsoft gonna microsoft
|
# ? Jul 2, 2022 10:23 |
|
even when long paths are enabled at the os level, applications themselves still have to be long path aware either by prefixing paths with "\\?\" or opting in via the application manifest and explicitly using the 'W' suffix unicode functions. not surprising at all that there are applications that still don't do that. explorer.exe of all things wasn't long path aware for the longest time. it was entirely possible to make a nested set of directories that couldn't be deleted without special tools
|
# ? Jul 2, 2022 11:30 |
|
Corla Plankun posted:do the stuff that changes the least (e.g. installing required packages) first in the docker file so it will be cached, and copy the code at the very end because it changes all the time and will usually not be cached when you build the docker image shout out to you for this reminder, looked at a Dockerfile yesterday and realized it'd deploy much faster if I copy my requirement.txt in, pip install that, then copy the rest of the code. blazing fast now
|
# ? Jul 7, 2022 21:43 |
|
hell yeah, now you're thinking with docker
|
# ? Jul 7, 2022 22:24 |
|
work group chat: "hey, let me just paste this c++ error" "wait, cannot send, message length limit exceeded"
|
# ? Jul 7, 2022 23:00 |
|
omeg posted:work group chat: i used to do this all the time with c++ lol
|
# ? Jul 8, 2022 00:15 |
|
Friday afternoon mood: just considered returning a tuple of thruples in a method
|
# ? Jul 8, 2022 16:46 |
|
Powerful Two-Hander posted:Friday afternoon mood: just considered returning a tuple of thruples in a method define the struct like a civilised member of society
|
# ? Jul 8, 2022 17:00 |
|
Armitag3 posted:define the struct like a civilised member of society you can't make me!
|
# ? Jul 8, 2022 17:03 |
|
Powerful Two-Hander posted:Friday afternoon mood: just considered returning a tuple of thruples in a method lol do it
|
# ? Jul 8, 2022 17:15 |
|
Powerful Two-Hander posted:Friday afternoon mood: just considered returning a tuple of thruples in a method have you no scruples?
|
# ? Jul 8, 2022 17:20 |
|
I took the cowards way out and used getters on the object that the thruples are sourced from in the first place why was I making GBS threads out separate tuple/thruple objects manually instead of doing this before? I guess because me 9 months ago was an idiot.
|
# ? Jul 8, 2022 17:23 |
|
imo use a fixed length list with magic indexes, it's more efficient
|
# ? Jul 8, 2022 17:51 |
|
Powerful Two-Hander posted:I took the cowards way out and used getters on the object that the thruples are sourced from in the first place *: Kind of like python named tuples or data classes that you can define ad hoc when you create them.
|
# ? Jul 8, 2022 18:22 |
|
Carthag Tuek posted:imo use a fixed length list with magic indexes, it's more efficient there is zero efficiency in this whole thing tbh because it's building a graph by querying related nodes and then stuffing the edge into a dictionary, but you've gotta check if the edge exists in there first because our data source lets you map poo poo up in illogical and duplicative ways! so the thruple key on the dictionary is <relationshipTypeEnum, fromId, toId> Powerful Two-Hander fucked around with this message at 19:44 on Jul 8, 2022 |
# ? Jul 8, 2022 19:42 |
|
i was just making a funy but i guess it sounded too real
|
# ? Jul 8, 2022 19:44 |
|
sorry
|
# ? Jul 8, 2022 19:45 |
|
Carthag Tuek posted:i was just making a funy but i guess it sounded too real with "modern" "programming" it is impossible to tell if something is a joke or not
|
# ? Jul 8, 2022 19:45 |
|
Carthag Tuek posted:sorry never apologise for posting
|
# ? Jul 8, 2022 19:46 |
|
that sounds suspiciously semantic weblike i have been telling you to run away for a whole year now, i think
|
# ? Jul 8, 2022 19:51 |
|
bob dobbs is dead posted:that sounds suspiciously semantic weblike mark that in your diary lol this is my own pet "spare time" project (which is why it's been 9 months since I last touched it), generating a DAG of our reference data structure(s) but ordering it into layers like a hierarchy for display using some handy libraries I found that integrate with d3. at this point I mostly just need to put some decent SVG graphics onto it but
|
# ? Jul 8, 2022 20:05 |
|
Powerful Two-Hander posted:there is zero efficiency in this whole thing tbh because it's building a graph by querying related nodes and then stuffing the edge into a dictionary, but you've gotta check if the edge exists in there first because our data source lets you map poo poo up in illogical and duplicative ways! i hate it when work stuff gets like this like, when my task is to drop in and make a system compatible with symmetricFartRelationshipType or whatever but then i get in there and discover something this nasty but don't have the time to deal with it, so i just have to debase myself and hustle through the poop
|
# ? Jul 8, 2022 20:32 |
|
obviously no offense meant if you wrote the original or whatever, we've all written garbage and sometimes it unexpectedly becomes loadbearing
|
# ? Jul 8, 2022 20:34 |
|
Powerful Two-Hander posted:never apologise for posting 🥰
|
# ? Jul 8, 2022 20:34 |
|
Corla Plankun posted:obviously no offense meant if you wrote the original or whatever, we've all written garbage and sometimes it unexpectedly becomes loadbearing theres nothing more permanent than a temporary solution. - oscar wilde
|
# ? Jul 8, 2022 20:36 |
|
its 4:30 on friday and im pushin to prod
|
# ? Jul 8, 2022 21:36 |
|
CarForumPoster posted:its 4:30 on friday and im pushin to prod gently caress you lol
|
# ? Jul 8, 2022 21:38 |
|
Hell yeah gently caress da police
|
# ? Jul 8, 2022 21:45 |
|
not only do we release on fridays, we only release on fridays
|
# ? Jul 8, 2022 21:47 |
|
|
# ? Apr 26, 2024 06:53 |
|
every thurs/fri we're like oh we need to push the new feature but then we're like ehhh nah weekend is coming up let's do it next week and then we forget and the cycle repeats no deployments = no new bugs
|
# ? Jul 8, 2022 21:52 |