Friday, November 23, 2012

Sage 5.4.1 Released

Sage 5.4.1 was released on 15 November 2012. 

It is available in source and binary form from:
Sage (http://www.sagemath.org/) is developed by volunteers and combines over 90 open source packages. For instructions about installing Sage, see

The following page lists the platforms on which Sage should work:
If you have any questions and/or problems, please report them to any of these Google groups:
You can also drop by in #sagemath on freenode or post your questions at http://ask.sagemath.org/

The following 15 people contributed to this release. Of those, 2 made their first contribution to Sage:

  - Aly Deines
  - Benjamin Hutz [first contribution]
  - Burcin Erocal
  - David Loeffler
  - Dmitrii Pasechnik
  - Jeroen Demeyer
  - John Palmieri
  - Karl-Dieter Crisman
  - Kenneth Smith
  - Paul Zimmermann
  - Punarbasu Purkayastha
  - Sarah Chisholm
  - Sebastien Gouezel [first contribution]
  - Travis Scrimshaw
  - Volker Braun

* Release manager: Jeroen Demeyer.

* We closed 13 tickets in this release. For details, see

  http://boxen.math.washington.edu/home/release/sage-5.4.1/tickets.html

Closed tickets:

#13309: Build Sage on OS X Mountain Lion [Reviewed by Dmitrii Pasechnik]

Merged in sage-5.4.1.rc0:

#6367: Karl-Dieter Crisman, Kenneth Smith: polygon2d -- several issues: typo in docs, shouldn't have been renamed [Reviewed by Volker Braun]
#10803: Paul Zimmermann: critical bug in real_roots [Reviewed by Jeroen Demeyer]
#12753: Benjamin Hutz: is_PrimeField import error [Reviewed by David Loeffler]
#12859: Aly Deines: quaternion algebra 'ramified at one prime' [Reviewed by Sarah Chisholm]
#13382: Dmitrii Pasechnik: build docs for SymmetricGroupRepresentation(s) [Reviewed by Volker Braun, Travis Scrimshaw]
#13533: Jeroen Demeyer: Remove "optional - gcc" from doctests [Reviewed
by Karl-Dieter Crisman, John Palmieri]
#13541: John Palmieri: update scipy to 0.11.0 [Reviewed by Dmitrii Pasechnik]
#13598: John Palmieri: 'x' should be defined when using 'sage -c' [Reviewed by Punarbasu Purkayastha]
#13632: Sebastien Gouezel: Fix latex display of arguments of symbolic functions [Reviewed by Burcin Erocal] 

Merged in sage-5.4.1.rc1:

#13407: Jeroen Demeyer: Move sage-make_relative to sage-location [Reviewed by Dmitrii Pasechnik]
#13452: Jeroen Demeyer: Refactor sage-location [Reviewed by Dmitrii Pasechnik]
#13689: Jeroen Demeyer: Fix upgrading from relocated Sage with GCC [Reviewed by John Palmieri]

Thursday, November 15, 2012

Sage 5.4 released


I'm glad to blog (and "reshare) that Sage 5.4 is available now.

Some random picks from the release notes:

  • notebook internationalization
  • 4ti2 interface
  • MathJax  instead of jsMath
  • Bijection between Rigged Configurations and Crystal Paths
  • new features in group algebra category
  • non commutative symmetric functions
  • Update Cremona's table of elliptic curves to 270000
  • Plancherel measure of an individual partition

... and much more besides even more bugfixes :-)

http://sagemath.org/download.html

And I suggest you to follow Sage at Google+ to stay in the loop.

New Mirror: Universidade de São Paulo

Sage just got a second mirror in South America, at the Universidade de São Paulo: http://linorg.usp.br/sage. Now, there are two in Brazil and no one in another country, but still better than just one SPOF.

Monday, April 30, 2012

Sage goes GSoC

This year Sage is part of the GSoC program for the first year. This is an exciting new opportunity to get new contributors on board and to aim for new features. We got nearly 60 project proposals, of which about 8 or more were really excellent ones. We got 3 slots to fill and therefore it was a really hard decision which projects to pick.  We are curious how this will turn out during the summer.


The projects are:

The actual work starts on May 21st and all three students will give regular updates through their blogs or by posting to the mailing list to keep others in the loop what they are doing. All regular developers are invited to give them feedback and help them if they encounter any problems.

