help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Speed up startup of octave


From: Francesco Potortì
Subject: Re: Speed up startup of octave
Date: Sat, 24 Aug 2013 16:24:55 +0200

>>> As a nonideal solution, I can keep a command line window open with
>>> an interactive octave session constantly running, then use it to
>>> repeatedly source a script for which I have a separate edit session
>>> constantly open.
>> 
>> Why you call your solution "nonideal"?  I think it is by far the
>> most straightforward and commonly used one.  I definitely recommend
>> it, unless you go for more complex setups (I use Emacs, where I edit
>> the file in a buffer, and un Octave in a different one).
>
>Yes, that's the way I've done it for decades, using octave and other 
>environments.  However, it's a much quicker grab data from another app, use 
>it to form expressions in vim, send the on-the-fly expression to octave via 
>a shell out, and have the results plunked automagically show up in the vim 
>session for me to properly format/mutilate in preparation to transplant to 
>yet other apps.  I want it to be a tight iteration without mousing around 
>to cut and paste.

For these tasks, I use Emacs and macros.  Crating a macro requires
moderate knowledge of the Emacs environment, they are easy to set up and
to modify, there is also a macro editor available.  For example, what I
am doing right now is:

- I edit a program for Arduino in an Emacs buffer
- I compile and load it to Arduino using a Makefile called via the Emacs
  compilation environment
- If the compilation and loading is successful, the makefile opens a
  terminal in a separate window that communicates with the Arduino
- I give commands to arduino via the terminal, which spits data dumps,
  already formatted to be read by Octave
- The terminal, thanks to 'screen', creates a log file
- I switch to the Emacs window and fire a macro, which opens the log
  file, copies the last dump to a separate file called dump.m, goes to
  the Octave Emacs buffer and recovers the previous command, which calls
  dump.m and plots the data
- I check that everything is correct, press Enter and I get the plots

-- 
Francesco Potortì (ricercatore)        Voice:  +39.050.621.3058
ISTI - Area della ricerca CNR          Mobile: +39.348.8283.107
via G. Moruzzi 1, I-56124 Pisa         Skype:  wnlabisti
(entrance 20, 1st floor, room C71)     Web:    http://fly.isti.cnr.it


reply via email to

[Prev in Thread] Current Thread [Next in Thread]