Re: Prototype-Based Programming
- Posted by jimcbrown (admin) Sep 28, 2013
- 2247 views
You did not want to understand the context in which the library is referenced. Python and Java not required C-DLLs in the sense in which I mentioned them.
Then Euphoria shouldn't either.
Python is possible to expand the standard means of Python. C-DLLs are used for speed or for access nonexistent features. But how to expand Euphoria? C-DLL?
I think the usage of C-DLLs between Python and Euphoria is the same.
Unlike Python, Euphoria includes a built-in preprocessor. This makes it very easy to expand.
That's a pretty good anecdote. I was expecting example code, however.
Still, I'd rather take Francesco Cesarini's word for it than yours.
There is no communication via socket in my example. I contend that my example is essentially the same as PowerShell's cmdlets - both execute a helper script (akak a cmdlet), passing arguments via the command line: http://www.powershellpro.com/powershell-tutorial-introduction/tutorial-powershell-cmdlet/
Very funny. You found the manual, which says that the car can emit beeps and decided that the car - it's a hunting decoy.
No, I figured out how to take apart a ship and turn it into a coral reef. I didn't need to use a manual, either, but that's irrevelant here.
Agreed. Although you can effectively write and use cmdlets-like scripts in Euphoria,
NO. You don't understand, what is cmdlets really. They are not programs, they are classes. Cmdlet is run not in a separate process, but inside PowerShell. This makes it possible to object exchange (in the sense of OOP) between cmdlets.
Ok, I'll give you that. If you want all this AND it must be inside the same process/thread/etc (but why?) - that's not supported. There are versions of Euphoria that support this (http://openeuphoria.org/forum/m/30957.wc) but it's not standard.
If I have to cross the terrain with sharp stones, I'd rather ditch the Ferrari, but do not go barefoot.
I think this goes right in line with KISS.
OMG. Do not cling to the words. I do not remember such things, preferring every time specify in the documentation.
The last sentence is grammatically incorrect to the extent that I am not able to understand what you mean. (Normally, I don't care about such things as I can figure out what is meant anyways so it's not a problem.)
Explain otherwise. It would be great if there was a standard way to establish communication between the two programs at Euphoria.
Agreed. At the moment, there is not a "standard" one. We have standard methods of IPC (pipeio and sockets), which work with any kind of program, not just specifically Euphoria ones.
For example, I pass the map to function and get a sequence. I can send to DLL a few numbers only.
This is simply false. This is especially false if the DLL is written in Euphoria itself. Not only that, I pointed you to the documentation that explains how to pass things like complex sequences to an Euphoria DLL, and you said you already knew it Who is misunderstanding now?
You can save to file, but it is fraught with collisions. And so on.
Euphoria supports file locking, which should help mitigate this and make it managable. Not saying that file sharing is the best way, but if someone really wanted to do it this way using files, it can be done.
There is no easy way. PowerShell have such way. Actually, this is how it works. When you send picture from one program to another by unix-pipeline, it seems like you put picture and get picture, but internally it is just bytes flow. When you send picture from one cmdlet to another cmdlet, it is picture internally.
Agreed. The only exception to this is with Euphoria DLLs, where you can send the picture (represented by a sequence) internally. Otherwise, the technique used generally will invoke something like http://www.tutorialspoint.com/java/java_serialization.htm - simply because it's easier to do it this way in Euphoria.
But the exception to the rule does away with the rule entirely! It's possible to write a C DLL that would take a "picture" from one Euphoria program and make it accessible to another Euphoria program, without any sort of serialization. This is really hard, which is why Pete Lomax's Phix is the only one to do anything like this. But such a DLL would only need to be written once.