[julia-users] PSA: new ~/.julia_history format

2014-06-07 Thread Stefan Karpinski
Some months ago we got a brand new REPL infrastructure. A couple of days
ago, we got a new ~/.julia_history file format, originally proposed here
. It looks like this:

# time: 2014-06-07 14:03:47 EDT
# mode: julia
1 + 2
# time: 2014-06-07 14:04:04 EDT
# mode: julia
for x in "Hello, world."
println(x)
end
# time: 2014-06-07 14:04:10 EDT
# mode: help
println
# time: 2014-06-07 14:04:15 EDT
# mode: shell
ls -l

Each entry is prefixed with a block of headers, including the time the
entry was saved and the input "mode" – i.e. "julia", "help" or "shell" (or
whatever other modes we may add in the future). After that comes the actual
multiline input, each line prefixed with a tab character. That's it.

[Why prefix each input line with a tab character, you ask? Because valid
inputs may begin with "#", so without the tabs you can't know when the
header is done and the inputs begins. With this scheme, every line of the
format either begins with a "#" or a tab. The history reader also ignores
blank lines before, during or after the metadata header and after the last
history entry, which makes the format a little less brittle.]

Benefits of this format:

   1. It supports arbitrary multiline inputs.
   2. It's easy to open in a text editor.
   3. It's easy to search with grep.
   4. You can cut-and-paste from history into the REPL easily and it
   preserves indentation.
   5. It keeps the time each entry was saved.
   6. It is easy to add additional metadata in the future.

I actually think this could be a pretty solid multiline history format for
other systems, but for now, I'm happy to have it for Julia.

What you need to do: you will see an error if you try to start the REPL
with a ~/.julia_history file in the old format. It will tell you to rename
or delete that file and start the REPL again. Do that.


Re: [julia-users] PSA: new ~/.julia_history format

2015-06-28 Thread Khoa Tran
Dear Leo,

I'm new to Julia. On MAC OSX, how do I actually delete the 
"~/.julia_history" file? How do I find it?

Best regards!
Khoa

