Welcome to Gaia! ::

so what's the deal with sitwon's obnoxious as ******** pgp signature thing? is this the new black?
nouveau sereph's avatar

Shameless Enabler

Tadpole Jackson
so what's the deal with sitwon's obnoxious as ******** pgp signature thing? is this the new black?
I don't know but...
The20
@29582351c3
The following code throws an exception. Can you tell why? (I know why, and frankly i think it's absurd.)
http://pastebin.com/PTGrAZAP
Edit: moved code to pastebin.


In entirely unrelated news, does anybody know why this returns 0 and not 4 billion?
unsigned char b = 1;
unsigned long long l = ((unsigned long long)b) << 32;
printf("l = %u", l)
I think l is for date conversions.
nouveau sereph's avatar

Shameless Enabler

I won a Motorola Xoom 2. I was gonna give it to my fiancee but she's deadset on an iPad, and I already HAVE an iPad I barely use. What do I do with it? :/ Maybe sell it to my boss? I don't know.
Ebay the xoom and give her the ipad.
nouveau sereph's avatar

Shameless Enabler

29582351c3
Ebay the xoom and give her the ipad.
I said I barely use it, not that I don't use it. haha If I gave it to her half my reading list would go up in smoke; it's my primary reading device when I actually have the time or energy to read. I actually only found out I won because I picked the thing up to read Neuromancer and it was reporting a new email I hadn't noticed on my other devices.
nouveau sereph
29582351c3
Ebay the xoom and give her the ipad.
I said I barely use it, not that I don't use it. haha If I gave it to her half my reading list would go up in smoke; it's my primary reading device when I actually have the time or energy to read. I actually only found out I won because I picked the thing up to read Neuromancer and it was reporting a new email I hadn't noticed on my other devices.
If you barely use it, and it is just for reading wouldn't an eink reader do better?
nouveau sereph's avatar

Shameless Enabler

29582351c3
nouveau sereph
29582351c3
Ebay the xoom and give her the ipad.
I said I barely use it, not that I don't use it. haha If I gave it to her half my reading list would go up in smoke; it's my primary reading device when I actually have the time or energy to read. I actually only found out I won because I picked the thing up to read Neuromancer and it was reporting a new email I hadn't noticed on my other devices.
If you barely use it, and it is just for reading wouldn't an eink reader do better?
Not really. I use it for other things, of course, it's nice to browse and read feeds on, and has some pretty cool games to while away Sunday afternoons. I don't use it heavily (barely may have been exageratting) but I would miss being able to use it if I didn't have it, put it that way.

Plus, my fiancee wants an iPad3, to future-proof herself. Give it a year and the hinges on the original iPad (which I have) will start falling off, I'm sure.
nouveau sereph
29582351c3
nouveau sereph
29582351c3
Ebay the xoom and give her the ipad.
I said I barely use it, not that I don't use it. haha If I gave it to her half my reading list would go up in smoke; it's my primary reading device when I actually have the time or energy to read. I actually only found out I won because I picked the thing up to read Neuromancer and it was reporting a new email I hadn't noticed on my other devices.
If you barely use it, and it is just for reading wouldn't an eink reader do better?
Not really. I use it for other things, of course, it's nice to browse and read feeds on, and has some pretty cool games to while away Sunday afternoons. I don't use it heavily (barely may have been exageratting) but I would miss being able to use it if I didn't have it, put it that way.

Plus, my fiancee wants an iPad3, to future-proof herself. Give it a year and the hinges on the original iPad (which I have) will start falling off, I'm sure.
I can barely resist the labor joke.
29582351c3
The20
@29582351c3
The following code throws an exception. Can you tell why? (I know why, and frankly i think it's absurd.)
http://pastebin.com/PTGrAZAP
Edit: moved code to pastebin.
I think l is for date conversions.
It's a suffix for date time conversion, see here.

But that's not the point. The point is there are two things fundamentally wrong with this:
First of all the compiler could parse the code for those problems and report them.
Second printf should not throw an exception because of such a trifle. It should report an error and try to parse the value that should be displayed at this point trough a default method or display a string indicating it can't, but to kill the entire program because of this* is ridiculous.

* Since printf doesn't require to be try-catch'ed this is quiet possible.
Sonic Offline's avatar

Dedicated Man-Lover

9,600 Points
  • Elocutionist 200
  • Perfect Attendance 400
  • Millionaire 200
nouveau sereph
I won a Motorola Xoom 2. I was gonna give it to my fiancee but she's deadset on an iPad, and I already HAVE an iPad I barely use. What do I do with it? :/ Maybe sell it to my boss? I don't know.
I'd buy it if I had money.
nouveau sereph's avatar

Shameless Enabler

Sonic Offline
nouveau sereph
I won a Motorola Xoom 2. I was gonna give it to my fiancee but she's deadset on an iPad, and I already HAVE an iPad I barely use. What do I do with it? :/ Maybe sell it to my boss? I don't know.
I'd buy it if I had money.
It's $720RRP in Australia, when I get it I'm putting up a sign at work for $500 o.n.o.
The20
29582351c3
The20
@29582351c3
The following code throws an exception. Can you tell why? (I know why, and frankly i think it's absurd.)
http://pastebin.com/PTGrAZAP
Edit: moved code to pastebin.
I think l is for date conversions.
It's a suffix for date time conversion, see here.

But that's not the point. The point is there are two things fundamentally wrong with this:
First of all the compiler could parse the code for those problems and report them.
Second printf should not throw an exception because of such a trifle. It should report an error and try to parse the value that should be displayed at this point trough a default method or display a string indicating it can't, but to kill the entire program because of this* is ridiculous.

* Since printf doesn't require to be try-catch'ed this is quiet possible.
It's giving you exactly what is wrong in the stack trace. It's an unknown format conversion. Besides that, there is nothing stopping you from catching the exception if you want too. It is just an unchecked exception. Normally I would think someone would use an assertion that the type to be parsed is the correct type and if not to not do it and save an error log.

try{
long l = 0L;
System.out.printf("l = &#xld;", l)
}catch(UnknownFormatConversionException e){
System.err.println(e.getStackTrace())
}
System.out.println("Banana boat")
Gabriel Faust's avatar

Original Gaian

nouveau sereph
Sonic Offline
nouveau sereph
I won a Motorola Xoom 2. I was gonna give it to my fiancee but she's deadset on an iPad, and I already HAVE an iPad I barely use. What do I do with it? :/ Maybe sell it to my boss? I don't know.
I'd buy it if I had money.
It's $720RRP in Australia, when I get it I'm putting up a sign at work for $500 o.n.o.
I'm so used to the obo abbreviation that I thought you did an emoticon.

But I know most of the people hear (minus Bento) have no emotions, only an emotional implant emulating fear at change and anticipation of shiny.
29582351c3
The20
29582351c3
The20
@29582351c3
The following code throws an exception. Can you tell why? (I know why, and frankly i think it's absurd.)
http://pastebin.com/PTGrAZAP
Edit: moved code to pastebin.
I think l is for date conversions.
It's a suffix for date time conversion, see here.

But that's not the point. The point is there are two things fundamentally wrong with this:
First of all the compiler could parse the code for those problems and report them.
Second printf should not throw an exception because of such a trifle. It should report an error and try to parse the value that should be displayed at this point trough a default method or display a string indicating it can't, but to kill the entire program because of this* is ridiculous.

* Since printf doesn't require to be try-catch'ed this is quiet possible.
It's giving you exactly what is wrong in the stack trace. It's an unknown format conversion. Besides that, there is nothing stopping you from catching the exception if you want too. It is just an unchecked exception. Normally I would think someone would use an assertion that the type to be parsed is the correct type and if not to not do it and save an error log.

try{
long l = 0L;
System.out.printf("l = &#xld;", l)
}catch(UnknownFormatConversionException e){
System.err.println(e.getStackTrace())
}
System.out.println("Banana boat")
Even if i catch those errors (so far i caught whatever the compiler complained about being thrown and this isn't thrown according to the method declaration, so the compiler doesn't care, which means many people will never even notice it) it still kills printf (and, unless i catch every single line in a program, a whole lot of other stuff) because of an error that could be reported before the executables are even created.

In related news, Gaias parser doesn't like the combination percent-L. Doesn't seem to have a problem with percent-U, though. At least it doesn't crash the parser, imagine how the site would look if it did ...


Gabriel Faust
nouveau sereph
It's $720RRP in Australia, when I get it I'm putting up a sign at work for $500 o.n.o.
I'm so used to the obo abbreviation that I thought you did an emoticon.

But I know most of the people hear (minus Bento) have no emotions, only an emotional implant emulating fear at change and anticipation of shiny.
I could throw in some angst and maybe some depression if you like.

Quick Reply

Submit
Manage Your Items
Other Stuff
Get GCash
Offers
Get Items
More Items
Where Everyone Hangs Out
Other Community Areas
Virtual Spaces
Fun Stuff
Gaia's Games