Author Topic: Verdant Programming Language and Vixen  (Read 13555 times)

0 Members and 1 Guest are viewing this topic.

Offline calcdude84se

  • Needs Motivation
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2272
  • Rating: +78/-13
  • Wondering where their free time went...
    • View Profile
Re: Verdant Programming Language and Vixen
« Reply #15 on: June 01, 2011, 09:55:48 pm »
1.
Quote
hello I guess :P
hello I guess :P
2. Prompts you. If it's not a number, it displays "not a number!" and breaks (exits, whatever).
Otherwise, it counts up from 1 to the number you entered, printing each one.
Then it prints that line starting "That was an awesome"...
3 & 4, what Ruler said.
« Last Edit: June 01, 2011, 09:56:06 pm by calcdude84se »
"People think computers will keep them from making mistakes. They're wrong. With computers you make mistakes faster."
-Adam Osborne
Spoiler For "PartesOS links":
I'll put it online when it does something.

Offline AngelFish

  • Is this my custom title?
  • Administrator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3242
  • Rating: +270/-27
  • I'm a Fishbot
    • View Profile
Re: Verdant Programming Language and Vixen
« Reply #16 on: June 01, 2011, 10:08:13 pm »
That strikes me as kind of an object oriented/functional markup language more than a programming language for some reason.

One question I have is why "Give <n>" rather than the standard "Return"?
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ

Offline calcdude84se

  • Needs Motivation
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2272
  • Rating: +78/-13
  • Wondering where their free time went...
    • View Profile
Re: Verdant Programming Language and Vixen
« Reply #17 on: June 01, 2011, 10:08:48 pm »
It might be stack-oriented. Can't tell. Or maybe he just likes it that way :P
« Last Edit: June 01, 2011, 10:09:03 pm by calcdude84se »
"People think computers will keep them from making mistakes. They're wrong. With computers you make mistakes faster."
-Adam Osborne
Spoiler For "PartesOS links":
I'll put it online when it does something.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Verdant Programming Language and Vixen
« Reply #18 on: June 01, 2011, 11:03:32 pm »
Glad to see some more progress on this Ashbad.

Offline ruler501

  • Meep
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2475
  • Rating: +66/-9
  • Crazy Programmer
    • View Profile
Re: Verdant Programming Language and Vixen
« Reply #19 on: June 01, 2011, 11:09:32 pm »
Thsi looks liek it could be very useful for some things, but I'd like a good explanation of the syntax
I currently don't do much, but I am a developer for a game you should totally try out called AssaultCube Reloaded download here https://assaultcuber.codeplex.com/
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCM/CS/M/S d- s++: a---- C++ UL++ P+ L++ E---- W++ N o? K- w-- o? !M V?
PS+ PE+ Y+ PGP++ t 5? X R tv-- b+++ DI+ D+ G++ e- h! !r y

Ashbad

  • Guest
Re: Verdant Programming Language and Vixen
« Reply #20 on: June 02, 2011, 07:43:58 am »
Thsi looks liek it could be very useful for some things, but I'd like a good explanation of the syntax

That you shall get in the future, once I get further on the documentation I'm laboring on ;)

however, I used 'give' because I pretty much like it that way.  You see, in a function, you can 'take' an argument, which means basically you absorb the argument into a local variable in objects, such as:

Code: [Select]
type cat
  string:char name <to nil
  method new(name)
    take @name
  enddef
enddef

Offline ruler501

  • Meep
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2475
  • Rating: +66/-9
  • Crazy Programmer
    • View Profile
Re: Verdant Programming Language and Vixen
« Reply #21 on: June 02, 2011, 08:33:25 am »
so what is the point of having
Code: [Select]
method new(name) it seems you'd only need
Code: [Select]
method new() then the take would give you the local variable you need
I currently don't do much, but I am a developer for a game you should totally try out called AssaultCube Reloaded download here https://assaultcuber.codeplex.com/
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCM/CS/M/S d- s++: a---- C++ UL++ P+ L++ E---- W++ N o? K- w-- o? !M V?
PS+ PE+ Y+ PGP++ t 5? X R tv-- b+++ DI+ D+ G++ e- h! !r y

Ashbad

  • Guest
Re: Verdant Programming Language and Vixen
« Reply #22 on: June 02, 2011, 08:37:55 am »
well, it would need the argument to be taken, because otherwise there would be nothing to absorb ;)

