« first day (888 days earlier)      last day (4054 days later) » 

8:00 PM
Yes because of ASCII\
 
Comma operator strikes again. — chris 46 secs ago
 
even a step back, the "40" are a bunch of dots of light in a certain pattern that we recognize as digits...
 
Yes.
 
@TonyTheLion Must challenge.
> Whether a lion is physically strong or not, finding an alpha lion to challenge is a requirement. Lions typically cannot live on their own because they are constantly in danger of being attacked by other animals like hyenas.
 
Bye - I'm off. I may be back later...
 
8:01 PM
This base converting thing is still going
 
Therefore, it's what you think that's important to the discussion...so "J" is just as easily a number because we want to think that it is.
 
@StephenLin Agreed. That continuous to put me on the wrong foot sometimes
 
Okay.
 
@sehe you're a bear, you don't challenge lions
 
@sehe You are free to keep talking about your porn recursion.
 
8:02 PM
@Griffin When I was in 4th grade, I had to memorize my multiplication tables. I can still write one out find the column for 5 and the row for 8. Where they intersect is a 40, which is the answer.
 
I actually like C++/CLI, I would certainly consider more intensively using it if the opportunity arose
@TonyTheLion I won't
 
Okay....
 
@Griffin You can just as easily make a multiplication table for any other base. In base 25, one of the rows and one of the columns will be marked "J".
 
@sehe seheheheh
 
I don't like where this is going...
 
8:02 PM
@Griffin That row will have the multiples of "J" in it in base 25.
 
@Griffin free your mind! just imagine what like would be like if you were born with 25 fingers
everything falls into place after that
 
So if you want to avoid base 10, one way to do it is make a multiplication table in base 25.
 
Emergency services saw a surge in weather-related call-outs as some parts of the country were hit by blizzard conditions. In Cumbria the Sellafield nuclear site was shut down in response to adverse weather conditions. In the Midlands, the body of a software engineer was found outside his house after aparrently becoming lost in the snow while trying to find his car. A police spokesman said "He lived 2km from the nearest pub and his beer fridge was empty. We are not looking at foul play".
 
So I have to create a giant as array. I understand that numbers are just representations they problem is getting C++ to represent it properly.
the
 
Then evaluating something like "A*J^0+1*J^1" is just a bunch of lookups.
 
8:04 PM
> If you are eating at McDonald's the provenance of the egg is the least of your concerns. I'd worry about the "cheese". lifehacker
 
oh...and similarly you need an addition table.
 
@StackedCrooked: I can't see cerr nor clog on Coliru. I see that as important.
 
I hate to say this, but I actually kinda like eating McDonalds
 
or you can just convert to base 10 and then to the target base...
 
.... Yea..... I could of done that.... I was hoping there was a better way...
 
8:04 PM
@MartinJames someone purposely killed him by empying his fridge!
 
He's gone maaaddd.
 
@Griffin there probably is. The most obvious solution is often the least efficient.
 
No you don't hate to say it. After all, you use Visual Studio too.
You have to shame :)
 
@Griffin Feel free to keep looking for other solutions.
 
@Code-Guru Exactly. I am looking for a more efficient however...
@Code-Guru So you can't think of a better one off the top of your head?
 
8:05 PM
@Griffin Good luck with that ;-)
 
Yea....
 
Of course, you need to implement a solution in order to make a comparison with any other solutions you find...
 
@Griffin, you should realize that when you convert to "int" or "long", you're not really converting to base 10, btw (technically, internally you're converting to base 2, but that's implementation detail)
and int or long is basically an array of bits
@Griffin hopefully that doesn't confuse you more than it helps
 
@MooingDuck all three work for me (you can reset the default command line by clearing the command field, pressing compile and refresh the page)
 
Steven I understand but I was still hoping there was a prettier (and possibly more efficient) way.
 
8:07 PM
@Griffin you mean string -> string without an intermediate?
 
@StackedCrooked sorry, nevermind. I was printing '\0' on accident
 
@StephenLin Printing to some kind of display kind of does a conversion to base 10...except the result is chars in the systems character set.
 
Yet the string contains numbers and those numbers need to be converted...
And letters.
Letters are the bad part.
 
@Code-Guru I know, I know
 
