AdeptLanguage / Adept

The Adept Programming Language
GNU General Public License v3.0
119 stars 9 forks source link

New Compiler 2.5 and Windows GUI. #59

Open Spoiledpay opened 2 years ago

Spoiledpay commented 2 years ago

Hi, great job you've been doing so far. Perfect. I'm going to get to know and spread your language. Where do we get the new version 2.5? And when will we have Windows GUI? Good job. here from Brazil.

box2d.adept:26:26: error: This compiler doesn't support version '2.5'

IsaacShelton commented 2 years ago

Thanks,

1) It's still in-development. Normally you would have to build it from source, but since the process is really complicated right now, I've made a pre-release so you don't have to deal with all of that: https://github.com/AdeptLanguage/Adept/releases

2) I don't have much experience with Windows GUI, but it's theoretically possible. I don't have plans on writing one soon, but if you wanted to, windows/winsock.adept provides a good example of interacting with the native Win32 API.

Spoiledpay commented 2 years ago

You can have an example of porting Conio.h to Adept language? thanks

IsaacShelton commented 2 years ago

Here's an example of one way it could be done: https://github.com/IsaacShelton/AdeptConio/

Spoiledpay commented 2 years ago

Dear,

Does the new version of Adept 2.5 work and compile on macbook air 13" apple M1? If so, do we have any release forecast?

IsaacShelton commented 2 years ago

Yes,

You can install the latest build with brew install AdeptLanguage/tap/adept --HEAD and then add it to your path.

For the latest commit it installs to: /opt/homebrew/Cellar/adept/HEAD-4c920dd/libexec

You can then just do something like this in your ~/.zprofile

export PATH="/opt/homebrew/Cellar/adept/HEAD-4c920dd/libexec:$PATH"

Running adept --version should then give you something like this:

Platform:       MacOS

Adept Build:    Adept 2.5 - Build Oct 28 2021 16:10:05 CDT
Adept Version:  2.5
Pkg Manager:    enabled

Import Folder:  "/opt/homebrew/Cellar/adept/HEAD-4c920dd/libexec/import/"
Stblib Folder:  "/opt/homebrew/Cellar/adept/HEAD-4c920dd/libexec/import/2.5"

It also comes with the experimental package manager, which allows you to easily fetch code to add to your project with commands like adept install box2d

Spoiledpay commented 2 years ago

Dear,

already have a date set for the final release of the language? New 2.5

IsaacShelton commented 2 years ago

There are one or two things left to round out, and then it'll be ready to release.

Target release date for 2.5 is sometime next week

Spoiledpay commented 2 years ago

Hi, hope you are alright. A great job you are doing in developing your new language. If I can support even a little financially, or Anyone interested. Let me know. Make a link so people can support your project. Thanks for your work. Even if it is with little values. I imagine it's something that helps in the end.

IsaacShelton commented 2 years ago

Thank you

I have made a link to support the project

I am glad that you enjoy the language, it really is a passion of mine

Spoiledpay commented 2 years ago

You can have an example of porting Windows.h to Adept language? https://github.com/Spoiledpay/AdeptLang It has two files a Windows.h and a simple "Hello World" C example. I would be very grateful for this help and in your time. Thanks"

IsaacShelton commented 2 years ago

<windows.h> is ~69,000 lines of code, and so hasn't been ported yet, but in the mean time, you can still use its APIs as long as you declare them appropriately

Example rewritten:

https://github.com/IsaacShelton/Win32ManualExample

Eventually windows.adept (like windows.h) should be a part of the standard library, but it doesn't exist yet

Spoiledpay commented 2 years ago

Dear, it was a big step forward in this example creation. Thanks. The compilation and application of Windows Form really works. But in the case of Windows. There is a peculiarity in the compilation of the executable. be it console app or Windows app.


like: -target: exe: to create an .exe file. (Console) - most programs developed at Adept lang winexe to create a Windows program. (WinForm)

because the way it creates it generates a console executable. when the app runs it opens the command prompt and then the Winform .exe app. the ideal in the future would be a native winform app. It must be the way that you compile and link the app.

thanks...:)

IsaacShelton commented 2 years ago

Support for this has been added in the latest build of 2.6 (Adept 2.6 Preview Build Dec-2-2021)

https://github.com/AdeptLanguage/Adept/releases

You can now disable the opening of the command prompt with pragma windowed or --windowed

Example https://github.com/IsaacShelton/Win32ManualExample

pragma compiler_version '2.6'
pragma windows_only
pragma windowed // <-------------------

import basics
import "windows_definitions.adept"

// ...
Spoiledpay commented 2 years ago

Hello! When will we have a new version? Any projection? like 2.6

IsaacShelton commented 2 years ago

@Spoiledpay

v2.6 will probably be pretty soon, I want to test it a little more first, but then it should be good to release

IsaacShelton commented 2 years ago

Adept v2.6 is now officially released

Spoiledpay commented 1 year ago

Hello, when possible, we can have more examples of Windows GUI, a folder with some examples of: Text, Button, OpenDialog, EditText. Would be great. It could be on your own time. thanks.

IsaacShelton commented 1 year ago

Of course! I will make more Windows GUI examples and get back to you within a week or two.

IsaacShelton commented 1 year ago

@Spoiledpay

Hello,

Here are some additional Windows GUI examples written in Adept:

https://github.com/IsaacShelton/AdeptWin32Examples

Although complete, I will spend another week or two working on them to improve these examples by:

and will get back to you again.

I also want to create proper bindings to windows.h. Although it will probably take a month or two, once proper Win32 bindings exist, we won't need to manually write windows bindings anymore like I do inside windows.adept.

IsaacShelton commented 1 year ago

Examples with modern styling and icons have been added to https://github.com/IsaacShelton/AdeptWin32Examples :tada:

The new examples require the latest nightly build of Adept, as they use the new pragma windres directive to compile/link against Windows resource files.

The old_style examples can still be compiled with Adept v2.7 or later.

For heavily commented code, see modern/all_use. It covers everything used in the repo. All other files only have occasional comments, as they assume some knowledge of the Win32 API.

Spoiledpay commented 1 year ago

Hello, Thanks for the examples. Great work being done so far.