Re: [julia-users] Re: Input a data from the console

2016-10-28 Thread Ismael Venegas Castelló
IMO the parametric method with multiple dispatch is more Julian.

Re: [julia-users] Re: Trait for exactness of numbers

2016-10-27 Thread Ismael Venegas Castelló
arithmetic isn't exact (which is what really is > going on inside that code anyway---who cares what kind of number type it > is). > > Best, > --Tim > > On Tue, Oct 25, 2016 at 12:55 PM, Ismael Venegas Castelló < > ismael...@gmail.com > wrote: > >> Why not use di

[julia-users] Re: Input a data from the console

2016-10-27 Thread Ismael Venegas Castelló
""" `input(prompt::String="")::String` Read a string from STDIN. The trailing newline is stripped. The prompt string, if given, is printed to standard output without a trailing newline before reading input. """ function input(prompt::String = "")::String print(prompt) return

[julia-users] Re: Trait for exactness of numbers

2016-10-25 Thread Ismael Venegas Castelló
Why not use dispatch instead? isexact(::Integer) = true isexact(::Rational) = true isexact(x::Complex) = isexact(x.re) isexact(::Any) = false

[julia-users] Julia-i18n: Reviewers needed!

2016-10-23 Thread Ismael Venegas Castelló
Reviewers needed help us bring #JuliaLang website to your native language ...one string at a time! Kudos to Akis Vassiliadis for completing 33% of the Greek translations by himself and with that moving his language to the top of the list!

[julia-users] Re: prblem with space after "ś", "ć" ERROR: UnicodeError: invalid character index

2016-10-20 Thread Ismael Venegas Castelló
You can use collect(graphemes(s))[3], for example, see also this SO question and it's answers: http://stackoverflow.com/questions/39501900/truncate-string-in-julia/39505998#39505998

[julia-users] Re: Julia types newbie question

2016-10-19 Thread Ismael Venegas Castelló
You can do something like this: C:\Users\Ismael λ julia5 _

Re: [julia-users] Re: translating julia

2016-10-13 Thread Ismael Venegas Castelló
, please do let me know, thank you very much! Cheers! El lunes, 10 de octubre de 2016, 20:11:50 (UTC-5), Milan Bouchet-Valat escribió: > > (Sorry, this message was apparently blocked since Saturday. Sending it > again.) > > Le samedi 08 octobre 2016 à 07:59 -0700, Ismael V

[julia-users] Re: julia-i18n: Translators and reviewer needed!

2016-10-13 Thread Ismael Venegas Castelló
t until the issue >> is cleared. >> >> On Wednesday, October 5, 2016 at 6:22:41 PM UTC+3:30, Ismael Venegas >> Castelló wrote: >>> >>> Hello! I've asked for support to Transifex regarding the RTL issue and >>> how to fix it, I'll let you know

Re: [julia-users] Re: translating julia

2016-10-08 Thread Ismael Venegas Castelló
I'll leave this references here. Attract more contributors to i18n #428 https://github.com/JuliaLang/julialang.github.com/issues/428 Julia-i18n dashboard https://github.com/Julia-i18n/julia-i18n/projects/1

[julia-users] Re: translating julia

2016-10-08 Thread Ismael Venegas Castelló
ent status, and the reputation of all, not only of the Julia project, but also of the contributors that are willing to translate for us, remains intact and even become more positive. Think synergy! Regards, Ismael Venegas Castelló 2016-10-08 8:46 GMT-05:00 Milan Bouchet-Valat <>: > Hi!

[julia-users] Linux distributions with Julia >= 0.5.0

2016-10-08 Thread Ismael Venegas Castelló
Just do: sudo pacman -S julia And you are done! :D

[julia-users] Linux distributions with Julia >= 0.5.0

2016-10-08 Thread Ismael Venegas Castelló
I think you are looking for Arch Linux! https://www.archlinux.org/packages/community/x86_64/julia If you need a GUI and easy setup, there are se eral distros that come with a desktop and are based on Arch: https://wiki.archlinux.org/index.php/Arch_based_distributions#Desktop

[julia-users] Re: julia-i18n: Translators and reviewer needed!

2016-10-05 Thread Ismael Venegas Castelló
I have re applied the translations, just so everybody knows, translations are never, ever deleted, even if the original strings are somehow marked as ignored, even if the website endpoint is deleted, translations always stay stored. Please check out that page now, it should be fixed:

[julia-users] Re: julia-i18n: Translators and reviewer needed!

