« first day (212 days earlier)      last day (4803 days later) » 

12:01 AM
I have reason to suspect that Rebecca Chernoff is actually TheTXI ...
4
 
@TimPost We're all sockpuppets of Beckers
 
@TimPost That raises even more questions than it answers!
 
I thought Rebecca was a sockpuppet of me, who was a sockpuppet of @TimStone
 
@GraceNote Shhhhh. We don't talk about @TimStone like that. He'll replace us all with very small javascripts
 
@Shog9 None that "Las Vegas" doesn't sufficiently answer.
 
12:04 AM
It might take a few years, but... ;-)
 
heard he was being talked about
 
@TimPost oh no
 
Hey - This is @TimPost - I'm in a Net Cafe somewhere in Saigon and I think my OpenID might have been compromised. Has anyone impersonating me said anything lately?
 
@TimPost Nope, you're cool - back to your game.
 
@GraceNote That seems like a reasonable sockpuppet hierarchy.
 
12:09 AM
@TimPost we should probably remove that diamond then, eh? (;
 
@RebeccaChernoff I'll hang on to it for him. We almost have the same name, it'll be less unsettling for people that way.
 
Wow. Chat is pretty broken on Honeycomb...
 
yeah yeah of course you would @TimStone
 
Just thinking of the welfare of the community, of course.
 
Responsible... adding that trait...
 
12:22 AM
@drachenstern Apple uses Long Long
 
i->can_haz->threadlock();
I am so sick of maintaining this code that I'm determined to at least make it funny
 
@TimPost Yeah, that prompted me to use "thingadongdong" in a test case one time.
 
I'm turning C into lolcode
 
The happiest of all the codez.
 
The person I'm supposed to be working with has apparently been over-sleeping for the last 4 1/2 hours. This is what happens when I don't have much else to do.
 
12:30 AM
@Moshe what comes after int?
 
Ah, sleep...I'm considering going back to my nap for a bit, heh. Then I think it's time for a little userscripting.
 
@TimStone You should craft a bed.
 
@GraceNote One of the best new items in Minecraft ;)
 
Seems like it
 
12:32 AM
gets three woods and three wools and a workbench
 
12:57 AM
If you are in this room and haven't read this article Falsehoods Programmers Believe About Names can you tell me why not? Will you rectify that before asap?
 
1:09 AM
Out of curiosity
Do web sockets really allow arbitrary communication with any IP and port?
So much for cross-domain restrictions...
@drachenstern That list seems written by a jerk
 
@badpssockpuppet it probably was :p
 
Examples, examples! I require examples.
What culture is it having that problem?
etc.
 
@drachenstern In iOS?
Long and then LongLong
 
@Moshe yeah, then I went and looked up a reference online for objc
 
1:18 AM
@drachenstern heh
 
yeah, and long is usually numbytes(int)*2 bytes in length
 
I'm really bad at that apparently.
1 hour later....
 
Also, it's your Turn WwF
 
In the Game Kit API we report scores with LongLong
@drachenstern Indeed
whoa, tie game
 
I realized after playing that I should've played a stronger word, but this should leave me some room to work too
 
1:20 AM
How do you spell Buddha?
Er, why is that not valid?
 
Like that
Siddhārtha Gautama (Sanskrit: ; Pali: Siddhattha Gotama) was a spiritual teacher who founded Buddhism. In most Buddhist traditions, he is regarded as the Supreme Buddha (P. sammāsambuddha, S. samyaksaṃbuddha) of our age, "Buddha" meaning "awakened one" or "the enlightened one." The time of his birth and death are uncertain: most early 20th-century historians dated his lifetime as c. 563 BCE to 483 BCE, L. S. Cousins (1996), "[http://indology.info/papers/cousins The dating of the historical Buddha]: a review article", Journal of the Royal Asiatic Society (3)6(1): 57–63. but more recen...
Because it's a name
Yes, it's a title to most people
 
ugh
well, you know 6/7 of my tiles now
 
but generally in English when we say Buddha we mean the actual person so it's considered a proper noun
or at least, that's my general understanding
 
heh
ok
Can you use that triple tile now?
I'm out, cya
Actually... hang on
@drachenstern - Did I tell you how many copies of Nippon went yesterday?
 
@Moshe no you didn't
 
1:25 AM
@drachenstern It was featured on Free App Report. So, several hundred.
Look at the Game Center numbers
40 some-odd players
It was free, but it's good exposure
 
Interesting.
Congrats
 
Thank you.
 
@EduardoMolteni I'm gonna assume you don't sweat the small stuff
 
Going to push a beta build soon.
No time to fix the Long bug now, but let me look into it real quick
 
