Re: [julia-users] Re: Help with writing a macro to for fetch, process, store pattern

2014-06-09 Thread Andrew Simper
To be more specific I suppose I should call the variable being passed to the function "this", so what I am after is good way to write functions that process on and update state, which can either be immutable or not depending on what is most efficient for the specific operations: immutable State

Re: [julia-users] Re: how to print out part of a row in DataFrame?

2014-06-09 Thread John Myles White
You can either sync with master or wait until we do an official release. I’m pretty happy with how DataFrames are printed now. Because there’s no substantive distinction between a DataFrame, a row of a DataFrame or part of a row, we print them the same way. I don’t really see why we should chan

Re: [julia-users] Adding a row to a DataFrame

2014-06-09 Thread Gustavo Lacerda
OK, but first I want to make it work for heterogenous lists (tuples), which is mysteriously failing. Gustavo On Monday, June 9, 2014, John Myles White wrote: > Would be good to clean this up by removing some of the slow parts (map usage, anonymous function usage) and have it submitted as a PR.

Re: [julia-users] Re: how to print out part of a row in DataFrame?

2014-06-09 Thread cnbiz850
Thanks John for the update. Do I need to do a clone to get the new change? I think there are two issues here. One is to display df, a row of it, or part of a row, like julia> df julia> df[3, 1:20] The other is to print out (to the terminal or to a file). On the first issue, I hope DataFram

Re: [julia-users] Parallel Stochastic Gradient Descent

2014-06-09 Thread John Myles White
Thanks for the link, Chris. Haven’t made it through everything (the proof technique is pretty advanced), but there do seem to be a few significant limitations for practical applications. Two I noticed are: (1) Assumption that data is present across machines in a randomized order. Definitely not

Re: [julia-users] Re: Help with writing a macro to for fetch, process, store pattern

2014-06-09 Thread Andrew Simper
Hi Stefan, I agree I would rather use an immutable type, what I am trying to work around is the lack of support for some kind of "using" language feature similar to how namespaces work but for instances of a user defined composite type, that would be ideal. Then I can avoid all the obfuscating

[julia-users] Re: how to print out part of a row in DataFrame?

2014-06-09 Thread Taylor Maxwell
scratch what I just said

Re: [julia-users] Re: how to print out part of a row in DataFrame?

2014-06-09 Thread John Myles White
Yup, this is the behavior that just got removed since we’ve had so many complaints. — John On Jun 9, 2014, at 7:42 PM, Taylor Maxwell wrote: > If your dataframe has 6 or more columns then it prints this summary. If you > index less than 6 columns it will print ok. You can force it to spit

[julia-users] Re: how to print out part of a row in DataFrame?

2014-06-09 Thread Taylor Maxwell
If your dataframe has 6 or more columns then it prints this summary. If you index less than 6 columns it will print ok. You can force it to spit it all out with showall(df) but that may not be entirely legible. There may be other ways to display it.

Re: [julia-users] Adding a row to a DataFrame

2014-06-09 Thread John Myles White
Would be good to clean this up by removing some of the slow parts (map usage, anonymous function usage) and have it submitted as a PR. — John On Jun 9, 2014, at 1:17 PM, Keith Campbell wrote: > Thanks for putting this togehter. > Under 0.3 pre from yesterday, I get a deprecation warning in th

Re: [julia-users] Natural language processing in Julia

2014-06-09 Thread John Myles White
There’s lots of tools for working with files without loading them in TextAnalysis.jl. — John On Jun 9, 2014, at 3:05 PM, Matías Guzmán Naranjo wrote: > I don't have too much experience in NLP, I am a corpus linguist, so > CorpusTools is mainly aimed at doing corpus linguistics things (colloc

Re: [julia-users] how to print out part of a row in DataFrame?

2014-06-09 Thread John Myles White
I’ve changed the default printing rule to show all columns. As some point, we’ll need to clean it up so that we don’t print crazy amounts of ouptut if you have thousands of columns or more. — John On Jun 9, 2014, at 4:42 PM, cnbiz850 wrote: > I only got the following formatted display but no

Re: [julia-users] Computing colors of molecules with Julia

2014-06-09 Thread Jiahao Chen
> FYI the RSS feed on your blog is 404'ing. Thanks. I'm still figuring out how to use Jekyll. > Also I submitted your post to Hacker News -- currently at #9 on the front > page! Cool!

