[julia-users] ANN: Highlights.jl

2016-11-02 Thread Michael Hatherly
I’m pleased to announce the initial 0.1 release of Highlights.jl — a Julia package for highlighting source code similar to the well-known Python package called Pygments . The documentation for the package can be found here

[julia-users] PSA: Documenter.jl deprecations

2016-11-02 Thread Michael Hatherly
Version 0.7 of Documenter has been tagged. Please note that this release *deprecates* the current authentication methods used to deploy generated documentation from Travis CI to GitHub Pages, namely GitHub personal access tokens and SSH keys

[julia-users] Re: ANN: Documenter.jl 0.3

2016-08-23 Thread Michael Hatherly
Just an extra note to add: we've set up a Gitter chat room [1] for the JuliaDocs packages, so if anyone has questions that aren't really "issues", but rather just usage questions or requests for help when setting up your package docs, then feel free to ask them there. [1]:

Re: [julia-users] Re: ANN: Documenter.jl 0.3

2016-08-23 Thread Michael Hatherly
y that I strongly like the layout and "feel" of the HTML output. Much > better than what I have seen from using the Mkdocs. > > Maybe it is a bit redundant to have the base module name before all the > type and function names? > > On Monday, August 22, 2016 at 10

Re: [julia-users] Re: ANN: Documenter.jl 0.3

2016-08-22 Thread Michael Hatherly
Yes, Morten's additions to the package over the summer have really be great! I'd also like to re-emphasise his call for feedback and suggestions (there's already been lots, but we're always looking for more) on the new HTML output, and the package in general. We want to end up with a

[julia-users] Re: ANN: Optim v0.6

2016-08-14 Thread Michael Hatherly
It’s definitely true that the docs badges don’t seem to be noticed by everyone as easily as I’d originally hoped. Note that when the linked discussion about Documenter.jl’s use of badges happened there was also a link to the docs in the repo description as you’ve suggested here. I think a

[julia-users] ANN: Documenter.jl 0.2

2016-08-06 Thread Michael Hatherly
Hi all, Version 0.2 of Documenter.jl has been tagged. Documenter is a package for building documentation for Julia packages. The documentation is available from https://juliadocs.github.io/Documenter.jl/stable/. This update includes several

Re: [julia-users] Re: ANN: Documenter.jl

2016-06-18 Thread Michael Hatherly
loping packages so assuming a decent amount of knowledge of general > Julia stuff is in my view fair game. > > Just wanted to add my feedback so that multiple inputs are heard. > > > > On Sunday, June 19, 2016 at 12:01:54 AM UTC+2, Michael Hatherly wrote: >> >> It hones

Re: [julia-users] Re: ANN: Documenter.jl

2016-06-18 Thread Michael Hatherly
arrera wrote: > > > > On 18 June 2016 at 18:34, Michael Hatherly <michael...@gmail.com > > wrote: > >> Here is the entire section from the raw file >> >> “Raw file” is the key here: those are image links below the sentence. >> Look at >> the re

Re: [julia-users] Re: ANN: Documenter.jl

2016-06-18 Thread Michael Hatherly
> on it. > > On Sat, 2016-06-18 at 18:34, Michael Hatherly <michael...@gmail.com > > wrote: > > Here is the entire section from the raw file > > > > “Raw file” is the key here: those are image links below the sentence. > Look > > at

Re: [julia-users] Re: ANN: Documenter.jl

2016-06-18 Thread Michael Hatherly
e it in the future. So thanks for that. > > > On 18 June 2016 at 15:20, Michael Hatherly <michael...@gmail.com > > wrote: > >> It has two lines on installation, one line on project status, and two >> sentences on “contributing and questions”. >> >> You’

Re: [julia-users] Re: ANN: Documenter.jl

2016-06-18 Thread Michael Hatherly
ing that should be stated explicitly. Maybe add > some examples showing the use of Markdown. > > Cheers, > Daniel. > > > On 18 June 2016 at 12:26, Michael Hatherly <michael...@gmail.com > > wrote: > >> There's two links in the README (the blue "

[julia-users] Re: ANN: Documenter.jl

2016-06-18 Thread Michael Hatherly
oes it work? How do > you use it? What mark up language does it use? etc etc. The README file is > basically blank, and the docs directory doesn't seem to contain any actual > docs. > > Daniel. > > > On Friday, 17 June 2016 11:07:26 UTC+2, Michael Hatherly wrote: >>

[julia-users] Re: ANN: Documenter.jl

2016-06-17 Thread Michael Hatherly
>> Hello, >> >> I installed Documenter and followed the tutorial. Now I would like to >> convert the documentation in html WITHOUT deploying >> it to github. How can I do this? >> >> Uwe >> >> On Friday, June 17, 2016 at 11:07:26 AM UTC+2, Michael

