Language:
switch to room list switch to menu My folders
Go to page: First ... 89 90 91 92 [93] 94 95 96 97 ... Last
[#] Fri Jun 08 2012 15:51:37 EDT from IGnatius T Foobar @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]

One sign that you're a good programmer is that you don't put double dots into hostnames. :)

[#] Fri Jun 08 2012 16:10:59 EDT from dothebart @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]

yea, thats what happenes when you click codeproject links ;-)

fancily some proxies/dnses like it, some don't...



[#] Mon Jun 11 2012 12:59:08 EDT from IGnatius T Foobar @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]

Decades later, I still find the expression "x = 1 - x" to flip the value of a boolean represented as an integer to be wonderfully clever. Call me a simpleton but there's just something attractively elegant about it.

[#] Mon Jun 11 2012 13:18:11 EDT from Spell Binder @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]

Correct me if I'm wrong, but wouldn't that expression only work when x is either 0 or 1? It's been a while since I've programmed in C, but I vaguely remember that zero indicates false, but any non-zero value indicates true.
If so, then the following code wouldn't work.

int x = 3;
x = 1 - x;

May not be as clever, but seems to me to be far more reliable to stick with x = !x.
Spell

[#] Mon Jun 11 2012 14:10:36 EDT from dothebart @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]

spel, you're totaly right.

and there is a good reason for ΅true" == !0

most processor architectures know something expressed in assembler like this:

jnz <jump mark> or jz <jump mark>

-> Jump if (not) Zero; a register can be added in more modern processor architectures.

therefore: yes, its a good idea not to take IGs hack.

depending on the datatype you can even get more bad effects:

In corba, a boolean value is a byte value; while most c-compiler specific booleans are simply ints.

so if you true is above 255, it will suddenly become false in the corba layer.



[#] Mon Jun 11 2012 15:57:16 EDT from kc5tja @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]

It fails with languages that represent true
as all bits set too.

CORBA's representation is true only over the
wire. When unmarshalled, the proxy or stub
should normalize the value. When
marshalling, true values should be sent as 1,
and only 1.

If your IDL compiler doesn't ensure this,
then it's technically broken, and should have
a bug report filed against it.

[#] Mon Jun 11 2012 16:55:15 EDT from dothebart @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]

 

Mon Jun 11 2012 15:57:16 EDT from kc5tja @ Uncensored
It fails with languages that represent true
as all bits set too.

CORBA's representation is true only over the
wire. When unmarshalled, the proxy or stub
should normalize the value. When
marshalling, true values should be sent as 1,
and only 1.

If your IDL compiler doesn't ensure this,
then it's technically broken, and should have
a bug report filed against it.

the idl compiler doesn't have to be in the game here; since c doesn't specify a type for boolean, while corba does.

so if you call your corba stub with a value > 255 (and all 8 lower bits 0) the c-compilers "convert" the int to the byte and throw away wats not there.



[#] Tue Jun 12 2012 13:54:05 EDT from IGnatius T Foobar @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]

Damn buncha pedants. Yes I'm talking about a variable within a single function that has a variable that toggles back and forth between 1 and 0.

And who said I'm working in C ? This is a PHP program.

[#] Tue Jun 12 2012 16:47:51 EDT from dothebart @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]

you're posting in the programming room, not the scripting room ;-P



[#] Tue Jun 12 2012 16:49:04 EDT from dothebart @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]

 

Tue Jun 12 2012 16:47:51 EDT from dothebart @ Uncensored

you're posting in the programming room, not the scripting room ;-P



and the last time I did php, it hat $ in them.



[#] Tue Jun 12 2012 17:47:09 EDT from LoanShark @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]


Bwahaha... no sigils!

[#] Wed Jun 13 2012 17:04:04 EDT from IGnatius T Foobar @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]

you're posting in the programming room, not the scripting room ;-P

PHP compiles into bytecode at runtime so it's not a scripting language. That's why comments don't slow the system down like they do in BASIC. :)

[#] Thu Jun 14 2012 11:57:08 EDT from ax25 @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]

PHP?  Well, all bets are off then.

Tue Jun 12 2012 01:54:05 PM EDT from IGnatius T Foobar @ Uncensored
Damn buncha pedants. Yes I'm talking about a variable within a single function that has a variable that toggles back and forth between 1 and 0.

And who said I'm working in C ? This is a PHP program.

 



[#] Tue Jul 24 2012 13:44:44 EDT from dothebart @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]

remember xamarian introducing the java to see-carpet transpiler that can convert the whole android userland?

now you can test whether they were doing it right.

http://codeporting.com/blog/csharp-to-java-conversion/archive/2012/07/19/blog-migrating-csharp-out-and-ref-keyword-to-java-using-codeporting-csharp2java.html



[#] Wed Jul 25 2012 11:14:05 EDT from IGnatius T Foobar @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]

Lovely. I'm sure Miguel de Idiot has a Vista Phone in his pocket and is heaping praise upon its innovative and wonderful experience.

[#] Wed Jul 25 2012 13:02:08 EDT from zooer @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]

If you were writing a program for a card game would you use a 13x4 array (thirteen cards x four suits) or just 52 variables? There is no
difference between the suits as far as value.

I have no idea why I think this question has been asked before, I am not writing a game I am just wondering what others would do.

[#] Thu Jul 26 2012 06:30:21 EDT from dothebart @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]

 

Wed Jul 25 2012 11:14:05 EDT from IGnatius T Foobar @ Uncensored
Lovely. I'm sure Miguel de Idiot has a Vista Phone in his pocket and is heaping praise upon its innovative and wonderful experience.

http://fossforce.com/2012/07/walled-garden-approach-work-microsoft/

I like his rant about them selling the Nokia Lumnia 900 (the top notch product) for 20$ which imho is next to we don't want to pay the costs for disposal of the unsold units.

Microsoft cutting the upgrade path to windows 8 was probably as good to windows 7 phones as the (to early) anouncement of the Apple Macintosh to the Apple Lisa.

btw, mdidiot is developing/trying to sell see-carpet for android and i-something, so you can easily port your app for the vista fon to them ;-)

I guess developing a toolkit to run objective c-code on android more easily sounds like a more clever business idea to me. Or... maybe transpile the java stuff to objective c.



[#] Thu Jul 26 2012 17:20:42 EDT from dothebart @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]

Ontario Mega Finance Group!

s.b. wasted 12 Mio. US-Dollar  into xamarian.



[#] Sat Jul 28 2012 13:01:27 EDT from dothebart @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]

hm, from the online samples, IGs gonna like using this in webcit:

 

https://github.com/emberjs/ember.js



[#] Sun Jul 29 2012 21:50:01 EDT from IGnatius T Foobar @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]

Not really interested in more bloat.

Go to page: First ... 89 90 91 92 [93] 94 95 96 97 ... Last