[julia-users] Re: Embedding Julia

2014-06-09 Thread Herbert Sauro
I've answered my own question, I have to redirect stdout etc in order to use julia in a GUI application. Herbert

[julia-users] Re: modules, include and export

2014-06-09 Thread gael . mcdon
Which is asking for troubles... I always thought that non exported objects could not be imported.

Re: [julia-users] negative power throws error

2014-06-09 Thread gael . mcdon
I'm just wondering: is it that hard to put a floating point somewhere in the expression to get all inputs promoted to floating points?

Re: [julia-users] packages with executable scripts

2014-06-09 Thread gael . mcdon
Being a Linux user, I find this behavior weird and explains why I'm mainly using packages distributed by my distribution of choice. Python is not really a reference there since they still consider having distribution problems. Two of the main concerns regarding install time scripts are security

[julia-users] how to print out part of a row in DataFrame?

2014-06-09 Thread cnbiz850
I only got the following formatted display but not my values. To me this is really not desired, does everyone prefer this? Can I get a printout of the values just as I print out a row of an array? julia> println(df[jj, 1:20]) 1x20 DataFrame |---|--||-| | Col # | Name |

[julia-users] Re: Embedding Julia

2014-06-09 Thread Herbert Sauro
For those who might be interested here is an update. I called libjulia.dll from a straight C application using Visual Studio 2010 and it work ok. So something odd with Delphi. Delphi can be used to develop two types of application, Console or GUI apps. I was calling libjulia.dll from a GUI app.

[julia-users] Comparing Python v. Clojure v. Julia performance in text-processing and dynamic collections

2014-06-09 Thread Waldir Pimenta
I figured you guys might find this interesting: http://matthewrocklin.com/blog/work/2014/01/13/Text-Benchmarks/

Re: [julia-users] Trying to install 0.3 prerelease on Ubuntu but keep geting 0.2.1

2014-06-09 Thread J Luis
Segunda-feira, 9 de Junho de 2014 23:47:38 UTC+1, J Luis escreveu: > > > > Have you tried running "apt-get update" before installing? >> > > Yes (many times). Even tried by setting it manual

Re: [julia-users] Trying to install 0.3 prerelease on Ubuntu but keep geting 0.2.1

2014-06-09 Thread Elliot Saba
What does "apt-cache show julia" display? -E On Mon, Jun 9, 2014 at 3:47 PM, J Luis wrote: > > > Have you tried running "apt-get update" before installing? >> > > Yes (many times). Even tried by setting it manually. > (Lubuntu 14.01 VM here) > > > > > >> -E >> >> >> On Mon, Jun 9, 2014 at 3:38

Re: [julia-users] Trying to install 0.3 prerelease on Ubuntu but keep geting 0.2.1

2014-06-09 Thread J Luis
Have you tried running "apt-get update" before installing? > Yes (many times). Even tried by setting it manually. (Lubuntu 14.01 VM here) > -E > > > On Mon, Jun 9, 2014 at 3:38 PM, cnbiz850 > > wrote: > >> On 06/10/2014 06:30 AM, J Luis wrote: >> >>> Hi, >>> >>> I'm trying to install 0.3

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 wha

Re: [julia-users] Trying to install 0.3 prerelease on Ubuntu but keep geting 0.2.1

2014-06-09 Thread Elliot Saba
Have you tried running "apt-get update" before installing? -E On Mon, Jun 9, 2014 at 3:38 PM, cnbiz850 wrote: > On 06/10/2014 06:30 AM, J Luis wrote: > >> Hi, >> >> I'm trying to install 0.3 via PPA (just updated to Ubuntu 14.01 to see if >> worked better as I had other issues with 13.10) but a

Re: [julia-users] Trying to install 0.3 prerelease on Ubuntu but keep geting 0.2.1

2014-06-09 Thread cnbiz850
On 06/10/2014 06:30 AM, J Luis wrote: Hi, I'm trying to install 0.3 via PPA (just updated to Ubuntu 14.01 to see if worked better as I had other issues with 13.10) but all I get is 0.2.1. I am on Xubuntu 14.04 and it works fine.

[julia-users] Trying to install 0.3 prerelease on Ubuntu but keep geting 0.2.1

2014-06-09 Thread J Luis
Hi, I'm trying to install 0.3 via PPA (just updated to Ubuntu 14.01 to see if worked better as I had other issues with 13.10) but all I get is 0.2.1.

