Thomas Leonard | 3 Apr 2010 11:06
Picon
Gravatar

"to" vs "method"

I just discovered that there are two ways of defining a method in E:

def foo1 {
	to run() { return 3 }
}

def foo2 {
	method run() { 3 }
}

Interestingly, calling foo2() is between 3 and 10 times faster than
calling foo1(), depending on how deeply nested the call is:

def time(cb) {
	def a := timer.now()
	for x in 1..100000 {
		cb()
	}
	def b := timer.now()
	return (b - a) / 100000
}

# Warm up
time(fn { foo1() })
time(fn { foo2() })

def nested(level, cb) {
	if (level == 0) {
		return cb()
	} else {
(Continue reading)

Kevin Reid | 3 Apr 2010 11:38
Picon
Gravatar

Re: "to" vs "method"

On Apr 3, 2010, at 5:06, Thomas Leonard wrote:

> I just discovered that there are two ways of defining a method in E:
>
> def foo1 {
> 	to run() { return 3 }
> }
>
> def foo2 {
> 	method run() { 3 }
> }

Yes. 'method' is intended as the 'internal' Kernel-E definition which  
doesn't magically bind any nouns. (For example, the expansion of fn {}  
does not use 'to'-equivalent.)

> Interestingly, calling foo2() is between 3 and 10 times faster than
> calling foo1(), depending on how deeply nested the call is:
> ...
> I guess this is because "to" uses __return, which is implemented by
> throwing an exception in Java (so speed depends on the size of the
> stack).

Yes. Of course, an optimizing implementation should be able to  
eliminate this cost, either by recognizing that no nonlocal exit is  
necessary (the just-returning-a-value case) or by compiling simple  
cases into a cheap jump.

E-on-CL does both (well, the latter provided the underlying CL  
cooperates).
(Continue reading)

Thomas Leonard | 4 Apr 2010 17:57
Picon
Gravatar

Re: "to" vs "method"

On 3 April 2010 10:38, Kevin Reid <kpreid@...> wrote:
> On Apr 3, 2010, at 5:06, Thomas Leonard wrote:
>
>> I just discovered that there are two ways of defining a method in E:
>>
>> def foo1 {
>>       to run() { return 3 }
>> }
>>
>> def foo2 {
>>       method run() { 3 }
>> }
>
> Yes. 'method' is intended as the 'internal' Kernel-E definition which
> doesn't magically bind any nouns. (For example, the expansion of fn {}
> does not use 'to'-equivalent.)
>
>> Interestingly, calling foo2() is between 3 and 10 times faster than
>> calling foo1(), depending on how deeply nested the call is:
>> ...
>> I guess this is because "to" uses __return, which is implemented by
>> throwing an exception in Java (so speed depends on the size of the
>> stack).

(note: I see Ejection overrides fillInStackTrace to do nothing, so I'm
not sure why it does depend on the stack depth now)

> Yes. Of course, an optimizing implementation should be able to
> eliminate this cost, either by recognizing that no nonlocal exit is
> necessary (the just-returning-a-value case) or by compiling simple
(Continue reading)

Yuvaraj Athur Raghuvir | 5 Apr 2010 18:53
Picon

Regarding AMQP Messaging paradigm and pattern in E-Lang

Hello,

Recently I came across AMQP (www.amqp.org) which defines an interesting, extensible and flexible message routing paradigm. The three major elements are exchange, binding and queues. With these three constructs, many of the standard messaging patterns can be realized.

From my understanding, computation is moving towards the network and thus, messaging and routing starts to play an important role.

In Capability based systems (OCAP), the management of capability is through explicit exchange of reference - the Granovetter diagram. This defines a point-to-point interaction model. In the world of messaging, this point-to-point seems to be one case of the possible many. Further, it is now becoming important that the messages are delivered not on a destination specification but on a pattern based specification of the destination. This allows for time independence of message creation and delivery.

Since the AMQP decouples the publisher via the exchange and the consumer via the queue, and manages the relation between the exchange and queue via binding, I wonder what would be the corresponding security pattern in E-Language. In particular, how to create a binding between the exchange and queue so that the security paradigm is not violated?

Any thoughts?

Regards,
Yuva

_______________________________________________
e-lang mailing list
e-lang@...
http://www.eros-os.org/mailman/listinfo/e-lang
Tom Van Cutsem | 6 Apr 2010 01:34
Picon
Favicon

Re: Regarding AMQP Messaging paradigm and pattern in E-Lang

In Capability based systems (OCAP), the management of capability is through explicit exchange of reference - the Granovetter diagram. This defines a point-to-point interaction model. In the world of messaging, this point-to-point seems to be one case of the possible many. Further, it is now becoming important that the messages are delivered not on a destination specification but on a pattern based specification of the destination. This allows for time independence of message creation and delivery.