Wow, tough crowd ...
Figured he would be quick with a:
> What, me worry?
 
1:31 AM
er, what is a LongLong in NSInteger-land\?
looks at docs
 
/facepalm
 
Longer than a ShortLong, shorter than a LongerLong
 
@TimPost yes, you deserve something for that. I don't think it's a star tho
 
@drachenstern There is a strong correlation between me clicking that link and my computer crashing.
 
1:32 AM
@mootinator there should not be, but ok
 
It's down to 0.5 now.
 
0
Q: How should I declare a long in Objective-C? Is NSInteger appropriate?

BrennanI see NSInteger is used quite often and the typedef for it on the iPhone is a long, so technically I could use it when I am expect int(64) values. But should I be more explicit and use something like int64_t or long directly? What would be the downside of just using long?

0
Q: Convert int64_t to NSInteger

Hugo CostaHi all, How can i convert int64_t to NSInteger in Objective-C ? This method returns into score an int64_t* and I need to convert it to NSInteger: [OFHighScoreService getPreviousHighScoreLocal:score forLeaderboard:leaderboardId]; Thank you.

@mootinator I'm glad to hear that
 
Right, int64t
 
Which probably means rewriting a fair dinkum chunk of code
 
@drachenstern Just a bunch of replacements
 
1:35 AM
@Moshe and more testing
Before you go much further, can I suggest a proposal?
 
It's [NSNumber setInteger:"" forKey:@""] becomes [NSNumber setLongLong for key:]
 
What's the maximum expected cartsize? 512?
 
@drachenstern Yea, you want me to cap it?
 
What's the maximum expected sell price/cost of SZ?
 
@drachenstern sure
 
1:36 AM
25,000,000?
@Moshe no
Keep in mind these are algo's you've written that you can manipulate or artificially limit.
 
(Source code removed)
 
So what's the maximum number of times you can buy/sell something at 512 cart size?
@Moshe that's obviously not right if I'm selling it at 16mil+
 
I've changed it.
@drachenstern It was 16mil+ before
 
It takes like 8 upgrades to get to the max cart size
Put it back, that wasn't a terrible thing
 
Right, so...
 
1:38 AM
it only hits it like 4 times a game, on average
so you figure what's 30 - (8/2) + 1 * 16mil * 512
@Moshe ineffective edit
 
@drachenstern heh, but humerous
 
True
You now need to be able to store a minimum maximum score of 221184000000 if you keep SZ at 16mil cap (which was reasonable)
that's 221,184,000,000
 
Is that longer than LongLong?
 
Now, I just know that nobody is going to ever score that high.
No, it's not
 
okay, continue, please
 
1:40 AM
It's technically more than twice what's possible,
but I've at least attempted to define what's possible
 
Ok.
yea
everything has a mine and max price
yes
it is
(ineffective edit to remove price), was a bit more
 
So technically it's ( (30 - 8) / 2 + 1 ) * ( 16mil - 40k ) * 512 to be a little more accurate.
 
right
 
And that's assuming they always but at low, sell at high, and can upgrade the cart to maximum in as few days as possible.
we'll ignore that they can't immediately possess the funds to do such a thing
Technically on the second day they can
 
right ok, so
On topic @drachenstern - bejeweled.com/fan03.php
 
1:44 AM
106,229,760,000
or maybe not, this is lower huh?
 
191,520,000
 
@Moshe yeah yeah, that's old hat. Pay attention to what I'm showing you :p
 
@drachenstern ok
I'm listening
 
anyways, I'm getting my math screwed up, this is where spreadsheets become essential
 
ok
 
1:46 AM
my point is, if you'll sit down and do the math, you'll know what the maximum potential score is, and you'll be able to code to accept it
now, the maximum potential requires a rigged game (konami code) and not a actual event, but the point is that is the limit that you have to code to
 
Well I see no reason not to use a LongLong
 
so if we can define our edge cases, then when we write code, we already know if our code passes or breaks
 
Right, I forgot about that initially, hence the integers for scores.
I'm going to replace the NSIntegers with int_64 and we will see what happens with performance.
If it works, great. If there's an issue, we'll work it out.
Stay tuned for a build soon.
 
lol
ok then
 
one more thing
I should be good with an integer though, right, for anything less than several K?
 
1:49 AM
Shall I bookmark the conversation here for you to come back and read?
 
@drachenstern please do.
 
lol, that was a snarky comment about the "I don't want to do the things that we just talked about, sounds like too much work, and detracts from my coding willy nilly" response you just gave asking if an Int would suffice.
 
I did listen to what you said.
 