2016-10-05 Thread Ismael Venegas Castelló
Hello! I've asked for support to Transifex regarding the RTL issue and how to fix it, I'll let you know about their answer as soon as I get it. You can watch a tutorial I made about using Transifex for translation, I hope you find it useful, and ples let me know what do you think about it!

[julia-users] Re: julia-i18n: Translators and reviewer needed!

2016-10-05 Thread Ismael Venegas Castelló
Hello, I'm sorry for any trouble, I have reported this issue to Transifex, it may have been my fault, but I've been paying a lot of attention so this doesn't happen, but fear not, your translations are not lost, they were somehow misapplied, so I'm currently re applying them as I write this,

Re: [julia-users] Re: translating julia

2016-09-29 Thread Ismael Venegas Castelló
Ismael Venegas Castelló El jueves, 29 de septiembre de 2016, 2:19:46 (UTC-5), Henri Girard escribió: > > Hi Ismael, > > I would like to translate "home" first, but I noticed it's difficult to > find all text about it ? > > Is there a way to research a precise

Re: [julia-users] Re: translating julia

2016-09-28 Thread Ismael Venegas Castelló
t, please do not hesitate to contact me and I'll try to help you ASAP, thanks for your support in this project. Cheers, Ismael Venegas Castelló El miércoles, 28 de septiembre de 2016, 4:54:51 (UTC-5), Henri Girard escribió: > > I am wondering if one must write the html mark when translat

[julia-users] Re: translating julia

2016-09-28 Thread Ismael Venegas Castelló
I forgot to link the video I mentioned, oops here it is: *https://www.livecoding.tv/ismael-vc/videos/oyvBm-julia-language-website-i18n * Cheers El miércoles, 28 de septiembre de 2016, 2:49:32 (UTC-5), Henri Girard

[julia-users] Re: translating julia

2016-09-28 Thread Ismael Venegas Castelló
Venegas Castelló El miércoles, 28 de septiembre de 2016, 2:49:32 (UTC-5), Henri Girard escribió: > > I went to french translation startet to translate but can't see it on > julialang.org ? > it's not actualized ? > Regards >

Re: [julia-users] Re: Why does Julia 0.5 keep complaining about method re-definitions?

2016-09-28 Thread Ismael Venegas Castelló
Daniel indeed Suppressor provides the following macros: @suppress (will suppress both STDERR and STDOUT), @suppress_out (just STDOUT) and @suppress_err (just STDERR), notice that STDERR suppresses warnings but not errors! This can be easily understood reading code in the README: julia> using

[julia-users] Re: julia-i18n: Translators and reviewer needed!

2016-09-28 Thread Ismael Venegas Castelló
-language-website-i18n* Let me know what you guys think! [image: :smiley:] El jueves, 22 de septiembre de 2016, 1:32:13 (UTC-5), Ismael Venegas Castelló escribió: > > Looking how to contribute to Julia? Check out the web translation project > on Transifex. > Help us

[julia-users] Re: julia-i18n: Translators and reviewer needed!

2016-09-24 Thread Ismael Venegas Castelló
://www.transifex.com/julialang-i18n/julialang-web Contributing is very easy, you just need to register, explore the graphic interface a little bit and start translating. Help us bring Julia internationalization to your native language ...one string at a time! Cheers, Ismael Venegas Castelló El

[julia-users] Re: julia-i18n: Translators and reviewer needed!

2016-09-22 Thread Ismael Venegas Castelló
how this all works: - https://github.com/JuliaLang/julialang.github.com/issues/187 - https://github.com/JuliaLang/julialang.github.com/pull/252 As always if you have any doubt, please don't hesitate to ask and I will try to answer all your questions. Cheers, Ismael Venegas Castelló

[julia-users] Re: julia-i18n: Translators and reviewer needed!

2016-09-22 Thread Ismael Venegas Castelló
I forgot, you guys can see the staging domain here: - http://julialanges.github.io Please let me know what you think! El jueves, 22 de septiembre de 2016, 1:32:13 (UTC-5), Ismael Venegas Castelló escribió: > > Looking how to contribute to Julia? Check out the web translation p

[julia-users] Re: Julia for Data Science book (Technics Publications)

2016-09-14 Thread Ismael Venegas Castelló
I advice you to add a reference to your book, via a pull request to: - https://github.com/JuliaLang/julialang.github.com Which should go in this file: - https://github.com/JuliaLang/julialang.github.com/blob/master/learning/index.md El martes, 13 de septiembre de 2016,

