These are chat archives for TARDIX/Dev

21st
Jun 2015
Matheus Magalhães de Alcantara
@demhydraz
Jun 21 2015 11:50
I don't like KDE
SquidDev
@SquidDev
Jun 21 2015 17:46
@/all Hello!
Matheus Magalhães de Alcantara
@demhydraz
Jun 21 2015 18:20
Hello, squiddev.
@SquidDev
SquidDev
@SquidDev
Jun 21 2015 20:35
@DemHydraz I saw it, it looks cool. Not sure I see the point over conventional Lua bytecode though.
Matheus Magalhães de Alcantara
@demhydraz
Jun 21 2015 20:37
can you check if that howlfile will work?
SquidDev
@SquidDev
Jun 21 2015 20:38
@DemHydraz What Howlfile?
Matheus Magalhães de Alcantara
@demhydraz
Jun 21 2015 20:38
The Mu howfile
Sources:Main "cli/ccdocker.lua"
  :Depends "parse"
  :Depends "instset"
  :Depends "exec"

Sources:File "lib/parse.lua"
  :Name "parse"

Sources:File "lib/instructions.lua"
  :Name "instset"

Source:File "lib/executor.lua"
  :Name "exec"

Tasks:Clean("clean", "build")
Tasks:Combine("combine", Sources, "build/muvm", {"clean"}):Verify()
Tasks:Minify("minify", "build/muvm", "build/muvm.min")
hm lol forgot to fix that first line
SquidDev
@SquidDev
Jun 21 2015 20:39
Yeah, part from that looks fine.
Matheus Magalhães de Alcantara
@demhydraz
Jun 21 2015 20:39
(let's face it, every howfile that I write is a copy+paste of ccdocker's)
SquidDev
@SquidDev
Jun 21 2015 20:39
Was confused because it isn't on the repo.
Ditto. I need to create a better syntax
Or just a better build system.
Matheus Magalhães de Alcantara
@demhydraz
Jun 21 2015 20:40
It is on the repo :P
it's under muvm/
SquidDev
@SquidDev
Jun 21 2015 20:41
Have you pushed recently? I can't see it.
ashnwill
@ashnwill
Jun 21 2015 20:42
Same
Can't see nuttin but da docs.
SquidDev
@SquidDev
Jun 21 2015 20:42
It is strange. Your contributions graph shows 5 commits to Mu, but the history shows 1.
Matheus Magalhães de Alcantara
@demhydraz
Jun 21 2015 20:42
oh god
the rise of the force push
SquidDev
@SquidDev
Jun 21 2015 20:43
git push -f. Best friend. Ever.
Matheus Magalhães de Alcantara
@demhydraz
Jun 21 2015 20:43
oh yea
I accidentally screwed the repo because of filesystem failures
git push -f
SquidDev
@SquidDev
Jun 21 2015 20:44
@DemHydraz Also add: Tasks:CreateBootstrap("boot", Sources, "build/Boot.lua", {"clean"}):Traceback()
Matheus Magalhães de Alcantara
@demhydraz
Jun 21 2015 20:44
what
SquidDev
@SquidDev
Jun 21 2015 20:44
Then you can just run build/Boot.lua instead of having them parse or loadfile.
It creates a file that dynamically loads the files each run.
Matheus Magalhães de Alcantara
@demhydraz
Jun 21 2015 20:45
Oh ok
but doesn't the minified version include the libs?
the x or loadfile(x)() is for when running from source
SquidDev
@SquidDev
Jun 21 2015 20:47
I know, the bootstrap generates a file a bit like this which means you don't need those or loadfile(x)() statements - it loads the files into the environment correctly.
Matheus Magalhães de Alcantara
@demhydraz
Jun 21 2015 20:50

input was,
{
  {inst='exp', para={2, 10, '&hello_world'}},
  {inst='add', para={'&hello_world', 2, '&hello_world_with_two_added_to_it'}},
  {inst='debug', para={'regdump'}},
}
Matheus Magalhães de Alcantara
@demhydraz
Jun 21 2015 21:13