by "kind of" I mean that the algorithm is the same...do divisions and mods and find the correct char to display.
@StephenLin I know you know. Just tagged as a reply to your post for continuity of the thread ;-)
 
8:08 PM
@Griffin do you really need to handle overflow?
@Griffin like, numbers larger than LONG_MAX or even LONG_LONG_MAX?
 
I don't know what you mean by "overflow".
 
@Griffin letters aren't a problem for a lookup table. Nor for converting to base 10 if you need to.
 
if not, you're making a solution that's going to be slower
even if it seems like it's skipping a step
 
That's what I thought and no.
 
@Griffin yes
 
8:10 PM
@MooingDuck Potato to you too sir.
 
@Griffin Which goes back to an older part of this discussion. How are the numbers in each base represented?
 
A squiggly lines.
 
@Griffin As a string? As an array of int (or long)?
 
@Griffin, if there's no overflow, then converting to a native integer type and back is basically the best you can do without very tricky special case logic
 
int.
 
8:11 PM
@Griffin just an int? Then how do you know that it's base 20? or base 25?
 
.... sorry string.
 
@Griffin you can only improve on that if there's some special relationship between the input and output bases and that the character set you have can take advantage of that
 
@StephenLin you mean like binary to octal or binary to hex, right?
 
So in other words the fastest possible way is to make a multiplication table and all other ways are slow as fk.
 
Jesus' jizz, still this?
 
8:12 PM
@DogPlusPlus Jesus', ftfy.
 
Guise.
 
@Code-Guru yeah, basically
 
@DeadMG Thank you <3
 
I need to write stream_iterators for my streams.
Anyone have any experience with this kind of shit?
 
well write them then :)
 
8:13 PM
I like Captain Crunch,
 
@Code-Guru bases that are multiples of each other...i think the character encoding would make a difference too, at that point, since it depends on the efficiency of converting one set of characters to another
 
@ThePhD look at the standard stream iterators
also iterators are a bitch to write
 
@Code-Guru I suppose if you made a lookup table for each case it would always be faster than going string -> integer -> string and back, but you have to special case it
 
..... It's going to be a big array isn't it...
 
8:15 PM
@ThePhD We could really use a more specific question than that. :D
 
@Griffin, you don't need a multiplication table yourself because the computer already knows how to do multiplcation/division/modulus in its native base as fast as possible
 
@StephenLin When converting binary <--> hex by hand, i usually have a mental lookup table...or write one out.
 
@TonyTheLion I saw it immediately.
 
