The new forums will be named Coin Return (based on the most recent vote)! You can check on the status and timeline of the transition to the new forums here.
The Guiding Principles and New Rules document is now in effect.
The little I have done in PowerShell just makes me question if any of the designers had ever seen another programming language before. Seems like every design decision was "No, most languages do it this way so let's do something completely different."
Listen apple can't be the only one who gets to do that.
not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
The little I have done in PowerShell just makes me question if any of the designers had ever seen another programming language before. Seems like every design decision was "No, most languages do it this way so let's do something completely different."
The little I have done in PowerShell just makes me question if any of the designers had ever seen another programming language before. Seems like every design decision was "No, most languages do it this way so let's do something completely different."
I honestly think a lot of it is trying to allow things to kinda-sorta-if-you-squint work like batch scripts or something, which of course fucks everything up and now you need to adjust for it
I'm not saying it was the right decision, but there's gotta be some kind of logic behind it, however stupid the reasoning was
Funny thing is I have two PowerShell scripts at work (because I couldn't get approval for Python and they suggested that for my use cases). I have to use a separate batch script to run them because I also don't have permission to run the PowerShell script by itself.
While I could use it to automate more of my stuff I really don't want to.
I really need to actually make something with React, rather than just reading about it and trying small examples. I'm tempted to try an idle game? It seems like a good balance of interface design, data flow, and event handling, while being limited in scope but possibly expandable. Maybe I could hook a high score table to it once I get around to database servers?
Well, I've made the world's shittiest idle game. I suppose the next step on my journey of moderate discovery should be to try to host it on AWS (I've only used Azure before)?
I've also managed to get myself back into playing Cookie Clicker, which could be argued to be anti-progress.
I'm guessing a lot of companies (including mine), will be either capping versions or just disallowing Moq altogether. Which... given how widely we use it, is a huge PITA.
0
gavindelThe reason all your softwareis brokenRegistered Userregular
I'm guessing a lot of companies (including mine), will be either capping versions or just disallowing Moq altogether. Which... given how widely we use it, is a huge PITA.
Which would probably still be overpaying for my use case of just throwing something together to make sure that I can get it set up and have data flowing correctly, though I suppose I could shut it down when I'm not testing it.
In this case it would be something like a high score table of me and whatever alternate names I want to set up, fed into some sort of pop-up interface that I don't even know how to make yet but couldn't be that difficult, right?
Oh hey, I have an actual React question that I'm having trouble digging up an answer for. For my idle game, I'm trying to use useEffect() to set up a function to automatically give money based on building counts at every tick, like so:
I'm facing an issue where if I don't include money and buildingcounts in the dependencies, then earnMoney won't recognize when those values have changed. However, if they are there, any change to any of the dependencies will result in the interval being reset, which is particularly noticeable if the player is spamming the button to get more money.
Oh hey, I have an actual React question that I'm having trouble digging up an answer for. For my idle game, I'm trying to use useEffect() to set up a function to automatically give money based on building counts at every tick, like so:
I'm facing an issue where if I don't include money and buildingcounts in the dependencies, then earnMoney won't recognize when those values have changed. However, if they are there, any change to any of the dependencies will result in the interval being reset, which is particularly noticeable if the player is spamming the button to get more money.
What's the right pattern to use for this?
Your game logic like earnMoney shouldn't be in your presentation layer (which is what React code here is).
You'll want to find some other pattern for storing and interacting with game state, there's a lot of ways to go about it but the principle is you should not combine it here.
Oh hey, I have an actual React question that I'm having trouble digging up an answer for. For my idle game, I'm trying to use useEffect() to set up a function to automatically give money based on building counts at every tick, like so:
I'm facing an issue where if I don't include money and buildingcounts in the dependencies, then earnMoney won't recognize when those values have changed. However, if they are there, any change to any of the dependencies will result in the interval being reset, which is particularly noticeable if the player is spamming the button to get more money.
What's the right pattern to use for this?
Your game logic like earnMoney shouldn't be in your presentation layer (which is what React code here is).
You'll want to find some other pattern for storing and interacting with game state, there's a lot of ways to go about it but the principle is you should not combine it here.
Inconvenient, but probably the useful sort of inconvenient, I suppose.
0
Ear3nd1lEärendil the Mariner, father of ElrondRegistered Userregular
You're probably going to want some kind of state management, like Contexts, Redux, etc. Does this game have any 3d elements? If you are using something like ThreeJS, you'll probably want to use zustand to handle state because it's much faster than Redux or Contexts. If you aren't, then ignore the last sentence.
I'm guessing a lot of companies (including mine), will be either capping versions or just disallowing Moq altogether. Which... given how widely we use it, is a huge PITA.
Welp. So much for that.
Reading through the Github issue comments was interesting. Bottom line, and I don't blame him, the guy wants to get paid for his hard work. I agree, and companies way too often take advantage of open source stuff because it's "free". It's been interesting to me to see how much open source is powering all these start-ups. The reality is though, if you wanna make money, then treat it as such. Reality is reality. Companies will do whatever is the cheapest and easiest thing, every time.
3ds: 4983-4935-4575
0
Zilla36021st Century. |She/Her|Trans* Woman In Aviators Firing A Bazooka. ⚛️Registered Userregular
I CAN HAZ FIZZBUZZ?
HAI
I HAS A CHEEZBURGER ITZ 1
IM IN YR LOOP UPPIN YR CHEEZBURGER WILE BOTH SAEM CHEEZBURGER AN SMALLR OF CHEEZBURGER AN 100
I HAS A THREE ITZ BOTH SAEM MOD OF CHEEZBURGER AN 3 AN 0
I HAS A FIVE ITZ BOTH SAEM MOD OF CHEEZBURGER AN 5 AN 0
EITHER OF THREE AN FIVE, O RLY?
YA RLY
THREE, O RLY?
YA RLY, VISIBLE "FIZZ"!
OIC
FIVE, O RLY?
YA RLY, VISIBLE "BUZZ"!
OIC
VISIBLE ""
NO WAI
VISIBLE CHEEZBURGER
OIC
IM OUTTA YR LOOP
KTHXBYE
I'm guessing a lot of companies (including mine), will be either capping versions or just disallowing Moq altogether. Which... given how widely we use it, is a huge PITA.
Welp. So much for that.
Reading through the Github issue comments was interesting. Bottom line, and I don't blame him, the guy wants to get paid for his hard work. I agree, and companies way too often take advantage of open source stuff because it's "free". It's been interesting to me to see how much open source is powering all these start-ups. The reality is though, if you wanna make money, then treat it as such. Reality is reality. Companies will do whatever is the cheapest and easiest thing, every time.
You can't make money doing open source because unless you're an employee tasked to work on project X or I guess you're Linus nobody will pay you to do so. Being the maintainer of a popular library is probably the worst job in the world
Even Linus was hired by a company to ensure Linux continued(transmeta) before he moved to the OSF( and now LSF ).
The key part is that LSF is still a company, and even better a non-profit. Same thing has happened with python and the PSF. Companies love getting “something” for donations, so most of these foundations will tie the money to support or training.
You will go insane talking with legal if you ever want to donate money directly to a individual developer.
I'm guessing a lot of companies (including mine), will be either capping versions or just disallowing Moq altogether. Which... given how widely we use it, is a huge PITA.
Welp. So much for that.
Reading through the Github issue comments was interesting. Bottom line, and I don't blame him, the guy wants to get paid for his hard work. I agree, and companies way too often take advantage of open source stuff because it's "free". It's been interesting to me to see how much open source is powering all these start-ups. The reality is though, if you wanna make money, then treat it as such. Reality is reality. Companies will do whatever is the cheapest and easiest thing, every time.
You can't make money doing open source because unless you're an employee tasked to work on project X or I guess you're Linus nobody will pay you to do so. Being the maintainer of a popular library is probably the worst job in the world
I bet. If you read the author's, "kzu", comments, eventually he says (me paraphrasing) "I want to write open source code every day and get compensated for it". Well...then you gotta treat it as a business and figure out a way to charge. This kinda stuff seems to come up every now and then, I'm surprised it doesn't happen more often. Other times it has blown up that I'm aware of was a popular Javascript library was handed over to someone who turned it malicious (events-mapper or something). I remember the debate there was people were admonishing the original creator, but in summary he said "fuck off I didn't want to maintain it anymore". Especially in this day and age where seemingly every random dependency bad actors are looking for exploits, it truly must be one of the hardest jobs.
Hello fellow programmers! I am here with a gentle reminder: if you ever, at any time, write a program whose sole output upon failing is to say "Failed to do the thing", you are going straight to Hell. There are at least two different possible causes of failure for any program you're going to present to someone else and they need to be able to distinguish them.
In my specific case, I'm trying to provide an icon for the MacOS build of an application, and MacOS has a special format for icon files called ICNS. Unless you want to trust an online conversion tool (I do not), you need to use the iconutil command-line tool to process a folder full of image files of various resolutions. Evidently this tool is extremely persnickety about the file format, file names, alpha channel, PPI settings, and so on. And if it fails, it says: "Failed to generate ICNS." Wrong format? Did I forget an alpha channel? Which file, specifically, is at issue? Dunno! Try again! Maybe read the docs (if you can find the right ones (the man page for iconutil does not mention the format requirements)).
Hello fellow programmers! I am here with a gentle reminder: if you ever, at any time, write a program whose sole output upon failing is to say "Failed to do the thing", you are going straight to Hell. There are at least two different possible causes of failure for any program you're going to present to someone else and they need to be able to distinguish them.
In my specific case, I'm trying to provide an icon for the MacOS build of an application, and MacOS has a special format for icon files called ICNS. Unless you want to trust an online conversion tool (I do not), you need to use the iconutil command-line tool to process a folder full of image files of various resolutions. Evidently this tool is extremely persnickety about the file format, file names, alpha channel, PPI settings, and so on. And if it fails, it says: "Failed to generate ICNS." Wrong format? Did I forget an alpha channel? Which file, specifically, is at issue? Dunno! Try again! Maybe read the docs (if you can find the right ones (the man page for iconutil does not mention the format requirements)).
Admittedly, I've not done MacOS at all, but I'm a little surprised you don't just feed Xcode your images and let it do the rest. (Same way you do the other platforms.) In fairness they do have some particular requirements per-platform in terms of layering etc, but again, I'm used to Xcode just "handling it". Admittedly this is a definition of "handling it" that involves a hammer, the word "FUCK" and a black chicken, but still.
You're probably going to want some kind of state management, like Contexts, Redux, etc. Does this game have any 3d elements? If you are using something like ThreeJS, you'll probably want to use zustand to handle state because it's much faster than Redux or Contexts. If you aren't, then ignore the last sentence.
Anything remotely fancy would probably be overkill. This thing is as barebones as it gets.
Would the best pattern to use be to create a class that runs the game entirely on its own (including scheduled intervals for gaining income) , pass the interface hooks into the top level of the react components, and then have the top level component set up its own scheduled polling on the game class? That wouldn't match the game loop exactly, but it would probably be close enough for my purposes.
Thinking back to Cookie Clicker, it is noticeable that upgrades can take a little while to appear once you've unlocked them, and multiple ones will appear at once in batches. I'm guessing that's probably that sort of polling in action?
Hello fellow programmers! I am here with a gentle reminder: if you ever, at any time, write a program whose sole output upon failing is to say "Failed to do the thing", you are going straight to Hell. There are at least two different possible causes of failure for any program you're going to present to someone else and they need to be able to distinguish them.
In my specific case, I'm trying to provide an icon for the MacOS build of an application, and MacOS has a special format for icon files called ICNS. Unless you want to trust an online conversion tool (I do not), you need to use the iconutil command-line tool to process a folder full of image files of various resolutions. Evidently this tool is extremely persnickety about the file format, file names, alpha channel, PPI settings, and so on. And if it fails, it says: "Failed to generate ICNS." Wrong format? Did I forget an alpha channel? Which file, specifically, is at issue? Dunno! Try again! Maybe read the docs (if you can find the right ones (the man page for iconutil does not mention the format requirements)).
Hello fellow programmers! I am here with a gentle reminder: if you ever, at any time, write a program whose sole output upon failing is to say "Failed to do the thing", you are going straight to Hell. There are at least two different possible causes of failure for any program you're going to present to someone else and they need to be able to distinguish them.
In my specific case, I'm trying to provide an icon for the MacOS build of an application, and MacOS has a special format for icon files called ICNS. Unless you want to trust an online conversion tool (I do not), you need to use the iconutil command-line tool to process a folder full of image files of various resolutions. Evidently this tool is extremely persnickety about the file format, file names, alpha channel, PPI settings, and so on. And if it fails, it says: "Failed to generate ICNS." Wrong format? Did I forget an alpha channel? Which file, specifically, is at issue? Dunno! Try again! Maybe read the docs (if you can find the right ones (the man page for iconutil does not mention the format requirements)).
Soooooo okay I just tested this in a very half-assed manner locally, but.
Completely new MacOS only project, Xcode 14 latest, you can just grab any old image--I used a jpg I had lying around--and as long as it's the right dimensions, you can drop it into the asset catalog and Xcode seems to just do the thing. (Or at least, I've got a running app with the icon I stuffed in, anyway.)
I suspect this would be much prettier if I--as on iOS--used a properly vector PDF as the source so it scaled better, but yeah, for next time you can just make Xcode do it for you. Usually for assets you want a pdf at each resolution though, so 1024x1024, etc etc. NBD in my experience, though.
So I was thinking of maybe creating an interface that could represent either a locally-running game or a connection to a game server. Which led me to rediscover another one of Javascript's horrors, duck typing. I might implement an extended interface class anyway just out of spite.
Of course, JavaScript is the language which allows this delightful nonsense 1 + 1 + "1" == 21
That's actually something that I'm slightly okay with? Being able to do something like ("There are " + numAnimals + " animals") is something that many sane languages will let you get away with and is probably a net good, and that's nothing more than an extension of the logical typecasting principles. Heck, I just tested it out in C# and it did exactly the same thing.
Automatic X-to-string coercion is fine and good and sensible. Automatic string-to-X coercion is a horrific crime against maintainability. Some languages do not understand this.
Hello fellow programmers! I am here with a gentle reminder: if you ever, at any time, write a program whose sole output upon failing is to say "Failed to do the thing", you are going straight to Hell. There are at least two different possible causes of failure for any program you're going to present to someone else and they need to be able to distinguish them.
In my specific case, I'm trying to provide an icon for the MacOS build of an application, and MacOS has a special format for icon files called ICNS. Unless you want to trust an online conversion tool (I do not), you need to use the iconutil command-line tool to process a folder full of image files of various resolutions. Evidently this tool is extremely persnickety about the file format, file names, alpha channel, PPI settings, and so on. And if it fails, it says: "Failed to generate ICNS." Wrong format? Did I forget an alpha channel? Which file, specifically, is at issue? Dunno! Try again! Maybe read the docs (if you can find the right ones (the man page for iconutil does not mention the format requirements)).
Soooooo okay I just tested this in a very half-assed manner locally, but.
Completely new MacOS only project, Xcode 14 latest, you can just grab any old image--I used a jpg I had lying around--and as long as it's the right dimensions, you can drop it into the asset catalog and Xcode seems to just do the thing. (Or at least, I've got a running app with the icon I stuffed in, anyway.)
I suspect this would be much prettier if I--as on iOS--used a properly vector PDF as the source so it scaled better, but yeah, for next time you can just make Xcode do it for you. Usually for assets you want a pdf at each resolution though, so 1024x1024, etc etc. NBD in my experience, though.
At this point I'll cop to having made it harder for myself: I am dimly aware of XCode as That Thing You Use As A Mac Dev, but when the app store demanded that I create an Apple Account to get it I said "eh" and sought alternatives.
I stand by the principle at the root of my frustration, even if I'm the proverbial guy trying to figure out if the glass bottle or the shoe is the better way to drive a nail.
My favorite musical instrument is the air-raid siren.
Posts
Listen apple can't be the only one who gets to do that.
Ah yes, the Lipton approach.
Funny thing is I have two PowerShell scripts at work (because I couldn't get approval for Python and they suggested that for my use cases). I have to use a separate batch script to run them because I also don't have permission to run the PowerShell script by itself.
While I could use it to automate more of my stuff I really don't want to.
I'd love to, but I'd love to be able to apply to jobs that have React experience as a prerequisite more.
I've also managed to get myself back into playing Cookie Clicker, which could be argued to be anti-progress.
im not exactly sure what sort of journey you're on but learning to configure a basic stack on a cheap vm is probably as valuable as anything
we also talk about other random shit and clown upon each other
https://aws.amazon.com/rds/postgresql/pricing/
I'm guessing a lot of companies (including mine), will be either capping versions or just disallowing Moq altogether. Which... given how widely we use it, is a huge PITA.
Welp. So much for that.
Which would probably still be overpaying for my use case of just throwing something together to make sure that I can get it set up and have data flowing correctly, though I suppose I could shut it down when I'm not testing it.
In this case it would be something like a high score table of me and whatever alternate names I want to set up, fed into some sort of pop-up interface that I don't even know how to make yet but couldn't be that difficult, right?
I'm facing an issue where if I don't include money and buildingcounts in the dependencies, then earnMoney won't recognize when those values have changed. However, if they are there, any change to any of the dependencies will result in the interval being reset, which is particularly noticeable if the player is spamming the button to get more money.
What's the right pattern to use for this?
Your game logic like earnMoney shouldn't be in your presentation layer (which is what React code here is).
You'll want to find some other pattern for storing and interacting with game state, there's a lot of ways to go about it but the principle is you should not combine it here.
Inconvenient, but probably the useful sort of inconvenient, I suppose.
Reading through the Github issue comments was interesting. Bottom line, and I don't blame him, the guy wants to get paid for his hard work. I agree, and companies way too often take advantage of open source stuff because it's "free". It's been interesting to me to see how much open source is powering all these start-ups. The reality is though, if you wanna make money, then treat it as such. Reality is reality. Companies will do whatever is the cheapest and easiest thing, every time.
You can't make money doing open source because unless you're an employee tasked to work on project X or I guess you're Linus nobody will pay you to do so. Being the maintainer of a popular library is probably the worst job in the world
The key part is that LSF is still a company, and even better a non-profit. Same thing has happened with python and the PSF. Companies love getting “something” for donations, so most of these foundations will tie the money to support or training.
You will go insane talking with legal if you ever want to donate money directly to a individual developer.
I bet. If you read the author's, "kzu", comments, eventually he says (me paraphrasing) "I want to write open source code every day and get compensated for it". Well...then you gotta treat it as a business and figure out a way to charge. This kinda stuff seems to come up every now and then, I'm surprised it doesn't happen more often. Other times it has blown up that I'm aware of was a popular Javascript library was handed over to someone who turned it malicious (events-mapper or something). I remember the debate there was people were admonishing the original creator, but in summary he said "fuck off I didn't want to maintain it anymore". Especially in this day and age where seemingly every random dependency bad actors are looking for exploits, it truly must be one of the hardest jobs.
In my specific case, I'm trying to provide an icon for the MacOS build of an application, and MacOS has a special format for icon files called ICNS. Unless you want to trust an online conversion tool (I do not), you need to use the iconutil command-line tool to process a folder full of image files of various resolutions. Evidently this tool is extremely persnickety about the file format, file names, alpha channel, PPI settings, and so on. And if it fails, it says: "Failed to generate ICNS." Wrong format? Did I forget an alpha channel? Which file, specifically, is at issue? Dunno! Try again! Maybe read the docs (if you can find the right ones (the man page for iconutil does not mention the format requirements)).
... I did manage to get it to work, by meticulously resaving my icon files according to a schedule I found three entries down in a StackOverflow question on the subject (https://stackoverflow.com/questions/12306223/how-to-manually-create-icns-files-using-iconutil). Same as it ever was. But man am I ever left with a sour taste in my mouth.
I'm "kupiyupaekio" on Discord.
It's important to remember any time you are interacting with Apple as a developer or as a consumer, that Apple hates you.
Anything remotely fancy would probably be overkill. This thing is as barebones as it gets.
Would the best pattern to use be to create a class that runs the game entirely on its own (including scheduled intervals for gaining income) , pass the interface hooks into the top level of the react components, and then have the top level component set up its own scheduled polling on the game class? That wouldn't match the game loop exactly, but it would probably be close enough for my purposes.
Thinking back to Cookie Clicker, it is noticeable that upgrades can take a little while to appear once you've unlocked them, and multiple ones will appear at once in batches. I'm guessing that's probably that sort of polling in action?
Output an error message? How user friendly, exit(1) is all anyone should need
Soooooo okay I just tested this in a very half-assed manner locally, but.
Completely new MacOS only project, Xcode 14 latest, you can just grab any old image--I used a jpg I had lying around--and as long as it's the right dimensions, you can drop it into the asset catalog and Xcode seems to just do the thing. (Or at least, I've got a running app with the icon I stuffed in, anyway.)
I suspect this would be much prettier if I--as on iOS--used a properly vector PDF as the source so it scaled better, but yeah, for next time you can just make Xcode do it for you. Usually for assets you want a pdf at each resolution though, so 1024x1024, etc etc. NBD in my experience, though.
I don't want to have to import a duck class just to be a duck. Look at me! I'm quacking!
Of course, JavaScript is the language which allows this delightful nonsense 1 + 1 + "1" == 21
That's actually something that I'm slightly okay with? Being able to do something like ("There are " + numAnimals + " animals") is something that many sane languages will let you get away with and is probably a net good, and that's nothing more than an extension of the logical typecasting principles. Heck, I just tested it out in C# and it did exactly the same thing.
Edit: But I tried it in Python and it complained.
Java will automatically convert ints and other objects to strings (I believe by calling its .toString() method) in a print statement or other cases
At this point I'll cop to having made it harder for myself: I am dimly aware of XCode as That Thing You Use As A Mac Dev, but when the app store demanded that I create an Apple Account to get it I said "eh" and sought alternatives.
I stand by the principle at the root of my frustration, even if I'm the proverbial guy trying to figure out if the glass bottle or the shoe is the better way to drive a nail.
I'm "kupiyupaekio" on Discord.