My Math Forum  

Go Back   My Math Forum > Math Forums > Math Software

Math Software Math Software - Mathematica, Matlab, Calculators, Graphing Software


Reply
 
LinkBack Thread Tools Display Modes
July 13th, 2015, 09:08 AM   #1
Senior Member
 
Joined: Dec 2007

Posts: 687
Thanks: 47

Sublime Text + PARI [with ore not GP]

So my question is for dummies, but anyway. I recently got Sublime Text (like a TextMate for MAC, etc), so I'm writing Latex there and it is very handy for that, it also accepts some standard stuff like python, Haskell, C++, etc, as Build systems. It has many resources to help you putting double parenthesis, commenting excerpts, alignment, we can put spinets there, and so on.

Thing is, I'm completely noob in this stuff, I cannot understand how most of the command lines work, but I guessed that I could use it to write PARI commands and build them, so my questions are:

1) I assume it possible to use any external text editor to make PARI read, but how to integrate these both?

2) when integrating the sublime text sort of editor with PARI, am I excluding the GP shell?

3) if yes, how would be my output?

4) if no, I assume the output would be that DOS-like windows, or not?

thanks in advance.
al-mahed is offline  
 
July 13th, 2015, 11:24 AM   #2
Global Moderator
 
CRGreathouse's Avatar
 
Joined: Nov 2006
From: UTC -5

Posts: 16,046
Thanks: 938

Math Focus: Number theory, computational mathematics, combinatorics, FOM, symbolic logic, TCS, algorithms
The usual way of working with PARI/GP (and most other programming languages) is to edit files in your text editor and then either compile them or load them into the REPL. (The latter is far more common for gp.) You might, for example, create a file called "basic.gp" and put some basic functions into it, then type "\r basic" in gp to load them into your session.

You could additionally load syntax highlighting files into your text editor so that the files look pretty and maybe you get extra functionality like brace matching.

Then there's a second approach which is quite rare. You could use your editor itself as a REPL, as a replacement for gp. This has been done for emacs but I haven't seen it done for other editors. Probably this would take a tremendous amount of effort.
CRGreathouse is offline  
July 13th, 2015, 01:23 PM   #3
Senior Member
 
Joined: Dec 2007

Posts: 687
Thanks: 47

Quote:
Originally Posted by CRGreathouse View Post
The usual way of working with PARI/GP (and most other programming languages) is to edit files in your text editor and then either compile them or load them into the REPL. (The latter is far more common for gp.) You might, for example, create a file called "basic.gp" and put some basic functions into it, then type "\r basic" in gp to load them into your session.

You could additionally load syntax highlighting files into your text editor so that the files look pretty and maybe you get extra functionality like brace matching.
Thanks. So you think that the best straightforward alternative is to edit in Sublime text, save as .gp and then call in PARI-GP? Or instead of saving, load them into the REPL=Read–eval–print loop.

In that case, how do I do that?

Last edited by skipjack; July 13th, 2015 at 06:17 PM.
al-mahed is offline  
July 13th, 2015, 01:59 PM   #4
Global Moderator
 
CRGreathouse's Avatar
 
Joined: Nov 2006
From: UTC -5

Posts: 16,046
Thanks: 938

Math Focus: Number theory, computational mathematics, combinatorics, FOM, symbolic logic, TCS, algorithms
Quote:
Originally Posted by al-mahed View Post
Thanks. So you think that the best straightforward alternative is to edit in Sublime text, save as .gp and then call in PARI-GP?
Definitely.

Quote:
Originally Posted by al-mahed View Post
Or instead of saving, load them into the REPL=Read–eval–print loop.

In that case, how do I do that?
I wouldn't recommend this, but you could paste them in directly into gp.

Last edited by skipjack; July 13th, 2015 at 06:16 PM.
CRGreathouse is offline  
July 13th, 2015, 02:06 PM   #5
Senior Member
 
Joined: Dec 2007

Posts: 687
Thanks: 47

So that's what I thought, then that I could call PARI-GP directly from sublime text instead of saving and going to the other screen. The UNIX-like interface is far too limited, also to see the output if it is too big.

Is there any better interface?

Last edited by skipjack; July 13th, 2015 at 06:16 PM.
al-mahed is offline  
July 13th, 2015, 02:36 PM   #6
Global Moderator
 
CRGreathouse's Avatar
 
Joined: Nov 2006
From: UTC -5

Posts: 16,046
Thanks: 938

Math Focus: Number theory, computational mathematics, combinatorics, FOM, symbolic logic, TCS, algorithms
Quote:
Originally Posted by al-mahed View Post
So that's what I thought, then that I could call PARI-GP directly from sublime text instead of saving and going to the other screen.
I think this is the right way because you should save your work in any case, so that step is needed. You can have gp load your file(s) automatically when it starts, and reload the last file with the shortcut \r, so it's not very time consuming at all.

Quote:
Originally Posted by al-mahed View Post
The UNIX-like interface is far too limited, also to see the output if it is too big.
In what ways do you find it limited? That might help me give recommendations.

Quote:
Originally Posted by al-mahed View Post
Is there any better interface?
The only interfaces I know of beside gp are PariEmacs, Pari-tty, pariGUIde, and vim-notebook. I don't know which of these have been updated recently.

Last edited by skipjack; July 13th, 2015 at 06:15 PM.
CRGreathouse is offline  
July 13th, 2015, 02:45 PM   #7
Senior Member
 
Joined: Dec 2007

Posts: 687
Thanks: 47

Pari-EMACS is going to be updated at September 26th 2015, just check their last update :

PARIEMACS: GP-SCRIPT-MODE / GP-MODE

Last edited by skipjack; July 13th, 2015 at 06:15 PM.
al-mahed is offline  
Reply

  My Math Forum > Math Forums > Math Software

Tags
ore, pari, pari-gp, programming, sublime, sublimetext, text



Search tags for this page
Click on a term to search for related topics.
Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
PARI-GP al-mahed Math Software 45 May 19th, 2015 02:30 PM
Need Help with Pari GP vittoire Math Software 3 February 16th, 2014 09:42 AM
PARI mathbalarka Math Software 1 August 17th, 2012 10:50 AM
Pari Hoempa Computer Science 31 March 11th, 2011 07:24 PM
help on pari/gp duz Number Theory 2 March 20th, 2009 05:50 PM





Copyright © 2019 My Math Forum. All rights reserved.