Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Teaching ShedSkin at PyCon 2012
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Ian Ozsvald  
View profile  
 More options Feb 14 2012, 9:33 am
From: Ian Ozsvald <i...@ianozsvald.com>
Date: Tue, 14 Feb 2012 11:33:39 -0300
Local: Tues, Feb 14 2012 9:33 am
Subject: Re: Teaching ShedSkin at PyCon 2012
<slaps forehead>. Ok yes, I'll look at the src. I shouldn't have
forgotten that...
Cheers!
Ian.

On 14 February 2012 10:37, Brent Pedersen <bpede...@gmail.com> wrote:

> On Tue, Feb 14, 2012 at 6:18 AM, Ian Ozsvald <i...@ianozsvald.com> wrote:
>> Hmm, I'm not sure I see. Let's take an example:
>> def sq(a):
>>  return a*a
>> sq_int = sq(3)
>> sq_float = sq(4.5)

>> In the compiled result are you calling into the Python libs, using the
>> Python Int objects and the Python's Int multiplication? I had figured
>> you compiled all the way down to C's int types and operations, so I'd
>> figured you'd have specialised interfaces on each function for the
>> various combinations of input types.

>> Can you give me an outline of what's actually called in the above
>> example, either in Python or in pure C?

>> Ian.

> I'm sure you know this better than I, but you can look at the .cpp
> file created. In the case above, it creates the single function:

> double sq(double a) {
>    return (a*a);
> }

> and it defines the types double and ss_int for your 2 return values.

>> On 14 February 2012 06:16, Mark Dufour <mark.duf...@gmail.com> wrote:
>>> hi ian,

>>>> Am I right in saying that ShedSkin's job is to check all the possible
>>>> variants of input types to a function (e.g. it could take some int
>>>> args, or float args, or double float args) and then it produces
>>>> specialised versions of the function that match each possible input
>>>> argument combination?

>>> this is true for the type inference part, but not anymore for
>>> generated code. it used to be that shedskin would try to generate C++
>>> (class, function) templates for generic code. but because this
>>> complicated code generation quite a bit, was practically unused in
>>> shedskin/examples, and can often be easily worked around in any case,
>>> I decided to take it out in the end..

>>> fortunately the python builtins and support libs are often sufficient
>>> to build a generic datastructure/algorithm.

>>> thanks!
>>> mark.
>>> --
>>> http://www.youtube.com/watch?v=E6LsfnBmdnk

>>> --
>>> You received this message because you are subscribed to the Google Groups "shedskin-discuss" group.
>>> To post to this group, send email to shedskin-discuss@googlegroups.com.
>>> To unsubscribe from this group, send email to shedskin-discuss+unsubscribe@googlegroups.com.
>>> For more options, visit this group at http://groups.google.com/group/shedskin-discuss?hl=en.

>> --
>> Ian Ozsvald (A.I. researcher)
>> i...@IanOzsvald.com

>> http://IanOzsvald.com
>> http://MorConsulting.com/
>> http://StrongSteam.com/
>> http://SocialTiesApp.com/
>> http://TheScreencastingHandbook.com
>> http://FivePoundApp.com/
>> http://twitter.com/IanOzsvald

>> --
>> You received this message because you are subscribed to the Google Groups "shedskin-discuss" group.
>> To post to this group, send email to shedskin-discuss@googlegroups.com.
>> To unsubscribe from this group, send email to shedskin-discuss+unsubscribe@googlegroups.com.
>> For more options, visit this group at http://groups.google.com/group/shedskin-discuss?hl=en.

> --
> You received this message because you are subscribed to the Google Groups "shedskin-discuss" group.
> To post to this group, send email to shedskin-discuss@googlegroups.com.
> To unsubscribe from this group, send email to shedskin-discuss+unsubscribe@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/shedskin-discuss?hl=en.

--
Ian Ozsvald (A.I. researcher)
i...@IanOzsvald.com

http://IanOzsvald.com
http://MorConsulting.com/
http://StrongSteam.com/
http://SocialTiesApp.com/
http://TheScreencastingHandbook.com
http://FivePoundApp.com/
http://twitter.com/IanOzsvald


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.