Timeline for Increment an Array
Current License: CC BY-SA 3.0
14 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Nov 30, 2016 at 12:24 | comment | added | A Simmons | @MartinEnder That's awesome. Thanks! | |
Nov 29, 2016 at 18:30 | comment | added | Martin Ender |
@ASimmons My fresh Mathematica installation on Windows, which has $CharacterEncoding set to WindowsANSI which is CP1252 (which is sufficiently compatible with ISO 8859-1 for ± and · to be usable for a single byte).
|
|
Nov 29, 2016 at 16:08 | comment | added | A Simmons | @MartinEnder what's the reference for the mentioned single-byte code page? | |
Nov 29, 2016 at 8:07 | history | edited | Greg Martin | CC BY-SA 3.0 |
added 122 characters in body
|
Nov 29, 2016 at 7:56 | history | edited | Greg Martin | CC BY-SA 3.0 |
added 1 character in body
|
Nov 29, 2016 at 6:13 | comment | added | JungHwan Min |
@MartinEnder Welp, I don't think Mathematica has a default encoding at all, so it should be assumed to use UTF-8. For instance, my default encoding is CP-949 (because I'm using Korean Windows), so ± is two bytes, but on English Windows (using CP-1252), it is one byte.
|
|
Nov 29, 2016 at 6:09 | comment | added | Martin Ender | @JHM this answer could be more explicit about it, but the meta post says that the language's default takes precedence over UTF-8 and the default encoding of Mathematica on Windows is the Windows code page, not UTF-8. | |
Nov 29, 2016 at 6:03 | comment | added | JungHwan Min |
@MartinEnder It seems that answers are assumed to use UTF-8 unless specified elsewhere, so I believe ± should count as two bytes.
|
|
Nov 29, 2016 at 5:49 | comment | added | Martin Ender |
@JHM UTF-8 is not the default character encoding on Windows. Mathematica can read source files in a single-byte code page that includes ± .
|
|
Nov 29, 2016 at 4:12 | comment | added | JungHwan Min |
@GregMartin ± in UTF-8 (Mathematica uses UTF-8 by default; try $CharacterEncoding ) is a two-byte character (U+00B1).
|
|
Nov 29, 2016 at 3:31 | comment | added | Greg Martin | Nah, Martin Ender gets most of my credit anyway. Why is ± two bytes? | |
Nov 29, 2016 at 1:08 | comment | added | JungHwan Min |
Because ± is a 2-byte character, your code is 59 bytes long. Also, there must be a space between x_ and .. because Mathematica interprets x_.. as x_. . (which throws errors). Plus, the infix form of Min (x~Min~z ) would make this 2 bytes shorter (which makes this solution identical to one of mine :p ...) Welp you can take the credit because my edit was later than yours....
|
|
Nov 29, 2016 at 0:49 | history | edited | Greg Martin | CC BY-SA 3.0 |
added 612 characters in body
|
Nov 28, 2016 at 20:00 | history | answered | Greg Martin | CC BY-SA 3.0 |