On Sunday, June 8, 2014 at 12:28:36 AM UTC+2, K leo wrote:
>
> Lately, every time I start up julia I got the following error.  And 
> every time I have to delete ~/.julia_history.  Why? 
>
> -- 
> $ julia 
> _ 
> _   _ _(_)_ |  A fresh approach to technical computing 
>(_) | (_) (_)|  Documentation: http://docs.julialang.org 
> _ _   _| |_  __ _   |  Type "help()" to list help topics 
>| | | | | | |/ _` |  | 
>| | |_| | | | (_| |  |  Version 0.3.0-prerelease+3512 (2014-06-05 
> 19:22 UTC) 
>   _/ |\__'_|_|_|\__'_|  |  Commit e16ee44* (2 days old master) 
> |__/   |  x86_64-linux-gnu 
>
> ERROR: Invalid history format. If you have a ~/.julia_history file left 
> over from an older version of Julia, try renaming or deleting it. 
>
>   in hist_from_file at REPL.jl:277 
>   in setup_interface at REPL.jl:594 
>   in run_frontend at REPL.jl:718 
>   in run_repl at REPL.jl:162 
>   in _start at client.jl:396 
>


Re: [julia-users] PSA: new ~/.julia_history format

2015-06-28 Thread Ivar Nesje
Open "Terminal"

Type
rm ~/.julia_history

Re: [julia-users] PSA: new ~/.julia_history format

2014-06-07 Thread cnbiz850
Lately, every time I start up julia I got the following error.  And 
every time I have to delete ~/.julia_history.  Why?


--
$ julia
   _
   _   _ _(_)_ |  A fresh approach to technical computing
  (_) | (_) (_)|  Documentation: http://docs.julialang.org
   _ _   _| |_  __ _   |  Type "help()" to list help topics
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 0.3.0-prerelease+3512 (2014-06-05 
19:22 UTC)

 _/ |\__'_|_|_|\__'_|  |  Commit e16ee44* (2 days old master)
|__/   |  x86_64-linux-gnu

ERROR: Invalid history format. If you have a ~/.julia_history file left 
over from an older version of Julia, try renaming or deleting it.


 in hist_from_file at REPL.jl:277
 in setup_interface at REPL.jl:594
 in run_frontend at REPL.jl:718
 in run_repl at REPL.jl:162
 in _start at client.jl:396


Re: [julia-users] PSA: new ~/.julia_history format

2014-06-07 Thread Stefan Karpinski
That's definitely a problem. Could you file an issue? Ideally, including
example contents from a produced ~/.julia_history file.


On Sat, Jun 7, 2014 at 6:28 PM, cnbiz850  wrote:

> Lately, every time I start up julia I got the following error.  And every
> time I have to delete ~/.julia_history.  Why?
>
> --
> $ julia
>_
>_   _ _(_)_ |  A fresh approach to technical computing
>   (_) | (_) (_)|  Documentation: http://docs.julialang.org
>_ _   _| |_  __ _   |  Type "help()" to list help topics
>   | | | | | | |/ _` |  |
>   | | |_| | | | (_| |  |  Version 0.3.0-prerelease+3512 (2014-06-05 19:22
> UTC)
>  _/ |\__'_|_|_|\__'_|  |  Commit e16ee44* (2 days old master)
> |__/   |  x86_64-linux-gnu
>
> ERROR: Invalid history format. If you have a ~/.julia_history file left
> over from an older version of Julia, try renaming or deleting it.
>
>  in hist_from_file at REPL.jl:277
>  in setup_interface at REPL.jl:594
>  in run_frontend at REPL.jl:718
>  in run_repl at REPL.jl:162
>  in _start at client.jl:396
>


Re: [julia-users] PSA: new ~/.julia_history format

2014-06-07 Thread John Myles White
Maybe you need to delete .julia_history2 (assuming you have one)?

 — John

On Jun 7, 2014, at 3:28 PM, cnbiz850  wrote:

> Lately, every time I start up julia I got the following error.  And every 
> time I have to delete ~/.julia_history.  Why?
> 
> --
> $ julia
>   _
>   _   _ _(_)_ |  A fresh approach to technical computing
>  (_) | (_) (_)|  Documentation: http://docs.julialang.org
>   _ _   _| |_  __ _   |  Type "help()" to list help topics
>  | | | | | | |/ _` |  |
>  | | |_| | | | (_| |  |  Version 0.3.0-prerelease+3512 (2014-06-05 19:22 UTC)
> _/ |\__'_|_|_|\__'_|  |  Commit e16ee44* (2 days old master)
> |__/   |  x86_64-linux-gnu
> 
> ERROR: Invalid history format. If you have a ~/.julia_history file left over 
> from an older version of Julia, try renaming or deleting it.
> 
> in hist_from_file at REPL.jl:277
> in setup_interface at REPL.jl:594
> in run_frontend at REPL.jl:718
> in run_repl at REPL.jl:162
> in _start at client.jl:396



Re: [julia-users] PSA: new ~/.julia_history format

2014-06-07 Thread Stefan Karpinski
Julia should now completely ignore that file, so that's unlikely to be the
answer.


On Sat, Jun 7, 2014 at 6:31 PM, John Myles White 
wrote:

> Maybe you need to delete .julia_history2 (assuming you have one)?
>
>  — John
>
> On Jun 7, 2014, at 3:28 PM, cnbiz850  wrote:
>
> > Lately, every time I start up julia I got the following error.  And
> every time I have to delete ~/.julia_history.  Why?
> >
> > --
> > $ julia
> >   _
> >   _   _ _(_)_ |  A fresh approach to technical computing
> >  (_) | (_) (_)|  Documentation: http://docs.julialang.org
> >   _ _   _| |_  __ _   |  Type "help()" to list help topics
> >  | | | | | | |/ _` |  |
> >  | | |_| | | | (_| |  |  Version 0.3.0-prerelease+3512 (2014-06-05 19:22
> UTC)
> > _/ |\__'_|_|_|\__'_|  |  Commit e16ee44* (2 days old master)
> > |__/   |  x86_64-linux-gnu
> >
> > ERROR: Invalid history format. If you have a ~/.julia_history file left
> over from an older version of Julia, try renaming or deleting it.
> >
> > in hist_from_file at REPL.jl:277
> > in setup_interface at REPL.jl:594
> > in run_frontend at REPL.jl:718
> > in run_repl at REPL.jl:162
> > in _start at client.jl:396
>
>


Re: [julia-users] PSA: new ~/.julia_history format

2014-06-07 Thread cnbiz850
Perhaps it does not happen at every start.  More likely at the start of 
every new day.  I just deleted .julia_history2, restarted julia, and did 
not get that error. Will see tomorrow.



On 06/08/2014 06:30 AM, Stefan Karpinski wrote:
That's definitely a problem. Could you file an issue? Ideally, 
including example contents from a produced ~/.julia_history file.



On Sat, Jun 7, 2014 at 6:28 PM, cnbiz850 > wrote:


Lately, every time I start up julia I got the following error.
 And every time I have to delete ~/.julia_history.  Why?

--
$ julia
   _
   _   _ _(_)_ |  A fresh approach to technical computing
  (_) | (_) (_)|  Documentation: http://docs.julialang.org
   _ _   _| |_  __ _   |  Type "help()" to list help topics
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 0.3.0-prerelease+3512
(2014-06-05 19:22 UTC)
 _/ |\__'_|_|_|\__'_|  |  Commit e16ee44* (2 days old master)
|__/   |  x86_64-linux-gnu

ERROR: Invalid history format. If you have a ~/.julia_history file
left over from an older version of Julia, try renaming or deleting it.

 in hist_from_file at REPL.jl:277
 in setup_interface at REPL.jl:594
 in run_frontend at REPL.jl:718
 in run_repl at REPL.jl:162
 in _start at client.jl:396






Re: [julia-users] PSA: new ~/.julia_history format

2014-06-07 Thread Stefan Karpinski
Please do let me know of it continues to be broken for you.

> On Jun 7, 2014, at 6:41 PM, cnbiz850  wrote:
> 
> Perhaps it does not happen at every start.  More likely at the start of every 
> new day.  I just deleted .julia_history2, restarted julia, and did not get 
> that error. Will see tomorrow.
> 
> 
>> On 06/08/2014 06:30 AM, Stefan Karpinski wrote:
>> That's definitely a problem. Could you file an issue? Ideally, including 
>> example contents from a produced ~/.julia_history file.
>> 
>> 
>> On Sat, Jun 7, 2014 at 6:28 PM, cnbiz850 > > wrote:
>> 
>>Lately, every time I start up julia I got the following error.
>> And every time I have to delete ~/.julia_history.  Why?
>> 
>>--
>>$ julia
>>   _
>>   _   _ _(_)_ |  A fresh approach to technical computing
>>  (_) | (_) (_)|  Documentation: http://docs.julialang.org
>>   _ _   _| |_  __ _   |  Type "help()" to list help topics
>>  | | | | | | |/ _` |  |
>>  | | |_| | | | (_| |  |  Version 0.3.0-prerelease+3512
>>(2014-06-05 19:22 UTC)
>> _/ |\__'_|_|_|\__'_|  |  Commit e16ee44* (2 days old master)
>>|__/   |  x86_64-linux-gnu
>> 
>>ERROR: Invalid history format. If you have a ~/.julia_history file
>>left over from an older version of Julia, try renaming or deleting it.
>> 
>> in hist_from_file at REPL.jl:277
>> in setup_interface at REPL.jl:594
>> in run_frontend at REPL.jl:718
>> in run_repl at REPL.jl:162
>> in _start at client.jl:396
> 


Re: [julia-users] PSA: new ~/.julia_history format

2014-06-07 Thread Matt Bauman
Using both Julia 0.2 and 0.3 with the history file will cause corruption. I've 
been starting v0.2 with the --no-history option.

Maybe this file could go in there versioned .julia/vX.X folder? And 
.juliarc.jl, too?


Re: [julia-users] PSA: new ~/.julia_history format

2014-06-08 Thread cnbiz850
Since I deleted .julia_history2 yesterday, I don't have the history 
errors now.  Don't know if that was the culprit.


On 06/08/2014 08:02 AM, Stefan Karpinski wrote:

Please do let me know of it continues to be broken for you.


On Jun 7, 2014, at 6:41 PM, cnbiz850  wrote:

Perhaps it does not happen at every start.  More likely at the start of every 
new day.  I just deleted .julia_history2, restarted julia, and did not get that 
error. Will see tomorrow.



On 06/08/2014 06:30 AM, Stefan Karpinski wrote:
That's definitely a problem. Could you file an issue? Ideally, including 
example contents from a produced ~/.julia_history file.


On Sat, Jun 7, 2014 at 6:28 PM, cnbiz850 mailto:cnbiz...@gmail.com>> wrote:

Lately, every time I start up julia I got the following error.
 And every time I have to delete ~/.julia_history.  Why?

--
$ julia
   _
   _   _ _(_)_ |  A fresh approach to technical computing
  (_) | (_) (_)|  Documentation: http://docs.julialang.org
   _ _   _| |_  __ _   |  Type "help()" to list help topics
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 0.3.0-prerelease+3512
(2014-06-05 19:22 UTC)
 _/ |\__'_|_|_|\__'_|  |  Commit e16ee44* (2 days old master)
|__/   |  x86_64-linux-gnu

ERROR: Invalid history format. If you have a ~/.julia_history file
left over from an older version of Julia, try renaming or deleting it.

 in hist_from_file at REPL.jl:277
 in setup_interface at REPL.jl:594
 in run_frontend at REPL.jl:718
 in run_repl at REPL.jl:162
 in _start at client.jl:396




Re: [julia-users] PSA: new ~/.julia_history format

2014-06-08 Thread Stefan Karpinski
I don't think that could possibly be it, but I'm glad it's working for you now.

> On Jun 8, 2014, at 10:24 PM, cnbiz850  wrote:
> 
> Since I deleted .julia_history2 yesterday, I don't have the history errors 
> now.  Don't know if that was the culprit.
> 
>> On 06/08/2014 08:02 AM, Stefan Karpinski wrote:
>> Please do let me know of it continues to be broken for you.
>> 
>>> On Jun 7, 2014, at 6:41 PM, cnbiz850  wrote:
>>> 
>>> Perhaps it does not happen at every start.  More likely at the start of 
>>> every new day.  I just deleted .julia_history2, restarted julia, and did 
>>> not get that error. Will see tomorrow.
>>> 
>>> 
 On 06/08/2014 06:30 AM, Stefan Karpinski wrote:
 That's definitely a problem. Could you file an issue? Ideally, including 
 example contents from a produced ~/.julia_history file.
 
 
 On Sat, Jun 7, 2014 at 6:28 PM, cnbiz850 >>> > wrote:
 
Lately, every time I start up julia I got the following error.
 And every time I have to delete ~/.julia_history.  Why?
 
--
$ julia
   _
   _   _ _(_)_ |  A fresh approach to technical computing
  (_) | (_) (_)|  Documentation: http://docs.julialang.org
   _ _   _| |_  __ _   |  Type "help()" to list help topics
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 0.3.0-prerelease+3512
(2014-06-05 19:22 UTC)
 _/ |\__'_|_|_|\__'_|  |  Commit e16ee44* (2 days old master)
|__/   |  x86_64-linux-gnu
 
ERROR: Invalid history format. If you have a ~/.julia_history file
left over from an older version of Julia, try renaming or deleting it.
 
 in hist_from_file at REPL.jl:277
 in setup_interface at REPL.jl:594
 in run_frontend at REPL.jl:718
 in run_repl at REPL.jl:162
 in _start at client.jl:396
> 


Re: [julia-users] PSA: new ~/.julia_history format

2014-06-08 Thread Tobias Knopp
Is there a reason that the user has to manually delete an 
old .julia_history file? One could simply ignore and override it, no?

Am Montag, 9. Juni 2014 07:16:35 UTC+2 schrieb Stefan Karpinski:
>
> I don't think that could possibly be it, but I'm glad it's working for you 
> now. 
>
> > On Jun 8, 2014, at 10:24 PM, cnbiz850 > 
> wrote: 
> > 
> > Since I deleted .julia_history2 yesterday, I don't have the history 
> errors now.  Don't know if that was the culprit. 
> > 
> >> On 06/08/2014 08:02 AM, Stefan Karpinski wrote: 
> >> Please do let me know of it continues to be broken for you. 
> >> 
> >>> On Jun 7, 2014, at 6:41 PM, cnbiz850 > 
> wrote: 
> >>> 
> >>> Perhaps it does not happen at every start.  More likely at the start 
> of every new day.  I just deleted .julia_history2, restarted julia, and did 
> not get that error. Will see tomorrow. 
> >>> 
> >>> 
>  On 06/08/2014 06:30 AM, Stefan Karpinski wrote: 
>  That's definitely a problem. Could you file an issue? Ideally, 
> including example contents from a produced ~/.julia_history file. 
>  
>  
>  On Sat, Jun 7, 2014 at 6:28 PM, cnbiz850   > wrote: 
>  
> Lately, every time I start up julia I got the following error. 
>  And every time I have to delete ~/.julia_history.  Why? 
>  
> -- 
> $ julia 
>    _ 
>    _   _ _(_)_ |  A fresh approach to technical computing 
>   (_) | (_) (_)|  Documentation: http://docs.julialang.org 
>    _ _   _| |_  __ _   |  Type "help()" to list help topics 
>   | | | | | | |/ _` |  | 
>   | | |_| | | | (_| |  |  Version 0.3.0-prerelease+3512 
> (2014-06-05 19:22 UTC) 
>  _/ |\__'_|_|_|\__'_|  |  Commit e16ee44* (2 days old master) 
> |__/   |  x86_64-linux-gnu 
>  
> ERROR: Invalid history format. If you have a ~/.julia_history file 
> left over from an older version of Julia, try renaming or deleting 
> it. 
>  
>  in hist_from_file at REPL.jl:277 
>  in setup_interface at REPL.jl:594 
>  in run_frontend at REPL.jl:718 
>  in run_repl at REPL.jl:162 
>  in _start at client.jl:396 
> > 
>


Re: [julia-users] PSA: new ~/.julia_history format

2014-06-09 Thread Stefan Karpinski
"Automatic" and "delete" aren't things I like in the same sentence.


On Mon, Jun 9, 2014 at 2:34 AM, Tobias Knopp 
wrote:

> Is there a reason that the user has to manually delete an
> old .julia_history file? One could simply ignore and override it, no?
>
> Am Montag, 9. Juni 2014 07:16:35 UTC+2 schrieb Stefan Karpinski:
>>
>> I don't think that could possibly be it, but I'm glad it's working for
>> you now.
>>
>> > On Jun 8, 2014, at 10:24 PM, cnbiz850  wrote:
>> >
>> > Since I deleted .julia_history2 yesterday, I don't have the history
>> errors now.  Don't know if that was the culprit.
>> >
>> >> On 06/08/2014 08:02 AM, Stefan Karpinski wrote:
>> >> Please do let me know of it continues to be broken for you.
>> >>
>> >>> On Jun 7, 2014, at 6:41 PM, cnbiz850  wrote:
>> >>>
>> >>> Perhaps it does not happen at every start.  More likely at the start
>> of every new day.  I just deleted .julia_history2, restarted julia, and did
>> not get that error. Will see tomorrow.
>> >>>
>> >>>
>>  On 06/08/2014 06:30 AM, Stefan Karpinski wrote:
>>  That's definitely a problem. Could you file an issue? Ideally,
>> including example contents from a produced ~/.julia_history file.
>> 
>> 
>>  On Sat, Jun 7, 2014 at 6:28 PM, cnbiz850 > cnbi...@gmail.com>> wrote:
>> 
>> Lately, every time I start up julia I got the following error.
>>  And every time I have to delete ~/.julia_history.  Why?
>> 
>> --
>> $ julia
>>    _
>>    _   _ _(_)_ |  A fresh approach to technical computing
>>   (_) | (_) (_)|  Documentation:
>> http://docs.julialang.org
>>    _ _   _| |_  __ _   |  Type "help()" to list help topics
>>   | | | | | | |/ _` |  |
>>   | | |_| | | | (_| |  |  Version 0.3.0-prerelease+3512
>> (2014-06-05 19:22 UTC)
>>  _/ |\__'_|_|_|\__'_|  |  Commit e16ee44* (2 days old master)
>> |__/   |  x86_64-linux-gnu
>> 
>> ERROR: Invalid history format. If you have a ~/.julia_history
>> file
>> left over from an older version of Julia, try renaming or
>> deleting it.
>> 
>>  in hist_from_file at REPL.jl:277
>>  in setup_interface at REPL.jl:594
>>  in run_frontend at REPL.jl:718
>>  in run_repl at REPL.jl:162
>>  in _start at client.jl:396
>> >
>>
>


Re: [julia-users] PSA: new ~/.julia_history format

2014-06-09 Thread Milan Bouchet-Valat
Le lundi 09 juin 2014 à 09:43 -0400, Stefan Karpinski a écrit :
> "Automatic" and "delete" aren't things I like in the same sentence.
In general, sure, but we're talking about command history, not the
user's photo library... ;-)



Re: [julia-users] PSA: new ~/.julia_history format

2014-06-09 Thread Kevin Squire
Especially for those upgrading from v0.2, it might be nice to provide a
smooth transition.  And there is also the issue mentioned by Matt, where
some users may want to use both v0.2 and v0.3 on the same system.

I vote for moving the history to the version subdirectory (if it exists).

Cheers,
   Kevin


On Mon, Jun 9, 2014 at 7:16 AM, Milan Bouchet-Valat 
wrote:

> Le lundi 09 juin 2014 à 09:43 -0400, Stefan Karpinski a écrit :
> > "Automatic" and "delete" aren't things I like in the same sentence.
> In general, sure, but we're talking about command history, not the
> user's photo library... ;-)
>
>


Re: [julia-users] PSA: new ~/.julia_history format

2014-06-09 Thread Stefan Karpinski
On Mon, Jun 9, 2014 at 10:16 AM, Milan Bouchet-Valat 
wrote:

> Le lundi 09 juin 2014 à 09:43 -0400, Stefan Karpinski a écrit :
> > "Automatic" and "delete" aren't things I like in the same sentence.
> In general, sure, but we're talking about command history, not the
> user's photo library... ;-)
>

You never know. I've often relied on the history file to remember some
fairly complicated things that would be hard to reproduce purely from
memory.


Re: [julia-users] PSA: new ~/.julia_history format

2014-06-09 Thread Stefan Karpinski
Sigh. I guess I should really come to terms with the fact that I will have
to worry about versioning and compatibility from now on...


On Mon, Jun 9, 2014 at 10:20 AM, Kevin Squire 
wrote:

> Especially for those upgrading from v0.2, it might be nice to provide a
> smooth transition.  And there is also the issue mentioned by Matt, where
> some users may want to use both v0.2 and v0.3 on the same system.
>
> I vote for moving the history to the version subdirectory (if it exists).
>
> Cheers,
>Kevin
>
>
> On Mon, Jun 9, 2014 at 7:16 AM, Milan Bouchet-Valat 
> wrote:
>
>> Le lundi 09 juin 2014 à 09:43 -0400, Stefan Karpinski a écrit :
>> > "Automatic" and "delete" aren't things I like in the same sentence.
>> In general, sure, but we're talking about command history, not the
>> user's photo library... ;-)
>>
>>
>


Re: [julia-users] PSA: new ~/.julia_history format

2014-06-09 Thread Kevin Squire
Sorry...!


On Mon, Jun 9, 2014 at 7:28 AM, Stefan Karpinski 
wrote:

> Sigh. I guess I should really come to terms with the fact that I will have
> to worry about versioning and compatibility from now on...
>
>
> On Mon, Jun 9, 2014 at 10:20 AM, Kevin Squire 
> wrote:
>
>> Especially for those upgrading from v0.2, it might be nice to provide a
>> smooth transition.  And there is also the issue mentioned by Matt, where
>> some users may want to use both v0.2 and v0.3 on the same system.
>>
>> I vote for moving the history to the version subdirectory (if it exists).
>>
>> Cheers,
>>Kevin
>>
>>
>> On Mon, Jun 9, 2014 at 7:16 AM, Milan Bouchet-Valat 
>> wrote:
>>
>>> Le lundi 09 juin 2014 à 09:43 -0400, Stefan Karpinski a écrit :
>>> > "Automatic" and "delete" aren't things I like in the same sentence.
>>> In general, sure, but we're talking about command history, not the
>>> user's photo library... ;-)
>>>
>>>
>>
>


Re: [julia-users] PSA: new ~/.julia_history format

2014-06-09 Thread Tomas Lycken
I usually don't value backwards-compatibility very highly if it's not too 
much of a hassle to stay up-to-date (and it isn't with Julia), but I still 
think moving everything into a .julia/vX.Y folder is a terrific idea - 
there's really no other way to make *non*-backwards-compatible changes and 
still let several versions coexist on the same system. Break whatever you 
want when going from 0.2 to 0.3 (or 1.5 to 1.6, when we get there), but 
keep the installations separate - that way I can always go back to the old 
version if I liked it better (or if I just need to recover something and 
port it manually).

// T

On Monday, June 9, 2014 4:33:12 PM UTC+2, Kevin Squire wrote:
>
> Sorry...!
>
>
> On Mon, Jun 9, 2014 at 7:28 AM, Stefan Karpinski  > wrote:
>
>> Sigh. I guess I should really come to terms with the fact that I will 
>> have to worry about versioning and compatibility from now on...
>>
>>
>> On Mon, Jun 9, 2014 at 10:20 AM, Kevin Squire > > wrote:
>>
>>> Especially for those upgrading from v0.2, it might be nice to provide a 
>>> smooth transition.  And there is also the issue mentioned by Matt, where 
>>> some users may want to use both v0.2 and v0.3 on the same system.
>>>
>>> I vote for moving the history to the version subdirectory (if it exists).
>>>
>>> Cheers,
>>>Kevin
>>>
>>>
>>> On Mon, Jun 9, 2014 at 7:16 AM, Milan Bouchet-Valat >> > wrote:
>>>
 Le lundi 09 juin 2014 à 09:43 -0400, Stefan Karpinski a écrit :
 > "Automatic" and "delete" aren't things I like in the same sentence.
 In general, sure, but we're talking about command history, not the
 user's photo library... ;-)


>>>
>>
>

Re: [julia-users] PSA: new ~/.julia_history format

2014-06-09 Thread Stefan Karpinski
Here's the thing. There is no reason to change the history format ever
again, so I'm kind of disinclined from doing this. That leaves people using
both 0.2 and 0.3 in a slightly awkward situation, but I don't know if that
warrants moving the history file under ~/.julia/vX.Y/ – that's not really
what that directory is for: it's configuration, not mutable state.
Consider, for example, if you're keeping your packages checked into a git
super-repo and now Julia starts putting it's history in there. That's no
good. You might want to have the package directory be read-only or shared
between many different users. Saving history in there is a no-go. That
probably means that saving the ~/.julia/.github/token file in there is also
bad.


On Mon, Jun 9, 2014 at 2:49 PM, Tomas Lycken  wrote:

> I usually don't value backwards-compatibility very highly if it's not too
> much of a hassle to stay up-to-date (and it isn't with Julia), but I still
> think moving everything into a .julia/vX.Y folder is a terrific idea -
> there's really no other way to make *non*-backwards-compatible changes
> and still let several versions coexist on the same system. Break whatever
> you want when going from 0.2 to 0.3 (or 1.5 to 1.6, when we get there), but
> keep the installations separate - that way I can always go back to the old
> version if I liked it better (or if I just need to recover something and
> port it manually).
>
> // T
>
>
> On Monday, June 9, 2014 4:33:12 PM UTC+2, Kevin Squire wrote:
>
>> Sorry...!
>>
>>
>> On Mon, Jun 9, 2014 at 7:28 AM, Stefan Karpinski 
>> wrote:
>>
>>> Sigh. I guess I should really come to terms with the fact that I will
>>> have to worry about versioning and compatibility from now on...
>>>
>>>
>>> On Mon, Jun 9, 2014 at 10:20 AM, Kevin Squire 
>>> wrote:
>>>
 Especially for those upgrading from v0.2, it might be nice to provide a
 smooth transition.  And there is also the issue mentioned by Matt, where
 some users may want to use both v0.2 and v0.3 on the same system.

 I vote for moving the history to the version subdirectory (if it
 exists).

 Cheers,
Kevin


 On Mon, Jun 9, 2014 at 7:16 AM, Milan Bouchet-Valat 
 wrote:

> Le lundi 09 juin 2014 à 09:43 -0400, Stefan Karpinski a écrit :
> > "Automatic" and "delete" aren't things I like in the same sentence.
> In general, sure, but we're talking about command history, not the
> user's photo library... ;-)
>
>

>>>
>>


Re: [julia-users] PSA: new ~/.julia_history format

2014-06-10 Thread Tobias Knopp
I would not be so concerned about parallel 0.2 / 0.3 installations. But 
would it be an option to disable the history mechanism when an incompatible 
format has been detected (+ print out a big warning that one has to delete 
the file in order to get back the history)?

Am Dienstag, 10. Juni 2014 00:45:43 UTC+2 schrieb Stefan Karpinski:
>
> Here's the thing. There is no reason to change the history format ever 
> again, so I'm kind of disinclined from doing this. That leaves people using 
> both 0.2 and 0.3 in a slightly awkward situation, but I don't know if that 
> warrants moving the history file under ~/.julia/vX.Y/ – that's not really 
> what that directory is for: it's configuration, not mutable state. 
> Consider, for example, if you're keeping your packages checked into a git 
> super-repo and now Julia starts putting it's history in there. That's no 
> good. You might want to have the package directory be read-only or shared 
> between many different users. Saving history in there is a no-go. That 
> probably means that saving the ~/.julia/.github/token file in there is also 
> bad.
>
>
> On Mon, Jun 9, 2014 at 2:49 PM, Tomas Lycken  > wrote:
>
>> I usually don't value backwards-compatibility very highly if it's not too 
>> much of a hassle to stay up-to-date (and it isn't with Julia), but I still 
>> think moving everything into a .julia/vX.Y folder is a terrific idea - 
>> there's really no other way to make *non*-backwards-compatible changes 
>> and still let several versions coexist on the same system. Break whatever 
>> you want when going from 0.2 to 0.3 (or 1.5 to 1.6, when we get there), but 
>> keep the installations separate - that way I can always go back to the old 
>> version if I liked it better (or if I just need to recover something and 
>> port it manually).
>>
>> // T
>>
>>
>> On Monday, June 9, 2014 4:33:12 PM UTC+2, Kevin Squire wrote:
>>
>>> Sorry...!
>>>
>>>
>>> On Mon, Jun 9, 2014 at 7:28 AM, Stefan Karpinski  
>>> wrote:
>>>
 Sigh. I guess I should really come to terms with the fact that I will 
 have to worry about versioning and compatibility from now on...


 On Mon, Jun 9, 2014 at 10:20 AM, Kevin Squire  
 wrote:

> Especially for those upgrading from v0.2, it might be nice to provide 
> a smooth transition.  And there is also the issue mentioned by Matt, 
> where 
> some users may want to use both v0.2 and v0.3 on the same system.
>
> I vote for moving the history to the version subdirectory (if it 
> exists).
>
> Cheers,
>Kevin
>
>
> On Mon, Jun 9, 2014 at 7:16 AM, Milan Bouchet-Valat  
> wrote:
>
>> Le lundi 09 juin 2014 à 09:43 -0400, Stefan Karpinski a écrit :
>> > "Automatic" and "delete" aren't things I like in the same sentence.
>> In general, sure, but we're talking about command history, not the
>> user's photo library... ;-)
>>
>>
>

>>>
>

Re: [julia-users] PSA: new ~/.julia_history format

2014-06-10 Thread Stefan Karpinski
Yes, that's a good idea.


On Tue, Jun 10, 2014 at 3:20 AM, Tobias Knopp 
wrote:

> I would not be so concerned about parallel 0.2 / 0.3 installations. But
> would it be an option to disable the history mechanism when an incompatible
> format has been detected (+ print out a big warning that one has to delete
> the file in order to get back the history)?
>
> Am Dienstag, 10. Juni 2014 00:45:43 UTC+2 schrieb Stefan Karpinski:
>>
>> Here's the thing. There is no reason to change the history format ever
>> again, so I'm kind of disinclined from doing this. That leaves people using
>> both 0.2 and 0.3 in a slightly awkward situation, but I don't know if that
>> warrants moving the history file under ~/.julia/vX.Y/ – that's not really
>> what that directory is for: it's configuration, not mutable state.
>> Consider, for example, if you're keeping your packages checked into a git
>> super-repo and now Julia starts putting it's history in there. That's no
>> good. You might want to have the package directory be read-only or shared
>> between many different users. Saving history in there is a no-go. That
>> probably means that saving the ~/.julia/.github/token file in there is also
>> bad.
>>
>>
>> On Mon, Jun 9, 2014 at 2:49 PM, Tomas Lycken  wrote:
>>
>>> I usually don't value backwards-compatibility very highly if it's not
>>> too much of a hassle to stay up-to-date (and it isn't with Julia), but I
>>> still think moving everything into a .julia/vX.Y folder is a terrific idea
>>> - there's really no other way to make *non*-backwards-compatible
>>> changes and still let several versions coexist on the same system. Break
>>> whatever you want when going from 0.2 to 0.3 (or 1.5 to 1.6, when we get
>>> there), but keep the installations separate - that way I can always go back
>>> to the old version if I liked it better (or if I just need to recover
>>> something and port it manually).
>>>
>>> // T
>>>
>>>
>>> On Monday, June 9, 2014 4:33:12 PM UTC+2, Kevin Squire wrote:
>>>
 Sorry...!


 On Mon, Jun 9, 2014 at 7:28 AM, Stefan Karpinski 
 wrote:

> Sigh. I guess I should really come to terms with the fact that I will
> have to worry about versioning and compatibility from now on...
>
>
> On Mon, Jun 9, 2014 at 10:20 AM, Kevin Squire 
> wrote:
>
>> Especially for those upgrading from v0.2, it might be nice to provide
>> a smooth transition.  And there is also the issue mentioned by Matt, 
>> where
>> some users may want to use both v0.2 and v0.3 on the same system.
>>
>> I vote for moving the history to the version subdirectory (if it
>> exists).
>>
>> Cheers,
>>Kevin
>>
>>
>> On Mon, Jun 9, 2014 at 7:16 AM, Milan Bouchet-Valat 
>> wrote:
>>
>>> Le lundi 09 juin 2014 à 09:43 -0400, Stefan Karpinski a écrit :
>>> > "Automatic" and "delete" aren't things I like in the same sentence.
>>> In general, sure, but we're talking about command history, not the
>>> user's photo library... ;-)
>>>
>>>
>>
>

>>


Re: [julia-users] PSA: new ~/.julia_history format

2014-06-10 Thread Matt Bauman
On Monday, June 9, 2014 6:45:43 PM UTC-4, Stefan Karpinski wrote:

> Here's the thing. There is no reason to change the history format ever 
> again, so I'm kind of disinclined from doing this. That leaves people using 
> both 0.2 and 0.3 in a slightly awkward situation, but I don't know if that 
> warrants moving the history file under ~/.julia/vX.Y/ – that's not really 
> what that directory is for: it's configuration, not mutable state. 
> Consider, for example, if you're keeping your packages checked into a git 
> super-repo and now Julia starts putting it's history in there. That's no 
> good. You might want to have the package directory be read-only or shared 
> between many different users. Saving history in there is a no-go. That 
> probably means that saving the ~/.julia/.github/token file in there is also 
> bad.
>

Makes sense.  And I have a feeling that once 0.3 is released, there will be 
very minimal demand for maintaining packages for 0.2.  I was just 
spit-balling.


Re: [julia-users] PSA: new ~/.julia_history format

2014-06-10 Thread Stefan Karpinski
It's definitely worth considering. Here's a reasonable way around the
problem if you need to run both v0.2 and v0.3 – put this in your
~/.juliarc.jl:

if VERSION < v"0.3-"
ENV["JULIA_HISTORY"] = joinpath(homedir(), "~/.julia_history_v0.2")
end


Now your v0.2 Julia will use the file ~/.julia_history_v0.2 instead of
~/.julia_history.


On Tue, Jun 10, 2014 at 12:22 PM, Matt Bauman  wrote:

> On Monday, June 9, 2014 6:45:43 PM UTC-4, Stefan Karpinski wrote:
>
>> Here's the thing. There is no reason to change the history format ever
>> again, so I'm kind of disinclined from doing this. That leaves people using
>> both 0.2 and 0.3 in a slightly awkward situation, but I don't know if that
>> warrants moving the history file under ~/.julia/vX.Y/ – that's not really
>> what that directory is for: it's configuration, not mutable state.
>> Consider, for example, if you're keeping your packages checked into a git
>> super-repo and now Julia starts putting it's history in there. That's no
>> good. You might want to have the package directory be read-only or shared
>> between many different users. Saving history in there is a no-go. That
>> probably means that saving the ~/.julia/.github/token file in there is also
>> bad.
>>
>
> Makes sense.  And I have a feeling that once 0.3 is released, there will
> be very minimal demand for maintaining packages for 0.2.  I was just
> spit-balling.
>