Re: [julia-users] Re: Conda.jl needs a new maintainer

2016-09-06 Thread Ismael Venegas Castelló
Hello everyone! Viral I don't find the JuliaPy organization is it on github? There iare also Gettext.jl, Pandas.jl, GeographicLibPy.jl, PyLexYacc.jl, PyLogging.jl, PyX.jl and SGP4.jl as far as I can tell, plus from the ones Steven mentioned. El martes, 6 de septiembre de 2016, 9:42:08

Re: [julia-users] Re: Use reference of array comprehension internal variables?

2016-08-10 Thread Ismael Venegas Castelló
t64,Int64},1}: > (3,4,5) > (5,12,13) > (6,8,10) > (8,15,17) > (9,12,15) > (12,16,20) > > On Wed, Aug 10, 2016 at 12:58 PM, Ismael Venegas Castelló < > ismael...@gmail.com > wrote: > >> In order to be a little more specific I wanted to add, that it seems &

[julia-users] Re: Use reference of array comprehension internal variables?

2016-08-10 Thread Ismael Venegas Castelló
:00 (UTC-5), Ismael Venegas Castelló escribió: > > Is there a way to make reference of the internal variables of an array > comprehension? I'm trying to improve this Rosetta Code task: > > >- https://rosettacode.org/wiki/List_comprehensions#Julia > > > const n = 20

[julia-users] Use reference of array comprehension internal variables?

2016-08-10 Thread Ismael Venegas Castelló
Is there a way to make reference of the internal variables of an array comprehension? I'm trying to improve this Rosetta Code task: - https://rosettacode.org/wiki/List_comprehensions#Julia const n = 20 sort(filter(x -> x[1] < x[2] && x[1]^2 + x[2]^2 == x[3]^2, [(a, b, c) for a= 1:n, b=1:n,

[julia-users] Re: Fbls - a simple but flexible Julia DB

2016-04-26 Thread Ismael Venegas Castelló
what's up Fbls is an attempt at adding more degrees of freedom to the database paradigm, it's an itch I've been scratching for a while now. I'm all for standards as interfaces and theory as a starting point; but I'm drawing a line in the sand right here, the madness has to stop. All I ever

Re: [julia-users] How to print out the expression of a simple function

2016-04-26 Thread Ismael Venegas Castelló
Does the field code has a use for non anon funcs? I can see that the g.code object is a LambdaStaticData, so only for anon funcs. I was trying to understand the implementation differences. ​ Ismael Venegas Castelló *Data Analyst* Cel. 044 55 6434 0229 ivene...@richit.com.mx Cerro San

Re: [julia-users] How to print out the expression of a simple function

2016-04-26 Thread Ismael Venegas Castelló
29 (UTC-5), Ismael Venegas Castelló escribió: > > Why is `f.code` an `UndefRefError`? > > julia> f.code > > ERROR: UndefRefError: access to undefined reference > > > > El martes, 26 de abril de 2016, 18:27:50 (UTC-5), Yichao Yu escribió: >> >> On Tue

Re: [julia-users] How to print out the expression of a simple function

2016-04-26 Thread Ismael Venegas Castelló
Why is `f.code` an `UndefRefError`? julia> f.code ERROR: UndefRefError: access to undefined reference El martes, 26 de abril de 2016, 18:27:50 (UTC-5), Yichao Yu escribió: > > On Tue, Apr 26, 2016 at 6:39 PM, > wrote: > > I wonder how to print the expression of a

[julia-users] Re: How to change REPL mode on startup?

2016-04-22 Thread Ismael Venegas Castelló
You could achieve this behaviour by using an `@async` function and checking until `isdefined(Base,:active_repl)`, like so: function setup() @async while true if isdefined(Base,:active_repl) # enable LipsREPL LispREPL.initrepl(Base.active_repl) #

Re: [julia-users] Julia on Android (and/or the web) - a scientific calculator on steroids.. good for tablets

2016-03-10 Thread Ismael Venegas Castelló
about it in julia-opt or a > related place and intersted party can carry on there. > > On Thursday, March 10, 2016 at 6:38:37 AM UTC+2, Ismael Venegas Castelló > wrote: >> >> Here is a keep recap of what I've been able to achieve so far: >> >> * https://gitter.im/

Re: [julia-users] Julia on Android (and/or the web) - a scientific calculator on steroids.. good for tablets