@TonyTheLion I almost missed it. :( Horny Dog Plus Plus.
 
8:15 PM
@Griffin the fast generic solution is just to use the processor's internal operations
 
No like he's saying with the table for converting each thingy.
 
@Griffin What's the largest base you are going to use?
 
probably helped by the fact that she wasn't that hot
 
@DogPlusPlus True.... eh. My fingers are too tired. :c
 
36
 
8:16 PM
@Griffin that's only because you don't want to do the string -> integer -> string route
 
I haven't been following the conversation, but how are multiplication tables in base 25 relevant?
 
@MooingDuck The whole discussion is irrelevant. :D
 
@Griffin 36*36 isn't very big....
 
@Griffin you're making it harder for yourself by trying to skip a step that doesn't really need to be skipped
 
It's like a multiplication talbe
 
8:16 PM
Fuck this discussion, lets move on
 
@Code-Guru I'm not sure why you're suggesting the table, to be honest
 
@Griffin I think going string -> string directly might be slower in many cases than string->integer->string.
 
Move along to Mumble, bitches. <3
2
 
^ this ^^^^^^^^^^^^^^^^^^^^^^
 
@StephenLin because @Griffin doesn't want to convert to base 10.
 
8:17 PM
Exactly...
 
@Code-Guru but that's not what that does anyway!
@Code-Guru you know that and I know you know that, so why not explain that?
 
Not what what does?
 
@Code-Guru string->int->string has no base10 involved. Why skip the int step?
 
@StephenLin I'm not sure what you mean
 
@Code-Guru going to an integer doesn't mean there's base 10
 
8:18 PM
Okay if it doesn't then how do you do it...
 
@Griffin, it's just base 10 because you happen to write number literals in base 10 in your source code
 
I was pretty sure you were going to have to convert to base 10 but if not I'd love to here it.
hear.
 
@Griffin integers are values. They're stored in computers as base 2. The only point that base 10 comes in is if you try to show them on the screen, the computer converts them to base10 strings to show you.
 
@Griffin, if you want, you could write all your literals in your source code as base 8
then you would be going to base 8 and back
 
@StephenLin well...converting the char literal 'J' to the int literal 20 seems to be using base 10 to me.
 
8:19 PM
@Griffin did you see my code? The only 10 is in my tests.
 
but the generated code would be the same
the compiler does not care that the int literal 20 is written as "20"
 
So how do I go from base 23 to base 26 using this method?
 
@Code-Guru it converts J to the value 20. Not the literal 20. It's the same value in every base.
 
you could have written it in octal or hex
ah, i give up
 
@Griffin parse base 23 to an int, serialize the int to base 26.
 
8:20 PM
@MooingDuck feel free to continue as long as you can manage
 
@MooingDuck sure...but we are still using base 10 to write a hardcoded literal.
 
@Code-Guru so write your literal in another base, computer doesn't care. The value is the same
 
@TonyTheLion I laughed, have a star
 
But what about the letters. The letters confuse me :(
 
Xeo
8:21 PM
Your second 'Live example' does not compile :-/ Can you check why? — kyku 2 mins ago
 
@MooingDuck Can a C++ compiler parse J as an int literal in base 25?
 
@Code-Guru 20 and 024 and 0x14 are all teh same value
 
Xeo
Wtf, I could swear that the link compiled before...
 
@Code-Guru If you use octal ( 072) or hexadecimal (0xa) that's fine too.
 
8:21 PM
Damn it, automagically started listening.
 
@Code-Guru I think you might be misunderstanding the word "literal". Can we clarify that>?
 
@MooingDuck And neither are in the bases of the problem (20 and 25 in the example).
 
Xeo
Wait.. could it be that somebody edited the snippet? Wtf?
 
@Code-Guru C++ only understands base 8, 10, and 16 natively.
 
Xeo
lol, sure did
 
8:22 PM
@DogPlusPlus Sounds way too much like a carol.
 
Xeo
Wtf LWS
WTF
 
@MooingDuck zactly...so you can't write a literal in C++ source in any base. You are limited to those 3.
 
Xeo
Back to Ideone, it seems >_>
 
Yes direct path.
 
y u no coliru
 
8:23 PM
No detour to any other base.
 
@Code-Guru a literal is source code. You can write any value you want. The computer only sees values. the conversion executable should have no base10 in it. Only the source code.
 
@Code-Guru, @Griffin ok, so is the restriction not to use base 10 at "run-time" or at "compile-time" and who's giving you that restriction
 
@MooingDuck Right.
 
and by compile-time, i mean, in the source code
like, literally in the text of the source code (since the compiler doesn't really use base 10 at "compile-time" either)
 
@Code-Guru wait, he wants to avoid having base 10 in his source code? Why? Whatever. Just write literals in hex then. It has nothing to do with converting numbers to bases at runtime
 
8:24 PM
Umm.... I'm giving it to myself. And run time....
I think.
 
@MooingDuck My suggested solution avoids an intermediate base in any form...but maybe that's my extremist interpretation of "avoiding base 10".
 
I can use base 10 in the code. Just don't want to go from base I have to base 10 to base I want.
 
@Code-Guru how are you going to express your lookup table offsets?
@Code-Guru you still need to write those, right?
 
I don't even...
 
@StephenLin Assuming that the "digits" are stored as chars, I would use chars as the indices into the table.
 
8:25 PM
@Code-Guru I guess you could do it without any literals at all if you really tried
 
@Griffin nobody is suggesting that. We're suggesting base you have, to a value, to base you want. Values have no base.
 
seriously
 
@DogPlusPlus If you don't like the conversation then give us the solution.
 
@Code-Guru it just seems like a pointless exercise in futility
 
@MooingDuck Okay.
 
8:26 PM
@DogPlusPlus Just another day on Lounge<C++>
 
Yo momma’s so fat, we are all extremely concerned for her health.
 
@Griffin You can only provide solutions to actual problems.
 
@Griffin We're trying to understand what the problem is in the first place??
 
@Griffin I posted a solution quite a ways back
 
this ^
 
8:26 PM
@StephenLin I'm pretty sure I stated earlier that my lookup table isn't the only solution. It stems pretty natural for me from the way I learned to do arithmetic in the first place.
 
And that was....
I lost it.
 
@Griffin The off you go! Search. Luckily there's a transcript and it's permanent
 
@Griffin here
 
@Code-Guru I know, it works and it's helpful an exercise, but it's probably just confusing the issue for him, imho
 
user142019
@Xeo s/Ideone/Coliru/
 
8:27 PM
@StephenLin And I'm certain it's not the best solution (for any reasonable definition of "best").
@StephenLin granted...it probably is.
 
AntiJokeCat is pretty funny
 
..... Okay. Now I must go figure this out.
 
@Griffin do you understand why "values" have no base?
 
so now that we killed the rest of the conversation...
;-)
 
@Moon
I keep saying moon
 
8:31 PM
I could totally be MoonDuck for a day and see how long it takes people to notice.
 
@MooingDuck Yes because all numbers and such are just squiggle lines.
 
Then again, they caught me as DeadMG really fast.
 
@Griffin the only complicated part in that code is a lookup table for ASCII values, by the way
 
Noo mooning duck.
 
@Griffin that's what that table is for (at least, i think so, i just looked briefly)
 
I don't understand what the clusterfuck of -1's is.
I shall research,.
 
@Griffin, it's for ascii values, -1 just means its not a digit or a letter
 
@Griffin squiggle lines? No, the lines are a representation of a value. A value is how many fingers you have. In base 10, you have 10 fingers. In base 8, you have 12 fingers. In base 2, you have 1010. But you don't "magically" get more fingers in other bases. Those are all the same "value", equal to the number of fingers you have. The number of fingers you have has no base. Similarly, int in C++ has no base.
 
@StackedCrooked Is there still as much religious fanaticism in there?
 
"values in computers have no base." *sort of
 
8:34 PM
@EtiennedeMartel Dunno about that.
 
@MooingDuck Yes.
 
(sorry, I realize that might not be helpful at this point)
 
@StephenLin they're stored in a base as an implementation detail, but yes.
 
@MooingDuck yeah, I know you know :)
 
Ohhhh Now I know what that is.
 
8:35 PM
just trying to be pedantic
 
Your saying if it's not one of these things it's null.
It just kills the program
 
@StephenLin You are an excellent fit for this room good sir!
 
@Griffin if it's -1, that's an error, and yes.
 
Woot now I'm learning. Fuck yea.
 
@DeadMG that was random, but thanks :)
 
