Displaying 16 results from an estimated 16 matches similar to: "Ruby++ FFI (theoretical)"
2006 Feb 15
2
extending rails via /lib - problems
I wanted to group some functions which I use in some models in one
place. Controllers have application.rb and views have helpers but I
couldn''t find anything about models. Using the /lib directory seemed to
be the only way.
Alright... so I have something like this:
/lib/code.rb
class ActiveRecord::Base
def method_a(n)
.......
end
def method_b(n)
........
end
end
2006 Jul 12
5
SystemStackError
SystemStackError in GreyController#grey_search
stack level too deep
can anybody please enlighten me on this one...any possible way to
troubleshoot?
thanks,
MSN id: ICEMANyears@netscape.net
--
Posted via http://www.ruby-forum.com/.
2012 Jul 27
3
Rspec: How to mock class method
Hi, I have two model: Message, User
message.rb
```
class Message < ActiveRecord::Base
class << self
def method_a(args)
[1,2]
end
end
end
```
user.rb
```
class User < ActiveRecord::Base
def method_user
if Message.method_a(''anythings'')
#... some code
end
end
end
```
I want to test method_user,but I don''t want to test
2007 Jun 09
11
authentication, controller specs. I think I''m missing something simple ....
Hi all,
I feel like I''m missing something really easy and I''m just not seeing
it.
I''m using the restful_authentication plugin and have a User model. Uesr
has_many :things and Thing belongs_to :user.
That''s it.
I did a "script/generate rspec_scaffold thing" to generate all the
necessary bits. The "rake db:migrate" to create the db.
At
2024 Jun 29
2
\>
Hi, Duncan:
On 6/29/24 17:24, Duncan Murdoch wrote:
>
>> ????? Yes. I'm not yet facile with "|>", but I'm learning.
>>
>>
>> ????? Spencer Graves
>
> There's very little to know.? This:
>
> ???? x |> f() |> g()
>
> is just a different way of writing
>
> ??? g(f(x))
>
> If f() or g() have extra
2017 Apr 24
1
[FFI] [OrcJIT] Status update on C FFI for OrcJIT?
I looked around for the status of OrcJIT FFI support. The last e-mail
thread I could find was this one: Link
<http://lists.llvm.org/pipermail/llvm-dev/2015-February/081679.html>
Raw: http://lists.llvm.org/pipermail/llvm-dev/2015-February/081679.html
Is OrcJIT now considered stable enough that there can be "official" exposed
C APIs?
If not, what's the standard approach if I
2008 Jan 23
6
JRuby and callbacks?
Hi all,
Any Java/JRuby folks on the list? I''d like to see if we can implement
api.c for JRuby using JNA and see how it handles the callbacks.
I''m not a Java guy, nor do I know JNA, but I''ll take a stab at it if no
one else on the list does.
Here are a couple of useful links:
http://www.infoq.com/news/2007/09/jna-jruby
https://jna.dev.java.net/
Regards,
Dan
This
2004 Apr 22
0
Ffi The doctor¡¯s in
clarisworks ogara chshz npt-d acked
Take charge of your medical conditions now. Order online. Live a healthier
and happier life - all from the comfort of your home! Quality Meds we offer:
V`ic0-din ES 90 Tab Special.
Fedex delivery.
http://hclgyt.net.azsw3d.com/?p=8089
Your comfort and convenience is our prime concern.
N.o thanks: http://uhbq.j.foresmdb.com/a.html
A professor was
2009 Oct 28
0
[LLVMdev] JIT, FFI
You're right, that probably won't have very good performance. What we
(unladen-swallow) do is to call getPointerToFunction which gives a
function pointer of type (void*)(void*) which we then cast to the
appropriate function type and then call from C/C++. That way the
C/C++ compiler for your application can codegen the function call once
instead having the JIT do it many times.
Reid
On
2010 Dec 14
2
[LLVMdev] OS X ffi in config.h
While browsing the configure generated llvm/Config/config.h, I'm noticed that
the macros:
HAVE_FFI_CALL
HAVE_FFI_FFI_H
HAVE_FFI_H
are not defined on OS X (currently 10.6.5).
Given that ffi exists on this platform (both headers and lib), is this result intended?
Thanks
Garrison
2010 Dec 14
0
[LLVMdev] OS X ffi in config.h
Ah, --enable-libffi.
Any pointers as why this is not a default check for at least
UNIX systems? Does Windows have the equivalent?
Thanks in advance
Garrison
On Dec 14, 2010, at 6:34, Garrison Venn wrote:
> While browsing the configure generated llvm/Config/config.h, I'm noticed that
> the macros:
>
> HAVE_FFI_CALL
> HAVE_FFI_FFI_H
> HAVE_FFI_H
>
> are not
2018 Feb 25
0
segfault calling SDL_Init with FFI/ MCJIT
I'm getting a segfault when I call `SDL_Init( SDL_INIT_VIDEO )` within
the MCJIT. If I compile the same program to an EXE I don't have a problem.
Are there any general restrictions, or known issues, with loading a
library like SDL2 via the MCJIT? (LLVM-3.8 still)
The stack trace, from GDB, is below. I noticed the error actually
happens deep inside a transitively loaded GL drive module,
2009 Oct 28
2
[LLVMdev] JIT, FFI
Hello, I'm new to LLVM and I had a question about it: when we call the
JIT::runFunction, since llvm doesn't has a full FFI, there are some cases in
which the JIT needs to codegen a stub function to call the function we are
interested, my question is: this stub function will remains in the module
until when ? What are the most efficient way to remove it from the module
and memory ? For a
2012 Apr 07
5
FFI and msvcrt
Hi,
I''ve been using FFI with a Ruby 1.9.3 built with MSVC++ and it''s been
working well. One thing I''ve run into though is this:
ffi_lib :msvcrt
But that''s not the runtime I want. But I don''t want to hard code the
runtime name either. I realize I could parse it out of RbConfig, but I
was hoping for something nicer.
Is there a way we could create an
2012 May 18
7
Dir.create_junction with FFI
Hi,
Try as I might, I just cannot get Dir.create_junction to work with FFI
in the ffi branch of the win32-dir project. The problem is the
REPARSE_JDATA_BUFFER struct. I''m just not sure how to set those
members, specifically, the PathBuffer member. The target looks good,
it''s UTF-16LE encoded, but I can''t make it work, despite trying
several ways of defining the struct,
2005 Jan 25
29
Write-up on RoR + XUL Sample
Hi Folks,
Just a quick message saying that, after much demand, I wrote a quick
write-up for the RoR + XUL thing I did yesterday:
http://www.zedshaw.com/blog/programming/ruby_xul.html
It lays out the few simple things I did, has a bit of rant on an
unrelated topic, and other stuff but it''s short still.
On a related note, I''d like to thank "xal" on IRC for reminding