Right now in base jl_stat_ctime looks like this:
JL_DLLEXPORT double jl_stat_ctime(char *statbuf)
{
uv_stat_t *s;
s = (uv_stat_t*)statbuf;
return (double)s->st_ctim.tv_sec + (double)s->st_ctim.tv_nsec * 1e-9;
}
And it's called with
ccall(:jl_stat_ctime, Float64, (Ptr{UInt8},),
What version of Windows?
>>
>>
>> On Saturday, September 24, 2016 at 11:16:35 PM UTC-7, Brandon Taylor
>> wrote:
>>>
>>> Ok, I deleted the extraneous tags, and retagged. Same thing messages
>>> about no changes to commit.
>>>
&g
(x->fill(maximum(x),
>> size(payoff_matrix,i)), payoff_matrix[fill(:,nplayers)...,i],i) for i=1:
>> nplayers)...)
>>
>> Anyway, gotta go now. Have a good one.
>>
>> On Sunday, September 25, 2016 at 11:46:26 AM UTC-4, Brandon Taylor wrote:
>>>
>>&
This is a good exercise, perhaps another question on Stackoverflow would
> yield interesting variations.
>
> On Saturday, September 24, 2016 at 9:40:54 PM UTC-4, Brandon Taylor wrote:
>>
>> Or I guess that should be
>>
>> broadcast_slices(best_response_dimension, playe
Ok, I deleted the extraneous tags, and retagged. Same thing messages about
no changes to commit.
So I git added the new v0.1.0 folder and then committed manually.
Then I tried PkgDev.publish() and I got this:
ERROR: GitError(Code:EAUTH, Class:None, No errors)
in macro expansion at
Or I guess that should be
broadcast_slices(best_response_dimension, player_dimension, payoff_matrix,
players)
On Saturday, September 24, 2016 at 9:38:55 PM UTC-4, Brandon Taylor wrote:
>
> I guess, but I'm trying to write a generic program where I don't know the
> size of the array? I
I guess, but I'm trying to write a generic program where I don't know the
size of the array? I'm trying to find Nash Equilibrium for an n dimensional
array, where the player strategies are along dimensions 1:n-1, and the
players are along dimension n. So:
equals_max(x) = x .== maximum(x)
Is there a way to slice two or more arrays along the same dimension,
broadcast a function over the slices, then put the results back together
again along the sliced dimension? Essentially, broadcast_slices?
I like using chaining macros a lot, but it tanks my code coverage. For
example, if I did something like this, the three lines in the middle would
be marked as not covered. Is this a bug? Should I raise an issue somewhere?
This seems like it's a general issue with multi-line expressions (for
I'm looking to add an additional dataframes library. I was going to pick up
all the additional functions that are in tidyr and dplyr that aren't
covered in dataframes.jl and dataframesmeta.jl but I wanted to check
whether something like this existed first.
I think I saw something about a mutate in place package. Specifically, I'm
looking for a package to automatically create safe versions of functions
like push! I've got a tiny macro if it doesn't exist elsewhere.
macro safe(f)
esc(safe(f))
end
function safe(f::Symbol)
f_string = string(f)
I was wondering why the following code is so slow:
@time broadcast( (x...) -> +(x...), [1:1000], [1001:2000] )
In comparison to
@time broadcast(+, [1:1000], [1001:2000] )
and what would be a faster way to define an anonymous function with a
variable number of arguments? Note, I can't use zip
I know Julia has DataFramesMeta, but is there a package for querying native
Julia DataFrames using SQL?
of
program-manipulating programs that do trade in this common representation.
This is probably the best quote about homoiconicity I've read anywhere
and explains why the term is tricky to pin down.
On Fri, Jul 24, 2015 at 2:21 PM, Brandon Taylor brandon@gmail.com
wrote:
Macros seem to have
,
it is convenient (though again not necessary) to have environment access.
On Saturday, July 25, 2015 at 7:34:44 AM UTC-4, Milan Bouchet-Valat wrote:
Le samedi 25 juillet 2015 à 01:58 -0700, Brandon Taylor a écrit :
Well a somewhat unique feature or R is automatic argument recycling,
so
for that.
Learning a bit about C compilers convinced me that I was completely wrong
about environments needing to be implemented for scoping to work.
On Friday, July 24, 2015 at 3:46:28 AM UTC-4, Milan Bouchet-Valat wrote:
Le jeudi 23 juillet 2015 à 15:31 -0700, Brandon Taylor a écrit :
I'm not saying
Macros seem to have a bunch of limitations. They can't be overloaded to take
advantage of Julia's typing system. Their functionality can somewhat mimic
evaluation within a function in its direct parent environment, but what if you
want to write functions within your macro, or macros inside your
Macros seem to have a bunch of limitations. They can't be overloaded to take
advantage of Julia's typing system. Their functionality can somewhat mimic
evaluation within a function in its direct parent environment, but what if you
want to write functions within your macro, or macros inside your
:
On Wed, Jul 22, 2015 at 10:51 PM, Brandon Taylor
brandon@gmail.com javascript: wrote:
Ok, made some progress. Still having trouble with a _ENV_ not defined
error:
how could it not be defined if it's a global variable??? Figuring out
argument passing is going to be tricky. Is this kind
itself, at least as a viable R alternative.
On Friday, July 24, 2015 at 12:35:13 AM UTC+4, Yichao Yu wrote:
On Thu, Jul 23, 2015 at 4:23 PM, Brandon Taylor
brandon@gmail.com javascript: wrote:
Will it cause a slowdown because there is a better way to do it or will
it
cause
(_ENV_REPLACE_($_Lazy_))
end)
end
@_LAZY_EVAL_(_LAZY_(e))
eval(_ENV_)[a]
eval(_ENV_)[b]
eval(_ENV_)[test]() ## ERROR HERE
On Wednesday, July 22, 2015 at 11:30:10 AM UTC+8, Brandon Taylor wrote:
More to do:
Expressions would also have to be escaped from quoting.
If we can't scope types
, Brandon Taylor wrote:
Ok so I've got a good start. I bet John Myles White didn't think I could
get this far. Anyway, I'm getting caught up in defining my own escape
function. I'm getting lost in multiple layers of meta.
using DataFrames
import Base.convert
# allow inheritance from
anonymous to avoid performance slowdowns?
On Tuesday, July 21, 2015 at 10:10:58 AM UTC+8, Brandon Taylor wrote:
And there would need to be a special marker for them, such that if I'm in
function f, f[:a] won't get preprocessed as f[:f][:a]
On Tuesday, July 21, 2015 at 10:03:08 AM UTC+8, Brandon
I'm getting a cannot assign variables in other modules error.
On Tuesday, July 21, 2015 at 6:39:44 AM UTC+8, Yichao Yu wrote:
On Mon, Jul 20, 2015 at 6:35 PM, Brandon Taylor
brandon@gmail.com javascript: wrote:
Ok, a thought, Julia has an inbuilt idea of a module. Would
I should be possible to preprocess code such that everything is put into a
dict based on the name of enclosing function (and global variables will
just go into a dict called global).
On Tuesday, July 21, 2015 at 9:42:00 AM UTC+8, Brandon Taylor wrote:
Dicts seem to work pretty well
Although that would probably require nested dicts. Each would have a parent
dict, and if a lookup isn't found in the current dict, the parent dict
would be searched.
On Tuesday, July 21, 2015 at 9:53:50 AM UTC+8, Brandon Taylor wrote:
I should be possible to preprocess code
And there would need to be a special marker for them, such that if I'm in
function f, f[:a] won't get preprocessed as f[:f][:a]
On Tuesday, July 21, 2015 at 10:03:08 AM UTC+8, Brandon Taylor wrote:
Although that would probably require nested dicts. Each would have a
parent dict
:31:36 PM UTC+8, Brandon Taylor wrote:
I don't know if you came across the vignette?
http://cran.r-project.org/web/packages/lazyeval/vignettes/lazyeval.html ?
dplyr uses lazyeval extensively, see
http://cran.r-project.org/web/packages/dplyr/vignettes/nse.html . The
cool thing about being
Yes, that works much better. Is the semicolon necessary for splatting key word
arguments?
Hi, I'm trying to come up with a reasonable syntax for iteratively building
function calls. Here is the best I've got so far.
using Lazy
using DataFrames
type Call!
e::Expr
end
function Call!(c::Call, e::Expr)
c.e.args = [c.e.args, e.args[2:end]]
c
end
@_ begin
Call(:( DataFrame() ))
in Julia
would be being able to use the self-reflection capabilities.
On Friday, July 10, 2015 at 10:57:16 AM UTC-4, Cedric St-Jean wrote:
On Thursday, July 9, 2015 at 10:35:30 PM UTC-4, Brandon Taylor wrote:
To walk back in time, you could say something like: compile this like
Hmm, so the reason that macros are able to function is that they occur
before type computation? One solution might be to make scope annotations
that override defaults. Then, when eval is called, it optionally attaches
scope annotations to a given scope. Note that scope annotations should be
are
compiled as if they were in global scope. Or maybe not, macros still
confuse me.
On Thursday, July 9, 2015 at 9:11:05 PM UTC-4, Cedric St-Jean wrote:
On Thursday, July 9, 2015 at 4:14:32 PM UTC-4, Brandon Taylor wrote:
Ok, here's where I'm getting hung up. You said that the compiler
Is the issue garbage collection? That because by choosing variables
dynamically from a symbol table, you don't know which variables are going
to be used, so you don't know which data can be deleted early?
On Thursday, July 9, 2015 at 10:35:30 PM UTC-4, Brandon Taylor wrote:
To walk back
make it possible to walk back in time even within the same scope.
On Wednesday, July 8, 2015 at 8:31:44 PM UTC-4, Yichao Yu wrote:
On Wed, Jul 8, 2015 at 8:23 PM, Yichao Yu yyc...@gmail.com javascript:
wrote:
On Wed, Jul 8, 2015 at 7:48 PM, Brandon Taylor
brandon@gmail.com javascript
Unless it did, in which case, I'm just uneducated.
On Thursday, July 9, 2015 at 6:31:03 PM UTC-4, Brandon Taylor wrote:
Ok, that was an interesting article, but it didn't really answer my
question.
On Thursday, July 9, 2015 at 4:20:45 PM UTC-4, Isaiah wrote:
https://en.wikipedia.org/wiki
Ok, that was an interesting article, but it didn't really answer my
question.
On Thursday, July 9, 2015 at 4:20:45 PM UTC-4, Isaiah wrote:
https://en.wikipedia.org/wiki/Variable_(computer_science)#Scope_and_extent
On Thu, Jul 9, 2015 at 4:14 PM, Brandon Taylor brandon@gmail.com
Hadley Wickham's lazyeval package in R is pretty cool in that you can
attach an environment to an expression, pass it in and out of functions
with various modifications, and then evaluate the expression within the
original environment (or any other environment that you choose). R in
general
8, 2015 at 3:37:04 PM UTC-4, Brandon Taylor wrote:
*reifying. Deifying environments might not be the best idea.
On Wednesday, July 8, 2015 at 3:34:53 PM UTC-4, Brandon Taylor wrote:
I was aware of those packages (though I hadn't read the discussions
referenced). Macros are great
If scoping rules are too complicated and cause confusion, why are they
built into the base implementation of function?
On Wednesday, July 8, 2015 at 3:48:52 PM UTC-4, Milan Bouchet-Valat wrote:
Le mercredi 08 juillet 2015 à 12:34 -0700, Brandon Taylor a écrit :
I was aware of those packages
a more thorough
answer, but the above may at least be a place to start.
On Wednesday, July 8, 2015 at 2:03:45 PM UTC-4, Brandon Taylor wrote:
Hadley Wickham's lazyeval package in R is pretty cool in that you can
attach an environment to an expression, pass it in and out of functions
It should be noted that in R, environments are simply pointers. They take
up no memory and shouldn't cause drastic slowdowns (I don't think).
On Wednesday, July 8, 2015 at 3:48:08 PM UTC-4, Brandon Taylor wrote:
For example, here's a code snippet from R:
function (x, data) eval(x$expr, data
In fact, if environments could be reifyed, I'd go so far as to say that
Julia should have a separate syntax for a) evaluating an expression in its
defining environment and b) evaluating an expression in its evaluation
environment.
On Wednesday, July 8, 2015 at 3:53:29 PM UTC-4, Brandon Taylor
(with_helper(d, body))
end
On Wednesday, July 8, 2015 at 3:50:12 PM UTC-4, Brandon Taylor wrote:
It should be noted that in R, environments are simply pointers. They take
up no memory and shouldn't cause drastic slowdowns (I don't think).
On Wednesday, July 8, 2015 at 3:48:08 PM UTC-4, Brandon
All functions.
On Wednesday, July 8, 2015 at 4:18:09 PM UTC-4, Milan Bouchet-Valat wrote:
Le mercredi 08 juillet 2015 à 12:57 -0700, Brandon Taylor a écrit :
If scoping rules are too complicated and cause confusion, why are
they built into the base implementation of function?
What do
/ reflection, but they
do not exist at runtime or for the local scope.
On Wed, Jul 8, 2015 at 7:06 PM Brandon Taylor brandon@gmail.com
javascript: wrote:
Surely environments already exist somewhere inside Julia? How else could
you keep track of scope? It would be simply a matter
Hmm, maybe I'm confused about compilation vs interpretation. Let me
rephrase. Regardless of a how or when statement is evaluated, it must have
access at least to its parent environments to successfully resolve a symbol.
On Wednesday, July 8, 2015 at 7:34:09 PM UTC-4, Brandon Taylor wrote
Edit: Hmm, so that means that any implementation of environments would have
to be handled in two separate ways: one by the compiler for non-global
scope, and one in run time for the special global system?]
On Wednesday, July 8, 2015 at 9:49:50 PM UTC-4, Brandon Taylor wrote:
Hmm, so
, 2015 at 8:23 PM, Yichao Yu yyc...@gmail.com javascript:
wrote:
On Wed, Jul 8, 2015 at 7:48 PM, Brandon Taylor
brandon@gmail.com javascript: wrote:
Hmm, maybe I'm confused about compilation vs interpretation. Let me
rephrase. Regardless of a how or when statement is evaluated
*reifying. Deifying environments might not be the best idea.
On Wednesday, July 8, 2015 at 3:34:53 PM UTC-4, Brandon Taylor wrote:
I was aware of those packages (though I hadn't read the discussions
referenced). Macros are great but they are incredibly difficult to reason
with concerning
Here is a simplified version of a DBI type scheme, almost entirely using
convert function overloads. I temporarily have eval_foreign instead of
eval, because I cannot figure out how to overload Base.eval successfully.
cd(/home/haldane/Julia_package)
using DataFrames
using SQLite
using Lazy
One question is to allow passing ... arguments to the DataFrame to csv
conversion functions while still retaining the chain-able argument in the
lass position; see https://github.com/JuliaLang/julia/issues/11722
On Saturday, June 27, 2015 at 10:19:35 AM UTC-4, Brandon Taylor wrote:
Here
52 matches
Mail list logo