Quantcast
Channel: First steps - JuliaLang
Browsing all 2795 articles
Browse latest View live

Vector of Vectors: Type Issue and Tuple Question

I am trying to understand the difference between the two ways I found to create a vector of vectors below. I found Option 1 in this post, which works nicely but isn’t very customizable. Option 2 also...

View Article


Image may be NSFW.
Clik here to view.

Getting started with Julia and Robotics Projects

Hello, I am a recent mechanical engineering graduate and discovered Julia online. I am interested in simulating and optimizing some custom robotics designs and wanted some input from people who are...

View Article


Image may be NSFW.
Clik here to view.

Not defined error

Sooooo confusing using Julia I don’t understand why the following simple codes doesn’t work at all with error message AbstractGlidingVehicle not defined. Even my other custom package is similarly...

View Article

Problems with Lathe TrainTestSplit

I am attempting to use Lathe for Linear Regression but unfortunately the documentation is unreachable (webpage lathe.ai/docs/ returns an error). All the tutorials that I have seen about it (e.g. here)...

View Article

Image may be NSFW.
Clik here to view.

What are lower bounds for types?

I’m trying to understand what lower bounds are for types. I ran the following code which shows which subtypes (recursively) of number satisfies/rejects Int <: T <: Real in hope of gaining an...

View Article


Using union() and list comprehesions

I have two-element array whose elements are Sets, x = [ Set([:a,:b,:c]), Set([:c]) ], I would like to make union of the array elements as one resulting set, Set([:a, :b, :c]). I am having issue with...

View Article

Call a constructor by interpolation

I need to programmatically initialize an empty DataFrame using a vector of names and a vector of types: Here is an example of doing this explicitly: DataFrame(mystrings=String[],myints=Int64[]) 0×2...

View Article

How to add a row to DataFrame where one field is missing

The MWE below tries to add a row to a DataFrame where some rows have missing values: tps = [String,Int64,Int64] nms = ["str","int","int2"] df = DataFrame(tps,nms) data =...

View Article


Programming numeric simulations of thermodynamic systems in Julia

Hi Julia Community, I’m really new to the Julia language and this is my first post in the forum. Moreover english is not my mother tongue, so I hope you can understand my question and help me to...

View Article


What is the type 'Method' and where is it defined?

The @which macro returns a mutable composite type Method. Is this documented anywhere and how do I find the source code for it? I guess it is part of the Julia internals since the usual ways of...

View Article

Environment and PackageCompiler.jl

Is PackageCompiler.jl works depending on which environment is activated? For example, precompiling package A.jl at default env. with replace_default=true option would not affect the same package A.jl...

View Article

Are custom sysimages cross-platform for the same Julia version?

Hi all, I was wondering the sysimages of PackageCompiler are they cross-platform for the same Julia version? Furthermore (and related) do the sysimages contain lowered LLVM code or do they actually...

View Article

Type alias or newtype wrapper?

Hi! I am writing a small from-scratch ray tracer to get myself acquainted with julia. I’ve defined a color type as struct Color r::UInt8 g::UInt8 b::UInt8 end What would be the most idiomatic...

View Article


Is it proper practice to have a main method

I’m learning Julia, and right now I’m only working with one file, let’s call it main.jl. Is it proper practice to include a main method, as outlined here? I found this thread from last year, but for...

View Article

Binning a 2D array

Hi, I am trying to apply my understanding of image binning in Julia (which at its heart is an operation that needs to be performed on a 2D array) . To that end I created a toy array julia> a =...

View Article


Not able to capture variable (via symbol) from outer scope?

I have the following minimal example: function foo() myvar1 = 55 function bar() println(myvar1) #<- OK s = Symbol("myvar", 1) println(@eval $s) # <-ERROR: LoadError: UndefVarError: myvar1 not...

View Article

Array of tuples into a pure array of integers

New to Julia from Python so I am not used to all of these types, sorry if this is super simple but I have had no luck in my google searches. Can someone help me turn an array of tuples into a pure...

View Article


Current situation using GLWF/modernGL/shaders

after a couple of years successfully using Julia0.7 to prototype a software to model a painter’s creative process by using my own custom bindings to openGL1.0 using free glut I would like to explore...

View Article

Global sensitivity analysis - Morris Analysis

I am new to Julia and I am looking for a way to do Morris analysis on an system of ODEs. I would like to get a analysis as time series. Additionally, I would like to get the tested parameters to use...

View Article

Is there a CLI tool?

Hi, so I’m trying to figure out a proper workflow for Julia. Apparently, a lot of people use Juypter Notebooks or the Julia REPL directly in the terminal to code. I have no idea how either one of...

View Article
Browsing all 2795 articles
Browse latest View live


Latest Images