00:00:30 which might be a plot reason for them _not_ to do it - it would keep them seemingly infallible 00:02:53 They only used their shortest one so far, right? 00:04:27 ...i thought it was the longest? time to check. 00:06:11 Oh, you're right. 00:08:11 http://www.giantitp.com/comics/oots0667.html and http://www.giantitp.com/comics/oots0897.html 00:08:16 So there's one short and one long one left. 00:27:12 thanks, i didn't find the first one 00:27:46 and naturally got drawn into archive binging... 00:30:47 -!- S_Gautam has joined. 00:41:22 that globe in the last girl genius appears to have atlantis 00:41:59 oerjan was drawin into archive binging so much that he's reading the wrong comic 00:42:21 and a strange red broken line 00:42:37 well, i got better and went back to my usual webcrawl 00:42:43 which is a bit delayed 00:43:26 so apparently gil never saw the one in mechanicsburg, i guess tarvek wasn't close enough 00:45:16 next up, dmm's site 00:45:20 or possibly eating 01:11:35 eating won this one 01:44:49 -!- deltab_ has changed nick to deltab. 01:58:04 -!- imode has quit (Ping timeout: 260 seconds). 03:17:16 [[This=That]] https://esolangs.org/w/index.php?diff=56739&oldid=31337 * A * (+251) 03:19:42 [[This=That]] https://esolangs.org/w/index.php?diff=56740&oldid=56739 * A * (+12) Oops! I did this wrong. 03:21:29 [[Talk:This=That]] https://esolangs.org/w/index.php?diff=56741&oldid=23195 * A * (+117) 03:28:25 -!- oerjan has quit (Quit: Nite). 03:29:45 [[Multi-machine]] N https://esolangs.org/w/index.php?oldid=56742 * A * (+437) Created page with "A Multi-machine is an extremely simple program type invented bt [[User:A]] to check decision, looping, addition, subtraction, termination, input, and output in a simpler way c..." 03:35:39 [[Multi-machine]] https://esolangs.org/w/index.php?diff=56743&oldid=56742 * A * (-9) 03:37:40 [[Multi-machine]] https://esolangs.org/w/index.php?diff=56744&oldid=56743 * A * (+224) 03:54:43 [[Truth-machine]] https://esolangs.org/w/index.php?diff=56745&oldid=56697 * A * (+92) /* Definer */ 03:58:46 [[Truth-machine]] https://esolangs.org/w/index.php?diff=56746&oldid=56745 * A * (-3) /* Definer */ 04:04:49 I think I understand the importance of the Stg and Cmm internal languages now 04:06:59 -!- XorSwap has quit (Ping timeout: 260 seconds). 04:07:15 [[Definer]] https://esolangs.org/w/index.php?diff=56747&oldid=22105 * A * (+175) /* Examples */ 04:10:22 [[Definer]] https://esolangs.org/w/index.php?diff=56748&oldid=56747 * A * (-12) /* Examples */ 04:18:07 [[Definer]] https://esolangs.org/w/index.php?diff=56749&oldid=56748 * A * (+18) /* Examples */ 04:19:19 -!- erkin has quit (Quit: Ouch! Got SIGIRL, dying...). 04:45:54 -!- imode has joined. 07:21:08 -!- tromp has joined. 07:25:35 -!- tromp has quit (Ping timeout: 240 seconds). 07:27:42 -!- tromp has joined. 07:30:20 !! 07:30:25 I just compiled my first thing 07:31:19 provided, it was very simple: main = main 07:43:21 -!- wob_jonas has joined. 07:48:05 mniip: NICE! 07:48:14 can you also compile a hello world? 07:48:19 no 07:48:25 or do you have no IO in this thing? 07:48:32 I'm currently inspecting the assembly for 'id' and (.) to see if it's correct 07:49:09 then I'll implement compilation of constructors and pattern matches 07:49:16 then probably let-bindings 07:49:36 and I need to figure out what to do with non-trivial pattern bindings in lets or global scope 07:49:55 mniip: so you'll have algebraic types? 07:50:22 yes 07:50:24 arbitrary algebraic types that you can define in simply typed, or just a few built-in ones? 07:50:29 I guess it doesn't matter much 07:50:35 there isn't a typechecker yet btw 07:50:43 How much can I cheat 07:50:45 that just makes the typechecker harder, not the code generation 07:50:46 arbitrary 07:50:50 there's a "data" declaration 07:50:57 By compiling a Haskell-like language to Rust. :D 07:51:10 Lymia, not by much 07:51:39 It avoids all the low level nightmares like low level representation of ADTs. 07:51:43 At least 07:51:49 not really no 07:52:16 Not really? 07:54:05 wob_jonas, oh and there's no GC yet lol 07:54:27 I suppose what I mean is 07:54:43 mniip: sure, you can add the GC later 07:54:51 I get to avoid all the less fun low level stuff, and just focus on the interesting stuff like the type inference. 07:55:16 Lymia, then write a lambda calculus interpreter in haskell 07:55:33 I guess :P 07:55:43 mniip: do you optimize function calls with multiple arguments so you don't create a temporary bound function when the compiler sees the first argument and then call into that when it sees the second argument? 07:55:55 no 07:56:07 it's a chain of closures with increasingly more upvalues 07:56:37 their entry code is very short though 07:56:53 wait, is this because you're doing a lazy interpreter? 07:57:21 also, wow, this was fast 07:58:38 of course, call by name like I said 07:59:17 why? do you just want a mini-haskell interpreter? 07:59:21 -!- AnotherTest has joined. 08:00:21 yes 08:00:36 ouch. but if that's what you want, sure, go on 08:03:25 How hard are thunks to implement anyway? 08:04:36 I imagine they're something that are easy to implement in a way that's subtly wrong 08:05:26 shachaf: yes, the fiends did make such a comment too, not only xykon: see http://www.giantitp.com/comics/oots0668.html and http://www.giantitp.com/comics/oots0633.html 08:05:45 especially the first one. in the second one they just misdirect Vaarsuvius 08:07:38 fun 08:07:45 gdb will rewrite f__g into f.g 08:09:50 it also cannot infer arguments correctly for some reason? 08:12:02 -!- Phantom_Hoover has joined. 08:12:02 -!- Phantom_Hoover has quit (Changing host). 08:12:02 -!- Phantom_Hoover has joined. 08:12:22 -!- imode has quit (Ping timeout: 264 seconds). 08:12:24 mniip: that latter is probably because you didn't use the right calling conventino 08:12:58 I did 08:13:01 the code works fine 08:13:24 it's just that gdb keeps telling things are different from what they are 08:14:11 do you write any debug info? maybe gdb doesn't know how many and what type of arguments your functions have. 08:16:35 I run 'as' with -g and the rts C code is compiled with -g 08:17:31 mniip: um, but as won't know how many arguments your assembly function has. it will just know to write debug info to identify all symbols, such as all functions where they know the name because the as code has it. 08:18:02 wob_jonas, no like when I invoke a C function 08:18:13 I put stuff into %rdi, %rsi, %rdx, %rcx, ... 08:18:33 and is that C function compiled with debugging info too? 08:18:36 and the compiled C code looks for arguments in exactly those registers 08:18:49 but for some reason gdb looks elsewhere 08:18:50 yes 08:19:04 also, you've made sure that you don't run a too old gdb or a too old gcc, right? ancient gdb has mysterious bugs. 08:19:15 anything from the last few years should be fine 08:19:31 unless it's Apple's releases of course 08:19:54 strange 08:21:53 and you do the linking with ld in gnu binutils or gold from gcc, so the debug info should get correctly propagated, right? 08:24:27 I wonder if there's a way to directly ask gdb what he thinks the prototype of that function is, even if it's not called 08:24:53 I guess you could try to ls that function, which should at least make sure that some debug info got through. 08:25:11 What comment? 08:26:11 shachaf: the comment about what evil people want and that they're not one happy family 08:26:32 re " My faulty memory told me that it was the fiends who made the comment about the sides." 08:26:44 Oh, but I remembered the specific phrasing. 08:26:51 "they don't know about some of those yet" 08:26:56 So it was definitely faulty memory. 08:26:56 the fiends say they don't want either side among Redcloak's Team Evil and the OOTS to win 08:27:03 Right. 08:29:49 seems to work! 08:30:09 what seems to work? 08:30:19 ah er I just fixed a bug 08:30:20 :w 08:32:01 so. constructors and pattern matching 08:32:31 can you compile function calls and lambdas with upvalues (closures) yet? 08:32:36 yes 08:32:38 nice 08:32:45 (.) is one such 08:33:28 I mean it wouldn't be much of a challenge if I didn't implvement upvalue handling duh 08:47:42 mniip: sure, but you could implement handling algebraic types and pattern matching into local variables before you implement function calls 08:48:02 "local variables" 08:48:31 yes, local to the function you have, which is built out of constructors and general pattern matching including let 08:51:09 but I guess if you want this to be a mini-haskell, then it makes sense to start with closures on the heap, since they're already TC 09:02:27 mniip: you're making me want to try writing a compiler 09:11:34 mniip: anyway, that was quick. you only started writing this yesterday. I'll be interested to see what you get when it's ready. 09:19:57 okay so pattern matching is where local variables come in 09:22:08 mniip: yes. pattern matching binds values into local variables. 09:22:28 are you implementing general pattern matching, or just matching on a single level of constructor? 09:22:36 general, shouldn't be an issue 09:22:38 I mean, general patterns which can be nested or even just a variable 09:22:50 data Pat = VarPat IdName | JoinPat Pat Pat | HolePat | DataPat IdName [Pat] deriving Show 09:23:24 and do you detect when the match patterns are exclusive so there's no need for an else clause? or will you only do that after a typechecker? 09:23:47 no why 09:23:54 it's not like I'm writing an optimizing or fast compiler 09:23:58 sure 09:24:22 not planning to compete with GHC, rather wanted something with similar runtime asymptotics 09:26:44 what I mean, "length" should be linear time no matter the constant 09:27:04 don't care if it does allocation on every iteration 09:30:24 -!- S_Gautam has quit (Quit: Connection closed for inactivity). 09:31:18 Hi, I just discovered thet it is "World Emoji Day" today, so I will be aiming to make a version 1.0.0 of my functional emoji language and release it (it already works atm). Currently the language supports function definition, string and number literals, input for strings and input and output for either literal. Oh, and it is completely restricted to emoji (input, output and source code). I am planning to add some arithmatic operations and perhaps num 09:31:19 input. Is there something important I am missing for a 1.0.0 version, do you think? 09:32:59 Zero-width joiners? Skin tone modifiers? 09:33:31 In my Olvasható translator, I require all matches to be exhaustive, but the translator itself doesn't check that, it's the SML interpreter that does 09:39:48 shachaf: I use the complete list of emoji, so all seqences of code points that are supposed to be displayed as one emoji (and classified as an emoji) are accepted, nothing else. 09:41:46 There are some key emoji that are used for language syntax, all other emoji may be used as function names. 09:45:48 Fogity: is there some way in which this will be better than the approximately five already existing emoji languages? 09:46:42 1) it is functional, the others I have seen have been stack based or object oriented 09:47:26 2) it is completely restricted to emoji, a pure emoji language per se 09:47:48 -!- SopaXorzTaker has joined. 09:48:49 No whitespace? 09:49:07 no 09:49:16 -!- SopaXorzTaker has quit (Remote host closed the connection). 09:49:16 Fogity: you're right, none of the others seem to be functional. most of them are stack-based. 09:56:39 Hmm, what do you think is a good license for a project like this? 09:56:40 [[Tom Murphy VII]] N https://esolangs.org/w/index.php?oldid=56750 * B jonas * (+380) Created page with "'''Tom Murphy VII''' PhD, also known as Tom7, is a creator of esoteric languages and other esoteric projects, mostly but not exclusively computer-related. Languages and other..." 09:57:02 [[Tom7]] N https://esolangs.org/w/index.php?oldid=56751 * B jonas * (+28) Redirected page to [[Tom Murphy VII]] 09:57:19 [[Wikiplia]] https://esolangs.org/w/index.php?diff=56752&oldid=43289 * B jonas * (+44) identify creator 09:58:08 [[ABC (compiler)]] https://esolangs.org/w/index.php?diff=56753&oldid=53729 * B jonas * (+19) link creator 09:58:40 [[Wikiplia]] https://esolangs.org/w/index.php?diff=56754&oldid=56752 * B jonas * (-5) reclassify as a non-joke language 09:59:13 [[Tom Murphy VII]] https://esolangs.org/w/index.php?diff=56755&oldid=56750 * B jonas * (+21) 10:04:42 -!- AnotherTest has quit (Ping timeout: 265 seconds). 10:14:26 -!- aloril_ has joined. 10:15:30 [[WysiScript]] https://esolangs.org/w/index.php?diff=56756&oldid=51635 * B jonas * (-40) the homepage claims it's implemented. I didn't test. 10:16:08 -!- aloril__ has quit (Ping timeout: 268 seconds). 10:17:49 -!- Melvar has joined. 10:18:40 [[Y86]] https://esolangs.org/w/index.php?diff=56757&oldid=50888 * B jonas * (-49) /* Addressing modes */ dt already bolds its text, so no need to bold it again, and double bolding showed up strange in a browser 10:28:03 hmm 10:28:10 hmm 10:28:17 [[Incident]] https://esolangs.org/w/index.php?diff=56758&oldid=54404 * B jonas * (+24) /* See also */ 10:28:19 I did it wrong apparently 10:28:46 evaluating 'g (f x)' would evaluate f 10:28:53 which is not supposed to happen 10:29:09 I see 10:29:17 thankfully there's an easy fix 10:29:21 it's supposed to evaluate g 10:29:34 it's supposed to create an 'f x' closure and feed that to g 10:29:38 but only up to its top-level constructor 10:29:45 right 10:29:53 considering g is a function it's not going to have a constructor 10:30:27 mniip: that still matters 10:30:39 it doesn't evaluate the upvalues or bound arguments of g 10:30:42 sure 10:30:50 only evaluates which lambda in the source code it points to 10:31:20 yeah, that, everything is evaluated only up to its top level constructor when it's evaluated 10:32:12 now I'm met with another problem 10:32:32 it I have a JoinPat (VarPat "a") (DataPat "False" []) 10:32:41 and I allocate a local variable for the 'a' 10:32:46 and then the False match fails 10:32:53 I have to deallocate the 'a' 10:33:21 what? you're already adding characters too? do you add numbers too? 10:34:02 what? 10:34:09 wob_jonas: variable name 10:34:10 'a' is an identifier 10:34:20 the JoinPat (VarPat "a") (DataPat "False" []) stands for something like 10:34:24 case _ of a@False -> _ 10:35:04 ah, so it's a parse tree? 10:35:11 yes 10:35:22 I was wondering on that, but JoinPat didn't make sense 10:35:35 ah, it represents an at-pattern 10:36:14 those are called join patterns? I didn't know 10:36:40 *Main> parse "foo = case _ of (a@False) -> _" 10:36:40 Just [IdBndr (VarPat "foo") (Case (Id "_") [CaseBranch (JoinPat (VarPat "a") (DataPat "False" [])) (Id "_")])] 10:38:16 so that parses the contents of a module? 10:38:20 yes 10:38:58 do you eventually want to make this be able to compile itself? 10:39:05 I've had that idea 10:39:15 cool 10:39:20 but that might be complicated given the syntax of haskell 10:39:45 sure 10:39:59 you'll have to restrict the compiler source code itself to a subset 10:40:22 yeah but the 10 imports I have at the top 10:40:48 what I'd really like is compiler that can bootstrap itself in possibly multiple steps from an interpreter that is very simple 10:41:36 it bothers me a lot that Rust only has one implementation, and it can only be compiled by itself or a slightly earlier version of itself, so you need like fifty steps to bootstrap it if you don't yet have a rust compiler 10:42:08 so I hope someone will eventually make a gcc frontend that can compile rust 10:42:34 wob_jonas: GHC has a similar problem, I believe 10:42:42 Even though there are other Haskell implementations 10:43:46 because gcc can be bootstrapped much easier, in like six steps from any very old C compiler: first you compile an old version of gcc back when it was written in portable C and could be bootstrapped in two or three steps from any old C compiler but could already compile C++, then you bootstrap a modern gcc from that old gcc (you need this extra leve 10:43:46 l because gcc is written in C++ now) 10:44:07 Taneb: I see 10:46:36 -!- SopaXorzTaker has joined. 10:50:46 Taneb, yeah definitely 10:50:59 I don't think you can even bootstrap GHC HEAD on debian now 11:06:45 But to be fair, rustc is at least developped to easily do cross-compilation, so if someone adds a new target to it, they can bootstrap to that target from rustc running on existing well-supported targets. 11:07:08 mniip: what's stopping that? 11:07:25 iirc GHC HEAD wants something newer than 8.0 11:07:40 Although I suspect that you still need some of a libc ported to the target for it. 11:08:11 Oh, I misunderstood what you meant, mniip 11:08:20 -!- SopaXT has joined. 11:08:28 I was thinking bootstrapping in many steps from C 11:08:31 Also, the rustc devs themselves distribute working easy to install precompiled binaries of rustc. 11:09:13 So if you don't care about bootstrapping, you can just download the latest of those, and get a working compiler, or compile trunk with it. 11:09:28 -!- SopaXorzTaker has quit (Ping timeout: 256 seconds). 11:09:36 And you were thinking bootstrapping in one step from system packages 11:12:41 -!- AnotherTest has joined. 11:14:03 [[Frums]] N https://esolangs.org/w/index.php?oldid=56759 * A * (+1009) Created page with "Frums is a slightly modified version of [[Smurf]]. ==Syntax== " pushes the string, surrounded by " s and may contain newlines, " and \ escaped by \, onto the stack. "ok""\"..." 11:14:54 [[Frums]] https://esolangs.org/w/index.php?diff=56760&oldid=56759 * A * (+54) 11:15:01 [[Frums]] https://esolangs.org/w/index.php?diff=56761&oldid=56760 * A * (-1) 11:16:28 [[Frums]] https://esolangs.org/w/index.php?diff=56762&oldid=56761 * A * (-102) /* Syntax */ 11:17:33 -!- Phantom_Hoover has quit (Remote host closed the connection). 11:18:37 [[Frums]] https://esolangs.org/w/index.php?diff=56763&oldid=56762 * A * (+25) 11:18:51 [[Frums]] https://esolangs.org/w/index.php?diff=56764&oldid=56763 * A * (+0) 11:23:35 [[Frums]] https://esolangs.org/w/index.php?diff=56765&oldid=56764 * A * (-20) 11:29:56 [[Frums]] https://esolangs.org/w/index.php?diff=56766&oldid=56765 * A * (-155) 11:34:06 [[Frums]] https://esolangs.org/w/index.php?diff=56767&oldid=56766 * A * (-51) 11:34:15 [[Frums]] https://esolangs.org/w/index.php?diff=56768&oldid=56767 * A * (-11) 11:35:16 -!- tromp has quit (Remote host closed the connection). 11:41:57 [[Frums]] https://esolangs.org/w/index.php?diff=56769&oldid=56768 * A * (-107) 11:57:06 -!- S_Gautam has joined. 11:57:53 -!- SopaXT has quit (Quit: Leaving). 11:58:15 -!- tromp has joined. 12:00:05 -!- sebbu2 has quit (Read error: Connection reset by peer). 12:15:46 -!- sebbu has joined. 12:23:55 [[Frums]] https://esolangs.org/w/index.php?diff=56770&oldid=56769 * A * (-127) 12:29:11 [[Frums]] https://esolangs.org/w/index.php?diff=56771&oldid=56770 * A * (-45) 12:35:50 [[Frums]] https://esolangs.org/w/index.php?diff=56772&oldid=56771 * A * (-45) 12:39:13 [[Frums]] https://esolangs.org/w/index.php?diff=56773&oldid=56772 * A * (-15) 12:40:59 [[Frums]] https://esolangs.org/w/index.php?diff=56774&oldid=56773 * A * (+13) 12:49:56 [[Frums]] https://esolangs.org/w/index.php?diff=56775&oldid=56774 * A * (-42) 13:05:00 [[Frums]] https://esolangs.org/w/index.php?diff=56776&oldid=56775 * A * (-19) 13:05:04 -!- SopaXorzTaker has joined. 14:13:58 -!- MDude has quit (Remote host closed the connection). 14:19:47 -!- SopaXorzTaker has quit (Remote host closed the connection). 14:20:17 -!- SopaXorzTaker has joined. 14:46:10 [[Frums]] https://esolangs.org/w/index.php?diff=56777&oldid=56776 * A * (-33) 14:48:34 [[Frums]] https://esolangs.org/w/index.php?diff=56778&oldid=56777 * A * (+31) 14:56:54 [[Frums]] https://esolangs.org/w/index.php?diff=56779&oldid=56778 * A * (+22) 14:57:16 [[Frums]] https://esolangs.org/w/index.php?diff=56780&oldid=56779 * A * (-22) 15:07:23 -!- SopaXorzTaker has quit (Read error: Connection reset by peer). 15:08:53 -!- SopaXorzTaker has joined. 15:33:51 -!- AnotherTest has quit (Ping timeout: 240 seconds). 15:47:19 -!- wob_jonas has quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client). 16:42:32 -!- MDude has joined. 16:52:13 -!- mahdianderson11 has joined. 16:54:57 -!- mahdianderson11 has left. 17:01:56 -!- xa0 has quit (Ping timeout: 256 seconds). 17:07:52 -!- xa0 has joined. 17:19:11 -!- xa0 has quit (Ping timeout: 244 seconds). 17:24:51 -!- MDude has left ("Closing Window"). 17:26:42 -!- xa0 has joined. 17:28:50 -!- MDude has joined. 17:40:07 -!- Phantom_Hoover has joined. 17:56:16 -!- S_Gautam has quit (Quit: Connection closed for inactivity). 18:01:36 -!- mroman has joined. 18:01:46 Does anybody have some knowledge about how db storage engines work? 18:01:57 Let's say I have a db with rows of fixed size and I wanna update a row 18:02:05 I seek to the row's position, write the data, call fsync. 18:02:22 BUT: The server crashes in the middle of the OS trying to write the data to disk 18:02:34 so half of the row has been overwritten, the other half wasn't. 18:02:40 which means I have now a corrupt row. 18:02:47 so obviously that's not how it can work 18:03:53 one way of solving that (at least how some filesystems do it) is to have a journal 18:04:16 I actually don't overwrite the row but append a new row, then somehow mark the existing row as deprecated and the new row as visible 18:04:54 appending the new row fsync is fairly trivial 18:04:57 right 18:05:17 but how do you mark the other row as deprecated and the other row as visible? 18:05:18 how do you mark them? 18:05:23 exactly 18:05:26 no idea 18:05:37 if I mark the existing one as deprecated and then the server crashes 18:05:40 then the row is gone 18:05:46 so I have a corruption again 18:05:51 -!- wob_jonas has joined. 18:05:58 mroman: I can tell you how the atomic update is implemented 18:06:27 there are at least two ways to do it, neither always better than the other 18:07:01 -!- mroman_ has joined. 18:07:05 lost connection :( 18:07:06 but yes 18:07:10 I NEED TO KNOW HOW THIS WORKS 18:07:11 mroman: I can tell you how the atomic update is implemented 18:07:15 there are at least two ways to do it, neither always better than the other 18:07:19 [[This=That]] https://esolangs.org/w/index.php?diff=56781&oldid=56740 * Ais523 * (+723) /* Computational Class */ reformat 18:08:04 the simpler method is this: have a separate "transaction finished" bit and a "transaction file". the transaction finished bit is normally zero. when you want to do a write, which could update multiple rows in multiple tables in most DB engines, 18:08:32 [[Talk:This=That]] https://esolangs.org/w/index.php?diff=56782&oldid=56741 * Ais523 * (+485) /* This is Turing-complete? */ yes, it is 18:09:13 first record all the changes you will need to make to the main DB file, with addresses for where to make the changes, in the transaction file. then do a blocking fdatasync on the transaction file. (you'd technically only need a write barrier rather than an fdatasync, but there's no write barrier operation on disks because it wouldn't be possible to 18:09:13 implement them more efficiently than an fdatasync). 18:09:48 [[Talk:Multi-machine]] N https://esolangs.org/w/index.php?oldid=56783 * Ais523 * (+224) an idea for making this more objective 18:10:09 then change the transaction bit to one, then do an fdatasync on the transaction bit. the trick here is that since you're updating just one bit, even if the hard disk crashes while syncing that bit, you'll be able to read it back as either a one or a zero, and either one is correct. 18:10:13 (but fdatasync doesn't sync file size afaik so if you _append_ to a file you'd need fsync?) 18:10:24 -!- mroman has quit (Ping timeout: 252 seconds). 18:10:55 mroman_: maybe, I don't know. 18:11:04 then write the changes to the main database file, fdatasync that, then write zero to the transaction bit, and fdatasync that. 18:11:24 I think you can actually do this with just two fdatasyncs somehow instead of four, but I don't recall how. 18:12:08 and then the trick is, when you open the database, you check the transaction bit. normally it's zero. if it's nonzero, then you know that the program or the computer crashed during the operation of writing the changes back to the normal database file, 18:12:53 so you read the changes from the transaction file and write them back to the main database file (some of them might already been written, but that's not a problem), then fdatasync the main database file, then set the transaction finished bit to zero, then fdatasync that. 18:13:30 The second method goes the opposite way: instead of writing the changes to the transaction file, you write the old contents of the parts of the database file you change to the transaction file. 18:14:14 hm. clever. 18:14:16 In that case, if you find that the transaction bit was one when you open the database, then you assume writing back the transaction was in progress, and you roll back that transaction to its previous clean state by copying the previous state from the transaction file. 18:14:35 -!- fractal has quit (Ping timeout: 256 seconds). 18:15:33 There are also some optimizations you can do, such as adding pointers and writing the new row in a different place so that the actual transaction only consists of a change of a pointer in the file, but these usually aren't used by databases, they're used by filesystems instead. 18:15:58 Since some modern filesystems offer you to guarantee consistency if the computer crashes. 18:16:13 Old filesystems like FAT didn't use to bother with that, in those cases if the computer crashes, the filesystem can be in an inconsistent state. 18:16:48 -!- SopaXorzTaker has quit (Remote host closed the connection). 18:17:00 You can repair them to a consistent state with a scan, but that may involve data loss. 18:17:01 I wonder if it's even really possible to implement FAT in such a way you get consistency in the case of a crash. 18:17:14 -!- SopaXorzTaker has joined. 18:17:53 I'm going to guess the answer is "not unless the underlying storage has some suitable atomic primitive, which by the way it probably doesn't" 18:18:42 -!- wob_jonas has quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client). 18:20:22 -!- SopaXorzTaker has quit (Read error: Connection reset by peer). 18:21:48 -!- SopaXorzTaker has joined. 18:26:19 -!- wob_jonas has joined. 18:26:21 pikhq: I recommend reading https://sqlite.org/atomiccommit.html and https://sqlite.org/wal.html for how sqlite3 implements atomicity, it's more detailed and more correct than what I told you. 18:26:59 pikhq: it is possible, but only if you make sure you only use that implementation when you next open the file system. the transaction system is general enough that it can work on any file system, which is how ext2 was backwards-compatibly extended to ext3. 18:27:58 You could have a similar extension for FAT, but nobody cares enough about FAT to do it. FAT has bigger problems than this. 18:28:33 Note that despite its name, ext4 isn't backwards compatible with ext2 or ext3, it's a more modern and better file system, which can do more stuff because it breaks backwards compatibility completely. 18:30:04 <\oren\> Google chrome keeps crashing when I try to join a meeting on google meet 18:31:26 and I guess you do roughly the same things if fsync returns an error? 18:32:30 mroman: if fsync returns an error or if you run out of disk space, during the first part of this you can just rollback the transaction, during the second part of this you're screwed and you have to retry opening the database. 18:33:14 but if it's just running out of disk space, then the database can guarantee that that can never happen in the second phase. a disk hardware IO error (filing fsync) or running out of memory is always possible, but you just leave the state alone in those cases and hope for the best. 18:33:57 in general, if fsync gives you an error and this isn't a network file system, then you should be worried that your disk or motherboard has a hardware problem (or your OS has a bug), in which case your data might already be corrupt before you get the error 18:35:36 basically, you handle those errors just like you'd handle a crash of the computer. 18:38:03 mroman: I recommend reading https://sqlite.org/atomiccommit.html and https://sqlite.org/wal.html for how sqlite3 implements atomicity, it's more detailed and more correct than what I told you. 18:38:09 (was addressing the wrong person) 18:44:01 wob_jonas: Ah, right, of *course* you could just add journaling or similar to FAT. 18:44:29 And yes, I'm aware FAT has other problems. 18:44:43 It's a filesystem which is only interesting because it's so ubiquitously supported, after all. 18:45:16 Right, many digital cameras will only write photos on FAT, and similarly some mobile phones that take pictures. 18:45:37 -!- LKoen has joined. 18:45:52 And it's the only filesystem UEFI guarantees will be supported. 18:47:40 The problem with FAT that annoys me the most is that it's really hard to figure out a compatible extension to support mtimes past its unepoch in year 2107, because the windows extensions have consumed all bytes in the directory entry structure. 18:47:56 pikhq: ah right, I didn't even think of that 18:48:21 mind you, I use FAT as a boot partition for grub-legacy, but only for historical reasons, I could use ext2 the same way 18:50:02 It's a damned shame MS insists on patent fees for exFAT. 18:50:16 But nooo, gotta make it hard to kill off FAT forever. 18:51:12 also, grub-legacy is unmaintained, so I'll have to change away from it to a newer bootloader (such as grub2 or syslinux) the latest when I want it to read from a hard disk that's bigger than 3 terabytes 18:51:12 um 18:51:12 bigger than 2 terabytes 18:52:14 mind you, that's because the new partition table design is stupid, and doesn't support using it together with the legacy partition table, so on a hard disk larger than 2 terabytes, you can't have a legacy partition table at all, not even one that only identifies the partitions before the 2GB barrier 18:52:22 what's with these numbers in loader(8) and vgex(4) and all that 18:52:24 but there's not much I can do about that unless I want to write my own bootloader 18:52:42 syslog(3) syslogd(8) 18:53:39 and I think I have a choice between at least three bootloaders to switch to, so it won't be too bad 18:54:01 -!- wob_jonas has quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client). 18:54:02 I also have to wonder if it's even possible to implement exFAT without using the patents. 18:54:24 I mean, it's not easy to even tell, since the filesystem isn't officially documented anywhere. 18:54:39 -!- AnotherTest has joined. 18:55:34 If it is possible, I expect it'd be a massive project to find out. 18:55:40 (and MS would probably sue anyways) 18:55:56 -!- wob_jonas has joined. 18:55:58 mroman: the numbers are manpage categories. you can use the command man 2 write to display the write(2) manpage, and its *roff source is stored in a directory called write2. the parenthesis syntax is shown only in the formatted manpages. 18:56:23 mroman: the numeric categories have a conventional meaning, which is sometimes explained in the intro($number) manpage: 18:57:08 namely 1 is command-line programs, 2 is system calls, 3 is library functions (libc and other libraries), 8 is command-line programs that normally only a system administrators run, 18:57:16 I write software everyday and I have no clue about whether I'm violating a patent or not. 18:57:25 https://www.kernel.org/doc/man-pages/ gives the short version after each number 18:57:31 I don't know how anybody knows. 18:57:42 granted, not sure if there are even software patents in the EU 18:57:51 but I have no idea how devs in the US do this. 18:58:07 the categorization is really old, from ancient unix, it's still used basically because there are command-line programs with the same name as system calls or library functions 18:58:16 probably you just write and hope you don't get sued or at least if you get sued it doesn't cost you your personal finances 18:58:42 mroman: man man also explains this 18:59:07 there's also a few other nonstandard categories, including (3p) and (n) 18:59:19 (3p) is for perl modules IIRC 19:00:41 mroman_: Usually, you just either straight-up ignore it, or you just avoid patents that you know sue-happy companies will try to enforce. 19:01:38 yeah but how do you know patents even exist 19:01:39 like 19:01:50 you'd have to know each and every patent 19:02:58 I think you just hope that whatever book or article you read about whatever thing the patent covers mentions that there's a patent, or you notice because there are alternatives who specifically say they're created to avoid a patent. 19:05:01 In particular, the GIF format was patented but that patent expired, and before it expired there used to be a lot of webpages explaining why you shouldn't use GIF, then there's some other old compression format that was patented but I don't recall the details, and the MP3 sound format and some video formats are still patented. 19:05:01 So some MP3 encoders usually explain this in their documentation. 19:05:09 Honestly? It's kinda a minefield. 19:05:15 MP3, BTW, is no longer patented. 19:05:19 (expired) 19:06:02 -!- SopaXorzTaker has quit (Quit: Leaving). 19:06:16 Looks like MPEG-2 *just* expired? 19:06:19 But some patents are deliberately kept half-secret (as in, it's technically public but there are so many patents you won't find it unless you pay a patent lawyer), whose owner is waiting until he can sue some large fish. IIRC those were called submarine patent. 19:06:58 And of course ther are a lot of patents that should be invalid because there's prior art, but their owner hopes that people will pay up instead of paying for a lawyer to prove that the patent is invalid. 19:07:15 The two strategies can be combined. 19:07:48 pikhq: it is? doesn't matter much anymore, I think, because I recently bricked my old mobile phone which would only play MP3 and WAV. 19:09:44 Yeah, MP3 patents have finally expired. 19:09:51 good 19:09:53 Just in time to be kinda irrelevant! 19:10:01 yeah 19:10:24 but I think some video formats are still patented and used, although they also have free alternatives 19:10:37 Oh, absolutely. 19:10:46 H.264 is patented, H.265 is patented... 19:11:06 AV-1 is patented, just with royalty-free licensing... 19:11:25 what? isn't h264 a patent-free one? 19:11:37 Nope! 19:11:48 Oh, very very much no. 19:12:34 who owns the patent? Intel? 19:12:43 It's a fucking massive patent pool. 19:13:01 wait, I should be able to just look thisd up 19:13:09 Because it was designed in a process which encouraged like 50 different companies to submit everything they had a patent on to the design. 19:13:46 http://www.mpegla.com/main/programs/AVC/Documents/avc-att1.pdf This 115 page document is the list of patents MPEG-LA can license that they believe are applicable to H.264. 19:15:19 multiple owners sharing it 19:15:19 ok 19:16:56 It was intentionally designed to have as many patents as possible. 19:18:15 mroman_: you can search patents 19:18:23 mroman_: but the wisdom is that it's better *not* to 19:18:57 what else is still patented that I should know about? are some of the algorithms for solving the Rubik's cube patented? 19:18:59 because in the USA, knowingly infringing carries much stiffer penalties 19:19:08 Yep! 19:19:19 so it's better to just not look, and hope, than to look, think you're good, and lose the suit 19:19:49 Software patents are basically a tax on operation, collected by a bunch of rent-seeking bastards. 19:23:22 For the purpose of D&D 3.5 alignment, does it count as an Evil act to patent a file format or other protocol and then spread a lot of devices or software that use it? 19:24:06 Would a Paladin fall and lose their powers if they even knowingly worked for a company that does that? 19:24:14 Lawful Evil in particular, IMO. 19:25:28 Also, now I'm scared. Are there trained spies who watch me on the tram or metro and look at what method I use for the rubik's cube, ready to call the police if I use a patented method? 19:26:29 Or look at youtube videos of solving the rubik's cube, especially in high-ranked speedcubing competitions? 19:26:29 Was there yet a scandal when someone would win a speedcubing competition after buying a patent license? 19:27:54 Can I even do (M U' M2 U' M2 U' M U2 M2 U) to permute four last layer edges without infringing on a patent? That movement sequence seems short enough that anyone with a computer can discover it easily, so it probably can't be patented. But a whole method, some of those are creative enough that they could be patented. 19:28:24 -!- zseri has joined. 19:29:36 -!- imode has joined. 19:40:30 mroman_: those were good questions, do you have any more before I go to bed? 19:41:09 I mean, I can logread tomorrow, but still 19:41:55 So, I am finally pretty much set to make a 1.0.0 relese of my emoji language. But I am still a bit undecided on license. 19:42:35 Is there any reason not to use MIT? 19:42:50 no 19:43:03 Fogity: if you're asking about a copyright license of the interpreter, I don't know a perfect one, but as far as I can tell, the boost license would be the most sympathetic one except for one thing: 19:44:48 the license doesn't explicitly say that the copyright license rights it grants are worldwide and lasts forever (or as long as the copyright protection lasts), and the copyright law of Hungary says that those should be explicit or else they're interpreted narrowly. 19:45:28 So if you distribute something under the boost license, then IANAL but you could sue me if I distribute it for too many decades or distribute it outside of Hungary. 19:46:13 This sort of made sense back when copyright was used for books and television series and films, but not much for software. 19:46:38 It's not very likely that such an exploit would work though, so I still recommend the boost license for software. 19:46:57 It looks a lot like the MIT license to me, what is the difference? 19:48:10 Fogity: the difference is that it allows you to distribute compiled binaries without the license, but doesn't allow that for source code or other form. 19:48:37 Ah, I see. 19:49:06 Read the last three lines of the middle paragraph 19:50:31 -!- wob_jonas has quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client). 19:51:50 -!- wob_jonas has joined. 19:53:44 This exception was added because there are tons of free software licences similar to the MIT, all alike, so some bigger software packages have to include a long file that lists multiple such license, each applying to some code they used, and reproducing that in a final binary or installer would be inconvenient, 19:54:15 so with the boost license, you can at least omit that one from the binary (eg. the installer "I accept the license" dialog box) and reproduce it only in the source code. 19:54:59 And binaries often contain more licenses than source code packages because you distribute multiple libraries together in binary, but often distribute them in separate packages for source code 19:55:33 Now of course, for a toy esolang, it's likely that none of this matters and nobody will care about your license, but you asked about it. 19:56:09 Fogity: You could also ask ais523, he knows a bit more details about software licenses than me, but that might cause you to miss the deadline because he's rarely on irc. 19:58:06 Yeah, I appreciate the info. But as you say, it doesn't matter that much so I'll just add MIT as that is just some button clicks on gitlab. :P 19:58:29 ok 19:59:41 But I will consider it for any more useful project. And I can just change it later anyway, for this. 20:00:41 Right, but if you change the license, please keep the original license too as an alternative. 20:01:43 Well, there is always the git history 20:06:52 -!- zseri has quit (Quit: Leaving). 20:17:12 [[User:DMC]] M https://esolangs.org/w/index.php?diff=56784&oldid=56663 * DMC * (+78) 20:20:57 -!- imode has quit (Ping timeout: 240 seconds). 20:21:25 -!- XorSwap has joined. 20:30:04 -!- mroman_ has quit (Quit: Page closed). 20:36:18 -!- imode has joined. 20:44:07 -!- wob_jonas has quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client). 20:55:26 -!- erkin has joined. 21:06:25 Yay, I got the language out in time. Now I should probably make a wiki-page for it. 21:06:56 Anyway, here is the repo if anyone is curious: https://gitlab.com/fogity/squared-cool 21:12:40 [[Special:Log/newusers]] create * Fogity * New user account 21:20:17 [[Esolang:Introduce yourself]] https://esolangs.org/w/index.php?diff=56785&oldid=56704 * Fogity * (+197) /* Introductions */ 21:23:20 Should I use the proper name of the language (🆒) for the page title or should it be ascii characters? 21:27:57 Seems like non-ascii characters are fine. 22:12:08 -!- AnotherTest has quit (Ping timeout: 244 seconds). 22:17:02 [[Borsch]] M https://esolangs.org/w/index.php?diff=56786&oldid=54703 * Fogity * (+0) Fixed erroneous category name. 22:33:38 -!- oerjan has joined. 22:48:40 @metar ENVA 22:48:41 ENVA 172220Z VRB02KT CAVOK 19/16 Q1015 RMK WIND 670FT 18006KT 22:56:37 -!- puckipedia has changed nick to puck. 23:14:28 [[]] N https://esolangs.org/w/index.php?oldid=56787 * Fogity * (+3257) Created page with " is an [[esoteric programming language]] currently developed by [[User:Fogity]]. It is a fairly straight forward functional language with the caveat that the source code,..." 23:18:42 here's the seed of an idea for you all: how could a language be designed so that it forces the programmer to use concurrency? 23:19:24 obviously you could do that by just saying that every line runs at once or something, but could you do it in a way that the interpreter itself doesn't enforce? 23:24:59 -!- LKoen has quit (Quit: “It’s only logical. First you learn to talk, then you learn to think. Too bad it’s not the other way round.”). 23:31:05 -!- impomatic has quit (Ping timeout: 240 seconds). 23:31:36 [[Squared cool]] N https://esolangs.org/w/index.php?oldid=56788 * Fogity * (+18) This is the unicode name for the emoji and an alternate name for the language . 23:37:02 [[Language list]] M https://esolangs.org/w/index.php?diff=56789&oldid=56650 * Fogity * (+11) Added . 23:59:33 -!- Phantom_Hoover has quit (Read error: Connection reset by peer).