Re: [julia-users] Natural language processing in Julia

2014-06-09 Thread Matías Guzmán Naranjo
I'll eventually add some basic POS tagging and Parser. This may take a bit of time though. For now I'm thinking of just making a python wrapper for FreeLing. El martes, 10 de junio de 2014 00:05:10 UTC+2, Matías Guzmán Naranjo escribió: > > I don't have too much experience in NLP, I am a corpus

Re: [julia-users] Natural language processing in Julia

2014-06-09 Thread Matías Guzmán Naranjo
I don't have too much experience in NLP, I am a corpus linguist, so CorpusTools is mainly aimed at doing corpus linguistics things (collocations, collostructions, concordances, etc.). I did see your TextAnalysis library but didn't like some of its aspects (not being able to work with files with

[julia-users] Re: Julia T-shirt and Sticker

2014-06-09 Thread Rich Morin
I've been looking around for a Julia shirt and wouldn't mind getting a sticker, either. Might there be a way to make these available for resale, letting the proceeds go to the donut fund or somesuch?

[julia-users] Re: modules, include and export

2014-06-09 Thread Patrick O'Leary
Use the "using" keyword instead of the "import" keyword, in conjunction with your (correct) intuition about "export". module MyModule include("file.jl") export foo end ... using MyModule foo() MyModule.bar() On Monday, June 9, 2014 4:21:16 PM UTC-5, Davide Lasagna wrote: > > Hi all, > > I h

[julia-users] modules, include and export

2014-06-09 Thread Davide Lasagna
Hi all, I have a question about modules and I am probably missing something. Say that in file.jl I define functions foo and bar. I then create a file MyModule.jl where I include file.jl as: module MyModule include("file.jl") end At this point, in the REPL, doing import MyModule will give m

Re: [julia-users] Help with writing a macro to for fetch, process, store pattern

2014-06-09 Thread Nathaniel Nicandro
Yes I realize now that I jumped the gun on my post. It would definitely be very useful if you could reduce this code x = point.x y = point.y # do stuff on x and y point.x = x point.y = y by something like @fetch_and_store(Point, :foo, quote #do stuff on x and y end) p = Point(1, 0) foo(p)

Re: [julia-users] Computing colors of molecules with Julia

2014-06-09 Thread Evan Miller
FYI the RSS feed on your blog is 404'ing. Also I submitted your post to Hacker News -- currently at #9 on the front page! On Mon, Jun 9, 2014 at 10:04 AM, Jiahao Chen wrote: > I've started a blog showcasing a > few IJulia notebooks I've been working on ove

[julia-users] Re: Help with writing a macro to for fetch, process, store pattern

2014-06-09 Thread yuuki
I think that adapting the macro at the end of this thread: https://groups.google.com/forum/#!searchin/julia-users/unpack/julia-users/IQS2mT1ITwU/gEyj6JNJsuAJ and getting the fields of your type by using names(CircuitModel) it should work. I'll give it a try tomorrow if I have the time.

Re: [julia-users] Adding a row to a DataFrame

2014-06-09 Thread Keith Campbell
Thanks for putting this togehter. Under 0.3 pre from yesterday, I get a deprecation warning in the Array version where df2 is assigned. The tweak below appears to resolve that warning: function push!(df::DataFrame, arr::Array) K = length(arr) assert(size(df,2)==K) col_types = map(el

Re: [julia-users] Adding a row to a DataFrame

2014-06-09 Thread Gustavo Lacerda
I've implemented this: function push!(df::DataFrame, arr::Array) K = length(arr) assert(size(df,2)==K) col_types = map(eltype, eachcol(df)) converted = map(i -> convert(col_types[i][1], arr[i]), 1:K) ## To do: throw error if convert fails df2 = DataFrame(reshape(converted,

[julia-users] Re: duplicating the value of a variable

2014-06-09 Thread 'Stéphane Laurent' via julia-users
Thank you, I will think about your proposal and take a look at ArrayViews in the near future. - Stéphane Le lundi 9 juin 2014 19:37:38 UTC+2, Stéphane Laurent a écrit : > > Hi, > > In a program I have some *n*1* arrays, say > > *A* > *B* > *C* > *D* > > > and in order to make a certain calcul

Re: [julia-users] duplicating the value of a variable

2014-06-09 Thread Mauro
> In my code, there are such arrays (with BigFloat instead of character > string) : > > julia> ARRAY = ["a", "b", "c"] > > 3-element Array{ASCIIString,1}: > > "a" > > "b" > > "c" > > > and I perform this operation : > > julia> SHIFTED_ARRAY = ARRAY[[2:length(ARRAY); 1]] > > 3-element Array{ASC

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

Re: [julia-users] duplicating the value of a variable

2014-06-09 Thread 'Stéphane Laurent' via julia-users
Sorry, maybe my message is not clear enough cause my English is quite limitated. Or maybe I don't understand your reply, but my main question is not about the way to permute the coordinates. In my code, there are such arrays (with BigFloat instead of character string) : julia> ARRAY = ["a", "b

[julia-users] Re: Embedding Julia

2014-06-09 Thread Herbert Sauro
I tried 0.3 prelease but got the same error when calling jl_init(). I tried the following: I used the method signature: void jl_init (char *), and loading finds the method ok Tried libjulia.dll and libjulia-debug.dll Tried cdecl and stdcall conventions on jl_init() Tried calling with NULL and

Re: [julia-users] duplicating the value of a variable

2014-06-09 Thread Mauro
This smells of vectorization. If so, in Julia, you should try to change your loops rather than change your arrays. Maybe like so: julia> a = [1:5]; julia> la = length(a); julia> off = 0; julia> for i=1+off:la+off println(a[rem1(i,la)]) end 1 2 3 4 5 julia> off = 1; julia>

Re: [julia-users] Re: Computing colors of molecules with Julia

2014-06-09 Thread Stefan Karpinski
That does seem like a rather nice solution. Makes sense for matrices too – displaying a color matrix as a 2D color swatch would be handy. On Mon, Jun 9, 2014 at 1:54 PM, Steven G. Johnson wrote: > Rather than defining a ColorVector type to display color vectors as > rainbow swatches, it might b

[julia-users] Re: Computing colors of molecules with Julia

2014-06-09 Thread Steven G. Johnson
Rather than defining a ColorVector type to display color vectors as rainbow swatches, it might be nice to update the writemime function for AbstractVector{<:ColorValue} in Color.jl so that it displays long vectors more n

Re: [julia-users] Parallel Stochastic Gradient Descent

2014-06-09 Thread Christopher Fusting
The results in the paper from which this algorithm was implemented are encouraging: http://www.research.rutgers.edu/~lihong/pub/Zinkevich11Parallelized.pdf The proof is a bit beyond me so I cannot vouch for the theory. I'm excited to test this on some non - trivial problems to see how it fares

Re: [julia-users] Help with writing a macro to for fetch, process, store pattern

2014-06-09 Thread Jameson Nash
> something's probably wrong. Like this macro assuming you want to disable optimization of your code and only work in the global scope without modules. I maintain my recommendation of using an immutable type (which allows llvm to do some additional optimizations) and making a single local variable

[julia-users] duplicating the value of a variable

2014-06-09 Thread 'Stéphane Laurent' via julia-users
Hi, In a program I have some *n*1* arrays, say *A* *B* *C* *D* and in order to make a certain calculation, for convenience, I construct the array *A B* *B C* *C D* *D A* There will be millions of such arrays generated by my final program, with *n* greater than 4 and the components A, B,

Re: [julia-users] negative power throws error

2014-06-09 Thread Steven G. Johnson
On Monday, June 9, 2014 7:22:36 AM UTC-4, Stéphane Laurent wrote: > > That's why we need BigRational > :) >> >> Doesn't Rational{BigInt} work fine? Of course, the problem with all bigint rational approaches is that the denominator generically

Re: [julia-users] Re: How to read and change the content of web pages to the vector ?

2014-06-09 Thread Paul Analyst
Thx James, i will try Paul. W dniu 2014-06-09 19:04, James Porter pisze: https://github.com/porterjamesj/GumboParser.jl

Re: [julia-users] Re: Help with writing a macro to for fetch, process, store pattern

2014-06-09 Thread Stefan Karpinski
Any time there's an eval in what your macro emits, something's probably wrong. In this case, however, you can't really avoid it – largely because you can't do this correctly. The trouble is that the type of the object you want to bind the fields of is a runtime property, but you want to bind variab

[julia-users] Re: How to read and change the content of web pages to the vector ?

2014-06-09 Thread James Porter
I suppose I should mention that I have a prototype wrapper of Google's gumbo HTML parsing library in the works: https://github.com/porterjamesj/GumboParser.jl It's not on METADATA and I wouldn't consider the API stable, but everything seems to work pretty well so far. If you really want to use

[julia-users] Re: Help with writing a macro to for fetch, process, store pattern

2014-06-09 Thread Nathaniel Nicandro
Oh, yes I see that now. Then what you could do is quote the call to names() in your macro expression so the names call is executed in the calling environment. macro fetch(p) return quote local vars = names($p) local ex = Expr(:block) append!(ex.args, [:($v = $p.$v) f

[julia-users] Re: Embedding Julia

2014-06-09 Thread Tobias Knopp
Yes, The embedding chapter that you have read was written after the 0.2 was released. I have fixed some export issues during the 0.3 release cycle that are not in 0.2. Am Montag, 9. Juni 2014 18:32:39 UTC+2 schrieb Herbert Sauro: > > Thanks for the rely, I'm using 0.2.1. Do you think I might hav

[julia-users] Re: Embedding Julia

2014-06-09 Thread Herbert Sauro
Thanks for the rely, I'm using 0.2.1. Do you think I might have better luck with o.3 prerelease? Herbert

Re: [julia-users] Parallel Stochastic Gradient Descent

2014-06-09 Thread John Myles White
My question is about the theory behind your algorithm. My understanding is that no parallel SGD implementation (except one that trivially runs on the same data) will produce correct results in general. Is that not true? -- John On Jun 9, 2014, at 9:07 AM, Christopher Fusting wrote: > John,

Re: [julia-users] Parallel Stochastic Gradient Descent

2014-06-09 Thread Christopher Fusting
John, There has been no rigorous testing yet. My primary concern in the averaging algorithm is process latency, completion time, and faults. Do you have specifics you would like to share? _Chris On Mon, Jun 9, 2014 at 11:24 AM, John Myles White wrote: > Very cool, Chris. > > I’ve done a lot

Re: [julia-users] Parallel Stochastic Gradient Descent

2014-06-09 Thread Christopher Fusting
John, There has been no rigorous testing yet. My primary concern in the averaging algorithm is process latency, completion time, and faults. Do you have specifics you would like to share? On Monday, June 9, 2014 11:24:24 AM UTC-4, John Myles White wrote: > > Very cool, Chris. > > I’ve done a

Re: [julia-users] Parallel Stochastic Gradient Descent

2014-06-09 Thread John Myles White
Very cool, Chris. I’ve done a lot of work on SGD in Julia, so I’m glad to see more. Regarding the averaging technique you’re using, have you done much testing to see how well it works? My sense is that the algorithm you’re using is a little brittle, but perhaps I’ve misunderstood it. — John

[julia-users] Re: Help with writing a macro to for fetch, process, store pattern

2014-06-09 Thread Andrew Simper
Yes thanks for pointing that out, but if you look at this thread I already got some help with the |> esc for this type of thing over on another thread https://groups.google.com/forum/#!topic/julia-users/UvBff9QVKaA , but I started this thread specifically to find out how to get write a macro usi

[julia-users] Re: Computing colors of molecules with Julia

2014-06-09 Thread Mike Innes
This is really cool. It looks like there are still some issues with syntax highlighting in these notebooks (breaking on triple quoted strings, highlighting unicode characters as errors for example) but this situation should improve greatly once my CodeMirror mode is ready for IJulia. On Monday

Re: [julia-users] packages with executable scripts

2014-06-09 Thread Stefan Karpinski
No, it wasn't a security concern, but more a question of whether a language package manager is the right way to install programs as well. Seems like people think it's an ok idea. On Mon, Jun 9, 2014 at 11:07 AM, Samuel Colvin wrote: > From a security point of view, my understanding is we're "ha

Re: [julia-users] Natural language processing in Julia

2014-06-09 Thread John Myles White
It would be great if somebody with experience with NLP took over leadership for JuliaText. I just can’t keep up with TextAnalysis.jl anymore. — John On Jun 9, 2014, at 3:13 AM, Milan Bouchet-Valat wrote: > Le dimanche 08 juin 2014 à 13:57 -0700, Matías Guzmán Naranjo a écrit : >> I am working

Re: [julia-users] packages with executable scripts

2014-06-09 Thread Samuel Colvin
>From a security point of view, my understanding is we're "hanging out to dry" anyway: a package can run a build script that could in theory do virtually anything the user could. If we accept that the of scripts you can choose to call doesn't seem that much more dangerous. Was security the rea

Re: [julia-users] packages with executable scripts

2014-06-09 Thread John Myles White
I agree with Kevin that installing command-line tools via package managers can be useful. — John On Jun 9, 2014, at 7:14 AM, Kevin Squire wrote: > I've found it useful. I've often installed python packages simply for the > scripts they include, and it's convenient that they are accessible

[julia-users] Computing colors of molecules with Julia

2014-06-09 Thread Jiahao Chen
I've started a blog showcasing a few IJulia notebooks I've been working on over the past few months. Currently the only published post is one of my most recent notebooks on using Color.jl to calculate colors of molecules

[julia-users] Re: Help with writing a macro to for fetch, process, store pattern

2014-06-09 Thread Nathaniel Nicandro
You can use the esc function that can introduce variables in the calling environment julia> type Point x y end julia> macro fetch(p) variables = quote x = $p.x

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 upg

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

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... ;-)

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, K

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] packages with executable scripts

2014-06-09 Thread Kevin Squire
I've found it useful. I've often installed python packages simply for the scripts they include, and it's convenient that they are accessible immediately from the command line. In contrast, the R packages I've used rarely provide self-contained scripts, and I've found it frustrating to download an

Re: [julia-users] Experimental package documentation package.

2014-06-09 Thread Mike Innes
writemime("text/html", md) is the best interface to use for outputting HTML. Honestly, though, I spent about twenty minutes on HTML output so it's going to be basic at best. Improvements are welcome, of course. On 9 June 2014 13:31, Michael Hatherly wrote: > Thanks. > > Is Markdown.html_inline

Re: [julia-users] packages with executable scripts

2014-06-09 Thread Stefan Karpinski
My question is if this is a good idea or not. I'm not really sure. On Mon, Jun 9, 2014 at 5:57 AM, Samuel Colvin wrote: > In python pip packages you can declare "bin" scripts which become > available in path to execute. It's a simple feature but it allows you to > use the system to distribute s

[julia-users] Re: Help with writing a macro to for fetch, process, store pattern

2014-06-09 Thread Andrew Simper
Yep, an automated way of doing that is exactly what I want. Here is an example structure that I want to fetch every member of before doing intensive numeric processing for an iterative solver: type CircuitModel v1::Float64 v5::Float64 v7::Float64 v2::Float64 v3::Float64 v

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

Re: [julia-users] negative power throws error

2014-06-09 Thread 'Stéphane Laurent' via julia-users
I agree that's cool like that. For fun try to approximate the Gauss hypergeometric series with Float. Even when the series is finite, it can fail.

Re: [julia-users] Experimental package documentation package.

2014-06-09 Thread Michael Hatherly
Thanks. Is Markdown.html_inline what I should be using to produce html output in a similar manner to terminal_print? On Monday, 9 June 2014 14:24:12 UTC+2, Mike Innes wrote: > > This is just because Markdown.jl didn't have a release – I don't know if > there's a way to depend on such packages a

Re: [julia-users] Experimental package documentation package.

2014-06-09 Thread Mike Innes
This is just because Markdown.jl didn't have a release – I don't know if there's a way to depend on such packages and/or arbitrary git repositories (if not perhaps we should have a way?). Adding Pkg.clone("Markdown") during the build step would work I guess. Anyway, I just pushed 0.1.0 so it shoul

Re: [julia-users] Experimental package documentation package.

2014-06-09 Thread Michael Hatherly
I've managed to get it to store the markdown parsed docs now and display them correctly. Travis is complaining that it can't find Markdown though. Should I be doing something different in my REQUIRE file? On Monday, 9 June 2014 12:23:56 UTC+2, Mike Innes wrote: > > Woops – yeah, terminal_print t

Re: [julia-users] negative power throws error

2014-06-09 Thread Milan Bouchet-Valat
Le lundi 09 juin 2014 à 04:41 -0700, 'Stéphane Laurent' via julia-users a écrit : > More seriously, are there really no case in Julia like that : > > > > Return float for negative b, integer otherwise ⟹ not > type-stable. > > > ? > > > Otherwise, a better solution is to retu

Re: [julia-users] negative power throws error

2014-06-09 Thread 'Stéphane Laurent' via julia-users
More seriously, are there really no case in Julia like that : *Return float for negative b, integer otherwise ⟹ not type-stable.* ? Otherwise, a better solution is to return Rational for negative, and Int for positive. Always returning Rational is not cool because we use positive numbers mor

Re: [julia-users] negative power throws error

2014-06-09 Thread 'Stéphane Laurent' via julia-users
That's why we need BigRational :) Le lundi 9 juin 2014 12:52:48 UTC+2, Ivar Nesje a écrit : > > A float is a binary fraction, and can not represent most decimal fractions > exactly. 0.1 is a famous example of a decimal fraction that can not be > rep

Re: [julia-users] negative power throws error

2014-06-09 Thread Ivar Nesje
A float is a binary fraction, and can not represent most decimal fractions exactly. 0.1 is a famous example of a decimal fraction that can not be represented exactly in binary, just like 1/3 is impossible to represent in decimal (0.3...) Rational can express many fractions e

Re: [julia-users] Experimental package documentation package.

2014-06-09 Thread Mike Innes
Woops – yeah, terminal_print takes a columns keyword argument. sprint(io -> Markdown.terminal_print(io, md, columns = 80)) On 9 June 2014 11:16, Michael Hatherly wrote: > Great, just pushed some other changes so I'll look into this later this > week. > Having a quick look though, sprint(Markdo

Re: [julia-users] Experimental package documentation package.

2014-06-09 Thread Michael Hatherly
Great, just pushed some other changes so I'll look into this later this week. Having a quick look though, sprint(Markdown.terminal_print, ans) strips out the line wrapping. Is there an easy way to retain that formatting in the string? On Monday, 9 June 2014 10:49:56 UTC+2, Mike Innes wrote: > >

Re: [julia-users] Natural language processing in Julia

2014-06-09 Thread Milan Bouchet-Valat
Le dimanche 08 juin 2014 à 13:57 -0700, Matías Guzmán Naranjo a écrit : > I am working on a library for doing corpus linguistics with Julia (out > of my frustration with python). It is mostly designed for my personal > needs, written in the little free time I have, and it isn't ready for > others t

[julia-users] packages with executable scripts

2014-06-09 Thread Samuel Colvin
In python pip packages you can declare "bin" scripts which become available in path to execute. It's a simple feature but it allows you to use the system to distribute simple "programs" as well as libraries. I can see there's no obvious way of providing the same functionality in julia, but if I

Re: [julia-users] Re: how to pass function as argument?

2014-06-09 Thread Mauro
Like so: *function func(ff::Function) * * ff(4) * *end * Note that functions have not a more specialised type as they do in some other languages, like for example (Int, Float64) -> (Float,), they are just a `Function`. > By the way what is the advantage of setting the type ? Is it only for "s

Re: [julia-users] Re: how to pass function as argument?

2014-06-09 Thread 'Stéphane Laurent' via julia-users
Ok but how to set the type in the declaration of the arguments ? *function func(ff::???) * * ff(4) * *end * By the way what is the advantage of setting the type ? Is it only for "safe programming" (I mean my code will generate an error if I specify the type and pass something having anothe

Re: [julia-users] negative power throws error

2014-06-09 Thread 'Stéphane Laurent' via julia-users
A Float is a decimal number, hence it also is a rational number : *2.243423592592582385923 = 2243423592592582385923 / 10* Hence, depending on the limitations about the sizes of the integers, the set Rational could be bigger than the set Float. In this case, the better appr

Re: [julia-users] Re: how to pass function as argument?

2014-06-09 Thread Mauro
That is to normal way to do it, except that your definition > ff(i::Int) = f2(i::Int) is not necessary. Just do julia> func(f2) 20.0 julia> func(f1) 40.0 Functions can just be passed around with their name, just like any other variable. The difference only comes once you add the `(...)` to it,

Re: [julia-users] Experimental package documentation package.

2014-06-09 Thread Mike Innes
I just fixed it up to work with n level headers – it should do everything you need it to now. Just to get you started, this will render the first docstring from docile.md: julia> Markdown.Block(Markdown.parse_file("/users/Mike/Documents/docile.md")[3:7]) julia> sprint(Markdown.terminal_print,