8:36 PM
When talking about numbers, there's a distinction between the mathematical object and its graphical representation. Changing the base affects the representation, but not the object itself.
 
@DeadMG has he said anything bad about Java yet?
 
@Griffin if someone passes it "012>ZF", the > would touch one of the -1s, and the program would quit.
 
me?
 
no, but there's still time.
 
oh yes
 
8:36 PM
quick, express your undying hatred of all things Java.
especially design patterns
 
@DeadMG Even then, nobody's perfect.
 
try-finally is a stupid piss poor excuse for resource management that was outdated before it was even implemented?
 
It's all about having the desire to learn.
 
that ok?
 
Interesting. It also seems that when you do this you assign a value to each ASCII character. So when you passed over the letters you just said they are 10, 11, 12, 13 and so on. Now I see what you were talking about.
 
8:37 PM
@StephenLin yeah
@Griffin exactly
@Griffin "lut" is "lookup table" by the way
which it uses to look up the value for each character.
 
.... *string? I'm used to * representing a pointer.
 
@Griffin it is a pointer. I named my pointer "string"
 
Okay so why are you making sure that it stays below 127.
Because you don't want to make a table larger than that?
And that's where z is?
Z is 126
 
It's a manual process - and one which was overlooked in this case. Not to go into detail, but it's probably not robust enough to make this automatic - so we can't ever promise that it will or won't happen, but in cases where the disruption will likely be high we do try to minimize it. — Shog9 55 mins ago
Now That's Unexpected ^^ /cc @Mysticial. Apparently, we've just got some moderator to thank when mishaps like that happen.
 
