October 06, 2008
bearophile schrieb:
> Jarrett Billingsley:
>> They're simpler to implement as there is now only one type and one set
>> of lookup rules, and, well, it's cool.  Besides, MiniD is a dynamic
>> language, and if I were to make classes as dynamic as they could be,
>> you'd more or less end up with a prototype-based object system with an
>> arbitrary bifurcation between classes and their instances.  Which is
>> precisely what happened in the development of MD2, in fact.
> 
> I agree they are probably simpler to implement. Regarding that bifurcation, Python has solved it introducing metaclasses, so classes are objects too, that is instances of a metaclass. This seems just to move the problem up one level, but in most cases it solves the problem. But it also introduces some complexity, and programming with metaclasses requires some skills.
> 
> Bye,
> bearophile

Hope you may find it interesting enough :)
A *small prototype-based programming language. Native compiled.
Runtime-loadable-prototypes! Yeah. Inspired by SELF/Smalltalk/Eiffel. Speed of C.

*4 keywords
http://isaacproject.u-strasbg.fr/li.html

Bjoern (I am just learning the language out of ?? I don't know.)

October 09, 2008
bearophile Wrote:

> This:
> global x, y, z = freep() // they are 1, 2, 3

this also seems dangerous to me.
Some language has syntax
(x, y, z) = freep()
October 09, 2008
On Thu, Oct 9, 2008 at 6:48 AM, ore-sama <spam@here.lot> wrote:
> bearophile Wrote:
>
>> This:
>> global x, y, z = freep() // they are 1, 2, 3
>
> this also seems dangerous to me.
> Some language has syntax
> (x, y, z) = freep()
>

How is it dangerous?  It has precisely one meaning.  It's a perfectly well-defined area of the language and does not incur any performance penalty.

And if you really, really want to put multiple values into an object, use an array.

local xyz = [freep()]
somefunc(freep.expand()) // somefunc called with 3 arguments
October 09, 2008
Jarrett Billingsley Wrote:

> On Thu, Oct 9, 2008 at 6:48 AM, ore-sama <spam@here.lot> wrote:
> > bearophile Wrote:
> >
> >> This:
> >> global x, y, z = freep() // they are 1, 2, 3
> >
> > this also seems dangerous to me.
> > Some language has syntax
> > (x, y, z) = freep()
> >
> 
> How is it dangerous?  It has precisely one meaning.  It's a perfectly well-defined area of the language and does not incur any performance penalty.

It behaves surprisingly compared to others C family languages: C, C++, Java, C#, Javascript, which have uniform meaning for this syntax. I was surprised.
October 09, 2008
Peter Modzelewski wrote:
> http://petermodzelewski.blogspot.com/2008/10/tango-conference-2008-minid-talk-video.html 
> 
> slides: http://team0xf.com/conference/minid.pdf
> Enjoy! :)

Does MiniD support multiple OS threads or only fibers (for multicore processors, etc.)?
October 10, 2008
On Thu, Oct 9, 2008 at 6:49 PM, Robert Fraser <fraserofthenight@gmail.com> wrote:
> Peter Modzelewski wrote:
>>
>>
>> http://petermodzelewski.blogspot.com/2008/10/tango-conference-2008-minid-talk-video.html
>> slides: http://team0xf.com/conference/minid.pdf
>> Enjoy! :)
>
> Does MiniD support multiple OS threads or only fibers (for multicore
> processors, etc.)?

The language itself is not designed to be multithreaded and the interpreter has not been designed with any consideration for it. However, as long as only one system thread is using a MDVM object at any given time, it should be fine, as the library is completely reentrant and depends on no global state.  In that case, you can just use normal synchronization on the VM and it should work.  Or, you know, create multiple VMs and make a MiniD library to allow multiple threads to communicate/spawn new VMs/whatever.
October 11, 2008
ore-sama Wrote:
> > This:
> > global x, y, z = freep() // they are 1, 2, 3
> 
> this also seems dangerous to me.
> Some language has syntax
> (x, y, z) = freep()

To answer I have to go partially OT. In Python you can put () around tuples, but 99% of the times they are optional, so this syntax is accepted and Python programmers often add those () to improve clarity:

(x, y, z) = freep()

Or to destructure the result (here freep2 returns a generic iterable pair inside another pair):

((x, y), z) = freep2()

I don't like the syntax Python3 uses for tuples, I'd like them to be compulsively enclosed by symbols, like python lists (arrays) and like all collection literals in Fortress.

For example the bitwise operations may become named AND OR XOR NOT, that in Python code aren't much common (currently and, not, or are the boolean operators), freeing | to to denote tuples (and freeing other symbols):

x, y, z = freep()
((x, y), z) = freep2()
z = (!x & y) | (z & !w)

==>

|x, y, z| = freep()
||x, y|, z| = freep2()
z = (NOT x AND y) OR (z AND NOT w)

(I don't like that synax too much, anyway).
Fortress uses pairs of symbols to encose some of its collections:

{x, y, z}
{x: y, z: w}
{|x: y, z: w|}
(|x, y, x|)
{|x, y, z|}
[|x, y, z|]
... etc

Bye,
bearophile
1 2
Next ›   Last »