#programmers-off-topic
1 messages · Page 12 of 1
yeah, it's too into you
all to disguise the fact that it's a large language model and not actually a person and will be wildly incorrect
Yeah, they think that having it speak in casual language will help, and its probably true
Because of my near perfect memory I almost never get lost
I may not be able to find my destination but I can always find my way back to my starting point
Also, I recall like, road closures and pot holes
Driving with anyone else is fun because I'll be like "don't take the left lane, it has potholes."
Does it work as a key
I want to assemble an entire keyboard of big punchable pillows
I have this, it does
Baby
he slemp
"finally got my emacs set up just the way i like it"
everything bound to alt and ctrl like a true emacs user
I've heard of emac being sometime people who hate themselves use... What is it so I can learn it for no reason than I wanna learn something to meme about
ok so this is already going to be considered incorrect by some people but
in its essence emacs is a text editor
a very configurable text editor
the defaults are absolutely miserable
and don't follow any standards you'd be used to
Lol
most people who use emacs opt to use doom emacs or something like it
Why do people say it's not a text editor
because it's so configurable that it can essentially do anything
some people call it an operating system, usually as a joke
I've never met an emacs user
I do really, really want to get to grips with vi-style controls, though.
i had a college professor who was a contributor to one of the mac emacs GUIs
Also, my joke was going to be that emacs is a mispronunciation of iMacs.
I can recommend learning vim controls. Not actually vim itself I'm fairly neutral on that
besides, everyone knows emacs stands for escape-meta-alt-control-shift
Yeah, I like my creature comforts too much to actually use vim. But the control style... I want that.
it's very very nice once you're used to it
and every editor under the sun has a vim plugin
I like vim, but yeah it takes some plugins to get it nice
not too many tho, i think some people go a bit overboard
to the point where you might as well use something else
me
I've stopped using vim for anything other than tweaking configs now though
zero plugins
it's pretty good
Kate is nice to be fair
Vim sucks (the terminal editor) nano is better... I only say this cause I don't know vim controls
Vim great
vim is good for what it does but i only use it when i HAVE to
Unhinged question (c#) time! If I have a string type name, can I attempt to cast a generic object to that type
Completely theoretical I am not building anything cursed trust me I would never do that
(Runtime cast, not compile time if that wasn't clear)
There are explicit and implicit cast operators you can override, but I'm not sure if it can be done with any generic object
I'll have to mess around with it
What does this even mean
If you have a string being type "StardewValley.Object", can you cast something to that?
(something generic)
That was my understanding, anyways
Yes this
Casting isn’t real, in a way
The string could also be StardewValley.Character or anything else I'm assuming
this seems like something you'd needed to entirely error-check
Yeah but… that makes no sense
what if it's not a valid type?
you can apparently convert objects between types (with object and Type at runtime, tbc), but I have no idea where it'd make sense to do so 
Throw an error and make it someone else's issue /j
I don’t even know how to explain it, but what you’re asking for doesn’t make sense
What I'm wondering is why you'd be doing this
What would you do that for yeah
But of course, you said that definitely wasn't for cursed reasons 😛
Saving data and it's type information together
So you know what to deserialize it to
If there's a less cursed way please inform
success, if this counts 
object thingToCast = 12345;
string typeName = "System.Int32, System.Private.CoreLib";
Type type = Type.GetType(typeName);
object convertedThing = Convert.ChangeType(thingToCast, type);
if (convertedThing is int intThing)
Monitor.Log($"converted to this integer: {intThing}", LogLevel.Info);```
but in practice you'd probably want to know what type a given serialized field* is by some other means
Your code literally did nothing
true, I should've made it some other compatible class, since it's int before and after
thingToCast is int intThing would do the same thing
and this seems to me like something else completely
anyway, that's already what Newtonsoft does for non-sealed types, pretty sure? maybe it has to be configured, can't remember
it serializes any object, and also serializes its' GetType().FullName or whatever, in a $type field
what are you serializing? usually if you need a custom class people register it with SpaceCore, but also you can usually avoid custom classes tbh
Shhhh this is offtopic
(version that technically does something)
object thingToCast = 12345.6789f;
string typeName = "System.Int32, System.Private.CoreLib";
Type type = Type.GetType(typeName);
object convertedThing = Convert.ChangeType(thingToCast, type);
Monitor.Log($"convertedThing.GetType(): {convertedThing.GetType()}", LogLevel.Info);```
`[TestMod2] convertedThing.GetType(): System.Int32`
that would do something, yes, but isn't what is being asked for
People are gonna specify types for serialization to json and for reading specific keys but I thought it'd be neat to be able to iterate over keys of different types. But the user is gonna need to know what type to cast values to if they could be anything
my response was to the much more vague initial question 
sorry sorry Esca
more to the point, yeah, you can do some slightly more helpful tricks with Newtonsoft types if you need a single field to accept multiple types, but it's still pretty necessary to know something about what's coming in
When it is originally serialized it's gonna know the type if that helps
if you're working with object, you don't need to cast anything - what you need to do is construct the instance of a correct type
if you're working with a generic type, you just additionally cast to it
e.g. FTM has a nonsense list of object spawn info* that can be an object, string, or integer, which it just tests for ahead of use
when working with values of unknown runtime types, the notion of "casting" doesn't make sense
I've never messed with newtonsoft or serialization before so sorry if I'm not super clear
no worries, but yeah, I'm not entirely clear on the intended format 
i mean i've serialized stuff to json but like i'm not a c# type system or newtonsoft knower
ok here:
- person A serializes an object of type MyTypeA to json under the key "key1"
- person A serializes an object of type MyTypeB to json under the key "key2"
- person B wants to iterate through the dict containing "key1" and "key2", and get the key-value pairs. But person B would like to be able to treat the deserialized values as their respective types of MyTypeA and MyTypeB (through a cast of some kind?)
basically:
- on serialization, you want to store whatever properties your unknown object has, along with the type name in a field like
$type - on deserialization, you need to read the
$type, find that type in some way (check all assemblies etc), find a constructor you can use, invoke the constructor to get a correct instance of that type. then, fill the remaining properties of the newly created objects with whatever else was serialized
and none of this involves casting
well, there will be casting, the moment the user wants to iterate over that dictionary and actually use the correct types
because keys will have to be a common type
tone is hard over the internet so i want to preface this by saying i'm not trying to argue at all, just understand. But in this method how is person B going to know what type the value is after deserialization? how is that information communicated?
and their common type is object, most likely
- if person B is doing something that can accept
objects of any type at all, they can just leave each one as anobject; the data is technically still there, even if their code doesn't know what it is - if they can only handle certain types, or need to do something based on the type, you can test for that
(it may help to think of them in terms of inheritance, likeif (objectA is Item item){} else if (objectA is Character char){}etc)
newtonsoft types may also help because you can interact with them directly as things like JObject for any random {} class
(iirc, anyway, it's been a while since I dove into that)
so newtonsoft can give back an object that by polymorphism is actually of type MyTypeA at runtime and you can pattern match for it with is?
it has to
and it remembers what you serialized it as originally and handles the deserialization type?
if you're serializing a known sealed type, it doesn't have to store that info, because you're giving it the type on both serialization and deserialization
I guess what it loads into depends on the context where it's deserialized, unless you give it type definitions* like Shockah mentioned above 
in my context I did some parsing to see whether each object could be certain types, basically
if it's a type that involves polymorphism, $type is used
thank you all for your explanations and examples
otherwise it would be impossible to deserialize, other than maybe into a generic Dictionary<string, object>
i guess in theory it could give you anonymous objects...
It would come back as an object, you have to enable TypeNameHandling
the newtonsoft docs sure are something
i'm not sure TypeNameHandling is a required option if it can tell polymorphism is involved
OH I see, yeah since both MyTypeA and MyTypeB are available in the same context, newtonsoft should auto serialize the TypeNames
I was in there the other day. I think it's hilarious that they're still using a 2010 meme for their logo
Update: both lexical-vscode and elixir-tools.vscode (next-ls) crash on load. Back to elixir-ls, I guess 😕
not ideal
Yeah...........
(back from getting distracted again)
in case it helps as a reference, here's most of FTM's newtonsoft-related nonsense, which does deserialize something as a Dictionary<string,object> 
https://github.com/Esca-MMC/FarmTypeManager/blob/master/FarmTypeManager/Utility/Spawning/Monsters/ValidateMonsterTypes.cs#L216
numbers can be checked with is long, lists with JArray, etc, in cases like that
(better to actually have known types for fields or serialize them, though)
yup. Without the context during serialization (Or in the case of FTM which is user generated), its just pattern matching. Could also write your own JsonConverter but its not worth the effort unless you really want clean code, since it just moves the code to a converter.
yeah, I think the only jsonconverter I used was in something else for formatting's sake 
I've got a few custom JsonConverters, one for doing discriminated types without the glaring vulnerability of accepting a type name.
ah, JToken. I have a love/hate relationship with them
(actually nevermind, it was for a stardew time class, either predating the one built into SMAPI or just because it made deserializing times easier)
I've got context at serialization time, just potentially not at deserialization time (except it appears newtonsoft will remember the type information so it may be fine)
internal class ReadonlyContractResolver : DefaultContractResolver
{
internal ReadonlyContractResolver()
{
SerializeCompilerGeneratedMembers = true;
}
protected override JsonProperty CreateProperty(MemberInfo member, MemberSerialization memberSerialization)
{
var prop = base.CreateProperty(member, memberSerialization);
prop.Writable = true;
return prop;
}
}
This is my favorite thing. Deserializing read-only properties.
yeah, if you're generating the json yourself it's probably fine, my case was "content.json where people write dictionaries with flexible value types"
(and converters are generally like "my json has a number in it, give me this specific class")
one of many reasons I'm glad to have retired aerocore is the absolutely terrible thing I tried to do with the particle system
@ocean wolf what are you using Pintail for, and why .NET Framework 4.7.2?
the data was a game asset but the actual data was stored as object and then translated into an actual behavior class instance by string name. which meant I had this horrible hacky thing where it had to try its best to convert a mystery object into a reflection-obtained type. I think I've learned my lesson from that one
Ah I was trying to share some APIs across some mods and utility assemblies, without a hard reference to each other, and I was trying to see if I can also use the lib on older packages
I know SMAPI can do that but I also want to learn if I can use pintail directly
you're saying mods. so why Framework 4.7.2?
I was using SMAPI for mods to share API, but I got curious if I can use pintail on other packages, which are not mods
I can get it to work by bumping c# version but those would also require consumer ends to also bump c# lang version
if you're still using .NET Framework 4.x in 2024, then you're either a maniac or using Unity - either way, it sucks
I agree, to both
Anyways thanks for the awesome lib, it works like butter except I don't have the knife :))
i'm not sure if i'm using anything that is specifically .NET 5+, honestly
and ehh, personally i hate a lot of how it works
i'm glad it's helping people
but man
it really needs a rewrite and a better approach to some things
It's possible to compile for 4.7.2, there's a few changes necessary but I did compile it last year.
It's working correctly if I bump consumer assembly's c# version to 9+, with polysharp which I have already been using
but always wondered if I can do without
So I'm trying out vss for the first time and I get this cute lil lightbulb on a lot of my code suggesting that I sort properties
Doing the thing makes my whole json laid out in reverse to what it should. Am I just gonna ignore these kind little lightbulbs forever or is there a way to set it to the format jsons should be for stardew
Posted in off topic bc its just a software question
I have never once found vscodes lightbulb suggestions useful
Okay good to know, lightbulbs are on but there's no thought behind them
I automatically tune them out. Forgot they were ever there 🤣
They're very cutely drawn! I wanted to trust them! /lh
what do you mean in that it's laid out in reverse?
does it start at Z?
quick actions (the lightbulb) can be pretty useful at times
just depends on the language server you're using
most just as a way to save some typing here and there sometimes
If I do all the changes it says to do, format ends up the very last line. Then my config, then my tokens, then my actions at the very top
as far as I know the quick action for sorting properties just looks at the alphabet and doesn't look at anything else
I mean json doesn't have a whole lot more to base it on
off topic so it's here but relevant to captcha convo in #making-mods-general : this was part of a captcha i had to do once
triceratops crab?
Triceracrab
it was a spider
i failed it like 12 times before i realized twitter just really didn't want me to make an account
That’s not at all a spider wtf!
Clearly Twitter firing most of their staff has had consequences lol
oh the triceratops spider is the one you are supposed to click
it said click the one with the mismatched head and body
It also has the wrong number of legs for a spider
Really clever use of filter and blend mode on the Google Labs website to add a glow to the beaker animation
/srs btw. I don't think I'd have ever thought about reusing the video with mix-blend-mode: screen to accomplish that.
So I'm experimenting with VS for writing up game code and someone here suggested I try ilspy or another program with basically the same name to sort through the decompiled game to see when certain things are used and such. But uh.... ilspy is not for the 2022 edition of vs. Is there a program people are using on this edition that does what ilspy does?
IlSpy is independent software?
it exists in the form of an extension too, but yeah, the people most likely meant the standalone app
(Also ilspy 2022 exists) But its really just a shortcut to open something in ilspy
I swear I spent an hour looking for that 😐
Oh I see how I messed it up
For whatever reason when I sort to show things tagged decompiler the only version of ilspy that shows up is the 2019 edition
Yeah the 2022 version literally just opens stuff up in the ilspy app
because visual studio 2022 already ships with ilspy decompiling
If you right click on something, there's a little option for Go To Definition. That's done using the ilspy decompilation engine
(The app comes with features like analyze so I still recommend it)
Okay so now I go find the actual ilspy program and begin messing around in it got it thank you all so much
I also feel like I get less confused
When it is separated
And I'm not digging through nine million VS tabs
That makes a lot of sense too
(typescript enjoyers appreciation post, that is all)
i didn't realize 2022 ships with ilspy decomp, TIL.
i have used it and dotpeek for tweaking binaries, i think they're vaguely almost the same thing.
if it weren't for the tweaking/saving of modified dlls directly it sounds like i could get away from needing the app.
@bronze idol My problem with JS is that its too dynamic for me, C++ is static. There's one way to do a thing and it reads up to down in order
Javascript throws all that out the window and lets you put things ANYWHERE
And it bothers me
It makes me cry
yeah, you just kinda do what you want. it isn't really about type safety.
C++ will let you read 13 random bytes from somewhere in dynamic memory even if it's not set
mmmm blown pointers
C++ will give you control to do MORE cursed stuff
that's why typescript is widely enjoyed; you can always strap type safety on.
not its enums though
personally been enjoying learning about blazor, but that's weapons grade koolaid
I did try typescript, but without understanding Javascript, I basically knew half of it
So I didn't really UNDERSTAND ya know?
look, i have to use mongo at work (not for long hahahahaha) and i'm sort of forced to use js in shells
As in mongodb?
ye
I want to like mongodb
but i do secretly love being able to do stuff like db.facility.find({}).toArray().map(f => f.StaffAssignments).reduce((a, b) => a.concat.b, []);
don't it's a trap.
Ok cause I don't 💀
it's not the silver bullet people make it out to be.
We use mongodb at work, we use the c# package for it though so no javascript
aye, we use the mongo driver but most native admin shells are js
right
having said that, we were hamstrung by a sql-hating architect into using mongo
we're a very relational data "thing"
it was a mistake to avoid sql
our mongodb is only used for fairly unstructured state we essentially need to dump somewhere for reloading state it's very simple in nature
oh you mean WHAT IT WAS INTENDED TO DO?! lmao
What do we think of neo4j. Are there any neo4j enjoyers here
you're so lucky to actually be using the correct tech stack for your problem scope!
idk anything about neo4j tbh
same
for the most part we just use a gigantic overgrown MSSQL database
I've never worked anywhere that's used a graph db but I think they're very cool
I've read about them but never used em
I always just go for a regular relational database
it's simple and more than good enough
same. it's all i know, really. i mean i know mongo now but we use it relationally so it's optimized relationally and it's a misuse of mongo
we're converting back to sql, it is long awaited
we fired that arch last year
we're having to pay his many debts
Graph dbs are fun for networks and similarity and clustering and stuff
we looked into using Atlas for search but our relational database is so complex that atlas literally just does not support doing that
mssql full text indexing an option?
for some situations, yeah
elastic search has become our go to
for more complex needs
search is a problem we don't have much. our needs are very simple at a user level.
i reckon we could come up with more complex problems to solve but we haven't yet
search is a fundamental part of much of our software and especially the webshops
yeah. we're medtech. as we get more into ML and analytics stuff we'll likely have to deal with something tangential to search, broadly, but not literally search
more like.. correlative querying or how to objectively relate domains that are classically not related
if that makes sense
yeah
it doesn't to me, trying to think of a better way to articulate that. but the only things we have to search for are like.. patient name and social really
a better example would be like.. taking freeform data and objectifying it to a machine state. like detecting the words "patient on oxygen" and all its variations to objectify the boolean: IsPatientOnOxygen
et al
so it's search adjacent, if you think about it
if you squint lol
i remember some software thing being presented to me somewhere about being able take natural written doctor's notes and turning them into more concrete data automatically
no idea if it was any good
yeah. that's honestly a space where AI can do some good. dictation or writing transcription, up to and including digitization.
it's one of the few places i'd consider allowing AI to get a foothold, as long as the information was promised to be consumed ethically
if at all
we recently interviewed a team doing AI transcription for something, up to the point that it integrated with your EMR, did data entry in very specific ways
conceptually cool, but i'm skeptical of anything AI. it's usually 3 LLMs in a trenchcoat
same
we've had management talk about AI since that hype started but we haven't done anything with it so far
tbh management isn't even sure what it'd do
they just want AI
find something contrived to procedurally predict and then you get to say your app has predictive analytics (???) profit
buzzword city. like ajax
I think the one thing they've said where I can see the use in theory of an AI model is our module that automatically tries to figure out how much you should restock of every item in your warehouses
but on the other hand clients seem to have very specific niche demands for that and you can't really finetune an AI like that usually
you know what we figured we could use AI for? chatbot for support and conveyance of knowledgebase topics that have existing documentation. like train an LLM on our company protocols and helpful FAQ stuff, do something for the user that is a win-win. 24/7 support with some way to bucket the unresolved requests so we can satisfy them. there's lots of reasonable applications outside the increasingly popular plagiarism engine.
i think it's not that people lack the creativity to use it responsibly; we just have to get over the hurdle of immoral loss leaders using it irresponsibly.
it gives the whole thing a stigma
but we still have to give it crap and stay vigilant
I think we considered something like that too
the important stipulation at our corp is just that it can't replace a person
it makes our people's lives easier, less phone calls. but you still need a human in that seat. someone's gotta train the bot and field the unresolved stuff.
too many companies are seeing it as some kind of bold cost cutting initiative rather than being a quality of life improvement for their people
I mean they'll just reduce the number of support people they hire to the breaking point where support is constantly handling the unresolved requests
you're likely not wrong. it makes things redundant by nature. i think philosophically it's a dilemma. do you make a person do tedious, robot things because it's the right thing to do for them financially
it stands to reason there's a finite number of novel problems, in a situation like support, over any length of time. so yes, someone's getting fired if the robot is taking the majority of the easy ones.
this all assumes the robot doesn't just fail to deliver good outcomes
our support team, anecdotally, is small, and overworked by their own reports. the amount of good the AI will do is dubious at best
and "fire" is a mischaracterization. "made redundant" does really mean what it's supposed to here
the place i work is prone to moving you to a different position rather than cutting you loose, but companies are inherently worker hostile so this isn't something i say gladly. not really fond of boot
I am moving tomorrow
Am trying 2 make farming game just like stardew but I can't figure out tilemaps
im losing my mind, im getting a null exception thrown from the try section of my try/catch block. what is the handler for the catch, you might ask? why, a NullReferenceException, of course. im gonna go watch tv and think about life
is it async code
Time to actually finish this project I'm going to start, I swear
good luck
an important function
I actually have an idea for a godot project, but I wanted to do this first
gotta wait long enough until I've forgotten all my godot, as is tradition
"tf is a node"
it's really caught on as a 3x5 font, I see it in a lot of random places
can't imagine you could make a font smaller than that and still be remotely usable
3x4...
consessions had to be made
how is this readable
i mean
it is readable
i don't understand how i can read it
✨ magic ✨
Your brain brains good
Live on Twitch: https://twitch.tv/lowlevellearning
🏫 COURSES 🏫 Check out my new courses at https://lowlevel.academy
🙌 SUPPORT THE CHANNEL 🙌 Become a Low Level Associate and support the channel at https://youtube.com/c/LowLevelLearning/join
Why Do Header Files Exist? https://youtu.be/tOQZlD-0Scc
How Does Return Work? https://youtu.be/e46wHUjN...
Me: Hey new guy, this commit is doing a lot of different things, it might be best to split it up if you can
New guy: No problem, I've split it up into seven different commits, here you go
he did what was asked of him
that he did
I ought to learn godot if I'm ever gonna make a stardew copy
During my time developing a mod for Minecraft, it got REALLY frustrating finding a mod I wanted to use as reference but its Fabric/Quilt and I'm using Forge
On the one hand I'm glad the community finally has more choice and the forge team isn't being mistreated by the lead dev anymore. On the other, it makes learning to mod a freaking nightmare
But I digress, my worldgen mod finally FULLY works
Now I'm dealing with getting the Warden to swim
I was going to make a follow-on comment about how the PR process at my current company sucks, but then I realized that describing it would require like three paragraphs of backstory to understand why we do things the way we do and why someone in the distant past thought it was a good idea.
lmao
our pr process is simple
open pr -> get approval from 1 dev and 1 tester -> it's merged gratz
Yeah the problem I have is basically that someone decided to split out a separate “UI” “component” “library” for our front-end team. So most changes require two PRs, one to modify the UI components (or build a new one! We have like 10 different modal dialogs! It’s great!!!!) and another to pull them into the actual front-end project
Except we don’t import into the front-end project from a GitHub link or something; we import from Artifactory. Guess what the CI/CD pipeline does?
It doesn’t deploy to Artifactory, that’s for sure! You have to do that manually before you PR, so the PR process for the UI library is literally just SVN, since everyone makes changes on different things simultaneously, and then we end up with package version 1.5.230 which has Dev A’s changes, and 1.5.231 which has Dev B’s changes but not Dev A’s changes
I hate it here
I don't even understand what is going on there
even if you want a separated component library, if it's only used by 1 project you might as well just put it in the same repository tbh
can always move it out later if necessary
The original ambition was to make it reusable for multiple projects, and on paper it is, but in practice all but one of the projects just uses the basic UI primitives, and then people have built on top of them inside of the UI repo because “this is where the UI stuff goes”

I think you need more dialog box components
what about another card
Hell yeah, hell yeah hell yeah hell yeah
have a completely separate component for each possible combinations of buttons on the dialog instead of being able to configure those in one
We have a modal dialog which confirms deletion of a specific type of database entity, because the logic for calling the API to mutate the database is inside the component code for the dialog aaaaaaaaaaa
But of course we still have to type the component to accept arbitrary strings and localization
ah yes I too bundle my business logic with my components so it's nicely separated for when we need this specific exact usecase again
woah you test commits
prs yes
Lmfao exactly
we have 3 testers at work they have long lost all joy in life
much like the developers
no they can't
What the FUCK IS AN SDET ANYWAY?! 
we don't have enough testers so product owners end up testing a bunch of stuff
but they don't know how to automate tests and are generally just not as good at it
This is so validating
When I joined last year I found some UI test code that was testing the MFA pin code boxes by going, basically
document.querySelectorAll(“.pin-code-box”).forEach((v, i) => v.value = i+1)
In order to type out 123456
Instead of, you know, focusing the first box and the typing the full code, like a user would do???
Like, it passes, but you’ve completely missed the point
It was e2e and the company hasn’t built a method for us to automate getting an auth token in our tests 
So we log in manually ✨
have you considered like... selenium
cant use third party libaries, that requires legal approval
Oh, nah, what I mean is like, at prior companies I’ve had a testing harness that exposes, like
const token = API._unsafeGetSessionToken(process.env.TEST_USERNAME, process.env.TEST_PASSWORD)
document.setCookie(‘sessionAuth’, token)
seems reasonable
But my current company doesn’t have that, so we have to go
$$(“.login-button”).click()
Await waitForLoad()
$$(“.username-field”).type(process.env.TEST_USERNAME)
// repeat for password
// click the button
// conditionally handle MFA prompt
// oops, the login team added an interstitial for passkeys, gotta dismiss that
is the endpoint where tokens are requested not available to the testing application?
Nope, not really, because from our perspective, the code underpinning the login flow is a black box. We don’t own it, and it may change without warning
The login flow is SSR as well
Could we try to scrape our own company’s login page and fake a request? Yeah. But that’s basically what we have now, just with extra steps and way more brittle
i mean yeah you'd want something actually intended
Right. But try getting that on the agenda at a F500 company
I write for both the front end and the back end so when I need endpoints for something I can just add em
we have a generalized login endpoint. The implementation behind the scene changes but the api is consistent
kinda the point of apis I suppose
Yeah, and herein lies the pain of being in such a large company that you’re essentially an oauth client of yourself
Because we have backend engineers on our team, but none of us have the ability to bypass the login flow
And creating an automation endpoint would probably have to go through multiple phases of review to ensure it couldn’t be misused to bypass MFA outside of the very specific e2e cases it’s designed for
And at that point the cost-benefit analysis turns into “fuck it, whatever”, and every team writes their own e2e automation to navigate the login flow
efficient
I wish I had even a tiny amount of influence over it
I'm not sure there's any application at my company that I haven't worked on at this point
the webshops I suppose
What’s the size of your company if you don’t mind me asking?
130 ish people + 3 outsourced teams of like 5 ish people each
Okay that makes sense. Most of the positive experiences I’ve had in this industry are at companies that size
My current company’s total engineering headcount is north of 10,000
wild to me
I always wonder what's even going on at businesses that big. Like there's so many companies that essentially make like 1 product and then somehow have over 100 engineers
and I'm just like... what are they even doing?
tbh with the sheer number of people that got fired when the investors got scared I think a lot of companies were actually employing more people than makes sense
I wonder what percentage of the employees of a company like netflix are support
13,000 employees. As far as I can tell the actual product hasn't meaningfully changed in a lot of years with pretty much no new functionality added
you'd need a bunch of people to manage the server infrastructure and a few devs are definitely necessary
but
we have like five different departments in different sectors which all work more or less independently. We're a hardware company tho, so we make a whole bunch of different actual products plus all the software that runs on them, not to mention all the support, sales, IT, security, etc
yeah that's why I wonder how many of the employees at tech companies are actually developers, it's gotta be a small percentage
I get the impression most of the people in my actual department are engineering, but I dont see much of the support departments at all
I'd guess around 60% of the company I work for is support and consultants
maybe even 70%
there's only 3 people at sales which I find amusing
ew consultants
consultant in this context is essentially dedicated support for specific clients. Like the clients that are like multimillion euro business get their own dedicated consultant they can contact instead of dealing with support
those consultants are experts on that specific client's needs and in theory the one we also go to if we need to know something about their workflow or what they want
one of em recently got fired for fraud so that was fun
Nice
we used to have a security adviser or something but I had no idea what she did and when she quit they never actually got a replacement and nothing changed as far as I could tell
oh somethings changing, you'll only find out once its too late
she didn't even know how to share her screen during a meeting
had zero technical knowledge
she mostly just sent emails every once sending us news articles about how some company got hacked and that we need to stay alert
okay maybe she wasnt doing much
actual security vulnerabilities are reported by IT
she's also the wife of my manager
so
some strings were pulled I imagine
whattt nooo
kinda impressive that I work for a tech company but most of management is seemingly completely computer illiterate
or as theyre more commonly known, "management"
101110010101
gasp
What is the Bend programming language for parallel computing? Let's take a first look at Bend and how it uses a Python-like syntax to write high performance code that can run on the GPU.
#programming #tech #thecodereport
💬 Chat with Me on Discord
🔗 Resources
Bend Language GitHub https://github.com/HigherOrderCO...
i require this i guess
since i have 3 GPUs
have you considered 40 gpus
but why
to look at on a shelf
none of these pages say anything about whether they support amd gpus or not
considering they keep mentioning cuda I'm guessing no
I suppose I can give it a shot
what do you even do with the AI
i dont like ai
I don't dislike ai itself but I dislike a bunch of recent ai trends
i just use it as a friend 
i wanna have it eventually be able to control my pc via voice commands
I dont know how to tell you this but you can do that now without AI
fair, the current trend of AI stuff is off putting even to me
i know, ive found a program that does what i wnat via voice perefectly, so i have less of a reason to use AI
those are some weird ass benchmarks
but its also the only thing ive found that can use all 3 GPUs and 128 GB of ram
(i like testing my PC :3 )
you can set up SLI (does SLI still exist)
not really
SLI is windows only?
the program is to my knowledge
does NVlink take any card?
no
from the "NV" im guessing nvidia only
yes and even then only their enterprise gpus
for consumer hardware sli type tech is essentially dead
just gotta be willing to spend several thousands on enterprise parts
i sadly am not(yet)
id rather get a TPU first
the day QPUs come out is the day im gonna be happy
it can do really small calculations really quickly
I mean, quantum processing tech is already commercially available through ibm but due to how it works I find it highly unlikely it'll ever be something one can actually buy instead of rent computing time
most people don't have liquid cooling and a vacuum chamber inside a faraday cage inside their homes
i mean , im on Linux so there probably IS a way to have all GPUs being used by just... changing a setting lol
wait really? i thought that was lab only still
I've got a faucet, a vacuum, and a microwave
oh cool!
how did you get that running btw? it says bend not found for me
did you not run the second install command
wait i should clarify i actually hate ai. so much
no thats fine. that's just logic yk
which is totally fair !
yeah :(
i truely only use it for fun and cause i like seeing things grow, its like seeing a child grow to me since its the closest thing i have to one right now... i know thats probably wierd but meh, probably the autism hyperfocusing on it
runescape is my child
it is past your time but somehow not dead
its erroring for me thats why, 
best guess is some incompatible version of gcc/clang
i shall install and update them all then
no dice, oh well ill watch more vids on it and see if i missed something
nice
yay
what version are you using
you should have rustup
it's how you install rust
or at least how you should install rust
ok
ahhh thats where its different
does it need to be nightly
yeah
your nightly is from january, it might be worth updating then trying again
could run rustup update at least
running your arch package updates won't do much singe rustup is managing your rust versioning
-Syu will update the Rust installer program (rustup), but you need to tell rustup itself to update Rust
ahhh ok
I wonder where you're getting a strange january version of rust from
Linux is wierd but so lovely
Try rustup update nightly
rustup update should update all toolchains
yeah
no difference
how do i remove one, ill do so
(i dont know how i got two
)
probably messed around with it at some point
maybe but i just installed it today, probably did it wrong honestly 
I have a nightly from 2022
rustup toolchain uninstall [toolchain-name] should work according to --help
Which is very interesting as this OS install is younger than 2022
lmao
i love it lmao
it auto installed itself 
what distro?
ive been avoiding that 
why do you have some rust toolchain toml anyway in that folder?
im on Arch (btw) /j
meme
mint cinnamon <--
cinnamon is a nice desktop
i like it
i prefer Hyprland
did you clone the bend project for some reason?
I too am on hyprland
and arch
as far as eliminating variables go we're doing well
yes
oh hyprland looks kind of cool as hell
/j? are you actually on arch or
but its super nice once you set it up
hyprland ain't my first tiling window manager 
i am, just the meme of Arch people saying thay are on Arch allll the time
I finally uninstalled hyprland lol
im trying not to do that
so how do i do the thing
its comfy
thats one reason i have both plasma and hyprland
i switch between em
just run the install things from anywhere on your system
you don't need the source project
think of cargo install as a package manager that finds the package online
would you be willing to VC in here and watch me? so that i can be told when im doing something wrong
it's past midnight so I'd like to avoid vc
alrighty!
so
cargo +nightly install bend-lang```
or install something else?
oh! they have a discord
gonna ask them there, they probably know more
I've never felt so called out.
I've never done anything with C# before. I'm used to Rust.
i can give you the code block to make a new .net 6 lib if thats what you need
That'd be awesome. I have programming experiance but I learn by example.
dotnet new classlib -f net6.0 -o <ModName>
then you go into it with vs Code (or cd) and do this
dotnet add package Pathoschild.Stardew.ModBuildConfig --version 4.1.1
VSCode i dont know how to use the inteface for so i do my coding in it but everything else from terminal
that includes compiling C# from terminal
which is apperently not normal? idk though multiple different responces there
(we should move to #making-mods-general btw)
cause this is stardew related
TIL MethodImplOptions.Synchronized is a thing. Gonna have to remember that; could definitely be useful
Decided to do performance testing for converting my GSQ delegates into native GSQ delegates tonight.
Pro: I learned more about IL and invoking methods.
Con: The experimental IL is literally the same speed as some C# I wrote in 20 seconds.
Pro: You learned you weren't writing silly C#
True, I'll take that.
Thinks about making a minecraft mod once
Yes, LabVIEW, I don't want to know where in my fuckinf block diagram this control IS
(There should be something in the context menu but it doesn't seem to always work, it's greyed out for me rn.)
I got that too, and they also somehow started offering dedicated hosting for Stardew Valley servers, but I haven’t looked into how that works exactly
SOBBING
just immediately they reach out
It's weird, and imo, doesn't fit with the game. Either way, I'm not about to have a BisectHosting banner on my mod pages
"the program runs properly once every 10 times" is the worst bug when multiple threads are involved
the program only works if the user is within 500 miles
The program only works on sundays between 4 and 6 on public networks
sadly i may not be within 500 miles of the database 😔
for whatever reason i was not allowed to create one in the center nearest to me
What
the organization that my subscription is under did not allow me to create a resource group in the server i'm closest to lol
I had to make it one region over
my null pointer is unfortunately not related to my location
What if it is?
for some reason java thinks i can't get the next element out of a resultset even though I told it to check if it was before the first row in the result set and only try and read if so 💀
it probably has to do with me not knowing how this library works at all because we never discussed it until they said "ok haha big project"
Now that's a story I hadn't seen referenced in a long time.
(If anyone is unfamiliar: https://web.mit.edu/jemorris/humor/500-miles)
someone got my reference
I'd like to think I am on the Internet way too damn much.
Khloe linked the story
oh
It's a famous CS story
oh no I have to read
Oh man I hadn't seen that in ages either.
Another story from printer-land of 20 years ago: this time about a seemingly impossible bug.
this is like creepypastas for programmers
Ah, it's our Ted the Caver Coder?
The idea of trying to print something in Linux 14 years ago terrifies me on every level.
Of course it didn't print on Tuesday I'm shocked it printed on other days
The idea of trying to print something on anything 14 years ago terrifies me.
I found things more reliable there than on Windows!
But I want the feature to keep working at 0k
I don't care if the atoms aren't moving make it work
The Worst Computer Bugs in History is a mini series to commemorate the discovery of the first computer bug seventy years ago. Although these stories are more extreme than most software bugs engineers will encounter during their careers, they are worth studying for the insights they can offer into software development and deployment. These comput...
what a journey
y'all can read anything here?
we did actually have a bug once at work that caused something to break but only on mondays
cant open it either
.. the issue is that the file cannot start with T, but can t??
what the hell
at least when we had a bug that something didn't work on mondays it actually had to do with something that involved a days of the weeks selector
this is just wild
This manual is 200 pages lonf
And pauses to explain stuff like voltage dividers
Tbh
I get they aren't marketed to EEs but I'm about to fall asleep on it
that's arch packages right
the official packages are fine I think, the AUR are community submitted installation scripts
the arch user repository 
i think it stopped being developed, others have taken its place
I've always just used yay
I use paru now, mostly so I dont have go installed just for yay lol
discriminating against go
golang is a fine language 
I think it's ugly as sin but it's fine
go's worst feature is that it puts its config stuff in my home directory
Could i probably change it so it doesnt do this? maybe
sue google
that'll be plan B
my reason for thinking it's ugly is roughly just as serious of a problem
I just don't like that for an array type declaration its []type instead of type[]
I'm fine with rust's [type] cause it's different enough to just be different
but doing the same as I'm used to in C# but putting the brackets on the other side is just illegal
tbh it does get worse
map[keytype]valuetype
not a fan 0/10
the rest of the language seems really cool but this makes it essentially unusable!
🪭
I did absolutely love the simplicity of coroutines but alas, ugly syntax for types and thus will never use it
create your own transpiler that only modifies that one specific syntax
smart
has anyone ever created a language purely just to change the syntax in solely aesthetic ways
I propose the following two dimensional array syntax for the sole purpose of driving Crumble crazy: []type[]
[]
[]type[]
[]```
lmao
I approve
5D arrays are not supported
cannot be represented by the type system
[]
[]ty[]pe[]
[]
when you rename your type to a different number of characters and you to realign all your brackets
No more difficult than rebuying a bunch of bras because your redacted changes sizes
[][]
[]type[]
[][]```
If you need more dimensions you need to make your type name longer
a well supported type
what do you do for odd character lengths for types
like int
[ ]
[]int[]
[ ]
#typedef iint int
it'd be a funny stupid restriction for a joke language that type definitions cannot have an odd number of characters
no int, no string, no float
Identifiers must contain eight to twelve characters, and contain at least one each of numbers, symbols, and uppercase letters.
string is even though...
rofl
counting has never been my strong suit
clearly string is an exception
luckily exception has an even number of characters
wait no
it doesn't
jesus I should go to bed
Instead of exception we have UhOh, which is a nice even number of characters
lol
ErrorException would work and sounds realistic
YourProgramBrokeAgainGoodJobExclamationCharacter
exception!
AHHH
Exception but we add a different letter to the end depending on what type of exception it is
Exception but we captialize different number of letters to indicate how severe it is
syntax error? just catch a Exceptiona. forgot a bracket? Exceptionk
ok im a big fan of this one
not me programming and getting 5 EXCEPTions
Bug Report: 2024-5-18
Severity: EXCEPTIONion (Critical)
sees EXCEPTION all caps and breaks down crying
this reminds me of an old policy at my company where exceptions were caught and then a new exception would be thrown that was just some "exception code" like ASP7392
why 😭
the real fun thing is that we didn't have any documentation for these so the only way to find out what it meant was to find it in code
what the fuckkk
and people would often copy paste the code from other functions having no idea what they meant
so you'd get like 6 results
but since we didn't rethrow the original exception we didn't actually have the original exception message
sounds like hell
I have somehow managed to allocate less bytes than string.split (in some situations)
Not as fast but I'm just confused about how I'm allocating less, lol. I'm just dumbly tossing things in a List<string>

skill
wonder what the most memory efficient way is of splitting a string
my guess is using a span
I'm using stackalloc to get a char array for building the working item, and just tossing the finished items in a list.
yeah, and I thought the string.split would do similar\
Seems to work pretty well. I could in theory iterate the string twice to count how many slices there are... but that's chasing memory allocation a bit too hard
huh
so part of string split's overhead is likely because it deals with multiple possible seperators
Yeah. I on the other hand need to support quotes and escaping them.
I think I need to adjust my algorithm more too, to make it work identically to the game, because the game's method is fucked up lol
My end goal is probably using harmony to replace the built in string parsing methods.
Yeah, I was building a quote aware string split at some point as well, but it wouldn't conform to the method signatures the game expects (ie, it's yielding ReadOnlySpan<char> fragments, it doesn't stick things into an array.)
... how do you yield a ref struct lol
wrapping it in another ref struct!
Oh right. That.
you can just define the GetEnumerator/Current and it Just Works
I'm still waking up lol
no worries, I fell asleep at like 8PM yesterday
longggg week was longgggg
but yeah, I can't avoid some allocation overhead (mostly in the "removing the damn escape character") but I was trying to avoid it as best I could
Anyway, I feel like this is important enough to write two versions of the function.
Yes
lol
I just wanted quote-aware-stream-split for personal use, but seeing that I haven't gotten around to finishing it...
Honestly I never intended on falling in this rabbit hole, but then the game offended me with how silly its code is. I know it needs to support ancient runtimes, but... yeah
what are some good ways to start learning coding, i learn by doing but everytime i try to do i get so overwhelmed. i wanna learn JavaScript so that i can make a GUI with electron. if i try asking people who know coding they shoo me away cause i guess coding isnt noob friendly? but i know yall here are nicer lol
learn by doing is generally the way to do it for programming tbh. Just gotta start with something really simple with a tiny scope and work your way up
if programming as a whole is new to you just start with simple coding assignments like a program that prints out the prime numbers between 0 to some number n
and for the web side, start without any javascript at all. Just html and css to make something that doesnt do much but gets you used to creating a layout/styling
and then just work your way up
your initial versions are going to probably suck that's normal. It's not like you can only try it once
only once you've figured out the absolute basics I'd consider even looking at "web frameworks" aka react, vue, svelte, solid etc. When you know nothing yet they'll only make it more daunting to start
also just start in a browser, no electron
honestly my entire advice boiled down is "avoid trying to do too much at once and don't worry about whether you're doing it the right way yet"
ok, ill try that
You're talking to the wrong people, I've not once had someone shoo me away when I was asking questions, at most they said "I'm busy, I'll swing by in a bit"
Haha coding is a big topic, some people love to gatekeep it or talk down to people asking "dumb/pointless" questions in my experience(some stack overflow nerds lol). I'd say figure out what you wanna do, in your case GUI w/ Javascript. And then learn the base basics of the language kinda like what Crumble said, do some practice problems, and work your way there
If you're deadset on javascript go for it, it's a great language to know if you want to expand into web dev stuff also like what crumble said with "react" and other frontend frameworks. I think python has some great libraries for a GUI as well if you're just interested in a GUI and not webdev I'd lean more towards something other than Javascript
That's my take on the matter. Feel free to reach out with any questions though! I LOVE teaching programming topics 🙂
For things like HTML, CSS, JS, I recommend going through https://www.w3schools.com/js/default.asp It has examples of all the core elements you should know and has some extra "Try it yourself" elements
oh most likely yeah, it was coding discords
coding focused chats can be rough, as they tend to hear the same questions over and over and often will dismiss valid questions because they're tired of answering it
ooooo about python, ive heard people seem to hate it lol, preferably id like to be able to integrate it with my AI(which is mostly in python) and am willing to learn anything taught to me
Me when I see someone failing to read the message about their json syntax error for the 30th time that day
That's because the syntax is way different from others, no brackets, no ;, just tabs and pain
But it is easy to learn, and very beginner friendly
I personally love python. I do all my leetcode with python and some backend development with it's frameworks as well. It's great for integration with AI. It's relatively slow, but if you were dying for performance you'd be choosing something like C++. Which is definitely not needed for the scope of a GUI project
me wanting to learn assymbly just cause
definitely not the place to start 🙏
Python is great for AI tbh
ive seen
anytime i mentioned that peopled act like they were having flash backs to the end of their life
I wouldn't sweat the language you start out with too much. The basics transfer to almost all languages and certainly to every language mentioned here
I've only used python for web scraping and Advent Of Code
We do a lot of python for automation
I've done advent of code in elixir, rust and haskell
It's so weird to me that python is the big language for AI stuff
It's easy and lightweight
I think it makes sense. It's often used by people who are more on the data science side, not programming
can someone explain to me the need for the main() at the end of hello world codes?
Yeah, I just look at it and think "python slow" but all python is really doing in the situation is gluing APIs together effectively
what language?
Python
def main():
print("Hello World")
main()```
And there's something to be said for easily gluing APIs together
Call the function
the first two define a function called main. The last line calls this function
you could remove everything except the print statement and it would in this case do the same thing
One day I need to show you my insane bitbashing BS in python
someone i know is a good programmer and they make a decoder for AI Models
this is side info you never asked for, a main method is not required in python. But it is required in other languages
basically in many languages a function call main shows the entry point of the program, aka where it needs to start
oh im sorry
def main(): #Create new function called main
print("Hello World") #Print the text "Hello World" to the console
main() #Run the function called main
don't apologize! I'm just feeding you random info cause I wanna feel useful to the convo LOL
i meant for asking info about stuff i didnt talk about
unless you meant something else
Lesson 1: Add comments (in python you can add one with #), this way you explain it to yourself as you go, and it helps with remembering what code does what later
will do
damn python doesn't have block comments
I'm not counting """
those are docstrings really
which is still a comment in a way I suppose
would reverse engineering be a good starting point as well? i have code that makes a GUI in python that i got from my friend(he does most of the coding for stuff i want since i cant just yet)
looking at how other people did things will be great eventually
I'd say so, going through code and looking up what does what is how I learned python, and if it's well documented that's even better
it's very valuable to have something to look at as a reference
ok, ill start with messing around with it then and coding from scratch while having that reference(ive never coded from scratch)
It probably makes the most sense to learn the barebones of the language first. Learn how to make really simple things and solve simple problems, that way you have a foundation. While you can learn a lot from looking at the other code, if you don't understand the underlying concepts well enough you will be making assumptions and have gaps in knowledge.
So my recommendation is start simple, once you're confident start branching out and coding from scratch while comparing to your friend's code
IMO
ahhh ok, that does make sense lol
I do agree that starting with GUI code (especially in python) is a bit much, but in general having comparisons and other code nearby is a good way to learn
as long as you can mostly understand the code you're looking at it's fine. If you're just copy pasting lines in you should probably reconsider it
thats the limbo im in, i can read and understand some code. but i cant do anything with it.
havent figured out a way past this current "wall"
To learn programming, submit fixes and features to bouncer that im too lazy to do
it's even in python
Are there even any issue's right now?
what does farm computer do
it's not overly bad
oooo this is handy! i now know what a float is!
(using the python one)
the funky world of floating point numbers
numbers are magic, they float now
wizard numbers!

tbh floating point numbers are funky enough to be considered arcane magic
the internals anyway, using them is simple
Let's count to 1!
0!
0.100000001490116119384765625!
0.20000000298023223876953125!
0.300000011920928955078125!
0.4000000059604644775390625!
0.5!
0.60000002384185791015625!
0.699999988079071044921875!
0.800000011920928955078125!
0.89999997615814208984375!
1!
haha
getting computer architecture flashbacks. Can't remember jack from there
watching a vid on programming, person said it took 2 weeks to learn how to put in a png to a game, i now feel like i have not been as slow as i thought
Bonus of learning Python if you want to do game development: Godot's GDScript is very close to Python
(Of course, that doesn't help with Stardew. Or if you want to use Unity. Or Unreal. But Godot is neato.)
You're already ahead of me then
How in the world 
I've heard lots of good things about Godot! My buddy loves it, I know they got a lot of popularity when Unity started doing dumb stuff
is unity still going through with that change?
seems like itd kill them if they did
As far as I know. I stopped paying attention
oof
They stopped, but they burned a lot of good will on that it even happened.
ah
Gave Godot a lot of momentum in the process.
Have programming catTM
Even with the threat that console ports would be harder, I think I'd use Godot over Unity or Unreal for making a game.
Unreal is so pretty
oh i can make an ugly unreal game, dont you worry
It can actively get in the way, in fact.
OH OH, is there any way to make my code to run on all my GPUs?
Anyone can make an ugly unreal game. Just look for YouTube videos of old Nintendo games "remade" in Unreal.
cuda i guess
Bunch of absolute idiots who don't comprehend the phrase 'cohesive art style'
LOL, nooooooooo
Unreal and Unity are both chasing movies and TV, also, which is kinda weird and leads to a bunch of features that aren't really for games
ahh ok
i dont plan on making a game yet
but if i did id want it to be pretty
but id probably make my own lighting engine cause importing SUCKS(i dislike having to import stuff cause it feels unatural)
no important assets, everything must be done in code
i want something that i made completly if that makes since, having imports of others work just feels off
i KNOW ill change my mind as i go though, cause some things i just wont know how to code
How far does "all mine" extend, though?
my game ships in its own pocket universe, ensuring the laws of physics are the way I want them
not sure honestly, just dont wanna have to have help on the actual coding portion. i got no clue how this really works cause all i do is read code not write it
code is like a child i can watch grow, so i wanna keep that feeling for as long as i can. if that makes sense
I get it entirely! But you need to figure out a certain stopping point.
Because if you don't... logically, it extends down to you engineering your own ICs with your own architecture, writing your own BIOS for it, your own graphics API for your self-designed processors and/or GPU, firmware for everything, an OS to run your own code, a compiler to compile things for it...
i knew a guy when i was in high school who went down that path. None of us knew how to make game or anything like that, so he was trying to learn the framebuffer API lol
I would look at, say, SDL? See if that's a low enough level for you maybe.
Going any lower than that, you're writing OpenGL/whatever graphics API code directly by hand... which might also be what you're after!
i did start learning shaders for MC which uses OpenGL
not sure if its the API or not though, still gotta learn exactly what an API is
An API is the way developers want you to interface with their project. Usually it refers to the functions they make externally available that you can execute yourself when their project/library/engine whatever is set up
ill learn what that means at somepoint lol, currently having this stuff explained to me like im a child 
What you need is a way to make excellent games using a comprehensive IDE environment
i had it explained and now understand better! (not completely but better!)
i still use VSCode and my terminal
i dont know any actual IDEs
A game engine that gives you all the tools you need, but some limitations to make you really plan your games out...
oh thats what you meant
if all of your gpus are nvidia
An engine where you can make games like Celeste, and uh, others
Though Celeste was made using MonoGame like Stardew!


