Good vs. Evil

  • The FTB Forum is now read-only, and is here as an archive. To participate in our community discussions, please join our Discord! https://ftb.team/discord
C

Closet Gamer

Guest
88. True. I feel like the next big push might be resource scarcity. If there are certain things that are only obtainable on the moon or Mars, or are at least financially viable to do so with, and there is a shortage here, economics could be the driving factor. I think asteroid mining, while that bit further away, will be a big thing in the future.
87 yes, resource scarcity could be a great motivator. Humans are funny creatures - we only really jump into action when the issue is right in front of us. This happens with small stuff (when people only check their bank when they are skint) and the big stuff (we will wait for an asteroid to be on a collision course before we seriously invest in planetary defence, even though we know it is one of the most likely sources of existential risk).

You see this in the development of AI. This is likely the biggest step forward but also the biggest threat to humanity, yet we invest virtually nothing into making it safe dispite the warnings from some of the greatest thinkers of our time.

------------------------
My Age of Engineering Series: http://www.youtube.com/playlist?list=PLUZaEaeCvlj6ChY3jks-N8rW74_3qEtmD
 
  • Like
Reactions: GamerwithnoGame

GamerwithnoGame

Over-Achiever
Jan 29, 2015
2,808
1,507
224
87.
87 yes, resource scarcity could be a great motivator. Humans are funny creatures - we only really jump into action when the issue is right in front of us. This happens with small stuff (when people only check their bank when they are skint) and the big stuff (we will wait for an asteroid to be on a collision course before we seriously invest in planetary defence, even though we know it is one of the most likely sources of existential risk).

You see this in the development of AI. This is likely the biggest step forward but also the biggest threat to humanity, yet we invest virtually nothing into making it safe dispite the warnings from some of the greatest thinkers of our time.

------------------------
My Age of Engineering Series: http://www.youtube.com/playlist?list=PLUZaEaeCvlj6ChY3jks-N8rW74_3qEtmD
Yep. Its more than a little alarming.
 

lenscas

Over-Achiever
Jul 31, 2013
2,015
1,801
248
84 so.....this may be a problem
Code:
<p>Message:  parse_str(): Input variables exceeded 1000. To increase the limit change max_input_vars in php.ini.</p>

Also, of course php still continues executing but just doesn't contain the whole thing. Because obviously, when this happens you want to continue with some missing data rather then stop and warn the user.
 

GamerwithnoGame

Over-Achiever
Jan 29, 2015
2,808
1,507
224
83. Had a scout around with a Fosic Resonator, and couldn't find ANY high starlight areas. Not even faint blue mist, let alone thick mist with white stars!
 

lenscas

Over-Achiever
Jul 31, 2013
2,015
1,801
248
84 Why... Why would it not throw an exception or raise an error in some form.
85 it raises an E_WARNING and continues going along. Want to know how to catch an E_WARNING? Well....
You need to register your own warning_handler which means you overwrite the old one thus it won't be logged anymore.
Fro there on you can then throw your error, don't forget to restore the old error_handler.
Code:
set_error_handler("warning_handler", E_WARNING);
dns_get_record(...)
restore_error_handler();

function warning_handler($errno, $errstr){// do something}
Also, it being a warning it will produce output unless you turned that off in the correct .ini file among some other places. Thus... it destroys my nice JSON output :(

My "fix" to at least still allow people to save the output of an action is to just send it as json, as json_decode does not have this limit. So... now its time to figure out a good way to deal with parse_str()'s stupid behavior.

Oh, want another example of how broken php is? people find the above solution elegant.
 

GamerwithnoGame

Over-Achiever
Jan 29, 2015
2,808
1,507
224
84. For some reason that reminded me of a line from Doctor Who, from an exchange between the Cybermen and the Daleks:

C: "Our technologies are compatible, though your design is less elegant."
D: "Daleks have no concept of elegance."
C: "This is obvious."
 

lenscas

Over-Achiever
Jul 31, 2013
2,015
1,801
248
83 I build in a check to see if the data in the put request was send as a normal query string or as json. If it was a query string you get an error saying that you should send the data as json instead.
Not the cleanest, but it will do for now.
 

duckfan77

Popular Member
Mar 18, 2013
80
683
118
82 Storing an entire >1 mil word story in a single string as html probably isn't the best plan, but it works.
 

lenscas

Over-Achiever
Jul 31, 2013
2,015
1,801
248
82 Storing an entire >1 mil word story in a single string as html probably isn't the best plan, but it works.
83 its not html though.
A query string is just
"someVar=someVal&someOtherVar=someOtherVal"etc,etc
But yes, it is a good sign that I really should start thinking about using the difference instead of resaving everything.....
 

duckfan77

Popular Member
Mar 18, 2013
80
683
118
84 This was a reference to my web scraper. It writes once at the end, and while pulling pages just keeps dumping the html into a body string. I really can't do anything else, unless I do multiple writes, and I have enough ram that I don't consider that to be necessary. repo link
 

GamerwithnoGame

Over-Achiever
Jan 29, 2015
2,808
1,507
224
83. I’ve got a bushel of things to do on my friend’s server, and my least favourite (base building) is also the most important right now :/