You have to call the function in order for it to work. Source() === source returns true.
If you call Source() with no arguments, it returns the source object, or if you call it with arguments then the first argument is the name of the method (or property) and the remaining arguments (if any) get passed as arguments to the method.
It's unusual to have to put parentheses after every role identifier but does that make it an invalid DCI implementation? I don't think so...if so, why?
On 6/15/15 2:37 PM, Egon Elbre wrote:
On Monday, June 15, 2015, Matthew Browne <mbro...@gmail.com> wrote:I don't think it's the same as a wrapper implementation.
You have to call the function in order for it to work. Source() === source returns true.
If you call Source() with no arguments, it returns the source object, or if you call it with arguments then the first argument is the name of the method (or property) and the remaining arguments (if any) get passed as arguments to the method.
It's unusual to have to put parentheses after every role identifier but does that make it an invalid DCI implementation? I don't think so...if so, why?
By the same argument why wrapper is an invalid DCI implementation. This implementation is just a wrapper in disugise. In this case the wrapper is a function instead of an object.
It's always the same object, you just have to put in some parentheses to get to it...the only wrapper object the programmer has access to is the "role function" itself, and it doesn't do the programmer any good to use that directly because no methods can be called on it directly. It would also be possible to forbid incorrect usage...it should use a smarter regex or a real parser, but here's an example to show the idea:
var ctxSrc = ctxFn.toString();
var methods, rexp;
for (var rName in roleMethods) {
methods = roleMethods[roleName];
rexp = new RegExp('\\s' + roleName + '(?!(\\s*\[\(=:]))', 'g');
for (var methodName in methods) {
//TODO use a better regex than this naiive one
if (rexp.test(ctxSrc)) {
throw new Error("Syntax error: In this DCI implementation, roles must be called as functions, e.g. MyRole('foo') instead of MyRole.foo()");
}
}
}
Fiddle: http://jsfiddle.net/mbrowne/bjtexdb8/3/
BTW, I suppose you consider that Trygve's Java\UC implementation uses wrappers in disguise also?
--
You received this message because you are subscribed to a topic in the Google Groups "object-composition" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/object-composition/nnxDYYMC5qc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to object-composit...@googlegroups.com.
To post to this group, send email to object-co...@googlegroups.com.
Visit this group at http://groups.google.com/group/object-composition.
For more options, visit https://groups.google.com/d/optout.
On Monday, June 15, 2015, Matthew Browne <mbro...@gmail.com> wrote:On 6/15/15 2:37 PM, Egon Elbre wrote:
On Monday, June 15, 2015, Matthew Browne <mbro...@gmail.com> wrote:I don't think it's the same as a wrapper implementation.
You have to call the function in order for it to work. Source() === source returns true.
If you call Source() with no arguments, it returns the source object, or if you call it with arguments then the first argument is the name of the method (or property) and the remaining arguments (if any) get passed as arguments to the method.
It's unusual to have to put parentheses after every role identifier but does that make it an invalid DCI implementation? I don't think so...if so, why?
By the same argument why wrapper is an invalid DCI implementation. This implementation is just a wrapper in disugise. In this case the wrapper is a function instead of an object.I agree that it's not exactly the same. Something between name mangling and wrapper is more appropriate.But just because you make impossible to access the wrapper, doesn't mean it's not there. But I agree that it's safer than an accessible wrapper. It feels like something that can break under some circumstances, e.g. eval("Sou" + "rce"). Than again I can't think of a real world case where this could happen.
I came up with an alternative approach:
http://jsfiddle.net/mbrowne/13jg3507/2/
It has at least one flaw not shared by my previous implementation (passing role players to non-Context functions, as mentioned in a code comment), but the syntax is a lot nicer. Note that instance methods do not have access to role methods. It works by requiring that all roles be accessed via a 'roles' object, which calls a getter method under the hood to set the current context and role name -- but those are reset as soon as a role method is called. If the 'roles.' prefix is considered too verbose, then it could be aliased to something else, e.g. '$.' or '_.'.
It may have other flaws...I'd be interested to hear how you all think it compares to my previous version.
On Tuesday, 16 June 2015 17:29:41 UTC+3, Matthew Browne wrote:I came up with an alternative approach:
http://jsfiddle.net/mbrowne/13jg3507/2/
It has at least one flaw not shared by my previous implementation (passing role players to non-Context functions, as mentioned in a code comment), but the syntax is a lot nicer. Note that instance methods do not have access to role methods. It works by requiring that all roles be accessed via a 'roles' object, which calls a getter method under the hood to set the current context and role name -- but those are reset as soon as a role method is called. If the 'roles.' prefix is considered too verbose, then it could be aliased to something else, e.g. '$.' or '_.'.
Doesn't work with callbacks, which from JS standpoint is a bigger issue than not supporting eval.e.g. add window.setTimeout(function(){ roles.self.withdraw(); }, 100) into transferOut and you'll get "cannot read property 'withdraw' of undefined".
Also there seems to be some kind of bug with binding... e.g. try
roles.self.withdraw();roles.self.withdraw();
It substitutes some issues for other issues. Essentially they both have problems that may cause non-obvious issues, which means I wouldn't use either. I would rather use a simple wrapper, with it's know issues, or do the name-mangling manually. Neither of them is perfect, but the issues are clear and known in JS.
On 6/16/15 11:35 AM, Egon Elbre wrote:
On Tuesday, 16 June 2015 17:29:41 UTC+3, Matthew Browne wrote:Thanks for pointing out those issues...the implementation of 'self' needs some work. If you instead do roles.Source.withdraw() in a callback, or calling it twice in a row, it will work.I came up with an alternative approach:
http://jsfiddle.net/mbrowne/13jg3507/2/
It has at least one flaw not shared by my previous implementation (passing role players to non-Context functions, as mentioned in a code comment), but the syntax is a lot nicer. Note that instance methods do not have access to role methods. It works by requiring that all roles be accessed via a 'roles' object, which calls a getter method under the hood to set the current context and role name -- but those are reset as soon as a role method is called. If the 'roles.' prefix is considered too verbose, then it could be aliased to something else, e.g. '$.' or '_.'.
Doesn't work with callbacks, which from JS standpoint is a bigger issue than not supporting eval.e.g. add window.setTimeout(function(){ roles.self.withdraw(); }, 100) into transferOut and you'll get "cannot read property 'withdraw' of undefined".
Also there seems to be some kind of bug with binding... e.g. try
roles.self.withdraw();roles.self.withdraw();
It substitutes some issues for other issues. Essentially they both have problems that may cause non-obvious issues, which means I wouldn't use either. I would rather use a simple wrapper, with it's know issues, or do the name-mangling manually. Neither of them is perfect, but the issues are clear and known in JS.I think it would probably be possible to determine all the issues with this approach so that they are all "known" issues. So I think this implementation might still have a place for those who don't want to use wrappers and also don't want to use source transformation for whatever reason. If I can fix the issues with 'self' then I think we could even post some examples using this implementation on fulloo.info that would be at least as good as the native Ruby examples. On the other hand it might be better to just encourage the use of a source transformation solution and keep this in our back pocket...I suppose it depends on how JS programmers react to adding another step to their build process (I'm guessing that at least 90% of JS programmers wouldn't mind at all).
But I think these implementations may also have value as a model for other languages for which the community might be more resistant to adding a source transformation step...although I'm not sure if these implementations would be possible in other languages.
Just to clarify things from my JS research/experiments...
1. Premise, role names (and "this") should equal their players. This is to make absolutely clear that there are no object identity issues. Otherwise you can start getting all sorts of issues e.g. with eval / callbacks.
2. To make it exactly fit JS, the code for method calls should look like "role.method(...)".To make it work there are two approaches:
2.1 Inject the method into the object - either adding them directly to the object or modify the prototype chain, or inject them into one of the object prototypes... that part is pretty easy. However, once you add it, you need to also remove so that there aren't any memory leaks and callbacks work. When you use manual or automatic removal of those methods, there will be a potential problem where a callback returns and the context has already been destroyed. When you don't remove them you'll get a memory leak - and I didn't find any way to make JS runtime automatically collect the unused contexts and methods. Even if it eventually collects it there is also possibility that when you do two Transfers in a row the GC hasn't triggered yet and the methods in the first Transfer are still bound - hence you'll get an invalid method clash.
2.2 Do a source transformation. This makes you have issues with debuggability and integrating with existing tooling. This also has a problem that eval("Source.withdraw()") won't work - the method call would resolve to the Object and when you don't allow method shadowing, this will throw an error.
I experimented with this a couple weeks ago and didn't get a chance to post about it yet; I can post some example code if you're interested.
Here's a version that includes role binding info both in the role players and in the "reflection Context" objects I mentioned in my last email:
http://jsfiddle.net/mbrowne/13jg3507/4/
The reflection Contexts are never garbage collected as long as some object that played a role in the corresponding Context still exists, but I don't think it matters because the memory footprint is low. The role methods are only stored once per Context function.
I haven't updated the code that generates the role method delegator functions yet, but I'm pretty sure it would be possible to allow for name conflicts between roles (including roles in different Contexts) thanks to the way I've organized the role methods (first by Context instance, then by role name).
As to the GC issues, I explained in my previous email why I think this implementation solves that, but I'm not sure how to test it correctly to make sure...I guess by creating thousands of objects?
Two drawbacks of the reflection to look up role bindings:
1. You can't use a Context instance to directly look up the objects currently bound to roles; you need to have a reference to an object and then you can check to see what roles it's bound to.
So if you want to see role bindings, it would generally make the most sense to just look in the object's __roles property.
2. When inspecting an object, it doesn't tell you which role bindings are currently active; it simply lists all of them (including role bindings from Contexts that no longer exist). It may be possible to have it exclude Contexts that no longer exist (i.e. that have been GC'd) with further use of WeakMaps.
With respect to #2, I experimented with Trygve's suggestion to use the execution stack (using this library), but this seems not to be useful without ugly hacks since the JS execution stack doesn't allow you to see whether or not the function that was called was inside a particular Context function. The best I was able to accomplish was using line numbers to see if the call to the reflection facility was literally within the starting and ending lines of the Context, which of course would require a preprocessing step to determine what those line numbers are. So I think we can probably rule out that idea as impractical for JS.
But I'm not sure there's actually a need for the reflection API to tell you which roles are currently active; I think it should be obvious to the programmer that they're active from within the Context containing the roles, and not active outside of it (since roles are always private to Contexts).
On Wed, Jun 17, 2015 at 6:37 AM, Matthew Browne <mbro...@gmail.com> wrote:
Here's a version that includes role binding info both in the role players and in the "reflection Context" objects I mentioned in my last email:
http://jsfiddle.net/mbrowne/13jg3507/4/
The reflection Contexts are never garbage collected as long as some object that played a role in the corresponding Context still exists, but I don't think it matters because the memory footprint is low. The role methods are only stored once per Context function.
I haven't updated the code that generates the role method delegator functions yet, but I'm pretty sure it would be possible to allow for name conflicts between roles (including roles in different Contexts) thanks to the way I've organized the role methods (first by Context instance, then by role name).
As to the GC issues, I explained in my previous email why I think this implementation solves that, but I'm not sure how to test it correctly to make sure...I guess by creating thousands of objects?
Add method clashing checks, to see whether the things get GC-d in time.
window.setInterval(function(){ for(var i = 0; i < 1000; i++){ TransferMoney(src,dst,10) } }, 500)
Also make TransferMoney call itself recursively (whether there are other side-effects... although in practice it shouldn't come up often.)
Then monitor the page memory usage stats.
Hi Egon,
Here's some code I'm considering as being an official example for this new implementation (with some changes inspired by your feedback):
var dci = require('simple-dci'),
Account = require('Account');
/**
* Context for Transfer Money use case
*
* @param {Account} sourceAccount
* @param {Account} destinationAccount
* @param {number} amount
*/
module.exports = dci.Context(function TransferMoney(sourceAccount, destinationAccount, amount) {
var ctx = roles();
ctx.source.withdraw();
ctx.destination.deposit();
function roles() {
return dci.Roles(TransferMoney, {
source: {
player: sourceAccount
, contract: Account
, withdraw: function() {
if (ctx.source.balance < ctx.amount) {
throw new Error('Insufficient funds');
}
ctx.source.decreaseBalance(ctx.amount);
}
}
, destinatinon: {
player: sourceAccount
, contract: Account
, deposit: function() {
ctx.destinatinon.increaseBalance(ctx.amount);
}
}
, amount: {
player: amount
, contract: Number
}
});
}
});
I agree that it looked nice with transfer.source and transfer.destination but I ctx is just so much shorter to type ;) The downside would be in a Context with multiple trigger methods, where ctx should probably refer to the actual instance, in which case it wouldn't be a good idea to be adding roles to it since it would expose those roles outside the Context.
I also changed it so the main function logic is above the roles (thanks to the roles() function) but that's just a personal preference.
Perhaps the most notable change is the introduction of role-object contracts, which I realized I can enforce at role-binding time. contract could also be set to a function for custom contract checking logic.
I also got rid of the transferOut() function and moved that logic to the main function, since I don't think the transfer logic really belongs to the source any more than it does the destination. It could go either way though and I might continue to use my earlier transferOut() version in the future since it's a simple test of a role calling both another role and itself.
The only thing (about the syntax) that still bothers me a bit is the lack of a 'self' identifier; the ability to use 'self' or 'this' is a useful shorthand that many OO programmers are accustomed to.
On the other hand, the explicit use of the role name would be a good thing in some cases anyway since it could add clarity. this of course correctly refers to the role player, but you can only call instance methods on it which I think is inconsistent.
module.exports = dci.Context(function TransferMoney(sourceAccount, destinationAccount, amount) {
var ctx = roles();
ctx.source.withdraw();
ctx.destination.deposit();
function roles() {
return dci.Roles(TransferMoney, {
source: {
player: sourceAccount
, contract: Account
, withdraw: function() {
if (ctx.source.balance < ctx.amount) {
throw new Error('Insufficient funds');
}
ctx.source.decreaseBalance(ctx.amount);
, destinatinon: {
player: sourceAccount
, contract: Account
, deposit: function() {
ctx.destinatinon.increaseBalance(ctx.amount);
}
}
On Thursday, 18 June 2015 13:07:39 UTC+3, Matthew Browne wrote:
return dci.Roles(TransferMoney, {
Am I missing something obvious; i.e. did you need to pass TransferMoney into "Roles"?
Hello Matt, it's looking really nice now!
I was hoping for some syntax improvements, I think a clear syntax is one of the most important things to have.
After all the code is a mental model itself, when matched gives this Matrix moment "I don't even see the code". (https://www.youtube.com/watch?v=qAYXgbSlSv0)
A few comments:
module.exports = dci.Context(function TransferMoney(sourceAccount, destinationAccount, amount) {
var ctx = roles();
ctx.source.withdraw();
ctx.destination.deposit();
function roles() {
return dci.Roles(TransferMoney, {
Same question as Egon here, do you need to pass TransferMoney? Also what about the naming: ctx = roles()? Shouldn't it be more like ctx = context()?
Having the context object passed as a parameter to the function would be nice, but I don't know if it's possible:
module.exports = dci.Context(function(ctx, sourceAccount, destinationAccount, amount) {...
source: {
player: sourceAccount
, contract: Account
It would be nice to avoid convention-based declarations like "player" and "contract", which also makes them reserved RoleMethod names I guess? I was fortunate to avoid that in Haxe because of AST rewriting, but I don't know if it can be done here? Perhaps with a function like
source: dci.Role(sourceAccount, Account, {withdraw: function() {...}});
, withdraw: function() {
if (ctx.source.balance < ctx.amount) {
throw new Error('Insufficient funds');
}
ctx.source.decreaseBalance(ctx.amount);
Isn't object communication a major point? By moving ctx.destination.deposit() to the main function, you've made things very procedural. We have a FAQ question for that, and the scenario-to-algorithm mapping (Lean Architecture, chapter 9) is on the same track with for example "Source account requests that Destination account increase its balance".
I've tried out various approaches where the connection between two roles are not methods. They are connections with a role in either end.https://groups.google.com/d/msg/object-composition/2F6kwUpb0FQ/YAyEkaeALPYJ:
Source ---- transfer ----> destination
The syntax for declaring the connections are somewhat unknown, but the idea is that at both ends you can find a method called transfer one declared as outgoing and the other declared as inbound. That is unrelated to the shadowing problem but the idea might spawn other ideas that could help. The point of declaring connections would be to make the I/O part of the interaction graph more explicit which I find the current implementations do not
Where does the part of an interaction that is no more related to one role than any other role in the interaction belong and how does that make it obviously which nodes are connected to which in the interaction graph? We are claiming that DCI is better than DDD because in DDD something that belongs together is split (somewhat arbitrarily) into various classes. If we want to hold on to that claim I think we should be able to answer the above questionSome of my musings on this:
, destinatinon: {
player: sourceAccount
, contract: Account
, deposit: function() {
ctx.destinatinon.increaseBalance(ctx.amount);
}
}
,hmm ,comma first is a matter of style I guess ,but for me it looks a bit strange. :)
/Andreas
Another alternative would be to instruct the programmer that if they want the best memory efficiency, they should declare the role methods outside the Context, e.g.:
module.exports = dci.Context(function TransferMoney(sourceAccount, destinationAccount, amount) {
var ctx = dci.initContext(roleDefs);
...
});
var roleDefs = {
...
}
But do like having the role definitions inside the Context function; it just looks right from the perspective that roles should be private to Contexts (even though roleDefs would be private to the TransferMoney module either way).
So as a final alternative, the Context function could be an optional argument; if provided, it would be more memory efficient.
On Thursday, 18 June 2015 16:00:46 UTC+3, Matthew Browne wrote:Another alternative would be to instruct the programmer that if they want the best memory efficiency, they should declare the role methods outside the Context, e.g.:
module.exports = dci.Context(function TransferMoney(sourceAccount, destinationAccount, amount) {
var ctx = dci.initContext(roleDefs);
...
});
var roleDefs = {
...
}
But do like having the role definitions inside the Context function; it just looks right from the perspective that roles should be private to Contexts (even though roleDefs would be private to the TransferMoney module either way).
So as a final alternative, the Context function could be an optional argument; if provided, it would be more memory efficient.
I don't think worrying about memory efficiency in this implementation makes sense? Or will there be a large memory leak, if you don't do this? This isn't a high-performance implementation anyways due to the changing of properties when getting roles... To me it looks like it makes things more complicated without clear (real-world) benefit.
How about using 'the', e.g.:
var the = dci.initContext(roles());
the.source.withdraw();
the.destination.deposit();
That way it would make sense for constructor functions too.
I experimented with ways to eliminate the need for 'var the ='. I think this might be the best of the alternatives I tried...I haven't implemented it yet but I'm pretty sure it's possible:
Fortunately the implementation allows for the prefix to be called
whatever you want, so multiple styles can be supported.
BTW is there a reason you chose to make the role name (Ledgers) start
with an upper case letter, given that the implementation allows you to
make it lower case without conflicting with the constructor argument?
The prefix already helps roles to stand out so I think lower case names
are better (for JS); they imply objects rather than classes.
This is an update on my planned work to advance DCI.I have abandoned my Squeak efforts for want of being able to procure a working version for my Mac. And as I looked at my project to convert Objective-C to DCI I found what many of you are finding in your attempts with other languages, and in particular the recent forays with Javascript. It quickly becomes fragile and is susceptible to incorrect implementations (e.g., accidentally re-introducing wrapper semantics). Further it’s difficult to achieve a syntax that is acceptable, let alone worthy of being excited about. (The adding of extra parenthesis is all-too-reminiscent of the gratuitous curly braces one needs to add in Java to create an anonymous subclass to overcome the type erasure bug in the language — https://code.google.com/p/guava-libraries/wiki/ReflectionExplained).More broadly, almost all of our work has been based on ports to existing languages, with all of their attendant warts and historical baggage. I became concerned that this is crippling our ability to nurture the dialogue on whither DCI and to refine the computational model instead of just working the engineering issues. The engineering exercises try to introduce as much of the DCI computational model as possible into existing infrastructure, but the incompatibilities leave us always coming up short — at least with respect to the postulates I posted here some time ago. What’s scarier is that these environments usually leave us in a position where we can’t even reason about some of the postulates. I am starting to feel as though we’re going around in circles, as the same issues recur.I propose to start from scratch, and have designed a new language explicitly with DCI in mind. I want to name the language Trygve but won’t do so until I have his permission. In the mean time it’s named Kant. In the spirit of Smalltalk it will be not just a language but an integrated environment. Both the language and the environment will be meagerly featured, more suitable to a research effort than to the production of any code.The environment will include an “object machine.” In our work thus far, that part of DCI has been supplanted by the limitations of the run-time environments beneath the respective languages we’ve strived to evolve. I want an environment without excuse for compromise. That means we can have discussions about “what is the right thing to do” rather than “what can we deliver in the near term.”The syntax (and some of the semantics) will take an extended subset (I love that phrase) of Java as a starting point, for all the arguments one finds for such an approach in Gabriel’s “Worse is Better” philosophy.
I decided to put off, for now, a more complete exploration of the applicative space, until we understand the Von Neumann space better. I know that the applicative / functional approach that Rune and I have been talking about simply makes many of the current DCI problems irrelevant. Nonetheless, they are still real problems in the Von Neumann world and I’m putting my money on that world as being the first place where DCI is likely to be accepted and applied.The environment will be written entirely (cross fingers) in Java (yes, I’ve really sold my soul…)
so we avoid the kinds of problems that I faced with not being able to bring up Squeak on my machine. Java is the ultimate computer virus: it is ubiquitous. And it’s marginally more portable than C.
So I hope that everyone here on the list will eventually be able to bring up the environment on one of their own machines and contribute to the effort.It’s an understatement to say that this is a large effort and I don’t intend to do it alone. I intend to spend a few months (probably the summer) working on it alone to get it to a point of cogency. At that point I’ll open it up to a small community for review and for one or two rounds of refinement. My long-term goal is to open-source the environment (probably on GitHub), probably six months or so down the road.
... snip ...
So stay tuned. I hope to be back in a few months.
On 24 Jun 2015, at 14:49, Egon Elbre <egon...@gmail.com> wrote:I dislike Java syntax quite a lot, mainly that the verbosity of the language hides the actual thing being done, but I can understand the reasoning for choosing it.
Just a tip - not sure how familiar you are with Java tools - use hot-loading in Java, it can make iterating on code faster. e.g. HotSwap/JRebel
I've had plenty of trouble of bringing up a Java based projects. I can still remember one project requiring me to download ~1.5GB of dependencies, plus needed to make tons of configuration, before I was able to get it running in a broken state. But, this is mainly project layout and dependency problem rather than a language problem.
On 24 Jun 2015, at 14:49, Egon Elbre <egon...@gmail.com> wrote:I dislike Java syntax quite a lot, mainly that the verbosity of the language hides the actual thing being done, but I can understand the reasoning for choosing it.I hate Java with a passion. But given the goals, that’s irrelevant.Just a tip - not sure how familiar you are with Java tools - use hot-loading in Java, it can make iterating on code faster. e.g. HotSwap/JRebelI can iterate as fast as I need to with Eclipse. I want to keep my tool inventory small; that’s always an impediment to technology transfer.
I've had plenty of trouble of bringing up a Java based projects. I can still remember one project requiring me to download ~1.5GB of dependencies, plus needed to make tons of configuration, before I was able to get it running in a broken state. But, this is mainly project layout and dependency problem rather than a language problem.Do you have an alternative suggestion?
On 24 Jun 2015, at 16:57, Egon Elbre <egon...@gmail.com> wrote:Regarding compiling to an existing VM, I would advise against it, at least in the beginning.
tl;dr; use what you feel comfortable with and the language that gets least on your nerves.
On 24 Jun 2015, at 16:57, Egon Elbre <egon...@gmail.com> wrote:
They just help to avoid compile+wait.
On 24 Jun 2015, at 16:57, Egon Elbre <egon...@gmail.com> wrote:They just help to avoid compile+wait.What kind of environment do you run in?
On 24 Jun 2015, at 17:31, Egon Elbre <egon...@gmail.com> wrote:I don't write Java often, but when I do, I use IntelliJ.
On 24 Jun 2015, at 14:49, Egon Elbre <egon...@gmail.com> wrote:I dislike Java syntax quite a lot, mainly that the verbosity of the language hides the actual thing being done, but I can understand the reasoning for choosing it.I hate Java with a passion. But given the goals, that’s irrelevant.
Just a tip - not sure how familiar you are with Java tools - use hot-loading in Java, it can make iterating on code faster. e.g. HotSwap/JRebelI can iterate as fast as I need to with Eclipse. I want to keep my tool inventory small; that’s always an impediment to technology transfer.
I've had plenty of trouble of bringing up a Java based projects. I can still remember one project requiring me to download ~1.5GB of dependencies, plus needed to make tons of configuration, before I was able to get it running in a broken state. But, this is mainly project layout and dependency problem rather than a language problem.Do you have an alternative suggestion?
--
You received this message because you are subscribed to the Google Groups "object-composition" group.
To unsubscribe from this group and stop receiving emails from it, send an email to object-composit...@googlegroups.com.
To post to this group, send email to object-co...@googlegroups.com.
Visit this group at http://groups.google.com/group/object-composition.
For more options, visit https://groups.google.com/d/optout.
On Wed, Jun 24, 2015 at 8:09 PM, James O Coplien <jcop...@gmail.com> wrote:On 24 Jun 2015, at 14:49, Egon Elbre <egon...@gmail.com> wrote:I dislike Java syntax quite a lot, mainly that the verbosity of the language hides the actual thing being done, but I can understand the reasoning for choosing it.I hate Java with a passion. But given the goals, that’s irrelevant.Enjoying a programming language's semantics and architectural drivers is what causes me to want to code in that language. As painful as Stroustrup's adoption of C as the basis of C++ was, he pretty much nailed the balance and tradeoffs and finally the latest C++ standards are leaving some of those problems behind. Honestly outside of that I've never seen it successfully done otherwise (and you know how long it took even then) and I certainly wouldn't be one to try to build something innovative on top of Java which never was designed with such clean drivers (as K&R did) and had the unfortunate habit of standardizing things way too prematurely. So I feel this is entirely relevant. The world does not need another C-like syntax imperative/object-like language of any sort. C#, go-lang, etc included. It's really not hard to do better.
Just a tip - not sure how familiar you are with Java tools - use hot-loading in Java, it can make iterating on code faster. e.g. HotSwap/JRebelI can iterate as fast as I need to with Eclipse. I want to keep my tool inventory small; that’s always an impediment to technology transfer.Eclipse is another huge abomination. I honestly don't see how people get productive in it. Of course starting off with java is like breaking your arm then using Eclipse/ant is like putting on a cast and saying, "Now, isn't that better?" :-) [ok I admit I'm ranting here but this is my personal opinion/experience]I've had plenty of trouble of bringing up a Java based projects. I can still remember one project requiring me to download ~1.5GB of dependencies, plus needed to make tons of configuration, before I was able to get it running in a broken state. But, this is mainly project layout and dependency problem rather than a language problem.Do you have an alternative suggestion?Several. As it turns out I've been thinking along very similar lines although I have some different goals like ultimately realizing the primitives of my language as the instruction set of a hardware cpu via fpga and ultimately asic so you will see a bias towards smallness and stack orientation.One thing I do require is an interactive system where the programmer/user has an active conversation with the computer and the objects within it in terms of definition, implementation, testing, operation. I should be able to conduct the full life cycle of development/deployment/usage via a terminal and have it persist.First off - the best language in the world to implement new languages is forth. When I say forth I mean all threaded interpreted stack-based languages and definitely not ANS FORTH. The syntax of "standard" forth is highly optimized for it's implementation/environment but that isn't necessary at all and building entire languages and working systems on top of these primitives is something that can be done in a few weeks from scratch.
On 25 Jun 2015, at 17:58, Benjamin Scherrey <prote...@gmail.com> wrote:Enjoying a programming language's semantics and architectural drivers is what causes me to want to code in that language. As painful as Stroustrup's adoption of C as the basis of C++ was, he pretty much nailed the balance and tradeoffs and finally the latest C++ standards are leaving some of those problems behind. Honestly outside of that I've never seen it successfully done otherwise (and you know how long it took even then) and I certainly wouldn't be one to try to build something innovative on top of Java which never was designed with such clean drivers (as K&R did) and had the unfortunate habit of standardizing things way too prematurely. So I feel this is entirely relevant. The world does not need another C-like syntax imperative/object-like language of any sort. C#, go-lang, etc included. It's really not hard to do better.
--
You received this message because you are subscribed to the Google Groups "object-composition" group.
To unsubscribe from this group and stop receiving emails from it, send an email to object-composit...@googlegroups.com.
To post to this group, send email to object-co...@googlegroups.com.
Visit this group at http://groups.google.com/group/object-composition.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "object-composition" group.
To unsubscribe from this group and stop receiving emails from it, send an email to object-composit...@googlegroups.com.
To post to this group, send email to object-co...@googlegroups.com.
Visit this group at http://groups.google.com/group/object-composition.
For more options, visit https://groups.google.com/d/optout.
Egon,Most serious forth-ers implement their own (it's just that easy to do).
You received this message because you are subscribed to a topic in the Google Groups "object-composition" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/object-composition/nnxDYYMC5qc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to object-composit...@googlegroups.com.
I propose to start from scratch, and have designed a new language explicitly with DCI in mind. I want to name the language Trygve but won’t do so until I have his permission. In the mean time it’s named Kant. In the spirit of Smalltalk it will be not just a language but an integrated environment. Both the language and the environment will be meagerly featured, more suitable to a research effort than to the production of any code.
On 26 Jun 2015, at 17:35, Trygve Reenskaug <try...@ifi.uio.no> wrote:Your new language is designed for DCI so I presume its target audience is end users and other nonprofessional programmers.
--
--
You received this message because you are subscribed to the Google Groups "object-composition" group.
To unsubscribe from this group and stop receiving emails from it, send an email to object-composit...@googlegroups.com.
To post to this group, send email to object-co...@googlegroups.com.
Visit this group at http://groups.google.com/group/object-composition.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to a topic in the Google Groups "object-composition" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/object-composition/nnxDYYMC5qc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to object-composit...@googlegroups.com.
On 28 Jun 2015, at 17:42, Benjamin Scherrey <prote...@gmail.com> wrote:Actually I don't believe I was confusing the two things as I made the distinction pretty clear.
But your emails seem to completely outright deny "a" (as you want your own vm that supports your architectural drivers - here could be my misunderstanding if it's your opinion that the jvm actually does what you want as a target vm),
discount "b" (as you don't care about adoption)
while implying that you're going code it in java which looks like "c" but your denial of "b" would also eliminate this reason.
So there is my confusion laid out.
--
You received this message because you are subscribed to the Google Groups "object-composition" group.
To unsubscribe from this group and stop receiving emails from it, send an email to object-composit...@googlegroups.com.
To post to this group, send email to object-co...@googlegroups.com.
Visit this group at http://groups.google.com/group/object-composition.
For more options, visit https://groups.google.com/d/optout.
On 01 Jul 2015, at 07:54, Benjamin Scherrey <prote...@gmail.com> wrote:Once we see the direction of Cope's model then it will be interesting to see what would be required to implement it in other environments. I'm extremely curious as I'm sure you'd expect.