Ticket #3365 (new enhancement)

Opened 7 months ago

Last modified 7 months ago

[with patch; under review by tclemans before 6/27] add a %c mode to the notebook (like %fortran)

Reported by: was Assigned to: cwitty
Priority: major Milestone: sage-3.4
Component: misc Keywords: editor_wstein
Cc:

Description (Last modified by was)

Michael Schmitz -- a student in Math 480 -- created this code. It makes it so you can do %c in a notebook cell and write pure C functions. Very fun. E.g.,

%c
int foo(int a, int b) { return(a*b);}
foo(2r,3r)
///
6

TO INSTALL:

  1. apply the patch
  2. install py_inline:
    tar jxvf py_inline-0.03.tar.bz2
    cd py_inline-0.03
    sage -python setup.py install
    

NOTE: py_inline will be a new spkg. This needs to get into sage before this ticket can be closed.

Attachments

sage-3365.patch (2.7 kB) - added by was on 06/04/2008 11:42:38 AM.
py_inline-0.03.tar.bz2 (10.4 kB) - added by was on 06/04/2008 11:44:06 AM.
this satandard python package must be installed with ' sage -python setup.py install'
fixedtheproblem.zip (10.5 kB) - added by was on 06/09/2008 01:56:30 PM.
this zip file contains both the patch and the new to-be-made spkg; it replaces the previous attached patches

Change History

06/04/2008 11:42:38 AM changed by was

  • attachment sage-3365.patch added.

06/04/2008 11:44:06 AM changed by was

  • attachment py_inline-0.03.tar.bz2 added.

this satandard python package must be installed with ' sage -python setup.py install'

06/04/2008 11:45:22 AM changed by was

  • description changed.

06/08/2008 08:48:16 PM changed by TimothyClemans

  • type changed from defect to enhancement.
  • summary changed from [with patch; needs review] add a %c mode to the notebook (like %fortran) to [with patch; positive review] add a %c mode to the notebook (like %fortran).

This works on sage.math and doctests for c.py pass.

06/08/2008 11:13:34 PM changed by mabshoff

Do we really want to merge this as is since we are adding a new python package? Creating a new spkg for 10kb Python code also seems like a waste

Thoughts?

Cheers,

Michael

06/09/2008 01:56:30 PM changed by was

  • attachment fixedtheproblem.zip added.

this zip file contains both the patch and the new to-be-made spkg; it replaces the previous attached patches

06/09/2008 01:57:08 PM changed by was

  • description changed.
  • summary changed from [with patch; positive review] add a %c mode to the notebook (like %fortran) to [with patch; not ready for review] add a %c mode to the notebook (like %fortran).

06/19/2008 10:01:56 PM changed by craigcitro

  • keywords set to editor_wstein.
  • summary changed from [with patch; not ready for review] add a %c mode to the notebook (like %fortran) to [with patch; under review by tclemans before 6/27] add a %c mode to the notebook (like %fortran).