2016-03-09 Thread Ismael Venegas Castelló
Here is a keep recap of what I've been able to achieve so far: * https://gitter.im/termux/termux?at=56e0f41a6fde057c26856001 El miércoles, 9 de marzo de 2016, 10:35:53 (UTC-6), Lutfullah

[julia-users] Re: JuliaCon 2016: Program Committee Office Hours on the 5th of March at 15:00 UTC

2016-03-02 Thread Ismael Venegas Castelló
Everyone, Here is the link to the JuliaCon 2016: Program Committee Office Hours, Google Hangout: - https://plus.google.com/events/cdjm6biluacltttiocv46e5s8mg Looking forward to hearing your ideas and seeing you at JuliaCon! On behalf of the JuliaCon 2016 organisers, Ismael Venegas

[julia-users] The Klopper Lectures - Video Tutorials!

2016-02-23 Thread Ismael Venegas Castelló
Hello everyone just wanted to let you know about this excellent videos I found today at YouTube. *The Klopper Lectures* by Dr. Juan Klopper: https://www.youtube.com/playlist?list=PLsu0TcgLDUiIznEhN165XmykqyLgzwY0Y Cheers! :D

[julia-users] equivalent of python's string.title() in julia

2016-02-05 Thread Ismael Venegas Castelló
I made this IJulia gist: bit.ly/JLTitle

[julia-users] equivalent of python's string.title() in julia

2016-02-05 Thread Ismael Venegas Castelló
You can do something like: title(s::AbstractString) = join([ucfirst(w) for w in split(s, ' ')], ' ')::typeof(s)

[julia-users] Re: Crashing REPL experimenting for macro aliases

2016-02-02 Thread Ismael Venegas Castelló
The macro alias is good, but the way you call it is not, instead like this: julia> eval(Expr(:macrocall, symbol("@m"), :(1+2))) Expr head: Symbol call args: Array(Any,(3,)) 1: Symbol + 2: Int64 1 3: Int64 2 typ: Any Also please do submit a bug report as the crash error

[julia-users] Re: Julia vs Clojure for Distributed Scientific Simulations

2016-01-27 Thread Ismael Venegas Castelló
s: * http://pkg.julialang.org * http://pkg.julialang.org/pulse.html * https://twitter.com/JuliaHeartbeat * https://github.com/svaksha/Julia.jl El miércoles, 27 de enero de 2016, 9:53:13 (UTC-6), Ismael Venegas Castelló escribió: > > How are you benchmarking the Julia code? If you share the microbenchmarks

[julia-users] Re: Julia vs Clojure for Distributed Scientific Simulations

2016-01-27 Thread Ismael Venegas Castelló
How are you benchmarking the Julia code? If you share the microbenchmarks you are doing, we can help you with that, the final decision is yours. Julia es actually a lot like lisp but with "normal" syntax, support for unicode (lots of mathematical symbols also) see: *

[julia-users] Re: Julia Benchmarks Feedback

2016-01-27 Thread Ismael Venegas Castelló
Native in this context means it's apure Julia implementation, ie. it's not calling an underliying C/Fortran library, see: * https://github.com/kostya/benchmarks/blob/master/matmul/matmul-native.jl It seems the author has updated the code to use @time, but it's still timing the JIT. I'll send

Re: [julia-users] Re: Julia Benchmarks Feedback

2016-01-27 Thread Ismael Venegas Castelló
compiling! @time main() end end test() El miércoles, 27 de enero de 2016, 14:25:01 (UTC-6), Stefan Karpinski escribió: > > Except that appears to be using Julia's * operator for Float64 arrays > which would call BLAS, no? > > On Wed, Jan 27, 2016 at 2:29 PM, Ismael V

[julia-users] Re: Julia Benchmarks Feedback

2016-01-27 Thread Ismael Venegas Castelló
but then again the benchmarks are flawed because other implementations are also timing the interpreters startup time. El martes, 26 de enero de 2016, 22:07:54 (UTC-6), George escribió: > > I was surprised to se the results on the following benchmarks: > https://github.com/kostya/benchmarks > >

[julia-users] Lies... and then benchmarks...

2016-01-26 Thread Ismael Venegas Castelló
Continues: https://github.com/JuliaLang/julia/issues/14808#event-527206420

[julia-users] Re: Lies... and then benchmarks...