[julia-users] Re: ANN: Documenter.jl

2016-06-17 Thread Michael Hatherly
o > convert the documentation in html WITHOUT deploying > it to github. How can I do this? > > Uwe > > On Friday, June 17, 2016 at 11:07:26 AM UTC+2, Michael Hatherly wrote: >> >> I’m please to announce the initial release of Documenter.jl >> <https://github.com/J

[julia-users] Re: Custom string escaping in docstrings

2016-06-16 Thread Michael Hatherly
You should use the @doc_str macro when you have LaTeX characters that need escaping. http://docs.julialang.org/en/latest/manual/documentation/#syntax-guide — Mike On Thursday, 16 June 2016 01:51:27 UTC+2, Marius Millea wrote: > > My docstrings often contain Latex so they have $ and \ characters

[julia-users] Re: Strange behavior with docstring

2016-05-13 Thread Michael Hatherly
Yes, do blocks can’t be documented, but perhaps a nicer error message would be more useful. Could you open an issue so this doesn’t get lost. Thanks. — Mike ​ On Friday, 13 May 2016 12:25:09 UTC+2, Eric Forgy wrote: > > Maybe a clue... > > Callback is a constructor, so I have many such

[julia-users] Re: documentation reversed order for multiple methods

2016-05-12 Thread Michael Hatherly
The ordering of docstrings in Julia 0.4 is based on the method signatures, which can sometimes not be all that obvious. They are not printed in a random order though. It’s best just to not rely on a specific order in 0.4. In 0.5 this order has been changed,

[julia-users] Re: Package Documentation Tools

2016-05-12 Thread Michael Hatherly
Yes, that’s how things currently work. LaTeX output and HTML without using MkDocs will be added at some point, not in the initial 0.1 release, but probably 0.2. If anyone runs into any problems feel free to open an issue in the repo — I don’t check the mailing list all that often. ​ — Mike ​

[julia-users] Re: Creating docstrings using code generation

2016-03-03 Thread Michael Hatherly
:second, :millisecond) > func = eval(name) > @doc """ > $name(dt::TimeType) -> Int64 > > Return the $name of a `Date` or `DateTime` as an `Int64`. > """ -> func(dt::TimeType) > end > > Not sure which I

[julia-users] Re: Blog-post on how to make package documentation

2016-02-17 Thread Michael Hatherly
Thanks for writing that up Mauro and also the shout-out :) Worth noting Mike Innes' important work in getting the docsystem integrated into `Base` and his heroic effort converting most of the docs from rst to markdown as well. On a technical note, Lexicon doesn't actually use the docsystem in

[julia-users] Re: What does Expr{:meta,:inline} do to my code?

