[ prog / sol / mona ]

prog


How can I run my own instance of this

82 2020-02-24 15:16

>>79
Thank you for the new information. Based on it, I have reproduced the behavior using the irregex-search used by lib/markup.scm:string->sxml.

$ mit-scheme --load irregex.scm
MIT/GNU Scheme running under GNU/Linux
Type `^C' (control-C) followed by `H' to obtain information about interrupts.

Copyright (C) 2011 Massachusetts Institute of Technology
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Image saved on Tuesday February 6, 2018 at 6:31:25 PM
  Release 9.1.1     || Microcode 15.3 || Runtime 15.7 || SF 4.41
  LIAR/x86-64 4.118 || Edwin 3.116
;Loading "irregex7.scm"... done
;Loading "test.scm"... done

1 ]=> (irregex-match-substring (irregex-search ">>(([1-9][0-9]{0,2})|(([1-9][0-9]{0,2})-([1-9][0-9]{0,2})))(,(([1-9][0-9]{0,2})|(([1-9][0-9]{0,2})-([1-9][0-9]{0,2})))){0,11}" ">>64,1,2,3,55,56-62"))

;Value 13: ">>64,1,2,3,55,56"

1 ]=> (irregex-match-substring (irregex-match ">>(([1-9][0-9]{0,2})|(([1-9][0-9]{0,2})-([1-9][0-9]{0,2})))(,(([1-9][0-9]{0,2})|(([1-9][0-9]{0,2})-([1-9][0-9]{0,2})))){0,11}" ">>64,1,2,3,55,56-62"))

;Value 14: ">>64,1,2,3,55,56-62"

1 ]=> 

As you say, the bug is evidently in irregex. It is present both in the "0.9.6: 2016/12/05" version from SchemeBBS and in the latest "0.9.7: 2019/12/31" from
http://synthcode.com/scheme/irregex/
The high-level problem is that irregex-search violates "the POSIX leftmost, longest semantics" guaranteed by the documentation:

Matching follows the POSIX leftmost, longest semantics, when searching. That is, of all possible matches in the string, irregex-search will return the match at the first position (leftmost). If multiple matches are possible from that same first position, the longest match is returned.

I will investigate this further.

And I am still interested in the outstanding question from >>70. For future Anons who might face the same issue, what did you do with an MBR-partitioned hard disk and a BIOS that refuses to boot MBR?

301


VIP:

do not edit these