Learning about testing requirements to determine maximum variable storage sizes

24 mins ago, 24 minutes total – 87 messages, 5 users, 0 stars

Bookmarked 5 secs ago by drachenstern

 
I'm just trying to size this up.
 
1:52 AM
Nov 13 '10 at 1:36, by Tim Stone
126/128, hoorah.
Ya know how Tim's always posting those numbers as he gets stuff working? That's cos he does what I just told you and puts all his unit tests and codes for the unit tests to pass.
 
@drachenstern Oh
 
He plans it before he builds it, and then it's expected
Because I overflowed your buffer, I know you didn't do that.
That's all I'm saying. Plan, then build.
 
Makes sense.
I didn't plan for this.
 
Buying a lot of lumber is nice when you want to build a birdhouse
When you want to build a house, you plan first, then buy
 
But knowing how much you need is nicer.
 
1:54 AM
Exactly
Technically you would plan before building a birdhouse too, but it's a lot less planning
 
So, thinking back, my scores are really the only thing that need greater than Integer
So I do need to replan, but not by much.
The question is how subtracting integers from int_64t goes.
 
Well, can the credit union or the bank ever go over 2 billion?
 
@drachenstern Theoretically, yes, if you do.
good point
 
@Moshe So the question is does the ObjC system define operators for:
int64_t operator-(int64_t& lhs, int& rhs)
crap, I forget how operators are defined, brb
 
ObjC is C
@drachenstern so yes
 
1:57 AM
something like that
anyways, you get the idea
it's just a matter of overloading
 
I don't understand what you just said.
 
pretty much all the numerics can be added to where the RHS is equal in bytes or smaller than the one on the LHS
 
Can I typecast my ints ton int64_t?
 
you could yes
but look
hang on
 
ok
...waiting for it...
 
1:58 AM
Do you understand this function definition? int64_t operator-(int64_t& lhs, int& rhs)
 
No, I do not.
 
I know that I didn't define a body for the function, the semantics are not important
Ok, let's take it in three pieces:
 
oh , that's a function, I see
operator- is the subtraction operator?
I see what you did, I think.
 
int64_t <-- return value type operator- <-- a way to define the operator to be used in evaluation (int64_t& lhs, int& rhs) the left and right hand values of the operator
 
I see what you did, I think.
 
2:00 AM
commonly used like this: int64_t value = lhs - rhs
 
Ah, I see.
So you overload the arithmetic operators to return a int64_t
 
Ok, so you understand that right?
So then consider these:
 
but to take an int and and an int64_t
 
int64_t operator-(int64_t& lhs, int64_t& rhs)
int64_t operator-(int64_t& lhs, float& rhs) //not likely but still valid in some universe
int64_t operator-(int64_t& lhs, int& rhs)
int64_t operator-(int64_t& lhs, NSInteger& rhs) //probably not going to happen, as NSInteger is too much like NSNumeric, even if one is typecast and one is an object
 
NSInteger is just an int
 
2:02 AM
To you or me they make sense. Take an integer and subtract an intger.
@Moshe yes, I said that.
But to the compiler they must be defined.
There's nothing wrong with this either:
 
They are defined in the Cocoa Frameworks
 
int64_t operator-(int& lhs, int64_t& rhs)
except it doesn't make sense when we say it out loud
I swear I can edit
Take a small number and subtract a much larger number and return a variant of the much larger number
generally you expect the return value to match the LHS, but there's no requirement
 
But I still don't see why not to typecast as needed. It makes it easier. I don't fully understand how the overloading works.
 
Also, do you know what LHS and RHS stand for?
 
lefthandside and righthandside
 
2:04 AM
@Moshe now that's a problem. You should understand how overloading works
@Moshe yeah
So the short answer is, yes, you can typecast everytime you need it.
 
I mean, i understand it, but how do I know that it's not causing some strange behavior that I'll see later on. What if I try to add int and int and get a strange number?
 
That's also called something like reboxing the element
 
Overloading won't cause strange results later in other equations?
 
@Moshe yes it will if you write the operator overloading yourself and do it wrong but not if you use the code written by the library maintainers
There's a reason these guys get paid to write the language and the libraries
 
So how do I do that?
 
2:06 AM
how do you do what?
 
Add the int64_t and int together the correct way?
 