Offline ruler501

  • Meep
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2475
  • Rating: +66/-9
  • Crazy Programmer
    • View Profile
Re: Verdant Programming Language and Vixen
« Reply #23 on: June 02, 2011, 08:41:06 am »
That is confusing me. Could you please explain what the difference with take and having the argument is
I currently don't do much, but I am a developer for a game you should totally try out called AssaultCube Reloaded download here https://assaultcuber.codeplex.com/
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCM/CS/M/S d- s++: a---- C++ UL++ P+ L++ E---- W++ N o? K- w-- o? !M V?
PS+ PE+ Y+ PGP++ t 5? X R tv-- b+++ DI+ D+ G++ e- h! !r y

Ashbad

  • Guest
Re: Verdant Programming Language and Vixen
« Reply #24 on: June 02, 2011, 08:46:43 am »
okay, I'll try me best to explain ;)

basically, a local variable that is accessed within methods starts with @, showing it's a instance-only variable (@@ means type variable, and @@@ means group variable).  When you 'take' an argument, you're doing basically this:

Code: [Select]
self.variable = new_variable
except, it would just "take" it instead:

Code: [Select]
take @variable
The two are exactly the same in function, though take can be used in other applications as well, such as in this:

Code: [Select]
method change_attribute_for_group(attribute)
  take @@@attribute
enddef

which is highly useful for quickly changing a framework for an instance group.
« Last Edit: June 02, 2011, 08:47:04 am by Ashbad »

Offline ruler501

  • Meep
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2475
  • Rating: +66/-9
  • Crazy Programmer
    • View Profile
Re: Verdant Programming Language and Vixen
« Reply #25 on: June 02, 2011, 08:56:07 am »
So its more like setting a class variable in python right?
I currently don't do much, but I am a developer for a game you should totally try out called AssaultCube Reloaded download here https://assaultcuber.codeplex.com/
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCM/CS/M/S d- s++: a---- C++ UL++ P+ L++ E---- W++ N o? K- w-- o? !M V?
PS+ PE+ Y+ PGP++ t 5? X R tv-- b+++ DI+ D+ G++ e- h! !r y

Ashbad

  • Guest
Re: Verdant Programming Language and Vixen
« Reply #26 on: June 02, 2011, 09:02:33 am »
yeah, it's pretty much like that :)

Offline XVicarious

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 485
  • Rating: +45/-28
  • I F**king Love Twisty Puzzles
    • View Profile
    • XVicarious
Re: Verdant Programming Language and Vixen
« Reply #27 on: June 14, 2011, 08:55:31 pm »
I don't know why, but it looks really confusing to me. Although I'm more used to Python and C language syntax than anything else.

Ashbad

  • Guest
Re: Verdant Programming Language and Vixen
« Reply #28 on: June 14, 2011, 09:05:25 pm »
Well the syntax is a bit of Rubonic Pike mixed with my own verbose ideals.  It's a bit different than many other languages, but to say one thing, its extremely flexible and awesome, as you can do things like non-linear expressions, polytyping variables to fit certain criteria, and such.  Comparison of C code and Verdant code:

Code: [Select]
typedef union {
  Int val1;
  Float val2;
} int_float;

Int_float apple = 2.0f;
apple += 5;
apple *= 2;

Code: [Select]
int:float apple <to (2 * (parseval + 5) to> parseval)
It's not a great example, but it shows non-linear assignment and the use of parseval (a variable local to each line of complete code, basically holds currently parsed value)

Keep in mind, the C code I just posted would most likely not be far off from what would be executed if the Verdant code above was compiled and then run.

Also keep in mind that Verdant code I posted isn't very optimized at all, and would be better written as this:

Code: [Select]
int:float apple <to 2 * (parseval +5)
But that totally ruins my example ;)
« Last Edit: June 14, 2011, 09:12:15 pm by Ashbad »

Offline Spyro543

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1189
  • Rating: +74/-3
    • View Profile
Re: Verdant Programming Language and Vixen
« Reply #29 on: June 14, 2011, 09:47:36 pm »
Perhaps you could make Verdant for EnvisionDev? It is about programming, anyway ;D

Anywhoz, It's a big project to make a whole programming language, and I'm ... uhhh..... proud of you to be doing this. Awesomeness ;D