2014-05-13 2:41 GMT+02:00 Nicolas Cellier < [email protected]>:
> > 2014-05-08 18:29 GMT+02:00 Sean P. DeNigris <[email protected]>: > > Sven Van Caekenberghe-2 wrote >> > The why is the result not 'Helloworld' ? or 'Hellworldo' ? Why does the >> $o >> > appear twice ? >> >> Good point. >> >> Please take a moment to: >> 1. go to Ulysses >> 2. follow the account creation link >> 3. create an account on fogbugz >> 4. log in >> 5. create an issue report with: >> a. the vm version >> b. the image version >> c. your platform >> d. your social security number >> e. mother's maiden name >> f. name of first pet >> g. and, a reproducible way to cause the error >> 6. (optional, but preferable) followed up by a slice with tests >> a. re-log-in to fogbugz >> b. go back to the issue page because the fogbugz login page probably >> didn't redirect you to the issue >> c. add whoever is assigned as another person to notify because they will >> paradoxically not be included by default >> 7. (if 6) add class comments to classes that you didn't modify - and >> possibly have never heard of - to make the monkey happy >> 8. Weigh in on whether Pharo is or is not "Smalltalk" AND/OR whether a >> tomato is a fruit or a vegetable >> 9. Cross fingers and wait (but not as long as in Squeak) >> 10. Try to remember what you were doing before you fell down the rabbit >> hole >> 11. Check email for VPRI's final STEPS report while waiting >> >> IN CASE OF EMERGENCY: insert beer between or during any other step OR >> remember that we (meaning the Smalltalk, Smalltalk-inspired, >> Smalltalk-channelled, Smalltalk-related, and/or Dynabook-related >> identified >> persons and possibly spouses and probably children under 17.5) still have >> it >> far better than the rest of the programming world >> >> ;-P (hopefully obviously) >> >> >> > Oh, but wait, I opened some bug reports once upon a time... > I just rediscovered http://bugs.squeak.org/view.php?id=5707 which links > to http://bugs.squeak.org/view.php?id=7194 > Not my fault if a forked happened ;) > > To continue around this very same example, every one knows that this > should fail: > 'hello' copyReplaceFrom: 3/2 to: 5/2 with: 'world'. > Indeed, only integers should be used as indices! > > It should fail equally whether the argument is wide or not as you can see: > 'hello' copyReplaceFrom: 3/2 to: 5/2 with: 'world' asWideString. > Well yes, maybe non integer indices could be used, but Character>>negative > is not understood > > It should fail equally whether the receiver is wide or not as you can see: > 'hello' asWideString copyReplaceFrom: 3/2 to: 5/2 with: 'world' > asWideString. > > A good lesson: tricky hacks like this always come with a price: > index isNumber > ifTrue: [^self at: index asInteger] > ifFalse: [self errorNonIntegerIndex] > > The sooner failure, the better failure ;) > > Ah, finally a better illustration of what you obtain when you mix the bugs: 'hello' asWideString copyReplaceFrom: 11/2 to: 1/2 with: 'world' >> ----- >> Cheers, >> Sean >> -- >> View this message in context: >> http://forum.world.st/WTF-and-Programming-Languages-tp4758263p4758348.html >> Sent from the Pharo Smalltalk Developers mailing list archive at >> Nabble.com. >> >> >
