I can't remember what I've read/heard with regards to the String overhaul,
but I know there's also been talk about overhauling tuples so they can act
like fixed size immutable arrays. Those might be a good candidate for
internal string representation, though I imagine there are other
It's still an open issue: https://github.com/JuliaLang/julia/issues/1864,
though there have been talks on how to improve.
-Jacob
On Wed, Jun 4, 2014 at 8:10 AM, Mauro mauro...@runbox.com wrote:
Is that a fact? That would be sad, since it would mean that a functional
style suffers a
There was also this PR by Steven Johnson where the use of a
macro/meta-programming capabilities allowed for a Julia version that beat
out 2 other well-known C implementations (in Matlab and SciPy).
This point is crucial to me as I think over a longer-term horizon. Sure
performance is king and
a[] is rewritten as `getindex(a)`, which has a definition in array.jl#244
getindex(a::Array) = arrayref(a,1)
-Jacob
On Fri, May 30, 2014 at 5:05 PM, Carlos Becker carlosbec...@gmail.com
wrote:
My apologies if this is something that was addressed before, I didn't find
it.
Why does
Weird. I get the same output as Matlab.
In [84]: function smooth(Xin,k,s)
Xout = zeros(size(Xin,1),1)
for z = -s:s
Xout = Xout + Xin[:,k+z]*binomial(2*s,s+z)
end
Xout = Xout/2^(2*s)
return Xout
end
Out [84]: smooth (generic function with 1 method)
In [85]: X =
: 2014-05-28T16:46:04Z.
I'm very much looking forward to the new Dates.jl. Thanks Jacob!
On Wednesday, May 28, 2014 10:38:11 AM UTC-4, Jacob Quinn wrote:
I'm doing a round of improvements for Date and DateTime
parsing/formatting and I'd love to make the test coverage much more robust.
I've
I'm doing a round of improvements for Date and DateTime parsing/formatting
and I'd love to make the test coverage much more robust. I've built the
tests around many common cases already, but I'd love to see any more
esoteric or possibly tricky cases to make sure the code holds. A great
example
I'm thinking there's probably a better way to do this.
For some date-related stuff, I have a method that needs to take an
inclusion function as an argument and I'm wondering what the best way to
validate that the user has supplied a correctly formed inclusion
function. The requirements are
), but there haven't been any attempts to write the necessary
code AFAIK
On Tue, May 27, 2014 at 6:33 PM, Jacob Quinn karbar...@gmail.com wrote:
I'm thinking there's probably a better way to do this.
For some date-related stuff, I have a method that needs to take an
inclusion function as an argument
Andre,
Sounds like a good solution.
As for the new release; the functionality will be possible, meaning you
could *create* a DateTime (or Timestamp) with microsecond precision, but as
of now, there's no other functionality except perhaps equality and
comparison (i.e. no arithmetic, conversions,
Hey Andre,
Unfortunately there's nothing currently that would make this very easy. I'm
actually in the middle of a big rewrite of the Datetime.jl package that
will, among other things, include the possibility of handling something
like this, but it's at least a few weeks away of anything
There's actually not much support in Datetime.jl for formatting/parsing
DateTimes (just regular Dates). (A rewrite of the package is nearing
completion as Dates.jl with much more solid support for formatting/parsing).
In this case, I would suggest leveraging Postgres own formatting tools:
| 2014-05-05 11:59:52 |
On Tuesday, May 6, 2014 6:38:33 PM UTC-7, Jacob Quinn wrote:
There's actually not much support in Datetime.jl for formatting/parsing
DateTimes (just regular Dates). (A rewrite of the package is nearing
completion as Dates.jl with much more solid support
Check out the chapter about packages:
http://docs.julialang.org/en/latest/manual/packages/
You need to install the package first.
Pkg.add(Iterators)
On Fri, May 2, 2014 at 5:34 PM, John Myles White
johnmyleswh...@gmail.comwrote:
Iterators isn't in Base. You need to install it through the
?
On Saturday, May 3, 2014 3:34:45 AM UTC+6, Jacob Quinn wrote:
Check out the chapter about packages: http://docs.
julialang.org/en/latest/manual/packages/
You need to install the package first.
Pkg.add(Iterators)
On Fri, May 2, 2014 at 5:34 PM, John Myles White johnmyl...@gmail.comwrote:
Iterators
I've always kind of wanted {} for initializing a Dict, a la Python. Is
there really any difference between Any[] and {}? Do we really need {} for
Any arrays? I think it would be much easier if square brackets [] were
always array-type things, and {} were Dict things.
-Jacob
On Thu, May 1, 2014
function frob(x::Array)
isleaftype(eltype(x)) || error(Homogeneous array required')?
Though, IMO, this is all a non-issue in my experience. Just specifying
frob{T:Real}(x::Vector{T}) gets you exactly what you want--the ability to
have JIT generate fast, efficient code for a range of types that
3:46:54 PM UTC+1, Jacob Quinn wrote:
function frob(x::Array)
isleaftype(eltype(x)) || error(Homogeneous array required')?
Though, IMO, this is all a non-issue in my experience. Just specifying
frob{T:Real}(x::Vector{T}) gets you exactly what you want--the ability to
have JIT generate fast
:
On Wednesday, April 30, 2014 4:51:13 PM UTC+1, Jacob Quinn wrote:
I was just trying to share some of my own experience with Julia from
having used it for the last two years, not be dismissive or condescending.
That this hasn't been a show-stopper for some 300+ packages now, IMO,
*is* a valid point
In my experience, I can think of a single time when having an array of a
specific abstract type was useful (how multiple Period arithmetic is
handled:
https://github.com/karbarcca/Dates.jl/blob/master/src/periods.jl#L88).
Almost always, I'm concentrating on making sure Arrays I work with are of a
Excellent points Tomas. I think this would be particularly helpful for
those coming from Java. Perhaps some of your comments could be worked into
the manual or FAQ somewhere.
-Jacob
On Tue, Apr 29, 2014 at 2:43 PM, Tomas Lycken tomas.lyc...@gmail.comwrote:
Yet another point of view -
Stefan's comment was actually very close to my line of thinking in
designing Datetime.jl (which needs to be officially deprecated soon).
After looking through several other libraries/languages of Date
implementations, my conclusion is that most end up using an Interval type
vs. using Period
Ah. What's the output of Pkg.status() on both systems then? It may be an
issue of different versions of the Stats package (there has also been some
package renaming since 0.2, so it may be StatsBase)
-Jacob
On Fri, Apr 18, 2014 at 10:50 AM, gdeloscampos gdeloscam...@gmail.comwrote:
In [414]: a = ['e','c','c','d','a','c','d','a','c','d','d']
Out [414]: 11-element Array{Char,1}:
'e'
'c'
'c'
'd'
'a'
'c'
'd'
'a'
'c'
'd'
'd'
In [415]: b = ['e','a','c','b','d']
Out [415]: 5-element Array{Char,1}:
'e'
'a'
'c'
'b'
'd'
In [416]: indexin(a,b)
Out [416]:
I thought this would work, but it seems that when I insert items in
ascending order (and the heap is supposed to be descending), my heap is
getting messed up. Is something wrong with my `ord` function?
In [448]: matches = (String,Float64)[]
Out [448]: 0-element Array{(String,Float64),1}
In
I wonder if this has to do with the fact that heappush! assumes heap-order,
but isn't taking into account my Reverse ordering in ord?
-Jacob
On Thursday, April 10, 2014 12:51:19 PM UTC-4, Jacob Quinn wrote:
I thought this would work, but it seems that when I insert items in
ascending order
You *could* use setdiff, it depends on what you're working with (e.g. a
range of integers)
In [24]: a = [1:10]
Out [24]: 10-element Array{Int64,1}:
1
2
3
4
5
6
7
8
9
10
In [25]: b = [2,6,9]
Out [25]: 3-element Array{Int64,1}:
2
6
9
In [26]: setdiff(1:10,findin(a,b))
Actually opening an issue is the best way to make sure this gets addressed:
https://github.com/JuliaLang/julia/issues?state=open
On Tue, Apr 1, 2014 at 11:44 AM, Freddy Chua freddy...@gmail.com wrote:
Alright, these are my timings are disabling gc
before disabling gc
each for loop takes
Is this http://docs.julialang.org/en/latest/stdlib/base/#Base.ntoh what
you're looking for?
On Wed, Mar 26, 2014 at 2:43 PM, Stephen Chisholm sbchish...@gmail.comwrote:
Is there currently a way to specify network byte order when calling... ?
read(io_stream, Uint16)
How about
In [186]: @time rand(-1:2:1,1,1);
elapsed time: 2.29940616 seconds (80224 bytes allocated)
No need for an extra function. This uses a range from -1 to 1 with a step
size of 2 so you only get those two numbers.
-Jacob
On Mon, Mar 24, 2014 at 7:21 PM, David P. Sanders
Yes, sorry, my example should have been
In [17]: x = 1
Out [17]: 1
In [18]: typeof(x) : Real
Out [18]: true
On Sun, Mar 23, 2014 at 9:48 PM, j verzani jverz...@gmail.com wrote:
try `isa(x, Type)`
On Sunday, March 23, 2014 9:44:55 PM UTC-4, K leo wrote:
Use to determine something
Yes, please see the big, bold first heading of the Performance Tips section
of the manual: http://docs.julialang.org/en/latest/manual/performance-tips/
-Jacob
On Sat, Mar 22, 2014 at 5:18 PM, John Myles White
johnmyleswh...@gmail.comwrote:
Is this in the global scope?
-- John
On Mar 22,
Thanks to Ivar and Stefan for the great explanations. I think often we hear
don't do this, don't do that, but it's great to hear some good anecdotes
and reasoning. Also excited to see the improvements in Strings under the
hood.
-Jacob
On Fri, Mar 21, 2014 at 11:37 AM, Stefan Karpinski
Actually, you can create an empty array and append (though in Julia
vernacular, it's push!).
a = Image[]
for image in images
push!(a, image)
end
Or something along those lines.
-Jacob
On Fri, Mar 21, 2014 at 2:07 PM, Paulo Castro
p.oliveira.cas...@gmail.comwrote:
Hi,
I am starting
What would return from the statement if it were false? nothing? Like if I
use it assigning a variable? I definitely see the attraction as a one liner
though.
-Jacob
On Mar 21, 2014 9:52 PM, Chris Foster chris...@gmail.com wrote:
On Sat, Mar 22, 2014 at 9:23 AM, Stefan Karpinski
I agree. I've never liked python's do_stuff() if i == 1. It's too
disconcerting to parse what's going on and then have to backtrack and think
about the condition that came afterwards. I've found the i == 1
do_stuff() has become really natural after only using it a few times.
-Jacob
On Thu, Mar
Mark,
If you spend more time with Julia, I think you'll find that case
sensitivity actually *helps* in learning the language. Most notably, Julia
follows the convention of using proper-cased identifiers for modules and
types, while using all lower-case for function/method identifiers. This
aids
Feel free to check out the Sublime-IJulia project to run julia from within
Sublime through the IJulia backend.
https://github.com/karbarcca/Sublime-IJulia
-Jacob
On Mon, Mar 17, 2014 at 7:40 AM, THIRUMALA KIRAN
thirumala.ki...@gmail.comwrote:
I use Sublime Text.
Are you using Julia v0.2? (You can check by running versioninfo()). I
thought I had updated support for v0.2, but it seems like some other
packages are having trouble. Checkouting the master of a package isn't
going to work if you don't have an update to date Julia.
If possible, I'd really
12, 2014 at 12:23 PM, svakSha svak...@gmail.com wrote:
Hello Jacob,
On Wed, Mar 12, 2014 at 3:18 PM, Jacob Quinn quinn.jac...@gmail.com
wrote:
Are you using Julia v0.2? (You can check by running versioninfo()). I
thought I had updated support for v0.2, but it seems like some other
packages
whos() will get you started at least.
-Jacob
On Mon, Mar 10, 2014 at 8:18 PM, Matthew Crews matthewcr...@gmail.comwrote:
I've been watching Julia since the Channel 9 video at Lang.NEXT and I've
been wanting to jump to develop my algorithms in it for some time but one
thing that holds me
Not sure, but my guess would be that C_NULL is not being accepted as a
Ptr{Culonglong} or Ptr{Cdouble} since it's type is Ptr{Void} (or
Ptr{None}). You can either remove those type annotations or just use Ptr as
the type annotation to test this theory.
-Jacob
On Mon, Mar 10, 2014 at 8:20 PM, J
Actually, there's a lot of people coming to realize this is one of the
smartest *non-features *of Julia. I recently read an interesting answer on
quora to the question, What is the worst mistake ever made in computer
science and programming that proved to be painful for programmers for
years?,
I could see something like this in
https://github.com/astrieanna/TypeCheck.jl, but I don't know about forcing
it on everyone. Particularly with the interactive approach to Julia, I'm
adding/removing/changing variable names all the time while prototyping code
and if there were warnings every time I
Have you checked out `readdlm`? It's flexibility has grown over time and
serves most of my needs.
http://docs.julialang.org/en/latest/stdlib/base/#Base.readdlm
-Jacob
On Fri, Mar 7, 2014 at 4:17 PM, Gabor g...@szfki.hu wrote:
Sorry, I was not clear enough.
Of course it is just a simple
You need to open the file in append mode. See here:
http://docs.julialang.org/en/latest/stdlib/base/#Base.open
open(file,a) do x
writecsv(x,data)
end
Then write to it, I believe using writecsv or writedlm work fine on open
files, but I can't confirm write now; otherwise, you'll need to use
:
Plugin_host.exe
The program can't start because libgcc_s_seh-1.dll is missing from your
computer. Try reinstalling the program to fix the error.
Any idea why i might be getting that error?
Ps. i'm on a windows 7 machine!
On Friday, February 28, 2014 9:00:48 AM UTC-5, Jacob Quinn wrote:
Feel free
While the merging of DateTime functionality into Base is simmering, I've
finally got around to making the rewrite more broadly available. You can
see the latest DateTime functionality by running:
Pkg.add(Datetime)
Pkg.checkout(Datetime,dev)
include(Pkg.dir() * /Datetime/src/Dates.jl)
using
Indeed. I've been meaning to try and update this soon. For now, doing
Pkg.pin(DataFrames,v0.5)
works for me.
-Jacob
On Wed, Feb 26, 2014 at 7:43 PM, John Myles White
johnmyleswh...@gmail.comwrote:
ODBC is probably expecting to interact with an older version of DataFrames
when Index was
Hey Marcia,
Feel free to check out the ODBC.jl package, which provides generic ODBC
access to all kinds of DBMS (you just need the ODBC driver for your DB).
https://github.com/karbarcca/ODBC.jl
Happy to help troubleshoot, get things set up.
-Jacob
On Tue, Feb 11, 2014 at 9:23 AM, Marcia
Ok, I just pushed changes for this. The behavior, as now noted in the
README is:
Using Sublime-IJulia
* Commands can be entered directly in the IJulia console view, pressing
`shift+enter` to execute.
* A newline can be entered without executing the command by typing `Enter`
for
I'm grateful for those who have patiently hacked through the platform
issues in getting this working, but I think we're finally out of alpha and
into beta mode!
https://github.com/karbarcca/Sublime-IJulia
For those who don't know, this is the official successor to the
Sublime-Julia
As someone who doesn't have to work with the functions very often or deal
with degrees/radians conversions, I actually have found it convenient to
have the sind functions. It saves me time from having to remember what the
conversion is or make my code uglier littered with degrees2radians()
There already is the tuple function, so you don't really need your own.
In [7]: tuple([1,2,3]...)
Out [7]: (1,2,3)
On Thu, Jan 30, 2014 at 10:33 AM, John Myles White johnmyleswh...@gmail.com
wrote:
Nope, this is the standard way to convert between tuples and arrays.
Usually, if you
Are you wrapping your code in a function? If not, it's going to slow the
code down a lot because it's in global scope and variable type checking
will be happening all over the place. Check out the performance tips page
in the Julia manual for other ideas:
A typealias doesn't get you enough here. (It's really just a nickname for
another type). What you need is to create a new type that wraps a Ptr{Void},
type PGconn
ptr::Ptr{Void}
end
On Tue, Jan 28, 2014 at 3:32 AM, Maurizio De Santis
desantis.mauri...@gmail.com wrote:
Hello,
I'm studying
Sounds like this also might be a version issue. Can you confirm what
versions of Julia, DataFrames, and ODBC you're using? And just for kicks,
what frontend are you using? (e.g. IJulia, terminal, etc)
On Thu, Jan 23, 2014 at 11:24 AM, John Myles White johnmyleswh...@gmail.com
wrote:
Since
I couldn't find any documentation on this. How can you check out functions
with keyword arguments?
-Jacob
I've been playing around with some code that uses abstract types as
parameter tags (think Ptr{Void}, Ptr{Int64}, etc.), and more recently
using a hierarchy of abstract tag types. The other hurdle in what I'm
trying to do is the use of external data files that need to be loaded and
used in the
201 - 259 of 259 matches
Mail list logo