On Jan 8, 8:03 am, Kay Schluehr wrote:
> On 8 Jan., 16:25, J Kenneth King wrote:
>
> > As another poster mentioned, eventually PyPy will be done and then
> > you'll get more of an "in-Python" DSL.
>
> May I ask why you consider it as important that the interpreter is
> written in Python? I see no
On Jan 8, 7:25 am, J Kenneth King wrote:
> Jonathan Gardner writes:
>
> It seems we're defining "DSL" in two different ways.
>
> You can't write a DSL in Python because you can't change the syntax and
> you don't have macros.
>
> You can write a compiler in Python that will compile your "DSL."
>
O.K. Mark. Since you seem to accept the basic requirement to build an
*external* DSL I can provide some help. I'm the author of EasyExtend
( EE ) which is a system to build external DSLs for Python.
http://www.fiber-space.de/EasyExtend/doc/EE.html
EE is very much work in progress and in the last
Kay Schluehr writes:
> On 8 Jan., 16:25, J Kenneth King wrote:
>
>> As another poster mentioned, eventually PyPy will be done and then
>> you'll get more of an "in-Python" DSL.
>
> May I ask why you consider it as important that the interpreter is
> written in Python?
I don't think it's importa
> So you can't make an internal DSL like this that uses Python's built-
> in grammar. You'd have to hack the parser or settle for an external
> preprocessor.
This time it is really hard for me but I begin accepting the fact that
I will have to build an external DSL. I experimented some weeks ago
On 8 Jan., 16:25, J Kenneth King wrote:
> As another poster mentioned, eventually PyPy will be done and then
> you'll get more of an "in-Python" DSL.
May I ask why you consider it as important that the interpreter is
written in Python? I see no connection between PyPy and syntactical
Python exte
Jonathan Gardner writes:
> On Jan 7, 9:16 am, "Chris Mellon" wrote:
>>
>> The OP wants a Ruby-style DSL by which he means "something that lets
>> me write words instead of expressions". The ruby syntax is amenable to
>> this, python (and lisp, for that matter) syntax is not and you can't
>> impl
On Jan 7, 9:16 am, "Chris Mellon" wrote:
>
> The OP wants a Ruby-style DSL by which he means "something that lets
> me write words instead of expressions". The ruby syntax is amenable to
> this, python (and lisp, for that matter) syntax is not and you can't
> implement that style of internal DSL i
On Jan 7, 7:50 am, J Kenneth King wrote:
> Jonathan Gardner writes:
> > On Jan 6, 12:24 pm, J Kenneth King wrote:
> >> Jonathan Gardner writes:
> >> > On Jan 6, 8:18 am, sturlamolden wrote:
> >> >> On Jan 6, 4:32 pm, mark wrote:
>
> >> >> > I want to implement a internal DSL in Python. I woul
On Jan 6, 9:32 am, mark wrote:
> I want to implement a internal DSL in Python. I would like the syntax
> as human readable as possible. This means no disturbing '.;()\'
> characters. I like to have the power of the hosting language as well.
> Thats why I want to build it as an internal DSL and NOT
Kay Schluehr writes:
> On 7 Jan., 16:50, J Kenneth King wrote:
>
>> Python expressions are not
>> data types either and hence no macros -- I can't write a python function
>> that generates python code at compile time.
>
> Have you ever considered there are languages providing macros other
> than
On Wed, Jan 7, 2009 at 9:50 AM, J Kenneth King wrote:
> Jonathan Gardner writes:
>
>> On Jan 6, 12:24 pm, J Kenneth King wrote:
>>> Jonathan Gardner writes:
>>> > On Jan 6, 8:18 am, sturlamolden wrote:
>>> >> On Jan 6, 4:32 pm, mark wrote:
>>>
>>> >> > I want to implement a internal DSL in Py
On 7 Jan., 16:50, J Kenneth King wrote:
> Python expressions are not
> data types either and hence no macros -- I can't write a python function
> that generates python code at compile time.
Have you ever considered there are languages providing macros other
than Lisp? Macros have nothing to do w
Jonathan Gardner writes:
> On Jan 6, 12:24 pm, J Kenneth King wrote:
>> Jonathan Gardner writes:
>> > On Jan 6, 8:18 am, sturlamolden wrote:
>> >> On Jan 6, 4:32 pm, mark wrote:
>>
>> >> > I want to implement a internal DSL in Python. I would like the syntax
>> >> > as human readable as possi
On Jan 6, 12:24 pm, J Kenneth King wrote:
> Jonathan Gardner writes:
> > On Jan 6, 8:18 am, sturlamolden wrote:
> >> On Jan 6, 4:32 pm, mark wrote:
>
> >> > I want to implement a internal DSL in Python. I would like the syntax
> >> > as human readable as possible.
>
> >> Also beware that Python
J Kenneth King wrote:
[...]
> I could go on a really long rant about how the two are worlds apart, but
> I'll let Google tell you if you're really interested.
a) How is Google going to know if he's really interested?
b) Put a space after the "--" in your sig, please; that way my mailer
won't yto
Jonathan Gardner writes:
> On Jan 6, 8:18 am, sturlamolden wrote:
>> On Jan 6, 4:32 pm, mark wrote:
>>
>> > I want to implement a internal DSL in Python. I would like the syntax
>> > as human readable as possible.
>>
>> Also beware that Python is not Lisp. You cannot define new syntax (yes
>> I
On 2009-01-06 20:42, Kay Schluehr wrote:
>> How would one approach this in Python? Do I need to build a custom
>> loader which compiles *.dsl files to *.pyc files? Is it possible to
>> switch between the custom DSL and the standard Python interpreter?
> Sure, but there is no way to avoid extending
> How would one approach this in Python? Do I need to build a custom
> loader which compiles *.dsl files to *.pyc files? Is it possible to
> switch between the custom DSL and the standard Python interpreter?
Sure, but there is no way to avoid extending the Python parser and
then your DSL becomes e
On Jan 6, 8:18 am, sturlamolden wrote:
> On Jan 6, 4:32 pm, mark wrote:
>
> > I want to implement a internal DSL in Python. I would like the syntax
> > as human readable as possible.
>
> Also beware that Python is not Lisp. You cannot define new syntax (yes
> I've seen the goto joke).
This isn't
On Jan 6, 8:13 am, sturlamolden wrote:
> On Jan 6, 4:32 pm, mark wrote:
> >
> > Is it possible to
> > switch between the custom DSL and the standard Python interpreter?
> >
>
> - Write the DSL interpreter in Python.
>
There are Python modules out there that make writing a language
interpreter al
On Jan 6, 4:32 pm, mark wrote:
> I want to implement a internal DSL in Python. I would like the syntax
> as human readable as possible.
Also beware that Python is not Lisp. You cannot define new syntax (yes
I've seen the goto joke).
--
http://mail.python.org/mailman/listinfo/python-list
On Jan 6, 4:32 pm, mark wrote:
> Is it possible to
> switch between the custom DSL and the standard Python interpreter?
As far as I can tell, there are three different options:
- Embed a Python and DSL interpreter in the same executable.
- Write the DSL interpreter in Python.
- Expose the DSL
I want to implement a internal DSL in Python. I would like the syntax
as human readable as possible. This means no disturbing '.;()\'
characters. I like to have the power of the hosting language as well.
Thats why I want to build it as an internal DSL and NOT as a external
DSL.
I want the DSL as h
24 matches
Mail list logo