00:05:23 <imode-ruby> sorry, should've clarified what I meant by "commands". bot commands are fine. controlling the bot via PRIVMSG is.. not fine.
00:08:54 <fizzie> 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 <imode-ruby> mhm. if you can PRIVMSG anything, you can hijack it.
00:17:59 <b_jonas> 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 <fizzie> 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 <fizzie> I like it when screens like this are showing things they shouldn't be showing.
00:49:28 <kmc> https://www.reddit.com/r/bayarea/comments/e4so9b/for_all_you_programmers_bart_at_least_the_station/
00:49:40 <kmc> the farecard readers on the new MUNI trains run embedded Windows
00:49:54 <kmc> 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 <esowiki> [[User:DMC]] M https://esolangs.org/w/index.php?diff=67605&oldid=62538 * DMC * (+98)
02:05:13 <esowiki> [[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> <wib_jonas> 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 <fizzie> You do if you send to yourself.
02:12:23 <HackEso> u? No such file or directory
02:12:56 <oerjan> (i renamed it for keyboard pressing shortness)
02:13:18 <HackEso> 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:21 <HackEso> 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 <oerjan> (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 <fizzie> Do you actually need `t for 5 w?
02:15:05 <oerjan> 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 <oerjan> ProofTechnique: hey you're here!
02:16:38 * oerjan ups the ante for duplicate responding by not even reading until the end of the line
02:16:39 <shachaf> oerjan: Aha. But deadkeys are scow.
02:16:48 <fizzie> IMO, with a compose key, compose-`-? should compose ` onto absolutely anything, using a COMBINING GRAVE ACCENT. But it doesn't, here.
02:17:09 <shachaf> fizzie: Can Compose enter multiple code points?
02:17:30 <oerjan> fizzie: i don't think so
02:18:11 <fizzie> 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:39 <HackEso> 1/1:hi \ hi \ hi \ hi \ hi
02:18:58 <oerjan> hum i guess that proves nothing
02:18:59 <fizzie> `` 5 'echo ho' # it's christmas
02:19:01 <HackEso> 1/1:ho \ ho \ ho \ ho \ ho
02:19:06 <HackEso> 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 <oerjan> Bike is not here though. at least by that nick.
02:20:52 <fizzie> Where did I see a Burma-Shave thing recently? Maybe a random xkcd.
02:21:21 <fizzie> There's one in https://xkcd.com/491 but I think it was something else instead maybe.
02:25:58 <ProofTechnique> I wonder if anyone's ever done a whale-themed cover of Jolene.
02:32:17 <oerjan> Jooooowoooowwooooowwooo...
02:39:48 <oerjan> 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:41 <int-e> 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:46:23 <int-e> The good thing about terrible jokes is that they're easy to remember ;)
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 <oerjan> because if not, i think there was another "fascinating effect" involved in bfbot's response to that
03:03:36 <oerjan> 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 <esowiki> [[IBC]] https://esolangs.org/w/index.php?diff=67607&oldid=67112 * Quadril-Is * (+99)
03:45:06 -!- imode has joined.
04:02:19 <oerjan> <b_jonas> Is this too evil? <-- really really bad judgement at the very least.
04:05:27 <oerjan> and a horrible precedent for this channel.
04:06:18 -!- tromp has joined.
04:06:48 <oerjan> and don't ask me if it's even legal.
04:10:53 -!- tromp has quit (Ping timeout: 276 seconds).
04:10:58 <oerjan> admittedly the bot probably needs to be kept off until fixed.
04:12:26 <oerjan> b_jonas: you could have phrased that a lot less confrontational, though.
04:12:32 <zzo38> 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 <oerjan> zzo38: except that's exactly what he did
04:13:30 <zzo38> Yes, but I think that isn't what should be done. Instead just use a persistent connection, I think, is better
04:14:20 <oerjan> zzo38: i am confused what problem you are thinking that solves
04:14:47 <oerjan> the problem is that bfbot was online, completely abusable, and its owner wasn't.
04:15:35 <oerjan> and b_jonas used its abusability to get it disconnected.
04:15:57 <oerjan> by a method which required him registering it. i'm not sure whether another would have worked.
04:16:11 <zzo38> Would it work to only temporarily register it?
04:16:18 <zzo38> If so, then that is what should be done.
04:16:47 <oerjan> oh he also set nick protection to prevent it from reconnecting, i think.
04:17:27 <oerjan> which is the thing that cannot be done temporarily, i guess.
04:18:18 <zzo38> 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 <oerjan> zzo38: the thing is that it was so abusable that a person could use it against a third party
04:19:23 <zzo38> 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 <zzo38> 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 <oerjan> also, it was on #esoteric-blah which has no ops
04:20:15 <zzo38> If it is a channel with no ops then just it be on there.
04:20:22 <oerjan> (well, it has staff so we could ask FireFly i guess)
04:21:40 <oerjan> oh wait it's freenode-staff which isn't the same thing.
04:22:34 <oerjan> (just a dummy account to hold channels i think)
04:24:34 <zzo38> 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 <oerjan> @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:25:59 <oerjan> trying some de-escalation
04:30:49 <zzo38> 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 <zzo38> 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 <kmc> in what way don't they act like symlinks?
05:28:27 <zzo38> I think they can refer to deleted files and to anonymous stuff, and symlinks can't
05:28:32 <kmc> is it because they may refer to anonymous things?
05:29:10 <kmc> keegan@localhost:~$ ls -l /proc/self/fd | grep pipe
05:29:10 <kmc> l-wx------ 1 keegan keegan 64 Dec 2 21:29 1 -> pipe:[6737388]
05:29:15 <kmc> wonder what that number means
05:29:17 <shachaf> Can you distinguish between a deleted file and a link to a file ending in ' (deleted)'?
05:29:32 <kmc> you mean without a race condition?
05:30:03 <kmc> well you could try to readlink then open
05:30:04 <shachaf> 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 <kmc> but I guess you may have both files
05:30:17 <kmc> both '/foo' and '/foo (deleted)'
05:30:23 <shachaf> But how can you tell whether a program just opened a file with that name?
05:30:35 <shachaf> Ugh, I hate how much of UNIX is stringly typed.
05:30:42 <shachaf> The whole /proc thing is a mess.
05:30:57 <kmc> does stat /proc/$PID/fd/$N tell you anything useful?
05:31:05 <kmc> /proc isn't even UNIX
05:31:19 <kmc> it's a linux thing intended for quick hacks in kernel development that just grew and grew
05:31:25 <shachaf> How did ps work back in the day?
05:31:32 <kmc> BSD also has /proc but there's not like a standard for what's in these things
05:31:40 <kmc> i think it even has a linux-emulating procfs as well
05:31:48 <shachaf> There isn't a POSIX-style standard, but that's not what I care about.
05:31:50 <kmc> i think by parsing /dev/mem
05:32:03 <kmc> and so ps was setuid
05:32:26 <shachaf> The annoying thing is that even if I port my program specifically to Linux, I have this terrible ABI.
05:32:41 <shachaf> The system call ABI is pretty good. Things like ioctls are OK? And /proc is a mess.
05:32:46 <zzo38> 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 <shachaf> 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 <kmc> ioctls are not okay
05:33:34 <kmc> ioctls are like syscalls only with minimal oversight on whether they are at all well-designed
05:34:05 <shachaf> Sure, but at least they have an ABI at all, generally.
05:34:20 <shachaf> Instead of parsing text which was mostly meant for debugging.
05:34:44 <shachaf> kmc: Do you like io_uring?
05:36:14 -!- tromp has joined.
05:36:38 <kmc> what's that
05:36:46 <shachaf> I don't see anything different from stat.
05:37:05 <shachaf> Maybe you can open the file and fstat it and compare the inodes or something.
05:37:20 <shachaf> It's the new Linux asynchronous I/O API.
05:37:28 <shachaf> and maybe asynchronous everything API??
05:37:38 <shachaf> https://lwn.net/Articles/776703/
05:37:59 <shachaf> You have a request and response ring buffer, and you send the kernel requests and get responses.
05:38:21 <shachaf> If you can send it requests fast enough, you might never have transitions to ring 0 at all.
05:38:35 <shachaf> 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:45:02 <kmc> but you can also call into the kernel to block on it?
05:45:19 <kmc> this is how high performance network drivers have worked forever
05:45:33 <kmc> if you're doing low latency infiniband or something on linux then you don't go through the kernel at all
05:45:42 <kmc> you write into a ring buffer in the card's address space
05:46:29 <shachaf> You can also call into the kernel, yep.
05:46:52 <shachaf> 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 <esowiki> [[Talk:Initialization]] https://esolangs.org/w/index.php?diff=67608&oldid=67603 * Zzo38 * (+372)
07:08:10 <esowiki> [[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 <shachaf> why does c++ have copy constructors given that copy constructors are scow
07:40:25 <shachaf> 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 <kmc> shachaf: historical reasons
07:54:55 <kmc> the language was designed around value types / unboxed objects / whatever you want to call them
07:55:10 <kmc> but they hadn't worked out that move semantics are the way to make that work nicely
07:55:42 <kmc> moves + an explicit clone() method seems much nicer to me
07:55:50 <kmc> though this depends on a certain return-value optimization
07:55:57 <kmc> but everything in C++ depends on optimization for good performance
07:56:47 <kmc> there are probably some cases where the copy constructor performs better
07:56:52 <kmc> at least, i think there are some cases for operator=
07:57:00 <kmc> which is a closely related concept
07:57:05 -!- tromp has quit (Ping timeout: 276 seconds).
07:57:15 <kmc> but operator= has an old object to (partially) dispose of, and Foo(const Foo&) doesn't
07:57:39 <kmc> all this is setting aside the question of whether overloadable *move* constructors are also a mistake
07:57:48 <kmc> which I think is much more debatable
07:58:05 <shachaf> Man, everything about the STL is scow.
07:58:12 -!- tromp_ has quit (Ping timeout: 268 seconds).
07:58:16 <shachaf> Every time I try to understand what's going on there I'm miserable.
07:58:46 <kmc> 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 <shachaf> And the specification requires things to be low-performance. And the implemetations aren't predictable or fast.
07:58:52 <kmc> which is plausibly less efficient in some cases, I guess
07:59:05 <kmc> but I'm not sure how often anyone writes an operator= which does such things
07:59:33 <shachaf> That sounds pretty plausible. Maybe an even more plausible thing would be to do away with destructors entirely.
08:00:00 <kmc> then how will I have RAII?
08:00:05 <kmc> RAII is tg
08:00:52 <HackEso> RAII means you deallocate in the destructor. There is no 'initializer' involved.
08:01:08 <kmc> that is a profoundly useless definition
08:01:25 <shachaf> RAII means you have destructors, I think?
08:01:27 <HackEso> 10903:2017-05-18 <shachäf> slwd raii//s,allocate in the constructor and ,, \ 5854:2015-07-21 <orën> learn RAII means you allocate in the constructor and deallocate in the destructor. There is no \'initializer\' involved. \ 5853:2015-07-21 <orën> le/rn RAII/RAII is Resource Allocation in the constructor... wait wait uh... Is uh, Initialization
08:03:30 <kmc> 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 <kmc> 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 <kmc> 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 <kmc> as well as a lot of memory-related resources such as uniquely-owned objects
08:05:20 <shachaf> 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:41 <kmc> in C++ there are some other reasons to have constructors as a language feature
08:05:45 <kmc> but Rust doesn't need them
08:06:05 <shachaf> But also is this actually a good idea?
08:06:12 <shachaf> A mutex is pretty different from memory.
08:06:27 <shachaf> And RAII isn't even particularly good at managing memory, I think?
08:06:27 <kmc> *shrug*, it makes for a very convenient and safe API
08:06:49 <shachaf> In particular RAII helps you write a program with zillions of balanced mallocs and frees.
08:07:03 <shachaf> But I'm not sure that's a particularly good way to write a program?
08:07:49 <shachaf> 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 <kmc> usually not, no
08:08:53 <kmc> so don't use arenas with types that have destructors?
08:08:58 <kmc> but if you do, the right thing will still happen
08:09:21 <shachaf> Only if you loop over the arena, which presumably isn't even part of the arena API.
08:09:44 <shachaf> Since arenas are all about freeing a bunch of things all at once.
08:10:57 <shachaf> 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 <shachaf> 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 <shachaf> 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 <kmc> i think passing off responsibility for a resource through moves seems pretty useful
08:14:26 <kmc> but i'm kind of tired and not putting a lot of thought into coming up with compelling examples
08:14:40 <kmc> i have a lot of different things on my mind today :/
08:16:38 <shachaf> 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 <shachaf> 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 <shachaf> Anyway that makes sense too.
08:21:14 <olsner> 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 <shachaf> RAII isn't really about constructors, and is a bad name.
08:22:25 <shachaf> "RAII" is also a bad name.
08:24:14 <olsner> 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 <b_jonas> 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 <kmc> shachaf: the fungus fair is on sunday
08:26:35 <kmc> fungot: the fungot fair is on sunday
08:26:35 <fungot> kmc: do you have the parens the important part for me.
08:27:20 <b_jonas> 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 <b_jonas> oerjan: ok, thanks for the feedback
08:28:33 <b_jonas> oerjan re "even legal" => more like, may get me banned from freenode
08:29:06 -!- Sgeo has joined.
08:29:57 <b_jonas> zzo38 re add a ban => doesn't help at all, you can still abuse the bot without it joining anywhere
08:30:13 <b_jonas> I abused it in private message and made it send to a -n channel
08:30:46 <shachaf> Wasn't RAII invented for exception handling anyway?
08:32:16 <b_jonas> 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:33:16 <shachaf> 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 <b_jonas> that it refers to a deleted file is just slightly weird compared to that
08:33:29 <kmc> b_jonas: ah
08:33:37 <kmc> i was wondering whether it might do something like that, as well
08:34:11 <shachaf> 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 <b_jonas> 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 <b_jonas> ``` stat -fc "%T %n" /hackenv /proc
08:36:35 <HackEso> hostfs /hackenv \ proc /proc
08:36:52 <shachaf> At least Linux is getting pidfd soon, I think.
08:37:35 <b_jonas> 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 <shachaf> b_jonas: I'm talking about parsing text in /proc.
08:39:32 <b_jonas> 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 <b_jonas> and it's not like copying short vectors is slow.
08:40:24 <shachaf> 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 <shachaf> Having it as an implicit thing when you call a function or whatever is ridiculous.
08:40:58 <shachaf> It requires a malloc call so it's not like it's fast.
08:43:14 <b_jonas> 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 <shachaf> 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 <b_jonas> "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 <b_jonas> 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 <b_jonas> only has std::string_view and the horribly overengineered std::span for now.
08:52:25 <shachaf> A copy of the struct seems OK? I guess C++ people wouldn't like that so they can ban it.
08:52:37 <shachaf> A copy of the data is ridiculous.
08:52:44 <b_jonas> 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 <shachaf> Reference counting is obviously ridiculous.
08:53:11 <b_jonas> shachaf: there can be different types for each of those
08:53:37 <b_jonas> 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 <shachaf> Instead of reference counting you can just manage the lifetime in some reasonable way.
08:54:14 <b_jonas> 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 <shachaf> For example, allocate at the beginning of the program and never free.
08:55:08 <b_jonas> allocate at the beginning and never free => that's the easiest thing, you can do that in C++ or basically any language
08:55:42 <b_jonas> you don't have to use a std::vector for everything
08:55:57 <shachaf> In fact I don't want to use it for anything.
08:56:10 <b_jonas> you don't have to use it for anything in your code either
08:56:12 <shachaf> Every time I look in /usr/include/c++/ I decide that the STL is scow.
08:56:36 <shachaf> It's all incomprehensible.
08:57:24 <shachaf> 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 <shachaf> If your program runs for five seconds, exit_group is certainly one of the best memory management strategies.
08:59:49 <zzo38> 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 <b_jonas> 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 <b_jonas> no messing around in /proc for something that doesn't need it
09:02:43 <b_jonas> shachaf: file seconds or longer. at file seconds already I want the type errors early.
09:03:02 <b_jonas> but yes, there's a point in that
09:03:16 <b_jonas> I don't need to release memory during those programs
09:03:45 <shachaf> At least if you fork you don't need to worry about race conditions since you're the parent.
09:03:47 <b_jonas> though I do want to destroy a few resource-holding objects that hold something other than memory, such as file handles
09:03:51 <zzo38> 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 <b_jonas> shachaf: while you're the parent, yes. but how do you tell to some other processes which process that is?
09:05:04 <b_jonas> those other processes may want to send signals or whatever, even after your process (the parent) exits
09:05:36 <shachaf> Sure, but you can open /proc/pid and send them the fd.
09:05:45 <zzo38> 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 <b_jonas> zzo38: yes, or have other children inherit it
09:07:32 <zzo38> b_jonas: Yes, if you are spawning them yourself
09:08:32 <zzo38> 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 <b_jonas> 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 <b_jonas> 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 <b_jonas> 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 <zzo38> I thought of that, and that is why the largest valid process ID has to be less than PIDFD-1.
09:12:17 <zzo38> (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 <shachaf> Ugh. Can all y'all just scrap half of Unix and make a good system call API?
09:14:24 <zzo38> 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 <shachaf> zzo38: What if I don't want compatibility with Unix?
09:14:53 <shachaf> Or at best I want it only for an emulation layer like WSL.
09:15:26 <ais523> 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 <shachaf> 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 <zzo38> 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 <shachaf> The goal is simplifying things, not adding layer and layers of wrappers.
09:16:16 <shachaf> But maybe the API itself is good?
09:16:51 <zzo38> (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 <zzo38> Use a library without Unix compatibility if you do not want it though, I suppose, is also possible.
09:17:28 <shachaf> 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 <shachaf> The actual WASI API might be reasonable? What's better about it than Linux?
09:20:49 <zzo38> I don't know what is io_uring
09:21:12 <shachaf> zzo38: https://kernel.dk/io_uring.pdf
09:21:28 <b_jonas> 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 <shachaf> That article maybe isn't the best introduction.
09:22:43 <b_jonas> 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 <zzo38> 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 <b_jonas> 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 <b_jonas> with existing large programs using all of them mixed and matched through libraries obviously
09:25:14 -!- b_jonas has quit (Quit: leaving).
09:25:17 <shachaf> b_jonas: Permit programs to use only one of the interfaces.
09:25:33 <shachaf> Just like Windows supported either Win32 or POSIX, but not both at once.
09:27:55 <zzo38> 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 <ais523> shachaf: I don't think WASI has a mandatory dependency on WebAssembly, although obviously it was designed for that use
09:31:35 <ais523> 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 <zzo38> (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 <ais523> zzo38: why not use a character in the symbol name that isn't valid in a UNIX program?
09:33:40 <zzo38> 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 <ais523> 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 <zzo38> 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 <zzo38> (So the kernel doesn't need to care what it is called.)
09:35:32 <ais523> won't the C compiler need to be modified anyway to produce programs for a new OS?
09:36:06 <ais523> 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 <ais523> IIRC it isn't in libc itself, but a separate standard library
09:36:52 <zzo38> Probably, but you will not need to modify the files which change how the program is parsed, I should think.
09:39:13 <ais523> 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 <ais523> …now I'm wondering whether C++ object files mangle the name of "main" or not
09:40:15 <zzo38> That is one of it, yes (there are a few additional parameters), but also for compatibility with UNIX.
09:41:08 <ais523> well, most C implementations let you give a function too many parameters without issue
09:41:26 <ais523> that's one of the reasons why caller-cleans is a more common calling convention than callee-cleans
09:41:33 <ais523> (IMO callee-cleans is much better for a number of reasons)
09:41:57 -!- Hooloovo0 has quit (Ping timeout: 240 seconds).
09:42:26 <ais523> so why not use the same entry point for plan10 programs and posix programs?
09:42:54 <zzo38> Because the default settings for Plan10 are not compatible with POSIX.
09:43:54 <zzo38> (The default implementation of plan10main sets up some stuff required for POSIX compatibility and then calls main.)
09:43:59 <ais523> what sort of settings are these? things like locale?
09:45:18 <zzo38> 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 <zzo38> (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 <ais523> oh, I see, for file descriptors inherited from the parent process there's no easy chance to configure that
09:47:49 <ais523> (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 <shachaf> Are file descriptors a good system?
09:48:00 <ais523> I can see an argument for file descriptors 1 and 2
09:48:30 <shachaf> 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 <ais523> 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 <shachaf> Rather than a bunch of special-case system calls.
09:48:40 <zzo38> 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 <shachaf> But sometimes people try too hard to fit things into that API.
09:48:51 <ais523> 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 <zzo38> (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 <shachaf> Sequential file descriptors are clearly scow.
09:59:37 <shachaf> Windows has HANDLEs, which I guess are pretty similar.
10:00:37 <shachaf> I guess they're not the same for various reasons.
10:03:31 <olsner> I consider HANDLEs and file descriptors both just handles for kernel objects
10:03:50 <olsner> (windows has some unrelated things that are typed HANDLE but aren't actually kernel objects though)
10:05:48 <olsner> 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 <shachaf> It probably makes sense to be able to have "system calls" implemented in userspace, as Windows does.
10:07:14 <shachaf> (Though maybe that's not really compatible with the ring buffer thing I was talking about before?)
10:07:29 <olsner> it's a good way to give you freedom on the kernel side to change your system calls
10:07:42 <zzo38> 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 <shachaf> I'm a little skeptical that things like POSIX are particularly good.
10:09:13 <shachaf> 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 <zzo38> I do think there are some problems with POSIX, and also some problems with Windows, and also other systems.
10:11:45 <zzo38> 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 <shachaf> zzo38: Is Plan10 some sort of banana pun?
10:12:32 <zzo38> (This correction can be made without recompiling the program; you only have to change one byte in the executable file.)
10:12:50 <zzo38> 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 <wib_jonas> 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 <wib_jonas> 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 <wib_jonas> but I admit I was a bit too sarcastic about compatibility
10:27:27 <wib_jonas> 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 <shachaf> wib_jonas: You can port programs to new interfaces just like you can port them to new OSes.
10:29:13 <shachaf> 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 <wib_jonas> 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 <wib_jonas> 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 <wib_jonas> or so I believe, but I'm not quite sure about this
10:34:06 <wib_jonas> 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 <wib_jonas> or so I believe, but again, I'm not sure in this
10:35:04 <shachaf> Aren't HANDLEs generally opaque?
10:36:04 <wib_jonas> 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 <shachaf> I thought they were sometimes pointers or other things.
10:41:30 <ais523> wib_jonas: IIRC in C++ main isn't allowed to be recursive (although in C it is)
10:41:52 <ais523> 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:35 <HackEso> dc is short for "dump core". (try it out yourself: dc -e '[')
11:33:07 <shachaf> I want a program to SEGV, any options?
11:35:53 <HackEso> bash: line 1: 54 Segmentation fault perl '-ekill 11,$$' \ 139
11:39:56 <ais523> `! c return *(int *)0;
11:39:59 <HackEso> /hackenv/interps/gcccomp/gcccomp: line 53: 68 Segmentation fault /tmp/compiled.$$
11:40:12 <ais523> can't get much more real SEGV than that
11:40:48 <ais523> 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 <shachaf> I wanted to test the program "catchsegv" that I just found out about.
11:41:49 <shachaf> But now I know how it works so I'm less curious.
11:43:13 <shachaf> (It uses LD_PRELOAD to set up a signal handler.)
11:44:04 <wib_jonas> ``` rm -v /hackenv/bin/culprits-ng
11:44:12 <HackEso> removed '/hackenv/bin/culprits-ng'
11:44:19 <wib_jonas> I created that long ago, but I don't use it
11:44:29 <HackEso> /hackenv/bin/culprits-ng//#!/bin/sh \ exec hg log -l 512 --template "{desc}\0" -- "$@" | perl -0ne '/^<([^>]*)>/ and print"$1 "'
11:46:39 <wib_jonas> I almost never want to look up just the users who modified a file, without other parts of the revision log
11:50:50 <fizzie> `culprits ../bin/culprits-ng
11:50:52 <HackEso> 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 <fizzie> Not 100% sure how culprits-ng differed from the regular one, other than the limit, no scowrevs, and no no-ping.
11:56:01 <shachaf> `` hg log -l 512 --template "{desc}\0" -- ../bin/culprits-ng | perl -0ne '/^<([^>]*)>/ and print"$1 "'
11:56:07 <HackEso> fizzie b_jonas b_jonas b_jonas b_jonas
11:56:23 <shachaf> `` hg log --removed -l 512 --template "{desc}\0" -- ../bin/culprits-ng | perl -0ne '/^<([^>]*)>/ and print"$1 "'
11:56:25 <HackEso> wib_jonas oerjan oerjan fizzie jeffl35 fizzie evilipse b_jonas b_jonas b_jonas b_jonas b_jonas
11:56:25 <HackEso> hoag "$@" | awk '{print substr($1,2,length($1)-2)}' | xargs -d'\n'
11:56:50 <wib_jonas> fizzie: no noping, no scowrevs, and different implementation.
11:58:01 <shachaf> What does it have to do with sanity?
11:58:11 <shachaf> It looks like a golfed Perl implementation.
11:58:36 <wib_jonas> 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 <wib_jonas> and I mean they hide their diffs, so you don't see the same change in the next revision either
11:59:28 <HackEso> scowrevs="$(/usr/bin/paste -sd'|' /hackenv/share/scowrevs)"; hg log -r "tip:0 & ! ($scowrevs)" "$@" | sed 's/\(\(^\| \)[<Itb][^ ]*\)\([^ ][^ ]\)/\1̈\3/'
11:59:37 <HackEso> 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:12 <shachaf> Not named by me, I have to say.
12:01:58 -!- ais523 has quit (Ping timeout: 245 seconds).
12:02:53 <wib_jonas> shachaf: sorry, it's not a saner implementation anymore, but it was back then:
12:02:54 <wib_jonas> ``` hg cat -r 7010 /hackenv/bin/culprits
12:02:55 <HackEso> hg log --removed "$1" | grep summary: | awk '{print substr($2,2,length($2)-2)}' | sed "s/.$/\x0F&/" | xargs
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 <wib_jonas> fungot, how do you pronounce the "g" in "Malbolge"? like "G" in "GIF", or like "g" in "gauge"?
14:56:13 <fungot> wib_jonas: no without using variables? like, mail me the .dbm and .log are 1.7m by now *8) 2)
15:01:29 <int-e> wib_jonas: Those are both terrible examples.
15:01:56 <int-e> wib_jonas: (I pronounced "GIF" wrong for a long time. And "gauge" has two different 'g's.)
15:02:19 <Cale> https://www.youtube.com/watch?v=ZpfaCiBtmOc one hundo
15:02:55 <int-e> wib_jonas: "It's pronounced JIF, not GIF."
15:03:20 <int-e> wib_jonas: Anyway, personally I'm going with 'rage', not 'game'. But I don't know.
15:03:54 <int-e> wib_jonas: Oh maybe that was intentional. Hmm mm. If so, sorry.
15:04:37 <int-e> (Though, honestly, no *very* sorry.)
15:05:00 <int-e> fungot: Do you like contrition?
15:05:01 <fungot> 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 <int-e> I'll take that as a "no".
15:05:58 <wib_jonas> fungot, how do you pronounce "Chesapeake"?
15:05:58 <fungot> wib_jonas: what's the matter with kawa? no tco? total cost whatwhat? that's too bad
15:11:36 <wib_jonas> fungot: total cost? NB "Chesapeake", not "cheapsake".\
15:11:37 <fungot> wib_jonas: was cale any help last night? all isps seemed to be
15:14:30 <myname> there are two ways to pronounce gif: a sane one and a smartass one
15:17:27 <shachaf> Cale: one hundo seems p. low for an undo
15:21:56 -!- imode has quit (Ping timeout: 240 seconds).
15:26:54 <esowiki> [[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 <myname> 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 <fungot> 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 <ais523> myname: I pronounce the g in "fungot" like the g in "fungi"
15:37:51 <fungot> 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 <ais523> I'm guessing this is ^style irc?
15:38:06 <fungot> 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:53 <myname> ais523: i do that too, but you could make a point of it coming from befunge
15:39:15 <myname> I suppose, if you pronounce gif as jif, you should pronounce fungot as funjot
15:39:15 <fungot> myname: http://youtube.com/ fnord richard dawkins " what if you're reading this
15:39:46 <ais523> myname: don't most Befunge impls have names which are a pun on "fungi"?
15:40:09 <ais523> (even though the back-derived etymology is based on "fungible", and the actual etymology was based purely on spelling)
15:40:38 <fizzie> "(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 <ais523> I didn't even realise that "fungi" allowed "g"=/dʒ/
15:42:09 <ais523> I don't think I've ever heard that pronunciation
15:44:32 <myname> 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 <Soni> is this esoteric? https://bpaste.net/show/6E66I
15:57:44 <ais523> it's a DSL, and I don't think we have a consensus on whether DSLs are esoteric
15:57:51 <ais523> they're probably esoteric if used for an unintended purpose
15:57:57 <ais523> is that thing TC when operating on fixed input, for example?
16:10:45 <Soni> I did think about making it so, but, no
16:28:56 <Soni> int-e: "bone"s are structural components of humans
16:29:31 <Soni> 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 <Soni> but I guess I ended up adding those in anyway
16:30:05 <Soni> and schemas are basically structural definitions
16:41:36 <esowiki> [[Esomachine]] https://esolangs.org/w/index.php?diff=67611&oldid=66926 * Dart * (-236) Formatting and terminology
16:42:04 <wib_jonas> wait, fungi and fungot are pronounced differently?
16:42:04 <fungot> 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 <wib_jonas> I mean, fungi and befunge are pronounced differently?
16:43:39 <fizzie> "fungi" and "fungible" are (potentially) pronounced differently, and I think "Befunge" follows the latter usually.
16:43:48 <wib_jonas> apparently "fungi" is pronounced both ways
16:44:52 <int-e> "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 <fizzie> Four ways (according to wiktionary), though only two relate to the kind of 'g'. /ɡ/ vs. /dʒ/ and /aɪ/ vs. /iː/.
16:49:30 <int-e> (I looked at the Befunge page in hopes of a pronunciation guide but there doesn't seem to be one.)
16:51:48 <int-e> Oh great, "fungi" has two pronunciations?
16:53:14 <esowiki> [[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 <myname> no, 4, only 2 regarding the g
16:53:41 <esowiki> [[Talk:Esomachine]] https://esolangs.org/w/index.php?diff=67613&oldid=67612 * Dart * (+17) /* Inconsistencies */
16:54:11 <esowiki> [[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 <b_jonas> kspalaiologos: sorry, it may have been a bit rude to take over your bot
18:33:51 <b_jonas> bfbot. it's your bot, isn't it?
18:34:47 <kspalaiologos> but if it had a few "holes" it wouldn't be bad if it was left anyway
18:35:05 <kspalaiologos> because I knew there is going to be a severe security hole in this bot
18:35:08 <b_jonas> 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:31 <b_jonas> 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 <b_jonas> both of those are serious security bugs
18:35:48 -!- heroux has joined.
18:36:09 <b_jonas> I asked it to send a message to register his nickname bfbot for my account
18:36:27 <b_jonas> then I told nickserv that bfbot is my nick and the bot isn't allowed to use it
18:36:54 <b_jonas> 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:16 <b_jonas> 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:38:20 <kspalaiologos> I may send you the source code for further review as I fix the bugs
18:38:30 -!- kritixilithos has joined.
18:38:37 <b_jonas> 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:50 <b_jonas> looks like this: ":b_jonas!~x@catv-176-63-14-58.catv.broadband.hu PRIVMSG #esoteric :=echo hello\r\n"
18:39:03 <kritixilithos> kspalaiologos: I thought the bot was written in seed :/
18:39:09 <b_jonas> it has words separated by colons. the first word is always the source, the second is the command
18:39:25 <b_jonas> 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:51 <b_jonas> note that the channel name may contain colons, it's only colons at the start of a word that mark the final argument
18:40:17 <b_jonas> 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:44 <b_jonas> for PRIVMSG in a message the server sends you, that will always be the fourth word
18:41:18 <kspalaiologos> the "thing" matching the regex is actually not matching a newline at the end
18:41:33 <kspalaiologos> 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:42:38 <b_jonas> kspalaiologos: the server always sends you \r\n , which are the bytes 0xD then 0xA
18:42:46 <b_jonas> if you send a message to the server, then \n is enough
18:43:33 <b_jonas> 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:58 <b_jonas> 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 <b_jonas> 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:40 <b_jonas> this makes it easy to write a client, but harder to write a good irc server
18:44:56 <b_jonas> 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:45:14 <b_jonas> how do you bring the bot back => no idea, kill then restart your program or something
18:47:50 <b_jonas> 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 <esowiki> [[Fpulse]] https://esolangs.org/w/index.php?diff=67615&oldid=49958 * Dart * (+0) Changed redirect target from [[Fpulse/]] to [[F-PULSE]]
18:49:30 <b_jonas> kspalaiologos: anyway, before I took the bot down, I made it loop by sending a message that it misparsed
18:50:00 <b_jonas> it was after that that I decided it was buggy enough that I can just have the irc server eject it
18:50:41 <kspalaiologos> and burn the code printouts to get rid of it for real
18:52:41 <b_jonas> 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 <b_jonas> 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 <b_jonas> 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 <ais523> <shachaf> 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:22:26 <b_jonas> 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 <ais523> OK, that's what I'd expect it to do
19:22:48 <b_jonas> the move constructor moves the vector contents by updating pointers in the headers, and leaves the original one empty
19:23:13 <ais523> oh right, because in C++ a moved-out-of object can still be referenced
19:23:24 <ais523> (C++ "move" corresponds to Rust "take" rather than Rust "move")
19:23:57 <ais523> 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 <b_jonas> 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 <ais523> in C you often deal with a four-state transition, allocate/initialise/deinitialise/deallocate
19:24:20 <ais523> and RAII says you merge the first two and last two
19:24:56 <ais523> OK, now I have to ask what the difference between a list and a vector is
19:25:01 <ais523> is the list linked? because that's ridiculous
19:25:06 <b_jonas> C++ std::list is a doubly linked list
19:25:58 <ais523> 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 <b_jonas> 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 <b_jonas> ais523: yes, that's close to true
19:26:50 <b_jonas> 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 <b_jonas> 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:30:03 <b_jonas> 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 <ais523> 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 <b_jonas> 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 <b_jonas> 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.