IRC channel logs

2020-02-29.log

back to list of logs

<OriansJ`>dddddd: The short circuit in M2-Planet will not be a small change but yes it is entirely valid for M2-Planet v2.x
<OriansJ`>dddddd: as for the redundent begins; I was thinking of the current behavior of mes-m2; which might change depending upon if I find a good reason to do so
<OriansJ`>fossy: I believe you deserve to be listed in the copyright header for kaem.c
<dddddd>Well, that kind of surprise me. Maybe I read too much in your answer about the library available for M1.scm, as in everything available in guile 2 is OK for M1.scm, but I see your point OriansJ`
<OriansJ`>dddddd: well remember I started M1.scm while I was writing mes-m2; So it is kind of hard to forget about mes-m2's restrictions while programming
<dddddd>So, is it unintended and we can remove those begin?
<OriansJ`>oh and a minor reorganization in M2-Planet's tests are being done to seperate the "real" programs from the minimal feature tests programs
<OriansJ`>dddddd: probably
<dddddd>nice
<xentrac>normally I think of x || y as being syntactic sugar for x ? 1 : y in C
<OriansJ`>also I solved continue fossy and the patch will up in a little bit
<OriansJ`>xentrac: another feature M2-Planet v1.x lacks
<fossy>thanks so much
<xentrac>I think the GPL has a specific requirement to mark files you modify with your name, while copyright doesn't
<xentrac>OriansJ`: heh, I guess that doesn't help much
<dddddd>I stand corrected fossy. Thanks xentrac. Too strong wording in that message from me, indeed.
<dddddd>But I think the base point stands, as in copyright allows you to license the code.
<OriansJ`>xentrac: but I can imagine how when we add proper C macro support, it would occur quite naturally
<xentrac>dddddd: I think that's sort of true but sort of backwards
<xentrac>if I say, "Come on over, we're having a party at 3202 Market Street, apartment 8", I'm granting you a license under US law to enter the apartment
<xentrac>but it might turn out that it's actually someone else's apartment, in which case I can't grant you that license
<OriansJ`>dddddd: this current patch for M2-Planet might look scary but it is just moving the folders around and fixing the getwd test
<xentrac>or, on the contrary, it might be that it's public property where anyone can go (although this is more likely with an example that isn't an apartment!) and no license is needed
<xentrac>but in that last case, you can still legally go to the party
<xentrac>so were property rights needed to grant you the license? only in a sort of negative sense
<dddddd>I guess I was thinking along this lines: "This requirement is known as copyleft. It earns its legal power from the use of copyright on software programs. Because a GPL work is copyrighted, a licensee has no right to redistribute it, not even in modified form (barring fair use), except under the terms of the license." (wikipedia)
<xentrac>right
<xentrac>in the same sense, perhaps a cancer patient has no ability to go on living, not even in a sick form, except if their chemotherapy is effective
<xentrac>so we could say that cancer allows you to give them chemotherapy
<xentrac>which is, strictly speaking, true, but it's a terribly odd way to think about chemotherapy
<OriansJ`>dddddd: I think xentrac is expressing the idea of copyright as a right of exclusion that the GPL judo throws to create the effective enforcement of the freedom it provides within the current rules of law
<dddddd>OriansJ`, thanks for the warning about the patch (:
<xentrac>indeed
<OriansJ`>The fix for continue; adds one additional label for do while statements; which results in additional entire(s) in the dwarf footer generated by blood-elf. Which is slightly annoying.
<xentrac>just as I would not respond to the news that they have cancer that will kill me quickly without chemotherapy by celebrating my opportunity to enjoy chemotherapy, I am not delighted when I find that something I want to use is copyrighted
<dddddd>Yeah, I know about the judo trick. That's what lead me to thinking there's no license without copyright (in current "main" laws).
<xentrac>additional entrie(s)?
<OriansJ`>Fortunately while and for statements already have a label for where a continue would need to jump
<xentrac>sure, there's no license without copyright, just as normally there's no chemotherapy without cancer. But there's also no need for a license, because the legal risks the license protects you from (of being sued by a copyright holder) do not exist
<OriansJ`>xentrac: if you have multiple do while statements, they all get unique :labels
<xentrac>makes sense
<dddddd>Agree, xentrac.
<xentrac>OriansJ`: is it important to minimize the size of the DWRF footer?
<xentrac>DWARF
<OriansJ`>xentrac: no; as they are only added after blood-elf is bootstrapped
<OriansJ`>I also have a rule inside of blood-elf to ignore all :_labels that start with _
<OriansJ`>So trimming it would be quite trivial
<xentrac>s/they have/I have/
<OriansJ`>The only labels that might be worth ignoring are those for if, for, while, do and else
<OriansJ`>But that would result in larger blocks of just instructions when one objdump -d's a generated M2-Planet file
<OriansJ`>as the dwarf section is not required for working M2-Planet binaries but something optionally enabled with --debug and the use of blood-elf
<OriansJ`>fossy, dddddd: patch for continue is now up
<fossy>:) danke
<OriansJ`>fossy: please verify it behaves the way you hope
<OriansJ`>dddddd: could you please double check the aarch64 behavior for me please (a simple make clean test will do)
<fossy>OriansJ`: I shall
<OriansJ`>fossy: thank you
<dddddd>Sure, I'll do in a moment (just a bit of setup)
<OriansJ`>dddddd: thank you
<dddddd>OriansJ`, perfect! All OK for "make clean test" on the metal (at 09783ac089de41f6c48af0cd79ba31dc302857c6).
<OriansJ`>dddddd: excellent!
<OriansJ`>xentrac: I am guessing tailcall.scm was designed to only work if the scheme is in Continuation-passing style form
<markjenkinsznc>OriansJ, Ive opened a PR https://github.com/oriansj/stage0/pull/28 for testing re-assembling ALL-ROMS with M0 (vm32), prototype_M0-compact, M0-compact (vm16, vm, vm64)
<markjenkinsznc>was previously in shell scripts and I said I'd get it all in makefile
<markjenkinsznc>Was a lesson in why not to put this much shell at a time in a makefile
<markjenkinsznc>night
<fossy>OriansJ`: it does behave the correct way :) the bug is fixed
<fossy>please, re-review, OriansJ`, dddddd
<xentrac>OriansJ`: sort of. test.tailcall.scm from Ur-Scheme was the test to verify that Ur-Scheme did tail-call elimination properly. It doesn't require that Ur-Scheme be implemented using CPS, and in fact Ur-Scheme is not implemented using CPS in any way
<xentrac>well, I guess maybe its implementation of begin might be a CPS implementation of begin
<xentrac>oh, no, it has a special case for compiling begin, which is amusingly defined in terms of begin
<xentrac>anyway I didn't use CPS in Ur-Scheme because I thought that would probably make my life a lot more difficult, and I think there's a credible case that it would have, given that it produced code that was way faster than any other Scheme compiler I compared it with except of course Stalin
<xentrac>although, to be fair, adding call/cc would have required a serious overhaul
<OriansJ`>markjenkinsznc: I'll begin reviewing shortly
<OriansJ`>fossy: I'll be reviewing your patch shortly after
<OriansJ`>xentrac: thank you for that detail as adding call/cc probably is something that might end up required later down the road.
<OriansJ`>markjenkinsznc: it is merged
<OriansJ`>fossy: would you please add proper copyright headers to your tests and the standard in mescc-tools isn't to commit the answers but have a test.answers file which a sha256sum -c can use to verify all of the answers are correct
<OriansJ`>also use the version of the functions that are internal to mescc-tools; if you wish to import a function from M2-Planet into mescc-tools, simply copy it over and commit (as we don't want to demand people have M2-Planet to build and use mescc-tools [a la debian or arch])
<dddddd>OriansJ`, what's the convention for the "This file is part of" and similar lines in the headers? I see some changes in fossy's branch (stage0 -> M2-Planet)
<OriansJ`>dddddd: I have been standardizing that the "This file is part of" should match the name of the project it is in
<OriansJ`>So if the file is in mescc-tools, it should say mescc-tools
<OriansJ`>the only exception is mescc-tools-seed
<dddddd>fossy, there's another instance of the optimization v. short-circuit. Also, still there the error message for "cd" talking about "set".
<OriansJ`>which should say stage0
<OriansJ`>In those cases where fossy is talking about the short circuit, two require statements would probably look nicer
<dddddd>fossy, check the headers wrt the name of the project, as OriansJ` said.
<dddddd>(5 files it seems)
<dddddd>You can see it easily in a diff from f94fd62663f4 to the tip of your branch. I use gitk for this (and for a lot more things, I learned a lot of git using it). In this case... select one commit, right-click on the other and ask for a diff in the right "direction")
<dddddd>I use this little script all the time, for my main [non-shell] git interactions:
<dddddd>gitk --all &
<dddddd>git gui &
<OriansJ`>dddddd: you might enjoy emac's magit mode
<dddddd>I also use it a bit, but I don't have reflexes for it yet.
<OriansJ`>dddddd: fair, it is pretty big when one looks closely
<dddddd>tig is also nice
<markjenkinsznc>I have a work in progress on a knight dissembler https://github.com/markjenkins/stage0/tree/disasm_py-wip
<markjenkinsznc>Will drop the -wip suffix and rebase to a squashed history once I reach a minimal viable product which produces valid .s files compatible with M0 and stage1_assembler-2 and back to the same binary and is also dissaembles successfully which bytes instructions are found on
<markjenkinsznc>after that I'll keep adding features that don't break the build until I've had enough and then will then PR
<markjenkinsznc>open to feature suggestions which I'll keep in mind as a I develop minimal viable product and my features
<markjenkinsznc>my feature ideas: 1) work with both binaries and .hex0/1/2 files, in the later case options to preserve labels and memory references
<markjenkinsznc>2) inferences based on instruction immediates and choice of instructions as to which memory addresses should have labels like :jump_hexblah :func_call_hexblah :data_label_hexblah
<markjenkinsznc>3) option to use such inferences to replace immediates in hex with $ and @, or just put such inferences in comments
<markjenkinsznc>4) option to have addresses in comments
<markjenkinsznc>5) detection of data that is likely string due to typical character set plus trailing null, put string in comment
<markjenkinsznc>6) user can specify address ranges that are definitely not containing instructions to avoid attempts to decode, ensure runs of 00000000 aren't called NOP and FFFFFFFF not called HALT, possibly also some inferences when such runs are clearly no longer code, especially if not jumped to
<markjenkinsznc>that's about all I can think of for bonus features for disasm.py beyond the minimal viable version
<markjenkinsznc>OriansJ, as for https://github.com/markjenkins/stage0/tree/M0-compact-hex2-redo3 I'm going to do a squash rebase to reduce my work there down to 1 commit and PR. GitHub reports this branch still cleanly merges despite the testing work added to makefile. ;)
<markjenkinsznc>I'm also going to make available some text dump URLS with the auto generated shell script I had which invokes sed to do crude dissassembly of M0-macro-compact.hex2 instructions (and not operands) back to assembly and I'll also post the resulting file, on top of a hard core by hand audit this provides a second audit path which can be supplemental to doing things the hard way (e.g. may help catch something missed while doing it the hard way)
<markjenkinsznc>I'm going to abandon M0-compact-operand-align-wip branch if there's no interest in the operand whitespace formatting I started there
<markjenkinsznc>it doesn't really scratch any of my own itches
<markjenkinsznc>If I were hand auditing M0-macro-compact.hex2, I would print it, and I would audit and confirm this auto generated list of 51 instructions (in hex and assembler) that are in use https://gist.github.com/markjenkins/202d7e0c5328ccfd567f16b2d405e9bf
<markjenkinsznc>then I would go through that list of instructions one by one as per that list and cross out with a red pen the instruction hex on any line on M0-macro-compact.hex2 where the comments say that instruction is used if hex matches
<markjenkinsznc>at the end of that, every line with an instruction should have been matched
<markjenkinsznc>then second pass checks operands
<markjenkinsznc>M0-macro-compact.hex2 audit gist updated to show whole process, https://gist.github.com/markjenkins/202d7e0c5328ccfd567f16b2d405e9bf , very similar to how I would audit on paper if I didn't trust my kernel, shell, sed and text file viewers like more
<markjenkinsznc>files in the gist are out of order, process documented in a comment
<fossy>OriansJ`: addressed