Dominion Strategy Forum

Please login or register.

Login with username, password and session length
Pages: 1 ... 228 229 [230]  All

Author Topic: Random Stuff Part II  (Read 445240 times)

0 Members and 1 Guest are viewing this topic.

Donald X.

  • Dominion Designer
  • *****
  • Offline Offline
  • Posts: 4631
  • Respect: +18626
    • View Profile
Re: Random Stuff Part II
« Reply #5725 on: December 15, 2015, 04:21:52 am »
0

Have you considered using self-modifying code?

Is that... a thing?  I mean, I assume you're not talking about some sort of AI programmer, and I feel like I've heard the concept before... but I'm not certain what that means.
I have seen it used.

It was easy to do when everything was in machine language. You have a program in 6502; it's just a bunch of hexadecimals. Your assembler translated LDA #0 to A9 00 and that's that. Your program is at some specific address in memory - it was very rare to have code that could execute from some random address. So, if your code isn't firmware, you can modify a byte to be a different instruction, or different data value or address, and then the code will do different things.

In practice it is really really bad to do this. Odds are your program is now impossible to debug. Odds are that whatever you were accomplishing, there was a better way to do it. The guy I saw using it, he didn't understand how indirect addressing worked. So he used direct addressing and modified the addresses in the code on the fly. He was bad. Later he was fired.

These days, self-modifying code has the additional problem of, your processor may be constantly trying to cache things to speed up. It caches the code, you modify it, it didn't modify it in the cache, now your code doesn't work.
Logged

AdamH

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2785
  • Shuffle iT Username: Adam Horton
  • You make your own shuffle luck
  • Respect: +3789
    • View Profile
    • My Dominion Videos
Re: Random Stuff Part II
« Reply #5726 on: December 15, 2015, 08:35:58 am »
+3

As I said, I can't find a simpler and more readable way to write it.  I already thought of most of these ways, but I think using goto in this case is just more readable (at least more than all of these options).

When I was in school, they said never use goto for any reason, you can always do without them and they're evil. I know why they teach you this, because if you don't use gotos properly your code turns into spaghetti. I don't get why they don't teach you the proper way to use gotos, though, that seems kinda wak.

The moment I stepped into the professional world, I was writing these nested for loops and everyone was all "what is this I can't even." They told me to use gotos to make the code more readable. I spit hot fire back "what if I write it in a function and use multiple returns, yo?" and they were like "you can do that, cuz, but I'd rather you just use gotos."

If you aren't allowed to use gotos, then that's silly, but I guess you aren't. The next best thing is multiple return statements, and after that you have to use the Nested Loops Of Sadness™ (NLOS).
Logged
I respond to PMs.

Kuildeous

  • Cartographer
  • *****
  • Offline Offline
  • Posts: 3606
  • Respect: +2077
    • View Profile
Re: Random Stuff Part II
« Reply #5727 on: December 15, 2015, 09:52:30 am »
+5

If you aren't allowed to use gotos, then that's silly, but I guess you aren't. The next best thing is multiple return statements, and after that you have to use the Nested Loops Of Sadness™ (NLOS).

Unrelated, but Nested Loop of Sadness is my new band name.
Logged
A man has no signature

eHalcyon

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 8689
  • Respect: +9126
    • View Profile
Re: Random Stuff Part II
« Reply #5728 on: December 16, 2015, 05:03:45 am »
+7

I've finally attained a 1:1 post-to-respect ratio!
Logged

qmech

  • Torturer
  • *****
  • Offline Offline
  • Posts: 1915
  • Shuffle iT Username: qmech
  • What year is it?
  • Respect: +2301
    • View Profile
Re: Random Stuff Part II
« Reply #5729 on: December 16, 2015, 05:26:29 am »
+5

I've finally attained a 1:1 post-to-respect ratio!

Congratulations!  Keep going and you'll have no trouble hitting 2:1.
Logged

sudgy

  • Cartographer
  • *****
  • Offline Offline
  • Posts: 3253
  • Shuffle iT Username: sudgy
  • It's pronounced "SOO-jee"
  • Respect: +2450
    • View Profile
Logged
If you're wondering what my avatar is, watch this.

Check out my logic puzzle blog!

   Quote from: sudgy on June 31, 2011, 11:47:46 pm

Ozle

  • Cartographer
  • *****
  • Offline Offline
  • Posts: 3625
  • Sorry, this text is personal.
  • Respect: +3343
    • View Profile