input:
{
  {inst = 'mov', para = {'a', 'hello, world!'}},
  {inst = 'extern', para = {'print'}},
  {inst = 'call', para = {'print'}}
}
Matheus Magalhães de Alcantara
@demhydraz
Jun 21 2015 22:07
Matheus Magalhães de Alcantara
@demhydraz
Jun 21 2015 22:13
that is like the cringiest thing I've seen in a while
ashnwill
@ashnwill
Jun 21 2015 23:23
"the entire internet is on this cd"
Matheus Magalhães de Alcantara
@demhydraz
Jun 21 2015 23:26
yup.
I now have to write a parser that outputs µ, @ashnwill
ashnwill
@ashnwill
Jun 21 2015 23:26
kek ;)
Matheus Magalhães de Alcantara
@demhydraz
Jun 21 2015 23:29
it'll take better assembly like this:
extern print
extern write

inc %ac
cmp %ac, 10
cnd 10, 20

10:
    mov a, "Hello, world! ac == 10;"
    call print
    exit

20:
     mov a, "aww, fail. ac: "
     call write
     mov a, %cc
     call print

jmp 3
-- mu bytecode test file
{
  -- function importings.

  {inst = 'extern', para = 'print'},
  {inst = 'extern', para = 'write'},

  -- increase ac and compare ac with 10
  {inst = 'inc', para = '%ac'},
  {inst = 'cmp', para = {'%ac', 10}},

  -- "if ac == 10": jump to 10 if true, jump to 20 if false
  {inst = 'cnd', para = {10, 20}},

  -- "true" block. ac == 10

  [10] = {inst = 'mov', para = {'a', 'hello, world! ac == 10'}}, -- move the 'hello, world!' message to the A register
  [11] = {inst = 'call', para = 'print'}, -- call the print function declared in line 5.
  [12] = {inst = 'exit'}, -- stop executing. if this instruction is not added, the VM will stack overflow.

  -- "false" block. ac != 10

  [20] = {inst = 'mov', para = {'a', 'aww, fail. ac: '}}, -- move the 'aww fail' message to the A register
  [21] = {inst = 'call', para = 'write'}, -- call the write function declared in line 6
  [22] = {inst = 'mov', para = {'a', '%ac'}}, -- move the AC register to the A register
  [23] = {inst = 'call', para = 'print'}, -- call the print function declared in line 5

  -- repeat
  [24] = {inst = 'jmp', para = 3}, -- repeat. jump the the first actual instruction, inc %ac.
}
and output that.
it's going to take a while
>_<
ashnwill
@ashnwill
Jun 21 2015 23:31
dat >_< fail
Matheus Magalhães de Alcantara
@demhydraz
Jun 21 2015 23:31
forgot to escape my chars
the > makes a quote
> so you have to escape it using a backslash
ashnwill
@ashnwill
Jun 21 2015 23:31
ik
Matheus Magalhães de Alcantara
@demhydraz
Jun 21 2015 23:31
so -_-
ashnwill
@ashnwill
Jun 21 2015 23:31
\\\\\\\\\\\\\\\
Matheus Magalhães de Alcantara
@demhydraz
Jun 21 2015 23:32
\\\\\\\\
ashnwill
@ashnwill
Jun 21 2015 23:32
if you put a ton of backslashes, it outputs half of them then
Matheus Magalhães de Alcantara
@demhydraz
Jun 21 2015 23:32
duh
ashnwill
@ashnwill
Jun 21 2015 23:32
handy calculator
Matheus Magalhães de Alcantara
@demhydraz
Jun 21 2015 23:32
it escapes half of them
ashnwill
@ashnwill
Jun 21 2015 23:32
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
Matheus Magalhães de Alcantara
@demhydraz
Jun 21 2015 23:32
\\\\\\\\\\\
ashnwill
@ashnwill
Jun 21 2015 23:32
\\\\\\\\\\\\\\
Matheus Magalhães de Alcantara
@demhydraz
Jun 21 2015 23:33
let's stop
\l\e\t\'\s
escaping fail
\n
..
GITTER
YOU ARE DISAPPOINTING ME