eLunate
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
|
| 07 Feb 2015 02:59 AM |
Print the alphabet without using any vowels in your script. Shortest script wins. Print 2015 without using any numbers in your script. Count to 100 without an explicit loop (No repeats, fors or whiles). Again, shortest script wins.
Last one isn't really a challenge but whatever. Anything that compliles to Lua uses the compiled result. |
|
|
| Report Abuse |
|
|
|
| 07 Feb 2015 03:07 AM |
for i=1, 500 do print(string.char(i)) end
print("2015")
local count = 0 local recursive = function() count = count + 1 if(count < 100)then recursive() end end |
|
|
| Report Abuse |
|
|
drager980
|
  |
| Joined: 25 May 2009 |
| Total Posts: 13385 |
|
|
| 07 Feb 2015 03:07 AM |
local t = {"bo","","o","oooks"} local a = {} for i,v in pairs(t) do table.insert(a,string.len(t[i])) c=i end year = a[c/c] .."".. a[c - ((c/c) + (c/c))] .."".. a[c-(c/c)] .."".. a[c] print(year) |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 07 Feb 2015 03:09 AM |
#1 I would just go with a print("\65\66\etc") but I feel it's cheating idk #2 I think this challenge was already completed (or with 2014), I'll see if I can find the thread #3 shortest, so who cares about efficiency :) function _(a)print(a)_(a+1)end _(1) I'm sure there are shorter ways, but I need to start somewhere |
|
|
| Report Abuse |
|
|
eLunate
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
|
| 07 Feb 2015 03:09 AM |
Your first script used vowels. Your second script used numbers (I wasn't talking about the dataType) I didn't look at your third script because your first 2 were wrong. |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 07 Feb 2015 03:10 AM |
Oh you meant like no vowels at all :) I thought just as part of the string or something :)
|
|
|
| Report Abuse |
|
|
128GB
|
  |
| Joined: 17 Apr 2014 |
| Total Posts: 8056 |
|
|
| 07 Feb 2015 03:11 AM |
| print(#"ab"..#''..#"a"..#"abcde") |
|
|
| Report Abuse |
|
|
|
| 07 Feb 2015 03:11 AM |
Specify the second one. I forgot about the vowels nor did I care when writing it.
|
|
|
| Report Abuse |
|
|
eLunate
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
|
| 07 Feb 2015 03:13 AM |
| My favourite of the 2014 ones was #; |
|
|
| Report Abuse |
|
|
drager980
|
  |
| Joined: 25 May 2009 |
| Total Posts: 13385 |
|
| |
|
128GB
|
  |
| Joined: 17 Apr 2014 |
| Total Posts: 8056 |
|
|
| 07 Feb 2015 03:16 AM |
@Dra That will error because prnt is not a function |
|
|
| Report Abuse |
|
|
eLunate
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
|
| 07 Feb 2015 03:16 AM |
A=loadstring'print(...)A(...+1)'1
Can you call it at the end like that? Or do I have to do (1) Lua problems. |
|
|
| Report Abuse |
|
|
eLunate
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
|
| 07 Feb 2015 03:18 AM |
| On second thought that's stupid I'd have to do A(1) instead of just 1 |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 07 Feb 2015 03:21 AM |
'Print the alphabet without using any vowels in your script. Shortest script wins.' I'm going to get this!: (you didn't say it has to be Rbx.Lua) _G["pr\105nt"]("\65\66\67\68\69\70\71\72\73\74\75\76\78\79\80\81\82\83\84\85\86\87\88\89\90"); |
|
|
| Report Abuse |
|
|
128GB
|
  |
| Joined: 17 Apr 2014 |
| Total Posts: 8056 |
|
|
| 07 Feb 2015 03:31 AM |
| _G["l\111\97d"]("f\111r x=97,122 d\111 pr\105nt(str\105ng.ch\97r(x))\101nd")() |
|
|
| Report Abuse |
|
|
128GB
|
  |
| Joined: 17 Apr 2014 |
| Total Posts: 8056 |
|
|
| 07 Feb 2015 03:33 AM |
_G["pr\105nt"]("\97bcd\101fgh\105jklmn\111pqrst\117vwxyz")
I kinda stole cnts idea here though |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
| |
|
128GB
|
  |
| Joined: 17 Apr 2014 |
| Total Posts: 8056 |
|
|
| 07 Feb 2015 03:40 AM |
_G["pr\105nt"]("\97bcd\101fgh\105jklmn\111pqrst\117vwx\121z")
;P |
|
|
| Report Abuse |
|
|
eLunate
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
|
| 07 Feb 2015 03:41 AM |
Woo scripts I love it. 128 is winning at the moment hehe |
|
|
| Report Abuse |
|
|
128GB
|
  |
| Joined: 17 Apr 2014 |
| Total Posts: 8056 |
|
|
| 07 Feb 2015 03:46 AM |
_G["pr\105nt"]"th lphbt"
Serious new reply though _G["pr\105nt"]"\97bcd\101fgh\105jklmn\111pqrst\117vwxyz"
Or if y doesn't count _G["pr\105nt"]"\97bcd\101fgh\105jklmn\111pqrstyvwxyz" |
|
|
| Report Abuse |
|
|
Voiliax
|
  |
| Joined: 05 Nov 2009 |
| Total Posts: 15554 |
|
|
| 07 Feb 2015 03:49 AM |
#2 Cool little trick with hexdecimals: print((#"".."xFBE")/#" ")
~ oxcool1 |
|
|
| Report Abuse |
|
|
128GB
|
  |
| Joined: 17 Apr 2014 |
| Total Posts: 8056 |
|
|
| 07 Feb 2015 03:49 AM |
Actually the first one should be _G["pr\105nt"]"th\101 \97lph\97b\101t"
Because you said without using them in the script, not 'print the alphabet without any vowels' |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 07 Feb 2015 03:51 AM |
| ox and his clever tricks :) |
|
|
| Report Abuse |
|
|
|
| 08 Feb 2015 12:46 AM |
"Print 2015 without using any numbers in your script." Same challenge but with no pound sign either |
|
|
| Report Abuse |
|
|
mustyoshi
|
  |
 |
| Joined: 27 Dec 2007 |
| Total Posts: 41651 |
|
|
| 08 Feb 2015 01:24 AM |
Lua's lack of treating characters as bytes makes me angry. All the tricks I could do in C don't work :(
function r(l) return (l>1) and print(r(l-1)) or l end r(101)
4 lines.
There's the last 1 tho. ~Monica |
|
|
| Report Abuse |
|
|