Discussion New Language - Discussion

Lyerae

I keep popping up on this site from time to time.
Reaction score
105
It'd be much easier than Python, which I can't find any good parsing tools for.
At least with C/C++, there is a massive community, and I can find a lot of resources.
 

GetTriggerUnit-

DogEntrepreneur
Reaction score
129
Why write the definition first?? Shouldn't you be writing a simple compiler that compiles a simple script instead to start with??

Like:

Code:
func CallMe (int a, unit b) [bool]

endfunc

converts as

function CallMe takes integer a, unit b returns boolean

endfunction

This [bool] is odd.

Real programming languages uses

bool CallMe (int a, unit b) {}
 

ertaboy356b

Old School Gamer
Reaction score
86
Just make the coding shorter... I hate writing "function blahblah takes nothing returns nothing" over and over again..
 
Reaction score
333
I don't know where this "scripting syntax" stuff has come from but it is wrong. This is a scripting language, and scripting languages are programming languages by definition.
 

Lyerae

I keep popping up on this site from time to time.
Reaction score
105
"A scripting language, script language or extension language is a programming language that allows control of one or more software applications. "

Also, here's some progress:
JASS:
Namespaces are vJASS libraries, and have essentially the same features.
Example:

namespace HelloWorld
	globals
		private constant string msg = "Hello World!" // Why global? I have no idea...
	endglobals
	
	function Init takes nothing returns nothing // Init is automatically called. No need to declare the initializer manually.
		call BJDebugMsg(msg)
	endfunction
endnamespace

If we want to require other namespaces...

namespace Hello World
	globals
		private constant string msg = "Hello World!"
	endglobals
	
       function helloworld takes nothing returns nothing 
		call BJDebugMsg(msg)
	endfunction

endnamespace

namespace HelloWorld2 requires HelloWorld
	
	function Init takes nothing returns nothing
		call helloworld() // this is completely valid, since this namespace requires the other one. 
	endfunction
endnamespace


Opinions?
 

Narks

Vastly intelligent whale-like being from the stars
Reaction score
90
waaaaaaaaaaaaaaaaaaaaaat?

namespace Hello World = HelloWorld


and what was wrong with the word "library" - or do you have something else planned for that?
 

Lyerae

I keep popping up on this site from time to time.
Reaction score
105
> or do you have something else planned for that?

Nope. I just don't like it. Namespace makes more sense anyway.

> namespace Hello World = HelloWorld

My bad.
 

Jesus4Lyf

Good Idea™
Reaction score
397
JASS:
	globals
		private constant string msg = "Hello World!" // Why global? I have no idea...
	endglobals

...

Opinions?
Care to shed the [LJASS]globals[/LJASS] keyword?
-->
JASS:
		private constant string msg = "Hello World!" // Why global? I have no idea...


[LJASS]endnamespace[/LJASS] is a horrible thing to type. I'd recommend you make the word [LJASS]library[/LJASS] compile also.
Familiarity means a lot to people. Often more than what's ideal, in one's own opinion.
 

Lyerae

I keep popping up on this site from time to time.
Reaction score
105
I'll try to make it parse without the globals keyword.

> I'd recommend you make the word library compile also.

D:

You know I'll be designing this so it works with JassHelper too, right?
 

Darthfett

Aerospace/Cybersecurity Software Engineer
Reaction score
615
> or do you have something else planned for that?

Nope. I just don't like it. Namespace makes more sense anyway.

I also preferred library, and namespace is longer. They both make sense in this situation, as it's a library of code, or a group of code under specific namespace.

In the context you're using things, library seems to make a bit more sense. Having namespace "require" other namespace doesn't make much sense.

Furthermore, why even have a globals block? You should be able to simply declare them, and have the compiler know that it is global by the fact that it is outside a class/struct and outside a function.

Finally, hard tabs are evil. Why are you using them? :p

JASS:
library HelloWorld {

    private constant string msg = "Hello World!"

    public void display() {
        BJDebugMsg(msg)
    }
	
    Initializer { //The initializer is automatically called.  They are automatically private, and do not take/return any arguments.
        BJDebugMsg(msg)
    }

}

//If we want to use other libraries/packages/namespaces

library useHelloWorld

    include HelloWorld

    Initializer {
        display()
    }
}
 

Lyerae

I keep popping up on this site from time to time.
Reaction score
105
> Furthermore, why even have a globals block?

Honestly? Simplicity in the code.
This feature would be great, but honestly, I'm no master programmer.
Though I'm confident I can make the language and the preprocessor, I know for a fact I won't be able to create all the features everyone wants right away.

In time, yes, I will add that feature, and any other good feature people want, but only after I've found out how to efficiently do it.

> I also preferred library.

I find namespace easier to type, but if enough people request it, I will make library work.

> Finally, hard tabs are evil. Why are you using them?

Explain?

> [ljass]include HelloWorld[/ljass]

I'm already planning on an include keyword.
 

kingkingyyk3

Visitor (Welcome to the Jungle, Baby!)
Reaction score
216
My opinion
JASS:
space ha
endspace
//No need to type for initialiser, auto search for onInit as initializer.
//all functions/variables are private as default.

JASS:
func Hello (string s) -> nothing
BJDebugMsg(s)
endfunc
//Function example.

JASS:
set x = y
//Setting variables.

JASS:
space ee
    real x = 60.
//No need to use &quot;globals&quot; at here. <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite8" alt=":D" title="Big Grin    :D" loading="lazy" data-shortname=":D" />
//It will be private as mentioned above. 
endspace
 

Narks

Vastly intelligent whale-like being from the stars
Reaction score
90
and what if you want to nest stuff? it might get a little bit confusing if it's just "end".
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Monovertex Monovertex:
    How are you all? :D
    +1
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top