272 karma · joined June 18, 2016
In a way, Torvalds is more true to liberty than Stallman: Do what you want with the code. Stallman is more "Let's all share freely." They form contrasting camps to the FOSS community, which is one of the many reasons the community can't just all agree.
The problem with industrialized societies is that people lost all markers of adulthood. Everything became about worshiping convenience, and once convenience (for short-term pleasure) became "god", people wanted to avoid things they saw as unnecessarily difficult.
To reverse the trend, we need people to understand that the difficulty of life isn't a bad thing, that struggle and suffering aren't bad, they are essential for growth in becoming a better, happier person in the long run.
Would you rather be an ever-weakening wimp? Most people unconsciously say "yes", afraid of the world. Kids are afraid of the chaos in life - suffering that happens when life throws you curve balls, like "what would I do without monetary support?". Even "adults" now are really kids are heart - afraid of losing social security, medicare, etc. "Welfare" programs don't end the dilemma - they only reinforce the childishness and dependency on gov for support.
We need more bold people, people who aren't afraid to suffer because they see the light at the end of the road. Courage separates the men from the boys.
class FunctionObject {
FunctionObject* members[];
void* operator() { /* executable body */ }
};
[code]
class F {
int mydata;
F( int a ) : mydata(a) {}
F* operator( int p ) { a=p; return new Function(0); }
};
myF = new F(10);
doSomething( &myFunc );
doSomething( myFunc() );
[/code]
This is a basic formula for how things appear "under the hood" in the VM. Notice that doSomething() accepts F*, but in the first case, the F instance passed has a different mydata value. In Copper, the above code corresponds to:
[code]
doSomething( myF )
doSomething( myF: ) or doSomething( myF() )
[/code]
bar(x.a: x.b:)
Functions can return data. So say, a=5, then to get the value of 5 out, all you have to do is call the function a.
Edit: I'm assuming foo() here returns an object with members "a" and "b". An example of such a function-object would be:
foo = [] { ret( [a=5, b=10] ) }
[1] When passing either an object or data to a function, the parameter is stored as a function. e.g. if f=[p]{}, then f(a) and f(5) have p=a and p=5 respectively. If a=5, then the results are identical. The trap is that if a={ret({ret(5)})}, which is a wrapping function, and you call "a" before passing it to "f", then you get the nested function {ret(5)} instead of the wrapping function {ret({ret(5)})}. Having worked with Copper in practice, it's not too hard to spot the error, but it is one of those things that will catch beginners off guard.
[2] https://github.com/chronologicaldot/CupricBridge/blob/master...
Last note: gte(a=100) would produce an error in Copper because a=100 is an assignment statement that returns "a" (a function), and gte( function ) means nothing.
Edit: I see you're referring to Python, but I figured I'd keep the note of comparison.
In Copper, variables only store functions. This separates routine from data so you never end up with null pointer errors like in languages that have Any Types or pointers. Functions can return data, so you end up having function calls everywhere. a=5 is basically a={ret(5)}
In your above example the correct first line would be: adder = [a b] { ret(+(a: b:)) }
Parameters to a function are those that are not assigned data, whereas members are: add = [Param, Member=10) { ret(+(Param: this.Member:)) }
Now you can probably see what's wrong with your third line.
https://copperlang.wordpress.com/2016/11/18/printsyntax/
Edit: The design of the parse tree is such that there is no need for things like statement termination, parameter separation, among other things. By its simplicity, the code focuses on what really matters. Complex syntax is mentally taxing and distracts the programmer from focusing his energy on problem solving.
... Then again, you could just go knock on your neighbor's door and say hello, but that's too easy, too natural. ;)
There's no need for government subsidized education or broadening the job market. There's need of ditching bureaucrats and "Because we've-always-done-it-this-way" morons. Reward people for studying on their own, building their own businesses, networking, etc. rather than following the stupid system just to get two letters next to their name.