2016-01-26 Thread Ismael Venegas Castelló
aster/base64/test.jl - https://github.com/kostya/benchmarks/blob/master/base64/run.sh#L25-L26 Let's continue this discussion at julia-users: - https://groups.google.com/forum/#!topic/julia-users/4AgBccftrps El martes, 26 de enero de 2016, 16:36:22 (UTC-6), Ismael Venegas Castelló escribió: &

[julia-users] Re: Lies... and then benchmarks...

2016-01-26 Thread Ismael Venegas Castelló
-promising-languages-of-2016 *@ylluminate*: that is just one opinion! ;) El martes, 26 de enero de 2016, 16:36:22 (UTC-6), Ismael Venegas Castelló escribió: > > Continues: https://github.com/JuliaLang/julia/issues/14808#event-527206420 >

[julia-users] Re: Lies... and then benchmarks...

2016-01-26 Thread Ismael Venegas Castelló
anuary 26, 2016 at 11:39:00 PM UTC+1, Ismael Venegas Castelló > wrote: >> >> @ylluminate <https://github.com/ylluminate> looking at the structure of >> the Julia programs, I can only see @kostya <https://github.com/kostya> is >> timing both Julia startup, the

[julia-users] Re: Lies... and then benchmarks...

2016-01-26 Thread Ismael Venegas Castelló
" > Ref: https://github.com/kostya/benchmarks/issues/9 > > > > On Wednesday, January 27, 2016 at 12:24:14 AM UTC+1, Ismael Venegas > Castelló wrote: >> >> I wondered the same first time I saw quine-relay! ...Yusuke is genius :D >> >> * https://github.com/mame/quin

[julia-users] Re: Lies... and then benchmarks...

2016-01-26 Thread Ismael Venegas Castelló
eans "left" > > > > On Wednesday, January 27, 2016 at 12:24:14 AM UTC+1, Ismael Venegas > Castelló wrote: >> >> I wondered the same first time I saw quine-relay! ...Yusuke is genius :D >> >> * https://github.com/mame/quine-relay >> >> El martes

[julia-users] Re: Expression object for "unquote"

2016-01-18 Thread Ismael Venegas Castelló
That's because in the case of expressions, we are interested in the AST, show representation is just an abstraction of that, there is also dump and xdump: julia> ex = :(:($x)) :($(Expr(:quote, :($(Expr(:$, :x)) julia> Meta.show_sexpr(ex); println() (:quote, (:$, :x)) julia> dump(ex) Expr

[julia-users] ANN: Lisp.jl gitter chat room online!

2016-01-09 Thread Ismael Venegas Castelló
Come join us, welcome everybody! :D * https://gitter.im/swadey/Lisp.jl

[julia-users] Re: ANN: Lisp.jl gitter chat room online!

2016-01-09 Thread Ismael Venegas Castelló
S-Expressions for Julia! * https://en.wikipedia.org/wiki/S-expression El sábado, 9 de enero de 2016, 10:21:20 (UTC-6), Ismael Venegas Castelló escribió: > > Come join us, welcome everybody! :D > > * https://gitter.im/swadey/Lisp.jl >

[julia-users] Re: Juliabox cannot start after Pkg.add (unlink error in read-only file system)

2016-01-06 Thread Ismael Venegas Castelló
Point releases are being taged monthly! ;-) El martes, 5 de enero de 2016, 20:58:17 (UTC-6), David Gleich escribió: > > Thanks for that! I figured someone else must have run into this but my > googling and searching efforts were in vain! > > Is the time-frame for the next release imminent? I was

Re: [julia-users] Why SimpleVector / svec?

