00:05:23 sorry, should've clarified what I meant by "commands". bot commands are fine. controlling the bot via PRIVMSG is.. not fine. 00:08:54 AIUI, it wasn't really a matter of controlling the bot through any sort of intended control commands, more tricking it into messaging things to NickServ. 00:09:23 mhm. if you can PRIVMSG anything, you can hijack it. 00:17:59 FireFly: sorry, you said you wanted to experiment with the bot later, but now you can't 00:25:11 -!- FreeFull has quit. 00:36:34 BT has this thing called "InLinkUK", it's like a digital advertising sign they've installed on sidewalks + free wifi access point + some sort of tablet you can use in kiosk mode for "information". Except it had crashed, and the advertising screen was saying "Ubuntu 15.04 adl-uk-002661 tty1" and "adl-uk-002661 login: _" 00:39:03 I like it when screens like this are showing things they shouldn't be showing. 00:48:51 me too 00:49:28 https://www.reddit.com/r/bayarea/comments/e4so9b/for_all_you_programmers_bart_at_least_the_station/ 00:49:40 the farecard readers on the new MUNI trains run embedded Windows 00:49:54 I saw one of them crashed to the desktop screen once, start menu and all 01:13:50 -!- 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.”). 02:04:56 [[User:DMC]] M https://esolangs.org/w/index.php?diff=67605&oldid=62538 * DMC * (+98) 02:05:13 [[User:DMC]] M https://esolangs.org/w/index.php?diff=67606&oldid=67605 * DMC * (-7) 02:06:20 -!- oerjan has joined. 02:10:54 oerjan: I found a loop <-- wait, it sees its own messages? i thought that didn't happen no matter who it sends to 02:11:56 You do if you send to yourself. 02:12:16 aha 02:12:22 `u 5 w 02:12:23 u? No such file or directory 02:12:29 Hmm. 02:12:31 `h 5 w 02:12:32 5 w 02:12:38 What was it? 02:12:39 shachaf: `t hth 02:12:52 `? t 02:12:53 t? ¯\(°​_o)/¯ 02:12:56 (i renamed it for keyboard pressing shortness) 02:12:57 What does that stand for? 02:12:57 `? u 02:12:58 u? ¯\(°​_o)/¯ 02:13:01 "top"? 02:13:02 "top" 02:13:13 Why is t shorter than u? 02:13:15 `t 5 w 02:13:18 1/2:necessity//If necessity did not exist, it would be necessary for Taneb to invent it. \ prooftechnique//prooftechnique né NihilistDandy: He was there some time ago. Maybe he'll come back. Maybe he's a nihilist, too. (Note from the Editor: He came back, and is a nihilist.) He is inevitably on a mathematical descent. \ double dactyl//Curious spurious juvenile poetry that is supposedly tricky to write, but its obsession with sesquipedal 02:13:20 `n 02:13:21 2/2:ity makes double dactyls quite gaudy and trite. \ cut elimination//The cut-elimination theorem states that any Prolog program written using the cut operator ! can be rewritten without using that operator. \ nvd//nvd is what Taneb calls himself when he wants to feel professional. 02:14:03 (of course my muscle memory for how to use ` pretty much means i don't make use of the simpler typing, but there you go) 02:14:16 Do you actually need `t for 5 w? 02:15:05 shachaf: it's shorter if ` is a dead key, because then `u = ù but `t isn't a special combination (at least on my keyboard) 02:15:47 ProofTechnique: hey you're here! 02:16:06 oh the note mentions 02:16:08 Helloerjan! 02:16:38 * oerjan ups the ante for duplicate responding by not even reading until the end of the line 02:16:39 oerjan: Aha. But deadkeys are scow. 02:16:48 IMO, with a compose key, compose-`-? should compose ` onto absolutely anything, using a COMBINING GRAVE ACCENT. But it doesn't, here. 02:17:09 fizzie: Can Compose enter multiple code points? 02:17:30 fizzie: i don't think so 02:18:11 I don't really know. Though I can type a t̀ by starting with a t, then holding down ctrl-shift and typing 0300. But that's the urxvt code point entry feature. 02:18:38 `5 echo hi 02:18:39 1/1:hi \ hi \ hi \ hi \ hi 02:18:58 hum i guess that proves nothing 02:18:59 `` 5 'echo ho' # it's christmas 02:19:01 1/1:ho \ ho \ ho \ ho \ ho 02:19:03 `t t 5 t w 02:19:06 1/1:bleen//Bleen is the color of the ocean and the trees. \ i//I SIGNIFICAT NVMERVM VNVM \ burma//Burma: Ask Bike \ nth//nth is not that helpful \ nooooodle//Noooooodles are the invention of the Chinese. They were brought to Europe by Marco Polo, a distant ancestor of Taneb. 02:19:53 Bike is not here though. at least by that nick. 02:20:52 Where did I see a Burma-Shave thing recently? Maybe a random xkcd. 02:21:21 There's one in https://xkcd.com/491 but I think it was something else instead maybe. 02:25:58 I wonder if anyone's ever done a whale-themed cover of Jolene. 02:32:17 Jooooowoooowwooooowwooo... 02:39:48 ProofTechnique: feel free to implement the obvious /hackenv/bin/whale command hth 02:40:19 * oerjan won't due to a sudden attack of good taste 02:40:35 That's a first 02:40:41 The question "Are you whales from Scotland?" pops into your mind for no discernably reason. 02:42:39 * oerjan googles and learns new horrible joke, balancing out his good taste 02:43:02 happy to share 02:46:23 The good thing about terrible jokes is that they're easy to remember ;) 03:00:25 =list 03:00:33 oh it's gone 03:01:08 * oerjan saw b_jonas misspell one of his awkwardly named commands and wanted to check if the misspelled version existed 03:02:12 because if not, i think there was another "fascinating effect" involved in bfbot's response to that 03:03:36 oh there was a logic to the naming 03:11:37 -!- tromp has joined. 03:15:59 -!- tromp has quit (Ping timeout: 246 seconds). 03:29:40 [[IBC]] https://esolangs.org/w/index.php?diff=67607&oldid=67112 * Quadril-Is * (+99) 03:45:06 -!- imode has joined. 04:02:19 Is this too evil? <-- really really bad judgement at the very least. 04:05:27 and a horrible precedent for this channel. 04:06:18 -!- tromp has joined. 04:06:48 and don't ask me if it's even legal. 04:10:53 -!- tromp has quit (Ping timeout: 276 seconds). 04:10:58 admittedly the bot probably needs to be kept off until fixed. 04:12:26 b_jonas: you could have phrased that a lot less confrontational, though. 04:12:32 If you do not try to register it, I do not have a problem with it since if they want to register it themself then they can do so and use NS GHOST to force a disconnect 04:12:50 zzo38: except that's exactly what he did 04:13:30 Yes, but I think that isn't what should be done. Instead just use a persistent connection, I think, is better 04:14:20 zzo38: i am confused what problem you are thinking that solves 04:14:47 the problem is that bfbot was online, completely abusable, and its owner wasn't. 04:15:35 and b_jonas used its abusability to get it disconnected. 04:15:57 by a method which required him registering it. i'm not sure whether another would have worked. 04:16:11 Would it work to only temporarily register it? 04:16:18 If so, then that is what should be done. 04:16:47 oh he also set nick protection to prevent it from reconnecting, i think. 04:17:27 which is the thing that cannot be done temporarily, i guess. 04:18:18 If it automatically reconnects, that isn't your fault. If it tries to rejoin the channel, then you can add a ban and then remove it later. If it does a wrong thing by a private message, filter them out on your client. Other than that, I think just leave it. 04:19:02 zzo38: the thing is that it was so abusable that a person could use it against a third party 04:19:23 That isn't up to you, though. Just let it; the third party can filter it out themself if they do not want it. 04:19:57 But if you are really concerned, I suppose notify the server operator they can decide whether or not to do anything about it. 04:19:58 also, it was on #esoteric-blah which has no ops 04:20:15 If it is a channel with no ops then just it be on there. 04:20:22 (well, it has staff so we could ask FireFly i guess) 04:21:40 oh wait it's freenode-staff which isn't the same thing. 04:22:34 (just a dummy account to hold channels i think) 04:24:34 I think you should not interfere other people's channel if it can be use on a channel that has no ops then it should just let be on there, and if you do not want to receive their messages then you can filter in the client side. If it causes problems with the server, then the server operator should learn about it in order to remove it. 04:24:55 @tell kspalaiologos I see b_jonas may have gone a bit too far to quit your bot. it was _really_ unsecure though (which is how he could). 04:24:55 Consider it noted. 04:25:59 trying some de-escalation 04:30:49 If they do not want any channel operators then should not have any; unfortunately Freenode doesn't have the channel with + prefix to indicate this explicitly. They should, in order that it can easily be indicated if you want + or # 04:59:10 -!- tromp has joined. 05:00:25 -!- tromp_ has joined. 05:03:26 -!- tromp has quit (Ping timeout: 246 seconds). 05:04:50 -!- tromp_ has quit (Ping timeout: 246 seconds). 05:09:58 -!- Lord_of_Life_ has joined. 05:11:59 -!- Lord_of_Life has quit (Ping timeout: 276 seconds). 05:11:59 -!- Lord_of_Life_ has changed nick to Lord_of_Life. 05:25:27 I think is strange that the /proc/*/fd/* pretend to be symlinks but don't really work like symlinks. It seem like it would be like a "special link" instead? 05:27:55 in what way don't they act like symlinks? 05:28:27 I think they can refer to deleted files and to anonymous stuff, and symlinks can't 05:28:32 is it because they may refer to anonymous things? 05:28:33 right 05:29:10 keegan@localhost:~$ ls -l /proc/self/fd | grep pipe 05:29:10 l-wx------ 1 keegan keegan 64 Dec 2 21:29 1 -> pipe:[6737388] 05:29:15 wonder what that number means 05:29:17 Can you distinguish between a deleted file and a link to a file ending in ' (deleted)'? 05:29:24 lolol 05:29:32 you mean without a race condition? 05:29:40 I mean at all, I think? 05:30:03 well you could try to readlink then open 05:30:04 If you have a program that opens /foo, and you delete foo, /proc/pid/fd/n will be a link to '/foo (deleted)' 05:30:10 but I guess you may have both files 05:30:17 both '/foo' and '/foo (deleted)' 05:30:23 But how can you tell whether a program just opened a file with that name? 05:30:35 Ugh, I hate how much of UNIX is stringly typed. 05:30:42 The whole /proc thing is a mess. 05:30:57 does stat /proc/$PID/fd/$N tell you anything useful? 05:30:57 yes 05:31:05 /proc isn't even UNIX 05:31:19 it's a linux thing intended for quick hacks in kernel development that just grew and grew 05:31:20 Well, that's fair. 05:31:25 How did ps work back in the day? 05:31:32 BSD also has /proc but there's not like a standard for what's in these things 05:31:40 i think it even has a linux-emulating procfs as well 05:31:48 There isn't a POSIX-style standard, but that's not what I care about. 05:31:50 i think by parsing /dev/mem 05:31:52 really. 05:32:03 and so ps was setuid 05:32:26 The annoying thing is that even if I port my program specifically to Linux, I have this terrible ABI. 05:32:41 The system call ABI is pretty good. Things like ioctls are OK? And /proc is a mess. 05:32:46 There are problems with /proc, although I think it is because they treat the files in it as files and symlinks and so on even though it isn't like that. Add a new type for "special entries" and then you can avoid such problem. 05:32:59 And that's not to mention the userspace ABI, which involves parsing things like /etc/passwd and /etc/resolv.conf which are sort of specified. 05:33:16 ioctls are not okay 05:33:34 ioctls are like syscalls only with minimal oversight on whether they are at all well-designed 05:34:05 Sure, but at least they have an ABI at all, generally. 05:34:20 Instead of parsing text which was mostly meant for debugging. 05:34:44 kmc: Do you like io_uring? 05:36:14 -!- tromp has joined. 05:36:38 what's that 05:36:46 I don't see anything different from stat. 05:37:05 Maybe you can open the file and fstat it and compare the inodes or something. 05:37:20 It's the new Linux asynchronous I/O API. 05:37:28 and maybe asynchronous everything API?? 05:37:32 ok 05:37:33 fun 05:37:38 https://lwn.net/Articles/776703/ 05:37:59 You have a request and response ring buffer, and you send the kernel requests and get responses. 05:38:21 If you can send it requests fast enough, you might never have transitions to ring 0 at all. 05:38:35 You write to your buffer in your thread and it reads in its thread on another core. 05:40:36 -!- tromp has quit (Ping timeout: 240 seconds). 05:44:53 yeah 05:45:02 but you can also call into the kernel to block on it? 05:45:19 this is how high performance network drivers have worked forever 05:45:33 if you're doing low latency infiniband or something on linux then you don't go through the kernel at all 05:45:42 you write into a ring buffer in the card's address space 05:46:29 You can also call into the kernel, yep. 05:46:52 This is the reasonable way for things to work, obviously. 05:55:14 -!- Frater_EST has joined. 06:08:29 -!- imode has quit (Ping timeout: 265 seconds). 06:48:17 -!- Frater_EST has quit (Read error: Connection reset by peer). 06:50:35 -!- Frater_EST has joined. 06:56:20 -!- Frater_EST has quit (Read error: Connection reset by peer). 06:56:59 -!- Frater_EST has joined. 07:05:20 [[Talk:Initialization]] https://esolangs.org/w/index.php?diff=67608&oldid=67603 * Zzo38 * (+372) 07:08:10 [[Deadfish]] https://esolangs.org/w/index.php?diff=67609&oldid=67382 * Zzo38 * (+220) It is the old version of TeXnicard; make clear that it is different from the new version. 07:18:38 -!- tromp has joined. 07:34:42 -!- Frater_EST has quit (Remote host closed the connection). 07:39:28 why does c++ have copy constructors given that copy constructors are scow 07:40:25 is there any use of the std::vector copy constructor that isn't a mistake, anyway 07:40:38 -!- tromp has quit (Remote host closed the connection). 07:49:57 -!- Vorpal has quit (Ping timeout: 240 seconds). 07:50:46 -!- Vorpal has joined. 07:50:46 -!- Vorpal has quit (Changing host). 07:50:46 -!- Vorpal has joined. 07:52:14 -!- tromp has joined. 07:53:42 -!- tromp_ has joined. 07:54:34 shachaf: historical reasons 07:54:55 the language was designed around value types / unboxed objects / whatever you want to call them 07:55:10 but they hadn't worked out that move semantics are the way to make that work nicely 07:55:42 moves + an explicit clone() method seems much nicer to me 07:55:50 though this depends on a certain return-value optimization 07:55:57 but everything in C++ depends on optimization for good performance 07:56:47 there are probably some cases where the copy constructor performs better 07:56:52 at least, i think there are some cases for operator= 07:57:00 which is a closely related concept 07:57:05 -!- tromp has quit (Ping timeout: 276 seconds). 07:57:15 but operator= has an old object to (partially) dispose of, and Foo(const Foo&) doesn't 07:57:39 all this is setting aside the question of whether overloadable *move* constructors are also a mistake 07:57:48 which I think is much more debatable 07:58:05 Man, everything about the STL is scow. 07:58:12 -!- tromp_ has quit (Ping timeout: 268 seconds). 07:58:16 Every time I try to understand what's going on there I'm miserable. 07:58:46 Rust has no operator= overloading, if you assign into a variable whose type has a destructor, then the whole thing is destroyed before the new value is moved in 07:58:47 And the specification requires things to be low-performance. And the implemetations aren't predictable or fast. 07:58:52 which is plausibly less efficient in some cases, I guess 07:59:05 but I'm not sure how often anyone writes an operator= which does such things 07:59:33 That sounds pretty plausible. Maybe an even more plausible thing would be to do away with destructors entirely. 08:00:00 then how will I have RAII? 08:00:05 RAII is tg 08:00:18 is it actually 08:00:36 yes 08:00:50 `? raii 08:00:52 RAII means you deallocate in the destructor. There is no 'initializer' involved. 08:01:08 that is a profoundly useless definition 08:01:25 RAII means you have destructors, I think? 08:01:25 `dowg raii 08:01:27 10903:2017-05-18 slwd raii//s,allocate in the constructor and ,, \ 5854:2015-07-21 learn RAII means you allocate in the constructor and deallocate in the destructor. There is no \'initializer\' involved. \ 5853:2015-07-21 le/rn RAII/RAII is Resource Allocation in the constructor... wait wait uh... Is uh, Initialization 08:03:30 I think the important *concept* is that resources of all sorts can be modeled by objects in the language, in such a way that having a value of that object type guarantees that the resource is available with a certain set of operations on it 08:04:27 basically the idea that constructors and destructors make sense to manage not just memory but stuff like open files, mutex acquisitions, etc 08:04:39 and this is a good fit for affine types because of course a lot of non-memory resources cannot be copied arbitrarily 08:04:50 as well as a lot of memory-related resources such as uniquely-owned objects 08:05:20 But constructors aren't the important part, it's destructors. A constructor is just a function that returns a value, but destructors have special language support. 08:05:25 right 08:05:41 in C++ there are some other reasons to have constructors as a language feature 08:05:45 but Rust doesn't need them 08:06:05 But also is this actually a good idea? 08:06:12 A mutex is pretty different from memory. 08:06:27 And RAII isn't even particularly good at managing memory, I think? 08:06:27 *shrug*, it makes for a very convenient and safe API 08:06:49 In particular RAII helps you write a program with zillions of balanced mallocs and frees. 08:07:03 But I'm not sure that's a particularly good way to write a program? 08:07:49 If you do something like arena allocation, then destructors don't even make that much sense. You don't want to loop over the arena and run all the destructors of all the objects. 08:08:47 usually not, no 08:08:53 so don't use arenas with types that have destructors? 08:08:58 but if you do, the right thing will still happen 08:09:21 Only if you loop over the arena, which presumably isn't even part of the arena API. 08:09:44 Since arenas are all about freeing a bunch of things all at once. 08:10:57 How much does RAII give you over something like Python's "with locking_lock_thingy(mutex): ..."? 08:11:04 -!- tromp has joined. 08:11:34 It gives you the ability to move a lock_holder_object_type_t to a function, which is a way of telling it that you're holding the lock and it's responsible for freeing it. 08:11:55 Maybe that's good? But it seems pretty niche at best, and possibly makes for harder to follow control flow. 08:12:36 -!- oerjan has quit (Quit: Nite). 08:14:03 i think passing off responsibility for a resource through moves seems pretty useful 08:14:26 but i'm kind of tired and not putting a lot of thought into coming up with compelling examples 08:14:40 i have a lot of different things on my mind today :/ 08:16:38 I think you give up on something meaningful by having invisible control flow happen in what seems like an assignment or value passing. 08:18:54 A "lock_holder_type_t holder{lock};" isn't really much of a value, it's control flow, and it's not clear that treating it as a value makes programs clearer. Maybe? 08:19:46 Anyway that makes sense too. 08:21:14 RAII as a concept has always annoyed me, it's weird to reuse something that is otherwise "setting things to their initial value" to mean "acquiring resources" 08:22:08 RAII isn't really about constructors, and is a bad name. 08:22:25 "RAII" is also a bad name. 08:24:14 yes, it's more about destructors anyway - a hack where you can use destructors for timing release of "other" resources (except e.g. memory that is more naturally part of an object or its value) 08:24:15 oerjan re sees its own messages: it doesn't see its own messages on a channel, but does see them if it explicitly sends to itself by nick 08:25:06 shachaf: the fungus fair is on sunday 08:26:35 fungot: the fungot fair is on sunday 08:26:35 kmc: do you have the parens the important part for me. 08:27:20 ooh nice, they extended the cold weather for three more days 08:27:50 -!- Sgeo_ has quit (Read error: Connection reset by peer). 08:28:11 oerjan: ok, thanks for the feedback 08:28:33 oerjan re "even legal" => more like, may get me banned from freenode 08:29:06 -!- Sgeo has joined. 08:29:57 zzo38 re add a ban => doesn't help at all, you can still abuse the bot without it joining anywhere 08:30:13 I abused it in private message and made it send to a -n channel 08:30:46 Wasn't RAII invented for exception handling anyway? 08:32:16 kmc /proc/*/fd/* not symlinks => if you open them, you get an actual dup of the same file description, with a shared seek pointer 08:32:43 What a ridiculous API. 08:33:16 I like how everything on Linux relies on /proc and /dev and /sys being mounted in particular places but that's only a convention. 08:33:20 that it refers to a deleted file is just slightly weird compared to that 08:33:29 b_jonas: ah 08:33:37 i was wondering whether it might do something like that, as well 08:34:11 It's not even particularly useful in the Plan 9 way where you can run a program with a fake /proc that you proxy calls to, which no one does. 08:36:12 zzo38 special entries => even if the type in lstat/fstat doesn't distinguish them, you can call statfs/fstatfs to tell whether a file is on /proc . There's even a command line interface in coreutils now, 08:36:34 ``` stat -fc "%T %n" /hackenv /proc 08:36:35 hostfs /hackenv \ proc /proc 08:36:52 At least Linux is getting pidfd soon, I think. 08:37:00 That'll be something. 08:37:35 shachaf re parsing text which was mostly meant for debugging => everything ps prints was meant for debugging. normal programs shouldn't invoke ps and find something out automatically to do normal operations. 08:38:02 b_jonas: I'm talking about parsing text in /proc. 08:39:32 shachaf: yes, sometimes I want to make a copy of a whole vector. it typically happens with trivial copy constructors, but can happen even with nontrivial ones. 08:40:10 and it's not like copying short vectors is slow. 08:40:24 b_jonas: Sometimes you want to make a copy of a whole vector, but you could instead do that by calling a function to copy it. 08:40:33 Having it as an implicit thing when you call a function or whatever is ridiculous. 08:40:58 It requires a malloc call so it's not like it's fast. 08:43:14 shachaf re zillions of balanced mallocs not a particularly good way to write a program => yes, and C++ lets you have objects with trivial constructors, and it can optimize those constructor calls away to a memcpy or nothing everywhere. 08:44:50 The point is that the argument for RAII is that it helps you balance your mallocs and frees etc., and if that was what you wanted to do anyway, it might be pretty good, but if it's not such a good strategy in the first place, then RAII is less helpful. 08:46:29 "At least Linux is getting pidfd soon, I think." => it already has pidfd I believe, but maybe I'm desynced with reality a bit 08:51:07 shachaf: what do you want to do implicitly each time you call a function with your vector? do you want a compile time error? that's fine, that's what unique_ptr is for. do you want a pointer plus length without refcounting or any other mechanism to make sure it points to a valid vector? that's bad, it's a thing that's perfectly possible in the core language, but the C++ standard library messed up and 08:51:13 only has std::string_view and the horribly overengineered std::span for now. 08:52:10 An error is OK, sure. 08:52:25 A copy of the struct seems OK? I guess C++ people wouldn't like that so they can ban it. 08:52:37 A copy of the data is ridiculous. 08:52:44 shachaf: on the other hand, sometimes you don't need top performance, but just want to write a program easily without making stupid mistakes or thinking too much about allocation, in which case the refcounting and automatic frees are useful, and you may still want to write your program in C rather than in a language that can't detect type errors in compile time or in a lazy language like Haskell 08:52:56 Reference counting is obviously ridiculous. 08:53:11 shachaf: there can be different types for each of those 08:53:37 no, reference counting is not obviously ridiculous. it's an overkill for MOST things that you do, needed for very few things, that I admit, but it also doesn't hurt too much in many applications 08:54:06 Instead of reference counting you can just manage the lifetime in some reasonable way. 08:54:14 I write a lot of throwaway short programs these days, and given that they take five seconds or even more to run, finding type errors early can help 08:54:35 For example, allocate at the beginning of the program and never free. 08:55:08 allocate at the beginning and never free => that's the easiest thing, you can do that in C++ or basically any language 08:55:35 Yep. 08:55:42 you don't have to use a std::vector for everything 08:55:57 In fact I don't want to use it for anything. 08:56:10 you don't have to use it for anything in your code either 08:56:12 Every time I look in /usr/include/c++/ I decide that the STL is scow. 08:56:36 It's all incomprehensible. 08:57:24 Anyway, you can make types for all these things, but the language and library shouldn't be working against you by implicitly doing the wrong thing. 08:58:01 If your program runs for five seconds, exit_group is certainly one of the best memory management strategies. 08:59:49 I have read about pidfd in Linux. I had a similar idea, although mine was a bit different; you can add the constant PIDFD to a file descriptor of the process's directory in /proc and use the resulting number wherever a process ID is expected. 09:01:38 zzo38: the point of pidfd is that there's a flag on fork to give you an open file descriptor to the pidfd handler, so there's no file system muckery at all 09:01:57 -!- ais523 has joined. 09:01:59 no messing around in /proc for something that doesn't need it 09:02:03 oh hello ais523 09:02:43 shachaf: file seconds or longer. at file seconds already I want the type errors early. 09:03:02 but yes, there's a point in that 09:03:16 I don't need to release memory during those programs 09:03:45 At least if you fork you don't need to worry about race conditions since you're the parent. 09:03:47 though I do want to destroy a few resource-holding objects that hold something other than memory, such as file handles 09:03:51 b_jonas: Yes, that is good too (although I think it is for clone() and not fork(); fork() has no flags), but I think what I read is that it is the same as the directory in /proc though, so you can use that to get a file descriptor for another process. 09:04:39 shachaf: while you're the parent, yes. but how do you tell to some other processes which process that is? 09:05:04 those other processes may want to send signals or whatever, even after your process (the parent) exits 09:05:36 Sure, but you can open /proc/pid and send them the fd. 09:05:45 Other than the process ID, if you have a file descriptor then could you use a SCM_RIGHTS message to transmit it to other processes? 09:07:07 zzo38: yes, or have other children inherit it 09:07:32 b_jonas: Yes, if you are spawning them yourself 09:08:32 Anyways, what the difference is in what I read they were doing in Linux and what my own idea was, is that my own way doesn't have a separate system call for sending a signal to or otherwise deal with other processes by the file descriptor instead of process ID; you just add together PIDFD and the file descriptor, to make a number usable where a process ID is expected. 09:09:10 definitely SCM_RIGHTS, unless you're golfing for IOCCC, in which case passing file descriptors with sprintf(name, "/proc/%d/self/%d", parentpid, parent_pidfd); pidfd = open(name, 2, 0); is easier. 09:10:06 zzo38: oh yeah, you mentioned that. but I find that a somewhat dangerous idea, putting the flag in the process id argument itself rather than into separate flags 09:10:39 I don't have a definite example for why that's a bad idea, I just have the feeling that it could cause weird bugs, including possibly security bugs, in some programs 09:11:37 I thought of that, and that is why the largest valid process ID has to be less than PIDFD-1. 09:12:17 (Although there might be other things I have not thought of, but as far as I know, I cannot think of them) 09:12:40 Ugh. Can all y'all just scrap half of Unix and make a good system call API? 09:14:24 shachaf: I had idea of Plan10 which is sort of like that, although you have to scrap less than half of Unix because some things required for compatibility with Unix; the rest can be implemented in user libraries so need not being system calls (some of them would use new Plan10 system calls which are not Unix system calls, in order to emulate them). 09:14:41 zzo38: What if I don't want compatibility with Unix? 09:14:53 Or at best I want it only for an emulation layer like WSL. 09:15:26 shachaf: have you seen WASI? you probably need more system calls than that for a full OS, but it seems to have the general right attitude 09:15:55 ais523: Well, I want it to be the actual OS interface, for actual native code, and without a web browser or some ridiculous thing running in between. 09:16:05 Some things would only be compatible if things are set up to do such thing anyways; if your program exports a function called "plan10main" then those things are not automatically set up. 09:16:11 The goal is simplifying things, not adding layer and layers of wrappers. 09:16:16 But maybe the API itself is good? 09:16:51 (If your program doesn't include "plan10main", then the one in the library is used, which sets up Unix compatibility and then calls main.) 09:17:24 Use a library without Unix compatibility if you do not want it though, I suppose, is also possible. 09:17:28 It seems likely that all syscalls should go through something like io_uring, since how often do you want to do a ring transition for each one separately? 09:19:51 The actual WASI API might be reasonable? What's better about it than Linux? 09:20:49 I don't know what is io_uring 09:21:12 zzo38: https://kernel.dk/io_uring.pdf 09:21:28 and I want compatibility with a lot of existing programs that I use and I don't want to rewrite, so I use Linux. (and Windows at work.) 09:21:33 That article maybe isn't the best introduction. 09:22:43 but sure, experiment with research OSes if you want, someone has to do it so that 30 years from now, we have an infrastructure that's only 30 years obsolete, not 50 years obsolete 09:23:13 b_jonas: It is why my idea of Plan10 has the compatibility mode (much of it is implemented in user libraries, but some stuff would be part of the kernel). 09:24:40 zzo38: will you want a new main OS interface every 15 years, and will you have three different compatibility layers 30 years from now when you add the fourth one? 09:24:58 with existing large programs using all of them mixed and matched through libraries obviously 09:25:13 back in an hour 09:25:14 -!- b_jonas has quit (Quit: leaving). 09:25:17 b_jonas: Permit programs to use only one of the interfaces. 09:25:33 Just like Windows supported either Win32 or POSIX, but not both at once. 09:27:55 b_jonas: If the author of a program wishes to use multiple libraries that is up to the author of those programs. I should think the kernel itself would not have three different compatibility layers and new main OS interfaces, if it is designed properly. 09:31:12 shachaf: I don't think WASI has a mandatory dependency on WebAssembly, although obviously it was designed for that use 09:31:35 also, WebAssembly doesn't require a browser, it's just a bytecode language that can have small non-browser-dependent interpreters written for it (and a few of those exist already) 09:33:06 (Of course, Unix programs which export a symbol called "plan10main" will not work when compiled for Plan10, but that is unavoidable. If you install an emulator then you might even be able to run the programs directly though (rather than recompiling them for Plan10), which would work; however, the emulators are not part of the core system, but just a feature of the core system to allow the possibility to install emulators.) 09:33:38 zzo38: why not use a character in the symbol name that isn't valid in a UNIX program? 09:33:40 ais523: I know of that, and I wanted to see if there is a library to execute WebAssembly programs from a native C program. 09:34:05 zzo38: I'm not sure whether any of the existing interpreters work as a library, even if none do it should be easy to adapt them though 09:34:42 ais523: Because the C compiler will not accept it. Anyways, it is the C library which causes the program to call main() when it starts anyways, I think? 09:35:01 (So the kernel doesn't need to care what it is called.) 09:35:32 won't the C compiler need to be modified anyway to produce programs for a new OS? 09:36:06 but yes, in most implementations, main is called by an object file in the standard library, normally called something like crt0.o 09:36:14 IIRC it isn't in libc itself, but a separate standard library 09:36:52 Probably, but you will not need to modify the files which change how the program is parsed, I should think. 09:39:13 out of interest, why do you want a different main method? so you can give it different parameters? 09:39:26 -!- kingoffrance has quit (Quit: x). 09:39:37 …now I'm wondering whether C++ object files mangle the name of "main" or not 09:40:15 That is one of it, yes (there are a few additional parameters), but also for compatibility with UNIX. 09:41:08 well, most C implementations let you give a function too many parameters without issue 09:41:26 that's one of the reasons why caller-cleans is a more common calling convention than callee-cleans 09:41:33 (IMO callee-cleans is much better for a number of reasons) 09:41:57 -!- Hooloovo0 has quit (Ping timeout: 240 seconds). 09:42:26 so why not use the same entry point for plan10 programs and posix programs? 09:42:54 Because the default settings for Plan10 are not compatible with POSIX. 09:43:54 (The default implementation of plan10main sets up some stuff required for POSIX compatibility and then calls main.) 09:43:59 what sort of settings are these? things like locale? 09:45:18 No; stuff such as that in POSIX, you will receive a SIGPIPE signal which will terminate the process for writing to any broken pipe, and so on 09:45:46 -!- Hooloovo0 has joined. 09:46:51 (Sometimes that behaviour with SIGPIPE is wanted, but often only for file descriptor 1. So if you are not using the POSIX compatibility then your program can enable SIGPIPE for file descriptor 1 only, in that case.) 09:47:35 oh, I see, for file descriptors inherited from the parent process there's no easy chance to configure that 09:47:49 (for file descriptors opened by the program itself, it would make sense for the API that opens it to specify how you wanted signals to be configured) 09:47:57 Are file descriptors a good system? 09:48:00 I can see an argument for file descriptors 1 and 2 09:48:30 It's kind of nice how you can have something like a perf_event_open fd, and either read() or mmap() it, just like anything else. 09:48:36 shachaf: you need /something/ to be able to refer to an open file, and having an "open/closed" status in files rather than being stateless seems to be the right option because it makes it much easier to reason about potential race conditions 09:48:38 Rather than a bunch of special-case system calls. 09:48:40 ais523: Yes, that makes sense. The POSIX compatibility API (which is a user library function) would call the system call and tell it to enable SIGPIPE. 09:48:50 But sometimes people try too hard to fit things into that API. 09:48:51 WASI came up with an improvement, though, where file descriptors are random numbers rather than being sequential 09:54:19 -!- atriq has changed nick to Taneb. 09:55:18 (possibly some setting in the C library which the default plan10main would set up, or that somehow checks whether or not plan10main has been overridden if that is possible) 09:59:10 Sequential file descriptors are clearly scow. 09:59:37 Windows has HANDLEs, which I guess are pretty similar. 09:59:43 (To random descriptors.) 10:00:37 I guess they're not the same for various reasons. 10:03:31 I consider HANDLEs and file descriptors both just handles for kernel objects 10:03:50 (windows has some unrelated things that are typed HANDLE but aren't actually kernel objects though) 10:05:48 e.g. GDI handles are in a different namespace, and some are just pointers for things that pretend to be or once were kernel features but are implemented in user space 10:06:59 It probably makes sense to be able to have "system calls" implemented in userspace, as Windows does. 10:07:14 (Though maybe that's not really compatible with the ring buffer thing I was talking about before?) 10:07:29 it's a good way to give you freedom on the kernel side to change your system calls 10:07:42 If the ABI and ISA fields in the ELF header are incorrect, then the kernel should see if an emulator for the specified ABI/ISA is loaded (the emulator is just a kernel module, and the core system does not include any emulators), and if there isn't one then trying to execute that file is an error. 10:08:35 I'm a little skeptical that things like POSIX are particularly good. 10:09:13 I'd rather have minimal and stable OS ABIs and then maybe a library on top that things can link to if they want to be portable. 10:10:09 I do think there are some problems with POSIX, and also some problems with Windows, and also other systems. 10:11:45 Wikipedia says that the ABI field in the ELF header "is often set to 0 regardless of the target platform". Unless the program is for System V, such files will have to be corrected in order to run on Plan10. 10:12:15 zzo38: Is Plan10 some sort of banana pun? 10:12:32 (This correction can be made without recompiling the program; you only have to change one byte in the executable file.) 10:12:50 shachaf: That is not the intention; the name is similar to Plan9 but is different. 10:24:49 -!- wib_jonas has joined. 10:26:18 shachaf: programs only use one interfaces => then all large programs will stick to the older interface because that's what the libraries use. just like everyone still uses gtk+ version 2 rather than the incompatible version 3, but in a larger scale. 10:26:36 I'd prefer to keep most of the unix api, because most of it is sane, and just improve the few parts that are bad. 10:26:47 but I admit I was a bit too sarcastic about compatibility 10:27:27 and you can mix windows API with POSIX all the time on windows, although it's ugly because the POSIX API really doesn't match how windows works, and you need some conversion functions, but I still do it sometimes 10:28:19 wib_jonas: You can port programs to new interfaces just like you can port them to new OSes. 10:29:13 If programs are just using the OS ABI via libraries, it's even easier to port, because you can just port the libraries (like libc and SDL). 10:29:26 ais523: main isn't mangled, but the C++ compiler treats in somewhat special way at compile time, and then the linker treats it specially at link time 10:31:20 in particular, on most platforms the compiler emits main as an extern "C" function, even if you didn't explicitly define it as such, and it has an implicit return 0, and IIRC there was one or two more things special about it, plus the linker inserts constructors and destructors to it somehow 10:31:52 or so I believe, but I'm not quite sure about this 10:34:06 shachaf: no, windows HANDLEs are mostly sequential numbers too. they're not guaranteed to be sequential, unlike on unix, but they mostly are. 10:34:35 or so I believe, but again, I'm not sure in this 10:35:04 Aren't HANDLEs generally opaque? 10:36:04 shachaf: opaque, yes. opaque numbers that are typically sequential, but the OS gets to decide that, and may give you any numbers it if it feels like. 10:36:13 I thought they were sometimes pointers or other things. 10:41:30 wib_jonas: IIRC in C++ main isn't allowed to be recursive (although in C it is) 10:41:52 this is a weird limitation because it should be easy just to imply a wrapper around it in the compiler if the compiler couldn't handle a recursive main 10:47:17 -!- ski has quit (Ping timeout: 240 seconds). 10:56:09 -!- wib_jonas96 has joined. 10:56:41 -!- ski has joined. 10:58:37 -!- wib_jonas has quit (Ping timeout: 240 seconds). 11:00:56 -!- wib_jonas96 has changed nick to wib_jonas. 11:18:20 -!- arseniiv has joined. 11:32:33 `? dc 11:32:35 dc is short for "dump core". (try it out yourself: dc -e '[') 11:32:40 `` dc -e '[' 11:32:41 No output. 11:33:07 I want a program to SEGV, any options? 11:35:38 `perl -ekill 11,$$ 11:35:39 No output. 11:35:53 ``` perl '-ekill 11,$$'; echo $? 11:35:53 bash: line 1: 54 Segmentation fault perl '-ekill 11,$$' \ 139 11:36:07 ``` perl '-eunpack"p",0'; echo $? 11:36:10 0 11:37:31 That's a fake SEGV. 11:39:56 `! c return *(int *)0; 11:39:59 ​/hackenv/interps/gcccomp/gcccomp: line 53: 68 Segmentation fault /tmp/compiled.$$ 11:40:12 can't get much more real SEGV than that 11:40:48 also, that "$$" is interesting, looks like there was an attempt to swap in the PID, but it still works anyway due to the nature of /tmp 11:41:31 I wanted to test the program "catchsegv" that I just found out about. 11:41:49 But now I know how it works so I'm less curious. 11:43:13 (It uses LD_PRELOAD to set up a signal handler.) 11:43:55 oh, that reminds me 11:44:04 ``` rm -v /hackenv/bin/culprits-ng 11:44:12 removed '/hackenv/bin/culprits-ng' 11:44:19 I created that long ago, but I don't use it 11:44:27 `before 11:44:29 ​/hackenv/bin/culprits-ng//#!/bin/sh \ exec hg log -l 512 --template "{desc}\0" -- "$@" | perl -0ne '/^<([^>]*)>/ and print"$1 "' 11:46:39 I almost never want to look up just the users who modified a file, without other parts of the revision log 11:50:50 `culprits ../bin/culprits-ng 11:50:52 wib_jonäs oerjän oerjän b_jonäs b_jonäs b_jonäs b_jonäs b_jonäs 11:53:16 Not 100% sure how culprits-ng differed from the regular one, other than the limit, no scowrevs, and no no-ping. 11:55:46 ...scowrevs? 11:56:01 `` hg log -l 512 --template "{desc}\0" -- ../bin/culprits-ng | perl -0ne '/^<([^>]*)>/ and print"$1 "' 11:56:07 fizzie b_jonas b_jonas b_jonas b_jonas 11:56:23 `` hg log --removed -l 512 --template "{desc}\0" -- ../bin/culprits-ng | perl -0ne '/^<([^>]*)>/ and print"$1 "' 11:56:24 `` cat $(which culprits) 11:56:25 wib_jonas oerjan oerjan fizzie jeffl35 fizzie evilipse b_jonas b_jonas b_jonas b_jonas b_jonas 11:56:25 hoag "$@" | awk '{print substr($1,2,length($1)-2)}' | xargs -d'\n' 11:56:50 fizzie: no noping, no scowrevs, and different implementation. 11:57:12 saner implementation, I hope 11:58:01 What does it have to do with sanity? 11:58:11 It looks like a golfed Perl implementation. 11:58:36 FireFly: scowrevs is a list of revisions in our repository that most of the fancy commands hide by default, though you still see them with an explicit hg 11:58:48 and I mean they hide their diffs, so you don't see the same change in the next revision either 11:59:27 ``` cat /hackenv/bin/hlnp 11:59:28 scowrevs="$(/usr/bin/paste -sd'|' /hackenv/share/scowrevs)"; hg log -r "tip:0 & ! ($scowrevs)" "$@" | sed 's/\(\(^\| \)[ `cat /hackenv/share/scowrevs 11:59:37 121:122 \ 194:196 \ 770:771 \ 1000:1001 \ 1493:1497 \ 2112:2114 \ 3342:3343 \ 4530:4531 \ 5136:5137 \ 5642:5643 \ 5894:5897 \ 8669:8678 \ 9070:9071 \ 9074:9075 12:00:03 wib_jonas: ah 12:00:12 Not named by me, I have to say. 12:00:42 I'm mildly surprised 12:01:58 -!- ais523 has quit (Ping timeout: 245 seconds). 12:02:53 shachaf: sorry, it's not a saner implementation anymore, but it was back then: 12:02:54 ``` hg cat -r 7010 /hackenv/bin/culprits 12:02:55 hg log --removed "$1" | grep summary: | awk '{print substr($2,2,length($2)-2)}' | sed "s/.$/\x0F&/" | xargs 12:02:59 it was saner than that one ^ 12:13:14 -!- ais523 has joined. 12:42:57 -!- tromp has quit (Remote host closed the connection). 12:47:39 -!- tromp has joined. 13:33:38 -!- APic has quit (Ping timeout: 240 seconds). 13:35:34 -!- APic has joined. 13:52:10 -!- xkapastel has joined. 14:38:55 -!- imode has joined. 14:56:13 fungot, how do you pronounce the "g" in "Malbolge"? like "G" in "GIF", or like "g" in "gauge"? 14:56:13 wib_jonas: no without using variables? like, mail me the .dbm and .log are 1.7m by now *8) 2) 15:01:29 wib_jonas: Those are both terrible examples. 15:01:56 wib_jonas: (I pronounced "GIF" wrong for a long time. And "gauge" has two different 'g's.) 15:02:11 `ysaclist 15:02:13 ysaclist: boily shachaf 15:02:19 https://www.youtube.com/watch?v=ZpfaCiBtmOc one hundo 15:02:52 int-e: yes, they are 15:02:55 wib_jonas: "It's pronounced JIF, not GIF." 15:03:20 wib_jonas: Anyway, personally I'm going with 'rage', not 'game'. But I don't know. 15:03:54 wib_jonas: Oh maybe that was intentional. Hmm mm. If so, sorry. 15:04:37 (Though, honestly, no *very* sorry.) 15:05:00 fungot: Do you like contrition? 15:05:01 int-e: dlobron annotated 16311 with " walk-case-exp" at http://paste.lisp.org/ display/ fnord for all primitive operations doesn't seem like a call/ ret pair would be really nice to have 15:05:33 I'll take that as a "no". 15:05:58 fungot, how do you pronounce "Chesapeake"? 15:05:58 wib_jonas: what's the matter with kawa? no tco? total cost whatwhat? that's too bad 15:11:36 fungot: total cost? NB "Chesapeake", not "cheapsake".\ 15:11:37 wib_jonas: was cale any help last night? all isps seemed to be 15:14:30 there are two ways to pronounce gif: a sane one and a smartass one 15:16:39 wha 15:17:27 Cale: one hundo seems p. low for an undo 15:21:56 -!- imode has quit (Ping timeout: 240 seconds). 15:26:54 [[Code is eso]] N https://esolangs.org/w/index.php?oldid=67610 * DmilkaSTD * (+148) Created page with "This language is inspired on the game "Baba is you". It is not finished, im making it. I made this page to be the first in make a language like this" 15:33:09 also, how is the g in fungot pronounced? depending on whether you interpret it as part of "got" or es "funge", it would be different 15:33:10 myname: i've just written a version of all of the ten thousand pastes up there. what else can i set the escape proc to a global variable 15:37:51 myname: I pronounce the g in "fungot" like the g in "fungi" 15:37:51 ais523: all right. my wife got her masters at tyler school of art, too? :d hehe no :) i was wondering whether sxpath could be used, how type errors would be annoying with forced fnord. 15:38:04 I'm guessing this is ^style irc? 15:38:06 ^style 15:38:06 Available: agora alice c64 ct darwin discworld enron europarl ff7 fisher fungot homestuck ic irc* iwcs jargon lovecraft nethack oots pa qwantz sms speeches ss wp ukparl youtube 15:38:08 yes 15:38:53 ais523: i do that too, but you could make a point of it coming from befunge 15:39:15 I suppose, if you pronounce gif as jif, you should pronounce fungot as funjot 15:39:15 myname: http://youtube.com/ fnord richard dawkins " what if you're reading this 15:39:38 I do it as in "got". 15:39:46 myname: don't most Befunge impls have names which are a pun on "fungi"? 15:40:09 (even though the back-derived etymology is based on "fungible", and the actual etymology was based purely on spelling) 15:40:38 "(UK, US) enPR: fŭnʹjī, fŭngʹgī, IPA(key): /ˈfʌn.dʒaɪ/, /ˈfʌŋ.ɡaɪ/, /ˈfʌŋ.ɡiː/, /ˈfʌn.dʒiː/" that's a lotta pronunciations. 15:41:54 I didn't even realise that "fungi" allowed "g"=/dʒ/ 15:42:09 I don't think I've ever heard that pronunciation 15:44:32 pronounciation in english is a mess 15:49:29 -!- ais523 has quit (Quit: sorry for my connection). 15:49:43 -!- ais523 has joined. 15:55:06 -!- kspalaiologos has joined. 15:56:08 is this esoteric? https://bpaste.net/show/6E66I 15:57:44 it's a DSL, and I don't think we have a consensus on whether DSLs are esoteric 15:57:51 they're probably esoteric if used for an unintended purpose 15:57:57 is that thing TC when operating on fixed input, for example? 16:10:17 no 16:10:45 I did think about making it so, but, no 16:14:33 Hmm, "bone"? 16:28:56 int-e: "bone"s are structural components of humans 16:29:31 originally this was meant to have no validation features, i.e. it wasn't supposed to support use-cases best served by a schema 16:29:43 but I guess I ended up adding those in anyway 16:30:05 and schemas are basically structural definitions 16:30:15 so, boneless 16:41:36 [[Esomachine]] https://esolangs.org/w/index.php?diff=67611&oldid=66926 * Dart * (-236) Formatting and terminology 16:42:04 wait, fungi and fungot are pronounced differently? 16:42:04 wib_jonas: but any reasonably complex caching system that doesn't act dumbly prolly is too stupid to load them when fnord tcpdump, and only insane people are allowed to participate. 16:42:15 I mean, fungi and befunge are pronounced differently? 16:43:11 oh heck this is a mess indeedd 16:43:39 "fungi" and "fungible" are (potentially) pronounced differently, and I think "Befunge" follows the latter usually. 16:43:48 apparently "fungi" is pronounced both ways 16:44:52 "The Betty compiler, for example, treats every possible straight line of instructions as a subprogram, and if a 'p' instruction alters that subprogram, that subprogram is recompiled." -- hence the name "straight-line code" 16:45:54 Four ways (according to wiktionary), though only two relate to the kind of 'g'. /ɡ/ vs. /dʒ/ and /aɪ/ vs. /iː/. 16:49:30 (I looked at the Befunge page in hopes of a pronunciation guide but there doesn't seem to be one.) 16:51:48 Oh great, "fungi" has two pronunciations? 16:52:23 That's confusing. 16:53:14 [[Talk:Esomachine]] N https://esolangs.org/w/index.php?oldid=67612 * Dart * (+619) Created page with "==Inconsistencies== Here's the example of truth machine: INDEX_STATE[1, false] HANDS_EXPECT[] INDEX_SET[1, HANDS] OUTPUT[1] HANDS_JUMP[48, 7] HANDS_JUMP[49, 2] INDEX_ST..." 16:53:24 no, 4, only 2 regarding the g 16:53:41 [[Talk:Esomachine]] https://esolangs.org/w/index.php?diff=67613&oldid=67612 * Dart * (+17) /* Inconsistencies */ 16:54:11 [[Talk:Esomachine]] https://esolangs.org/w/index.php?diff=67614&oldid=67613 * Dart * (+77) /* Inconsistencies */ 16:57:16 -!- ais523 has quit (Read error: Connection reset by peer). 17:11:04 -!- Lord_of_Life_ has joined. 17:12:06 -!- Lord_of_Life has quit (Ping timeout: 265 seconds). 17:12:26 -!- Lord_of_Life_ has changed nick to Lord_of_Life. 17:23:42 -!- wib_jonas has quit (Remote host closed the connection). 17:31:24 -!- xkapastel has quit (Quit: Connection closed for inactivity). 18:20:57 -!- heroux has quit (Ping timeout: 240 seconds). 18:21:04 -!- ais523 has joined. 18:31:11 -!- LKoen has joined. 18:31:42 -!- b_jonas has joined. 18:33:32 kspalaiologos: sorry, it may have been a bit rude to take over your bot 18:33:43 what? 18:33:51 bfbot. it's your bot, isn't it? 18:34:02 yes 18:34:05 I wrote it in bash tho lol 18:34:13 I HAVE to check the logs 18:34:22 because I'm really curious how have you done that 18:34:23 =help 18:34:26 yeah 18:34:34 not mad at all tbh 18:34:47 but if it had a few "holes" it wouldn't be bad if it was left anyway 18:34:50 because it's another users account 18:34:55 and no harm is done to my vps 18:35:05 because I knew there is going to be a severe security hole in this bot 18:35:08 kspalaiologos: the bot parses irc lines wrong. it looks like if you say "PRIVMSG" inside a message, even if it's not the second word of the irc line, it thinks that that's the command word and the next word is the target nick/channel 18:35:28 unn 18:35:29 fine 18:35:31 and if you say ":=" inside a message, it thinks that's the start of the message, even if it's not at the start of the fourth word of the irc line 18:35:38 both of those are serious security bugs 18:35:48 so how did you take it down 18:35:48 -!- heroux has joined. 18:35:53 I thought there was a RCE 18:36:06 it would be way more interesting with an RCE in 18:36:09 I asked it to send a message to register his nickname bfbot for my account 18:36:24 and? 18:36:27 then I told nickserv that bfbot is my nick and the bot isn't allowed to use it 18:36:29 and ghosted it 18:36:34 ah, smart 18:36:44 haha 18:36:54 there's a third bug in the bot which I didn't use for this, and which is less important, but it's still nasty enough that you should fix: 18:37:12 / thanks a lot for formalizing this though 18:37:16 if the message ends in a backslash, it seems like the bot thinks that the next irc line is a continuation of that message 18:37:23 I'm curious why := is implemented as a newline 18:37:24 no clue really 18:37:31 b_jonas, NO WAY XD 18:37:38 I'm done with bash 18:38:02 why is this behaviour with := occuring though 18:38:20 I may send you the source code for further review as I fix the bugs 18:38:30 -!- kritixilithos has joined. 18:38:37 to make it clear, an irc message that the bot reads from the server looks like this: "b_jonas!~x@catv-176-63-14-58.catv.broadband.hu PRIVMSG #esoteric :=echo hello\r\n" 18:38:44 no wait 18:38:50 looks like this: ":b_jonas!~x@catv-176-63-14-58.catv.broadband.hu PRIVMSG #esoteric :=echo hello\r\n" 18:39:00 Ah, yes 18:39:03 kspalaiologos: I thought the bot was written in seed :/ 18:39:04 I need to match \r\n aswell 18:39:09 it has words separated by colons. the first word is always the source, the second is the command 18:39:15 kritixilithos, because in practice, it is 18:39:24 a very long system() befunge command 18:39:25 after that, there can be any number of arguments, and the last argument will start with a colon and can contain spaces inside 18:39:40 that's amazing 18:39:43 then how does bash play into this? 18:39:51 note that the channel name may contain colons, it's only colons at the start of a word that mark the final argument 18:39:51 ^ well, because the bot is programmed in bash 18:40:00 then I put it inside a befunge's "system" 18:40:06 and ran it over with my generator 18:40:13 the befunge system call calls the bash program? 18:40:17 so you have to find the first that starts with a colon, not counting the very first word, which always starts with a colon in a message from a server 18:40:18 nope 18:40:33 b_jonas, I'll fix this 18:40:35 really 18:40:44 for PRIVMSG in a message the server sends you, that will always be the fourth word 18:40:47 but I'm a tiny bit occupied though 18:40:51 nope its not the case 18:40:57 There is simpler workaround 18:41:18 the "thing" matching the regex is actually not matching a newline at the end 18:41:33 I just need to add [\r\n]+ at the end of regex and I'm done with this bug 18:41:57 -!- FreeFull has joined. 18:41:59 but this is exploitable too 18:42:00 though 18:42:05 let me check something 18:42:20 does both 0xA and 0xC start a newline in IRC? 18:42:38 kspalaiologos: the server always sends you \r\n , which are the bytes 0xD then 0xA 18:42:38 it's only CRLF or LF, or it can be CR only too 18:42:46 if you send a message to the server, then \n is enough 18:42:52 yes yes 18:42:53 fine 18:42:56 thanks 18:43:05 what if user sends a single CR though? 18:43:10 does this issue a break or not 18:43:12 I don't know 18:43:25 I'll just go safe with it 18:43:32 how do I bring the bot back lol though 18:43:33 the server is nice, there are a lot of things that it allows clients to send but that it will never send to clients 18:43:36 as I finish working on it 18:43:58 such as PRIVMSG or NOTICE with multiple channel/nick targets, or KICK with multiple nick targets, or MODE with more than four modes 18:44:21 or a line feed without a carriage return, or an empty line, or an invalid command, or a command or nick or channel in a case that isn't the canonical one 18:44:30 and more 18:44:40 this makes it easy to write a client, but harder to write a good irc server 18:44:56 well, that's only part of the reason, the other reason is that the server has to manage multiple connections, including with other irc servers 18:44:59 but still 18:45:14 how do you bring the bot back => no idea, kill then restart your program or something 18:47:50 it seems that freenode irc interprets a cr as a line break too if you send one, but I wouldn't rely on this, and I haven't tested any other networks 18:48:47 [[Fpulse]] https://esolangs.org/w/index.php?diff=67615&oldid=49958 * Dart * (+0) Changed redirect target from [[Fpulse/]] to [[F-PULSE]] 18:49:30 kspalaiologos: anyway, before I took the bot down, I made it loop by sending a message that it misparsed 18:49:59 haha 18:50:00 it was after that that I decided it was buggy enough that I can just have the irc server eject it 18:50:32 I'll write it all over again 18:50:41 and burn the code printouts to get rid of it for real 18:52:41 I'd like to defend bash though. some people use bash and write less buggy programs in it. I'm not advertising that, there are better programming languages than bash, just saying. 18:53:08 and some people write worse programs in perl or php, ones that open huge holes of sql injections for no reasons 18:54:05 -!- LKoen has quit (Remote host closed the connection). 18:54:17 also, publishing the source code of the bot may help, because it may let the regulars find or debug bugs more quickly. without them, it took days until someone (perhaps kritixilithos) to find the bug with the backslash at the end of the line 18:55:14 -!- LKoen has joined. 18:57:18 -!- kritixilithos has quit (Quit: quit). 19:02:55 -!- laerlingSAP has joined. 19:14:59 -!- tromp has quit (Remote host closed the connection). 19:16:42 -!- tromp has joined. 19:21:28 -!- tromp has quit (Ping timeout: 268 seconds). 19:21:32 is there any use of the std::vector copy constructor that isn't a mistake, anyway ← I don't know what it actually does, but I'm guessing from the discussion that it actually moves the vector contents and leaves the original vector empty? 19:21:51 ais523: no 19:22:26 the copy contructor of std::vector (in C++) copies the contents of the vector, which implies copying each element of the vector 19:22:39 OK, that's what I'd expect it to do 19:22:48 the move constructor moves the vector contents by updating pointers in the headers, and leaves the original one empty 19:23:13 oh right, because in C++ a moved-out-of object can still be referenced 19:23:24 (C++ "move" corresponds to Rust "take" rather than Rust "move") 19:23:57 re the RAII discussion, I think the name comes from the fact that there's no user-observable time during which the object is allocated but uninitialised 19:24:12 ais523: yes, but in case of most types like an std::vector it's easy, because the moved out one will just have a 0 size and a null pointer in the header. the hard case is std::list, which has to heap allocate to move out of itself with the move constructor. 19:24:13 in C you often deal with a four-state transition, allocate/initialise/deinitialise/deallocate 19:24:20 and RAII says you merge the first two and last two 19:24:56 OK, now I have to ask what the difference between a list and a vector is 19:25:01 is the list linked? because that's ridiculous 19:25:06 C++ std::list is a doubly linked list 19:25:58 my current belief about linked lists is "it doesn't make sense to have an abstraction for linked lists, in all the cases where they're actually useful you need to be doing something horrifically low-level with their internals" 19:26:03 it's something you very rarely need, and it's a pity that it's in the C++ standard library with such a simple name, because it gets lots of clueless people use it when they shouldn't 19:26:16 ais523: yes, that's close to true 19:26:50 however, even if you don't have the general std::list, you can meet one of those low-level things where you define a more specialized object whose copy constructor has to heap-allocate 19:27:21 which is why they want to solve the general problem, not really for what std::list should do, but how to handle objects like that 19:27:25 and yes, it's a rare case 19:30:03 the more important tricky case is that of std::string (and cv::Vector from the Opencv library), which have pointers to themselves, and so have to do something nontrivial when they're swapped or move-assigned or move-constructed, though the move construction can't raise an exception unlike with std::list 19:32:05 Rust's solution to that apparently has corner cases where it's unsound, I hope they come up with a good fix soon 19:37:05 -!- ais523 has quit (Quit: quit). 19:49:11 oh, right. if I want set -e in an interactive shell, as opposed to a HackEso command, I should do it in a parenthisized subshell. 19:49:51 or in a shell script running in a subshell obviously 19:59:37 -!- laerlingSAP has quit (Quit: Leaving). 20:15:54 -!- kingoffrance has joined. 20:25:06 -!- tromp has joined. 20:29:47 -!- tromp has quit (Ping timeout: 265 seconds). 21:01:44 -!- kspalaiologos has quit (Quit: Leaving). 21:05:41 -!- olsner has quit (Ping timeout: 268 seconds). 21:05:47 -!- sftp has quit (Excess Flood). 21:06:07 -!- sftp has joined. 21:10:06 -!- olsner has joined. 21:19:43 -!- tromp has joined. 21:24:23 -!- tromp has quit (Ping timeout: 276 seconds). 22:17:30 -!- tromp has joined. 22:30:15 -!- tromp has quit (Remote host closed the connection). 22:42:31 -!- hppavilion[1] has joined. 23:09:15 -!- tromp has joined. 23:14:14 -!- tromp has quit (Ping timeout: 276 seconds). 23:18:56 -!- arseniiv has quit (Ping timeout: 246 seconds). 23:26:31 -!- xkapastel has joined. 23:44:34 -!- hppavilion[1] has quit (Ping timeout: 265 seconds). 23:57:36 -!- FreeFull has quit.