Friday, July 1, 2011

Sorting is Linear - also in Go!

Wrttien in Go

package main

/*
   Sorting a list of positive int64 values is linear, also in Go!
   Author: Harald Schilly 
   Based on some bash script I found somewhere on the internetz ...
*/

import "time"

func main() {
  var vals = []int64 { 55, 1, 9, 0, 31, 11, 90, 11 }

  var ret  = make(chan int64)
  var done = make(chan bool)

  // main loop, just a single for loop
  for _, v := range vals {
    go func(v int64) {
      // if it doesn't sort well, increase the 1e5
      time.Sleep(1e5 * v)
      ret <- v
    } (v)
  }

  // output iterates over all results in the ret channel
  go func() {
    for i := 0; i < len(vals); i++ {
      println(<-ret)
    }
    done <- true
  }()

  <-done
}

Friday, November 12, 2010

Java XML DOM Document creation

/**
 * Since if found some crap on the Internet, here a better example for creating an XML document in Java. 
 * 
 * Copyright: Harald Schilly
 * License: Apache 2.0
 */


package at.schilly.aldap2.ue12131415xml;


import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Map;


import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerException;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;


import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;


/** @author harald schilly */
public class MapToXml {
  
  final private SimpleDateFormat dateformat = new SimpleDateFormat("yyyy-MM-dd");
  
  /** this method takes a Map of Strings to Strings and builds an xml document.
   * 
   * @param xmlfn
   *          xml output filename
   * @param map
   *          just a plain Map
   * @throws ParserConfigurationException
   * @throws FileNotFoundException
   * @throws TransformerException */
  public void write(final File xmlfn, final Map map)
      throws ParserConfigurationException, FileNotFoundException,
      TransformerException {
    // Docbuilder to create the xmldoc
    DocumentBuilderFactory docbuilderfactory = DocumentBuilderFactory.newInstance();
    DocumentBuilder docbuilder = docbuilderfactory.newDocumentBuilder();
    Document xmldoc = docbuilder.newDocument();
    
    // That's the root element
    Element root = xmldoc.createElement("map");
    
    // last saved element
    Element lastsaved = xmldoc.createElement("lastSavedBy");
    lastsaved.setAttribute("name", "Harald Schilly");
    lastsaved.setAttribute("date",
        dateformat.format(Calendar.getInstance().getTime()));
    root.appendChild(lastsaved);
    
    // iterate over map and add the entry/value elements
    for (Map.Entry mapentry : map.entrySet()) {
      Element entry = xmldoc.createElement("entry");
      entry.setAttribute("key", mapentry.getKey());
      
      Element value = xmldoc.createElement("value");
      Node node = xmldoc.createTextNode(mapentry.getValue());
      
      value.appendChild(node);
      entry.appendChild(value);
      root.appendChild(entry);
    }
    xmldoc.appendChild(root);
    
    // get a transformer with the given .dtd
    TransformerFactory transormerfactory = TransformerFactory.newInstance();
    Transformer transformer = transormerfactory.newTransformer();
    transformer.setOutputProperty(OutputKeys.DOCTYPE_SYSTEM, "map.dtd");
    transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
    transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "no");
    transformer.setOutputProperty(OutputKeys.INDENT, "yes");
    
    // transform and write to a file
    // use a StringWriter() object to write to a string.
    FileOutputStream fos = new FileOutputStream(xmlfn);
    BufferedOutputStream bos = new BufferedOutputStream(fos);
    StreamResult result = new StreamResult(bos);
    DOMSource source = new DOMSource(xmldoc);
    transformer.transform(source, result);
  }
}

Saturday, March 6, 2010

Anchors in Sage Notebooks

If you have a lengthy Sage Notebook and you want to quickly jump to a certain header or paragraph as a reference, use HTML anchors. They work like follows:
  1. An <a name="anchorname"></a> tag must be inserted at the position you want to jump to.
  2. Reference it via <a href="#anchorname">some text</a>.
After that, you can jump to the marked position just by clicking on the some text link.

To insert rich text and HTML, use the rich text editor accessible via <shift>+<click on blue insert bar>. There is an "HTML" icon. Alternatively, you can use the html() function:
i.e. html('<a name="test"></a>') ...