Arc Forumnew | comments | leaders | submit | treef's commentslogin
5 points by treef 6378 days ago | link | parent | on: FFI : a suggestion

This is cool and quite simple. But we don't just want ffi to native libs but also jvm and .net monstrosities. Since Arc is such a web2.0 language maybe some thing like a client server arch for ffi as in each language has a "ffi-server" like native-c, .net, java, python, perl ... arc connect to it via TCP and calls functions and gets data back. This could be optimized further and I think facebook has some thing like this (link any one?).

What you describe is very standard way to do a ffi - am trying to think out of the box, can I get any help?

-----

4 points by kens1 6375 days ago | link

Client-server sounds more like RPC than FFI. That leads to SOAP and WSDL, or XML-RPC if you want something lighter weight.

The biggest problem I see with implementing FFI through a server is it's very expensive if the server needs lots of the client state. For instance, suppose you implement matrix determinant in C for speed. With client-server, you'd need to copy the whole matrix across the connection; with local FFI, the C code can access the matrix directly.

-----

1 point by sacado 6375 days ago | link

Well, the client-server stuff can easily be done through sockets and a dedicated protocol on the native-process side. There are many such protocols, but this is not what I am after. I need ease of use (and, for other cases, speed).

Very standard, I know, but (as for now) I just want to use POSIX functions for a system utility. Picking in a .so file is just what I need. I don't want to start a server process, secure it (we're talking about functions manipulating my system and available to others through the net) and then communicate with it.

As for JVM and .Net, I totally agree with you. When I'll have something working, doing (for example) a JNI wrapper should be easy.

-----

1 point by treef 6378 days ago | link | parent | on: asds

Maybe this is the ultimate control structure? Very easy to type

-----

1 point by treef 6378 days ago | link | parent | on: Password trouble

Yeah the sites are messed up i have a HN account and a account on this form but it looks like after PG copied some thing wrong and now i log in to randomly either treeform or treef.

-----

1 point by treef 6378 days ago | link | parent | on: Web Scaffolding

Its not always good to have macros writing macros one has to maintain it :)

-----

1 point by almkglor 6378 days ago | link

Yes, but at least I don't have to write the macro directly, ne? ^^

-----


I would also like to hear what pg has to say about the doc strings we are using the the Anarki repo.

-----

4 points by treef 6379 days ago | link | parent | on: Anarki Down

nex3 thanks for hosting the git repo its great - its one of those things that keeps me in the community.

-----

1 point by treef 6379 days ago | link | parent | on: Arc with vim

yes this is the method i used from day one works very well. It be good if we can unify it with good syntax highlighting and short cuts.

-----

1 point by treef 6379 days ago | link | parent | on: Arc with vim

i also stuck the vi script i picked up earlier on the forum it - it can execute expressions or full file when you press f5 or f6 in a different window that is running arc that is started by python that is piped from vim.

-----


should i remove it form my resume?

-----

8 points by cchooper 6381 days ago | link

To be honest, I quite like VB. Maybe it's because my first language was BBC BASIC. Ah, those were the days...

  10 PRINT "*"
  20 GOTO 10
When you're 6 years old, that's the most exciting program in the world.

-----

4 points by sacado 6381 days ago | link

Ah, I remember that too. Those innocent days where most of the problems were like "should I use 'print' or 'input' there ? What's the difference between them ?"

-----

3 points by prime2 6381 days ago | link

Yes, I have removed that and am considering playing down how long I did PHP.

-----


congratz this really is a good solution

-----

More