00:00:30 <oerjan> which might be a plot reason for them _not_ to do it - it would keep them seemingly infallible
00:02:53 <shachaf> They only used their shortest one so far, right?
00:04:27 <oerjan> ...i thought it was the longest? time to check.
00:08:11 <shachaf> http://www.giantitp.com/comics/oots0667.html and http://www.giantitp.com/comics/oots0897.html
00:08:16 <shachaf> So there's one short and one long one left.
00:27:12 <oerjan> thanks, i didn't find the first one
00:27:46 <oerjan> and naturally got drawn into archive binging...
00:30:47 -!- S_Gautam has joined.
00:41:22 <oerjan> that globe in the last girl genius appears to have atlantis
00:41:59 <shachaf> oerjan was drawin into archive binging so much that he's reading the wrong comic
00:42:21 <oerjan> and a strange red broken line
00:42:37 <oerjan> well, i got better and went back to my usual webcrawl
00:42:43 <oerjan> which is a bit delayed
00:43:26 <oerjan> so apparently gil never saw the one in mechanicsburg, i guess tarvek wasn't close enough
01:44:49 -!- deltab_ has changed nick to deltab.
01:58:04 -!- imode has quit (Ping timeout: 260 seconds).
03:17:16 <esowiki> [[This=That]] https://esolangs.org/w/index.php?diff=56739&oldid=31337 * A * (+251)
03:19:42 <esowiki> [[This=That]] https://esolangs.org/w/index.php?diff=56740&oldid=56739 * A * (+12) Oops! I did this wrong.
03:21:29 <esowiki> [[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 <esowiki> [[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 <esowiki> [[Multi-machine]] https://esolangs.org/w/index.php?diff=56743&oldid=56742 * A * (-9)
03:37:40 <esowiki> [[Multi-machine]] https://esolangs.org/w/index.php?diff=56744&oldid=56743 * A * (+224)
03:54:43 <esowiki> [[Truth-machine]] https://esolangs.org/w/index.php?diff=56745&oldid=56697 * A * (+92) /* Definer */
03:58:46 <esowiki> [[Truth-machine]] https://esolangs.org/w/index.php?diff=56746&oldid=56745 * A * (-3) /* Definer */
04:04:49 <mniip> 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 <esowiki> [[Definer]] https://esolangs.org/w/index.php?diff=56747&oldid=22105 * A * (+175) /* Examples */
04:10:22 <esowiki> [[Definer]] https://esolangs.org/w/index.php?diff=56748&oldid=56747 * A * (-12) /* Examples */
04:18:07 <esowiki> [[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:25 <mniip> I just compiled my first thing
07:31:19 <mniip> provided, it was very simple: main = main
07:43:21 -!- wob_jonas has joined.
07:48:14 <wob_jonas> can you also compile a hello world?
07:48:25 <wob_jonas> or do you have no IO in this thing?
07:48:32 <mniip> I'm currently inspecting the assembly for 'id' and (.) to see if it's correct
07:49:09 <mniip> then I'll implement compilation of constructors and pattern matches
07:49:16 <mniip> then probably let-bindings
07:49:36 <mniip> and I need to figure out what to do with non-trivial pattern bindings in lets or global scope
07:49:55 <wob_jonas> mniip: so you'll have algebraic types?
07:50:24 <wob_jonas> arbitrary algebraic types that you can define in simply typed, or just a few built-in ones?
07:50:35 <mniip> there isn't a typechecker yet btw
07:50:43 <Lymia> How much can I cheat
07:50:45 <wob_jonas> that just makes the typechecker harder, not the code generation
07:50:50 <mniip> there's a "data" declaration
07:50:57 <Lymia> By compiling a Haskell-like language to Rust. :D
07:51:10 <mniip> Lymia, not by much
07:51:39 <Lymia> It avoids all the low level nightmares like low level representation of ADTs.
07:54:05 <mniip> wob_jonas, oh and there's no GC yet lol
07:54:27 <Lymia> I suppose what I mean is
07:54:43 <wob_jonas> mniip: sure, you can add the GC later
07:54:51 <Lymia> 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 <mniip> Lymia, then write a lambda calculus interpreter in haskell
07:55:43 <wob_jonas> 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:56:07 <mniip> it's a chain of closures with increasingly more upvalues
07:56:37 <mniip> their entry code is very short though
07:56:53 <wob_jonas> wait, is this because you're doing a lazy interpreter?
07:58:38 <mniip> of course, call by name like I said
07:59:17 <wob_jonas> why? do you just want a mini-haskell interpreter?
07:59:21 -!- AnotherTest has joined.
08:00:36 <wob_jonas> ouch. but if that's what you want, sure, go on
08:03:25 <Lymia> How hard are thunks to implement anyway?
08:04:36 <Taneb> I imagine they're something that are easy to implement in a way that's subtly wrong
08:05:26 <wob_jonas> 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 <wob_jonas> especially the first one. in the second one they just misdirect Vaarsuvius
08:07:45 <mniip> gdb will rewrite f__g into f.g
08:09:50 <mniip> 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 <wob_jonas> mniip: that latter is probably because you didn't use the right calling conventino
08:13:01 <mniip> the code works fine
08:13:24 <mniip> it's just that gdb keeps telling things are different from what they are
08:14:11 <wob_jonas> do you write any debug info? maybe gdb doesn't know how many and what type of arguments your functions have.
08:16:35 <mniip> I run 'as' with -g and the rts C code is compiled with -g
08:17:31 <wob_jonas> 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 <mniip> wob_jonas, no like when I invoke a C function
08:18:13 <mniip> I put stuff into %rdi, %rsi, %rdx, %rcx, ...
08:18:33 <wob_jonas> and is that C function compiled with debugging info too?
08:18:36 <mniip> and the compiled C code looks for arguments in exactly those registers
08:18:49 <mniip> but for some reason gdb looks elsewhere
08:19:04 <wob_jonas> 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 <wob_jonas> anything from the last few years should be fine
08:19:31 <wob_jonas> unless it's Apple's releases of course
08:21:53 <wob_jonas> 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 <wob_jonas> 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 <wob_jonas> I guess you could try to ls that function, which should at least make sure that some debug info got through.
08:26:11 <wob_jonas> shachaf: the comment about what evil people want and that they're not one happy family
08:26:32 <wob_jonas> re "<shachaf> My faulty memory told me that it was the fiends who made the comment about the sides."
08:26:44 <shachaf> Oh, but I remembered the specific phrasing.
08:26:51 <shachaf> "they don't know about some of those yet"
08:26:56 <shachaf> So it was definitely faulty memory.
08:26:56 <wob_jonas> the fiends say they don't want either side among Redcloak's Team Evil and the OOTS to win
08:30:19 <mniip> ah er I just fixed a bug
08:32:01 <mniip> so. constructors and pattern matching
08:32:31 <wob_jonas> can you compile function calls and lambdas with upvalues (closures) yet?
08:33:28 <mniip> I mean it wouldn't be much of a challenge if I didn't implvement upvalue handling duh
08:47:42 <wob_jonas> mniip: sure, but you could implement handling algebraic types and pattern matching into local variables before you implement function calls
08:48:31 <wob_jonas> yes, local to the function you have, which is built out of constructors and general pattern matching including let
08:51:09 <wob_jonas> 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 <Taneb> mniip: you're making me want to try writing a compiler
09:11:34 <wob_jonas> 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 <mniip> okay so pattern matching is where local variables come in
09:22:08 <wob_jonas> mniip: yes. pattern matching binds values into local variables.
09:22:28 <wob_jonas> are you implementing general pattern matching, or just matching on a single level of constructor?
09:22:36 <mniip> general, shouldn't be an issue
09:22:38 <wob_jonas> I mean, general patterns which can be nested or even just a variable
09:22:50 <mniip> data Pat = VarPat IdName | JoinPat Pat Pat | HolePat | DataPat IdName [Pat] deriving Show
09:23:24 <wob_jonas> 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:54 <mniip> it's not like I'm writing an optimizing or fast compiler
09:24:22 <mniip> not planning to compete with GHC, rather wanted something with similar runtime asymptotics
09:26:44 <mniip> what I mean, "length" should be linear time no matter the constant
09:27:04 <mniip> 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 <Fogity> 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 <Fogity> input. Is there something important I am missing for a 1.0.0 version, do you think?
09:32:59 <shachaf> Zero-width joiners? Skin tone modifiers?
09:33:31 <wob_jonas> 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 <Fogity> 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 <Fogity> There are some key emoji that are used for language syntax, all other emoji may be used as function names.
09:45:48 <wob_jonas> Fogity: is there some way in which this will be better than the approximately five already existing emoji languages?
09:46:42 <Fogity> 1) it is functional, the others I have seen have been stack based or object oriented
09:47:26 <Fogity> 2) it is completely restricted to emoji, a pure emoji language per se
09:47:48 -!- SopaXorzTaker has joined.
09:49:16 -!- SopaXorzTaker has quit (Remote host closed the connection).
09:49:16 <wob_jonas> Fogity: you're right, none of the others seem to be functional. most of them are stack-based.
09:56:39 <Fogity> Hmm, what do you think is a good license for a project like this?
09:56:40 <esowiki> [[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 <esowiki> [[Tom7]] N https://esolangs.org/w/index.php?oldid=56751 * B jonas * (+28) Redirected page to [[Tom Murphy VII]]
09:57:19 <esowiki> [[Wikiplia]] https://esolangs.org/w/index.php?diff=56752&oldid=43289 * B jonas * (+44) identify creator
09:58:08 <esowiki> [[ABC (compiler)]] https://esolangs.org/w/index.php?diff=56753&oldid=53729 * B jonas * (+19) link creator
09:58:40 <esowiki> [[Wikiplia]] https://esolangs.org/w/index.php?diff=56754&oldid=56752 * B jonas * (-5) reclassify as a non-joke language
09:59:13 <esowiki> [[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 <esowiki> [[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 <esowiki> [[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:17 <esowiki> [[Incident]] https://esolangs.org/w/index.php?diff=56758&oldid=54404 * B jonas * (+24) /* See also */
10:28:19 <mniip> I did it wrong apparently
10:28:46 <mniip> evaluating 'g (f x)' would evaluate f
10:28:53 <mniip> which is not supposed to happen
10:29:17 <mniip> thankfully there's an easy fix
10:29:34 <mniip> it's supposed to create an 'f x' closure and feed that to g
10:29:38 <wob_jonas> but only up to its top-level constructor
10:29:53 <mniip> considering g is a function it's not going to have a constructor
10:30:39 <wob_jonas> it doesn't evaluate the upvalues or bound arguments of g
10:30:50 <wob_jonas> only evaluates which lambda in the source code it points to
10:31:20 <wob_jonas> yeah, that, everything is evaluated only up to its top level constructor when it's evaluated
10:32:12 <mniip> now I'm met with another problem
10:32:32 <mniip> it I have a JoinPat (VarPat "a") (DataPat "False" [])
10:32:41 <mniip> and I allocate a local variable for the 'a'
10:32:46 <mniip> and then the False match fails
10:32:53 <mniip> I have to deallocate the 'a'
10:33:21 <wob_jonas> what? you're already adding characters too? do you add numbers too?
10:34:09 <Taneb> wob_jonas: variable name
10:34:10 <mniip> 'a' is an identifier
10:34:20 <mniip> the JoinPat (VarPat "a") (DataPat "False" []) stands for something like
10:34:24 <mniip> case _ of a@False -> _
10:35:22 <wob_jonas> I was wondering on that, but JoinPat didn't make sense
10:36:14 <wob_jonas> those are called join patterns? I didn't know
10:36:40 <mniip> *Main> parse "foo = case _ of (a@False) -> _"
10:36:40 <mniip> Just [IdBndr (VarPat "foo") (Case (Id "_") [CaseBranch (JoinPat (VarPat "a") (DataPat "False" [])) (Id "_")])]
10:38:16 <wob_jonas> so that parses the contents of a module?
10:38:58 <wob_jonas> do you eventually want to make this be able to compile itself?
10:39:05 <mniip> I've had that idea
10:39:20 <mniip> but that might be complicated given the syntax of haskell
10:39:59 <wob_jonas> you'll have to restrict the compiler source code itself to a subset
10:40:22 <mniip> yeah but the 10 imports I have at the top
10:40:48 <wob_jonas> 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 <wob_jonas> 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 <wob_jonas> so I hope someone will eventually make a gcc frontend that can compile rust
10:42:34 <Taneb> wob_jonas: GHC has a similar problem, I believe
10:42:42 <Taneb> Even though there are other Haskell implementations
10:43:46 <wob_jonas> 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 <wob_jonas> l because gcc is written in C++ now)
10:46:36 -!- SopaXorzTaker has joined.
10:50:46 <mniip> Taneb, yeah definitely
10:50:59 <mniip> I don't think you can even bootstrap GHC HEAD on debian now
11:06:45 <wob_jonas> 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 <Taneb> mniip: what's stopping that?
11:07:25 <mniip> iirc GHC HEAD wants something newer than 8.0
11:07:40 <wob_jonas> Although I suspect that you still need some of a libc ported to the target for it.
11:08:11 <Taneb> Oh, I misunderstood what you meant, mniip
11:08:20 -!- SopaXT has joined.
11:08:28 <Taneb> I was thinking bootstrapping in many steps from C
11:08:31 <wob_jonas> Also, the rustc devs themselves distribute working easy to install precompiled binaries of rustc.
11:09:13 <wob_jonas> 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 <Taneb> And you were thinking bootstrapping in one step from system packages
11:12:41 -!- AnotherTest has joined.
11:14:03 <esowiki> [[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 <esowiki> [[Frums]] https://esolangs.org/w/index.php?diff=56760&oldid=56759 * A * (+54)
11:15:01 <esowiki> [[Frums]] https://esolangs.org/w/index.php?diff=56761&oldid=56760 * A * (-1)
11:16:28 <esowiki> [[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 <esowiki> [[Frums]] https://esolangs.org/w/index.php?diff=56763&oldid=56762 * A * (+25)
11:18:51 <esowiki> [[Frums]] https://esolangs.org/w/index.php?diff=56764&oldid=56763 * A * (+0)
11:23:35 <esowiki> [[Frums]] https://esolangs.org/w/index.php?diff=56765&oldid=56764 * A * (-20)
11:29:56 <esowiki> [[Frums]] https://esolangs.org/w/index.php?diff=56766&oldid=56765 * A * (-155)
11:34:06 <esowiki> [[Frums]] https://esolangs.org/w/index.php?diff=56767&oldid=56766 * A * (-51)
11:34:15 <esowiki> [[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 <esowiki> [[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 <esowiki> [[Frums]] https://esolangs.org/w/index.php?diff=56770&oldid=56769 * A * (-127)
12:29:11 <esowiki> [[Frums]] https://esolangs.org/w/index.php?diff=56771&oldid=56770 * A * (-45)
12:35:50 <esowiki> [[Frums]] https://esolangs.org/w/index.php?diff=56772&oldid=56771 * A * (-45)
12:39:13 <esowiki> [[Frums]] https://esolangs.org/w/index.php?diff=56773&oldid=56772 * A * (-15)
12:40:59 <esowiki> [[Frums]] https://esolangs.org/w/index.php?diff=56774&oldid=56773 * A * (+13)
12:49:56 <esowiki> [[Frums]] https://esolangs.org/w/index.php?diff=56775&oldid=56774 * A * (-42)
13:05:00 <esowiki> [[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 <esowiki> [[Frums]] https://esolangs.org/w/index.php?diff=56777&oldid=56776 * A * (-33)
14:48:34 <esowiki> [[Frums]] https://esolangs.org/w/index.php?diff=56778&oldid=56777 * A * (+31)
14:56:54 <esowiki> [[Frums]] https://esolangs.org/w/index.php?diff=56779&oldid=56778 * A * (+22)
14:57:16 <esowiki> [[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 <mroman> Does anybody have some knowledge about how db storage engines work?
18:01:57 <mroman> Let's say I have a db with rows of fixed size and I wanna update a row
18:02:05 <mroman> I seek to the row's position, write the data, call fsync.
18:02:22 <mroman> BUT: The server crashes in the middle of the OS trying to write the data to disk
18:02:34 <mroman> so half of the row has been overwritten, the other half wasn't.
18:02:40 <mroman> which means I have now a corrupt row.
18:02:47 <mroman> so obviously that's not how it can work
18:03:53 <Hooloovo0> one way of solving that (at least how some filesystems do it) is to have a journal
18:04:16 <mroman> 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 <mroman> appending the new row fsync is fairly trivial
18:05:17 <mroman> but how do you mark the other row as deprecated and the other row as visible?
18:05:37 <mroman> if I mark the existing one as deprecated and then the server crashes
18:05:46 <mroman> so I have a corruption again
18:05:51 -!- wob_jonas has joined.
18:05:58 <wob_jonas> mroman: I can tell you how the atomic update is implemented
18:06:27 <wob_jonas> there are at least two ways to do it, neither always better than the other
18:07:01 -!- mroman_ has joined.
18:07:10 <mroman_> I NEED TO KNOW HOW THIS WORKS
18:07:11 <wob_jonas> mroman: I can tell you how the atomic update is implemented
18:07:15 <wob_jonas> there are at least two ways to do it, neither always better than the other
18:07:19 <esowiki> [[This=That]] https://esolangs.org/w/index.php?diff=56781&oldid=56740 * Ais523 * (+723) /* Computational Class */ reformat
18:08:04 <wob_jonas> 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 <esowiki> [[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 <wob_jonas> 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 <wob_jonas> implement them more efficiently than an fdatasync).
18:09:48 <esowiki> [[Talk:Multi-machine]] N https://esolangs.org/w/index.php?oldid=56783 * Ais523 * (+224) an idea for making this more objective
18:10:09 <wob_jonas> 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 <mroman_> (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:11:04 <wob_jonas> then write the changes to the main database file, fdatasync that, then write zero to the transaction bit, and fdatasync that.
18:11:24 <wob_jonas> I think you can actually do this with just two fdatasyncs somehow instead of four, but I don't recall how.
18:12:08 <wob_jonas> 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 <wob_jonas> 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 <wob_jonas> 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:16 <wob_jonas> 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 <wob_jonas> 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 <wob_jonas> Since some modern filesystems offer you to guarantee consistency if the computer crashes.
18:16:13 <wob_jonas> 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 <wob_jonas> You can repair them to a consistent state with a scan, but that may involve data loss.
18:17:01 <pikhq> 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 <pikhq> 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 <wob_jonas> 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 <wob_jonas> 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 <wob_jonas> 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 <wob_jonas> 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 <mroman_> and I guess you do roughly the same things if fsync returns an error?
18:32:30 <wob_jonas> 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 <wob_jonas> 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 <wob_jonas> 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 <wob_jonas> basically, you handle those errors just like you'd handle a crash of the computer.
18:38:03 <wob_jonas> 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:44:01 <pikhq> wob_jonas: Ah, right, of *course* you could just add journaling or similar to FAT.
18:44:29 <pikhq> And yes, I'm aware FAT has other problems.
18:44:43 <pikhq> It's a filesystem which is only interesting because it's so ubiquitously supported, after all.
18:45:16 <wob_jonas> 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 <pikhq> And it's the only filesystem UEFI guarantees will be supported.
18:47:40 <wob_jonas> 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 <wob_jonas> pikhq: ah right, I didn't even think of that
18:48:21 <wob_jonas> 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 <pikhq> It's a damned shame MS insists on patent fees for exFAT.
18:50:16 <pikhq> But nooo, gotta make it hard to kill off FAT forever.
18:51:12 <wob_jonas> 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:52:14 <wob_jonas> 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 <mroman_> what's with these numbers in loader(8) and vgex(4) and all that
18:52:24 <wob_jonas> but there's not much I can do about that unless I want to write my own bootloader
18:53:39 <wob_jonas> 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 <pikhq> I also have to wonder if it's even possible to implement exFAT without using the patents.
18:54:24 <pikhq> 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 <pikhq> If it is possible, I expect it'd be a massive project to find out.
18:55:40 <pikhq> (and MS would probably sue anyways)
18:55:56 -!- wob_jonas has joined.
18:55:58 <wob_jonas> 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 <wob_jonas> mroman: the numeric categories have a conventional meaning, which is sometimes explained in the intro($number) manpage:
18:57:08 <wob_jonas> 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 <mroman_> I write software everyday and I have no clue about whether I'm violating a patent or not.
18:57:25 <wob_jonas> https://www.kernel.org/doc/man-pages/ gives the short version after each number
18:57:31 <mroman_> I don't know how anybody knows.
18:57:42 <mroman_> granted, not sure if there are even software patents in the EU
18:57:51 <mroman_> but I have no idea how devs in the US do this.
18:58:07 <wob_jonas> 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 <mroman_> 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 <wob_jonas> mroman: man man also explains this
18:59:07 <wob_jonas> there's also a few other nonstandard categories, including (3p) and (n)
19:00:41 <pikhq> 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 <mroman_> yeah but how do you know patents even exist
19:01:50 <mroman_> you'd have to know each and every patent
19:02:58 <wob_jonas> 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 <wob_jonas> 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 <wob_jonas> So some MP3 encoders usually explain this in their documentation.
19:05:09 <pikhq> Honestly? It's kinda a minefield.
19:05:15 <pikhq> MP3, BTW, is no longer patented.
19:06:02 -!- SopaXorzTaker has quit (Quit: Leaving).
19:06:16 <pikhq> Looks like MPEG-2 *just* expired?
19:06:19 <wob_jonas> 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 <wob_jonas> 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 <wob_jonas> The two strategies can be combined.
19:07:48 <wob_jonas> 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 <pikhq> Yeah, MP3 patents have finally expired.
19:09:53 <pikhq> Just in time to be kinda irrelevant!
19:10:24 <wob_jonas> but I think some video formats are still patented and used, although they also have free alternatives
19:10:46 <pikhq> H.264 is patented, H.265 is patented...
19:11:06 <pikhq> AV-1 is patented, just with royalty-free licensing...
19:11:25 <wob_jonas> what? isn't h264 a patent-free one?
19:11:48 <pikhq> Oh, very very much no.
19:12:43 <pikhq> It's a fucking massive patent pool.
19:13:01 <wob_jonas> wait, I should be able to just look thisd up
19:13:09 <pikhq> 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 <pikhq> 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:16:56 <pikhq> It was intentionally designed to have as many patents as possible.
19:18:15 <alercah> mroman_: you can search patents
19:18:23 <alercah> mroman_: but the wisdom is that it's better *not* to
19:18:57 <wob_jonas> 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 <alercah> because in the USA, knowingly infringing carries much stiffer penalties
19:19:19 <alercah> so it's better to just not look, and hope, than to look, think you're good, and lose the suit
19:19:49 <pikhq> Software patents are basically a tax on operation, collected by a bunch of rent-seeking bastards.
19:23:22 <wob_jonas> 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 <wob_jonas> Would a Paladin fall and lose their powers if they even knowingly worked for a company that does that?
19:24:14 <pikhq> Lawful Evil in particular, IMO.
19:25:28 <wob_jonas> 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 <wob_jonas> Or look at youtube videos of solving the rubik's cube, especially in high-ranked speedcubing competitions?
19:26:29 <wob_jonas> Was there yet a scandal when someone would win a speedcubing competition after buying a patent license?
19:27:54 <wob_jonas> 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 <wob_jonas> mroman_: those were good questions, do you have any more before I go to bed?
19:41:09 <wob_jonas> I mean, I can logread tomorrow, but still
19:41:55 <Fogity> 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 <Fogity> Is there any reason not to use MIT?
19:43:03 <wob_jonas> 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 <wob_jonas> 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 <wob_jonas> 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 <wob_jonas> 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 <wob_jonas> It's not very likely that such an exploit would work though, so I still recommend the boost license for software.
19:46:57 <Fogity> It looks a lot like the MIT license to me, what is the difference?
19:48:10 <wob_jonas> 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:49:06 <wob_jonas> 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 <wob_jonas> 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 <wob_jonas> 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 <wob_jonas> 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 <wob_jonas> 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 <wob_jonas> 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 <Fogity> 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:59:41 <Fogity> But I will consider it for any more useful project. And I can just change it later anyway, for this.
20:00:41 <wob_jonas> Right, but if you change the license, please keep the original license too as an alternative.
20:01:43 <Fogity> Well, there is always the git history
20:06:52 -!- zseri has quit (Quit: Leaving).
20:17:12 <esowiki> [[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 <Fogity> Yay, I got the language out in time. Now I should probably make a wiki-page for it.
21:06:56 <Fogity> Anyway, here is the repo if anyone is curious: https://gitlab.com/fogity/squared-cool
21:12:40 <esowiki> [[Special:Log/newusers]] create * Fogity * New user account
21:20:17 <esowiki> [[Esolang:Introduce yourself]] https://esolangs.org/w/index.php?diff=56785&oldid=56704 * Fogity * (+197) /* Introductions */
21:23:20 <Fogity> Should I use the proper name of the language (🆒) for the page title or should it be ascii characters?
21:27:57 <Fogity> Seems like non-ascii characters are fine.
22:12:08 -!- AnotherTest has quit (Ping timeout: 244 seconds).
22:17:02 <esowiki> [[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:41 <lambdabot> ENVA 172220Z VRB02KT CAVOK 19/16 Q1015 RMK WIND 670FT 18006KT
22:56:37 -!- puckipedia has changed nick to puck.
23:14:28 <esowiki> [[]] 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 <XorSwap> 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 <XorSwap> 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 <esowiki> [[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 <esowiki> [[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).