2016-01-06 Thread Ismael Venegas Castelló
, 9:09:08 (UTC-6), Matt Bauman escribió: > > On Tuesday, January 5, 2016 at 3:23:14 AM UTC-5, Ismael Venegas Castelló > wrote: > >> Why force `methods` to work with anything? >> > > Because you can call anything: > > julia> call(x::Char) = x+1 > call (generic

Re: [julia-users] Why SimpleVector / svec?

2016-01-05 Thread Ismael Venegas Castelló
thus not intended as a datatype > for public consumption. Still, they should get some documentation as > one can stumble upon them. Github may be able to tell you more. > > On Tue, 2016-01-05 at 06:08, Ismael Venegas Castelló <ismael...@gmail.com > > wrote: > > >

[julia-users] Re: Overriding the = operator

2016-01-05 Thread Ismael Venegas Castelló
You could use another similar operator like \coloneq: julia> ≔(var, block) = @eval $var = $block ≔ (generic function with 1 method) julia> @show :foo ≔ "some foo"; foo :foo ≔ "some foo" = "some foo" "some foo" julia> @show :foo ≔ 42; foo :foo ≔ 42 = 42 42 julia> macro ≔(v, b) e =

Re: [julia-users] Why does the subtypes method produce an array rather than a set?

2016-01-04 Thread Ismael Venegas Castelló
After watching the video: *Jeff Bezanzon: Julia - The base language, future directions and speculations *as Scott mentions, returning a Union type indeed starts to make sense to me. El sábado, 2 de enero de 2016, 13:09:43 (UTC-6), Scott Jones

[julia-users] Re: Why SimpleVector / svec?

2016-01-04 Thread Ismael Venegas Castelló
ns like (args::types) = __(args). So it would be possible to extend such functions. El lunes, 4 de enero de 2016, 23:08:52 (UTC-6), Ismael Venegas Castelló escribió: > > >- What exactly are these SimpleVectors? >- Why show them as svec? >- What's their purpose? >

[julia-users] Why SimpleVector / svec?

2016-01-04 Thread Ismael Venegas Castelló
- What exactly are these SimpleVectors? - Why show them as svec? - What's their purpose? - How to use SimpleVector constructor manually, without using Core.svec? They are not documented at all. All I understand is that they are svec is not generic but "intrinsic" /

[julia-users] Re: Why SimpleVector / svec?

2016-01-04 Thread Ismael Venegas Castelló
This would also allow to use @which, `methods` and other reflection functions. El lunes, 4 de enero de 2016, 23:25:29 (UTC-6), Ismael Venegas Castelló escribió: > > I feel we should either differentiate them or integrate them better, they > are not listed anywhere, Steffan

[julia-users] Re: Pipe operator and functions with multiple arguments

2015-12-29 Thread Ismael Venegas Castelló
Hi Adrian, that's the way it works now for now, single-input single-output functions only, |> may be even deprecated in the future since type inference doesn't work well at all for now, it's going to be removed from Base it seems. Currying/function chaining has been discussed a lot at GitHub.

[julia-users] Re: Pipe operator and functions with multiple arguments

2015-12-29 Thread Ismael Venegas Castelló
My proposal in the PR is: julia> show_off(x, y) = (@show x y; nothing) show_off (generic function with 1 method) julia> show_off(1, 2) x = 1 y = 2 julia> (1, 2) |> show_off ERROR: MethodError: `show_off` has no method matching show_off(::Tuple{Int64,Int 64}) Closest candidates are:

[julia-users] Re: Escher File Upload

2015-12-29 Thread Ismael Venegas Castelló
Hi! I just hanted to point out that there is also an active Escher chat room here: * https://gitter.im/shashi/Escher.jl El martes, 29 de diciembre de 2015, 10:24:33 (UTC-6), Brandon Miller escribió: > > I am wanting to implement a form for file uploads. There does not appear > to be any

[julia-users] Re: strange behavior with float value multiplication

2015-12-28 Thread Ismael Venegas Castelló
You can see the binary representation of those `Float64`s with the `bits` function: julia> for i in 1:10 @show bits(a * i) end bits(a * i) = "00001001100110011001100110011001100110011001100110011010" bits(a * i) =

Re: [julia-users] Why does the subtypes method produce an array rather than a set?

2015-12-28 Thread Ismael Venegas Castelló
;>>>> >>>>> I would expect a very good reason in order to justify a change for >>>>> this now. >>>>> ​ >>>>> >>>>> 2015-12-27 18:06 GMT-06:00 Kevin Squire >>>>> >>>>>> Ray, thanks for

[julia-users] Re: Why does the subtypes method produce an array rather than a set?

2015-12-27 Thread Ismael Venegas Castelló
You can just do: @assert subtypes(Type) == [DataType, TypeConstructor, Union] I just tested this: julia> @time for i in 1:1000 @assert subtypes(Type) == [DataType, TypeConstructor, Union] end 3.025415 seconds (767.00 k allocations: 224.075 MB, 0.49% gc time) El sábado, 26

[julia-users] Does any one have Raspberry Pi 2 Julia binaries?

2015-12-27 Thread Ismael Venegas Castelló
has anyone successfully built Julia for Raspberry Pi 2? I understand that it's able to build now. If anyone has been able to do this ...could you share your binary? I'm building it right now, but it seems it's going to take ages, and I have yet to see it fail or not! I want to build a

[julia-users] Re: Why does the subtypes method produce an array rather than a set?

2015-12-27 Thread Ismael Venegas Castelló
I just tested and the output seems to be deterministically ordered: julia> x = map(string, subtypes(Any)); julia> y = sort!(map(string, subtypes(Any))); julia> x == y true El sábado, 26 de diciembre de 2015, 12:52:51 (UTC-6), Ray Toal escribió: > > I noticed that > > *julia>

Re: [julia-users] Nongeneric functions

2015-12-27 Thread Ismael Venegas Castelló
s (such as numbers) by contents at the bit level. This function is sometimes called egal. .. ===(x, y) ≡(x,y) See the :func:`is` operator El domingo, 27 de diciembre de 2015, 14:59:31 (UTC-6), Ismael Venegas Castelló escribió: > > So `is` is a builtin anony

Re: [julia-users] Nongeneric functions

2015-12-27 Thread Ismael Venegas Castelló
> Perhaps, but all of this is going to change fairly soon. Why is this > information useful? > > On Sun, Dec 27, 2015 at 4:03 PM, Ismael Venegas Castelló < > ismael...@gmail.com > wrote: > >> We could use something like this: >> >> julia> isbuiltin(x) = in

[julia-users] Re: passing function as arguments and avoiding unecessary allocations

2015-12-27 Thread Ismael Venegas Castelló
Alan please don't double post the same question: https://groups.google.com/forum/#!topic/julia-users/2AoQQKVP2Do It makes it difficult to follow the thread, thanks! El domingo, 27 de diciembre de 2015, 11:21:35 (UTC-6), alan souza escribió: > > Hi. I was wondering what is the correct way to

Re: [julia-users] Nongeneric functions

2015-12-27 Thread Ismael Venegas Castelló
ield! :svec :throw :tuple :typeassert :typeof El domingo, 27 de diciembre de 2015, 15:03:04 (UTC-6), Ismael Venegas Castelló escribió: > > We could use something like this: > > julia> isbuiltin(x) = in(symbol(x), builtins()) > isbuiltin (generic function with 1 method) > &

Re: [julia-users] Nongeneric functions

2015-12-27 Thread Ismael Venegas Castelló
So `is` is a builtin anonymous function? julia> Base.function_name(is) :anonymous Stefan perhaps we should add a builtins function to inference.jl? Indeed it's not obvious at all! julia> function builtins() nams = filter(s -> isdefined(Base, s), names(Base, true, true))

[julia-users] Re: How to avoid extra allocations when passing a function as parameter

2015-12-27 Thread Ismael Venegas Castelló
For calcF your variables: Variables: X::Array{Float64,1} F::F n::Int64 y::Array{Float64,1} #s76::Int64 i::Int64 ##dims#7321::Tuple{Int64} and return value: return y::Array{Float64,1} end::Array{Float64,1} Are correctly inferred if I use floats so it seems fine. But if I use

Re: [julia-users] Does any one have Raspberry Pi 2 Julia binaries?

2015-12-27 Thread Ismael Venegas Castelló
Thank you Milan I will test this ASAP :D El domingo, 27 de diciembre de 2015, 16:46:45 (UTC-6), Milan Bouchet-Valat escribió: > > Le dimanche 27 décembre 2015 à 11:47 -0800, Ismael Venegas Castelló a > écrit : > > has anyone successfully built Julia for Raspberry Pi

Re: [julia-users] Does any one have Raspberry Pi 2 Julia binaries?

2015-12-27 Thread Ismael Venegas Castelló
I just found this Rpi Emulator (I don't want to hinder the build process in my Rpi2 rigth now), but it dosen't say which Rpi it's emulating. * http://sourceforge.net/projects/rpiqemuwindows El domingo, 27 de diciembre de 2015, 17:05:05 (UTC-6), Ismael Venegas Castelló escribió: > > Tha

[julia-users] Re: What is the best way to convert Int64 to Int8 in DataArray

2015-12-25 Thread Ismael Venegas Castelló
Min-Woong you could use convert, it works with NAs and you still get an error for free if conversion is not possible: julia> df = DataFrame(x = @data [1,2,3, NA, typemax(Int8)]) 5x1 DataFrames.DataFrame | Row | x | |-|-| | 1 | 1 | | 2 | 2 | | 3 | 3 | | 4 | NA | | 5 |

[julia-users] Re: What is @d?

2015-12-24 Thread Ismael Venegas Castelló
Erick If you've found out by now what that macro does, you could send a PR with a docstring for it! Something like: "Creates a typed dictionary." macro d(xs...) @cond if VERSION < v"0.4-" Expr(:typed_dict, :(Any=>Any), map(esc, xs)...) else :(Dict{Any, Any}($(map(x->esc(prockey(x)),

[julia-users] Re: Getting the last match for a regular expression in a string

2015-12-24 Thread Ismael Venegas Castelló
Where s is: julia> s = "1.ts, 2.ts, , 00xyz.ts" "1.ts, 2.ts, , 00xyz.ts" El jueves, 24 de diciembre de 2015, 18:57:05 (UTC-6), Ismael Venegas Castelló escribió: > > Is something like this what you are looking for? > > julia> mat

[julia-users] Re: Getting the last match for a regular expression in a string

2015-12-24 Thread Ismael Venegas Castelló
Is something like this what you are looking for? julia> matchall(r"(\d+?.+?\.ts)", s) 3-element Array{SubString{UTF8String},1}: "1.ts" "2.ts" "00xyz.ts" El jueves, 24 de diciembre de 2015, 12:30:52 (UTC-6), Douglas Bates escribió: > > Short version: > > I have a string that

[julia-users] Re: What is the best way to convert Int64 to Int8 in DataArray

2015-12-24 Thread Ismael Venegas Castelló
Yichao, why is it bad idea to splat? Is it not performant? El jueves, 24 de diciembre de 2015, 5:02:14 (UTC-6), Min-Woong Sohn escribió: > > I want to reduce the amount of memory used by a dataframe that has lots of > binary variables. What is the best way to achieve this? For example, how >

[julia-users] Re: What is the best way to convert Int64 to Int8 in DataArray

2015-12-24 Thread Ismael Venegas Castelló
Something like this: julia> df = DataFrame(x = Int[1:10; typemax(Int8)]); julia> eltype(df[:x]) Int64 julia> df[:x] = Int8[df[:x]...]; julia> eltype(df[:x]) Int8 julia> df = DataFrame(x = Int[1:10; typemax(Int8) + 1]); julia> eltype(df[:x]) Int64 julia> df[:x] = Int8[df[:x]...]; ERROR:

[julia-users] Re: What's in your .juliarc.jl file?

2015-12-23 Thread Ismael Venegas Castelló
I have found this ones at Gist: * https://gist.github.com/search?l=julia=.juliarc.jl=searchresults=%E2%9C%93 This one is aslo in my .juilarc.jl nowadays ...a total life saver! XD "https://xkcd.com/303; nethack() = run(`telnet nethack.alt.org`) El miércoles, 23 de diciembre de 2015, 14:38:44

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

2015-12-16 Thread Ismael Venegas Castelló
julia> type Foo{T<:Number} x::Vector{T} end julia> ops = [+, -, *, /] 4-element Array{Function,1}: + - * / julia> syms = [symbol(op) for op in ops] 4-element Array{Any,1}: :+ :- :* :/ julia> for sym in syms dot_sym = symbol(".$sym")#

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

2015-12-16 Thread Ismael Venegas Castelló
You could also use a macro: module MetaFoo export Foo, ops, @foo_op type Foo{T<:Number} x::Vector{T} end const ops = [+, -, *, /] const syms = [symbol(op) for op in ops] for sym in syms dot_sym = symbol(".$sym") docstr = "`$sym` also works for `Foo` types!" @eval begin

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

2015-12-16 Thread Ismael Venegas Castelló
It's nice how does @show works! It returned a tuple because I made a mistake, without it, it looks like this: julia> macro foo_op(op) quote dot_op = symbol(".$($op)") docstr = "`$($op)` also works for `Foo` types!" @show $op typeof($op)

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

2015-12-16 Thread Ismael Venegas Castelló
Thanks to Michael's example, I did this other version of the macro: julia> type Foo{T<:Number} x::Vector{T} end julia> macro foo_op(op) quote dot_op = symbol(".$($op)") docstr = "`$($op)` also works for `Foo` types!"

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

2015-12-16 Thread Ismael Venegas Castelló
I didn't know of "$($x)" to interpolate inside stirng inside expresion, thanks! This also works: macro foo_op(op) quote 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))

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

2015-12-16 Thread Ismael Venegas Castelló
I haven't been able to figure out how to make it work inside a for loop though: julia> for op in [+, -] @foo_op op end ERROR: UndefVarError: op not defined [inlined code] from none:5 in anonymous at no file:0 julia> macro foo_op(op) quote dot_op =