Re: Random Stuff Part II
« Reply #5731 on: December 17, 2015, 01:45:48 pm »
+4

I've finally attained a 1:1 post-to-respect ratio!

Congratulations, have an upvote as a prize! DOH!

No, really you get Ozles internet admiration prize!
Don't get too excited though, the last person to get it was Colonel Gaddafi for his taking up of the FindMyFriends app....
Logged
Try the Ozle Google Map Challenge!
http://forum.dominionstrategy.com/index.php?topic=7466.0

Sullying players Enjoyment of Innovation since 2013 Apparently!

Kirian

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 6983
  • Shuffle iT Username: Kirian
  • An Unbalanced Equation
  • Respect: +9151
    • View Profile
Re: Random Stuff Part II
« Reply #5732 on: December 17, 2015, 01:58:55 pm »
+4

I've finally attained a 1:1 post-to-respect ratio!

Congratulations, have an upvote as a prize! DOH!

No, really you get Ozles internet admiration prize!
Don't get too excited though, the last person to get it was Colonel Gaddafi for his taking up of the FindMyFriends app....

A wild OZLE appears!

It uses TERRIBLE JOKE.  It's super effective!

...

Seriously, welcome back dude!
Logged
Kirian's Law of f.DS jokes:  Any sufficiently unexplained joke is indistinguishable from serious conversation.

eHalcyon

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 8689
  • Respect: +9126
    • View Profile
Re: Random Stuff Part II
« Reply #5733 on: December 17, 2015, 04:08:42 pm »
+2

I've finally attained a 1:1 post-to-respect ratio!

Congratulations, have an upvote as a prize! DOH!

No, really you get Ozles internet admiration prize!
Don't get too excited though, the last person to get it was Colonel Gaddafi for his taking up of the FindMyFriends app....

I am upset that you did not actually upvote.
Logged

Kuildeous

  • Cartographer
  • *****
  • Offline Offline
  • Posts: 3606
  • Respect: +2077
    • View Profile
Re: Random Stuff Part II
« Reply #5734 on: December 17, 2015, 04:43:15 pm »
+1

I've finally attained a 1:1 post-to-respect ratio!

Congratulations, have an upvote as a prize! DOH!

No, really you get Ozles internet admiration prize!
Don't get too excited though, the last person to get it was Colonel Gaddafi for his taking up of the FindMyFriends app....

I am upset that you did not actually upvote.

He never said you won his upvote.

But you clearly won some upvotes. Man, some people are never satisfied.
Logged
A man has no signature

eHalcyon

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 8689
  • Respect: +9126
    • View Profile
Re: Random Stuff Part II
« Reply #5735 on: December 17, 2015, 05:27:43 pm »
+3

I've finally attained a 1:1 post-to-respect ratio!

Congratulations, have an upvote as a prize! DOH!

No, really you get Ozles internet admiration prize!
Don't get too excited though, the last person to get it was Colonel Gaddafi for his taking up of the FindMyFriends app....

I am upset that you did not actually upvote.

He never said you won his upvote.

But you clearly won some upvotes. Man, some people are never satisfied.

Logged

Infthitbox

  • Explorer
  • *****
  • Offline Offline
  • Posts: 317
  • Respect: +437
    • View Profile
Re: Random Stuff Part II
« Reply #5736 on: December 17, 2015, 09:56:37 pm »
+4

I've finally attained a 1:1 post-to-respect ratio!

If you had never posted at all, you could have any ratio you dreamed of!
Logged

Ozle

  • Cartographer
  • *****
  • Offline Offline
  • Posts: 3625
  • Sorry, this text is personal.
  • Respect: +3343
    • View Profile
Re: Random Stuff Part II
« Reply #5737 on: December 18, 2015, 03:07:20 am »
0

I've finally attained a 1:1 post-to-respect ratio!

Congratulations, have an upvote as a prize! DOH!

No, really you get Ozles internet admiration prize!
Don't get too excited though, the last person to get it was Colonel Gaddafi for his taking up of the FindMyFriends app....

I am upset that you did not actually upvote.

I would hope you would expect nothing less!

Upcoming takes effort....
Logged
Try the Ozle Google Map Challenge!
http://forum.dominionstrategy.com/index.php?topic=7466.0

Sullying players Enjoyment of Innovation since 2013 Apparently!

sudgy

  • Cartographer
  • *****
  • Offline Offline
  • Posts: 3253
  • Shuffle iT Username: sudgy
  • It's pronounced "SOO-jee"
  • Respect: +2450
    • View Profile
