Tangent: Statement Documentation

Published May 10, 2009
Advertisement
Busy weekend. Took some time to update and flesh out the documentation, finishing out statements. As always, feedback from various levels of programmers is helpful.
Previous Entry Tangent: v0.28
0 likes 10 comments

Comments

nerd_boy
Eh. Was going to complain about "\n" not working as advertised, but apparently that is just in the little output box. :/

Though, on your TangentDabble tool, it doesn't seem to like it at all when I attempt to resave a file in a different location or with a different name. It seems to just save it in the original location with the original name. >_>

Sorry if this isn't the best place to inform you. Don't think I've seen you on #gamedev, and your assembla page wouldn't let me post jack squat as far as I could tell.
May 11, 2009 07:20 AM
Telastyn
I infrequently visit #gamedev, and this is plenty good. Thanks a bunch. I'll look into that save problem.

[edit: Ticket #69, now fixed.]
May 11, 2009 08:16 AM
nerd_boy
Righty-o. Anywho, having just downloaded your language thingy today, I had a few blocks with TangentDabble. Mainly the fact that textboxes don't auto-indent on new lines, and the /actual/ output of the code wasn't newlined(yay \n vs \r\n), and it was mixed in with the rest of the compiler output.

So, I spent a few hours today hacking together a little "ide" to use. Couple areas are quite ugly, too. Seems to work properly, though, from what I've tested.

Features include:

  • Tabs

  • Auto-indent

  • Raw Output window

  • Code Output window



Now I won't go insane indenting and finding output while playing with your language. Didn't know if you wanted to use it(I'd be honored if you did!), if so, I uploaded a zip of it to here. It doesn't have the .dlls that came with the download, but it does need one or two of 'em. Can't claim to properly understand everything under Verify and BuildAndRun since I cookbooked it off of what Reflector showed me of yours. :p
May 11, 2009 12:35 PM
Telastyn
Yeah, the two methods are not terribly complex. TangentDabble got thrown together in like 5 minutes (TanCC in even less!), and I'm not a big winform guy in the first place. I should route a lot of the compiler output to another stream, but it's just not there yet.

If you want to knock something together (monospaced fonts for the editor is my only immediate gripe), I'll be glad to include it in the package. Let me know if there's anything I can do to help that out.
May 11, 2009 01:11 PM
nerd_boy
Reuploaded to the same spot. Threw in a combobox and a textbox in the menu to allow for the selection of fonts and fontsizes respectively.

Lemme know if there's anything else!
May 11, 2009 02:05 PM
Telastyn
Quote:Original post by nerd_boy
Reuploaded to the same spot. Threw in a combobox and a textbox in the menu to allow for the selection of fonts and fontsizes respectively.

Lemme know if there's anything else!


It'd be great if it remembered your font of choice. That and a title is all that immediately jumps out at me.
May 11, 2009 02:24 PM
nerd_boy
I really like the 'infix' notation, even though I can create postfix and prefix stuff with it. However, it doesn't seem to work in classes, only in static methods. Bug or limitation?
May 17, 2009 10:11 AM
Telastyn
Quote:Original post by nerd_boy
I really like the 'infix' notation, even though I can create postfix and prefix stuff with it. However, it doesn't seem to work in classes, only in static methods. Bug or limitation?


Eh?

public class foo{
	public	(int x) bar (int y) => int{
		return(x+y);
	}

	public baz(int x)=>int{
		return(x bar x);
	}
}

public static	main()=>void{
	local foo aFoo = new foo;

	print 2 aFoo.bar 4;          // 6
	print aFoo.baz(2);           // 4
}




Works for me, or am I misunderstanding you?
May 17, 2009 09:35 PM
nerd_boy
Perhaps I should have said abusing infix notation works in static func, but not classes.

public class foo
{
	public (int x)bar(int y)=>int
	{
		return(x+y);
	}

	public baz(int x)=>int
	{
		return(x bar x);
	}
	
	// This doesn't compile
	//public (int w)infix(int x)notation(int y)abuse(int z)=>int
	//{
	//	return(w+x+y+z);
	//}
}

// This compiles *and* runs. Proper.
public static Bad(int w)infix(int x)notation(int y)abuse(int z)dog=>int
{
	return(w+x+y+z);
}

public static	main()=>void
{
	local foo aFoo = new foo;

	print 2 aFoo.bar 4;          // 6
	print aFoo.baz(2);           // 4
	print Bad 3 infix 4 notation 5 abuse 6 dog;// 18
}
May 18, 2009 10:27 AM
Telastyn
Ah.
Bug.

The problem was not with the infixing, it was with the phrase compilation. It was looking to see if the class had any existing methods with that name (because it needs to overload if there is) but was looking in the wrong place.

This now works:


public class foo{
	public	(int x) bar (int y) => int{
		return(x+y);
	}

	public baz(int x)=>int{
		return(x bar x);
	}

	public   (int x) a (int y) b (int z)=>int{
		return(x+y+z);
	}
}

public static	main()=>void{
	local foo aFoo = new foo;

	print 2 aFoo.bar 4;          // 6
	print aFoo.baz(2);           // 4
	print 2 aFoo.a 3 b 4;        // 9
}





Let me know if you want an updated build. [edit: Updated Build. The one dll might be misnamed.]
May 18, 2009 11:09 AM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement