Page 1 of 1

SoCal Code Camp

PostPosted: Sat Jan 17, 2009 4:54 pm
by Charles
I'll be at SoCal Code Camp in Fullerton CA on Jan 24 & 25, attending sessions and presenting Cobra.

See: http://www.socalcodecamp.com/

On Facebook: http://www.facebook.com/event.php?eid=5 ... 872&ref=ts

If you're going to be there, let me know.

-Chuck

Re: SoCal Code Camp

PostPosted: Mon Jan 26, 2009 1:47 am
by jonathandavid
So, Chuck, how dit it go?

Re: SoCal Code Camp

PostPosted: Mon Jan 26, 2009 2:08 am
by Charles
It went well. Contracts were the feature that most interested people.

I'll post the slides some time this week.

Re: SoCal Code Camp

PostPosted: Mon Feb 02, 2009 4:36 pm
by relez
Contracts....Few Years ago i spoke about contracts and someone from a "very large" company said that TDD is the future, no reason to develop contracts in languags.... today contracts are really appreciate and C# 4.0, for example, will include something like that. Good shot, Chuck,

Re: SoCal Code Camp

PostPosted: Mon Feb 02, 2009 8:04 pm
by Charles
Thanks. I really like having both available. And one of the nice things about contracts is that they execute every time a method is invoked. So those conditions are getting tested throughout the lifetime of your program every time that method is used.

Sometimes I find it hard to describe the behavior of a method with contracts, in which case it becomes really handy to be able to write "test" and just code up some examples.

Re: SoCal Code Camp

PostPosted: Tue Feb 03, 2009 8:56 pm
by Charles
Here are the slides: Cobra-SoCal-Code-Camp-2009-01-Slides.pdf

In general, the docs page at http://cobra-language.com/docs/ has a link to the latest slides.

Re: SoCal Code Camp

PostPosted: Wed Feb 04, 2009 5:45 am
by jonathandavid
Chuck wrote:Here are the slides: Cobra-SoCal-Code-Camp-2009-01-Slides.pdf


Thanks. About the "implementing units" part, one alluring possibility is that Cobra takes the C++ route:

http://stackoverflow.com/questions/2378 ... more-bloat

Consider:

extend double          
cue suffix "cm" (value_in_cm as double) as double is shared # Note that this would require shared
# extension methods, which are not in C#
return value_in_cm * 0.01

extend int
cue suffix "b" (str as String) as int is shared # Raw version, gives us access to the string
# that originated the literal
return CobraCore.convertBinToInt(str)

class Rational
# ... rest of implementation ...

cue suffix "r" (num as double) as Rational is shared
return Rational(num, 1)

class Foo
def main is shared
x = 3cm # equivalent to double.suffix "cm" (3)
print x # 0.03

i = 1000100001101b # eq. to i = int.suffix "b"("1000100001101")
print i # whatever that sequence of bits means in base-10

a = 1 / 3r # eq. to a = 1 / Rational.suffix "r" (3)
print a # Rational [1 / 3]



The "b" suffix could be part of the standard library, as well as other obvious choices such as the "i" suffix for imaginary literals.

Re: SoCal Code Camp

PostPosted: Wed Feb 04, 2009 6:48 am
by Charles
Interesting stuff here. Although I'm interested in units of measurement, I won't take a real look at them until after Cobra 0.9. However, I've started ticket:144 where we can collect information and ideas in the mean time. Added a link back to this discussion, for example.

Cobra 0.9 is described at http://cobra-language.com/trac/cobra/roadmap where you can also click on "active tickets" to see what's left.

Re: SoCal Code Camp

PostPosted: Wed Feb 04, 2009 10:15 am
by jonathandavid
Chuck wrote:Interesting stuff here. Although I'm interested in units of measurement, I won't take a real look at them until after Cobra 0.9. However, I've started ticket:144 where we can collect information and ideas in the mean time. Added a link back to this discussion, for example..


I agree that this is low priority. After all, it's taken +25 years for this feature to make its way into C++!