lci
Stuff related to the LOLCODE interpreter, lci.
7 posts Page 1 of 1
Postby JustSayin » Sun Apr 27, 2014 1:01 pm
Hey there!

I have a suggestion for a greater-than operator: BIGGR DEN (or if you think it would lead to confusion due to BIGGR OF one could name it BIGGUR DEN)

Example:

Code: Select all
I HAS A MY_PENOR  ITZ 99.99
GIMMEH UR_PENOR

MY_PENOR BIGGR DEN UR_PENOR
O RLY?
    YA RLY,   VISIBLE "YAAAAY~ ^__^"
    NO WAI,  VISIBLE "A WINRAR IS YOU...  DIZ SUX"
OIC


There could also be a SMALLR DEN operator or maybe a BIGGR OR SAEM DEN operator for ">=". What do you think?
Postby jjm » Sun Apr 27, 2014 4:52 pm
I like it! I've always had a problem with the way "BIGGR/SMALLR OF" feels when writing code, you know? They just never flowed very well.

Plus, this is a relatively straightforward change to the syntax. I think that adding a separate operator for "BIGGER OR SAEM DEN" also makes a lot of sense because, as you probably know, the equivalent of that is really clunky in LOLCODE.
Postby JustSayin » Sun Apr 27, 2014 6:48 pm
Nice. I know exactly how it feels and am always happy when I was able to think of a way that would improve how coding feels.

I'll keep an eye on this issue and will report back when I happen to encounter other suggestions for things that somewhat break the flow.
At this moment I just happen to find myself writing HAZ instead of HAS now and then and sometimes wish the interpreter would accept both variants, but I'm not 100% sure whether that would be good.

If there is anything you're unsatisfied with I might be able to think of something, too. Keep up the good work and keep implementing new things. I really like the syntax and lci being a light-weight and performant interpreter
It would be nice to have a somewhat complete and coherent feeling language that covers the majority of basic ANSI C features someday in the future for shits and giggles. If it reminds people that writing code can be fun it already paid off.
Postby JustSayin » Sun Apr 27, 2014 10:55 pm
I just encountered another operation that feels like breaking the flow: MOD.
It doesn't seem very fitting, I'd suggest replacing it with LEFTOVAR like I did in this loop.
Code: Select all
IM IN YR LOOP UPPIN YR COUNTA TIL BOTH SAEM COUNTA AN 101
        BOTH SAEM 0 AN LEFTOVAR OF COUNTA AN 10, O RLY?
                   YA RLY, VISIBLE COUNTA        BTW Let's imagine I'm interested in divisibility by 10 for whatever reason
                   OIC
IM OUTTA YR LOOP


I was surprised how well it integrates.
Postby jjm » Sun Apr 27, 2014 11:28 pm
JustSayin, you have a talent for this! I'm thinking that we can compile a list of potential language modifications and include them in a draft 1.3 language specification which will basically describe the language syntax and semantics that lci implements. Technically the language allows "HAI <VERSION_NUMBER>", so this can be used for backwards compatibility between the different language specs.

Keep posting any suggestions for other syntax issues!
Postby LeartS » Thu Oct 16, 2014 9:54 pm
I'm super in favour of LEFTOVAR, it's perfect imo.
Not so much for BIGGR DEN or BIGGUR DEN, too similar to the max function. What about PWNZ? Taking JustSayin's example:
Code: Select all
I HAS A MY_PENOR  ITZ 99.99
GIMMEH UR_PENOR

MY_PENOR PWNZ UR_PENOR
O RLY?
    YA RLY, VISIBLE "YAAAAY~ ^__^"
    NO WAI, VISIBLE "A WINRAR IS YOU...  DIZ SUX"
OIC
Postby Rhodri » Mon May 11, 2015 1:19 pm
The problem with both BIGG(U)R DEN and PWNZ is that they're both infix operators, and everything else is a prefix operator. This matters because we don't have to deal with operator precedence at the moment. There was a thread on the old forum, now on the Wayback Machine, that went through this in more detail.

I like the suggestion that started that thread; SORTD and BAKWARD, which conveniently make sense for infinite arity orderings too. The only problem is whether these include equality or not, and what to call the other version. REELY SORTD? SAEM OR SORTD?
7 posts Page 1 of 1

Login

Who is online

Users browsing this forum: No registered users and 2 guests

cron