Re: [julia-users] Implementing compilers or interpreters in Julia?

2016-09-22 Thread Isaiah Norton
Any answer if going to be fairly opinion-based. That said, here are some opinions :) some advantages: - interactive development - performance - Cxx.jl, if you want to target LLVM - multiple dispatch some disadvantages: - lack of ML-style pattern-matching -- though multiple dispatch on node type c

Re: [julia-users] Re: Dict get destroys global variable?

2016-09-22 Thread Isaiah Norton
Use `global a = ...` Please see: http://docs.julialang.org/en/latest/manual/variables-and-scoping/#hard-local-scope global variables are only inherited for reading but not for writing On Fri, Sep 23, 2016 at 12:00 AM, K leo wrote: > Sorry, this is not related to Dict at all. If I replace th

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

2016-09-25 Thread Isaiah Norton
Is there a reason to use this file format over NRRD [1]? To borrow a wise phrasing: I wonder if the world needs another lightweight raw data format ;) For what it's worth, NRRD is already supported by JuliaIO/Images.jl, and I believe addresses the use-cases identified in your readme, but with a nu

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

2016-09-26 Thread Isaiah Norton
Thanks for the response. 1. I don't think NRRD is as substantially used as you might think. I've > worked in imaging science for years on the data processing/file format end, > and I've never seen anyone use it, and I've never even heard of it. (Pity, > because it looks nice enough. :-\) I thin

Re: [julia-users] jl_cstr_to_string() variant for wchar_t*

2016-10-03 Thread Isaiah Norton
The 'LegacyStrings' package has functions to convert utf16 (and utf32) strings. On Mon, Oct 3, 2016 at 4:03 AM, Ján Adamčák wrote: > Hi, > > Is there any version of > > jl_cstr_to_str() > > for use with wchar_t*? > > I try create a small wrapper processing windows wchar_t strings to Julia > stri

Re: [julia-users] Simple test functions generates different codegen

2016-10-04 Thread Isaiah Norton
These expressions are lowered differently because `test2` gets a temporary due to the conditional reassignment of `u`, whereas `test1` is just a straight line switch and jump (look at `code_lowered` and `code_typed`). For the same C code, the lowered IR from Clang looks similar, but it appears to

Re: [julia-users] Embedding Julia in C++ - Determining returned array types

2016-10-14 Thread Isaiah Norton
On Fri, Oct 14, 2016 at 2:28 PM, Kyle Kotowick wrote: > > > After determining that an array was returned, how would you determine what > the inner type of the array is (i.e. the type of the objects it contains)? > `jl_array_eltype` > > And furthermore, if it returns an array of type "Any", woul

Re: [julia-users] Does julia -L work with plots?

2016-10-14 Thread Isaiah Norton
Call `show()` at the end of the script. See explanation here: https://github.com/JuliaPy/PyPlot.jl#non-interactive-plotting On Fri, Oct 14, 2016 at 1:17 PM, Stefan Rigger wrote: > > > Hello everyone, > > I'm using julia to numerically solve partial differential equations and > use PyPlot to plo

Re: [julia-users] Embedding Julia in C++ - Determining returned array types

2016-10-18 Thread Isaiah Norton
The issue here is that `jl_array_eltype` is already returning a type. `jl_typeis(v, t)` becomes `jl_typeof(v) == t`, so your checks become: jl_typeof(array_type) == jl_int64_type But jl_typeof(array_type) -> DataType Instead, either do the equality check directly: array_type == jl_i

Re: [julia-users] Embedding Julia in C++ - Determining returned array types

2016-10-19 Thread Isaiah Norton
e.g. http://half.sourceforge.net/ But if you aren't sure you need to support this, then just throw an error (Float16 is relatively new and AFAICT only useful in specialized applications because of the precision limit, which is why support is rare) If you are sure you (a) need it but (b) only need

Re: [julia-users] Re: Eval without JIT

2016-10-20 Thread Isaiah Norton
There is a startup option that controls this: `--compile=off` (internally corresponds to `jl_options.compile_enabled`). I don't think there is a function to modify the value at runtime. However, some types of statements are not currently supported by the interpreter, so this is not really feasible

Re: [julia-users] Named for loops?

2016-10-24 Thread Isaiah Norton
On Monday, October 24, 2016, Angel de Vicente < angel.vicente.garr...@gmail.com> wrote: > Hi, > > I don't see it in the documentation, but I'm wondering if there is a way > to have named nested loops, so that one can specify those names to break > and continue, in order to have more control. > > I

Re: [julia-users] Arrays with custom indices examples?

2016-10-24 Thread Isaiah Norton
> > mg = zeros(Int,(0:4,0:4)) This isn't related to indexing -- it doesn't work with `1:4` either. Use: zeros(Int, 4, 4) (See also the help entry: `?zeros`) That said, be aware of the warnings in the referenced document: this feature is still considered experimental, so if you hit other issu

Re: [julia-users] computation on types in type definition

