diff options
Diffstat (limited to 'src/tmp.lil')
-rw-r--r-- | src/tmp.lil | 67 |
1 files changed, 36 insertions, 31 deletions
diff --git a/src/tmp.lil b/src/tmp.lil index 5ad150e..60fbb53 100644 --- a/src/tmp.lil +++ b/src/tmp.lil @@ -6,54 +6,54 @@ # I'm not 100% certain what I'm going to build with these features, yet, but # I will use this as a space to explore what lil has to offer. -people.name:"Alice","Sam","Thomas","Sara","Walter" -people.age:25,28,40,34,43 -people.job:"Chef","Sous Chef","Baker","Front of house","Baker" -people:table people +# people.name:"Alice","Sam","Thomas","Sara","Walter" +# people.age:25,28,40,34,43 +# people.job:"Chef","Sous Chef","Baker","Front of house","Baker" +# people:table people -t:select from people +# t:select from people -show[t] +# show[t] -s:select where ("S%m" parse name) from people +# s:select where ("S%m" parse name) from people -show[s] +# show[s] -d:select where ("Baker" = job) from people +# d:select where ("Baker" = job) from people -show[d] +# show[d] -a:select name where ("Alice" = name) from people +# a:select name where ("Alice" = name) from people -show[a] +# show[a] -w:update job:"Amazing Chef" where job = "Chef" from people +# w:update job:"Amazing Chef" where job = "Chef" from people -Show[w] +# Show[w] -l:insert name:"John" job:"Critic" age:32 into people +# l:insert name:"John" job:"Critic" age:32 into people -show[l] +# show[l] -# save:writecsv[l "sis" ","] # where sis formats the column type, here string integer string -- the other option is boolean. +# # save:writecsv[l "sis" ","] # where sis formats the column type, here string integer string -- the other option is boolean. -# write["test.csv" save] +# # write["test.csv" save] -on cons x y do - x,y -end +# on cons x y do +# x,y +# end -breakfast: insert food:("Eggs","Pancakes","Grapefruit") quantity:(3,4,1) tasty:(1,1,0) into 0 # NOTE, 0 here could also be the name of the variable, so, in this example, breakfast +# breakfast: insert food:("Eggs","Pancakes","Grapefruit") quantity:(3,4,1) tasty:(1,1,0) into 0 # NOTE, 0 here could also be the name of the variable, so, in this example, breakfast -show[breakfast] +# show[breakfast] -needle: "apple" -haystack: ("frog","apple","chicken","toadstool","apple","rice","fish") +# needle: "apple" +# haystack: ("frog","apple","chicken","toadstool","apple","rice","fish") -filter:count needle take haystack -spread_conforming:sum needle = haystack -print[filter] -print[spread_conforming] +# filter:count needle take haystack +# spread_conforming:sum needle = haystack +# print[filter] +# print[spread_conforming] # spent a good bit of time playing with lil and reviewing the docs. I am now @@ -92,8 +92,6 @@ print[spread_conforming] # t: insert food:("Eggs","Pancakes","Grapefruit") quantity:(3,4,1) tasty:(1,1,0) into 0 - - # validate that I can write a table to disk and read it back in # show[catalogue] # out:writecsv[catalogue] @@ -106,3 +104,10 @@ print[spread_conforming] # HUGE SUCCESS! +if args[2] do + url:args[2] + print[url] +else + print["\n please pass a url as an argument\n"] +end + |