conversations listlengths 2 3 | source stringclasses 1 value | stack stringclasses 1 value |
|---|---|---|
[
{
"from": "system",
"value": "Remove a space in fib\n"
},
{
"from": "human",
"value": "fib = method(n,\n i = 0\n j = cur = 1\n while(cur <= n,\n k = i\n i = j\n j = k + j\n cur ++)\n i)\n\nSystem ifMain(fib(30000) println)\n"
},
{
"from": "gpt",
"value": "fib = method... | ioke | chosen |
[
{
"from": "system",
"value": "Make it possible to create new things based on the existing\n"
},
{
"from": "human",
"value": "\nStruct = fn(+attributes, +:attributesWithDefaultValues,\n val = fn(+values, +:keywordValues,\n result = val mimic\n (attributesWithDefaultValues seq +\n attr... | ioke | chosen |
[
{
"from": "system",
"value": "Add documentation to new Integer methods\n"
},
{
"from": "human",
"value": "Number zero? = method(\n \"Returns true if this number is zero.\",\n @ == 0\n)\n\nNumber negation = method(\n \"Returns the negation of this number\",\n\n 0 - @)\n\nNumber abs = method(\... | ioke | chosen |
[
{
"from": "system",
"value": "Refactor cond to use the new composition stuff\n"
},
{
"from": "human",
"value": "\nDefaultBehavior FlowControl cond = syntax(\n \"takes zero or more arguments. each two arguments are paired, where the first one is the condition part, and the second is the then-par... | ioke | chosen |
[
{
"from": "system",
"value": "Update example to do more than one thing on button pressed\n"
},
{
"from": "human",
"value": "\n\n \nimport(:javax:swing, :JFrame, :JButton)\nimport java:awt:GridLayout\n\nbutton = JButton new(\"Press me!\") do(\n addActionListener(fn(e, button text = \"Hello from... | ioke | chosen |
[
{
"from": "system",
"value": "Update 99 bottles to use idiomatic Ioke\n"
},
{
"from": "human",
"value": "bottle = method(i,\n if(i == 0, return \"no more bottles of beer\")\n if(i == 1, return \"1 bottle of beer\")\n return \"#{i} bottles of beer\"\n)\n\n; TODO List reverse instead of sortBy\... | ioke | chosen |
[
{
"from": "system",
"value": "Add some more waiting tests\n"
},
{
"from": "human",
"value": "\nuse(\"ispec\")\n\ndescribe(Hook,\n it(\"should have the correct kind\",\n Hook should have kind(\"Hook\")\n )\n\n describe(\"into\",\n it(\"should return a new hook object connected to the arg... | ioke | chosen |
[
{
"from": "system",
"value": "Upgrade the console a bit, to use the debugger instead of rescuing exceptions. This makes for a cleaner API and so on. Also establish the quit and abort restarts\n"
},
{
"from": "human",
"value": "\n\nIIk = Origin mimic\n\nIIk Exit = Condition mimic\nIIk mainContext... | ioke | chosen |
[
{
"from": "system",
"value": "Make pending spec of the rewrite stuff\n"
},
{
"from": "human",
"value": "\nuse(\"ispec\")\n\ndescribe(Message,\n describe(\"rewrite!\",\n it(\"should rewrite a very simple message chain\",\n msg = 'foo\n msg rewrite!(\n '(:x) => '(something(:x)... | ioke | chosen |
[
{
"from": "system",
"value": "Add simple support for comprehensions\n"
},
{
"from": "human",
"value": "\nuse(\"ispec\")\n\ndescribe(DefaultBehavior,\n describe(\"FlowControl\",\n describe(\"for\",\n it(\"should handle a simple iteration\",\n for(x <- [1,2,3], x) should == [1,2,3]... | ioke | chosen |
[
{
"from": "system",
"value": "Make assignment of use-modules even easier\n"
},
{
"from": "human",
"value": "\ncell(:use) jar = method(jarFile,\n use(if(#/\\.jar$/ =~ jarFile,\n jarFile,\n \"#{jarFile}.jar\")))\n"
},
{
"from": "gpt",
"value": "\nuse jar = method(jarFile,\n ... | ioke | chosen |
[
{
"from": "system",
"value": "Make the small example thing use the html builder\n"
},
{
"from": "human",
"value": "\n\"LOADING: my first Ioke web application!\" println\n\nIKanServe actionForPath(#r[^/foo], method(\"hello world!!\"))\nIKanServe actionForPath(#r[^/bar], method(\"you requested thi... | ioke | chosen |
[
{
"from": "system",
"value": "Restructure the assignments a bit\n"
},
{
"from": "human",
"value": "\nStruct = fn(+attributes, +:attributesWithDefaultValues,\n val = fn(+values, +:keywordValues,\n result = val mimic\n attributesWithDefaultValues each(vv,\n result cell(vv key) = vv val... | ioke | chosen |
[
{
"from": "system",
"value": "Use a restart for no-match\n"
},
{
"from": "human",
"value": "\nPattern = Origin mimic do(\n from = dmacro(\n [pattern]\n Pattern with(pattern: pattern))\n\n variable? = method(current, current symbol?)\n varName = method(msg, :(msg name asText[1..-1]))\n\n... | ioke | chosen |
[
{
"from": "human",
"value": "Add a new version of the RPS example\n"
},
{
"from": "gpt",
"value": "RPS = Origin mimic do(\n Player = Origin mimic\n Field = Origin mimic\n\n Field pass = macro(\n RPS Player with(name: call message name asText, field: self))\n\n scores = {} withDefault(0)\n... | ioke | chosen |
[
{
"from": "human",
"value": "Add english translation of the account example\n"
},
{
"from": "gpt",
"value": "Account = Origin mimic do(\n transfer = method(amount, from: self, to:,\n from balance -= amount\n to balance += amount\n )\n\n print = method(\n \"<Account name: #{name} bala... | ioke | chosen |
[
{
"from": "human",
"value": "Add a quite different implementation of rps\n"
},
{
"from": "gpt",
"value": "RPS = Origin mimic do(\n Player = Origin mimic\n Field = Origin mimic\n\n Field pass = macro(\n RPS Player with(name: call message name asText, field: self))\n\n scores = {} withDefau... | ioke | chosen |
[
{
"from": "human",
"value": "Add some example information on how a good Ioke build system could look like\n"
},
{
"from": "gpt",
"value": "\nproject name = \"Foobarius\"\nproject author = \"Ola Bini\"\nproject homepage = \"http://ioke.org/foobarius\"\nproject loadPath = FileSystem[\"lib\"]\nproj... | ioke | chosen |
[
{
"from": "human",
"value": "Add a default configuration file for IKover that ignores spec files and bin files\n"
},
{
"from": "gpt",
"value": "\nOrigin with(\n directory: \"coverage-report\",\n files: fn(file,\n case(file,\n #r[test/.*\\Z], false,\n #r[bin/.*\\Z], false,\n #... | ioke | chosen |
README.md exists but content is empty.
- Downloads last month
- 7