00:30:40 -!- tromp has joined. 00:35:05 -!- tromp has quit (Ping timeout: 240 seconds). 00:41:26 -!- oerjan has joined. 01:01:24 -!- rain1 has quit (Quit: WeeChat 3.0). 01:06:01 -!- tromp has joined. 01:10:45 -!- tromp has quit (Ping timeout: 264 seconds). 01:17:08 I... think it's usually supposed to be Sceolang? <-- argh. 01:17:32 feel free to include something suitably celtic in the entry 01:17:51 -!- hendursaga has joined. 01:19:19 My knowledge of Celtic anything is limited to the existence of a dog named Sceolang and that Enya has music related to Celtic culture. 01:20:49 i didn't know about the dog but i've been aware of a dog of dogs 01:21:41 wait 01:21:47 i'm confused 01:43:00 -!- tromp has joined. 01:47:05 -!- tromp has quit (Ping timeout: 240 seconds). 01:56:07 05:00:38 how I think that if I take some existing library ... 01:56:43 -!- tromp has joined. 01:57:03 the only thing I've found is https://www.cis.uni-muenchen.de/~schmid/tools/TreeTagger/ 01:57:55 and compared to mystem (that is Russian only) it gives to little information that my plan didn't work well 01:58:06 *so little 01:59:07 the automated tagging appeared to be only 45% accurate 02:00:51 -!- tromp has quit (Ping timeout: 246 seconds). 02:17:54 -!- tromp has joined. 02:18:37 -!- tromp has quit (Remote host closed the connection). 02:20:25 -!- zzo38 has quit (Ping timeout: 240 seconds). 02:52:41 -!- tromp has joined. 02:57:27 -!- tromp has quit (Ping timeout: 256 seconds). 03:09:34 -!- oerjan has quit (Quit: leaving). 03:13:02 -!- ubq323 has quit (Quit: WeeChat 2.3). 03:28:46 [[User:Erinius/Ideas]] https://esolangs.org/w/index.php?diff=80592&oldid=80525 * Erinius * (+110) 03:35:31 [[IDK]] M https://esolangs.org/w/index.php?diff=80593&oldid=80584 * GrapeApple * (-35) 03:45:19 [[IDK]] M https://esolangs.org/w/index.php?diff=80594&oldid=80593 * GrapeApple * (+97) 04:00:08 -!- zzo38 has joined. 04:04:15 -!- deltaepsilon23 has joined. 04:04:26 -!- delta23 has quit (Ping timeout: 265 seconds). 04:04:37 -!- deltaepsilon23 has quit (Remote host closed the connection). 04:05:21 -!- delta23 has joined. 04:34:46 [[IDK]] M https://esolangs.org/w/index.php?diff=80595&oldid=80594 * GrapeApple * (+1137) 04:36:25 [[IDK]] M https://esolangs.org/w/index.php?diff=80596&oldid=80595 * GrapeApple * (-15) /* Language */ 04:36:48 -!- tromp has joined. 04:38:06 -!- tromp has quit (Remote host closed the connection). 04:41:23 ais523: if it's C11 mode then try #pragma STDC FP_CONTRACT OFF 04:48:03 " really the problem is that C doesn't have any way to say "excess precision is OK in this small subset of an expression" => it does: enable -fexcess-precision=standard or -std=c11 for standard behavior, then use an assignment or cast to force a value without excess precision. that's documented. 04:49:58 -!- tromp has joined. 04:50:42 "for example, how do you take the average of two size_t values in C (rounding towards 0)?" => Hacker's Delight suggests (x & y) + ((x ^ y) >> 1) 04:54:27 -!- tromp has quit (Ping timeout: 246 seconds). 04:55:06 but you're probably right that the hand-written assembly might work better here 05:08:21 -!- delta23 has quit (Read error: Connection reset by peer). 05:08:40 -!- delta23 has joined. 05:33:44 -!- Lord_of_Life has quit (Read error: Connection reset by peer). 05:33:45 -!- sprock has quit (Ping timeout: 240 seconds). 05:35:56 -!- Lord_of_Life has joined. 05:46:24 -!- sprock has joined. 06:17:04 [[IDK]] M https://esolangs.org/w/index.php?diff=80597&oldid=80596 * GrapeApple * (-32) /* Language */ 06:19:05 -!- delta23 has quit (Quit: zzzzzzzzzzzzzz). 07:25:01 -!- sprock has quit (Ping timeout: 265 seconds). 07:27:10 -!- tromp has joined. 08:33:33 -!- craigo has quit (Ping timeout: 264 seconds). 09:10:05 -!- hendursa1 has joined. 09:10:59 -!- hendursaga has quit (Ping timeout: 268 seconds). 09:12:57 -!- LKoen has joined. 09:54:05 [[Brainfuck code generation]] https://esolangs.org/w/index.php?diff=80598&oldid=79780 * Maxi * (+453) /* Other */ 09:54:22 [[Brainfuck code generation]] https://esolangs.org/w/index.php?diff=80599&oldid=80598 * Maxi * (-586) /* Languages that compile to brainfuck */ 09:54:40 [[Brainfuck code generation]] https://esolangs.org/w/index.php?diff=80600&oldid=80599 * Maxi * (+586) /* Other */ 10:12:45 -!- imode has quit (Ping timeout: 240 seconds). 10:25:54 -!- rain1 has joined. 10:28:05 -!- spruit11 has quit (Read error: No route to host). 10:29:58 -!- Lord_of_Life_ has joined. 10:31:23 -!- spruit11 has joined. 10:32:57 -!- Lord_of_Life has quit (Ping timeout: 264 seconds). 10:33:01 -!- Lord_of_Life_ has changed nick to Lord_of_Life. 10:49:21 with this p-o-s tagger results are even worse: http://www.cs.cmu.edu/~ark/TweetNLP/ 10:50:09 maybe because they use only one char long tags 10:59:12 -!- Sgeo has quit (Read error: Connection reset by peer). 11:08:51 -!- pablo has joined. 11:15:10 -!- pablo has quit (Quit: Leaving). 11:32:38 -!- Hooloovo0 has quit (Ping timeout: 260 seconds). 11:41:36 -!- Hooloovo0 has joined. 11:46:12 -!- Hooloovo0 has quit (Ping timeout: 256 seconds). 12:18:42 -!- Hooloovo0 has joined. 12:31:08 -!- FreeFull has joined. 12:42:23 [[Flame]] N https://esolangs.org/w/index.php?oldid=80601 * CatLooks * (+76) Created page with "'''Flame''' is a programming language created by [[User:CatLooks|CatLooks]]." 13:15:37 -!- tromp has quit (Remote host closed the connection). 13:15:39 results of these one https://code.google.com/archive/p/hunpos/ are close to tree-tagger; this one https://textblob.readthedocs.io/en/dev/index.html worked for me as bad as ARK 13:32:02 [[Horribly Translated BASIC]] N https://esolangs.org/w/index.php?oldid=80602 * Gilbert189 * (+4679) Created page with ":''Note that I have horribly translated this page just for the heck of it. The original text should be available.'' :''Remember, this is just an example. Dictionary, syntax, e..." 13:34:03 [[Talk:Horribly Translated BASIC]] N https://esolangs.org/w/index.php?oldid=80603 * Gilbert189 * (+4830) Created page with "==Original text== :''Note that this is only an example. The keywords, syntax, and any other should not be exactly like this.'' Horribly Translated BASIC is BASIC but horribly..." 13:36:21 [[Horribly Translated BASIC]] https://esolangs.org/w/index.php?diff=80604&oldid=80602 * Gilbert189 * (+33) 13:36:23 -!- tromp has joined. 13:39:27 [[Horribly Translated BASIC]] https://esolangs.org/w/index.php?diff=80605&oldid=80604 * Gilbert189 * (+77) 13:40:22 [[Horribly Translated BASIC]] https://esolangs.org/w/index.php?diff=80606&oldid=80605 * Gilbert189 * (+27) 13:42:23 [[SQ]] M https://esolangs.org/w/index.php?diff=80607&oldid=80276 * PythonshellDebugwindow * (+74) /* Opcodes */ Categories 14:26:21 -!- Arcorann_ has quit (Ping timeout: 264 seconds). 14:34:13 [[User:Gilbert189]] https://esolangs.org/w/index.php?diff=80608&oldid=80514 * Gilbert189 * (+32) 15:12:34 -!- arseniiv_ has joined. 15:48:13 -!- arseniiv has joined. 15:50:00 -!- arseniiv_ has quit (Ping timeout: 246 seconds). 16:46:18 -!- xelxebar has quit (Remote host closed the connection). 16:46:37 -!- xelxebar has joined. 16:59:22 -!- craigo has joined. 16:59:38 -!- ais523 has joined. 17:04:51 [[BSS]] https://esolangs.org/w/index.php?diff=80609&oldid=80395 * CatLooks * (+2335) 17:22:16 [[User:Hakerh400/JavaScript Quiz]] https://esolangs.org/w/index.php?diff=80610&oldid=80146 * Hakerh400 * (+221) 17:24:23 [[User:Hakerh400/JavaScript Quiz]] https://esolangs.org/w/index.php?diff=80611&oldid=80610 * Hakerh400 * (-36) 17:26:09 [[User:Hakerh400/JavaScript Quiz]] https://esolangs.org/w/index.php?diff=80612&oldid=80611 * Hakerh400 * (-1) 17:30:23 apparently I can't type "quest". my fingers finish it as "question". 17:35:06 typing of questionable quality 17:35:32 yeah 17:53:50 A quest for an ion. 18:11:30 -!- tromp has quit (Remote host closed the connection). 18:14:02 What are some interesting Las Vegas algorithms that aren't SAT or that kind of search problem? 18:14:29 There are a lot of randomized algorithms, like randomized quicksort or something, but those finish quickly with such high probability that they barely count. 18:31:36 -!- tromp has joined. 18:32:33 -!- NotApplicable has joined. 18:36:15 -!- tromp has quit (Ping timeout: 246 seconds). 18:43:11 Is "hammersmith" the kind of smith that makes hammers, or the kind of smith that uses hammers to make other things (possibly also including hammers)? 18:43:29 yes 18:44:09 It seems to be a maker of hammers, if wiktionary is to be believed. 18:48:15 -!- LKoen has quit (Remote host closed the connection). 18:49:33 two more islands, one more friend... 18:58:16 -!- FreeFull has quit. 19:14:25 -!- Lord_of_Life has quit (Ping timeout: 240 seconds). 19:18:40 -!- tromp has joined. 19:22:48 -!- tromp has quit (Ping timeout: 246 seconds). 19:22:57 -!- Lord_of_Life has joined. 19:49:41 -!- NotApplicable has quit (Quit: Connection closed). 19:51:45 -!- tromp has joined. 20:01:38 ais523: if it's C11 mode then try #pragma STDC FP_CONTRACT OFF ← I did, it didn't help 20:01:38 hammersmith sounds like WW2 time German aircraft 20:02:07 actually I think I forgot to use -std=c99 / -std=c11 in addition to the pragma, although that's unlikely to matter 20:02:22 I tried -fexcess-precision=standard as well, that didn't help either 20:03:55 your (x & y) + ((x ^ y) >> 1) suggestion is clever, slightly fewer operations than (x / 2) + (y / 2) + (x & y & 1), although neither is obviously equivalent to ((int65_t)x + (int65_t)y) / 2 20:04:10 and at least to me, it's a lot less obvious what it's doing 20:04:38 (it works by doing the two half-additions that make up a full-addition separately) 20:07:53 it looks clearly better than clang -O3's compilation of the __builtin_uaddll_overflow version 20:08:19 [[NyaScript]] https://esolangs.org/w/index.php?diff=80613&oldid=80459 * ThatCookie * (+938) Added NyaScript++ 20:08:25 not clear on whether it's better than gcc's branchy version, it probably depends on how predictable the branch is 20:08:59 [[NyaScript]] M https://esolangs.org/w/index.php?diff=80614&oldid=80613 * ThatCookie * (+1) 20:09:20 really, I think in terms of compiler branch hints, a hint that a branch is predictable/unpredictable would be more useful than a hint that a branch is likely/unlikely… 20:12:17 predictable branches are very cheap, but unpredictable branches are very costly 20:12:47 (assuming that all the code being run is in L1 cache already, which it normally will be for anything performance-sensitive) 20:14:38 what would the CPU do with such a hint? 20:15:17 not the CPU, the compiler 20:15:32 there's often a complex way to avoid generating a branch instruction, by computing all possible branches in parallel 20:15:45 this is normally slower if the branch instruction would be fast, but faster if the branch instruction would be slo 20:15:47 * slow 20:16:10 -!- tromp has quit (Remote host closed the connection). 20:20:43 e.g. modern compilers targeting x86-64 will compile (x >= 0 ? x : -x) (with x an int) to the equivalent of ({long _Temp = (long)x >> 32; (x ^ _Temp) - _Temp}) 20:22:28 isn't there an abs asm command? 20:22:42 not as far as I know 20:22:50 huh 20:23:06 there isn't even a floating-point negate, most compilers use an xor to flip the sign bit 20:24:14 (I have a suspicion that subtraction from zero may be more efficient, though, although the answer isn't quite the same due how floating point works) 20:24:25 `fabs`, on the other hand, was a thing back when floats were done by x87. 20:24:27 fabs`,? No such file or directory 20:24:41 HackEso: I wasn't talking to you. 20:24:41 ah yes, I'm only checking the sse/avx FPU 20:24:58 x87 has its own set of commands that are different 20:26:46 Looks like x87 negate was the rather unexpectedly named "FCHS", for "change sign". 20:27:40 [[English]] M https://esolangs.org/w/index.php?diff=80615&oldid=77788 * ThisIsTheFoxe * (+16) added link (awesome lang btw) 20:28:37 -!- hakatashi1 has quit (Remote host closed the connection). 20:28:53 -!- hakatashi has joined. 20:29:37 huh, the treatement of negative zero seems to be consistent across languages, so maybe subtraction from 0 isn't a *valid* way to negate a floating point number 20:29:59 in particular, 0-0 is positive zero 20:30:12 -0-0 is negative zero, and -0+0 is positive zero 20:32:36 -!- imode has joined. 20:33:30 oh, I didn't try 0+-0, that's also positive zero 20:36:51 in ruby it depends on if the zero is integer or float 20:37:21 twos-complement integers don't have a separate +0 and -0 so you will always just get (the only available) zero 20:37:48 https://dpaste.org/P1w4/slim 20:37:56 but floats are represented as sign-magnitude on almost all commonly used processors, so +0 and -0 have separate representations 20:40:17 seems like in RASEL they are always positive 20:41:37 I've been keeping track of the C23 process every now and then, and the current draft drops support for non-two's-complement integers. And no longer allows a trap representation for two's-complement either, unless there's padding bits. So a signed char will finally have exactly as many unique values as unsigned char. 20:43:55 wait, didn't they both had 256? _OO 20:44:05 *have 20:47:21 Up until now, unsigned char has had two to the power of CHAR_BIT unique values (where CHAR_BIT is 8 or greater), but signed char may have had one less. For ones' complement and sign-and-magnitude, because of the redundant "negative" zero. And for all three allowed representations, even without padding bits, there's one special bit pattern that's allowed to be a trap representation. (Come to think of it, 20:47:27 maybe that was ruled out for character types, though.) 20:52:29 -!- tromp has joined. 20:59:32 -!- hendursa1 has quit (Ping timeout: 268 seconds). 20:59:45 -!- tromp has quit (Ping timeout: 246 seconds). 20:59:57 "0 with sign bit flipped" makes for a decent trap representation in practice, but most systems don't want one 21:02:07 -!- NotApplicable has joined. 21:02:12 I'm sorry I still don't get it, unsigned were 0..255, signed were -128..+127 -- isn't it the same number 256 of uniq values? 21:03:14 -!- hendursa1 has joined. 21:03:22 It would if those were the guaranteed ranges, but signed is allowed to be just -127 .. 127. 21:03:36 woah 21:08:41 fizzie: (I just joined so I don't have much context) From my experience its -128 ... +127. Perhaps there's a +0 and a -0? 21:10:08 That's more or less what we were talking about, yes. 21:10:26 C11 6.2.6.2p2: "If the sign bit is one, the value shall be modified in one of the following ways: [explains sign and magnitude, two's complement, ones' complemet]. Which of these applies is implementation-defined, as is whether the value with sign bit 1 and all value bits zero (for the first two), or with sign bit and all value bits 1 (for ones' complement), is a trap representation or a normal value. In 21:10:32 the case of sign and magnitude and ones' complement, if this representation is a normal value it is called a /negative zero/." 21:11:03 With the larger context being that current C23 draft no longer allows that. 21:11:23 Ah, thanks 21:13:38 so what I was taught in uni back in 2004 wasn't really implemented until C23? lol 21:15:05 -!- Sgeo has joined. 21:15:16 -!- rain1 has quit (Ping timeout: 240 seconds). 21:15:36 I don't think there were necessarily too many more people using non-two's-complement integers back in 2004 either, but the standard doesn't follow practice that fast. 21:17:07 -!- tromp has joined. 21:21:16 -!- tromp has quit (Ping timeout: 240 seconds). 21:21:20 god bless hipster languages and bignums 21:23:29 if I knew this before I would not be able to sleep 21:30:25 -!- ubq323 has joined. 21:39:53 -!- tromp has joined. 21:40:57 fizzie: every time I see this I wonder whether there really are architectures like this anymore 21:42:07 maybe if you implement signed ints as floats 21:43:10 but I'm not sure whether that's really allowed... are int and unsigned int required to have the same size? 21:43:40 Yes. 21:44:04 that's awkward then 21:44:28 for this particular (bad) idea 21:44:42 They're even required to have the value bits of the signed type be exactly the same bits of the object representation as the matching value bits of the corresponding unsigned type. 21:45:23 AFAICT, you could have the sign bit of the signed type not be the same bit as the last remaining value bit of the unsigned type, though. 21:45:32 (You'll need at least one padding bit for that.) 21:45:35 fwiw, the all-ones representation doesn't make for a good trap representation in one's complement 21:45:50 most calculations will naturally produce it when producing a result of zero 21:46:02 so it makes more sense for all-zeros to be the trap representation, and all-ones the representation of 0 21:46:45 one's-complement is almost as easy to implement in hardware as two's-complement, incidentally (the only difference is what you do with the carry from the top element) 21:46:46 Right, but it also makes sense (and is required) for all-zeros be a valid representation of 0 for the purposes of zeroed memory and such. 21:47:00 but I think two's-complement is preferred because it chains better to numbers that are more than one word wide 21:47:13 (Well, maybe if all your integer types were ones' complement, you'd 1-fill your memory instead, who knows.) 21:47:16 fizzie: C doesn't require zero-initialised structures to have zeroed memory, does it? 21:47:26 oh right, using 0x80...00 as a trap value in 2s complement would make sense 21:47:58 ais523: No, but it does require zeroed memory to be a valid representation of 0 for integer types. 21:48:10 one advantage of 0x80…00 as a trap value is that you can't get an integer overflow on division any more 21:48:35 it's quite easy to forget that INT_MIN/-1 will overflow the integer range 21:48:36 > abs (minBound :: Int) 21:48:38 It also makes `-x` defined for all valid values of x. 21:48:38 -9223372036854775808 21:48:49 there's also this (related) 21:49:03 fizzie: aww (wrt zeroed memory) 21:49:21 > abs (minBound :: Int8) -- human readable 21:49:23 -128 21:49:40 I've grown to really hate C, because it attempts to give generic access to a range of processor features, yet it isn't generic enough and is holding back processors from doing things that C can't express or disallows 21:50:00 * int-e somehow doesn't know 2^63 or 2^64 by heart :) 21:50:13 I know 4294967296 off by heart (2**32) 21:50:20 but not 2**31 or 2**63 or 2**64 21:50:34 (C11 6.2.6.2p4: "For any integer type, the object representation where all the bits are zero shall be a representation of the value zero in that type." It doesn't have to be the "canonical" representation of zero -- that could have some set padding bits, or maybe be the negative one -- but it has to be a non-trap zero.) 21:50:34 Int, Int8... -- there was probably the reason to introduce such type as "byte" 21:50:39 2147...something 21:50:50 > 2^31 21:50:52 2147483648 21:51:03 it's not that hard to divide 2**32 by 2 in your head 21:51:12 I'm sure I knew it all at some point :) 21:51:25 you aren't required to remember the 10-base number 21:51:28 I don't know 2**63 or 2**64 by heart, but I immediately assume anything that starts with 9 or 18 and is about the right length is going to be exactly that. 21:51:45 ais523 1**32 21:51:53 nakilon: of course not... but it wouldn't hurt 21:51:59 1**32 is just 1, isn't it? 21:52:03 or did you mean 1<<32? 21:52:05 tshhhhh 21:52:22 I forgot to add /s to the end 21:52:37 In fact, I don't remember any of the ones past 16777216, and even that probably just because of the 777. 21:53:03 216 is 6^3 21:53:14 don't tell me now I'll remember this number too 21:53:43 59049 is 3**10 21:53:52 that one comes up in Malbolge and TriINTERCAL 21:54:02 86400 seconds in a day, 1440 minutes 21:54:04 sort of the 65536 equivalent 21:54:27 45054 = 0xAFFE, no reason ;) 21:54:33 (I think esolangers have collectively decided that a word on a trinary virtual machine is a multiple of 10 trits long) 21:54:51 1114111 == 0x10ffff, the maximum codepoint in Unicode 21:55:19 yeah, 86400 is in my "one post in a day"-filtered RSS feed URL 21:55:35 nakilon: well you probably know a lot of random and mostly useless numbers like these 21:55:36 This is unrelated, but does anybody know why sometimes `(float 1) = (float 1) - (float 2)` results in the actual answer plus/minus 0.00000001 or 0.11111111 or something along those lines, regardless of the value in either of the variables beforehand? 21:55:57 [[Photon (Quintopia)]] https://esolangs.org/w/index.php?diff=80616&oldid=80588 * Quintopia * (+592) /* Computational Class */ 21:56:09 86400 though is useful, and a lot of people don't know it... 21:56:09 when I was a reserve for the UK olympic maths team, I asked my co-competitors what the largest prime was that they could spell out as digits from memory 21:56:13 the most common answer was 65537 21:56:15 int-e my brother was learning Pi 21:56:23 and I don't think I have a higher prime memorised either 21:56:28 3.141592...enough :) 21:56:29 I guess he has learned 100 digits 21:56:44 some of them could get very deep into pi, though 21:57:00 (yes, I didn't even memorize the full calculator value... 10 digits) 21:57:11 NotApplicable: I've been looking into floating-point maths a lot, recently 21:57:30 -!- xelxebar has quit (Ping timeout: 268 seconds). 21:57:38 the way to think about it is that a floating-point number is stored internally as an integer times 2 to the power of an integer (either of the integers can be negative) 21:57:53 00:56:28 3.141592...enough :) 21:58:06 you floored it though instead of rounding 21:58:07 so for example, 2.25 would be stored as 9*(2**-2) 21:58:16 the next digit is 6 21:58:18 > (2^2^5 + 1) `mod` 641 21:58:21 0 21:58:46 (I somehow remember that 641) 21:58:54 however, both these integers have a limited range (the range on the exponent rarely ends up mattering, but the range on the multiplier is very often relevant) 21:58:58 -!- xelxebar has joined. 21:59:00 3.141592654 (rounded) is I think what my calculator used to have, so I learned that, and 3.141592653589... (floored) as an extension to that. 21:59:02 maybe there can be a computer based not on binary, not on ternary but on prime numbers 21:59:22 so if you end up with an integer overflow on the multiplier, the processor compensates by halving, quartering, etc. the multiplier and adjusting the exponent to match 21:59:35 nakilon: yes it's floored and that's still good enough :P 21:59:45 nakilon: Is this leading to some sort of a pun about the word "primary"? 22:00:09 ais523: OH 22:00:20 oh, my Pi estimation was floored too? ( 22:00:33 anyway, if you're adding or subtracting floats, the processor basically has to scale the multipliers to make the exponents the same, and when the exponents are very different, normally one of the multipliers ends up overflowing as a consequence and lots of bits get thrown away 22:00:45 so if I make the numbers smaller, it wouldn't overflow 22:01:02 smaller, ignoring multiples of 2 22:01:21 thanks! 22:01:28 e.g. 3072 is a very "small" number as a floating point, because it's 3*(2**10) and 3 and 10 are small 22:01:56 * nakilon is glad RASEL does not have float precision errors 22:02:21 shachaf: at least I can reasonably estimate the number of islands now... I'll say 590 +/- 3. 22:02:26 The base-2 representation is also why numbers like 0.1 can't be exactly represented as floats. 22:02:44 yep, 0.1 isn't an exact integer multiplier of *any* power of 2 22:02:45 * NotApplicable is sad because QB64 apparently does 22:02:59 so it will get rounded to a float that can actually be represented 22:03:10 `! c printf("%.80f", 0.1); 22:03:11 fizzie it was probably an old human mistake to adopt 10 base 22:03:12 0.10000000000000000555111512312578270211815834045410156250000000000000000000000000 22:03:29 "mistake" 22:03:53 fizzie: now I'm curious what the exponent on that one is 22:04:26 binary would've been a mistake 22:04:38 I personally really like working in hexadecimal 22:05:13 [[Parse this sic]] M https://esolangs.org/w/index.php?diff=80617&oldid=80586 * Digital Hunter * (-9) 22:06:08 decimal really works well enough, except for computers if one isn't careful 22:06:13 0.1000000000000000055511151231257827021181583404541015625, on the other hand, is exactly 3602879701896397*2^-55. 22:06:26 fizzie: thanks for working it out for me 22:06:31 I was trying to but wasn't sure of a good approach to use 22:07:17 > toRational (10^54 * 0.1) 22:07:18 100000000000000020589742799994816764107083808679919616 % 1 22:07:58 -!- rain1 has joined. 22:08:20 > toRational (2^54 * 0.1) * 5^54 22:08:23 200000000000000011102230246251565404236316680908203125 % 2 22:08:35 I used bc + scale=100 + tested multiplying that number by some reasonable powers of two, starting from 2^50, until I got an integer result (at 2^55). 22:08:42 $ ruby -e 'p 10r**100' 22:08:42 (10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000/1) 22:09:04 > toRational 0.1 * 10^55 -- err, that was stupid 22:09:05 $ ruby -e 'p (10r**100).to_i' 22:09:05 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 22:09:06 1000000000000000055511151231257827021181583404541015625 % 1 22:09:28 > toRational 0.1 22:09:30 3602879701896397 % 36028797018963968 22:09:52 $ ruby -e 'p 0.1r' 22:09:52 (1/10) 22:10:12 `toRational` is a really terrible function 22:10:15 toRational`? No such file or directory 22:10:17 ah sorry this is correct: 22:10:18 $ ruby -e 'p 0.1.to_r' 22:10:18 (3602879701896397/36028797018963968) 22:10:27 HackEso: sorry 22:10:32 *correct analogy 22:11:31 huh, this just made me realise a parser ambiguity in Rust (0.1 could either be a single number, or field 1 of the integer 0) 22:11:43 at least one of the meanings is never going to be useful, so you can resolve it as the other 22:11:59 interesting 22:12:04 this doesn't come up in most languages, because "1" is not a valid identifier 22:12:14 so you can't use it as a method/property name 22:12:24 but Rust uses numeric identifiers for anonymous fields of structures 22:12:46 > [False..] 22:12:48 :1:9: error: :1:9: error: parse error on input ‘]’ 22:12:51 > [False ..] 22:12:53 [False,True] 22:13:02 kinda similar 22:13:32 it actually shocks me how many ambiguities there are in programming language syntax in general, especially if you don't have a separate lexing stage 22:13:57 lots of languages have constructs that could plausibly mean something else 22:15:05 /*/ comment /*/ 22:15:30 it's nuts 22:15:34 ah, /*/, the "toggle comment" construct, beloved of polyglots 22:15:39 everything is basically defined by implementation 22:15:49 Go has this thing where, because they dropped the ()s around the controlling expressions of if and friends, expressions that'd want to involve a composite literal, like `if x == T{a,b,c} { ... }`, need to be instead written either `if x == (T{a,b,c}) { ... }` or `if (x == T{a,b,c}) { ... }` to disambiguate the composite literal from the statement's block. 22:16:03 hah 22:16:14 !c int a = 4; int *b = &a; printf("%d", 8/*b); 22:16:21 `! c int a = 4; int *b = &a; printf("%d", 8/*b); 22:16:23 Does not compile. 22:16:29 `! c int a = 4; int *b = &a; printf("%d", 8/ *b); 22:16:31 2 22:16:40 I guess this is why we teach people to put spaces in their expressions :-) 22:16:43 QB64 has ALOT of ambiguatitiesicantspell 22:16:53 everything in undefined in the first place ..D 22:17:02 especially in JS 22:17:43 fizzie: Rust gets away with that by not using {} as a subscripting operator 22:18:00 JS is very precisely defined, just the definitions are usually not what you are expecting 22:18:54 well it clearly says everything is undefined 22:18:55 https://i.imgur.com/JYeLWqr.png 22:19:17 "not defined", whatever 22:19:52 the browser side (DOM, events) used to be terrible 22:20:26 it still is terrible, just more standardised than it used to be 22:20:27 the JS language itself is mostly okay 22:20:44 `` echo 'long long long i;' | gcc -x c - # I keep waiting for the day when someone with no sense of humour gets rid of this specific error message 22:20:45 :1:11: error: ‘long long long’ is too long for GCC 22:20:51 ais523: yeah good point 22:20:56 -!- tromp has quit (Remote host closed the connection). 22:21:03 int-e: JS was created by someone who clearly knew what they were doing, but in a timescale too short to do a proper job of it 22:21:25 so it has all sorts of shortcuts-to-get-the-implementation-done-faster, like function scope rather than lexical scope 22:21:48 * nakilon sees "jshell" command available in his bash and wonder if it's J SHELL or JS HELL 22:21:49 modern js is pretty nice if you compare it with pre-ES6 22:23:22 this reminds me, a while ago I improved JSFuck down to just a 5-character character set using ES6 features (but losing IO-completeness, although I retained Turing-completeness), but apparently now there are newer JS features that give you IO-completeness (and even DOM-completeness) with just a 5 character character set 22:23:45 :O 22:23:59 what new features made it possible to remove chars from jsfuck? 22:24:18 template strings let you call functions with `` as long as you give them a hardcoded string literal as argument 22:24:34 which saves characters because `` is one character twice, as opposed to () which is two different characters 22:24:56 i see 22:25:23 the new new feature is the |> pipeline operator, which *also* lets you call functions 22:25:40 oh i'm not aware of |> 22:25:43 what does it do? 22:25:45 and saves one char because > is a comparison operator, so you can get at booleans without needing to add =, >, or some similar character 22:25:55 x |> f is equivalent to f(x) 22:26:04 of course 22:26:20 somebody liked haskell, i guess 22:26:28 Man, they gotta stop adding features to JavaScript. 22:26:45 nah 22:26:51 last time I seriously programmed OCaml I was using two different pipeline operators, I forget what the difference was 22:27:02 maybe one of them had a built-in map and the other didn't? 22:27:09 IIRC one was a builtin and I implemented the other myself 22:27:54 Or at least the version that's in browsers. 22:28:47 |> seems such a silly addition... 22:28:57 oh wow: https://caniuse.com/mdn-javascript_operators_pipeline 22:29:09 apparently |> isn't implemented by *any* common browser 22:29:22 I don't think I've ever seen that when looking up the compatibility of a JavaScript feature 22:29:25 in Ruby the new features are added in the way that on meetings guys come up with ideas or community feedbacks as "what if we implement this?" and Matz either says "yes" or "no" -- and sometimes he's in too good mood to allow implementation of a shit the language didn't need on my opinion 22:29:30 what about node? 22:30:00 "The experimental pipeline operator |> (currently at stage 1) --" makes me wonder what exactly the stages are. 22:30:07 such things that kind of hide the errors, like "let's return nil here instead of raising the exception" -- the community loves it because it's in the mood of web 22:30:24 I don't think caniuse supports Node (or other offline JSes like Rhino) 22:30:25 s/silly/useless/ 22:30:38 https://github.com/tc39/proposal-pipeline-operator "Warning: The details of the pipeline syntax are currently unsettled. There are two competing proposals under consideration." 22:30:53 don't they mean "not settled"? "unsettled" means something else 22:31:36 "Man's greatest asset is the unsettled mind", said an Asimov short story. 22:32:13 i wonder how you would use multiple arguments in pipeline 22:32:24 the proposal gives an example 22:32:40 but I don't find it very readable, it basically involves wrapping the pipeline stage in a lambda 22:33:05 they suggest combining it with https://github.com/tc39/proposal-partial-application 22:33:07 I don't know why they even work on anything other than making browser programming a usable compiler target. 22:33:08 which is, wow 22:33:35 it reminds me of Mathematica's #…& operator, but it's actually pretty different 22:34:40 oh, partial application would be nice 22:35:16 ais523: https://www.merriam-webster.com/dictionary/unsettled looks ambiguous 22:35:32 This is only for something in function argument position, and it lambdifies the immediately surrounding function? 22:35:36 I'm sure I've seen "unsettled conjecture" before 22:35:53 (which is redundant, but never mind that) 22:36:01 -!- craigo has quit (Quit: Leaving). 22:36:06 "Need to write |> _ => for each step in the pipeline." // That looks like one of those horizontal / non-rotated emoticons. 22:36:40 That seems very specific. 22:36:58 it's just a lambda inside a pipeline stage 22:37:07 _ => is the lambda (with a funky argument name) 22:37:14 and |> is the pipeline operator 22:37:36 |> _ => 22:39:53 The fact that `f(g(?))` is `f(_0 => g(_0))` rather than `_0 => f(g(_0))` makes perfect sense, but I feel like that'd lead to bugs anyway. 22:40:18 the competing proposal looks more like a syntactical transformation where foo |> bar is let # = foo [# here unless `foo` uses #] in bar (ML-style non-recursive let) 22:40:21 (Well, maybe it's more likely to not work at all rather than to work wrong.) 22:40:23 fizzie lol at those "Think" magazine rejections: https://en.wikipedia.org/wiki/The_Greatest_Asset 22:40:45 fizzie: Mathematica's # … & operator gets round the problem by using an & to mark the function you're partially applying 22:41:06 I guess you're encouraged to write g(?) |> f instead. 22:41:08 but, it's too general and is even harder to figure out the scope, because the & is placed at the end of the scope you're lambda'ing over but there's no marker for the start 22:41:34 shachaf: no, g(?) |> f is equivalent to f(g(?)) 22:41:44 i.e. the partially applied function is given as an argument to f 22:42:06 Oh, right, I forgot what the goal was. 22:42:29 -!- tromp has joined. 22:42:29 Wait, hmm. 22:42:36 you'd need a Haskell-style compose operator 22:42:39 (g . f)(?) 22:42:43 I meant you'd write ... |> g |> f 22:42:45 (or just (g . f)) 22:42:53 But of course it's all silly in that context anyway. 22:43:11 ooh! that's probably the other operator I had, besides |> 22:43:17 I must have had both pipeline and compose 22:43:31 but an argument-swapped compose 22:43:39 or, hmm 22:43:42 not swapped 22:49:14 -!- sprock has joined. 22:50:33 -!- NotApplicable has quit (Quit: Leaving). 22:57:28 I was wondering the other day about centralizing handling of all JavaScript events. 22:59:19 So instead of having callbacks that do anything, they'd just add events to a queue, which you'd drain later. 22:59:53 One problem is that if you get multiple events at once, there's no way of knowing, really. You can't ask if there are other events on the queue, as far as I know. 23:00:06 You can process events once per frame or something like that, I suppose. 23:04:29 -!- NotApplicable has joined. 23:09:23 -!- hendursa1 has quit (Remote host closed the connection). 23:11:56 -!- hendursa1 has joined. 23:15:49 [[Photon (Quintopia)]] M https://esolangs.org/w/index.php?diff=80618&oldid=80616 * Hakerh400 * (-9) fix formatting 23:23:45 I think over the time they have added many good features into JavaScript, such as typed arrays, generator functions, arrow functions, big integers, etc. But, some things they didn't add, such as a goto command, and a alternate call stack capability. 23:27:16 -!- tromp has quit (Remote host closed the connection). 23:31:33 -!- tromp has joined. 23:32:55 I don't know what new functions they will add for big integers. They should add 64-bit MOR and MXOR, and also popcount, two log2 functions (one returning a floating number and one returning a integer), Date.bigNow() (in case of future), and functions for reading/writing arbitrary length integers into array buffers. 23:32:55 -!- tromp has quit (Read error: Connection reset by peer). 23:33:03 -!- tromp has joined. 23:36:51 -!- tromp has quit (Read error: Connection reset by peer). 23:37:13 I think those idea about partial application are not so good, I thought of other way too they don't seem very good; best probably using arrow functions in the existing way, since the other ways are not general enough 23:37:17 -!- tromp has joined. 23:42:01 -!- tromp has quit (Ping timeout: 272 seconds). 23:42:36 why does tromp keep joining and quitting 23:42:53 I don't know why. 23:44:28 my client folds these messages, like: "10 users have joined, and 1 user has left" 23:44:47 What client is that? 23:45:38 https://thelounge.chat/ 23:46:17 /ctcp nakilon version 23:46:49 -!- Arcorann_ has joined. 23:47:01 -!- NotApplicable has quit (Remote host closed the connection). 23:47:07 -!- NotApplicable2 has joined. 23:47:23 also I've applied a CSS to make them barely visible' 23:47:55 https://i.imgur.com/58qEz5u.png 23:49:37 -!- NotApplicable2 has changed nick to NotApplicable.