--- Log opened Sat Jun 03 00:00:33 2017 |
00:01 | | Kindamoody is now known as Kindamoody[zZz] |
00:03 | < Jessikat> | Sounds good to me |
00:05 | <&ToxicFrog> | And the improved parser and input handler is up and running! |
00:06 | <&ToxicFrog> | Now I just need string literals and then I can implement `def`, `var`, and `const` |
00:13 | <&McMartin> | I've just realized that Forth, based as it is on an operand stack that is indistinguishable from arguments, gets currying for free. |
00:15 | <&ToxicFrog> | (well, ok, I can implement `var` and `const`, `def` also requires function literals) |
00:19 | | * ToxicFrog ponders |
00:19 | <&ToxicFrog> | const (name val --): pops name and val, defines `name` as a word that pushes `val` |
00:20 | <&ToxicFrog> | var (name --): defines `name` as a word that pushes the address of a stack-slot-sized writeable location in memory, which can then be read with ? or written with ! |
00:21 | <&McMartin> | You might want to swap val and name in const's stack |
00:21 | <&ToxicFrog> | But in that I case I think that means var is actually implemented as { alloc-cell const } |
00:21 | <&McMartin> | 5 CELLS ALLOT |
00:21 | <&McMartin> | The noble allot |
00:22 | <&ToxicFrog> | CELLS is { sizeof(cell) * } ? |
00:22 | <&ToxicFrog> | Swap them why? |
00:24 | <&ToxicFrog> | Also, blergh, this is going to require me to add another field to Word. Aah well, I knew it was coming eventually. |
00:26 | <&McMartin> | Yes that is what CELLS is |
00:26 | <&McMartin> | And swapping them is because if the constant is messy |
00:26 | <&McMartin> | It's nicer to have |
00:26 | <&McMartin> | {big, possibly multi-line computation} NAME CONSTANT |
00:26 | <&McMartin> | Rather than having to go backwards through a stack balancer to figure out which bit is the name |
00:28 | <&McMartin> | (Forth style guides suggest putting arguments more likely to be simple expressions at the top of the stack on calls.) |
00:28 | <&McMartin> | (But then it's got wacky parser-defying systems that I still don't understand) |
00:28 | <&McMartin> | (But DOES> seems to be involved) |
00:34 | <&ToxicFrog> | Aah. |
00:35 | <&ToxicFrog> | I'm just blindly coping ps by default here, where all definitions are /name val def |
00:36 | <&ToxicFrog> | But that does make sense |
00:37 | <&ToxicFrog> | thought for a programming aid: stack balance assertions |
00:38 | <&ToxicFrog> | e.g. [ records the stack height and ] throws if the stack height when it is invoked doesn't match what it was at the last [ |
00:47 | | starkruzr [quassel@Nightstar-9848jp.fios.verizon.net] has joined #code |
00:48 | | mode/#code [+ao starkruzr starkruzr] by ChanServ |
00:50 | <&McMartin> | That starts getting very close to the invariants the JVM requires on its stack code |
01:49 | | Sith_Lord [stkr@Nightstar-7i6ec2.dyn.optonline.net] has joined #code |
01:56 | | Sith_Lord [stkr@Nightstar-7i6ec2.dyn.optonline.net] has quit [[NS] Quit: - nbs-irc 2.39 - www.nbs-irc.net -] |
02:00 | <&ToxicFrog> | ] "asdf" . |
02:00 | <&ToxicFrog> | 21420688 |
02:00 | <&ToxicFrog> | String literals are go! |
02:00 | <&ToxicFrog> | String literals are also super dangerous since they're implicitly malloc'd when lexed and automatically freed never, so you have to keep good track of them |
02:04 | <&McMartin> | Another bit of forthery; string constants there have signature ( -- ptr len ) |
02:05 | | Jessikat` [Jessikat@Nightstar-j28mqv.dab.02.net] has joined #code |
02:07 | <&ToxicFrog> | Yeah, here it's just ( -- ptr ) and they're null terminated; I have enough flash to include all of <string.h> so I might as well use it |
02:08 | | Jessikat [Jessikat@Nightstar-r7o8l7.dab.02.net] has quit [Ping timeout: 121 seconds] |
02:09 | <&McMartin> | kk |
02:20 | <&ToxicFrog> | There's a reason I'm calling this "notforth" :P |
02:20 | <&McMartin> | Most projects that say "notX" are totally X =P |
02:21 | <&[R]> | Like a certain not unix? |
02:21 | <&McMartin> | There's also Not an Emulator, Not Elm, and Not TOS |
02:21 | <@Alek> | Nightmare on Not Elm Street? |
02:22 | <&McMartin> | (Pine is Not Elm) |
02:22 | <&McMartin> | There's also FINF is Not Forth, which is a forth subset that isn't usable but targets he Arduino. |
02:22 | <&McMartin> | https://github.com/lpereira/finf |
02:22 | <&ToxicFrog> | ] "kittens" dup . .s |
02:23 | <&ToxicFrog> | 22141648 |
02:23 | | macdjord [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has joined #code |
02:23 | | mode/#code [+o macdjord] by ChanServ |
02:23 | <&ToxicFrog> | kittens |
02:24 | <&ToxicFrog> | ~~SAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA~p;;;;;; |
02:24 | <&McMartin> | That is an excellent simulation of kittenkeyboard |
02:24 | <&ToxicFrog> | That wasn't a simulation |
02:25 | <&McMartin> | I know you're "notforth" but maybe don't be git |
02:25 | | macdjord|dance [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has quit [Ping timeout: 121 seconds] |
02:25 | <&McMartin> | ".s" is forth for "dump stack without altering it" |
02:26 | <&ToxicFrog> | Aah. |
02:26 | <&ToxicFrog> | (I've read lots of implementation code and most of the parts of the standard that deal with behaviour, but not most of the word lists) |
02:26 | <&ToxicFrog> | What's "print string", then? |
02:29 | <&McMartin> | TYPE, which is lame |
02:29 | <&McMartin> | s. would be more in keeping with the other formatters |
02:30 | <&McMartin> | ("d." is "print dword", for instance, and "u." is print unsigned) |
02:30 | <&ToxicFrog> | Aah |
02:30 | <&McMartin> | .r however is "right justify" and u.r is "unsigned right justify" |
02:30 | <&ToxicFrog> | I'll follow that convention, I think. ("." on its own is "print as signed int") |
02:30 | <&McMartin> | Yep |
02:31 | <&[R]> | That seems silly. Like creat() |
02:31 | | * McMartin is thinking about reimplementing Hammurabi in Forth as a Just For Drill kind of thing. |
02:38 | | AverageJoe [evil1@Nightstar-bbja7g.ph.cox.net] has joined #code |
02:43 | | AverageJoe [evil1@Nightstar-bbja7g.ph.cox.net] has quit [[NS] Quit: Leaving] |
02:45 | | * Vornicus gives [R] a montage |
02:52 | <~Vornicus> | that or an alternate reality where you don't have to spell correctly. Also /sanick [r] Watered_Down. |
02:53 | | sleepyminstrel is now known as celticminstrel |
02:54 | <&ToxicFrog> | `const` is working :D |
02:54 | <&[R]> | Watered Down? |
02:55 | <&ToxicFrog> | (after a brief infelicity in which I discovered that function arguments in C are not guaranteed to be evaluated LTR) |
02:56 | <~Vornicus> | https://www.youtube.com/watch?v=yNSs2GZOl1k |
03:00 | <&[R]> | Oh, a reference to the least funny flash animation from the 90s |
03:00 | <&[R]> | Righto then |
03:08 | <@Alek> | there was flash in the 90s? |
03:10 | | * ToxicFrog implements :foo as eqv to "foo" for the common case where foo has no spaces |
03:12 | <&ToxicFrog> | So what's left for the core...{ } defn for implementing wordlist functions; and some way of compiling to C when running on the host. |
03:16 | <&ToxicFrog> | Still not even sure what syntax I want for the latter. |
03:19 | <&[R]> | "Macromedia developed it further, releasing Shockwave Player in 1995." |
03:24 | <&ToxicFrog> | Maybe just a special word emit-c (defnfilename linkfilename --), pass it 0 0 to turn it back off. |
04:26 | <&ToxicFrog> | I have a probably awful idea concerning using the low bit of pointers to structures I know will always be 2-aligned to keep track of whether it's a pointer to RAM or flash |
04:26 | <&ToxicFrog> | But actually implementing this should probably wait for tomorrow |
05:34 | | Alek [Alek@Nightstar-7or629.il.comcast.net] has quit [Ping timeout: 121 seconds] |
05:35 | | celticminstrel [celticminst@Nightstar-jb792f.dsl.bell.ca] has quit [[NS] Quit: KABOOM! It seems that I have exploded. Please wait while I reinstall the universe.] |
05:37 | | Alek [Alek@Nightstar-7or629.il.comcast.net] has joined #code |
05:37 | | mode/#code [+o Alek] by ChanServ |
06:53 | | Turaiel is now known as Turaiel[Offline] |
07:23 | | Kindamoody[zZz] is now known as Kindamoody |
07:41 | | JustLurk [justbob@ServerAdministrator.Nightstar.Net] has joined #code |
07:41 | | JustBob [justbob@Nightstar.Customer.Dissatisfaction.Administrator] has quit [NickServ (RECOVER command used by JustLurk)] |
07:41 | | mode/#code [+o JustLurk] by ChanServ |
07:41 | | JustLurk is now known as JustBob |
07:49 | | Alek [Alek@Nightstar-7or629.il.comcast.net] has quit [Ping timeout: 121 seconds] |
07:53 | | Alek [Alek@Nightstar-7or629.il.comcast.net] has joined #code |
07:53 | | mode/#code [+o Alek] by ChanServ |
08:11 | | Kindamoody is now known as Kindamoody|afk |
08:24 | <@ErikMesoy> | I have no team and no branches and no remote repos and no merging and generally no use for most of the squillion features version control systems seem to advertise with. What VC would you suggest mostly for the use case of "Find how I previously solved this problem, deleted code upon circumventing, and found I needed to put it back?" |
08:24 | <@ErikMesoy> | (Previously I solved this with "Comment out large blocks of code rather than deleting", but that is apparently bad form.) |
08:35 | | Jessikat [Jessikat@Nightstar-mr4c2n.dab.02.net] has joined #code |
08:38 | | Jessikat` [Jessikat@Nightstar-j28mqv.dab.02.net] has quit [Ping timeout: 121 seconds] |
10:34 | <&Reiver> | I too, would appreciate this technology. |
10:38 | <&[R]> | git works pretty fine for single-person repos |
10:39 | <&[R]> | (disclaimer: full list of VCs I've used: git and svn; full list of VCs I've been able to use productively: git) |
11:09 | <@TheWatcher> | I'd second the use of git |
11:09 | <@ErikMesoy> | git seems to have this aura of menace about it. from slightly earlier right here: "well that worked WONDERFULLY and without a hitch, like everything in git" "very clever of you to say the opposite of what you mean, just like a git command" |
11:10 | <@ErikMesoy> | I will try it, but it seems odd. |
11:10 | <&McMartin> | The thing about remote repos is that the usual VCS model is "exactly one remote repo" |
11:10 | <@TheWatcher> | you don't need to use most of its features if you don't want them, and the single-user, simple case is pretty trivial to work with it |
11:10 | <&McMartin> | If you violate that, git is probably the way to go |
11:10 | <&McMartin> | This includes "zero remotes" |
11:12 | <&McMartin> | However! |
11:12 | <&McMartin> | To defend against fatfingering a command and annihilating my entire repot history I always maintain at least one remote, even if it's just a directory elsewhere on the same system. |
11:13 | <@ErikMesoy> | "Configuring the line ending conversions" yeah already during installation, git is asking about stuff that seems to be distinctly above my level |
11:14 | | * [R] doesn't remember answering any questions during git setup. |
11:14 | <@ErikMesoy> | 1) Checkout Windows-style, commit Unix-style 2) Checkout as-is, commit Unix-style, 3) Checkout as-is, commit as-is |
11:15 | <&[R]> | Though does remember having to use git configure for user.name and user.email, which are reasonable. |
11:15 | <&[R]> | 3 |
11:15 | <&[R]> | 3 is the "I don't give a shit" option. |
11:16 | <@ErikMesoy> | I think 3. It notes that 3 is recommended against for cross-platform projects, but I do not give a shit about that. |
11:18 | | * ErikMesoy gets git installed, fires it up, begins navigating |
11:20 | <&[R]> | To setup a repo, cd to base directory: "git init", "git add .", "git commit"; after that you'll just need "git add $files" and "git commit" until you need to do a rollback, which you can google. One of the commands will ask you to configure user.name and user.email, but the output will tell you the commands to invoke. |
11:25 | <@ErikMesoy> | What's the command to view an older version of a file, or if possible, page through multiple older versions of a file sequentially? |
11:29 | <&[R]> | I think you have to checkout the file |
11:30 | <&[R]> | Which will overwrite the local copy with the older version |
11:31 | <&[R]> | Normally I just use "git diff $file" instead, which'll let me look at the differences of a file |
11:31 | <@TheWatcher> | I'm assuming you've installed git on windows from https://git-scm.com/download/win so the easiest option for you is to use Git -> Git Gui, open the repository, then from the REpository menu select "Visualise master's history", then you can see all the history, and can look for your files in that. |
11:32 | <&[R]> | Who uses windows to code on though? |
11:32 | <@TheWatcher> | Erik does, apparenlty |
11:34 | <&[R]> | Hmm. Looks like I want to update PHP to get a new feature. I love how PHP introduces features that are severely handicapped. |
11:34 | <@ErikMesoy> | Yes. |
11:35 | <@ErikMesoy> | Why does git need my email to commit anyway |
11:35 | <&[R]> | In 5.3 they introduced the const keyword. In 5.6 they made it so you can have an expression as your const value. |
11:35 | <&ToxicFrog> | ErikMesoy: because every commit is associated with a name and email address |
11:35 | <&[R]> | Because it shows up in the commit history. |
11:36 | <&ToxicFrog> | It doesn't have to be a valid email but it wants something to put in that field. |
11:36 | <&[R]> | It doesn't email you at all, but it does store it on every commit you do. |
11:36 | <@ErikMesoy> | Right. So one of those things where it's being more powerful than I want or need. |
11:36 | <&ToxicFrog> | You could use hg instead :P |
11:37 | <@ErikMesoy> | I will consider that after poking git a bit more. |
11:37 | <&[R]> | There's also bazaar! |
11:37 | <&[R]> | Which is older than git. hg might be as well actually. |
11:38 | <&ToxicFrog> | I haven't used hg nearly as much but my understanding of it is that it's less powerful than git but more polished |
11:38 | <&ToxicFrog> | I have no idea what it's like on windows, though |
11:42 | <&ToxicFrog> | Also, re, paging through previous versions of a file: `git log --patch -- <file>` will show you each commit touching that file and the corresponding patch (i.e. a unified diff with ~3 lines of context) |
11:42 | <&ToxicFrog> | You can also use --unified=N instead of --patch for N lines of context |
11:43 | <&[R]> | Nifty |
11:43 | <&ToxicFrog> | `gitk` is a graphical tool that can show you either the diff or the plain file contents for each revision; I believe this is what "repository->visualize history" in the GUI launches |
11:45 | <&ToxicFrog> | (there are looooooots of options to `git log`; my most common uses of it are plain (shows commit messages only, no diff); --stat (shows changed files and count of changed lines but no actual diff contents); and --oneline --decorate --graph --all (shows ascii art of the commit graph, for when I'm ssh'd in and can't use gitk) |
11:46 | <&ToxicFrog> | (this is probably "more powerful than you want or need" again, though :P) |
11:50 | <@ErikMesoy> | Sounds that way. |
11:56 | <&[R]> | Good to have experience with any VCS though |
12:48 | | celticminstrel [celticminst@Nightstar-jb792f.dsl.bell.ca] has joined #code |
12:48 | | mode/#code [+o celticminstrel] by ChanServ |
13:01 | | Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds] |
14:13 | | Jessikat [Jessikat@Nightstar-mr4c2n.dab.02.net] has quit [Ping timeout: 121 seconds] |
16:01 | | Kindamoody|autojoin [Kindamoody@Nightstar-t472kr.mobileonline.telia.com] has joined #code |
16:01 | | mode/#code [+o Kindamoody|autojoin] by ChanServ |
16:02 | | Kindamoody|afk [Kindamoody@Nightstar-0lgkcs.tbcn.telia.com] has quit [Ping timeout: 121 seconds] |
16:05 | | Kindamoody|autojoin [Kindamoody@Nightstar-t472kr.mobileonline.telia.com] has quit [Connection closed] |
16:51 | <@celticminstrel> | Converting 0..255 color component to 0..65535... multiple by 255 or 256? |
16:54 | <@TheWatcher> | Naively, use 256: 255 *256 = 65280 |
16:54 | <@TheWatcher> | But you'll run into that problem, that max in an 8 bit won't be max in a 16 bit |
16:56 | <@celticminstrel> | Is that noticeable? |
16:57 | <@TheWatcher> | Another option you might want to try is (X * 65535)/255 |
16:57 | <@TheWatcher> | That'll give you a better mapping |
17:08 | <@ErikMesoy> | That's just multiplying by 257, I think? |
18:59 | <&[R]> | > 65535 / 255 |
18:59 | <&[R]> | 257 |
18:59 | <&[R]> | Yup |
19:25 | <&[R]> | Cannot write to 'packages/libwebkit/libwebkit-1.0.3.39096.tar.gz' (Success). |
20:16 | | Turaiel[Offline] is now known as Turaiel |
20:36 | | Vorntastic [Vorn@Nightstar-a2t6ba.ct.comcast.net] has joined #code |
21:19 | | Jessikat [Jessikat@Nightstar-aqb.jtr.132.82.IP] has joined #code |
21:44 | | Kindamoody|autojoin [Kindamoody@Nightstar-3rdi2h.mobileonline.telia.com] has joined #code |
21:44 | | mode/#code [+o Kindamoody|autojoin] by ChanServ |
22:07 | <&McMartin> | Man |
22:07 | <&McMartin> | http://pastebin.starforge.co.uk/109 |
22:07 | <&McMartin> | I've got a lot of things that I've actually done and could write about |
22:07 | <&McMartin> | Anyone see anything on this list that jumps out at them as things I should prioritize? |
22:08 | <&McMartin> | Not everything on UNIMPLEMENTED may be worth actually writing up and might just end up being practice for something better |
22:08 | <&McMartin> | (In particular, if UQM can be made to work, all the hacking on the old high-school project will just have been how I worked out what worked and what didn't) |
22:11 | <&ToxicFrog> | "Hacking the Virtues" and the IF reviews are good reads and deserve a more convenient home |
22:11 | <&ToxicFrog> | And look like something that could be done easily and with relatively little brain, next time you're in that state but still want to be productive. |
22:11 | <&ToxicFrog> | For stuff that involves actual work |
22:11 | | KiMo|autorejoin [Kindamoody@Nightstar-0lgkcs.tbcn.telia.com] has joined #code |
22:11 | | mode/#code [+o KiMo|autorejoin] by ChanServ |
22:12 | <&ToxicFrog> | IMFPLAY, C64 Directory Editor, Type-In Programs, and Player Complicity all stand out to me. |
22:12 | <&McMartin> | OK |
22:13 | | Kindamoody|autojoin [Kindamoody@Nightstar-3rdi2h.mobileonline.telia.com] has quit [Ping timeout: 121 seconds] |
22:13 | <&McMartin> | IMFPLAY is high priority anyway because not only is it implemented it's actually been sitting undocumented in the github repo for months |
22:13 | <&ToxicFrog> | (Player Complicity especially, I think, since you've pointed at that review of The Warbler's Nest a lot over the years) |
22:13 | <&McMartin> | The next article has to be "Getting RISC OS running at all on RPi3" because it's been half done for awhile |
22:13 | | * ToxicFrog nods |
22:17 | | KiMo|autorejoin is now known as Kindamoody |
23:58 | | mac [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has joined #code |
23:58 | | mode/#code [+o mac] by ChanServ |
--- Log closed Sun Jun 04 00:00:34 2017 |