Re: Random Stuff Part II
« Reply #5738 on: December 26, 2015, 01:07:00 pm »
+7

I got Thing Explainer for Christmas, and I'm surprised at how "heavy" of a book it is.  For only using a thousand words, it still gets my mind swimming with information after a few pages and I have to stop.
Logged
If you're wondering what my avatar is, watch this.

Check out my logic puzzle blog!

   Quote from: sudgy on June 31, 2011, 11:47:46 pm

pingpongsam

  • Torturer
  • *****
  • Offline Offline
  • Posts: 1712
  • Shuffle iT Username: pingpongsam
  • Respect: +765
    • View Profile
Re: Random Stuff Part II
« Reply #5739 on: December 30, 2015, 08:25:29 am »
+4

Randall Munroe is indisputably smarter than me and supremely good at demonstrating it.
Logged
You are the brashest scum player on f.ds.

eHalcyon

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 8689
  • Respect: +9126
    • View Profile
Re: Random Stuff Part II
« Reply #5740 on: January 01, 2016, 07:27:12 pm »
0



Ikea Heights, a soap opera filmed inside an actual IKEA without authorization.
Logged

Witherweaver

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 6413
  • Shuffle iT Username: Witherweaver
  • Respect: +7733
    • View Profile
Re: Random Stuff Part II
« Reply #5741 on: January 03, 2016, 02:45:12 am »
+5

Logged

Kuildeous

  • Cartographer
  • *****
  • Offline Offline
  • Posts: 3606
  • Respect: +2077
    • View Profile
Re: Random Stuff Part II
« Reply #5742 on: January 05, 2016, 10:31:36 am »
+2

I was joking in our meeting today that picking someone to partner up with was like kickball all over again, but for once this was not a traumatic reliving of my school days.

a) Not only was I not picked last, but my partner and I paired up before the manager was done talking.
b) I chose the person that I'm most attracted to, and she chose me.

So very glad I wasn't reliving elementary school.
Logged
A man has no signature

enfynet

  • Torturer
  • *****
  • Offline Offline
  • Posts: 1675
  • Respect: +1123
    • View Profile
    • JD's Custom Clubs
Re: Random Stuff Part II
« Reply #5743 on: January 05, 2016, 12:13:13 pm »
0

That sounds incredibly mature. I always preferred the socialist selection system as I never wanted to partner up with anyone, and therefore would be selected last as I made little to no effort otherwise.
Logged
"I have no special talents. I am only passionately curious."

Kirian

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 6983
  • Shuffle iT Username: Kirian
  • An Unbalanced Equation
  • Respect: +9151
    • View Profile
Re: Random Stuff Part II
« Reply #5744 on: January 05, 2016, 02:11:53 pm »
+4

I was joking in our meeting today that picking someone to partner up with was like kickball all over again, but for once this was not a traumatic reliving of my school days.

a) Not only was I not picked last, but my partner and I paired up before the manager was done talking.
b) I chose the person that I'm most attracted to, and she chose me.

So very glad I wasn't reliving elementary school.


More exploits of Kuildeous the lady-killer.
Logged
Kirian's Law of f.DS jokes:  Any sufficiently unexplained joke is indistinguishable from serious conversation.

eHalcyon

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 8689
  • Respect: +9126
    • View Profile
Re: Random Stuff Part II
« Reply #5745 on: January 06, 2016, 06:00:20 pm »
+8

Logged

Witherweaver

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 6413
  • Shuffle iT Username: Witherweaver
  • Respect: +7733
    • View Profile
Re: Random Stuff Part II
« Reply #5746 on: January 04, 2018, 09:41:39 am »
+2

random stuff part IV is #fakenews

What I do is generate an integer from 1 to random_stuff_index_max from a uniform distribution and then post in that thread.
Logged

Asper

  • Governor
  • *****
  • Offline Offline
  • Posts: 4190
  • Respect: +4585
    • View Profile
Re: Random Stuff Part II
« Reply #5747 on: January 04, 2018, 11:29:24 am »
0

I was joking in our meeting today that picking someone to partner up with was like kickball all over again, but for once this was not a traumatic reliving of my school days.

a) Not only was I not picked last, but my partner and I paired up before the manager was done talking.
b) I chose the person that I'm most attracted to, and she chose me.

So very glad I wasn't reliving elementary school.


More exploits of Kuildeous the lady-killer.

Pages: 1 ... 228 229 [230]  All
 

Page created in 0.08 seconds with 20 queries.