Newest at the top
| 2025-12-04 20:27:56 +0100 | <ski> | rebased ? |
| 2025-12-04 20:27:38 +0100 | <tomsmeding> | fortunately -- contrary to segfaultfizzbuzz's wishes -- history is being revised regularly :) |
| 2025-12-04 20:27:18 +0100 | AlexZenon_2 | AlexZenon |
| 2025-12-04 20:26:25 +0100 | <tomsmeding> | it seems that now is really the time that I've not used C for a long enough time that I forget basic syntax like this |
| 2025-12-04 20:25:01 +0100 | <int-e> | . o O ( it's called "revising history", I learned today ) |
| 2025-12-04 20:21:05 +0100 | <tomsmeding> | :) |
| 2025-12-04 20:21:00 +0100 | <monochrom> | Your brain makes sense, therefore you don't understand a poor syntax choice in C. :) |
| 2025-12-04 20:20:51 +0100 | <tomsmeding> | (I had to pass -std=c99 -pedantic to get gcc to complain about it) |
| 2025-12-04 20:20:38 +0100 | <tomsmeding> | 2. what is my brain doing |
| 2025-12-04 20:20:33 +0100 | <tomsmeding> | 1. you're right |
| 2025-12-04 20:20:19 +0100 | <tomsmeding> | or wait what |
| 2025-12-04 20:20:15 +0100 | <tomsmeding> | TIL |
| 2025-12-04 20:19:57 +0100 | <monochrom> | But C didn't have the o, you go straight to 0777 |
| 2025-12-04 20:19:15 +0100 | <tomsmeding> | I'd rather expect that all mentioned examples got 0o from C :p |
| 2025-12-04 20:18:42 +0100 | <tomsmeding> | mauke: uh, what about C? |
| 2025-12-04 20:16:55 +0100 | <tomsmeding> | got the language wrong, but at least it exists in a common language :p |
| 2025-12-04 20:16:18 +0100 | <tomsmeding> | int-e: Swift seems to have ..< with the meaning I had in mind |
| 2025-12-04 20:15:10 +0100 | <tomsmeding> | int-e: I could have _sworn_ rust had ..< |
| 2025-12-04 20:11:47 +0100 | gehmehgeh | gmg |
| 2025-12-04 20:08:21 +0100 | <mauke> | but the exponent is required |
| 2025-12-04 20:08:15 +0100 | <mauke> | kind of. perl supports 0o0.4p0 |
| 2025-12-04 20:07:12 +0100 | ski | . o O ( `0o0.4' ) |
| 2025-12-04 20:05:13 +0100 | <int-e> | But not Pike (which is another branch of LPC), so I think the caveat is important. |
| 2025-12-04 20:03:40 +0100 | <int-e> | Rust too. The aforementioned LPC too (at least in its modern ldmud dialect). |
| 2025-12-04 20:03:39 +0100 | <c_wraith> | actually, I guessed it based on the syntax provided in the binary literals extension rather than looking for a reference. at least things are consistent |
| 2025-12-04 20:03:29 +0100 | <mauke> | nice |
| 2025-12-04 20:02:03 +0100 | <int-e> | let's see.. Python 3 does it and forbids leading zeros in decimal literals on top of that |
| 2025-12-04 19:59:02 +0100 | <mauke> | do any other programming languages (outside of Perl/Haskell) support 0o notation? |
| 2025-12-04 19:57:46 +0100 | <haskellbridge> | <loonycyborg> Probably it's possible to write a function that will map on the element number in tuple that you specify as type level Natural :P |
| 2025-12-04 19:57:36 +0100 | <mauke> | 0o (pronounced "uh-oh") |
| 2025-12-04 19:56:35 +0100 | <monochrom> | heh |
| 2025-12-04 19:56:19 +0100 | <c_wraith> | I found myself looking for how to write octal literals for the first time today. after almost 20 years using Haskell. |
| 2025-12-04 19:56:09 +0100 | tromp | (~textual@2001:1c00:3487:1b00:a4ed:9e46:fd5d:6b4e) (Client Quit) |
| 2025-12-04 19:55:31 +0100 | <monochrom> | You can write your own Trifunctor class. If you subclass from Bifunctor, then you just have to add the third method. :) |
| 2025-12-04 19:55:13 +0100 | tromp | (~textual@2001:1c00:3487:1b00:a4ed:9e46:fd5d:6b4e) |
| 2025-12-04 19:52:23 +0100 | <monochrom> | Yeah you want to avoid `n-1`. |
| 2025-12-04 19:52:11 +0100 | <Square2> | Anyone know of a better trick? |
| 2025-12-04 19:51:41 +0100 | <Square2> | first/second from Bifunctor is great for tuples. I ended up with a tuple-3 and tried to find something similar but the only thing I foudn was https://hackage.haskell.org/package/n-ary-functor-1.0 which felt a bit clumsy |
| 2025-12-04 19:51:29 +0100 | <mauke> | maybe its implementation needs to be revised: upto n = takeWhile (< n) [0 ..] |
| 2025-12-04 19:50:21 +0100 | <mauke> | "upto" is the kind of [0..n) |
| 2025-12-04 19:49:37 +0100 | <monochrom> | Oh, I revise history all the time. >:) |
| 2025-12-04 19:48:34 +0100 | <int-e> | I just don't think your explanation why `length` doesn't return Word is supported by history. |
| 2025-12-04 19:48:34 +0100 | <monochrom> | I don't get the point. |
| 2025-12-04 19:48:06 +0100 | <int-e> | monochrom: I know, and you missed the point :-P |
| 2025-12-04 19:47:52 +0100 | <monochrom> | Word is in Data.Word |
| 2025-12-04 19:47:38 +0100 | <haskellbridge> | <Zemyla> filter (/= n) [0..n] |
| 2025-12-04 19:47:32 +0100 | <int-e> | monochrom: what is this "Word" you're talking about? https://www.haskell.org/onlinereport/basic.html#sect6.4 |
| 2025-12-04 19:47:07 +0100 | <monochrom> | Err, [0 .. (n :: Word) - 1] and [0 .. (n :: Natural) - 1] are foot guns. |
| 2025-12-04 19:47:07 +0100 | fp | (~Thunderbi@89-27-10-140.bb.dnainternet.fi) fp |
| 2025-12-04 19:46:45 +0100 | <monochrom> | Because [0 .. (n :: Int) - 1] and [0 .. (n :: Integer) - 1] are foot guns. |