00:00:14 -!- oerjan has joined. 00:06:41 -!- zseri has joined. 00:11:10 -!- tromp has joined. 00:15:24 -!- erkin has quit (Remote host closed the connection). 00:15:28 -!- tromp has quit (Ping timeout: 245 seconds). 00:22:07 -!- sprocklem has joined. 00:29:49 @tell wob_jonas my condolences about the teeth. They can be real pain sometimes 00:29:49 Consider it noted. 00:32:17 -!- boily has joined. 00:32:56 https://esolangs.org/w/index.php?diff=57501&oldid=57500 => why I feel so sarcastic 00:36:58 -!- Phantom_Hoover has quit (Read error: Connection reset by peer). 00:38:52 -!- arseniiv has quit (Ping timeout: 246 seconds). 00:58:05 -!- tromp has joined. 01:02:08 -!- tromp has quit (Ping timeout: 245 seconds). 01:10:30 -!- icasdri has joined. 01:12:58 [[Underload]] https://esolangs.org/w/index.php?diff=57502&oldid=57499 * Oerjan * (-3) /* Underload minimization */ Golf more: aaa(!)(aa(!))(*a*:*^!*^):*^ -> aa(!)(a(!))(*a*:*^!a*^):*^ -> aa(!a)(!)a(*a*:*^!a*^):*^ -> a(!a)(!)(a*a*:*^!a*^):*^ 01:13:07 -!- S_Gautam has quit (Quit: Connection closed for inactivity). 01:15:18 -!- icasdri has quit (Remote host closed the connection). 01:20:46 @tell ais523 I golfed that more by looking at a trace of how it worked and adjusting so more a's could be done in the "shared" part. For a start, (K)_ = a(!) (K) *a*:*^!a*^ gives more sharing, then you can rearrange (!)(a(!)) to (!a)(!)a because they're contatenated, and then another pair of a's can be merged. 01:20:46 Consider it noted. 01:21:51 splengi :( 01:24:04 -!- sprocklem has quit (Ping timeout: 240 seconds). 01:27:38 bonsœøœøirjan. 01:27:43 @massages-loud 01:27:43 quintopia said 16d 6h 4m 50s ago: polygod comes out of beta tomorrow. they say multiplayer actually works now. 01:27:43 oerjan said 2d 10h 55m 14s ago: bood afternoily. that was certainly disturbing. 01:28:05 @tell quintopia QUINTHELLOPIA. oh yeah! 01:28:06 Consider it noted. 01:35:25 bood evenily. 01:51:39 -!- xkapastel has quit (Quit: Connection closed for inactivity). 01:52:39 [[D.U.C.K.]] N https://esolangs.org/w/index.php?oldid=57503 * HereToAnnoy * (+3025) Created page with "'''D.U.C.K.''' (which stands for D.U.C.K.'s Name Has Been Changed, But Not Yet (suggest a better one on the talk page (the acronym must be D.U.C.K.))) is an esoteric program..." 01:53:18 [[D.U.C.K.]] M https://esolangs.org/w/index.php?diff=57504&oldid=57503 * HereToAnnoy * (-86) nevermind, better idea 02:24:52 -!- zseri_ has joined. 02:28:23 -!- zseri has quit (Ping timeout: 245 seconds). 02:33:37 -!- tromp has joined. 02:37:47 -!- tromp has quit (Ping timeout: 240 seconds). 02:37:49 -!- boily has quit (Quit: HOUSE CHICKEN). 02:41:22 -!- sprocklem has joined. 02:48:40 What role playing system (other than Scientific Role Playing System) has no character definition points or levels or class or whatever and instead you can just make up nearly whatever kind of characters you like to do? 03:37:33 @messages 03:37:33 You don't have any messages 03:38:40 -!- zseri_ has quit (Quit: Leaving). 04:19:09 -!- tromp has joined. 04:23:34 -!- tromp has quit (Ping timeout: 240 seconds). 04:34:04 -!- sprocklem has quit (Ping timeout: 240 seconds). 05:12:40 -!- Sgeo_ has joined. 05:12:42 -!- tromp has joined. 05:14:24 -!- Sgeo has quit (Ping timeout: 244 seconds). 05:17:12 -!- tromp has quit (Ping timeout: 252 seconds). 05:20:55 -!- bradcomp has joined. 05:27:20 -!- S_Gautam has joined. 05:45:07 -!- bradcomp has quit (Ping timeout: 240 seconds). 06:09:37 -!- oerjan has quit (Quit: Nite). 06:51:15 -!- Sgeo_ has quit (Ping timeout: 252 seconds). 06:52:08 -!- TriangleSausage has joined. 06:52:56 -!- TriangleSausage has quit (Remote host closed the connection). 06:58:00 -!- tromp has joined. 07:00:48 -!- Sgeo has joined. 07:01:48 [[Pxem]] M https://esolangs.org/w/index.php?diff=57505&oldid=57484 * YamTokWae * (-130) /* Examples */ 07:02:07 -!- tromp has quit (Ping timeout: 246 seconds). 07:05:59 -!- XorSwap has joined. 07:12:56 -!- john_metcalf has quit (Ping timeout: 272 seconds). 07:35:26 -!- tromp has joined. 07:53:07 -!- imode has quit (Ping timeout: 240 seconds). 08:13:49 [[Special:Log/newusers]] create * Priyal * New user account 08:13:50 -!- tromp has quit (Remote host closed the connection). 08:14:35 -!- tromp has joined. 08:23:43 -!- LKoen has joined. 08:25:12 -!- tromp has quit (Remote host closed the connection). 08:33:20 [[Esolang:Introduce yourself]] M https://esolangs.org/w/index.php?diff=57506&oldid=57430 * Priyal * (+277) 08:34:01 [[User talk:Priyal]] N https://esolangs.org/w/index.php?oldid=57507 * Priyal * (+5) how are you 08:36:03 -!- S_Gautam has quit (Quit: Connection closed for inactivity). 08:48:30 -!- tromp has joined. 08:57:54 -!- LKoen has quit (Remote host closed the connection). 08:58:21 -!- LKoen has joined. 09:02:42 -!- LKoen has quit (Ping timeout: 252 seconds). 09:41:24 -!- moei has quit (Quit: Leaving...). 10:33:15 -!- moei has joined. 10:58:55 -!- LKoen has joined. 11:03:27 -!- LKoen has quit (Ping timeout: 240 seconds). 11:19:54 -!- tromp has quit (Remote host closed the connection). 11:20:29 -!- tromp has joined. 11:24:43 -!- tromp has quit (Ping timeout: 250 seconds). 11:28:29 -!- erdic has quit (Ping timeout: 252 seconds). 11:29:41 -!- erdic has joined. 11:35:37 [[Special:Log/newusers]] create * Orisphera * New user account 11:49:49 -!- SopaXorzTaker has joined. 11:53:06 -!- fungot has quit (Ping timeout: 252 seconds). 11:54:33 -!- Phantom_Hoover has joined. 11:58:26 -!- fungot has joined. 12:29:52 -!- arseniiv has joined. 12:43:12 -!- tromp has joined. 12:47:27 -!- tromp has quit (Ping timeout: 240 seconds). 12:54:24 -!- erkin has joined. 12:58:56 -!- LKoen has joined. 12:59:31 -!- LKoen has quit (Read error: Connection reset by peer). 12:59:53 -!- LKoen has joined. 13:04:22 -!- LKoen has quit (Ping timeout: 246 seconds). 13:07:02 -!- xkapastel has joined. 13:36:02 -!- tromp has joined. 13:40:27 -!- tromp has quit (Ping timeout: 252 seconds). 13:57:32 -!- LKoen has joined. 14:00:36 -!- ep100 has joined. 14:08:06 -!- x49F has joined. 14:17:04 -!- x49F has quit (Ping timeout: 240 seconds). 14:22:17 -!- tromp has joined. 14:22:46 -!- karstensrage24 has joined. 14:23:49 -!- karstensrage24 has quit (Remote host closed the connection). 14:26:37 -!- tromp has quit (Ping timeout: 246 seconds). 14:45:57 -!- int-e has quit (Ping timeout: 240 seconds). 14:46:20 hi eso 14:46:30 https://bootstrapping.miraheze.org/wiki/The_Semantics_Assignment_Problem do you want to see my blog post? 14:46:39 -!- int-e has joined. 15:22:48 hi all, do you know any language that allows some objects to implement different interfaces (or, say, have different APIs) at the different moments of its lifetime? It would have the same state (modulo RTTI), but the compiler (and runtime) would disallow casting it to currently unsupported interfaces 15:25:42 it could be useful for building complex structures and then freezing them, without a need either to copy all the built to a new object of a different type (with a restricted API) or checking freezeness manually in its code at any attempt to mutate its state when its frozen 15:26:42 also could this approach be transparently emulated in a language such as C# somehow 15:30:04 in a language with linear types, it could be easier I presume. Then we could abandon something old completely without fear it would be picked up and used by someone to poking the presumably-immutable-now data 15:31:08 also this approach would be nice for more complex DFAs 15:31:40 -!- Sgeo has quit (Read error: Connection reset by peer). 15:32:09 -!- Sgeo has joined. 15:34:36 maybe also anything on various Builder-alternatives in various langs is appreciated 15:43:37 -!- nfd9001 has quit (Ping timeout: 246 seconds). 15:54:39 -!- tromp has joined. 15:59:03 -!- tromp has quit (Ping timeout: 252 seconds). 16:02:11 -!- wob_jonas has joined. 16:06:22 -!- Keanu73 has joined. 16:06:46 -!- Keanu73 has changed nick to Guest56347. 16:06:59 -!- Guest56347 has quit (Remote host closed the connection). 16:07:13 arseniiv: sure, you can do that in several OO languages. 16:08:32 arseniiv: some ruby built-in classes like arrays or strings have a built-in freeze! method IIRC that just turns on a bit so if you later try to modify the contents of that container, it gives a runtime error. 16:09:42 ruby also lets you do all sorts of crazy runtime stuff that can break like anything if you do it carelessly, such as adding or removing or modifying methods of a class, or "adding methods to an object" (for all non-thin objects) 16:10:47 the latter actually works such that the first time you add a method to an object, it creates a custom class inheriting from the original class of that object, and changes the object in place so its class is this new class, except some queries will still lie that the old class is the class of that object 16:12:17 Perl just lets you directly change the class of any reference to any classname at runtime with the bless function, which is the primary interface to create objects that are members of classes, but normally you only use it once, soon after you create the object 16:12:24 -!- XorSwap has quit (Read error: Connection reset by peer). 16:12:46 this can be useful for some optimizations, like transparently changing the class of an object to a different class that implements the same interface 16:13:29 such as upgrading a class to a slower implementation on demand when necessary 16:14:01 perl also lets you just add or remove or modify methods of classes at runtime 16:15:26 or create new classes at runtime, but the difficulty with that is that the reference from an object to its class is always by name, so you can't use the normal reference counting mechanism to collect classes used that way, you have to arrange the class to get destroyed in some other way if you don't want to leak it 16:17:13 Smalltalk also has a primitive to swap the contents of two objects, which, if I understand correctly, is mostly used in practice to replace the low-level non-resizable array associated with the object (there's zero or one associated with every object and no other primitive way to replace it), to implement the built-in array and dictionary classes 16:18:02 I think that could be used to change the class of an object. 16:19:29 In C++ you can construct a new object in place of an old one, and if you make sure there's enough space, they can be of different classes, but there are some arcane rules for how you're allowed and forbidden to handle references or pointers to the object through that, so it's not something you often do without wrappers. 16:21:05 I think that unlike perl, ruby or python2/3 doesn't just let you arbitrarily replace the class of an object by a different class, because objects of different classes can have different internal representations. 16:22:18 But in ruby, with the add method to class (metaclass) mechanism, you can effectively change the class of the object to satisfy any reasonable interface. 16:22:52 (Certain interfaces are restricted, eg. only certain built-in thin objects behave as false in conditionals.) 16:23:34 -!- imode has joined. 16:25:28 In rust, you definitely can't change the type of an object, because references and pointers to it know the type. (That works like ancient pre-standard versions of C++, in which the virtual method table pointer wasn't stored with the object, but with references to it.) 16:26:08 You can only change the runtime behavior of an object directly by making functions operating on that object check some condition. 16:27:09 But with a level of indirection, you can effectively change the object: you can have a reference that can store at runtime a reference to any type satisfying some interface. 16:28:14 Modern haskell also lets you do that with indirection, it lets you have a cell that stores a reference to any type of object that satisfies some interface. 16:29:08 And "modern" is an overstatement, I think that was already possible a decade ago. 16:29:38 arseniiv: Is that a good enough answer? I don't know enoguh about golang. 16:29:38 -!- ep100 has quit (Ping timeout: 272 seconds). 16:30:25 I know golang has interfaces and types, but I don't know how they work. I also don't know enough about JVM or java, but I think some people here might. 16:31:23 wob_jonas: ruby also lets you do all sorts of crazy runtime stuff that can break like anything if you do it carelessly => yeah, that’s why I’ve got over a book on it a while ago. Python is saner 16:32:16 arseniiv: you must hate perl too then, it's similar 16:32:50 which python? python 2/3 or python 1 already? 16:33:39 . o O (Ruby, Perl, Smalltalk, C++ seems like an ominous sequence of language examples) 16:36:11 oh right, arseniiv is young, you might not have even met python 1. good. 16:36:22 wob_jonas: Is that a good enough answer? => IDK but it’s very comprehensive nonetheless; also it’s definitely useful on inderections 16:36:40 -!- boser7 has joined. 16:37:11 -!- boser7 has quit (Remote host closed the connection). 16:38:26 IIRC in Haskell it would be something like x :: (… a) => a, but it’s immutable though. And if Haskell had linear types, it would be useful in this context lot indeed 16:38:57 javascript/ecmascript would be a reasonable language to ask this about too, and you have to ask others in this channel for that too 16:39:36 wob_jonas: which python? python 2/3 or python 1 already? => 2/3 with the weight on 3 :D I could only imagine what a thing should Python 1 had been 16:40:14 I think HQ9++ doesn't let you change the class of existing objects, despite that it lets you create new classes at runtime. 16:40:29 (rofl) 16:41:07 There are OO versions of Intercal, with classes and lessons, but I don't know how they work 16:43:48 In JavaScript you can use Object.setPrototypeOf() to change the prototype of an object (any properties (methods are also properties) of an objects that you access but aren't on that object itself are looked in the prototype; if not there, in the prototype's prototype, etc) 16:44:25 zzo38: so it has the power of reblessing like perl. ok. 16:49:00 I don't recall who other than ais523 and zzo38 are familiar with OO intercal, and I don't recall who other than ais is familiar with JVM, but I think for the latter there was someone else in the channel. I don't know if anyone in the channel is familar with golang. 16:51:06 -!- tromp has joined. 16:51:28 -!- ais523 has joined. 16:52:22 @messages- 16:52:22 oerjan said 15h 31m 36s ago: I golfed that more by looking at a trace of how it worked and adjusting so more a's could be done in the "shared" part. For a start, (K)_ = a(!) (K) *a*:*^!a*^ gives 16:52:22 more sharing, then you can rearrange (!)(a(!)) to (!a)(!)a because they're contatenated, and then another pair of a's can be merged. 16:53:17 oh hi ais523 16:53:24 hi 16:53:32 are you in a better mood to tell me what's wrong with DBI yet? 16:53:37 arseniiv was just asking about some OO stuff so I ranted at him about some OO languages 16:54:35 -!- heroux has quit (Read error: Connection reset by peer). 16:54:35 -!- heroux_ has quit (Read error: Connection reset by peer). 16:54:42 ais523: firstly, I don't think I want an abstraction for every SQL DB out there, at least not as the most popular interface. usually I just want a perl interface that wraps the interface of one DB. 16:54:49 object oriented INTERCAL probably does silly things if you try to do "normal" OO programming with it 16:54:54 -!- XorSwap has joined. 16:55:05 -!- heroux has joined. 16:55:08 Claudio Calvelli is known for leaving minefields in his INTERCAL extensions that subtly screw up attempts to translate more normal code 16:55:32 ais523: secondly, bad default settings, the most annoying being the auto-reconnect being on, which has a huge potential to cause hard to debug bugs that appear rarely unless you override it. 16:55:40 -!- heroux_ has joined. 16:56:02 oh wow, that does sound bad 16:56:12 luckily my current plan is to read through all the settings and set the ones that could matter explicitly 16:56:30 (that said, an auto-reconnect feature may be just what I need at work at the moment…) 16:56:34 mind you, it's possible that auto-reconnect is the one bad thing that won't hurt as much with sqlite as with some other database connecting through the network 16:57:08 ais523: most databases have a sane interface in C that you can just easily wrap in perl to an interface that looks similar. 16:57:17 Having the interface for just one DB is good because different SQL implementations have different functions. 16:57:37 I think SQL would benefit from being standardised 16:58:06 (incidentally, the dynamic typing is my least favourite thing about SQLite, and I'm not 100% convinced that it works the same as static typing for the same programs, like they claim it does) 16:59:15 SQL is standardised, although most implementations do not implement the entire standard and also add their own stuff too 16:59:19 ais523: that's an understatement. string concatenation being done two or three different ways in SQL databases is horrible. 16:59:30 there is a standard but I wouldn't call it standardised 17:03:24 You could make a modified version of SQLite if you have to 17:04:15 I kind-of assume that database engines "should be" statically typed as it would help them make optimisations 17:04:16 The "+" operator does string catenation in MS SQL but not in SQLite. The "||" operator does string concatenation in SQLite and PostGre but doesn't exist in MS SQL and does logical ior in MySQL. 17:04:56 this actually came up in a hypothetical query a while back, I was wondering if SQLite could optimise it and the answer was "no, because it doesn't know that booleans are necessarily either true or false, so you have to put an IN (TRUE, FALSE) condition on the query explicitly" 17:05:40 ais523: schmorp said he doesn't use sqlite because of its dynamic typing, and says it's bad because it would take up too much storage overhead in some of the large databases he uses. 17:06:07 -!- tromp has quit (Remote host closed the connection). 17:06:14 yes, it inherently seems hard to optimise 17:07:00 So I accept that it's not a database engine you want to use for all your databases, but I still like SQLite, and there are applications when the dynamic typing with all its overhead doesn't matter much. 17:07:15 Applications when that overhead isn't a bottleneck. 17:08:21 There are applications where dynamic typing is helpful for some data, too 17:08:55 And schmorp is the guy who sometimes does crazy stuff to optimize something in pure perl when all the dynamic allocation and dynamic typing and stuff like that slows things down in perl, while at the same time he also knows the perl-C "interface" better than almost any programmer, and can write decent C code that would be at least as optimized just 17:08:55 fine. 17:09:24 It even rubbed a bit on me, I tried some perl optimizations, though of course they're nowhere nearly as crazy as his. 17:10:29 I personally think he underestimates the amount he could do the same sort of crazy optimizations when using sqlite, but whatever. 17:10:58 Maybe he really needs to handle such large databases and it's not worth for him to learn sqlite. 17:11:25 -!- SopaXorzTaker has quit (Remote host closed the connection). 17:11:32 Yes, there are other database systems and SQLite is not for everything. But SQLite is good for many things, I think. 17:14:00 wob_jonas: I think SQLite has plenty of potential for such optimisations but they'd probably go against its goals somewhat 17:16:49 What role playing system (other than Scientific Role Playing System) has no character definition points or levels or class or whatever and instead you can just make up nearly whatever kind of characters you like to do? ← the simplest role playing system I know is Roll to Dodge, although most players don't take it very seriously 17:17:05 ais523: yes. you use the tool for what it's good for, and work it around when it doesn't work well. just like I like to do with every software. 17:17:45 (I should try to install gimp 2.10.6 or something.) 17:17:56 basically, whenever you try to take an action, you roll a 6-sided dice, on a 5 it works perfectly, on a 4 it mostly works, on a 3 it partially works, on a 2 it doesn't work at all, on a 1 it does the opposite of what it was meant to, and on a 6 it works too well and produces an undesirable result despite technically doing what you said 17:18:05 ais523: can you answer arseniiv's original question for JVM? 17:18:27 it was something about objects and them changing what interface they satisfy. arseniiv, what is the question? 17:18:34 this system has huge balance issues as written because it doesn't take the difficulty of the action into account, but if you rule that "works perfectly" is still not good enough in the case of actions that should be impossible, it may be workabl 17:18:34 what was the question before I morphed it that is 17:18:35 *workable 17:18:43 wob_jonas: I missed the question 17:18:59 ais523: also, who on this channel other than you knows JVM? 17:19:01 however, from your vague description, I suspect the answer is no for Java and yes for Perl, as it would be for any question that's approximately like that 17:19:15 I don't know; there are probably others but we don't discuss Java much here 17:19:18 ais523: ok, but how about JVM? 17:19:43 ais523: Yes; I know that is no good; Scientific Role Playing System does have to do it with taking difficulty into account and so on, much more complicated than that, and more scientific. 17:19:56 on the JVM the classes and interfaces extended and implemented by any given object are fixed when it's created, and there's no way to subsequently change that using in-language and in-JVM APIs 17:20:32 ais523: and you can't replace objects in place, right? 17:20:39 apparently there's some sort of live update API that can change the definition of a class at runtime but I don't know how it works, and it may a) be proprietary or b) not exist yet 17:20:43 wob_jonas: indeed 17:20:49 ok 17:21:10 in theory you could attach a debugger to yourself, walk the heap to find all the inbound references to the object, and edit them all in place 17:21:16 but it'd be massively inefficient and pretty scary 17:21:26 oh, I've heard of people trying that in perl 17:21:28 (I know this subject pretty well as it'd be really useful for my day job if it were possible) 17:21:36 (without the debugger part) 17:21:43 but with the goal of debuggign 17:21:51 that is, finding where an object is referenced from 17:21:58 well, in Perl you can do things like casually replacing the main loop of the interpreter if you want to 17:22:01 so they walk the heap to find a name (or another name) for an object 17:22:04 while the program is running! 17:22:25 -!- tromp has joined. 17:22:39 oh, I guess I should also mention lua 17:22:58 hi all, do you know any language that allows some objects to implement different interfaces (or, say, have different APIs) at the different moments of its lifetime? It would have the same state (modulo RTTI), but the compiler (and runtime) would disallow casting it to currently unsupported interfaces 17:23:00 found it 17:23:58 and yes, Perl has low-level operations that can accomplish that, although the operations in question don't have the sort of safety checks you were looking for 17:24:07 you could probably implement them using higher-level operations 17:25:22 Rust is interesting in this respect as it always does run-time polymorphism via wrapper objects, and so you could create a new wrapper object to implement another interface if you wanted to, the object itself wouldn't know what interfaces it was meant to be implementing 17:26:21 lua also lets you rebless (change the class) an object at runtime arbitrarily, at least as much as you can have them have a class in first place (objects of some types like numbers and strings and light userdata have a fixed class depending on their low-level type; and full userdata can only be created or reblessed from the C API, not the normal lu 17:26:21 a function that lets you bless or rebless a table), 17:26:27 oh, JavaScript is another language where you can do this sort of thing, due to prototype-based inheritance (each object effectively acts as its own class so you can just start putting methods on it at runtime), although JavaScript doesn't have the concept of typed interfaces 17:26:56 the same general idea would work in Feather if it existed 17:27:34 there's just one limitation, namely that if you change certain attributes of an object that affect the garbage collector (namely the finalizer and the weak key and weak value bits) either by reblessing or changing a class, then that might not immediately take effect. 17:27:46 wob_jonas: also, HQ9++ doesn't let you create new classes at runtime 17:27:58 the ++ instruction is the equivalent of Java's «a += 2; new Object();» 17:28:24 presumably the objects in question are garbage collected immediately as you can't actually do anything with them 17:28:27 ais523: zzo38 already mentioned javascript and said the same, namely that it has a function for reblessing an object by changing its prototype to any object at runtime 17:29:16 ais523: no way. the docs for HQ9++ say "increments the accumulator twice, and also instantiates an object of a new subclass of the generic superclass" 17:29:27 oh, new subclass 17:29:39 how incredibly dynamic of it 17:29:58 you can't even implement that in Java without actually generating the bytecode for the new class at runtime :-D 17:30:10 ais523: yes, but you can implement it in ruby 17:30:14 I guess you could use Proxy 17:30:17 or in lua 17:30:33 but it'd probably reuse the classes it generated unless you tried hard not to 17:31:06 «a += 2; new Object() {};» is close to what HQ9++ is doing, except that Java will reuse the same anonymous class each time 17:32:37 or in javascript 17:35:48 have anyone heard of posits (a number format akin to floating point), WDYT? 17:36:03 I haven't heard of it 17:36:31 I have 17:40:56 arseniiv, what is the question? => actually I’m more interesting in sensible (less entities, less code) builder pattern replacements and in emulation of those former “interface-changes” in a lang that doesn’t support class changing, and in statical correctness overall 17:41:44 arseniiv: um, I don't relaly understand that... 17:41:49 the Moose library, which is a Perl OO library that's less low-level than its built-in OO primitives, has some sort of reblessing built in as an official thing that's supported 17:42:09 my brain ceased to listen to "sensible builder pattern replacements" 17:43:18 arseniiv: my current idea for what a sensible builder pattern looks like is to have typed partially constructed objects 17:43:38 like, they start off with some of the fields as write-only and they can gradually be changed to read-only as the object gets more defined 17:43:45 and the type reflects which fields are readable at the moment 17:44:43 this is something that's mindboggingly hard to do in most languages and yet would make builder-pattern code much cleaner (also things like StringBuilder, which I think isn't the builder pattern despite its name?) 17:47:16 ais523: nice 17:47:41 yeah StringBuilder doesn’t seem to be a builder in the concrete sense 17:48:06 it turns out that in most languages there are ways to get at partially constructed objects /anyway/, so may as well have sensible semantics for them 17:48:22 oh, that builder pattern. not the other one. I have used that. 17:48:51 not ais's idealized one, the plain builder pattern with an attributes object and a handle object and an open function that takes an attribute object and constructs a handle object 17:49:03 as in, I created such an interface 17:49:24 although I’d squash all that fine type information to one flag (writable/frozen?) maybe, as it seems too much complexity. If I’d build a compiler, that is :D 17:49:31 and in that case, the attribute object is just a plain struct with all fields having a default value. 17:49:43 and like twenty fields. 17:50:02 arseniiv: well the idea is to prevent fields being read before they've been written 17:50:08 arseniiv: if you just want one frozen flag, I already mentioned ruby has that 17:50:43 wob_jonas: isn’t it too much repetition? The same fields in the struct and the result 17:51:20 In JavaScript you can create objects that have any prototype, although they will not necessarily work, for example Object.create(Int16Array.prototype) creates an object, but if you try to access the "length" property of the created object it throws an error. 17:51:27 ais523: well the idea is to prevent fields being read before they've been written => ah, in this generality I agree it’s a useful thing 17:51:52 come to think of it, you can probably do something like this in OCaml 17:52:15 many languages have other special tricks to support building arrays with an appendable array that is then converted to a fixed size array. 17:53:02 although in OCaml it's more idiomatic to make a changed copy of an object than to mutate the original, and I don't think you can do this while mutating the original 17:53:13 python2/3 has appendable arrays called "list" and frozen arrays called "tuple" and a function "tuple" to cast that I think optimizes the case when the refcounter knows there's no other reference or something 17:53:46 rust has a trick for this with Vec and Box<[T]> 17:53:50 wob_jonas: if you just want one frozen flag, I already mentioned ruby has that => but it’s for intrinsic classes, no? And I could use an actual flag in my class, but it’s cumbersome to check it in any method which can mutate state; copying state is cumbersome too, and an immutable adapter is slightly cumbersome too, as one could possibly mutate its adaptee (no linear types!) 17:54:52 some people want to add the rust trick to C++ by adding a release method to the interface of std::vector so you can build a std::unique_ptr from it 17:54:53 wob_jonas: is Vec appendable? 17:55:52 I guess it must be, because [T] is the nonappendable version 17:55:57 ais523: yes, Vec is like C++ std::vector, appendable on the right, tracking the size and capacity separately, automatically growing in like powers of two (the exact pattern of growth is not guaranteed), you can pre-allocate to capacity if you know in advance or shrink later 17:56:39 many of the programming projects in C I start on end up stalling because I get sidetracked by trying to figure out the best way to do appendable arrays :-D 17:57:31 ais523: but unlike in C++, there's some strong guarantees on how Vec actually works, which fix everything except for the growth pattern and the actual memory representation of the Vec header, so you can deconstruct a Vec to a triplet of a pointer to the first element, size and capacity, and rebuild Vec from that, 17:58:14 and there's a method that converts a Vec to a Box<[]> that is in place if the capacity is equal to the size (otherwise it has to shrink first) 17:58:49 so Vec is the officially supported way to build a Box<[]> incrementally 17:58:50 hmm, now I'm curious as to whether Rust uses a memory allocator that has guaranteed shrink-in-place 17:59:43 and if you try to reinvented building a Box<[]> incrementally, you'll likely reinvent Vec, because during building you need to track how many members are initialized so you can deconstruct them if an exception is thrown 18:00:05 ais523: I don't think it guarantees shrink-in-place 18:00:47 ais523: in fact I think guaranteeing that would be bad, because it would make it hard to optimize handling small arrays in the allocator 18:00:51 yes 18:01:14 shrink-in-place is one of those things that sounds trivial, but ends up interfering with a number of optimisations 18:01:19 and small arrays are a common enoguh case in many programs that it's worth to optimize 18:02:02 it's even more of a problem for rust than with C malloc, because it has sized deallocate 18:02:39 SQLite documentation mentions using SQLite for internal data. Free Hero Mesh uses SQLite for some of its internal data (although not all), as well as for the user cache file, and also to allow the user to use SQL codes to extend the user interface at runtime. 18:02:41 you mean the deallocator has to be given the size explicitly, rather than tracking it internally? 18:02:42 wob_jonas: (if you’ve used Rust enough) how is Rust’s borrowing in practice? Is it hard to learn to not violate? I’m going to poke at Rust in the future 18:03:08 I like that, there seem to be two optimal ways to use an allocation system and that's one of them 18:03:19 (the other is to have the allocation system track the lengths of everything and provide an API to get at them) 18:03:38 (SQLite documentation does not mention using SQLite in this last way.) 18:03:56 ais523: yes, exactly 18:04:26 ais523: that works because currently every rust object knows its length, though recently they've added abstract objects that don't, but the allocator isn't geared for that 18:04:59 you'd think an abstract object would be responsible for deallocating itself, because there's no obvious reason why it would be using the same allocator as the rest of the code 18:05:55 arseniiv: I haven't used rust enough, but I really like rust's borrowing, it matches well with my style, and you can break the abstraction and manage pointers explicitly when it gets in the way, though you have to learn rust's rules for what's allowed and they're different from C's and C++'s rules 18:06:29 -!- Sgeo_ has joined. 18:07:33 ais523: sure, or more like, whoever owns the object is responsible for deallocating the object, so a pointer/reference to an object could point to something that was allocated in the box or on the stack or in a global static in the data segment or any other way, just like with a C or C++ pointer or reference 18:08:07 -!- Sgeo has quit (Ping timeout: 240 seconds). 18:08:12 ais523: but that's not the part that differs from an abstract object to a sized or dynamically sized object 18:09:08 ais523: the part that differs is that you can't move or copy an abstract object, at least not directly, because rust doesn't know its size at runtime and it's not even guaranteed that moving or copying wouldn't violate some abstraction 18:09:30 that makes sense 18:09:34 and I think they're not called abstract objects, I'm just stupid 18:09:43 opaque is a better name, but I'm not sure what the rust name is 18:09:52 this is kind-of like Lua light userdata, which it can't do anything with because it's just a pointer and it doesn't know any details about what it's pointing to 18:09:55 -!- XorSwap_ has joined. 18:10:04 -!- Sgeo__ has joined. 18:10:10 all you can do is pass it to user-defined functions which might know what sort of thing it's pointing to 18:11:19 traditionally rust had only Sized objects, whose size is known at compile time, and unsized object, whose size is known at runtime, and they can be an array or str or a trait object or an object with one of those as their trailing field (but this fourth one is barely supported) 18:11:26 s/array/slice/ 18:12:06 ais523: yes, but this is a compile-time thing the typechecker and all sorts of language semantics have to know about, which is why it's hard to introduce when so much of rust was built on the assumption that such objects don't exist 18:12:27 -!- Sgeo_ has quit (Ping timeout: 240 seconds). 18:12:48 ais523: it's hard to make sure that they can exist and that most of the operations that make sense on them still work but you can't do anything on them that doesn't make sense and not much backwards compatibility is broken 18:13:49 If it was only a runtime dynamic-only thing, then it wouldn't be hard to support, in fact rust already supports them through a pointer to the start of the object and pointer arithmetic and pointer casting 18:14:30 But we want them really integrated to the language, not just a hack like when you pass a char* to memcpy 18:14:50 Rust already allows the char* thing 18:16:45 But apparently they're settling on some solution, and not just the opaque object stuff, but some useful library types to wrap them, only I don't really understand how they work. 18:18:38 SQLite also has string building functions in the C interface, in case you need that. 18:19:00 zzo38: so do some other C libraries 18:19:32 Yes, probably there are some. There are probably also other C libraries with functions like SQLite's sqlite3_mprintf() function 18:21:58 so about typing for partially initialized types. Let T{s} be a type of values of a “flat” type T having initialization state s, T{s} would make up a lattice by <:, if we take values of s democratically: T{all} <: T{some partial state or more} <: T{none or more} 18:21:59 then let T be a class and its constructor returns T{none or more}, and we can’t feed this somewhere T{all} is needed, horay. Also in a simple code there seems no need to designate anything but T{all} and T{none…}, so they could be called as simple as T and T^ for example 18:24:04 a simplistic approach ^ 18:26:40 ais523: rust can sort of track at compile time which individual fields (recursively) of a structure or tuple are initialized (and also which ones are borrowed and which are borrowed exclusively), but it only really works within a function body, you can't define a function that takes or returns a partially constructed object with the partial constru 18:26:40 ction state known at compile time. 18:28:51 You can use an Option to track optional construction of a field at runtime with a flag, or you can tell rust that you're tracking whether a field is constructed in some way you can't prove to it and it should trust you. 18:29:23 ais523: so what you're saying about partly constructed objects is interesting, and I wonder if it's possible to make something like that work 18:29:50 this is the sort of thing you spend a year implementing as a research programmer, and then it never catches on :-D 18:30:05 it's almost certainly possible to make it work, but it might not be worth the effort 18:30:22 ais523: yeah, but rust is such a useful platform to advertise such a project, if you can make it compatible with rust 18:30:53 I was thinking about this more for languages that are more heavily OO than Rust 18:30:56 it might work with Rust too though 18:31:03 if you implement it in the rust compiler, and the semantics are sane and useful and it's backwards compatible, then it'll likely catch on 18:31:15 Unlike what you describe for Roll to Dodge, in Scientific Role Playing System it is possible for different characters to be different amount of good at different skills (and even certain cases of skills; there are no limits as to what cases you can define them to be). 18:31:28 but you have to track a moving rust as a target, during that one year parts you are touching can change 18:31:44 I listed the restrictions for defining a character at: http://zzo38computer.org/fossil/scirps.ui/wiki?name=Notes/Pointless 18:32:17 Do you like this? 18:35:38 zzo38: that reminds me of the more serious "who can name the biggest number" contests 18:37:12 zzo38: also if more than one player defines a character this way independetly, I'm not sure how you guarantee that you can't get a logical inconsistency from them meeting, or how you would mediate such a logical inconsistency 18:37:15 Yes, I suppose that is related, although it isn't really the same purpose. It isn't a contest to "win" at character definition. 18:37:26 I think there could be an “assertive” setting: we have a struct/class C, some fileds in there are of optional type and marked with something (or it’s a special marked optional type, hm) (these are mutable and initially initialized to Nothing), and make this class inherit a mixin IBuilding. Then the compiler adds another class with a name, say, C.Built, and adds to C an automatically implemented method returning C.Built and throwi 18:37:27 ng an exception if not all marked optional fields are non-Nothing. One runtime check and much joy 18:37:48 zzo38: like, if one character has a pistol whose bullet can break anyone's skull, and another character has a skull that is impervious to bullets 18:38:02 (you know, the cannonball and the wall) 18:38:08 wob_jonas: The first two restrictions are made to avoid such case. 18:38:14 a thing I don’t like here is a naming convention, it better be C.Unbuilt and C and not C and C.Built 18:38:47 that second auto-generated class would have non-optionals instead of marked optionals 18:39:19 zzo38: a skull that can't be broken by bullets doesn't make your character invincible (it can still have its skull broken by a club, or his heart broken by a bullet), 18:40:10 and a bullet that breaks any skull doesn't make the attack invincible (the target might not have a skull, or might be able to regenerate from a broken skull, or might have more than one brain and survive one getting destroyed, etc) 18:40:26 so I don't see how those first two restrictions are strong enough 18:41:06 Yes, probably there would be rules for that, such as you would roll the dice in the case (GURPS does something like that with Cosmic modifiers; if both the attack and the defense have them, then just use normal non-cosmic rules). 18:41:24 But you can make suggestions how to make it better if you think to change it. 18:41:49 -!- ais523 has quit (Quit: quit). 18:42:24 zzo38: I don't know. I have no idea how to make good role-playing systems, especially not ones that give you so much freedom. 18:46:09 -!- Phantom_Hoover has quit (Ping timeout: 252 seconds). 18:50:11 zzo38: description seems nice! But I’m not competent enough in RPG systems too 19:09:48 I also made up a rule for random durations. For effects with a minimum and maximum and is some number of dice, do not roll the dice until after the minimum duration has passed (e.g. if it is 2d+5 hours, then do not roll the dice until after 7 hours). If you have a deck of cards, you may also use cards for this purpose, which defer knowing the duration even later. 19:10:16 For effects without a minimum and maximum duration, you may determine the effect's "half life" and then periodically roll the dice to see if it is expired yet or not. 19:17:01 zzo38: you can roll once dice after 7 hours, then the second dice x-1 hours after that if x is the result of the first dice roll; or you can make it even more precise by rolling whether the duration has ended at every hour (or in general every possible moment when the duration could end) 19:17:26 Ah, yes, you can do that 19:19:18 but in general, each rule itself should specify which player gets what exact information at what moment, and there's a large spectrum there 19:20:38 -!- imode has quit (Ping timeout: 272 seconds). 19:25:16 -!- mal3 has joined. 19:29:55 -!- mal3 has quit (Remote host closed the connection). 19:35:01 -!- Typhon26 has joined. 19:37:28 wob_jonas: I had a dream in which Burlew accidentally released a whole buncha olists at once. 19:37:44 He had 50 comics in his backlog or something. And you claimed it didn't even exist! 19:38:35 -!- Typhon26 has quit (Remote host closed the connection). 19:41:44 shachaf: I had a dream when someone else built a sort of time machine, a computer and program that simulates enough of the universe and the Giant's and Knuth's mind to compute the contents of the rest of the OoTS strips and TAOCP books, or at least a sample of it from the universe conditioned on the publically known information, re-ran until it got 19:41:44 a sample with the post-condition that they get completed in a satisfying way before the author is unable or unwilling to continue. 19:43:21 shachaf: And then that sample was printed and bound in a book the real one would look like, except with a preface telling that it's not the real thing but computed from such a simulation, and these were sent to the Giant and Knuth to aid them in their completing the book; 19:44:20 except that this sending the book to the author itself was simulated and they took the book the author would produce then, a few dozen iterations deep, in the hope that it would converge to something better, and then that result was sent to the authors in the real world. 19:46:48 -!- xkapastel has quit (Quit: Connection closed for inactivity). 19:48:17 shachaf: This is computationally much harder in Knuth's case, because TAOCP will be full of references to future research, so the computer has to simulate a lot of that too, whereas the Giant could basically be locked in a basement with no communication with the outside world for thirty years and finish OoTS just fine; 19:49:41 but is much more useful in the case of Knuth, to work around the difficulty that he is 80 years old and his health might deteriorate too fast for him to finish TAOCP (receiving a news of Knuth's death is one of my worst nightmares, it sounds worse than a world war because civilization can be rebuilt faster than Knuth can be reborn). 19:50:07 I once got some volumes of TAOCP from inter library loans, although I do want to own copies of all of them 19:53:59 wob_jonas: So until just now I was sure that "giant in the playground" was a reference to an old children's story. 19:54:12 But I looked it up and apparently it's not related! 19:55:14 Moreover, the story's name in English is "The Selfish Giant", not "The Giant and His Garden" like in Hebrew. 19:55:18 It's by Oscar Wilde. 19:55:31 zzo38: I bought the e-book versions of volumes 1,2,3,4A now. I will buy volumes 4B,...,5 as each of them is published, and then the new edition of volumes 1,2,3 too. 19:56:12 I want the printed book both the version with MIX and with MMIX. 19:58:04 zzo38: for books 1,2,3, you can buy the MIX versions now and keep them if you want that. For books 4A...5, those will never exist. 19:58:22 (this ties into `quote Knuth ) 19:59:38 OK 20:01:12 wob_jonas: whoa whoa whoa 20:01:16 Wait, never mind. 20:01:47 But I recommend that you buy the third, third and second editions of volumes 1, 2, 3 resp, rather than the editions before that. 20:03:11 zzo38: the e-book version might be better than the printed version in that it has the existing Knuth-approved errata merged. 20:03:58 well, up to some point that might be more up to date than the print versions 20:04:27 I just wrote in the errata for Computers and Typesetting by myself by pencil, after finding what to write by computer. 20:04:53 zzo38: I see 20:05:57 zzo38: which volumes of Computers and Typesetting are those? 20:13:45 It is the full millennium set 20:17:08 -!- xkapastel has joined. 20:17:56 zzo38: nice. How much of TAOCP do you have? 20:18:34 And do you have Concrete Mathematics? I haven't bought any of Computers and Typesetting, and I only have the translation of Concrete Mathematics. 20:18:50 None; I only temporarily borrowed some volumes of TAOCP from library (they didn't have all of them). 20:19:02 I do not have Concrete Mathematics either. 20:19:54 I have the original copy of my errata http://math.bme.hu/~ambrus/sc/errata/concrete_errata on a sheet of paper with pen inserted in my Concrete Mathematics volume, and a few of the more distracting errors marked in pencil in situ, but I believe that almost all of those errors are only in the translation, not the original. 20:52:02 Is there compression format that can use arbitrary compression algorithms like ZPAQ can do but that is not also the archive format? (For archive format you can use other formats such as a tape archive or Hamster archive.) 20:53:10 -!- 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.”). 21:19:25 -!- bradcomp has joined. 21:20:07 what book in the world is the Knuthesquest one? 21:23:34 arseniiv: Possiblyi it's always the last completed one, so currently TAOCP vol 4A, and eventually it will be the ultimate edition of vol 3. 21:26:02 arseniiv: But it's possible that it's the ones that are final and will not change that are the Knuthesquest, which are currently probably vol 5 of Computers and Typesetting and the Stanford Graphbase and the MMIXware source code. 21:26:20 I'm unclear about the exact statements to which each of these are frozen. 21:40:02 a Knuthesque book is not always by Knuth himself, can there exist someone Knuther at least at some short intervals of time? 21:40:13 and write an article 21:42:35 I think the definition of MMIX was frozen long ago, but I don't know how much the MMIXware source code itself is. "https://www-cs-faculty.stanford.edu/~knuth/abcde.html" says that the TeX and METAFONT source code shall be frozen and "correct by definition" when Knuth dies, but it's possible that they are already in the final state except for the ve 21:42:35 rsion number. 21:43:48 It also says that at that time "their version numbers ultimately become $\pi$ and $e$, respectively" but I'm not sure what that implies for the startup message of tex and mf which show the version number. 21:45:13 Would the ultimate version after Knuth's death have to display all decimal digits of pi and e at startup? All until it's interrupted so from that point on you need an interrupt or some nonstandard mechanism to avoid an infinite loop every time you start tex or metafont, even before it starts reading its input file? 21:45:15 As var as I can tell it displays "$\pi$" and "$e$", from the change files I have seen 21:45:28 Rather than in decimal 21:45:29 I see. 21:46:51 Does the version number have any other effect on TeX and metafont core, like a builtin parameter/macro that tells the version number? 21:47:08 No, there aren't any such things. 21:47:36 TeX files are meant to continue to be compatible even if the file is very strange. 21:48:24 true 21:48:54 so the only change will be the startup message and possibly some other mentions of the version number in Computers and Typesetting 21:49:18 Yes, if Computers and Typesetting is even updated after that. 21:50:05 zzo38: if he's made patch files for the source code, he might also have patch files for the TeX source code of Computers and Typesetting that he's given to the publisher 21:50:31 Yes, maybe 21:50:47 or perhaps rather to someone else he trusts, because publisher are dumb 21:52:31 Yes, possibly 22:02:44 It is also possible that some of Knuth's less significant books are the final version. 22:10:03 -!- Phantom_Hoover has joined. 22:15:26 -!- sprocklem has joined. 22:32:54 -!- justyns has joined. 22:32:57 -!- Phantom__Hoover has joined. 22:36:36 -!- Phantom_Hoover has quit (Ping timeout: 252 seconds). 22:37:38 -!- justyns has quit (Remote host closed the connection). 22:38:27 -!- bradcomp has quit (Ping timeout: 240 seconds). 22:39:05 -!- tromp has quit (Remote host closed the connection). 22:48:31 Hmm, wait. Above I said "Possiblyi it's always the last completed one, so currently TAOCP vol 4A" but that's wrong, the most recently published work by Knuth is currently Fantasia Apocalyptica, with the first stable version officially released on his 80th birthday, definitely after TAOCP vol 4A. 22:48:45 So that's another candidate for the Knuthiest 22:49:09 arseniiv: ^ 22:49:56 does that count as a book? Knuth has published the sheet music, and if you printed all of it, it would form a book. 22:56:58 -!- Phantom___Hoover has joined. 22:58:42 wob_jonas: oh, a music? interesting 22:59:06 arseniiv: yes, Knuth's first nontrivial original music composition 22:59:06 (organ music probably?) 22:59:13 arseniiv: yes, organ music 22:59:25 nontrivial… now I’m curious 22:59:35 My guess too is organ music 23:00:03 -!- danieljabailey has quit (Quit: ZNC 1.6.5+deb2build2 - http://znc.in). 23:00:22 -!- danieljabailey has joined. 23:00:48 -!- Phantom__Hoover has quit (Ping timeout: 252 seconds). 23:01:17 arseniiv, zzo38: see my short summary at the top of https://commons.wikimedia.org/wiki/Category:Sheet_music_for_Fantasia_Apocalyptica if you want to know what Fantasia Apocaliptica is; it links to Knuth's webpage about it, which is longer 23:01:37 Hmm, that has a typo. 23:13:09 wow ~80 minutes 23:13:18 indeed seems Knuthesque 23:13:36 I’ll maybe take a hear at it tomorrow 23:13:56 -!- tromp has joined. 23:14:25 I don’t listen to organ music usually, but it should be assessed 23:14:52 wob_jonas: thank you as always 23:15:48 -!- Phantom___Hoover has quit (Read error: Connection reset by peer). 23:19:04 -!- tromp has quit (Ping timeout: 240 seconds). 23:30:22 Apparently they have ID3, although SoX just displays a warning message about it and ignores it (the music still plays, though). For chapter 1, instead it mentions a chunk with a strange name and 4239522857 bytes long. 23:41:27 -!- sprocklem has quit (Ping timeout: 240 seconds). 23:46:48 [[Special:Log/newusers]] create * Blacksilver * New user account 23:50:59 -!- Deewiant_ has joined. 23:51:21 -!- mynery has joined. 23:51:25 [[Esolang:Introduce yourself]] https://esolangs.org/w/index.php?diff=57508&oldid=57506 * Blacksilver * (+262) Hi, I'm Blacksilver! 23:52:28 -!- Blacksilver has joined. 23:53:08 o7 23:54:19 -!- Deewiant has quit (Ping timeout: 260 seconds). 23:54:19 -!- myname has quit (Ping timeout: 260 seconds). 23:54:26 -!- Blacksilver has quit (Changing host). 23:54:26 -!- Blacksilver has joined. 23:59:27 `welcome Blacksilver 23:59:29 Blacksilver: Welcome to the international hub for esoteric programming language design and deployment! For more information, check out our wiki: . (For the other kind of esoterica, try #esoteric on EFnet or DALnet.)