@Griffin because I made the table is only 127 numbers long. if someone gives it a char bigger than that, it deliberately crashes itself.
@Griffin Z is actually like 122 or something
 
8:41 PM
Ahhh..... Really wish we had started looking at the code.... would of made this shit so much easier.
 
@Shog9 REALLY? Now that takes me by surprise. If there's no way to fix it, then I suggest a safety measure (an alert message) of some kind is order. This is certainly not the first time it happened this way: chat.stackoverflow.com/transcript/message/5540467#5540467 just one very well recorded incident — sehe 1 min ago
 
What is UINT_MAX however?
 
@Griffin biggest value that can be stored in an unsigned variable.
 
K
 
@Griffin it's almost always 4294967296
 
8:42 PM
You really like your assert statements...
 
@Griffin in real code, several of those would be exceptions instead
 
@MooingDuck ridiculous! why throw an exception when you could just crash instead?
 
@MooingDuck Okay got another confusing part
do {
assert(value%base<36);
ret.insert(ret.begin(),lut[value%base]);
value /= base;
}while(value);
What's with the while at the end?
 
(that's actually the LLVM way, literally)
 
@Griffin it's a do {actions;}while(condition); loop.
 
8:45 PM
I thought that was put up there but okay.
Wait no.
That makes sense now.
and the ret. I'm assuming that's the returned value.
 
@Griffin yes
 
here, in this, invalid characters in the strings throw exceptions rather than crashing. Invalid bases and strings such still crash though.
 
@Rapptz Dammit.
 
@Griffin and yes, I like assert. I overuse it slightly :/
 
8:49 PM
@Mooing ... I just looked at your main.... I have no clue wtf that does. It just seems odd
@MooingDuck
 
@Griffin you know what parse("0",36) does?
 
No that's one of the confusing parts.
Not sure of it looks for 0
"0"
 
@Griffin unsigned parse(const char* string, unsigned base) ring a bell?
 
Yea
First thing
So your calling that?
 
@Griffin right, so parse("0",36) reads the the number from the string "0" in base 36.
 
8:51 PM
hey btw, I don't think helping @Griffin so I'm not complaining, but is "no-helpdesk" supposed to imply "no helpdesk"?
 
@StephenLin :<
 
why's that there anyway?
i don't mean not to help, i mean, why even have it tagged?
 
@StephenLin to keep this sort of thing out of the lounge....
 
@StephenLin Not help desk more like understanding.
We are informing
The community.
Of the wonders
 
@Griffin no, this is definitely helpdesk
 
8:52 PM
Shhhhhh
okays :(
I still <3 you Mooing. You should totaly change your name to mooning tho. Cuz I keep typing that and it messes me up.
 
@Griffin You have a dirty dirty mind
 
we moved here
 
No I actually just type Moon
 
most people type "@Moo" and that works fine
 
^ This
 
8:56 PM
Moo moo moo
 
Plus it rhymes with You.
 
Alright, team meeting is over, I can start work on my serializer/deserializer
 
@Moo I looove yooou. <3
 
@StackedCrooked That's really quite close to every feature supported.
 
8:56 PM
i'm the only one here using a real name (unless you all have weird parents)
 
DAMN
Only 2 No's.
 
i should think of something
 
@DeadMG Yep.
 
Fucking MSVC and Clang PICK UP THE FUCKIN' PACE.
 
@StephenLin We have no parents. We are one. Your biological and technological distinctiveness will be added to our own. Resistance is futile.
 
8:57 PM
all the old "@" tags won't make any sense though
 
> Minimal support for garbage collection and reachability-based leak detection
 
they don't get changed automatically right? they just store them as plain text?
 
And one of those features is fucking unimportant. :D
 
@TonyTheLion I'm canadian too :(
 
8:58 PM
oh
well I didn't know
 
@StackedCrooked c++11 is out, c++1y is the way to roll now
 
This makes me sad looking at MSVC. :(
@bamboon 14 is teh number.
 
Hurry up MSVC
I don't think MSVC even has variadic templates yet
slow slow
 
It has em but they don't work
 
8:59 PM
It has it in its CTP and Xeo has had all the bugs he submitted about them fixed by STL.
 
The vanilla MSVC11 can't even delete methods.
 
about as not having them really
 

« first day (888 days earlier)      last day (4054 days later) »