y-less.com

17 January, 2010

LaTeX auto-processing

Filed under: Uncategorized — Y_Less @ 17:03

During the course of my EngD I have started using LaTeX for writing papers and documents (technically I use MikTeX, but that’s just because I’m on Windows). It’s a bit tricky to get used to, especially as it does some things in an odd way, so I’ve written a handy little script to automate everything.
(more…)

11 August, 2009

el-mo.org

Filed under: Uncategorized — Y_Less @ 00:29

http://www.el-mo.org/ has just been released – the latest site in the rapidly expanding (or not) y-less.com network. It’s just a basic homepage for my friend’s baby and entirely unmaintained – it was just made after a chat with him.

3 June, 2009

yavascript.org

Filed under: Uncategorized — Tags: , , , , , — Y_Less @ 21:02

I have unofficially unveiled yavascript.org, by that I mean it’s on-line but this is the first public mention of it. It is fairly basic at the moment but has all the important information relating to the first version of my yavascript compiler and development system. So yeah, head on over and check it out, download and try out the tool and, if you’re so inclined, read my report on its development:

yavascript.org

CSS showing off

Filed under: Uncategorized — Tags: , , , — Y_Less @ 20:55

Recently I saw a question on a board I visit asking about how to make tooltips in Javascript, now I am a big JS fan, having spent a lot of time writing yavascript to aid in it’s development, but it’s a last resort – if you can’t do something any other way, use Javascript. Although doing things such as tooltips without Javascript is admittedly hard and people may not even realise it’s possible – it is, so I did:

Example 1 – CSS tooltips:

http://yavascript.org/css/tooltip.html

Note: CAN be dodgy in IE6 if you don’t make the offset big enough to appear under the link.

Example 2 – CSS lightbox:

http://yavascript.org/css/lightbox.html

Note: Currently only works in Firefox 3.

18 May, 2009

yavascript debug mode

Filed under: Uncategorized — Y_Less @ 10:59

Introduction

One of the things added to the yavascript compiler, but not completed by the time I had to hand the project in to uni, was a debug mode. Because the compiler reads all the code in syntactically it can output it in whatever form it likes, including an experimental full debug mode. Basically your code goes from:

a += /search/i;

To:

$Y._addAss(
	/* target */
	$Y._ref(
		/* name */
		'a',
		/* original code */
		'a',
		/* original line */
		42,
		/* original file */
		'my_code.js'),
	/* expression */
	$Y._regex(
		/* pattern */
		'search',
		/* modifiers */
		'i',
		/* original code */
		'/search/i',
		/* original line */
		43,
		/* original file */
		'my_code.js'),
	/* original code */
	'a +=\n\t/search/i;',
	/* original line */
	42,
	/* original file */
	'my_code.js');

The obvious question is WHY? But if you examine this code carefully you will see that it makes run-time debugging information a snap to collect and use to find problems.
(more…)

2 May, 2009

Sprockets vs yavascript

Filed under: Uncategorized — Tags: , , , , — Y_Less @ 08:04

Sprockets is a tool from the makers of the “Prototype” Javascript library designed to ease the integration of multiple files via an inclusion system. yavascript is that and so much more, integrating syntax-aware minification and conditional compilation. While writing up my report on yavascript as part os my third year project I had to justify why I chose not to use Sprocket’s way of doing things. The simple answer is I didn’t want to, I like C and wanted to do it C’s way, but I figured that wouldn’t cut it in a technical report, so this led to a serious critical analysis of both systems.
(more…)

Bad NoScript update

Filed under: Uncategorized — Tags: — Y_Less @ 02:06

Update

NoScript v1.9.2.5 added the a prompt to ask if you wanted to add the list on initial installation. Personally I would have been perfectly happy with this, but v1.9.2.6 removed the white-list altogether. Also apparently as a result of this there are discussions under way for a change in AMO (addons.mozilla.org) policy.
(more…)

28 April, 2009

yavascript v2 proof-of-concept

Filed under: Uncategorized — Tags: — Y_Less @ 05:18

With my Javascript preprocessor project due in in less than two weeks, and now (mostly) all written and working pretty well I have JUST figured out a FAR better way to do the whole project.  This is highly irritating to say the least, and now I have to find a way to justify why I didn’t do it that way in the first place without saying “I didn’t think of it”.

This new version allows full C-like text replacement and pre-processing, as well as totally custom symbols like “#define”, when “#” isn’t even a valid Javascript character:

#define VALUE (42)

alert(VALUE);

#define LOOP for (var i = 0; i < 10; i++)

LOOP
{
	alert(i);
}

Anyone who knows Javascript can tell you that what I just posted is not valid, and if you don’t know it then take my word on it. However it IS valid yavascript and can be run in any modern browser (or should be able to, I’ve only tested in FF3 and IE6) with no modification at all!

(more…)

Powered by WordPress