Displaying 20 results from an estimated 40 matches for "arity".
Did you mean:
parity
2007 Sep 20
3
Bug? in wxSugar enumerable_controls.rb
..._all { |i| checked?(i) }
end
end
The problem I had is that checked_items raises an exception.
In fact, the find_all method uses the each method defined in
''wx_sugar/wx_classes/enumerable_controls.rb'' as following :
def each(&block)
last = get_count - 1
case block.arity
when 1
0.upto(last) { | i | yield i }
when 2
0.upto(last) { | i | yield i, get_string(i) }
when 3
0.upto(last) { | i | yield i, get_string(i), get_item_data(i) }
else
raise ArgumentError, "Invalid number of block parameters"
end
end
This meth...
2007 Dec 28
2
Arity?
...of the log.
And in the log I get:
...
PastPerfect4ImporterWorker started
past_perfect4_importer_worker started
Schedules for worker loaded
do_work {:zoom_class=>"StillImage", ... :default_attribution=>"Some
jerk wrote this.", :import_type=>"past_perfect4"}
Arity of method is -1
That seems to be the end of the road for the worker. It just stalls
there from what I can tell. What does Arity mean?
Any clues? I suspect it''s something small I''m missing.
Also, I replaced this on line 210 of server/meta_worker.rb:
logger.info &quo...
2012 Oct 19
0
[LLVMdev] Arity of the callee at each GC safe point
Hi,
In my backend I need to know the arity of the callee at each safe point
and export it in the .s file. This is needed for properly creating stack
descriptors for the calls. I could easily implement that in the frontend
for direct function calls but not for indirect calls (through register).
Is there a way to do that with the current inf...
2012 Dec 14
0
Announce: Puppet 3.0.2-rc3 available
...feedback via the Puppet Labs Redmine site, using an
affected puppet version of 3.0.2-rc3:
https://projects.puppetlabs.com/projects/puppet/
============================
## Puppet 3.0.2-rc3 Release Notes ##
============================
#10963 Collector overrides should work in Ruby 1.9
Increase arity of child_of? meta_def to 1
child_of? defined for Puppet::Resource::Type objects has an arity of 1,
but the meta_def of the same function created by
Puppet::Parser::Collector objects has an arity of 0. This throws errors
when the meta_def method is called with arguments. This commit...
2011 Jul 25
4
ipsets
...someipset = bitmap:ip,mac
1) br0:+someipset
2) br0:+someipset[2]
The first 1) doesn''t match anything in rules or tcrules, the second 2)
matches fine. (Also using +someipset[1] doesn''t match anything)
Is it possible/sensible/feasible to have shorewall figure out the ''arity
of the ipset? Is it an artifact of the ipset type used here?
Not tested this yet, but is it a more descriptive setup to do something
like defining someipset:loc in zones and "somealias br0:+someipset[2]"
in hosts? That way I *think* I can use "somealias" everywhere and avoid
n...
2007 Sep 21
5
Stubbing yielding methods
I''ve just been tying my brain in knots looking at bug #8687 (
http://rubyforge.org/tracker/index.php?func=detail&aid=8687&group_id=1917&atid=7477
).
I''ve been (1) trying to work out whether there is anything logically wrong
with Mocha''s existing behaviour and (2) whether Mocha should support the
requested functionality.
It all centres around the use of the
2013 Aug 07
2
[LLVMdev] Scheme on LLVM IR
Hello!
I've been trying to implement a simple compiler from Scheme to LLVM IR,
and have run into the following problem:
In Scheme, any function can be called on any number of arguments, but it
should check at runtime for arity errors.
I haven't been able to find a way in LLVM IR to access the actual number
of parameters a function was called with.
I think the following approach might solve the problem:
- Implement a new calling convention that passes the number of arguments
in a register, and all values in regist...
2008 Apr 16
5
[LLVMdev] PATCH: Use size reduction -- wave2
...s to the Use object
in most cases:
With exception of PHINode and SwitchInst, the getOperand() function
(if called on a specialized "this" pointer) does a "this"-relative
access instead of getting OperandList pointer first and going thru
that. This was the case before for fixed-arity instructions, but now
it applies to variadic ones too that cannot perform operand list
resizing.
Some things got faster, like
1) getOperand access on (say) CallInst is now fetching operands from
relative to "this". Also, there is no "new Use[n]" allocations (and
delete []) for...
2008 Apr 16
0
[LLVMdev] PATCH: Use size reduction -- wave2
...in most cases:
> With exception of PHINode and SwitchInst, the getOperand() function
> (if called on a specialized "this" pointer) does a "this"-relative
> access instead of getting OperandList pointer first and going thru
> that. This was the case before for fixed-arity instructions, but now
> it applies to variadic ones too that cannot perform operand list
> resizing.
>
> Some things got faster, like
> 1) getOperand access on (say) CallInst is now fetching operands from
> relative to "this". Also, there is no "new Use[n]" all...
2013 Aug 29
10
Concatenate two arrays
Hello again ruby community!
I just learned how to add two arrays(I know, i know).
My program looked like this
array1=[1,2,3]
array2=[4,5,6]
array_sum=array1+array2
I thought pretty simple stuff, they are combined. However, now i am
looking to define that code as a method and I do not understand how to
create the correct number of arguments, so when the method is called
back it gives me my
2006 Jun 25
0
Using the database schema to help validate data
...+ name = "#{column.name}_before_type_cast"
+ validates_length_of name, :maximum=>column.limit
+ end
+ end
+ }
+ end
+
def condition_block?(condition)
condition.respond_to?("call") && (condition.arity == 1 ||
condition.arity == -1)
end
--
Posted via http://www.ruby-forum.com/.
2007 Aug 06
1
Stubbing Enumerable#each
...of a class which descends from Array:
class ArrayDescendent < Array; end
#... in the specs...
@descendent = mock ArrayDescendent
How would I stub out ArrayDescendent#each, which is inherited from
Array, to return multiple values successively? I could use
and_yield, but that is raising an arity error (the anonymous function/
block should expect only *one value at a time, but and_yield is
yielding both values once). Should I be using a lambda expression here?
Tips are welcome...Thanks,
Scott
2013 Aug 07
0
[LLVMdev] Scheme on LLVM IR
...parameter for class methods.
Then you could either use varargs or bitcast your functions to a
reasonable type when used.
> Incidentially, the same handling is necessary for return values (any
> function can return any number of values, and the caller must check for
> correct return value arity).
A similar approach could work there, though targets aren't used to
dealing with lots of return values so you may encounter more problems
(i.e. LLVM bugs).
> Varargs seem a bad match, as everything is passed on the stack, not in
> registers, and no count is kept of the actual number of...
2013 Aug 07
1
[LLVMdev] Scheme on LLVM IR
...atic function seems to be APPLY. It takes a
function and a list of values as parameters, and applies the function to
the values [as in (apply + '(1 2 3)) -> (+ 1 2 3)]. So if varargs adhere
to the standard ABI, I could just cast the function to varargs
parameters, then call it, and (with the arity checking you described
above), things should work correctly?
>> Varargs seem a bad match, as everything is passed on the stack, not in
>> registers, and no count is kept of the actual number of arguments.
>
> Is that on x86-32 Windows? In almost all other cases varargs are
> p...
2009 Feb 23
1
are arithmetic comparison operators binary?
...o complaint on input that does not
consist of exactly 2 arguments?
in scheme (which is claimed to have been an inspiration for r), < works
on an arbitrary number of arguments:
(<)
;; #t
(< 1)
;; #t
(< 1 2 3)
;; #t
(< 1 2 0)
;; #f
but there < is an arity-dispatched procedure, not a binary one, and it
produces sensible output for any number of arguments (arguably for n=0, 1).
vQ
2009 Feb 23
1
are arithmetic comparison operators binary?
...o complaint on input that does not
consist of exactly 2 arguments?
in scheme (which is claimed to have been an inspiration for r), < works
on an arbitrary number of arguments:
(<)
;; #t
(< 1)
;; #t
(< 1 2 3)
;; #t
(< 1 2 0)
;; #f
but there < is an arity-dispatched procedure, not a binary one, and it
produces sensible output for any number of arguments (arguably for n=0, 1).
vQ
2008 Apr 16
0
[LLVMdev] PATCH: Use size reduction -- wave2
Hi Gabor,
Can you provide performance data for this? I'd
like to know what affect these changes have on
compile time.
Thanks,
Dan
On Apr 15, 2008, at 3:32 PM, Gabor Greif wrote:
> Hi All,
>
> here comes the patch for the second wave of Use class size reduction.
>
> I have included all the machinery that is needed, and it is
> *active*. The User* inside of Use is even
2016 Mar 09
2
RFC: Proposing an LLVM subproject for parallelism runtime and support libraries
...%f1, [float_literal];
ld.param.u64 %rl1, [result_loc];
add.f32 %f1, %f1, 123.0;
st.f32 [%rl1], %f1;
ret;
}
)";
// The number of arguments expected by the kernel described in
// KERNEL_PTX_TEMPLATE.
static constexpr int KERNEL_ARITY = 2;
// The name of the kernel described in KERNEL_PTX.
static constexpr const char *KERNEL_NAME = "add_mystery_value";
// The value added to the input in the kernel described in KERNEL_PTX.
static constexpr float MYSTERY_VALUE = 123.0f;
int main(int argc, char *arg...
2016 Mar 09
2
RFC: Proposing an LLVM subproject for parallelism runtime and support libraries
...%rl1, [result_loc];
> add.f32 %f1, %f1, 123.0;
> st.f32 [%rl1], %f1;
> ret;
> }
> )";
>
> // The number of arguments expected by the kernel described in
> // KERNEL_PTX_TEMPLATE.
> static constexpr int KERNEL_ARITY = 2;
>
> // The name of the kernel described in KERNEL_PTX.
> static constexpr const char *KERNEL_NAME = "add_mystery_value";
>
> // The value added to the input in the kernel described in KERNEL_PTX.
> static constexpr float MYSTERY_VALUE = 123.0f;
>...
2016 Mar 10
2
RFC: Proposing an LLVM subproject for parallelism runtime and support libraries
...add.f32 %f1, %f1, 123.0;
>> st.f32 [%rl1], %f1;
>> ret;
>> }
>> )";
>>
>> // The number of arguments expected by the kernel described in
>> // KERNEL_PTX_TEMPLATE.
>> static constexpr int KERNEL_ARITY = 2;
>>
>> // The name of the kernel described in KERNEL_PTX.
>> static constexpr const char *KERNEL_NAME = "add_mystery_value";
>>
>> // The value added to the input in the kernel described in KERNEL_PTX.
>> static constexpr float MYSTE...