2016-10-26 Thread Isaiah Norton
> > However, if I want to compute types directly in the definition (see third > implementation), I end up with a TypeVar object I don't know how to deal > with (even though I read the "More about types" section in the manual, > sorry). Is this even possible? Not yet: https://github.com/JuliaLang/

Re: [julia-users] Re: CoinOptServices

2016-10-26 Thread Isaiah Norton
> > Something is preventing the lapack dll from being overwritten on your > system. Try Process Explorer ( https://technet.microsoft.com/en-us/sysinternals/processexplorer.aspx) "Find" menu -> "Find a Handle or DLL" search for "liblapack" and look at what process owns the handle. On Wed, O

Re: [julia-users] Re: CoinOptServices

2016-10-26 Thread Isaiah Norton
> > Process Explorer does not indicate that lapack is being run when the > problem occurs. Does Find -> Find a Handle or DLL -> "liblapack" Return any results? The goal is to look for any open handle to "liblapack.dll", which would lead to the "Can not delete" error indicated in the posted err

Re: [julia-users] cscope like tool

2016-10-26 Thread Isaiah Norton
I don't think so, but Lint.jl might be of interest: https://github.com/ tonyhffong/Lint.jl On Wed, Oct 26, 2016 at 8:56 AM, Ajay Mendez wrote: > Looking for a tool to grok large projects, a la cscope. > methods(method_name) is good but insufficient. For those unfamiliar with > cscope, it allows

Re: [julia-users] Re: CoinOptServices

2016-10-26 Thread Isaiah Norton
Other suggestion: try temporarily (re)moving that file (`%/liblapack.dll`). I wonder if Julia itself is opening the dll for some reason, before WinRPM tries to replace it. (check again with Process Explorer while Julia is still running?) On Wed, Oct 26, 2016 at 12:22 PM, Frank Kampas wrote: > >

Re: [julia-users] automatically moving from cmake 3.6.1 to cmakex.y.z

2016-10-27 Thread Isaiah Norton
> > Thanks! is there a way of doing it automatically and recursively until it > finds the appropiate CMakeLists.txt file so I do not have to trawl for it? in > addition, as it seems pretty simple I am surprised this does not happen > ‘automagically’. The generated Makefiles have absolute, symlin

Re: [julia-users] automatically moving from cmake 3.6.1 to cmakex.y.z

2016-10-27 Thread Isaiah Norton
perhaps three... set(number_problems 3 FORCE CACHE PARENT_SCOPE) I think I saw an issue about this some time https://github.com/JuliaLang/julia/pull/11754 On Thu, Oct 27, 2016 at 9:56 AM, Bart Janssens wrote: > > On Thu, Oct 27, 2016 at 3:24 PM Isaiah Norton > wrote: > >

Re: [julia-users] Re: MersenneTwister, srand

2016-10-28 Thread Isaiah Norton
http://docs.julialang.org/en/latest/stdlib/numbers/?highlight=global_rng#random-numbers On Fri, Oct 28, 2016 at 1:23 PM, digxx wrote: > With number in my head I meant, that I expected to see random number > arrays of size 624 since as far as I know they are created > simultaneously,right? >

Re: [julia-users] Re: MersenneTwister, srand

2016-10-28 Thread Isaiah Norton
> > So what is the difference between srand and merseentwister? Per doc link, srand uses MT by default. and also how do I get my random numbers rand() for floats less than 1 by default, or specify a set to choose from: help?> rand search: rand randn rand! randn! randexp randperm randjump rand

Re: [julia-users] Parameteric Function of Types

2016-10-28 Thread Isaiah Norton
On Fri, Oct 28, 2016 at 12:07 PM, Derek Gaston wrote: > I can't quite seem to get the right syntax for creating methods that are > keyed off of subtypes (as a parameter). > > Say I have: > > abstract foo > abstract bar <: foo > > I want to create a function that is like so: > > function doStuff(:

Re: [julia-users] Re: so many plotting packages

2016-10-28 Thread Isaiah Norton
> > the julia community would benefit by collecting all these packages in one > place. > There are only 3 or 4 of those packages that should be recommended for general use. If someone wants to help users decide what package to use, write up a comparison page with examples. It could be linked from

Re: [julia-users] Gallium: how to remove a breakpoint?

2016-10-29 Thread Isaiah Norton
`Gallium.remove(Gallium.breakpoints[1])` On Sat, Oct 29, 2016 at 9:09 AM, Florian Oswald wrote: > hi all, > > i have got a rather simple question but can't figure it out: > > https://github.com/Keno/Gallium.jl/issues/166 > > thanks >

Re: [julia-users] Quote-friendly way to express keyword Expr?

2016-10-30 Thread Isaiah Norton
Not really clear what you are trying to do. These are inserted by the parser whenever keyword arguments are used in (function) call syntax. So: julia> quote f(x= 10) end |> dump Expr head: Symbol block args: Array{Any}((2,)) 1: Expr head: Symbol line args: Array{Any}((2,))

Re: [julia-users] building julia 0.5.0 on FreeBSD 11

2016-10-30 Thread Isaiah Norton
Just guessing here from some quick poking around: try adding `#include ` to that file (`OPENBLAS_SRC/driver/others/blas_server.c`). On Sat, Oct 29, 2016 at 4:50 PM, Kostas Oikonomou < kostas.oikonomo...@gmail.com> wrote: > Hi, I'm following the instructions in the README, trying to build 0.5.0 >

Re: [julia-users] Cannot PyPlot / Matplotlib broken (warnings about font cache?)

2016-11-02 Thread Isaiah Norton
> > Ok. So first of all, PyPlot is grabbing the system-wide installation of > Python. I don't know how to tell PyPlot to look at the one that was > installed with the Conda package. https://github.com/JuliaPy/PyCall.jl#specifying-the-python-version To force Julia to use its own Python distributi

Re: [julia-users] Re: Sys.CPU_CORES

2016-11-02 Thread Isaiah Norton
> > it returns the same concept in all OS? As far as I can tell, yes. > Is it physical number of cores? Number of logical processors. On Wed, Nov 2, 2016 at 9:42 PM, Júlio Hoffimann wrote: > My question is, it returns the same concept in all OS? Is it physical > number of cores? > > -Júlio

Re: [julia-users] Re: Sys.CPU_CORES

2016-11-02 Thread Isaiah Norton
Ref: https://github.com/JuliaLang/julia/issues/13901 On Wed, Nov 2, 2016 at 10:33 PM, Isaiah Norton wrote: > it returns the same concept in all OS? > > > As far as I can tell, yes. > > >> Is it physical number of cores? > > > Number of logical processors. &

Re: [julia-users] Re: Hide and disable REPL

2016-11-03 Thread Isaiah Norton
Can you explain the setup further -- Where is the REPL running? How are you interacting with it? If I take "I want to temporarily switch the REPL off, i.e. it should visually disappear" literally then it seems like a strange thing to do, so I may be missing something If you *do* want to hide the t

Re: [julia-users] How to enter a file using gallium?

2016-11-21 Thread Isaiah Norton
> > Any other means without resorting to breakpoints?? Use `@enter function_to_debug( ... )` with the value of A that you are interested in. On Mon, Nov 21, 2016 at 6:30 AM, wrote: > Bump up for the following question: > > Suppose I have the following code where the variable A is defined multi

Re: [julia-users] How to enter a file using gallium?

2016-11-21 Thread Isaiah Norton
If breakpoints aren't working, I would suggest to your push object(s) of interest into a global Vector{Any} and then debug with `@enter`. On Mon, Nov 21, 2016 at 11:00 AM, wrote: > Well, if A is a complicated object/structure, it'll be almost impossible > to first make up an A and call @enter fu

Re: [julia-users] macros using global variables problem

2015-01-14 Thread Isaiah Norton
You need to use 'esc' -- see the hygiene part of the metaprog section in the manual. On Jan 14, 2015 8:56 AM, "yi lu" wrote: > Hi, > > I am able to write a simple macro to drop brackets. > https://gist.github.com/eccstartup/36637d96355bd5ca8188 > > But there is some problem with this. > > You can

Re: [julia-users] macros using global variables problem

2015-01-14 Thread Isaiah Norton
t I want to reference the global > variable out of the macro. I have little idea of Lisp macros, so I think I > still cannot handle this. > Would you please add more details? > > Yi > > On Wed, Jan 14, 2015 at 11:37 PM, Isaiah Norton > wrote: > >> You need to use &

Re: [julia-users] help piping julia script in shell

2015-01-14 Thread Isaiah Norton
isaiah@titan:/tmp$ cat t3.jl x = readline(STDIN) println("input was: ", x) isaiah@titan:/tmp$ echo "hello" | julia t3.jl input was: hello On Wed, Jan 14, 2015 at 5:19 AM, wrote: > Hi, > > I have written different scripts in julia for which the input is so far a > file provided as an argument. T

Re: [julia-users] Facebook Open Sources Torch (Deep Learning Library)

2015-01-16 Thread Isaiah Norton
Torch has been around in various incarnations since ~2002, and the LuaJIT version (Torch7) was released in 2011. I think the big news here is the release of a set of Facebook-originated libraries deep learning libraries: https://research.facebook.com/blog/879898285375829/fair-open-sources-deep-lea

Re: [julia-users] Execute a function with a timeout / time limit?

2015-01-16 Thread Isaiah Norton
Have you tried using tasks with start_timer and interrupt? On Tue, Jan 13, 2015 at 7:42 AM, Robert Feldt wrote: > Is there any way to run a function a maximum time without adding > additional procs? I now use an implementation based on this StackOverflow > answer: > > > http://stackoverflow.com/

Re: [julia-users] What's your favourite editor?

2015-01-17 Thread Isaiah Norton
Juno: http://junolab.org/ (personally I still use vim most of the time, but I like Juno very much, and many others recommend it) On Sat, Jan 17, 2015 at 2:33 PM, Christoph Ortner < christophortn...@gmail.com> wrote: > I agree on Emacs , though there is a long thread here somewhere on light > tab

Re: [julia-users] Send composite type to C and get it back

2015-01-18 Thread Isaiah Norton
- if you want to pass a pointer to the *complete* Julia type, including the type tag, use pointer_from_objref. From the manual: Julia values v can be converted to jl_value_t*pointers, as Ptr{Void}, by > calling pointer_from_objref(v). - if you want to pass a pointer to a C-compatible struct, tel

Re: [julia-users] Send composite type to C and get it back

2015-01-18 Thread Isaiah Norton
s C-compatible (provided isbits(T) == true) On Sun, Jan 18, 2015 at 10:12 AM, Isaiah Norton wrote: > - if you want to pass a pointer to the *complete* Julia type, including > the type tag, use pointer_from_objref. From the manual: > > Julia values v can be converted to jl_value_t*p

Re: [julia-users] Package installation on a Windows machine?

2015-01-18 Thread Isaiah Norton
If Jiahao's suggestion does not work, there may be a permissions issue with your home directory. In particular, we have seen this kind of error when a user's home directory is located on a managed network drive without write permission. You can get around this by setting an environment variable JUL

Re: [julia-users] Send composite type to C and get it back

2015-01-18 Thread Isaiah Norton
Milan Bouchet-Valat wrote: > Le dimanche 18 janvier 2015 à 10:15 -0500, Isaiah Norton a écrit : > > I should also emphasize the difference: pointer_from_objref returns a > > jl_value_t*, which includes the type tag found at the beginning of all > > (well, most) Julia value in

Re: [julia-users] disable @inbounds in tests?

2015-01-18 Thread Isaiah Norton
julia --check-bounds=yes On Sun, Jan 18, 2015 at 11:37 PM, Sheehan Olver wrote: > Is there a way to disable @inbounds in tests? I made a change that's > causing a segfault, and can't figure out where the error is. >

Re: [julia-users] Freeing XMLElement from LightXML.jl? (Mem leak problem)

2015-01-26 Thread Isaiah Norton
The underlying XMLNode needs to be freed using xmlFreeNode from libxml2: http://xmlsoft.org/html/libxml-tree.html#xmlFreeNode I don't think this is wrapped yet, but it should be straightforward to add -- ideally, called via a finalizer so that the objects are freed automatically when Julia decide

Re: [julia-users] Freeing XMLElement from LightXML.jl? (Mem leak problem)

2015-01-26 Thread Isaiah Norton
I'm not sure where the malloc error is coming from, exactly, but you need to call "finalizer", not "finalize". Also it should be run on the XMLNode rather than the XMLElement. The following example might help (at least, it doesn't crash!) julia> n = new_textnode("s") s julia> finalizer(n, z::XMLN

Re: [julia-users] dlopen could not load 32 bit module on Win7 64 bits?

2015-02-04 Thread Isaiah Norton
> > But why a 32bit application can run 64bit OS no problem? Microsoft puts an incredible emphasis on (and resources towards) backward compatibility: http://en.wikipedia.org/wiki/WoW64 > Can dlopen supports both 32 and 64 bits module? No, WoW64 doesn't go quite that far. DLL architecture must

Re: [julia-users] Calling C code when the required types are simply typedefs in C API

2015-02-18 Thread Isaiah Norton
ppl_Polyhedron_t is an opaque pointer: http://en.wikipedia.org/wiki/Opaque_pointer (often also called an incomplete type. heavily used pattern in the Julia C source, by the way) In the example you gave, the "struct" is allocated here: ppl_Polyhedron_t ppl_ph; > In the call to ppl_new_C_Polyhedr

Re: [julia-users] Functions

2015-02-19 Thread Isaiah Norton
> > Maybe you could use value types ( > http://julia.readthedocs.org/en/latest/manual/types/#value-types ), > however, you need to use the latest nighly builds for that. Eg Something very similar to the first example actually works in 0.3: immutable Problem{S} end > f(::Type{Problem{1}}, x) = x^

Re: [julia-users] Re: Julia on Raspberry Pi 2

2015-02-19 Thread Isaiah Norton
No, "Cortex-blah" is the model family, but the architecture is still ARMv7-A for both. http://en.wikipedia.org/wiki/ARM_Cortex-A7 http://en.wikipedia.org/wiki/ARM_Cortex-A15 (ARM nomenclature can admittedly be quite bewildering) On Thu, Feb 19, 2015 at 9:47 AM, Viral Shah wrote: > It also appe

Re: [julia-users] isa should be user friendlier

2015-02-21 Thread Isaiah Norton
It is precisely a question of the type system. If arrays did not have unique types then there would be no point to having multiple dispatch or a type system at all. On Sat, Feb 21, 2015 at 11:43 AM, J Luis wrote: > > > sábado, 21 de Fevereiro de 2015 às 15:36:17 UTC, Tim Holy escreveu: >> >> Jus

Re: [julia-users] Re: ftp

2015-02-22 Thread Isaiah Norton
The built-in download command should work fine with ftp. It is cross-platform and will use one of curl/wget/fetch on *nix, or a system call on Windows. On Sun, Feb 22, 2015 at 3:31 AM, Viral Shah wrote: > The simplest thing would be to invoke wget. > > run(`wget ...`) > > -viral > > On Sunday, F

Re: [julia-users] Loading code from base without building Julia

2015-02-22 Thread Isaiah Norton
I played with some code along these lines a few weeks ago, available here: https://github.com/ihnorton/HackThatBase.jl See description: https://groups.google.com/d/msg/julia-dev/_l1clO6racs/amdTrdlzgY4J So far I've only used this with inference, I doubt it will work for the REPL code without si

Re: [julia-users] Measure Execution Time of Remote Process

2015-02-22 Thread Isaiah Norton
How about: julia> @sync begin @spawnat 2 @time f() @spawnat 3 @time f() end From worker 3: hello 3 From worker 2: hello 2 From worker 3: elapsed time: 0.004608077 seconds (31 kB allocated) From worker 2: elapsed time: 0.004780943 sec

Re: [julia-users] Re: Any introspective way to get a list of functions defined in a module?

2015-02-25 Thread Isaiah Norton
names(M, true) will give you a bigger list to work with. On Feb 25, 2015 6:49 PM, "Kirill Ignatiev" wrote: > Perhaps something like this (by brute force)? This doesn't include type > constuctors, though. > > filter(f -> isa(eval(f), Function), names(Base)) > > On Wednesday, 25 February 2015 18:37

Re: [julia-users] Can I use Julia to read/modify/write LLVM IR?

2015-02-26 Thread Isaiah Norton
Not directly with base Julia, but there is a very neat package with the capability to call directly C++, using Clang to generate IR and then JIT'ing (all in-memory, no files involved). https://github.com/Keno/Cxx.jl Is LLVM IR code portable across different LLVM and Clang versions? No. On Thu

Re: [julia-users] Re: Force variable declaration

2015-02-27 Thread Isaiah Norton
Of interest: https://github.com/tonyhffong/Lint.jl (though I'm not sure if this specific feature is implemented) On Fri, Feb 27, 2015 at 3:14 PM, Stéphane Goujet wrote: > On Fri, 27 Feb 2015, Steven G. Johnson wrote: > > As I understand it, you are asking whether there is a Julia option (e.g.

Re: [julia-users] Re: Getting people to switch to Julia - tales of no(?) success

2015-03-04 Thread Isaiah Norton
> > For this reason, while I am happy to talk about how nice Julia is, I > will not try to convince people to switch to it. IMO the people who are > potential switchers at this stage have already looked at Julia, and > evangelizing more aggressively could be counterproductive at this stage. Big +

Re: [julia-users] Can I use Julia to read/modify/write LLVM IR?

2015-03-04 Thread Isaiah Norton
table across platforms even at the same version, which is where this usually comes up. On Mon, Mar 2, 2015 at 11:21 AM, Stefan Karpinski wrote: > On Thu, Feb 26, 2015 at 10:03 AM, Isaiah Norton > wrote: > >> Is LLVM IR code portable across different LLVM and Clang versions

Re: [julia-users] `and`, `or` conditionals similar to python

2015-03-05 Thread Isaiah Norton
julia> foo = "abc"; bar = "bac"; zoo = "234"; julia> if foo == "abc" && bar == "bac" && zoo != "123" println("Please see http://docs.julialang.org/en/latest/manual/control-flow/";) end Please see http://docs.julialang.org/en/latest/manual/control-flow/ On Thu, Mar 5, 2015 at 6:5

Re: [julia-users] How to generate composite types with a macro?

2015-03-06 Thread Isaiah Norton
Missing an `end` in both expressions. > julia> macro deftype(name) ex1 = :(immutable $name end) end julia> @deftype foo julia> foo() On Thu, Mar 5, 2015 at 5:02 AM, Kaj Wiik wrote: > I have been trying to write a macro that would generate fields in a > for-loop. > > However

Re: [julia-users] How to generate composite types with a macro?

2015-03-06 Thread Isaiah Norton
You are right, I had defined it earlier and apparently the redefinition restriction does not apply to empty immutables. Anyway, this should work: macro deftype(name) esc(:(immutable $name end)) end On Fri, Mar 6, 2015 at 8:19 PM, Kaj Wiik wrote: > Thanks for the reply! > > Hmm, well my inte

Re: [julia-users] Why don't copied arrays change in function calls?

2015-03-11 Thread Isaiah Norton
To assign new values in-place to the existing 'b' array, change this line: b=copy(a) to b[:] = a I've also tried with do loops, but this causes a segmentation fault. Segfaults in pure-Julia code (no user-defined ccalls) are almost always considered a bug -- could you post an example, or ideal

Re: [julia-users] how to paste png into ipython julia notebook?

2015-03-11 Thread Isaiah Norton
That is Python code, so it won't work in IJulia. You might be able to use PyCall: https://github.com/stevengj/PyCall.jl Or use the Julia Images package to load the file: https://github.com/timholy/Images.jl Once you have an image loaded, then `display(img)` should work. On Wed, Mar 11, 2015 at 9

Re: [julia-users] How to interpolate a variable as a macro argument?

2015-03-12 Thread Isaiah Norton
There are tools mentioned in the Metaprogramming section of the manual which will help to better understand what is going on. In particular, macroexpand. http://docs.julialang.org/en/latest/manual/metaprogramming/#basics Are there better ways to do this, is it OK to use eval() in this context? >

Re: [julia-users] Re: Getting people to switch to Julia - tales of no(?) success

2015-03-12 Thread Isaiah Norton
> > The fast speed and short development time were the deciding factors here, > but the biggest drawback was the risk that the language might die in 5 > years. Any material that I could use if that argument comes up again? The argument I would make is that Julia already has a fairly substantial c

Re: [julia-users] Is it possible to generate runnable LLVM IR from Julia

2015-03-14 Thread Isaiah Norton
I think the only way to do this right now is to dump the whole image so you get all the necessary prior definitions. See this comment for the command line: https://github.com/JuliaLang/julia/issues/9430#issuecomment-67758882 (related to Emscripten, which doesn't work yet, but may work with `lli`)

Re: [julia-users] Is it possible to generate runnable LLVM IR from Julia

2015-03-14 Thread Isaiah Norton
(also: please ask a question in only one place because the same people answer here and on StackOverflow) On Sat, Mar 14, 2015 at 10:32 AM, Isaiah Norton wrote: > I think the only way to do this right now is to dump the whole image so > you get all the necessary prior definitions. Se

Re: [julia-users] Re: how should I let this macro worked?

2015-03-16 Thread Isaiah Norton
Look at match.jl for an example similar to be what you want to do. On Mar 16, 2015 1:21 AM, "Miao Yang" wrote: > Need something like Clojure "~@" unquote-splice? > >

Re: [julia-users] make error in julia from github

2015-03-16 Thread Isaiah Norton
> > 1.cp Make.inc Make.user This is incorrect. Create a new *empty* file called `Make.user` and add the lines indicated here: https://github.com/julialang/julia#intel-compilers-and-math-kernel-libraries Then proceed to run `make`. On Mon, Mar 16, 2015 at 7:41 PM, Wen Ling wrote: > Dear all:

Re: [julia-users] make error in julia from github

2015-03-16 Thread Isaiah Norton
Also, make sure you have tar or bsdtar (see final message. may be due to duplicating `Make.inc`) On Mon, Mar 16, 2015 at 10:24 PM, Isaiah Norton wrote: > 1.cp Make.inc Make.user > > > This is incorrect. Create a new *empty* file called `Make.user` and add > the lines indicated he

Re: [julia-users] Re: Reinterpret immutable type as an Array/Matrix.

2015-03-17 Thread Isaiah Norton
Note that in that thread the immutable is being put in an array first and then the array is reinterpreted. That is the only way this can work, because an immutable is not guaranteed to live in the heap. On Tue, Mar 17, 2015 at 11:25 AM, René Donner wrote: > I believe this might help: > https://g

Re: [julia-users] parse() and line numbers

2015-03-17 Thread Isaiah Norton
Skipping line nodes is straightforward (look at the output of `dump(expr)`). To hard-code it, you could look at modifying JuliaParser.jl. Likewise with comments, but that will take more work because they are simply skipped right now (at least in the main scheme parser code; I haven't checked in Jul

Re: [julia-users] inserting an Expr into AST via macro

2015-03-18 Thread Isaiah Norton
See http://docs.julialang.org/en/release-0.3/manual/metaprogramming/#interpolation On Mar 18, 2015 8:08 AM, "Abe Schneider" wrote: > If I do something simple like: > > macro test() > :(parsefloat("3.1459")) > end > > @test() > > # 3.1459 > > everything works as expected. However, if I try this i

Re: [julia-users] Linking directly with LLVM generated bytecode

2015-03-18 Thread Isaiah Norton
Start with Base.llvmcall. It is not documented, yet, but there are some examples in the tests: https://github.com/JuliaLang/julia/blob/master/test/llvmcall.jl The codegen part is in src/ccall.cpp. On Wed, Mar 18, 2015 at 2:30 PM, Sebastian Good < sebast...@palladiumconsulting.com> wrote: > I've

Re: [julia-users] Running external programms in windows, quotes vs. double quotes

2015-03-19 Thread Isaiah Norton
> > 1) Is there a workaround or some way to manipulate how quotes are handles. > Guess some way to execute a raw command line would be enough. > Here is some example code you could use to create processes directly on Windows: https://gist.github.com/ihnorton/82dc5b41a537de710ab2 2) Is this a bug

Re: [julia-users] Re: Error or supposed to happen? compile

2015-03-19 Thread Isaiah Norton
`ccall("jl_", Void, (Ptr{Uint8},), "Line 305")` will probably work. (beware that YMMV as this is a debugging function that does not support all data structures so you might end up needing to Ctrl^C the process if it tries to display something too complicated and ends up spewing nonsense). On Thu,

Re: [julia-users] Rationale behind @-sign for macro usage?

2015-03-21 Thread Isaiah Norton
There is a pretty good set of answers on StackOverflow now. First-posts need to be manually approved, which is why this message appears to be time-delayed. (Please don't cross-post in the future because it is the same set of people answering everywhere). On Sat, Mar 21, 2015 at 12:53 PM, Gregor R.

Re: [julia-users] Anything changng assembly?

2015-03-22 Thread Isaiah Norton
(The PAPI thing was related to the perf counters, so not directly relevant to the inline assembly question. but, see here: http://icl.cs.utk.edu/projectsdev/papi/) The big change is that `Base.llvmcall` is now merged, so you can write LLVM IR directly. There are two examples in test/llvmcall.jl, a

Re: [julia-users] Anything changng assembly?

2015-03-23 Thread Isaiah Norton
to ccall is is not > a tuple? Right, thanks for the correction. I had tried `(Int64,)` as a return type first (not realizing what the argument order was), and got LLVM errors about mismatched return type `<1 x i64>`. On Sun, Mar 22, 2015 at 4:37 PM, Stefan Karpinski wrote: > 2015-03

Re: [julia-users] passing in a symbol to a macro and applying it as a function to expression

2015-03-25 Thread Isaiah Norton
You could remove the type assertion on `fn`, and then pull the symbol out with `fn.args[1]` if it is an expression. I don't see much benefit to setting things up this way, though. On Wed, Mar 25, 2015 at 8:58 PM, Phil Tomson wrote: > I want to be able to pass in a symbol which represents a funct

Re: [julia-users] Why is Gadfly so slow when plotting it's first plot?

2015-03-28 Thread Isaiah Norton
This delay is due to parsing and JIT'ing a bunch of code in both Gadfly and dependencies. There is a work-in-progress caching process you could try. See: https://github.com/dcjones/Gadfly.jl/issues/251#issuecomment-38626716 and: http://docs.julialang.org/en/latest/devdocs/sysimg/ The PR to make

Re: [julia-users] Indexing with Reals is deprecated

2015-03-30 Thread Isaiah Norton
Extended discussion: https://github.com/JuliaLang/julia/issues/10154 On Mon, Mar 30, 2015 at 6:22 PM, Júlio Hoffimann wrote: > What is the rationale for the change? It makes Julia faster? > > Right now I only see this as a limitation from an user perspective. > > -Júlio >

Re: [julia-users] Dealing with memory accumulation on worker processes

2015-03-31 Thread Isaiah Norton
Not sure if this applies to your case, but there are some known issues with memory management of parallel constructs. See e.g. https://github.com/JuliaLang/julia/issues/8912 and others linked from there. On Mon, Mar 30, 2015 at 3:38 PM, Gregory Plumb wrote: > Hello, > > I have a function that pu

Re: [julia-users] view and set julia windows path?

2015-03-31 Thread Isaiah Norton
try ENV["PATH"] and ENV["PATH"]=ENV["PATH"]*";C:/foo" On Tue, Mar 31, 2015 at 12:39 PM, datnamer wrote: > Hello, > > My Rcall is having trouble finding r, despite setting it on windows path. > > How can I troubleshoot this? Is there a way to see and set what Julia > views as the windows path? >

Re: [julia-users] calling Julia from Mathematica

2015-04-02 Thread Isaiah Norton
Not sure about Mathematica->Julia, but the other way round is available: https://github.com/one-more-minute/Mathematica.jl You could use the Julia embedding API to call out using the Mathematica foreign function interface -- see pyjulia for an example: https://github.com/JuliaLang/pyjulia On Thu,

Re: [julia-users] Re: A Julia newsletter

2015-04-12 Thread Isaiah Norton
http://www.reddit.com/r/julia I strongly second the suggestion to get involved with the Reddit group first, and build from there. Perhaps a good start would be to write summary blog posts each month from the Reddit-curated links, plus any especially interesting threads on the mailing list. This co

Re: [julia-users] :(::) rather than Symbol in args[1] in :lambda Expr for cartesianarray

2015-04-12 Thread Isaiah Norton
It would be helpful/time-saving to send the `code_typed` output as well, or at least the expected argument types. On Fri, Apr 10, 2015 at 5:09 PM, Todd Anderson wrote: > > > If you do code_typed on the following function, the :lambda Expr for the > function nef has an array of Symbol as its firs

Re: [julia-users] :(::) rather than Symbol in args[1] in :lambda Expr for cartesianarray

2015-04-12 Thread Isaiah Norton
But, to (maybe) answer the question, if you check code_lowered I believe the :(::) will be converted to a typeassert. On Sun, Apr 12, 2015 at 11:46 AM, Isaiah Norton wrote: > It would be helpful/time-saving to send the `code_typed` output as well, > or at least the expected argument

Re: [julia-users] Re: :(::) rather than Symbol in args[1] in :lambda Expr for cartesianarray

2015-04-13 Thread Isaiah Norton
> > This shows the first lambda arg again as :(j::Any) of type :(::). In my > real code, it was at least figuring out in the second lambda arg to type > "j" as {:j,Int64,0} but in this example it doesn't even figure out that "j" > has to be of some Unsigned type and punts back to Any ({:j, Any, 0}

Re: [julia-users] Re: Julia installation issue

2015-04-13 Thread Isaiah Norton
Thanks for following up with the answer! I'm sure others will find this helpful. On Tue, Apr 14, 2015 at 12:30 AM, Yudong Ma wrote: > It turns out I have to update R to the latest version. Older version R is > not compatible with the updated version of libpcre3 (v1:8.30) shipped > with Julia. >

Re: [julia-users] Julia stuck at large floating point number array from source code

2015-04-13 Thread Isaiah Norton
Are you using Windows? Pasting into the REPL there is especially bad, but `include` should work fine (and I just tested it). I also pasted this array into a putty session to a linux box and it only took a few seconds (due to putty not Julia, pretty sure it would be instant in a local login). I can

Re: [julia-users] Re: Julia stuck at large floating point number array from source code

2015-04-14 Thread Isaiah Norton
https://github.com/JuliaLang/julia/issues/7267 On Tue, Apr 14, 2015 at 7:17 AM, Simon Danisch wrote: > Same here...I have been observing this behaviour basically since the > beginning of time. > I always assumed that there is an issue for that and didn't bother looking > it up, since I barely us

Re: [julia-users] Updating Julia-Studio julia version (currently on 0.2.0)

2015-04-14 Thread Isaiah Norton
> > I read some post online which mentioned that julia studio will not be > updated past 0.2.0, is that true? Yes (or at least, not by Forio or the Julia team). If I'm unable to update Julia in Julia-Studio, what other IDEs do people > use, I've heard a lot about IJulia Notebook, but I dont lik

Re: [julia-users] Re: :(::) rather than Symbol in args[1] in :lambda Expr for cartesianarray

2015-04-14 Thread Isaiah Norton
> > I've highlighted in red below the part of the lambda that is of :(::) type. #s2 = cartesianarray(AST(:($(Expr(:lambda, {:(j::Any)}, > {{},{{:j,Any,0}},{{:weights,Array{Float64,2},1}}} Sorry if I am being dense here, but: julia> typeof(:(j::Any)) > Expr so, I still can't tell where you

Re: [julia-users] Re: :(::) rather than Symbol in args[1] in :lambda Expr for cartesianarray

2015-04-14 Thread Isaiah Norton
You can expand the lambda AST to get the unquoted version. Something like: julia> c = Base.expand(Base.uncompressed_ast(ct.args[3].args[2].args[2].args[2])) julia> Base.uncompressed_ast(c.args[1].args[1]).args[3].args[1].args[1][2] 1-element Array{Any,1}: Any[:j,Any,0] Does this help? (dump and

Re: [julia-users] Path of julia executable?

2015-04-15 Thread Isaiah Norton
You can use JULIA_HOME to get the base path, and the default process_title should match the binary name. I don't think we save args[0] anywhere. On Wed, Apr 15, 2015 at 11:05 AM, René Donner wrote: > perfect, thanks! > > Am 15.04.2015 um 17:02 schrieb Stefan Karpinski : > > > Sys.get_process_tit

Re: [julia-users] Latest on wrapping C structs for use in Julia

2015-04-16 Thread Isaiah Norton
The API looks quite small, so I would suggest to just type it out -- from a quick look, everything should be wrappable in pure Julia. e.g. the equivalent to the first part of hello.cpp you linked would be: julia> immutable BeagleInstanceDetails resourceNumber::Int resourceName::P

Re: [julia-users] Latest on wrapping C structs for use in Julia

2015-04-16 Thread Isaiah Norton
> > so any suggestions for a library with a similar API would be much > appreciated. I usually point people to Nettle.jl which is very small but exemplifies a few advanced ccall tricks. On Thu, Apr 16, 2015 at 9:53 AM, Isaiah Norton wrote: > (I've made some wrappers previo

Re: [julia-users] Latest on wrapping C structs for use in Julia

2015-04-16 Thread Isaiah Norton
> > (I've made some wrappers previously using an old build, although I can't > get Clang.jl working at the moment) I know there is a bug on OS X, I'll try to get it fixed this week. If there is some other problem, please let me know. On Thu, Apr 16, 2015 at 9:48 AM, Isai

  1   2   3   4   5   6   7   8   9   >