Ad
  • Custom User Avatar
  • Custom User Avatar

    I was not careful enough to distinguish between and and andi, but it seems that the RISC-V assembler was generous enough to fix them for me :)

    I thought mv is pseudoinstruction that used widely...

  • Custom User Avatar

    RISC-V translation

    This is my first translate submission. Please review carefully. Thanks.

  • Custom User Avatar

    Suggestion :: Add "tetrafluoromethane" = {'C': 1, 'F': 4} as fixed test.
    This test makes sure that non-exist element should be removed from result.

  • Custom User Avatar

    During random test, I got following error ::

    eth-1-enyne: {'C': 2} should equal {'H': 0, 'C': 2}
    ethenyne: {'C': 2} should equal {'H': 0, 'C': 2}
    

    I'm not going to argue whether we can call "C2" as "ethenyne".
    However, it is very weird that removing non-existent element from result causes errors.

    If we should output "ethenyne" as {'H': 0, 'C': 2}, why not {'H': 0, 'C': 2, 'O': 0, 'N': 0, 'Cl': 0, 'F': 0, ......}?

  • Custom User Avatar

    "Sample test" of golang is broken.

    line 21 says ::

    	for i, dat := range example_tests {
    		It(fmt.Sprintf("Testing: %+v", dat), func() { Expect(HarvesterRescue(dat)).To(Equal(example_solutions[i])) })
    	}
    

    In this case, inner closure pickups variable i and dat that will be changed by for loop.
    In pactice, test suit will run after dat and i is bounded to last test case, and then, all Except function will called with same test case.

    To fix this, this should be modified as:

    	for i, dat := range example_tests {
    		i, dat := i, dat	// Create new variable; following closure will pickup right value.
    		It(fmt.Sprintf("Testing: %+v", dat), func() { Expect(HarvesterRescue(dat)).To(Equal(example_solutions[i])) })
    	}