2023-02-18 00:38:39 You know, what I *don't* like about regular expressions is that it feels like an entirely arbitrary hodge podge of "methods." This character does this, that one does that - and oh, yeah - that second one does this other thing to - etc. etc. 2023-02-18 00:38:48 There's just no logic - no rhyme or reason to id. 2023-02-18 00:38:58 It's like someone just poured a bunch of stuff into a sack. 2023-02-18 00:39:31 There's nothing systematic to learn - just a ton of isolated details to memorize. 2023-02-18 15:29:05 It's a hell of a thing to try to do - this building of enterprise grade storage systems using this kind of flash. Every new generation of flash chip that comes out tends to have more capacity, but fewer program/erase cycles and higher bit error rate. And we have to jump ever more engineering hoops to get the product longevity and reliability needed anyway. 2023-02-18 15:29:19 I've jokingly referred to what we do as making armor out of toilet paper. 2023-02-18 15:30:14 We're always looking to use more sophisticated error detection and correction algorithms, which we implement in hardware via FPGAs, and more and more tricks for NEEDING fewer program/erase cycles to provide the same product life to the users. 2023-02-18 15:31:08 We have to put in firmware that runs behind the scenes to monitor each page's gradually degrading reliability, and retire the pages that we deem no longer good enough, and so on. 2023-02-18 15:35:06 I forget exactly where we are on ECC, but it's something like on an 8kB "code page" there can be like a hundred bit errors, and we can correct those and extract the right information. 2023-02-18 15:35:56 Every page we read we note that count, and as long as it's small things a groovy. Once it reaches a certain threshold, though, we will re-write that page to a new home to get a clean start and mark the original page for garbage collection. If it's even HIGHER we do that but then retire that page. 2023-02-18 15:36:34 We do this on normal reads, but there's also a background scanner that slowly moves around the whole disk every week or two, checking just for that. 2023-02-18 15:36:52 Obviously these drives are expected to be powered up 24/7. 2023-02-18 15:46:41 impossible, at most you can expect is about 23.9999998861 hours 2023-02-18 15:50:03 :-) 2023-02-18 15:50:36 Well, my point is that if you turn one of these systems off and leave it for a few months and then power it backup, you might have real problems on your hands. 2023-02-18 15:50:57 Because the gradually appearance of bit errors isn't being guarded against during that time. 2023-02-18 15:51:20 problematic if an area gets evac'd due to nuke or bio or such hazard 2023-02-18 15:52:14 Our older stuff had drive-level RAID, but the newer ones don't - there's RAID at the system level, but we used to have two RAID levels, and now only one. 2023-02-18 15:52:53 But tHE ECC has gotten a lot stronger, so it kind of works out. 2023-02-18 15:54:57 Yeah, that would be problematic. 2023-02-18 15:55:19 There are other levels of protection, though - mirroring to geographically isolated locales, etc. 2023-02-18 15:55:27 At the top level it all gets pretty involved. 2023-02-18 15:55:48 And of course IBM is always ready to sell you services related to such. 2023-02-18 15:59:27 Here's an example of that "arbitrary" aspect of regular expressions. ^ is an anchor - it matches the null string at the beginning of any line, so it lets you force your match to have to occur at the beginning of a line. 2023-02-18 15:59:29 Great. 2023-02-18 16:00:05 But, then [abc] is used to match any of the letters a, b, or c, and lo, [^abc] inverts that to matching anything NOT a, b, or c. 2023-02-18 16:00:15 Same character, two completely different meanings. 2023-02-18 16:00:35 welcome to languages 2023-02-18 16:03:28 It's easy to parse and understand though 2023-02-18 16:03:58 Yeah. 2023-02-18 16:05:13 Wilkens tried to make a language without problems, but mostly ran into problems 2023-02-18 16:08:09 I poked around a fair bit yesterday at regexp stuff, and as far as I can tell people generally seem to have the lay of the land pretty well. Most people seem to realize that the "more powerful engines" we have around these days can encounter nasty performance problems, and that if you just cannot accept that risk then you have to limit yourself to the old school Thompson style engines, which have less 2023-02-18 16:08:11 capability (can't back reference). 2023-02-18 16:08:32 But since that's just not a problem for people most of the time, the powerful engines are usually used, in spite of the risk. 2023-02-18 16:09:21 Turns out that's one of those NP Complete things - if you found a way to keep back references and still get the good performance, you'd qualify for that million buck prize, because you'd have basically solved every NP complete problem in the world. 2023-02-18 16:09:36 Since it seems they can all be turned into one another. 2023-02-18 16:12:47 people also use problematic sort and hashing algos 2023-02-18 16:19:38 Yeah - I so rarely need to sort that I'll usually just hack out the nested i=1..N, j=i..N loops and leave it at that. 2023-02-18 16:20:07 It's just never the case that it's something I'll use enough to warrant trying to do better. 2023-02-18 16:20:16 Insertion sort is the fastest sort a lot of the time 2023-02-18 16:20:50 can you do any better than insertion paired with binary search? 2023-02-18 16:21:08 Really depends on what you're doing 2023-02-18 16:21:53 I studied all that stuff for a few months decades ago. 2023-02-18 16:22:12 Using Pascal. :-) 2023-02-18 16:22:19 Not a C fan then? 2023-02-18 16:22:20 So that dates it to some degree. 2023-02-18 16:22:39 C wasn't fully popular yet, or at least wasn't at my university. 2023-02-18 16:22:55 I didn't really encounter C until immediately after college. 2023-02-18 16:23:02 First job - C was used there. 2023-02-18 16:23:23 Which could just mean that there was a prominent faculty guy at my school that shunned it. 2023-02-18 16:23:32 Universities are always behind 2023-02-18 16:23:44 It wasn't anyone in particular probably 2023-02-18 16:23:56 C was early to mid 1970's? 2023-02-18 16:24:44 Wikipedia says 72-73. 2023-02-18 16:24:49 I think C probably 'exploded' in the 80's 2023-02-18 16:25:01 so it had been around a while, but I encountered it in 1986. 2023-02-18 16:25:03 It became the most popular programming language 2023-02-18 16:25:38 I think that's appropriate, at least among all the languages I got exposed to. 2023-02-18 16:27:34 I don't know much about Pascal other than lots of people I know learned it in school or uni 2023-02-18 16:27:44 Bloody academia.... 2023-02-18 16:28:16 Pascal was alright - I didn't "hate" it. But C just feels a lot smoother. 2023-02-18 16:29:23 I want to think (it's been a while) that there was no general ability to type cast in Pascal. 2023-02-18 16:29:26 That's the other thing I know is that it's pretty much just clunkier 2023-02-18 16:30:22 That's a good way to say it - it did have a clunky feel. 2023-02-18 16:31:02 there's a BYTE magazine where a pascal guy argued that C didn't have a future 2023-02-18 16:31:13 and you didn't have little nice features like auto-increment and so on. 2023-02-18 16:31:21 Ooops. 2023-02-18 16:32:53 pascal did fix a bunch of things after "why pascal is not my favorite programming language" by some no-name Kernighan 2023-02-18 16:33:37 I didn't see it until the early 1980's, so all that was probably done before then. 2023-02-18 16:38:48 It sounds like old Pascal has some of the issues that C++ has 2023-02-18 16:38:55 But with extra work involved 2023-02-18 16:39:12 i.e. having different functions for essentially the same work because of apparently stronger types 2023-02-18 16:39:25 But in C++ the compiler will generate these extra functions for you at least 2023-02-18 16:41:04 pascal at least reputably has quick compile times 2023-02-18 16:42:33 I'm reading that "why pascal is not my favorite" article 2023-02-18 16:42:55 > Since the original Pascal was implemented with a one-pass compiler, the language believes strongly in declaration before use. In particular, procedures and functions must be declared (body and all) before they are used. The result is that a typical Pascal program reads from the bottom up - all the procedures and functions are displayed before any of the code that calls them, at all levels. This is 2023-02-18 16:43:01 essentially opposite to the order in which the functions are designed and used. 2023-02-18 16:43:09 This is the same problem new C has, and C++ 2023-02-18 16:43:16 And Forth 2023-02-18 16:43:33 Not a problem in my New B language though 2023-02-18 16:45:26 > it is not possible to write programs like storage allocators or I/O systems in Pascal, because there is no way to talk about the type of object that they return, and no way to force such objects into an arbitrary type for another use 2023-02-18 16:47:49 > it is not possible to write programs like storage allocators or I/O systems in Pascal, because there is no way to talk about the type of object that they return, and no way to force such objects into an arbitrary type for another use 2023-02-18 16:48:06 > has only four levels of operator precedence, with relationals at the bottom 2023-02-18 16:48:08 yikes 2023-02-18 16:51:32 It's rather like Forth, in that "define then use" sense. 2023-02-18 16:51:41 Oh, you said that. 2023-02-18 16:52:05 Yes, Pascal's memory management was unwieldy. 2023-02-18 16:52:28 You had new and... delete? and you had to call out the type of the thing at the time you allocated it. 2023-02-18 16:52:51 There was no possibility of writing your allocator that used the system to get big blocks and then manage them yourself.