In my dissertation, I explored exactly this relationship between object-oriented programming versus publish/subscribe-style interaction (cf. sections 3.4 and 7.2). I refer to the relevant differences between the two styles as the "object-event impedance mismatch". To overcome this impedance mismatch, I proposed "ambient references": object references that can designate an abstract set of objects, and that support both point-to-point and one-to-many messaging with objects in this set. Ambient references were developed not in E, but in AmbientTalk (a language largely influenced by E, employing essentially the same event loop concurrency model).

I didn't solve the security issues, however. In section 4.7 I explicitly describe AmbientTalk's shortcomings w.r.t. security, in particular w.r.t. it's service discovery mechanism (cf. p90). Because AmbientTalk was designed for ad hoc networks (networks without infrastructure), we could not rely upon a third party to act as an introducer between mutually suspicious distributed objects. Essentially, objects discover each other directly via an interface type, but any object has the ability to define or refer to such interfaces. Hence, once an object allows itself to be discovered through service discovery, any object can discover it.

Perhaps in a more traditional distributed system, where one can rely upon a trusted third party to act as an introducer, one can do a better job. I'm going to sketch a rough example of what I'm thinking about, comments/improvements are welcomed. Say the introducer defines the following 'channel' abstraction:

def [ publisher, subscriber ] := makeChannel();

The publisher can be used to publish services:
publisher<-publish(myservice);

and the subscriber used to discover services:
subscriber<-subscribe(callback);

with the understanding that publishing a service through a publisher notifies the callbacks registered through the corresponding subscriber.

The introducer can now hand out the publisher and subscriber 'facet' of this channel to different parties, who can now perform 'anonymous' publish/subscribe interactions. According to OCAP rules, only objects that were explicitly passed the corresponding publisher and subscriber facets can use the channel. However, the amount of trust that each participant can put in objects passed through the channel seems inherently limited to the amount of trust they can place in the introducer: it is this party that has full control over who gets to talk on the channel, by delegating the publisher/subscriber facets in an appropriate way.

Cheers,
Tom
_______________________________________________
e-lang mailing list
e-lang@...
http://www.eros-os.org/mailman/listinfo/e-lang
Baldur Jóhannsson | 11 Apr 2010 02:19
Picon

Erights wiki stuff


H'lo elang

Spam is being an proplem on the erights wiki, most of it is being  
posted anonymously (that is without using an wiki account).

I propose that anonymous posting be disabled but account creation  
allowed.

If that is unworkable in some way then instead we could try to require  
recaptcha with each anonymous edit.

-Zarutian
Baldur Jóhannsson | 11 Apr 2010 03:05
Picon

Erights wiki stuff


H'lo elang

Spam is being an proplem on the erights wiki, most of it is being  
posted anonymously (that is without using an wiki account).

I propose that anonymous posting be disabled but account creation  
allowed.

If that is unworkable in some way then instead we could try to require  
recaptcha with each anonymous
edit.
-Zarutian
David Wagner | 12 Apr 2010 09:04
Picon
Favicon

A Java stack inspection bug

I thought I would pass along this interesting bug in Java stack
inspection:

http://slightlyrandombrokenthoughts.blogspot.com/2010/04/java-trusted-method-chaining-cve-2010.html

I'm going to guess that this bug has been lurking for maybe a decade
or so.  I believe that this particular flaw would not arise in an object
capability language.
Mark S. Miller | 13 Apr 2010 02:44
Picon
Favicon

CFP: First workshop on Decentralized Coordination of Distributed Processes (DCDP 2010)

-- 
    Cheers,
    --MarkM

_______________________________________________
e-lang mailing list
e-lang@...
http://www.eros-os.org/mailman/listinfo/e-lang
Thomas Leonard | 13 Apr 2010 13:10
Picon
Favicon
Gravatar

Re: Various E patches

I'll commit the next set of patches on the proposed branch on Wednesday.
They are:

http://gitorious.org/~tal-itinnov/repo-roscidus/it-innovation/commits/proposed

* Preserve source information about the collection used in a for
expansion
* Added SQL quasi-parser
* Fix optimisation of simple return statements
* Share a single SafeScope within each vat
* Removed unnecessary synchronized on LazyEvalSlot
* In "not synchronously callable" error, give the verb

--

-- 
Dr Thomas Leonard
IT Innovation Centre
2 Venture Road
Southampton
Hampshire SO16 7NP

Tel: +44 0 23 8076 0834
Fax: +44 0 23 8076 0833
mailto:tal@...
http://www.it-innovation.soton.ac.uk 

Gmane