Forums

SoCal Code Camp

General discussion about Cobra. Releases and general news will also be posted here.
Feel free to ask questions or just say "Hello".

SoCal Code Camp

Postby Charles » Sat Jan 17, 2009 4:54 pm

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
Charles
 
Posts: 2515
Location: Los Angeles, CA

Re: SoCal Code Camp

Postby jonathandavid » Mon Jan 26, 2009 1:47 am

So, Chuck, how dit it go?
jonathandavid
 
Posts: 159

Re: SoCal Code Camp

Postby Charles » Mon Jan 26, 2009 2:08 am

It went well. Contracts were the feature that most interested people.

I'll post the slides some time this week.
Charles
 
Posts: 2515
Location: Los Angeles, CA

Re: SoCal Code Camp

Postby relez » Mon Feb 02, 2009 4:36 pm

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,
relez
 
Posts: 69

Re: SoCal Code Camp

Postby Charles » Mon Feb 02, 2009 8:04 pm

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.
Charles
 
Posts: 2515
Location: Los Angeles, CA

Re: SoCal Code Camp

Postby Charles » Tue Feb 03, 2009 8:56 pm

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.
Charles
 
Posts: 2515
Location: Los Angeles, CA

Re: SoCal Code Camp

Postby jonathandavid » Wed Feb 04, 2009 5:45 am

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.
jonathandavid
 
Posts: 159

Re: SoCal Code Camp

Postby Charles » Wed Feb 04, 2009 6:48 am

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.
Charles
 
Posts: 2515
Location: Los Angeles, CA

Re: SoCal Code Camp

Postby jonathandavid » Wed Feb 04, 2009 10:15 am

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++!
jonathandavid
 
Posts: 159


Return to Discussion

Who is online

Users browsing this forum: No registered users and 35 guests