Opened 15 years ago

Last modified 6 weeks ago

#3365 needs_work enhancement

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

Reported by: was Owned by: cwitty
Priority: major Milestone:
Component: misc Keywords: editor_wstein
Cc: Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

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 (3)

sage-3365.patch (2.7 KB) - added by was 15 years ago.
py_inline-0.03.tar.bz2 (10.4 KB) - added by was 15 years ago.
this satandard python package must be installed with ' sage -python setup.py install'
fixedtheproblem.zip (10.5 KB) - added by was 15 years ago.
this zip file contains both the patch and the new to-be-made spkg; it replaces the previous attached patches

Download all attachments as: .zip

Change History (13)

Changed 15 years ago by was

Attachment: sage-3365.patch added

Changed 15 years ago by was

Attachment: py_inline-0.03.tar.bz2 added

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

comment:1 Changed 15 years ago by was

Description: modified (diff)

comment:2 Changed 15 years ago by TimothyClemans

Summary: [with patch; needs review] add a %c mode to the notebook (like %fortran)[with patch; positive review] add a %c mode to the notebook (like %fortran)
Type: defectenhancement

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

comment:3 Changed 15 years ago 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

Changed 15 years ago 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

comment:4 Changed 15 years ago by was

Description: modified (diff)
Summary: [with patch; positive review] add a %c mode to the notebook (like %fortran)[with patch; not ready for review] add a %c mode to the notebook (like %fortran)

comment:5 Changed 15 years ago by craigcitro

Keywords: editor_wstein added
Summary: [with patch; not ready for review] add a %c mode to the notebook (like %fortran)[with patch; under review by tclemans before 6/27] add a %c mode to the notebook (like %fortran)

comment:6 Changed 9 years ago by jdemeyer

Milestone: sage-5.11sage-5.12

comment:7 Changed 9 years ago by vbraun_spam

Milestone: sage-6.1sage-6.2

comment:8 Changed 9 years ago by vbraun_spam

Milestone: sage-6.2sage-6.3

comment:9 Changed 8 years ago by vbraun_spam

Milestone: sage-6.3sage-6.4

comment:10 Changed 6 weeks ago by mkoeppe

Milestone: sage-6.4
Report Upstream: N/A
Note: See TracTickets for help on using tickets.