2016-02-11 Thread Michael Hatherly
dn't figure out another way). I'm assuming including the > Expr(:meta,:inline) is the correct thing to do for generated functions? > > Andy > > > > On Thursday, February 11, 2016 at 5:46:40 PM UTC+10, Michael Hatherly > wrote: >> >> Manually adding an Expr(:meta,

[julia-users] Re: What does Expr{:meta,:inline} do to my code?

2016-02-10 Thread Michael Hatherly
Manually adding an Expr(:meta, :inline) to the function is not equivalent to using @inline since it does not “splice” it into the function’s ast but rather just creates a new Expr object at runtime each time the function is called. Have a look at the difference in code_typed output between

[julia-users] Re: Retrieving documentation for types and their constructors

2016-01-30 Thread Michael Hatherly
Tim, is this with 0.4 or 0.5? The behaviour of type/constructor docs was changed quite recently to be more similar to that of function/method docs. On 0.5 `help?> Foo` should concatenate all the docstrings for `Foo` and it's constructors. Is that the behaviour you're looking for? -- Mike On

[julia-users] Re: Pre-ANN: JuliaJS.jl

2016-01-07 Thread Michael Hatherly
Hi Eric, Are you planning for this to be a full-on JS interface? If so, would it make sense to follow the naming convention of some of the other interface packages like PyCall, RCall, and JavaCall? Perhaps JSCall? I wasn't able to get the plotly example,

Re: [julia-users] Re: Using macros to override lots of operators for a user-defined type

2015-12-16 Thread Michael Hatherly
If the macro returns a single documentable expression, such as a function or type, then you shouldn’t need to do anything special, just add an @doc to the for-loop that generates the methods. If the macro returns a block expression then you need to tell the docsystem how you’d like to handle

Re: [julia-users] Re: Using macros to override lots of operators for a user-defined type

2015-12-16 Thread Michael Hatherly
dot_op = symbol(".$($op)") > docstr = "`$($op)` also works for `Foo` types!" > function Base.$op(a::Foo, b::Foo) > Foo(dot_op(a.x, b.x)) > end > @doc Markdown.parse(docstr) Base.$op > Base.$op >

Re: [julia-users] Module documentation not formatting properly

2015-11-19 Thread Michael Hatherly
Just a follow up from further discussion between NotSoRecentConvert and myself about this off-list: Turns out the differences in behaviour between the two files was that they had different line endings... namely `\r\n` and `\n`. Related: https://github.com/JuliaLang/julia/issues/11988. - Mike

Re: [julia-users] Module documentation not formatting properly

2015-11-18 Thread Michael Hatherly
Not sure what the trouble is then. If possible could you post the entire module that's misbehaving as a gist, https://gist.github.com/? - Mike On Wednesday, 18 November 2015 12:25:48 UTC+2, NotSoRecentConvert wrote: > > When I fix it in the Test module it works but when I do the *exact same >

Re: [julia-users] Module documentation not formatting properly

2015-11-18 Thread Michael Hatherly
Single-quoted strings don't strip leading whitespace, which means that in the second docstring is being treated as an indented code block. For any docstring longer than a single line triple-quoted strings should be used instead. - Mike On Wednesday, 18 November 2015 11:38:25 UTC+2,

Re: [julia-users] Module documentation not formatting properly

2015-11-18 Thread Michael Hatherly
Docs gets captured at macro expansion time so there's no simple way to reset the module's docstring cache other than just reloading the module completely. What are the steps you're going through when reloading the modules, which commands are you using? Are you restarting Julia between each

[julia-users] Re: Confused about doc strings and macros

2015-10-31 Thread Michael Hatherly
For user-defined macros you need to make use of Base.@__doc__ to mark the subexpression returned by your macro that should be documented. In this case it’s probably the Expr(:type, ...) that the docstring should be attached to rather than the subsequent method definitions. So replacing the

[julia-users] Re: Writing function documentation in 0.4

2015-10-25 Thread Michael Hatherly
Is it an oversight that ?draw_rectangle does not show methods if a docstring is present It’s the expected behaviour. If you’d like to have a method table show up when searching for function docs then you can do something like module M """ f(x) ... """ f(x) = x """ f(x, y) ...

[julia-users] Re: Writing function documentation in 0.4

2015-10-25 Thread Michael Hatherly
s a possibility. > > On Sunday, October 25, 2015 at 3:15:54 AM UTC-4, Michael Hatherly wrote: >> >> Is it an oversight that ?draw_rectangle does not show methods if a >> docstring is present >> >> It’s the expected behaviour. >> >> If you’d like to h

[julia-users] Re: are array slices views in 0.4?

2015-10-23 Thread Michael Hatherly
It’s planned for 0.5. See https://github.com/JuliaLang/julia/issues/13157 which covers all the planned changes I think. — Mike ​ On Friday, 23 October 2015 13:14:56 UTC+2, Neal Becker wrote: > > One feature I've been eager to see is that array slices become views, > which > I think was

[julia-users] Re: eval() in try block

2015-10-21 Thread Michael Hatherly
wrote: > > Thank you Mike, your solution works. > However, I don't understand why the $ interpolation is required. I see the > variable *a* does not require interpolation, why does *i* require it? > > On Wednesday, 21 October 2015 15:30:42 UTC+8, Michael Hatherly wrote: &

[julia-users] Re: eval() in try block

2015-10-21 Thread Michael Hatherly
The try block is hiding an error, ERROR: UndefVarError: i not defined. You need to interpolate the i variable in the quoted expression using $i: for i=1:4 try if i==3 error() end eval(:(push!(a,$i))) catch e end end — Mike ​ On Wednesday, 21 October 2015 09:11:44

[julia-users] Re: parse of string followed by number turned into @doc ?

2015-10-10 Thread Michael Hatherly
If you want to disable the automatic @doc then you can append a ; to the string or nest the expressions in a begin ... end block: "hello"; 3.142 begin "hello" 3.142 end — Mike ​ On Friday, 9 October 2015 22:02:37 UTC+2, Michael Francis wrote: > > Julia 0.4 rc4 > > I get the

Re: [julia-users] Re: parse of string followed by number turned into @doc ?

2015-10-10 Thread Michael Hatherly
ts when I tried -- > the doc was added to meta, but help didn't seem to find it). > On Oct 10, 2015 11:50 AM, "Michael Hatherly" <michael...@gmail.com > > wrote: > >> If you want to disable the automatic @doc then you can append a ; to the >> string or nest

[julia-users] Re: Get an array or just a string of all installed Julia packages

2015-10-10 Thread Michael Hatherly
Pkg.installed() returns the currently installed packages and the REQUIRE file found in your .julia/0.4/ folder lists all the explicitly installed packages. So if you copy that file over to a fresh package directory and run Pkg.resolve() that should install everything that you’d need. — Mike

[julia-users] Re: ANN: Julia v0.4.0 released!

2015-10-09 Thread Michael Hatherly
Yay! Thanks to everyone involved for making this such a great release. Looking over the release notes reminded me just how much things have changed from 0.3. You kind of lose track of all the improvements when they're trickling in over the months. On Friday, 9 October 2015 13:20:32 UTC+2, Tony

[julia-users] Re: How to create an array of a given type?

2015-09-29 Thread Michael Hatherly
This is probably https://github.com/JunoLab/atom-julia-client/issues/44 — just a display issue with arrays containing #undef. Not sure when someone will have a chance to fix it. Until someone does you'll need to avoid trying to display results containing undefined references. If you’d like to

[julia-users] Re: Implementing printf() and sprintf() in Julia.

2015-09-27 Thread Michael Hatherly
As mentioned in the other thread, https://groups.google.com/d/msg/julia-users/hBbEGEopi0A/OX4ZEhFnBgAJ and https://groups.google.com/d/msg/julia-users/hBbEGEopi0A/fKQcqDEVBgAJ, there are concerns about generating new code for every single formatting string used. I guess generally this won’t

Re: [julia-users] Re: Documentation of operators

2015-09-24 Thread Michael Hatherly
expanding the list to include things like ‘..’ There’s a brief mention of .. syntax in the manual, http://docs.julialang.org/en/latest/manual/modules/#relative-and-absolute-module-paths, but adding something about it to the docstring for using or import would probably be worth doing. and ->

Re: [julia-users] Re: @sprintf with a format string

2015-09-23 Thread Michael Hatherly
But Michael Hatherly’s showed code above that uses a generated function to solve this. What am I missing? It’s probably because the thread was getting quite long and what I wrote simply got missed. — Mike ​ On Wednesday, 23 September 2015 03:15:23 UTC+2, Bob Nnamtrop wrote: > > But Michael

Re: [julia-users] Re: @sprintf with a format string

2015-09-23 Thread Michael Hatherly
julia-users on Google Groups. May this > lazy-good-for-nothing > request a link? > > --Tim > > On Wednesday, September 23, 2015 08:04:44 AM Michael Hatherly wrote: > > But Michael Hatherly’s showed code above that uses a generated function > to > > solve this

Re: [julia-users] Re: @sprintf with a format string

2015-09-22 Thread Michael Hatherly
gt; sort-of "base distribution", so they will be installed upon installation >>>>>> of >>>>>> Julia, and available with a single `using` statement. But the >>>>>> infrastructure for this is not in place yet, and even if it were,

[julia-users] Re: Array of vectors of variable number and lengths

2015-09-21 Thread Michael Hatherly
s like it be nice to be able to link indexes in array > comprehensions in a similar way to for-loops. Views? > > > On Monday, 21 September 2015 09:49:57 UTC+1, Michael Hatherly wrote: >> >> MyArray = [[zeros(Int, k) for n = 1:binomial(J, k)] for k = 1:K] >> >>

[julia-users] Re: Array of vectors of variable number and lengths

2015-09-21 Thread Michael Hatherly
MyArray = [[zeros(Int, k) for n = 1:binomial(J, k)] for k = 1:K] seems to do what you want I think. Using 2 nested 1-d comprehensions instead of a single 2-d comprehension. — Mike ​ On Monday, 21 September 2015 10:37:06 UTC+2, Alan Crawford wrote: > > > Thanks Tomas. If I do: > > Y =

[julia-users] Re: @sprintf with a format string

2015-09-21 Thread Michael Hatherly
https://github.com/JuliaLang/Formatting.jl might help. — Mike ​ On Monday, 21 September 2015 10:46:31 UTC+2, Ferran Mazzanti wrote: > > Dear all, > > I could use some help here, because I can't believe I'm not able to easily > print formatted numbers under Julia in a easy way. What I try to do

[julia-users] Re: Couldnt connect to Julia @doc not defined

2015-09-20 Thread Michael Hatherly
Tracked down to this, https://github.com/JuliaLang/Compat.jl/pull/126, Compat.jl change. — Mike On Sunday, 20 September 2015 11:43:36 UTC+2, nisha.j…@west.cmu.edu wrote: Hello, > > I am not able to run from LightTable but it runs fine from the terminal > I already tried Pkg.update() and also

[julia-users] Re: Juno stopped working - error message

2015-09-20 Thread Michael Hatherly
The type cannot be constructed error should be fixed on 0.3 by https://github.com/jakebolewski/JuliaParser.jl/pull/25. In the mean time you could Pkg.pin("JuliaParser", v"0.1.2") and see if that fixes the problem on Julia 0.3. (Or a version earlier than v"0.1.2" if needed.) I’ve come across

[julia-users] Re: Add documentation for overrides of Base functions?

2015-09-20 Thread Michael Hatherly
Any suggestions? What version are you on? I think I’ve already fixed this one and it was backported in RC2. It’s working for me in 0.4.0-rc2 and on master. And is the doc""" ..."""... syntax documented somewhere? I recently added a section that should cover everything that’s available, here

[julia-users] Re: Juno stopped working - error message

2015-09-20 Thread Michael Hatherly
oot.jl:245 > in include_from_node1 at loading.jl:128 > in process_options at client.jl:285 > in _start at client.jl:354 > > > > Any other suggestions? > > --Greg > > > On Sunday, September 20, 2015 at 6:16:10 PM UTC+10, Michael Hatherly wrote: > >> The type c

[julia-users] Re: Juno stopped working - error message

2015-09-20 Thread Michael Hatherly
be reverting back to Compat v0.7.0 might also help. > > -- Greg > > > On Sunday, September 20, 2015 at 7:08:47 PM UTC+10, Michael Hatherly wrote: > >> Before this JuliaParser was at version v0.6.3, are you sure we should try >> reverting to v0.1.2? >> >> See the

[julia-users] Re: Problems with docile on travis / conditional require?

2015-08-18 Thread Michael Hatherly
From what I can see in that travis log this is not a problem on 0.3, hence not really a Docile problem. It looks like the Julia 0.4 version being used on travis is older than the fix https://github.com/JuliaLang/julia/pull/11932 for the LoadError: error in method definition: function Base.sum

[julia-users] Re: Strange error when using docile on 0.3

2015-08-17 Thread Michael Hatherly
https://github.com/MichaelHatherly/Docile.jl/issues/51 It’s a bug in the @doc macro in Docile, which I recently fixed in Base but haven’t backported to Docile since it only applies to direct use of @doc. If you use bare docstrings, ie. without @doc, which are supported by Docile as well as in

[julia-users] Re: help() not defined

2015-08-17 Thread Michael Hatherly
Looks like help, and apropos, were removed in https://github.com/JuliaLang/julia/commit/55339fca71e643db614c459c55fd742fdef8c4d0. You should still be able to do everything help did with the ? mode, but perhaps it should have been deprecated first given that it was exported. — Mike ​ On

[julia-users] Re: Strange error when using docile on 0.3

2015-08-17 Thread Michael Hatherly
Great, glad its working! On Monday, 17 August 2015 18:34:23 UTC+2, Uwe Fechner wrote: Thanks a lot! Everything is working now. :) Am Montag, 17. August 2015 18:15:56 UTC+2 schrieb Michael Hatherly: You’ll need to load the Lexicon package in 0.3 to actually view docs. See https

[julia-users] Re: Strange error when using docile on 0.3

2015-08-17 Thread Michael Hatherly
in the documentation any more: If I type: ?NaNMath.sum I get an empty reply, both in 0.3 and 0.4. Any idea? Am Montag, 17. August 2015 17:24:58 UTC+2 schrieb Michael Hatherly: https://github.com/MichaelHatherly/Docile.jl/issues/51 It’s a bug in the @doc macro in Docile, which I recently

[julia-users] Re: I need help with test_throws

2015-08-06 Thread Michael Hatherly
throw should be throwing an exception rather than just a string, which is why the deprecation message is a bit confusing. So instead of the line https://github.com/diegozea/MIToS.jl/blob/master/src/MSA/IndexedVectors.jl#L49 you’d want to have something like throw(ArgumentError($element is

[julia-users] Re: Getting started with documentation using Docile and Lexicon in 0.3.x

2015-06-22 Thread Michael Hatherly
Ok, could you please open an issue here https://github.com/MichaelHatherly/Docile.jl/issues/new including the steps that you've tried some far and any additional details. Thanks. - Mike On Monday, 22 June 2015 09:07:03 UTC+2, NotSoRecentConvert wrote: I tried just that and it still returns

[julia-users] Re: Getting started with documentation using Docile and Lexicon in 0.3.x

2015-06-05 Thread Michael Hatherly
Docile works on whole packages rather than individual files. You just need to put the file docthis.jl in the correct load path [1] so that ``using DocThis`` works or else do ``require(docthis.jl)`` rather than ``include(docthis.jl)``. I'll add a mention of this to the documentation shortly.

[julia-users] Re: Getting started with documentation using Docile and Lexicon in 0.3.x

2015-06-05 Thread Michael Hatherly
by Docile at all. Perhaps there's something else in the Official Package generation process upon which Docile relies? Andy On Friday, 5 June 2015 15:42:19 UTC+1, Michael Hatherly wrote: Docile works on whole packages rather than individual files. You just need to put the file docthis.jl

[julia-users] Re: Lexicon.jl Index() function?

2015-05-12 Thread Michael Hatherly
Hi Florian, it says ` *ERROR: Index not defined`. *Is that the full output from the error message? When I run the example it doesn't produce an error. What versions of both Lexicon and Docile are you using? Also, is this on Julia 0.3 or 0.4? -- Mike On Tuesday, 12 May 2015 12:29:17 UTC+2,

[julia-users] Re: Lexicon.jl Index() function?

2015-05-12 Thread Michael Hatherly
, Michael Hatherly wrote: Hi Florian, it says ` *ERROR: Index not defined`. *Is that the full output from the error message? When I run the example it doesn't produce an error. What versions of both Lexicon and Docile are you using? Also, is this on Julia 0.3 or 0.4? -- Mike On Tuesday

[julia-users] Re: Values from Dict assigned to variables (symbols?) named as keys?

2015-02-16 Thread Michael Hatherly
I would have to explicitly state all the variables Yes, you would. the Dict that I call the function with is longer “preserved” (correct?) as a variable Assuming this was meant to read “is no longer”, it would not be possible to pass it to additional calls. You might be able to use a

[julia-users] Re: Values from Dict assigned to variables (symbols?) named as keys?

2015-02-16 Thread Michael Hatherly
One thing to note about using @eval as mentioned in Sean’s reply is that eval (and by extension @eval) does not evaluate expressions in a function’s scope, but rather in the global scope of the module. This might have unexpected results: julia function f(d) for (k, v) in d

[julia-users] Re: Display Help in JUNO

2015-02-11 Thread Michael Hatherly
It’s not just Juno — I just haven’t gotten around to implementing output for anything but console yet. I won’t have a chance to add this for the next few weeks though, so here’s the issue https://github.com/MichaelHatherly/Lexicon.jl/issues/29 in case you’ve got any ideas you’d like to

[julia-users] Re: Cartesian @nref Usage

2015-02-11 Thread Michael Hatherly
For further reference the files base/multidimensional.jl, base/broadcast.jl, and some others (just grepping for the cartesian macros) are great places to see them in action. — Mike ​ On Wednesday, 11 February 2015 17:28:09 UTC+2, Christoph Ortner wrote: that simple - thanks! Christoph

[julia-users] Re: Cartesian @nref Usage

2015-02-11 Thread Michael Hatherly
You need to wrap the @nref macro is parenthesis to avoid it consuming the = t: (@nref $N A i) = t or @nref($N, A, i) = t Note that in your example $N and A should be swapped around. — Mike ​ On Wednesday, 11 February 2015 11:24:31 UTC+2, Christoph Ortner wrote: I just discovered the

Re: [julia-users] using Docile

2015-02-06 Thread Michael Hatherly
. 2015-02-05 23:49 GMT-06:00 Michael Hatherly michael...@gmail.com javascript:: Hi Diego, ERROR: UndefVarError: @repl not defined Are you using julia 0.4-dev here? If so could you try updating julia also, since @repl is quite new. — Mike ​ On Friday, 6 February 2015 01:59:26 UTC+2, Diego

Re: [julia-users] using Docile

2015-02-05 Thread Michael Hatherly
Hi Diego, ERROR: UndefVarError: @repl not defined Are you using julia 0.4-dev here? If so could you try updating julia also, since @repl is quite new. — Mike ​ On Friday, 6 February 2015 01:59:26 UTC+2, Diego Tapias wrote: No problem while installing. But I’ve got the following error

Re: [julia-users] ANN: Docile Lexicon update.

2015-02-01 Thread Michael Hatherly
/latest/manual/documentation/ Otherwise, there will need to be an extra line in the Accessing Documentation section. Cheers On Sunday, 1 February 2015 10:09:34 UTC+11, Michael Hatherly wrote: Make sure you’ve installed Lexicon as Tom has mentioned. Also call using Lexicon prior to trying

[julia-users] ANN: Docile Lexicon update.

2015-01-21 Thread Michael Hatherly
Hi all, I’m pleased to announce the latest update to the Docile https://github.com/MichaelHatherly/Docile.jl and Lexicon https://github.com/MichaelHatherly/Lexicon.jl documentation packages. New features include: - Docile now supports plain strings

[julia-users] Re: 0.4 Documentation System

2015-01-20 Thread Michael Hatherly
the doc before one of my functions. v0.3.2 On Tuesday, January 20, 2015 at 8:19:50 AM UTC+1, Michael Hatherly wrote: If anyone happens to run into a ERROR: @doc_mstr not defined message when using Docile and the 0.4 doc system please have a look at this https://github.com/MichaelHatherly

[julia-users] Re: 0.4 Documentation System

2015-01-20 Thread Michael Hatherly
What version of Docile are you using? You can check with `Pkg.status()`. The current stable version is 0.3.2. Try doing `Pkg.update()` and then rerunning your file if you're not on that version. On Tuesday, 20 January 2015 16:17:07 UTC+2, Yuuki Soho wrote: My file was huge, but I did a minimal

[julia-users] Re: 0.4 Documentation System

2015-01-20 Thread Michael Hatherly
No problem, glad that part’s working now. To view Docile-generated help you need to call using Lexicon, which hooks into Julia’s help system and adds the help entries generated by Docile. If you’ve not got Lexicon installed you can call Pkg.add(Lexicon) to install it. — Mike On Tuesday, 20

[julia-users] Re: 0.4 Documentation System

2015-01-20 Thread Michael Hatherly
- function foo() end On Tuesday, 20 January 2015 09:02:31 UTC-8, Michael Hatherly wrote: No problem, glad that part’s working now. To view Docile-generated help you need to call using Lexicon, which hooks into Julia’s help system and adds the help entries generated by Docile. If you’ve not got

[julia-users] Re: 0.4 Documentation System

2015-01-19 Thread Michael Hatherly
If anyone happens to run into a ERROR: @doc_mstr not defined message when using Docile and the 0.4 doc system please have a look at this https://github.com/MichaelHatherly/Docile.jl/issues/64 issue for the workaround. — Mike ​ On Tuesday, 20 January 2015 00:26:36 UTC+2, Mike Innes wrote:

Re: [julia-users] exemplar package for 0.4-style documentation

2015-01-14 Thread Michael Hatherly
Just as a note regarding this new syntax for anyone reading: It’s still being experimented with in Docile/Lexicon, though so far I’ve found it much more enjoyable to use. Package load times aren’t affected nearly as much as with @doc since collection and parsing of docstrings only happens

Re: [julia-users] How to define help text for a module function so that it displays in REPL

2015-01-12 Thread Michael Hatherly
Hi Andreas, There’s no style guide specific to Julia that I’m aware of. Your best bet would probably be to have a look to how other languages go about documenting and extract the parts that make the most sense to you. Beyond that I’d just suggest documenting each thing that you export from

Re: [julia-users] How to define help text for a module function so that it displays in REPL

2015-01-09 Thread Michael Hatherly
Hi Jan, If you run into any problems or have any suggestions for improvements feel free to open an issue in the Docile repo. — Mike ​ On Friday, 9 January 2015 16:49:53 UTC+2, Ján Dolinský wrote: Thanks a lot. I'll check it out. Jan Dňa piatok, 9. januára 2015 10:53:10 UTC+1 Tim Holy

[julia-users] Re: Test-scoped requirements

2015-01-04 Thread Michael Hatherly
You can put a REQUIRE file in the test directory that should do what you want. — Mike ​ On Sunday, 4 January 2015 21:33:37 UTC+2, Andrei Zh wrote: I have a package A that has file-based integration with package B, i.e. A writes files that B can read, but neither A depends on B, nor vise

[julia-users] Re: Memory Allocation Question

2015-01-03 Thread Michael Hatherly
coeffs in your second function is a global variable (used in the first line of that function). If I pass that through in a similar way to the first function then the timings are roughly the same for me. — Mike ​ On Saturday, 3 January 2015 22:12:51 UTC+2, Christoph Ortner wrote: Dear Tim

[julia-users] Re: Memory Allocation Question

2015-01-03 Thread Michael Hatherly
I only caught that by wrapping all the testing code at the bottom in a function and running that instead. Is there any improvement from trying that? — Mike ​ On Saturday, 3 January 2015 22:29:06 UTC+2, Christoph Ortner wrote: Hi Mike, What an embarrassing typo. Thank you for pointing

[julia-users] Re: Converting string to module type/Programmatically using modules

2014-12-30 Thread Michael Hatherly
You don’t need the quote ... end block since you’re creating the expression manually using Expr objects. Removing that and changing $modules to modules.args should work alright I think. — Mike ​ On Tuesday, 30 December 2014 22:52:55 UTC+2, Ismael VC wrote: I get a different expression

[julia-users] Re: Converting string to module type/Programmatically using modules

2014-12-30 Thread Michael Hatherly
push!(ex.args, Expr(:import, name)) end return ex end julia @dynamic_import [Newton.jl, MyTest.jl] julia Newton Newton julia MyTest MyTest El martes, 30 de diciembre de 2014 15:05:34 UTC-6, Michael Hatherly escribió: You don’t need the quote ... end

[julia-users] Re: overview questions about new doc changes (coming with v 0.4)

2014-12-17 Thread Michael Hatherly
Hi John, Another might be to support having docstrings in separate files (e.g., foo.jl and an optional corresponding foo.jldoc for detailed docstrings). Docile.jl does support this feature already with: @doc meta(file = foobar-docs.md) - foobar(x) = x Granted the syntax is slightly bulky,

[julia-users] Re: Documentation in the source code

2014-12-17 Thread Michael Hatherly
supersede this? Then probably not worth the effort. Thanks again for your help, Christoph On Tuesday, 16 December 2014 15:38:31 UTC, Michael Hatherly wrote: I guess, this makes ? behave like @query. Yes, it modifies, here https://github.com/MichaelHatherly/Lexicon.jl/blob

Re: [julia-users] Re: overview questions about new doc changes (coming with v 0.4)

2014-12-17 Thread Michael Hatherly
? I think you'd need to be able to do the latter if we want there to be some kind of automatic correspondence between foo.jl and foo.jldoc. --Tim On Wednesday, December 17, 2014 01:23:45 AM Michael Hatherly wrote: Hi John, Another might be to support having docstrings in separate

Re: [julia-users] newbie: Problem installing IJulia

2014-12-16 Thread Michael Hatherly
2:39:55 PM UTC+8, Michael Hatherly wrote: Is the path you’ve set: [:app :lt.objs.langs.julia/julia-path /Applications/Julia-0.3.3.app/Contents/MacOS/Julia] a folder or is it the actual julia executable? From the install guide http://junolab.org/docs/installing.html the path should

[julia-users] Re: Documentation in the source code

2014-12-16 Thread Michael Hatherly
facility - I am writing a large code in Julia, and this will be extremely useful.) Christoph On Tuesday, 16 December 2014 06:47:46 UTC, Michael Hatherly wrote: Hi Christoph, The combo of Docile.jl *and* Lexicon.jl https://www.google.com/url?q=https%3A%2F%2Fgithub.com%2FMichaelHatherly

Re: [julia-users] newbie: Problem installing IJulia

2014-12-15 Thread Michael Hatherly
Is the path you’ve set: [:app :lt.objs.langs.julia/julia-path /Applications/Julia-0.3.3.app/Contents/MacOS/Julia] a folder or is it the actual julia executable? From the install guide http://junolab.org/docs/installing.html the path should be the executable rather than the Julia folder. I’m

[julia-users] Re: Documentation in the source code

2014-12-15 Thread Michael Hatherly
Hi Christoph, The combo of Docile.jl *and* Lexicon.jl https://github.com/MichaelHatherly/Lexicon.jl should give you package help when using the REPL’s ? command in 0.3. Let me know if you run into any problems with it. Also, for documenting both version 0.3 and 0.4 you should be able to

[julia-users] Re: @inbounds only applies to RHS?

2014-11-14 Thread Michael Hatherly
Looks like that should work. Have you tried removing the space in shift_compute1 (f, u, i, i) between the method name and argument list? I get the same error with a space there. — Mike ​

[julia-users] Re: @inbounds only applies to RHS?

2014-11-14 Thread Michael Hatherly
To follow up on that here's the output from quoting that problematic line: ``` julia :(@inbounds out[(i-1)*f.interp+1:i*f.interp] = shift_compute1 (f, u, i, i)).args 3-element Array{Any,1}: symbol(@inbounds) :(out[(i - 1) * f.interp + 1:i * f.interp] =

[julia-users] Re: @inbounds only applies to RHS?

2014-11-14 Thread Michael Hatherly
And here's the issue I was referring to https://github.com/JuliaLang/julia/issues/7232.

[julia-users] Re: Conditional loading of modules (for speed)

2014-11-05 Thread Michael Hatherly
I’ve used the following *hack* to do a similar thing: function plotfunc(args...) isdefined(:Gadfly) || eval(Expr(:using, :Gadfly)) println(do things...) end Hope that helps. Perhaps there’s a more elegant way to do this though? — Mike ​

[julia-users] Re: -1^2

2014-10-23 Thread Michael Hatherly
It’s worth noting that the way Julia parses expressions is open to exploration if you know what functions to use. julia ex = :(-1^2) # quote the piece of code you'd like to know more about :(-(1^2)) julia Base.Meta.show_sexpr(ex) # a lisp-y representation of the expression (:call, :-, (:call,

  1   2   >