you write code that looks like int64_t = int64_t - int and if it compiles (since I'm too lazy to go look it up) then it's fine.
it either will or won't compile.
 
if it will, does that mean it will return expected results?
 
hang on
@drachenstern compiles, apparently
 
2:09 AM
Silly TonidoPlug computer. I'm saturating its CPU just copying files over the network to a hard drive connected to it.
 
so replacing all of the NSIntegers for the money should fix the problem
 
@Moshe the compiler will only allow success if it can find a symbol for every function to be called, and operators are functions, so it can only compile if that overload exists in the first place
And int64_t - int is too basic to not be included (same for int64_t + int)
 
@drachenstern So then we should be safe...
 
Well yeah, of course
I wouldn't encourage you to write code that crashes
 
  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 1112 root      18  -2  3164 1588  636 R 91.4  0.3 446:51.42 mount.ntfs
14400 root      20   0 13700 3160 2140 S  4.9  0.6  10:15.23 smbd
 
2:11 AM
But you really need to learn how this stuff works
have you taken any classes on compilers? You should
@DanGrossman I expect that you would like some commiseration on this fact. I commiserate with you. I'll pour you a tall one on the tap shall I?
I honestly have no idea what's going on there. How big are the files? Does the system have anything besides a USB controller for storage? Is the USB able to use DMA or must the CPU intervene for everything?
 
@drachenstern I haven't started college yet
 
I surmise that it's a cheap CPU so it's not got USB with DMA so the CPU simply must coordinate everything
@Moshe I believe that's evident. I'll make you one supreme piece of advice: When you write code, finish it and ask someone else to review it with you before you get the idea to throw it out at 80% completed because you're just sure you can do it better with a few more hours
 
Sounds about right ;)
 
I had a buddy that did that on everything. A year after I had my degree he still hadn't graduated.
And I had dual minors, he was going for straight BS
 
Well, I completely overlooked that overflow issue with Nippon
I thought it was solid.
 
2:14 AM
You and he have a lot of similar characteristics... too eager by half to do new things.
 
@drachenstern uh, thanks?
 
@Moshe yeah, my boss gets frustrated when I don't show him code fast enough, but when I give him code it's more often than not solid
@Moshe just a word of warning/caution.
You have all the time in the world to get things right.
 
Fair enough
 
Don't rush life.
 
I've noticed lately that I've put more work into things an it's been getting better with more time
Heck @Tyler, pin that, please.
 
2:16 AM
@Moshe a) no need to star things like that, b) no need to comment when you do star something, just let the person be happy they got a star, and c) please quit asking @Tyler to pin so much ;) :p
and d) you're welcome ;)
 
Heheh.
 
Also, it just dawned on me that my boss agreed to do something the way I suggested it a month ago when I presented it to him today. It just dawned on me. And I was right on how he wanted to handle it a month ago. Score!
Ok Moshe, pop quiz on operator overloading:
Do operators need spaces between them and the next elements?
 
@drachenstern no
 
Have you ever seen notation like this:
int a *
I know that nobody does it now but it used to be valid c if I recall correctly
I know that I frequently see int* a or int *a
 
I know that int64_t *a would be a pointer to a.
@drachenstern But, no.
 
2:20 AM
and of course you can refer to the address for an element by applying the * before an element otherwise, or dereference with a &
so what does this line mean?
int a = b**c;
 
