Hah, I just checked the help message of Julia once again and indeed the 
"-L" option seems to accomplish exactly what I want.
Sorry for the noise ;-)

Sebastian

On Saturday, 5 July 2014 21:36:41 UTC+1, Sebastian Nowozin wrote:
>
>
> Hi,
>
> I use a similar method; however, what would really help is an option to 
> "drop to the REPL" after code execution, in order to inspect the state of 
> variables.  Say, to call "julia --no-exit test1.jl" and after the last line 
> in test1.jl the REPL would activated.
>
> Similarly, in Matlab, I often write the initial prototype code by 
> inserting a large number of "keyboard" statements; when the keyboard 
> statement is reached MATLAB stops and goes to the REPL.  Then I inspect a 
> few variables and issue a "dbcont" statement to continue to the next 
> instance of the keyboard statement.  I know Julia has a debugger, and it 
> may support this use, but I have not tried whether this is possible to use 
> it for a similar workflow.  After such a prototype run I typically extract 
> the verified code into a test case without any keyboard statements.
>
> Best,
> Sebastian
>
> On Saturday, 5 July 2014 13:59:39 UTC+1, J Luis wrote:
>>
>> I use a trick that makes use of the fast Julia's start time. So I create 
>> a small "do_it.jl" file with only, let's say
>>
>> using MyModule
>> exec_this_fun()
>>
>> than on the shell (Windows cmd in my case), I just do
>>
>> julia do_it.jl
>>
>> This has the advantage of working when the "reload("MyModule") doesn't 
>> work, and I have found many cases where it doesn't (for instances when 
>> writing ccal wrappers to some C library)
>>
>> Sábado, 5 de Julho de 2014 11:42:26 UTC+1, Johan Sigfrids escreveu:
>>>
>>> There is a Autoreload.jl <https://github.com/malmaud/Autoreload.jl> 
>>> package modeled after IPython's autoreload extension.
>>>
>>> On Saturday, July 5, 2014 2:47:24 AM UTC+3, Andrei Zh wrote:
>>>>
>>>> I'm trying to find my way developing Julia code interactively. In other 
>>>> languages (e.g. Python, R, Octave, etc.) when working on some piece of 
>>>> code 
>>>> I open a file with it and a console. Each time I change something in the 
>>>> file, I send that part to console and thus get new state. When I change a 
>>>> lot of things, I just send the whole file, replacing all definitions. It's 
>>>> quite convenient, and I'm pretty sure many of you are familiar with this 
>>>> practise. 
>>>>
>>>> In Julia, however, I faced several challenges. 
>>>>
>>>> 1. When developing modules (and I really like modular systems) I have 
>>>> to either run "using MyMod" after each change, or use qualified names 
>>>> (e.g. 
>>>> "MyMod.somefunc()"), which is really annoying. In Python, for example, all 
>>>> definitions sent to console go right to a global namespace, which is 
>>>> pretty 
>>>> convenient within single module. And for several modules there's IPython's 
>>>> "%autoreload 2".
>>>>
>>>> 2. If I abandon modules, on other hand, I can't redefine constants. So 
>>>> if, for example, I define type Point in global namespace, then change it 
>>>> and want to load new definition, I just get "invalid redefinition of 
>>>> constant Point" error. 
>>>>
>>>> So I want to know how YOU cope with these issues. Are there any best 
>>>> practises for interactive development? Are there any workarounds for cases 
>>>> I mentioned?
>>>>
>>>> Thanks you,
>>>> Andrei
>>>>
>>>

Reply via email to