+ Reply to Thread
Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Read/Writable folder in data/E2Expressions

  1. #1
    Mario, hard at work Filipe's Avatar
    Join Date
    Jun 2007
    Location
    Portugal - Lisbon
    Posts
    401
    Blog Entries
    1

    Arrow Read/Writable folder in data/E2Expressions

    With user-defined functions coming (hopefully) soon, and a slew of other neat additions in the horizon, there's one small thing that I'd like to see added to E2 that I believe would open up a few new possibilities - implementation should be a 2 minute job, so it's really just a matter of everyone agreeing with it.

    It's pretty simple: a specific folder inside data/Expression2 that would be accessible (read/write) to E2 file functions (or some sort of flagging system for folders)

    The idea came to me while I worked on a sort of E2 extended preprocessor (in E2), where I wrote a fairly simple script that allowed the following syntax in E2 code:

    (this is not what I'm suggesting, read above!)
    Code:
    @name Test
    ... some code ...
    #!include "myProject/functions.txt"
    ... some more code ...
    And a few other neat functions. The problem was that everytime I want to build/compile my project, I'm forced to copy all my files to data/e2files, run the expression, and then move it back to data/Expression2

    There's countless other applications: compression, self-improving expressions, a new (optional) emphasis on project-oriented E2 development, to name a few.

    So, what do you lads think?
    Last edited by Filipe; 08-24-2010 at 08:04 AM.
    beep boop

  2. #2
    aka Colonel Never Online Colonel Thirty Two's Avatar
    Join Date
    Oct 2009
    Posts
    2,683
    Blog Entries
    5

    Default Re: Read/Writable folder in data/E2Expressions

    The problem is that the code is first uploaded to the server, and then preprocessed.

    Of course, modifying E2 to preprocess/parse on the client would make this feasible, and would also improve performance.

  3. #3
    Mario, hard at work Filipe's Avatar
    Join Date
    Jun 2007
    Location
    Portugal - Lisbon
    Posts
    401
    Blog Entries
    1

    Default Re: Read/Writable folder in data/E2Expressions

    Quote Originally Posted by initrd.gz View Post
    The problem is that the code is first uploaded to the server, and then preprocessed.

    Of course, modifying E2 to preprocess/parse on the client would make this feasible, and would also improve performance.
    You misread my post, and I can see why (my example could lead to some confusion). My suggestion is allowing E2 file-functions to access a special folder in the E2Expressions directory.
    Last edited by Filipe; 08-23-2010 at 03:05 PM.
    beep boop

  4. #4
    aka Colonel Never Online Colonel Thirty Two's Avatar
    Join Date
    Oct 2009
    Posts
    2,683
    Blog Entries
    5

    Default Re: Read/Writable folder in data/E2Expressions

    I know, but I was referring to that.

  5. #5
    Mario, hard at work Filipe's Avatar
    Join Date
    Jun 2007
    Location
    Portugal - Lisbon
    Posts
    401
    Blog Entries
    1

    Default Re: Read/Writable folder in data/E2Expressions

    Oh, I know very well about the complications of integrating any sort of include function, my script merely emulates it by processing the whole e2 file locally
    beep boop

  6. #6
    ส็็็็็็็็็็็็็็็็ส็็ ็็็็็ Dav1d's Avatar
    Join Date
    May 2009
    Posts
    1,118

    Default Re: Read/Writable folder in data/E2Expressions

    This isn't a bad idea, but can't you just have all your functions inside an e2 that's just used as a 'library' of sorts?
    I think you can read and write to the "Expression 2" folder inside /data/ anyway, try using "../Expression 2/filename.txt" as the path, the ../ part just makes it go up a folder. (It works with playing sounds, at least)

  7. #7
    Mario, hard at work Filipe's Avatar
    Join Date
    Jun 2007
    Location
    Portugal - Lisbon
    Posts
    401
    Blog Entries
    1

    Default Re: Read/Writable folder in data/E2Expressions

    Quote Originally Posted by Dav1d View Post
    This isn't a bad idea, but can't you just have all your functions inside an e2 that's just used as a 'library' of sorts?
    I think you can read and write to the "Expression 2" folder inside /data/ anyway, try using "../Expression 2/filename.txt" as the path, the ../ part just makes it go up a folder. (It works with playing sounds, at least)
    File functions are locked to data/e2files, the data folder can possibly contain a alot of sensitive files, and it could be pretty terrible if a rogue script were to delete any of them.
    beep boop

  8. #8
    Ursus maritimus Drunkie's Avatar
    Join Date
    Feb 2009
    Location
    Canada
    Posts
    5,662
    Blog Entries
    1

    Default Re: Read/Writable folder in data/E2Expressions

    I like this idea. You've got my vote.

  9. #9
    Wirererer casino.doug's Avatar
    Join Date
    Aug 2009
    Posts
    102

    Default Re: Read/Writable folder in data/E2Expressions

    same i would love to have this

  10. #10
    billywitchdoctor.com Whosdr's Avatar
    Join Date
    Dec 2008
    Posts
    2,300

    Default Re: Read/Writable folder in data/E2Expressions

    Eh, I don't see why not.
    .siht daer ot gniyrt emit detsaw ev'uoY

+ Reply to Thread
Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
proceed-collector
proceed-collector
proceed-collector
proceed-collector
linguistic-parrots
linguistic-parrots
linguistic-parrots
linguistic-parrots