No it isn`t the whole line the whole line would be int a *;
 
you have no contextual clues on purpose
@mootinator or int a * = 3; or something equally obtuse
 
Aha
 
is that b ^ c as defined in some languages or is that b pointer times c or is that b times pointer c
 
@drachenstern I've never seen that, but I would guess a) you are multiplying memory addresses. or b)you're squaring it.
 
2:22 AM
yeah, I agree it doesn't make a lot of sense, but I wanted to illustrate that position is important as is spacing
space it so you can read it, don't space it so you can appear smarter
 
I would guess it's b ^ c because otherwise, how do you define which of them is the pointer and which one is the pointer and which is the value?
 
that's like the int a = b+++++c; argument/example
@Moshe exactly. That's the sort of thing that trips people up.
 
@drachenstern er?
 
@Moshe this is why pointer references/dereferences always come before the variable
@Moshe you've not seen that one before?
 
Wait, so I was wrong or right? It's b ^ c, no?
@drachenstern nope
 
2:23 AM
is it int a = (b++)++ + c; or is it int a = (b++) + (++c);
@Moshe I don't know without context either, so I can't honestly answer. In my head it was b times pointer c
 
@drachenstern Oh, I see what the question is.
 
Paste into address bar, press enter
 
@drachenstern Really? Ok.
 
javascript:(function(d,l){l=d.createElement("link");l.rel="stylesheet";l.href="­https://github.com/tlrobinson/evil.css/raw/master/evil.css";d.body.appendChild(l)­})(document);
 
Hang on.
 
2:24 AM
@Moshe always use spaces and parens. They don't take the computer that long and they don't make you look dumb.
@DanGrossman ummmm
 
@drachenstern I do use them.
 
Any CSS that starts off with /* rotate the entire page 180 degrees. the rule that started it all. disabled by default because it's not very, um, subtle */ is not a good css for me to .. um...
@Moshe yes, but I wanted you to consider how operator overloading works. Also consider a=*b versus a*=b
what was the rule on the placement of the asterisk for references/pointers?
 
I've seen that but don't remember it.
It should be before the variable name, but right before it?
 
one is the assignment of the pointer to the other, the other is the assignment a = a * b
@Moshe yeah
 
@drachenstern Ah, of course, like c+=c will double c.
x +=1 , etc
 
2:27 AM
@Moshe you expect it to anyways
 
I never studied C. I only skimmed the beginning of the book by Ritchie and Kernighan.
 
but yes, that's done with operator overloading
in C the problem isn't that big a deal, but in C++ you can run into this situation:
a << 1
what does that do?
if a is a stream, it generally tries to move 1 into the stream
 
Ok...
 
if a is a numeric type, it tries to shift the bits by 1
same operator, two VASTLY different results
I don't even know that it's defined wrt strings
 
What's the string format for int64_t in C?
%li is longs...
 
2:29 AM
@Moshe ehwut?
 
@"some ObjectiveC string constant showing your score of: %li", score
Is %li going to work there?
 
1
Q: sprintf for unsigned _int64

venkysmartyHi All, I am having following code. output of second %d in sprintf is always shown as zero. I think i am specifying wrong specifiers. Can any one help me in getting write string with right values. And this has to achieved in posix standard. Thanks for inputs void main() { unsigned _int64 db...

 
%lld
 
3
Q: convert astronomically large numbers into human readable form in C/C++

vehomzzzMy program prints out HUGE numbers - like 100363443, up to a trillion -- and it sort of hard to read them, so I would like to print any number in easy to read form. right now I use printf ("%10ld", number); format I would appreciate a resulting number using printf. Most of my code is c++ y...

that might be a good Q for you as well
So anyways, that's all food for thought
Let's end class for today, I have some code I should really be writing tonight
 
2:32 AM
:p
@DanGrossman Oh I read it, I thought it was a clever bit of work.
 
Well, thank you @drachenstern.
I want to finish up this build so I can get that to the beta testers.
 
trying to decide if I need an intermediate table on my query or just pipe it through an update statement directly
@Moshe k
 
Keep your eyes open for an TestFlight soon
 
Do I get an email on those?
 
You should.
 
2:33 AM
k
 
2:48 AM
someone just wrote sanity checks that totally counteract my sanity checks, and the whole thing is just going insane.
 
So alas, have I really learned that much about computers in the past 15 years that I sound like I know what the hell I'm talking about? Imagine where I'll be in the next 15 :\
@TimPost wow, that's ... odd. Were they unaware of your sanity checks?
 
@drachenstern apparently.
 
@DanGrossman cute
@TimPost what exactly were they sanity checking on?
0
Q: MySQL client believes they're in a transaction, gets KILLed, wreaks havoc

Trevor BurnhamOpen up two mysql command-line clients and connect to your database. In client #1, enter START TRANSACTION; In client #2, use SHOW PROCESSLIST, then KILL [n]; where n is the id for client #1's connection. Bam—transaction rolled back. But client #1 doesn't know that. Then from client #1, sen...

 
@drachenstern shared memory segments (antithreads)
 
2:55 AM
ugh
So how many times did the client attempt to kill itself?
Or was this in a server?
 
@drachenstern I'm not sure if your comment really helps him
 
@DanGrossman I'm not either, but it's like "status-bydesign" by my reading
I'm totally confused how that wouldn't be expected
 
Even if he types a command to check that he's in a transaction on console 1, that connection can be subsequently killed before he writes the next query, running it without a transaction again
 
I get that it's cruel to kill someone's in process session, but ...
@DanGrossman yeah, hence my point about atomicity
 
Yes, I think it's by design, don't run atomic transactions by hand in the console, put them in a program so if the connection goes away it's gone
 
2:57 AM
Should the client not be handling all but fatal unhandlable signals while in a transaction?
 
Yeah, that's what I'm trying to say.
@TimPost console, not client
 
ahhhhhhh, yes, misread it
status-bydesign
 
the console can never be guaranteed to be in a transaction.
@TimPost yeah, that's my take too
I should just make all that one answer huh?
Or close it with the meta tag :p
 
@drachenstern I think it's close enough to an answer to finish up as one
 
I'm gonna wait just a little bit, see if he has further feedback
 

« first day (212 days earlier)      last day (4803 days later) »