LogicodeLang / Logicode

An esoteric language based on logic gates.
MIT License
12 stars 3 forks source link

Tk-based LGC editor? #9

Closed bortkiewicz closed 8 years ago

bortkiewicz commented 8 years ago

Would there be a specific code editor for .LGC files, or does the user have to edit it in some kind of other code shell like the Python editor or Notepad?

bortkiewicz commented 8 years ago

If the answer is "yes", prepare to set some months of time doing this

somebody1234 commented 8 years ago

Well, hardly any languages have an IDE, plus it's way easier to just make syntaxes for code editors sooo...

hanyuone commented 8 years ago

When this becomes big, maybe we can make a syntax highlighter for Atom?

bortkiewicz commented 8 years ago

Yeaaaaahhhhh....

bortkiewicz commented 8 years ago

Well, hardly any languages have an IDE, plus it's way easier to just make syntaxes for code editors sooo...

Well then how come the language YOU are using, Python, has an IDE?

bortkiewicz commented 8 years ago

Oh and also, this is cross-python compatible, is it? Im not used to Python 2 "ttk"

hanyuone commented 8 years ago

But we don't need an IDE... not yet, anyway. We still need to iron out all of the bugs.

somebody1234 commented 8 years ago

@testitem How many million people do you think use Python?

somebody1234 commented 8 years ago

@testitem Python is one of the most popular scripting languages, how would you expect it not to have an DE

somebody1234 commented 8 years ago

How many hobby languages have their own IDE?

bortkiewicz commented 8 years ago

Java doesn't have its own specific IDE. Yet it is the most popular programming language. C and C++ doesn't either. Python, yet only the fifth most popular, has an IDE. Uh.. ttk?

somebody1234 commented 8 years ago

@testitem Java has IntelliJ, C/C++ have Visual Studio (well, kinda)

bortkiewicz commented 8 years ago

Oh well here is my current IDE. Don't expect it to do anything nice :(

# PYTHON 3 ONLY

from tkinter import *
from tkinter.ttk import *
from tkinter.filedialog import *
from tkinter.messagebox import *

def new():
    # TODO
    pass

def openf():
    global textbox
    filename = askopenfilename()
    textbox.insert('1.0',open(filename).read())

def save():
    global textbox
    filename = asksaveasfilename()
    with open(filename, 'w') as f:
        f.write(textbox.get('1.0','end'))

def saverun():
    save()
    run()
    return

def run():
    # TODO
    pass

root = Tk()
root.option_add('*tearOff', FALSE)
mainBar = Menu(root)
fileMenu = Menu(mainBar)
#editMenu = Menu(mainBar)
#formMenu = Menu(mainBar)
runMenu = Menu(mainBar)
fileMenu.add_command(label="New File", command=new)
fileMenu.add_command(label="Open File", command=openf)
fileMenu.add_command(label="Save as", command=save)
runMenu.add_command(label="Save and Run", command=saverun)
runMenu.add_command(label="Just Run", command=run)
mainBar.add_cascade(menu=fileMenu, label="File")
#mainBar.add_cascade(menu=editMenu, label="Edit")
#mainBar.add_cascade(menu=formMenu, label="(Re)Format")
mainBar.add_cascade(menu=runMenu, label="Run")
root.config(menu=mainBar)
textbox = Text(root, width=140, height=120, wrap="word")
textbox.grid()
root.mainloop()
bortkiewicz commented 8 years ago

I do NOT know how to port the module names into python 2.

somebody1234 commented 8 years ago

This doesn't need an IDE, I use Sublime literally all the time, mostly for JS/Python, and it's fairly easy to make a syntax for Sublime.

hanyuone commented 8 years ago

@testitem Could you add the information from the wiki and stuff (i.e. the documentation of the language) into the website (i.e. the branch gh-pages)?

(Also, I know you copied and pasted.)

bortkiewicz commented 8 years ago

Sure. Didn't i load the README into the html?

hanyuone commented 8 years ago

@testitem Yeah, just split it up like you did in the wiki. If you can, maybe do something like this. Once you've got the thing started, I'll help out with the rest.

bortkiewicz commented 8 years ago

When am I going to have write access??? (Wait who is the admin @DerpfacePython or @somebody1234 ?)

schas002 commented 8 years ago

@testitem DerpfacePython it is, I'm sure.

hanyuone commented 8 years ago

@testitem I'm writing an IDE right now (using Electron) - it'll just have a basic syntax highlighter and a "Run" button, which takes, like, a few days to whip up. I'll post the basic code later.

bortkiewicz commented 8 years ago

Can I continue on my Tkinter IDE? And are you writing it in Python? I am starting to get REAL cranked up with this JS, HTML and CSS stuff.

bortkiewicz commented 8 years ago

P.S. @DerpfacePython What is your email address?

schas002 commented 8 years ago

UGH, SORRY! Would try to never do again.

hanyuone commented 8 years ago

@testitem Why do you need my email? You can just contact me here. We can both work on IDEs separately, but I have a feeling yours is going to be easier to make (seeing as the interpreter itself is written in Python).