and concise (thought that was the point), but we get
leapDay = isleapyear (yr)? Nullable {Date} (Date (yr, 2:29)): Nullable
{Date} ()
if ! isnull( leapDay )
doy = dayofyear( get(leapDay) )
On Tue, Feb 9, 2016 at 8:22 PM, Michael Landis <darkskyanar...@gmail.com>
wrote:
> # wishful
# wishful thinking...
using Dates;
leapDay = isleapyear(yr) ? Date(yr,2,29) : nothing
if ! leapDay
dow = dayofyear( leapDay )
... clean and concise (thought that was the point), but we get
leapDay = isleapyear(yr) ? Nullable{Date}( Date(yr,2,29) : Nullable{Date}()
if ! isnull( leapDay )
I'm so confused
I thought this would be cool:
isLeapYr(yr::Int64) = yr % 400 == 0 || (yr % 4 == 0 && yr % 100 != 0)
LeapDay(yr) = isLeapYr(yr) ? Date(yr,2,29) : Nullable{Date}()
lp15 = LeapDay(2015) --> Nullable{Date}()
lp16 = LeapDay(2016) --> 2016-02-29
no surprises there, but when I
Why can't there be a base type upon which all others are based (perhaps by
default)? The base class could handle the Nullable situation and
everything else would magically inherit that capability. Making a union of
a NULL and the actual type is pretty painful for the programmer. Weren't
we
rik
>
> On Mon, Feb 8, 2016 at 10:08 PM, Michael Landis
> <darkskyanar...@gmail.com> wrote:
> > I'm so confused
> >
> > I thought this would be cool:
> > isLeapYr(yr::Int64) = yr % 400 == 0 || (yr % 4 == 0 && yr % 100 != 0)
> > LeapDay(y
le(Date(yr,2,29)) : Nullable{Date}()
>
> so that the return value is always a Nullable{Date}.
>
> -erik
>
> On Mon, Feb 8, 2016 at 10:08 PM, Michael Landis
> <darkskyanar...@gmail.com> wrote:
> > I'm so confused
> >
> > I thought this would be cool:
>
gt;
>
> On Monday, February 8, 2016 at 10:08:25 PM UTC-5, Michael Landis wrote:
>>
>> I'm so confused
>>
>> I thought this would be cool:
>> isLeapYr(yr::Int64) = yr % 400 == 0 || (yr % 4 == 0 && yr % 100 != 0)
>> LeapDay(yr) = isLeapYr(yr) ?
, 2016 at 5:43 PM, Michael Landis <darksky...@gmail.com
> > wrote:
> > so ... what's the syntax for creating an empty Queue{ByteString}?
> >
> > qbs = Queue{ByteString}([])# also produces convert errors
>
> I think the document tells you exactl
DataStructures.Queue is doing strange things for me.
Can someone please post proper syntax for forward declarations of an empty
Queue{ByteString} and maybe an in-line instantiation (if different) so I
can be sure that I am getting the declarations right?
When I do:
using DataStructures;
qbs =
assuming that you know more than I do (a likely circumstance), how do you
explain...
qbs = Queue{ByteString}("1234") # ok
typeof(qbs) # -->
DataStructures.Queue{ByteString}
length(qbs) # --> 4, presumably the
result of
ct? What happens to other objects that
> retain references to those objects?
>
> On Thu, Feb 4, 2016 at 4:35 PM, Michael Landis <darksky...@gmail.com
> > wrote:
>
>> if you added a field, the existing objects could still be valid. If you
>> killed a
> On Thu, Feb 4, 2016 at 1:46 PM, Michael Landis <darksky...@gmail.com
> > wrote:
>
>> I think it would be nice to be able to undefine a type, so restarting the
>> environment is not required when adding or deleting an attribute from a
>> type description. Not bein
so ... what's the syntax for creating an empty Queue{ByteString}?
qbs = Queue{ByteString}([])# also produces convert errors
>
of Julia it was not possible to do Queue{ByteString}() or
> Vector{ByteString}().
>
> On Thu, Feb 4, 2016 at 5:56 PM, Michael Landis <darksky...@gmail.com
> > wrote:
>
>> ah, Queue's don't need to be typed, the type is a parameter to the
>> constructor. Parens, not braces.
I think it would be nice to be able to undefine a type, so restarting the
environment is not required when adding or deleting an attribute from a
type description. Not being able to update a type definition without
restarting the environment is a royal pain in the ass.
On Saturday, March 8,
; faster to ask for help.
>
> On Mon, Feb 1, 2016 at 4:48 AM, Michael Landis <darksky...@gmail.com
> > wrote:
>
>> Gadfly already working. I will look at Breloff's Plots too. Thanks.
>>
>>
>>
>
Gadfly already working. I will look at Breloff's Plots too. Thanks.
Can anyone recommend a graphics capable of plotting multiple curves on a
single canvas. Python's pyplot/matplotlib multi-curve capabilities appear
to be unavailable within Julia (maybe I'm doing it wrong).
Is there a language convention for converting/comparing unix timestamps
(e.g. file modify dates) and DateTimes?
When I do:
fs = stat( "X.csv" );
ms = now() - fs.mtime;
typeof(ms) --> Base.Dates.Millisecond, even though now() is a DateTime
# you would think that creating a DateTime, would make
# Even after
dt = trunc(dt,Second);
I am still seeing divexact errors...
On Friday, January 29, 2016 at 12:44:35 PM UTC-8, Michael Landis wrote:
>
> Is there a language convention for converting/comparing unix timestamps
> (e.g. file modify dates) and DateTimes?
>
> When I
Wow, I will give that a try. Thank you!
On Thursday, January 28, 2016 at 6:52:38 AM UTC-8, Michael Landis wrote:
>
> Maybe I'm missing something, but the one thing I want from DateTime is the
> ability to determine whether a day has elapsed since a file modify date,
> but not jus
.
On Wednesday, January 27, 2016 at 10:26:09 PM UTC-8, Michael Landis wrote:
>
> I am trying to compute some historical means and volatilities with Julia,
> but I've been having some difficulty getting the declarations and/or
> assignments right...
>
> When I try a declar
at 10:16 AM, Michael Landis <darksky...@gmail.com
> > wrote:
>
>> Wow, I will give that a try. Thank you!
>>
>> On Thursday, January 28, 2016 at 6:52:38 AM UTC-8, Michael Landis wrote:
>>>
>>> Maybe I'm missing something, but the one thing I want from Date
Maybe I'm missing something, but the one thing I want from DateTime is the
ability to determine whether a day has elapsed since a file modify date,
but not just a calendar day... at least a business day (i.e. Saturdays and
Sundays don't count), but even better if a calendar could skip past
I am trying to compute some historical means and volatilities with Julia,
but I've been having some difficulty getting the declarations and/or
assignments right...
When I try a declaration, like either of these:
adjCloseMuVec::Vector{Float32}; # or...
Correction: a fixed size Vector of Float32
On Wednesday, January 27, 2016 at 10:26:09 PM UTC-8, Michael Landis wrote:
>
> I am trying to compute some historical means and volatilities with Julia,
> but I've been having some difficulty getting the declarations and/or
> assig
Most Julia built-ins are defined so that the first argument is the
(Smalltalk style) message receiver, but in(x,y) reverses the apparent
standard, testing whether x is in y (the message receiver). append(x,y)
appends y to x (the message receiver); push(x,y) pushes y onto x (the
message
Most Julia built-ins are defined so that the first argument is the
(Smalltalk style) message receiver, but in(x,y) reverses the apparent
standard, testing whether x is in y (the message receiver).
append(x,y) appends y to x (the message receiver);
push(x,y) pushes y onto x (the message
in [1,2,3])?
On Sunday, January 11, 2015 at 4:00:37 PM UTC-5, Michael Landis wrote:
Most Julia built-ins are defined so that the first argument is the
(Smalltalk style) message receiver, but in(x,y) reverses the apparent
standard, testing whether x is in y (the message receiver).
append(x,y
29 matches
Mail list logo