about summary refs log tree commit diff stats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* https://www.lua.org/pil/28.3.htmlKartik K. Agaram2021-11-051-2/+13
| | | | | | | | a = array.new(1000) for i=1,1000 do a:set(i, 1/i) end print(a:get(10)) -- 0.1
* https://www.lua.org/pil/28.2.htmlKartik K. Agaram2021-11-051-7/+16
|
* confirmed that this is the sameKartik K. Agaram2021-11-051-2/+2
| | | | And it seems simpler to me.
* going through chapter 28 of https://www.lua.org/pilKartik K. Agaram2021-11-052-3/+86
| | | | | | | | | User-defined C data. I think I have some understanding of the Lua stack now. It's a different kind of verbose, error-prone syntax than Mu that requires me to play computer in my head. But I don't fully grok metatables yet. At least not well enough to grok everything that's going on in lcurses/ext.
* I don't yet understand the stackKartik K. Agaram2021-10-242-5/+4
|
* ok, starting to make sense nowKartik K. Agaram2021-10-241-3/+1
| | | | | | | | Putting together two resources: https://lucasklassmann.com/blog/2019-02-02-how-to-embeddeding-lua-in-c/#exposing-a-simple-variable https://www.lua.org/manual/5.3/manual.html, section 2.1, "Values and Types", particularly the description of light user data. And lo, I see lua_pushlightuserdata in lapi.c
* done reading lua_newstateKartik K. Agaram2021-10-241-1/+8
|
* mildly less confusingKartik K. Agaram2021-10-241-1/+1
|
* back to making sense of lua_newstateKartik K. Agaram2021-10-241-1/+1
|
* get rid of userstate hooksKartik K. Agaram2021-10-245-21/+0
|
* get rid of fromstate/tostateKartik K. Agaram2021-10-242-9/+4
|
* get rid of state_sizeKartik K. Agaram2021-10-242-6/+5
|
* get rid of LUAI_EXTRASPACEKartik K. Agaram2021-10-243-12/+17
| | | | | Lua's power may come from extensibility, but the indirections are currently in the way
* trying to make sense of how bindings are createdKartik K. Agaram2021-10-243-4/+2
| | | | | | lua_State contains these StkId fields (stack, stack_last, base, top) that expand to a pointer of a struct containing a Lua value and an int. Unclear how it's used, or how you build a stack out of it.
* print's newline now returns to column 0Kartik K. Agaram2021-10-221-10/+7
| | | | | | | | | | At this point I'm done making this repo ncurses-ready. Remaining files that allude to stdin/stdout/stderr: lauxlib.c - unclear how these primitives should work; may kill them ldblib.c - unclear what debug experience should be liolib.c - might kill or simulate these luac.c - let the compiler continue to be a terminal program
* drop lua_stdin_is_ttyKartik K. Agaram2021-10-221-17/+0
| | | | luaconf.h now no longer refers to stdin/stdout/stderr.
* drop support for '-' filenameKartik K. Agaram2021-10-221-10/+3
| | | | lua.c now no longer refers to stdin/stdout/stderr.
* ncurses I/O in lua.cKartik K. Agaram2021-10-221-10/+15
| | | | | | | | | | | | Currently working: > print(1) 1 > print(2) 2 Print's newline doesn't return to column 0 yet. Ctrl-d no longer works. Ctrl-c exits cleanly.
* kill lua_readline abstractionKartik K. Agaram2021-10-222-6/+3
|
* purge notion of commandline historyKartik K. Agaram2021-10-222-4/+0
|
* delete readline supportKartik K. Agaram2021-10-222-22/+4
| | | | We're going to be using full-on ncurses.
* clean up a few warnings with gcc 9.3.0Kartik K. Agaram2021-10-223-3/+3
|
* new fork of Lua 5.1Kartik K. Agaram2021-10-2256-0/+17145
https://www.lua.org
'n473' href='#n473'>473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616