switch to room list switch to menu My folders
Go to page: First ... 55 56 57 58 [59] 60 61 62 63 ... Last
[#] Tue May 11 2010 07:35:54 EDT from dothebart @ Uncensored

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

I do know some guys using webcit to give them mails preparsed for their rails app, but they don't hang out around here...

[#] Tue May 11 2010 08:54:41 EDT from dothebart @ Uncensored

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

[#] Tue May 11 2010 10:03:17 EDT from IGnatius T Foobar @ Uncensored

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

Heh. I love the esoteric nature of that gag.

[#] Tue May 11 2010 11:50:35 EDT from Spell Binder @ Uncensored

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

Re: Maybe/Option and continuation passing style.

CPS is something that I have to question the usefulness of. I can definitely see the advantages of it, especially for building your own control structures in an imperative language. However, from what I've read, it requires rewriting the order of expressions and requiring a new parameter, the continuation itself, to be passed everywhere. I haven't explored it much further, so maybe there are better ways to do CPS, but on the surface, it seems like it would severely reduce the readability and maintainability of code. Not the mention the "const virus" factor of having to add a new parameter to all your functions.
Continuation Binder

[#] Tue May 11 2010 12:03:44 EDT from LoanShark @ Uncensored

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

Heh heh heh, Haskell Binder is making note of the "const virus". ;)

I agree CPS is probably pretty perverse, except for the minority of cases (such as?) where you REALLY need it. (Compilers?)

[#] Tue May 11 2010 14:47:34 EDT from Ford II @ Uncensored

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

Ford: OK, let's suppose for the sake of argument that LINQ is totally

the wrong way to go. But one still wants to build a web service that

I'm not saying it's the wrong way to go, but my first impression when I started reading was that it sounded very 11 1/2th generation language.
when you explain it that way it doesn't seem so bad.
Actually I always wondered why the sql parsing engine was on the server and not the client. I realize you want the server to weed out as much data as possible so you return as little as possible over tghe network, but I think having all the smarts on the client probbaly buys you something.

[#] Tue May 11 2010 17:39:16 EDT from LoanShark @ Uncensored

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

OData is interesting, but there are no FOSS serverside implementations.

I might just have to fix that.

[#] Thu May 13 2010 10:19:49 EDT from Ford II @ Uncensored

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

"I have to give this software back, its source code is infested with the const virus."

[#] Thu May 13 2010 11:17:16 EDT from fleeb @ Uncensored

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

I kinda like const.

[#] Thu May 13 2010 14:17:53 EDT from Ford II @ Uncensored

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

I kinda like const.

that makes you a virus host or a parasite or soemthing.

[#] Thu May 13 2010 14:20:42 EDT from Ford II @ Uncensored

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

(two minutes and thirty three seconds later...)

[#] Thu May 13 2010 15:00:39 EDT from fleeb @ Uncensored

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

Hmm... maybe a host in this case. Spreading const everwhere and all that.

[#] Thu May 13 2010 23:35:31 EDT from Helmey @ Uncensored

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

No we all know const. is short for constellation. This is exciting! instad of this virus doing something bad it gives you constellations! I want mine to be named dark helmet.

[#] Fri May 14 2010 11:50:29 EDT from Peter Pulse @ Uncensored

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

It's not that const isn't valuable, it's just that those who learned without it learned to watch out for the mistakes that const protects you from making.
Sometimes we made those mistakes anyway.. and then depending on what we wrote over, we might get a segfault right away.. so we would know we fucked up.
Or maybe we would truly fuck something up and end up with a difficult or insidious bug. It could happen. But it didn't happen that often. So yea, const.. it's cool, but it's also a pain in the ass. Like most programmers, I don't really want to spend a lot of time fighting with data types just to protect myself from a mistake that I'm probably not going to make. But I know that if I learned with const, I would probably keep using it.

[#] Fri May 14 2010 12:34:01 EDT from LoanShark @ Uncensored

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

I'm a little unusual in that I prefer strongly typed languages; must be my perfectionism streak (but when you look at things like PHP's problems with == vs === it starts to make sense.)

Const is a different animal and I tend to sprinkle "final" liberally throughout my Java code, mostly because I half wish I was programming in a functional language instead. But final in Java is nowhere near as useful as const in C++. You can't declare a method const as in C++, which declares that the method doesn't mutate its class.

The major problem with const in C is that in some environments you can't use it because you're using libraries that don't declare it where they need to.

[#] Fri May 14 2010 12:44:37 EDT from LoanShark @ Uncensored

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

programmers, I don't really want to spend a lot of time fighting with

data types just to protect myself from a mistake that I'm probably not

Scala's type system is rather nice - type inference is everywhere, so you don't need to declare as many types, you can let the compiler figure it out for you... and there are user-defined implicit conversions that kick in any time type coersion or method resolution fails. So you get some of that Objective-C/Smalltalk-like "class responds to X" coding style without the runtime overhead.

There is also a form of duck typing available when you need it, which does have the runtime overheard.

They call this structural typing: you can declare a type as "some object which supplies fields X Y and Z..."

[#] Fri May 14 2010 12:48:08 EDT from LoanShark @ Uncensored

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

C# has the same thing, but it's not as pervasive and is somewhat of a bag on the side.

[#] Sun May 16 2010 14:59:25 EDT from dothebart @ Uncensored

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

me realy likes strongly typed languages. Having coded php for several years, starting to code c again was like getting rid of chewingum clogging up my brain.

I realy like const. Though it has some limitations with pure c: a function like strchr can't be there once with const, once without; its one of the fixes doable with it...

yea, one of the shortcommings of c.


[#] Mon May 17 2010 13:57:32 EDT from Spell Binder @ Uncensored

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

One of the things about const that trips me up is how it acts in regards to pointers.

For example--and I'm a little fuzzy on this, so I may have things backwards--this declaration:

const char *foo;

Declares foo as a pointer to a character that is read-only.


char *foo = "Hello world!\n";
char const *bar = foo;

Declares foo as a pointer to a character that can be read or written, but the pointer itself is read-only.

And then:

char *foo = "Hello world!\n";
const char const *bar = foo;

Declares foo as a read-only pointer to a read-only character.

It just seems a little wonky to me.
const char *Spell = Binder;

[#] Mon May 17 2010 14:17:44 EDT from Peter Pulse @ Uncensored

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

Since I avoid const, I'm certainly no expert. But.. I kinda see some logic here.. a "char *" is a pointer (*) to a char (char). * is the type of the immediate storage, char is the type of data it points to. Now ok, I know what you are gonna say.. you can't count on a pointer to one type being able to point to another type.. that is an implementation detail we are not supposed to know about. So, there is no such thing as a "*".. "char *" is atomic.
I will grant you that. Though the addition of void * to C muddled that rule.
But semantically, for the purposes of the const declaration, it kinda makes sense.

Go to page: First ... 55 56 57 58 [59] 60 61 62 63 ... Last