00:00:05 <int-e> oerjan: you probably missed this global message: http://paste.debian.net/1071134/
00:00:27 <shachaf> zzo38: I want coroutines that compile to state machines instead of stack switching.
00:00:51 <oerjan> int-e: and are the messages working? >:)
00:01:00 <int-e> (I suppose that's why it stopped for now. For anybody reading this in the future: Freenode enabled some global server-side filtering for PRIVMSG.)
00:01:05 -!- ChanServ has set channel mode: +o oerjan.
00:01:16 <b_jonas> int-e: yes, I know, the wrote about that
00:02:45 <b_jonas> int-e: http://freenode.net/news/spamfilter
00:03:09 -!- ChanServ has set channel mode: -q $~a.
00:03:16 -!- oerjan has set channel mode: -o oerjan.
00:03:27 <oerjan> come to think of it, i don't need op for this
00:03:31 <b_jonas> I thought we were past that
00:04:06 <b_jonas> again quieting users without account
00:04:18 <int-e> b_jonas: I just don't understand how you writing about this at some arbitrary point in the past is relevant to answering a question that arose just now.
00:04:44 <b_jonas> int-e: I wasn't writing about it
00:04:45 -!- tromp has quit (Remote host closed the connection).
00:05:14 <b_jonas> about the server-side spam filter
00:05:21 <int-e> But I'm also more easily annoyed right now than I should be. The "for the future" comment was because the paste will expire.
00:05:45 <oerjan> b_jonas: i added it yesterday just in case while waiting for freenode to solve it globally
00:06:05 <b_jonas> oerjan: meh, I probably just don't notice the spam
00:07:14 <orin> https://www.youtube.com/watch?v=r3A6fsBqOHg
00:07:54 <int-e> Enviable. I need /ignore for that...
00:08:23 <orin> added 痩痴瘍療癒癖皆盆
00:11:11 <oerjan> b_jonas: mostly likely they didn't get around to this channel this time, anyway
00:11:50 <oerjan> and iirc last time they were using ridiculously annoying colors, unless that was a different spammer
00:14:18 -!- xkapastel has quit (Quit: Connection closed for inactivity).
00:15:38 -!- 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.”).
00:16:40 <orin> they didn't get to this channel but they were claiming that exherbo linux was "linuc for pedophiles"
00:17:46 <int-e> shachaf: I think a compiler is still allowed to try very hard to avoid allocations.
00:18:09 <shachaf> int-e: I just want a struct, man
00:18:48 <int-e> it's a cruel world; we hardly ever get what we want.
00:18:57 <shachaf> Especially when we use C++.
00:19:50 -!- Lord_of_Life_ has joined.
00:21:05 <oerjan> ok either my memory is toast (PLAUSIBLE) or the mezzacotta comics are no longer unchanging. writing down the start of some recent ones to recheck tomorrow.
00:21:18 <b_jonas> oerjan: oh, the _colors_, those I don't display using the irc client.
00:21:42 <HackEso> Welcome to the international hub for esoteric programming language design and deployment! For more information, check out our wiki: <https://esolangs.org/>. (For the other kind of esoterica, try #esoteric on EFnet or DALnet.)
00:22:57 -!- Lord_of_Life has quit (Ping timeout: 245 seconds).
00:22:57 -!- Lord_of_Life_ has changed nick to Lord_of_Life.
00:28:49 -!- housecarpenter has quit (Read error: Connection reset by peer).
00:29:12 -!- housecarpenter has joined.
00:51:52 -!- housecarpenter has quit (Read error: Connection reset by peer).
00:52:14 -!- housecarpenter has joined.
01:08:10 -!- ais523 has joined.
01:08:28 <ais523> orbitaldecay: I had an idea like Poolshark myself a while ago, but it was much more ambitious and I couldn't make it work
01:08:51 <ais523> for the language as you've written it, though, it would be clearly TC if not for the requirement that the mirrors that make up the region have to be connected
01:08:54 <ais523> err, Turing-hard, anyway
01:08:58 <ais523> as pointed out, it's not obvious it's computable
01:09:56 <ais523> the basic idea is to write a program so that the angle of the bouncing ray is always known (except in very small areas that act as lenses), and you encode a rational number in its position/displacement
01:10:17 <ais523> then you can effectively build a divmod-counter machine
01:11:02 <shachaf> So what's the right model for a computable function on computable reals?
01:11:02 <ais523> what does Mario Galaxy have to do with this? besides, now you mention it, probably being TC in its own right
01:11:22 <shachaf> There's a sort of two-way dialogue between the caller and the function, and it seems like it'd be nice to model it explicitly.
01:11:29 <ais523> shachaf: that's a very hard question, because equality of computable reals is not decidable
01:11:37 <b_jonas> ais523: mario galaxy has a part where mario walks in a straight line on the surface of a polyhedron, and there was something somewhere about how the long term behavior of that is hard to compute
01:11:50 <shachaf> I didn't require it to be decidable.
01:11:55 <ais523> if you want an explicit model for two-way dialogues that implement functions, though, look up "game semantics", that's pretty much exactly what game semantics is for
01:12:11 <shachaf> OK, simpler question: What's the right model for a computable function on conatural numbers?
01:12:34 <shachaf> A conatural number is either a natural number or infinity.
01:12:37 <ais523> it's a weird field, the basic ideas of game semantics are applicable in a huge number of fields and it's really easy to prove things with it, but all the terminology is terrible
01:12:56 <shachaf> Or: A program that either prints some finite number of 1s and halts, or prints 1s forever.
01:13:02 <ais523> b_jonas: that doesn't surprise me
01:13:35 <ais523> shachaf: what facilities do we have for /reading/ these numbers? that seems relevant here
01:13:54 <ais523> do we have to read them a digit at a time, like a finite state machine (thus we can't distinguish ∞ from an unknown large number)?
01:13:54 <shachaf> Well, I'm looking for a nice model. Effectively all these things are equivalent, but the way you express them is very different.
01:14:27 <shachaf> Just like you can only read a computable real to a finite precision at a time.
01:14:58 <ais523> in the paper I'm currently working on at work (as in, right now), I formalized something like this as a function for which prefixes of the input produce prefixes of the output
01:15:09 <ais523> like, if f(x::y)=z, then f(x) is a prefix of z
01:15:13 <b_jonas> oh, you mean reading them in unary?
01:15:20 <ais523> b_jonas: doesn't matter
01:15:27 <shachaf> Yes, conatural numbers are represented in unary the way I put it.
01:15:44 <shachaf> You can also say that you can ask it "are you <= n?" for any n.
01:15:53 <ais523> or, hmm, it matters in that you can have different infinities if you use a larger base
01:16:01 <shachaf> ais523: You know the "seemingly impossible functional programs" thing?
01:16:12 <b_jonas> or dyadic numbers or something
01:16:12 <shachaf> Equality of total predicates on conatural numbers is decidable.
01:16:17 <ais523> shachaf: very well, the person who invented it works at my department
01:16:44 <shachaf> I didn't know he was there.
01:16:54 <b_jonas> hmm, I seem to remember I saw that somewhere
01:17:01 <ais523> also was the internal examiner for my PhD
01:17:03 <shachaf> OK, then you know what I'm getting at here.
01:17:54 <shachaf> So maybe my vague argument is, the whole "seemingly impossible" thing comes from having a complicated model for computation.
01:18:18 <shachaf> If you just had Turing machines, you could simulate the predicate, and see what questions it asks you.
01:18:44 <shachaf> (Which is also awkward but in a different way.)
01:19:18 <ais523> I guess a less impossible-seeming program, but related, is the worst-case comparison predicate
01:19:46 <ais523> it's specified as follows: suppose you have a comparison sorting algorithm that never makes redundant calls to the comparison predicate
01:20:07 <ais523> the worst-case comparison predicate will cause any such sorting algorithm to take as long as possible to sort the list
01:20:29 <ais523> (it does it by choosing how to compare the list elements based on what the sorting algorithm is asking it, i.e. dynamically invents a worst case as it goes)
01:21:24 <shachaf> It seems to me that a nicer model of this might remove the nesting and simulation and so forth.
01:21:55 <shachaf> When I give ask f for an approximation of f(x) within a precision, it just asks me for an approximation of x within some precision.
01:22:17 <ais523> PPCG had a question about writing automatic counterexample generators for purported halting problem solvers; that was also a pretty similar idea
01:22:19 <shachaf> I mean that it asks me explicitly, rather than with a "callback" or something the way it's usually modeled, by asking x.
01:23:41 <ais523> as I said, game semantics is quite good at modelling the "you ask a question of a value, it gives you an answer"
01:23:53 <ais523> although one problem is that it's more like a general framework for model-building, rather than a specific model
01:24:31 <b_jonas> is communication complexity a more specific model, for when you care more about the details?
01:25:13 <shachaf> I think thinking of computable functions on computable reals as a two-way channel helps here.
01:25:17 <ais523> I haven't heard the phrase "communication complexity" before, but if it means what you'd expect from the two individual words forming it, then yes
01:26:27 <b_jonas> maybe it's not called that then? let me check
01:27:14 <b_jonas> https://complexityzoo.uwaterloo.ca/Complexity_Zoo:P#pcc definitely says "communication complexity"
01:27:59 <ais523> b_jonas: I wouldn't expect to have heard of it
01:28:06 <b_jonas> strange that you haven't heard of it
01:28:22 -!- housecarpenter has quit (Read error: Connection reset by peer).
01:28:44 -!- housecarpenter has joined.
01:29:17 <ais523> not really, I generally study computability classes more than complexity classes
01:29:55 <ais523> at least in the fields I've been working in, people rarely do things like Huffman-coding the various possible messages that can be sent between the parts of a program, and doing that is required for communication complexity to be meaningful
01:30:23 <ais523> (that said, the Verity compiler needs to come up with explicit codings because it's generating physical hardware rather than mathematical objects, but I haven't put much effort into optimising that)
01:30:39 <b_jonas> well, you don't have to actually do the Huffman coding, more like just make proofs about ap..
01:32:12 <ais523> oh right, because you don't care about constant factors
01:32:28 -!- Phantom_Hoover has quit (Remote host closed the connection).
01:32:31 <shachaf> So all these "seemingly impossible" things rely on compactness in some sense.
01:32:42 <ais523> so as there are a finite number of possible messages, you could even use one-hot and it wouldn't change the complexity, you're just multiplying by a constant
01:32:57 <shachaf> But I don't think I understand the computational content of compactness very well. Do you?
01:33:13 -!- housecarpenter has quit (Read error: Connection reset by peer).
01:33:22 <ais523> no, topology is one of the fields I don't really know much about at all
01:33:37 -!- housecarpenter has joined.
01:33:54 <shachaf> Escardó wrote that thing about synthetic topology which I've only read part of.
01:33:59 <b_jonas> In Jules Verne's ''Pilot du Danube'', the band of evil guys has a person captured, but then the leader bad guy has doubts about the identity of the prisoner. however, he decides on just trying to ask about the appearance of the prisoner from a minion, rather than visiting him in person,
01:34:02 <shachaf> I guess I ought to read it properly.
01:34:39 <b_jonas> he argues that he doesn't want the prisoner to recognize him and know that he's the leader of the bad guys. but that makes no sense, because they could just put a blindfold on the prisoner, as they've done when they took him to the secret hiding place.
01:36:37 <b_jonas> and we do know (out of universe) that the band leader would have recognized him
01:36:51 <esowiki> [[ALLSCII]] https://esolangs.org/w/index.php?diff=60210&oldid=60205 * Cortex * (+331)
01:52:17 <ais523> shachaf: actually, thinking more about the seemingly-impossible thing, the reason it works on Cantor and not Integer is /because/ Cantor is general enough that it's hard to write total functions on it
01:52:47 <ais523> on Integer, your program can have an infinite decision tree and still be finite on any particular integer
01:53:21 <ais523> but on Cantor, your program must have a finite decision tree, because if it had any infinite branch, you could pick a value in Cantor for which it would go down the infinite branch forever and never decide (thus would be non-total)
01:53:25 <shachaf> Being total on a conatural number is a very strong restriction.
01:53:30 <shachaf> Or on an infinite bit stream, sure.
01:54:31 <b_jonas> oh, so that's what you mean by compactness
01:54:44 <ais523> I think once you realise that, all the details of actually implementing functions like find become mostly irrelevant, they're basically just methods of empirically determining what the decision tree is
01:54:57 <ais523> and comparing the trees is trivial once you know what they are
01:55:47 <ais523> so I guess a good model of total functions Cantor → x is as actual listings of all possible tree branches
01:56:29 <shachaf> I don't think they're really irrelevant.
01:56:30 <ais523> I think that's a proper denotational semantics, in the sense that each function has only one denotation, and two functions with the same denotation are equal (it's also fully abstract, i.e. each denotation corresponds to some function)
01:56:52 <shachaf> Well, how about this: If you have predicates on some arbitrary type T, (T -> Bool), what do you demand from T in order to implement find?
01:57:50 <ais523> ugh, this is one of the cases where I think I know what the answer is, but don't have words available in any natural language to explain it
01:58:31 <oerjan> (edwardk probably knows)
01:58:52 <shachaf> I mean, I think the answer is "compactness" or maybe a little more than that.
01:59:49 <b_jonas> does the logic kind of compatness has anything to do with the calculus kind of compactness, other than the name? the logic one has the theorem that if any finite subset of a first order axiom system is satisfiable then the whole thing is satisfiable; the calculus kind says that a continuous function from a bounded closed subset of R^n is uniform continuous.
01:59:55 <b_jonas> both of those compactnesses are very useful.
02:00:42 <b_jonas> the calculus one comes up all the time in proofs; the logic one comes up all the time in heuristics.
02:01:04 <b_jonas> but I wonder why the name is the same
02:01:09 <oerjan> hm apparently today is Cantor's birthday
02:01:29 <b_jonas> there's probably some crazy logic reason behind it.
02:02:03 <shachaf> Yes, the topology kind of compactness is equivalent to "For any S of closed sets, if the intersection of any finite subset of S is nonempty, then the intersection of S is nonempty".
02:03:32 <ais523> when you put it like that, I think it's the property I was looking for
02:03:42 <ais523> I didn't get there from the normal definition of compactness though
02:04:07 <shachaf> How do you write find with that?
02:05:02 -!- Essadon has quit (Quit: Qutting).
02:05:32 <b_jonas> also I should read up on the Baire thing at some point and understand it at least a little
02:05:46 <b_jonas> the Baire category theorem
02:06:15 <b_jonas> I'm not sure what it says, but it's some topological property of the set of real numbers that lets you prove some things
02:06:30 <shachaf> ais523: The original motivation for thinking about these things is the fact that integration of computable functions is computable.
02:06:44 <shachaf> Which wasn't obvious to me until I thought of it in these other terms.
02:08:17 <ais523> shachaf: I'm interested in knowing whether or not Analogia is computable
02:08:23 <ais523> you're making it sound like it is
02:08:36 <ais523> although it wouldn't follow directly from that result
02:08:56 <ais523> (fwiw, I'm still uncertain whether or not it's TC; it's very easy to accidentally use an operation Analogia doesn't have in your attempted proof)
02:10:24 <oerjan> b_jonas: in case it wasn't obvious from shachaf's statement, both of those are special cases of the topological one
02:10:50 <b_jonas> oerjan: um, both of what are special cases of what?
02:10:58 <b_jonas> both of the compactness theorems?
02:12:08 <oerjan> closed bounded intervals are topologically compact, from which you can prove the uniform continuity thing
02:12:18 <b_jonas> yes, in that case the concept is clear
02:12:25 <b_jonas> I don't know what the concept is in logic though
02:13:20 <b_jonas> (the calculus compactness also has the handy corollary that such functions are bounded)
02:13:45 <shachaf> ais523: Anyway I think the answer is probably something close to compactness as stated, but more computational.
02:13:54 <shachaf> and maybe overtness is also involved??
02:14:12 <b_jonas> (but that boundedness is weaker than we want, because I know at least one case when the compactness helps even though we know boundedness in advance)
02:18:54 <b_jonas> I also had a totally different maths question, but I forgot what it was
02:20:14 <oerjan> i think one way of interpreting the logical compactness is to say that a "point" is a maximal set of consistent propositions, and then each proposition corresponds to the closed set of all points satisfying it
02:21:16 <b_jonas> oerjan: but what's the topology to which that is closed?
02:21:43 <b_jonas> or is that trying to defined the topology with a co-base?
02:24:17 <oerjan> since you can join propositions with OR, you can just take propositions as the co-base, i think
02:24:19 -!- housecarpenter has quit (Read error: Connection reset by peer).
02:24:43 -!- housecarpenter has joined.
02:41:31 <kmc> does anyone here know about statistics
02:42:19 <kmc> I have some data and want to answer the question "do these data appear to be normally distributed"
02:42:27 <kmc> what's a good way to do it?
02:42:33 -!- adu has joined.
02:42:42 <kmc> I know about the Kolmogorov-Smirnov test, it sounds like it does exactly this, but I've never used it before
02:43:09 <zzo38> I have not used it before either, so I don't know.
02:43:24 <pikhq> Statistics honestly left my head after I finished that class.
02:43:35 <pikhq> Which made stochastic modelling... interesting.
02:44:15 -!- orbitaldecay has quit (Ping timeout: 256 seconds).
02:47:15 <kmc> ok there's a whole article about it https://en.wikipedia.org/wiki/Normality_test
02:48:00 <kmc> in my application, each dataset is a time series of the received signal strength on a particular radio frequency over time
02:48:32 <kmc> I want to distinguish frequencies that are in use from those which are not.
02:48:52 <kmc> here's what it looks like https://i.imgur.com/Gwaz5p9.png (frequency on horizontal axis, time on vertical)
02:48:57 <b_jonas> kmc: why would the received signal strength be normal distributed?
02:49:11 <b_jonas> for an unused frequency that is
02:49:16 -!- housecarpenter has quit (Read error: Connection reset by peer).
02:49:26 <kmc> I don't know, but many noise processes are?
02:49:30 <kmc> it's just a default assumption
02:49:39 -!- housecarpenter has joined.
02:50:14 <b_jonas> not very convincing, but I guess you could try if it works for your application
02:50:14 <kmc> my first attempt at solving this problem, which worked okay, is simply to take the standard deviation of each time series (each column in the plot)
02:50:46 <kmc> then the active frequencies are those which are above a certain threshold std. dev.
02:52:34 <kmc> (and are not within 16 kHz of a frequency with greater std. dev.)
02:54:33 <b_jonas> are you looking for modulated EM signals originating from extraterrestrial civilizations here?
02:54:59 <kmc> though I suppose it's not completely unlike that :P
02:55:10 <kmc> but no I'm just looking at which ham radio frequencies are in use locally, and when
02:56:13 <kmc> I have got a little computer in my living room which scans the whole 2m band (144 - 148 MHz) every 4 seconds and logs the power levels
02:57:12 <kmc> as you can see some frequencies receive a lot of power all the time, probably due to manmade interference from the thousands of electronic devices in proximity, including the computer itself
02:57:32 <kmc> (this is not a well-isolated or low-noise setup)
02:57:50 <kmc> and some of the actual signals on other frequencies are much weaker
02:57:58 <kmc> but can be distinguished by the fact that they aren't present all the time
02:58:53 -!- housecarpenter has quit (Quit: Leaving).
03:01:05 <kmc> actually I bet I can distinguish them from skewness alone
03:01:07 <kmc> https://docs.scipy.org/doc/scipy-0.15.1/reference/generated/scipy.stats.skew.html
03:01:07 <fizzie> Another simplistic solution is to just subtract the long-term average to remove all stationary noise.
03:01:39 <kmc> that is smart and very simple
03:02:27 <kmc> it's easy to overcomplicate things with statistics
03:08:57 <kmc> only problem is, the background level of power seems to change over time
03:10:31 <kmc> here is a 25 hour recording: (warning, very tall image) https://ibin.co/w800/4Ys1u47OCtDS.png
03:11:19 <kmc> background noise comes and goes, who knows why. could be aliens, could be a lamp switching on somewhere
03:13:11 <kmc> also if a very strong signal appears, the RF amplifier automatically decreases its gain, causing an apparent reduction in noise (and signal) on other frequencies
03:13:46 <kmc> oh well, it's fun to stare at such plots anyway
03:15:29 <kmc> the raw data for that plot is a 30 MB gzip'd CSV
03:16:39 <kmc> giving the power (in dBm) at 4 kHz steps from 144 MHz up to (and not including) 148 MHz
03:16:42 <kmc> generated by the rtl_power utility
03:19:02 <kmc> it's not necessary to tune each individual frequency in sequence, because the RTL-SDR hardware samples a full 2 MHz of spectrum at once. the 4 kHz bins are recovered by fast fourier transform
03:21:40 <kmc> software defined radio is really cool, but I already rambled about that here :P
03:22:41 -!- Remavas has quit (Quit: Leaving).
03:23:41 <kmc> speaking of lamps, I've noticed that if I transmit on the 70 cm band (around 440 MHz), the motion-activated floodlight on my deck turns on :P
03:25:31 <fizzie> I got one of those DVB sticks that are allegedly a little useful for SDR, but never really got an antenna of any kind for it.
03:41:18 <kmc> aw, too bad
04:26:14 -!- tromp has joined.
04:30:56 -!- tromp has quit (Ping timeout: 255 seconds).
04:41:05 -!- FreeFull has quit.
05:42:58 <esowiki> [[Esolang:Featured languages/Recent]] https://esolangs.org/w/index.php?diff=60211&oldid=59223 * Ais523 * (+0) archive Funciton
05:43:59 <esowiki> [[Esolang:Featured languages]] https://esolangs.org/w/index.php?diff=60212&oldid=59224 * Ais523 * (+888) /* Archive */ archive Funciton
05:52:27 <esowiki> [[Esolang:Featured languages/Current]] https://esolangs.org/w/index.php?diff=60213&oldid=59225 * Ais523 * (-83) featured language blurb for [[Thue]]
05:53:10 <esowiki> [[Thue]] https://esolangs.org/w/index.php?diff=60214&oldid=55414 * Ais523 * (+22) {{featured language}}
05:53:31 <esowiki> [[Esolang:Featured languages/Candidates]] https://esolangs.org/w/index.php?diff=60215&oldid=59227 * Ais523 * (-111) /* List of candidates */ Thue is now featured
05:53:48 <ais523> hmm, finding good languages to feature is hard
05:55:23 <ais523> most of the candidates, either I don't think they were featurable at the moment due to substandard articles, being uninteresting as languages, or being too similar to Funciton; or else I'm personally involved in them or have nominated them, and thus can't make an unbiased judgement
06:08:15 <Hooloovo0> so the answer is to nominate none of them, and make someone else doit
06:08:35 <ais523> yes, but admins historically don't update the featured language much
06:08:46 <ais523> we parked it on brainfuck a while ago because nobody was updating and it seemed like a safe place to park it
06:09:05 <ais523> one admin updating is an improvement, but means that it's hard to feature languages that that admin was involved in
06:09:25 <ais523> (and Esolang admins tend to have been involved with lots of esolanguages just due to the nature of the job)
06:10:59 <ais523> hmm, I guess this would be a good time for a candidate reset
06:11:18 <esowiki> [[Esolang:Featured languages/Candidates]] https://esolangs.org/w/index.php?diff=60216&oldid=60215 * Ais523 * (-1146) /* List of candidates */ candidate reset; we're really due for one of these, I think
06:14:14 <ais523> oerjan: the candidate list hadn't been reset since 2012
06:14:17 -!- tromp has joined.
06:14:42 <ais523> it seems plausible that some of the people who posted there have had new ideas about languages they like within the last 7 years
06:14:52 <ais523> and "the featured language was stuck on BF for years" implies a good timing for it
06:15:09 <esowiki> [[Special:Log/newusers]] create * Hooloovoo * New user account
06:15:55 <ais523> "infrequently" is fair enough, but 7 years is too long
06:18:12 <esowiki> [[Esolang:Introduce yourself]] https://esolangs.org/w/index.php?diff=60217&oldid=60183 * Hooloovoo * (+207)
06:18:44 -!- tromp has quit (Ping timeout: 250 seconds).
06:18:59 <esowiki> [[Special:Log/delete]] delete * Ais523 * deleted "[[FerNORo]]": plagiarism of [[FerNANDo]]; not a copyvio (source is public domain), but this is just an existing language with OR/AND swapped in the spec (and inconsistently so), and the author name changed
06:28:12 <oerjan> a joke language might be good for next month
06:28:31 <oerjan> last we featured a language in april it was deadfish
06:29:04 <ais523> yes, if you feature joke languages, April is a good time for it
06:29:59 <ais523> what are the most interesting joke languages out there? Unnecessary comes to mind
06:30:19 <ais523> TURKEY BOMB is one of the best joke languages but its article is a stub
06:31:16 <ais523> Esme also came to mind, but featuring that would ''not'' be a good idea
06:31:29 <Hooloovo0> I've known merthese for a long time, but I'm not sure it works as a featured lang
06:33:32 <ais523> Merthese doesn't have much to distinguish it from the other string-printing loopless imperative languages
06:33:47 <ais523> it's a good example of those but we might be able to find a better one, if we want to feature most of those
06:34:02 <ais523> it's not an esolang genre that's particularly popular among readers of the wiki, though (as opposed to writers)
06:34:20 -!- imode has quit (Ping timeout: 250 seconds).
06:34:32 <ais523> the article itself is great, though
06:35:52 <Hooloovo0> yeah, that's about what I was thinking
06:36:24 <ais523> OK, I just reread https://esolangs.org/wiki/Merthese and it was even better the second time
06:36:35 <ais523> the language is clearly a trainwreck, but it's a trainwreck that's had a lot of love and thought put into it
06:37:10 <ais523> e.g. first I missed the duplicate commands, and then I missed the resolution of the duplicate commands
06:38:22 <ais523> I guess what makes the language great is the development process
06:38:56 <Hooloovo0> yeah, all the @kerm, @nikky, etc are people who added the extension
06:39:58 <ais523> you can't even reliably use it as a Deadfish-alike, because the command that increments the accumulator is sometimes interpreted as printing a newline instead
06:41:31 <ais523> well, x86 doesn't have a command for printing newlines at all :-D
06:41:58 <Hooloovo0> I joined cemetech a bit too late to contribute to it (I guess I could have, but I was a nooob at the time)
06:43:31 <Hooloovo0> hmm, I feel like binary lambda calculus should be extended
06:44:36 <ais523> oerjan: what about HQ9+? we might have to expand the article a bit, but the language itself makes a point in a funny way, and is well-known
06:45:31 <shachaf> why would you feature a well-known thing
06:46:08 <kmc> shachaf: hichaf
06:46:26 <ais523> shachaf: well, it depends on what the purpose of featuring languages is
06:46:43 <ais523> it's maybe not well-known enough that every visitor to the wiki knows about it already, but it became well-known for a reason
06:48:47 <Hooloovo0> what about something competitive like bfjoust?
06:50:16 <ais523> oh, BF Joust is definitely featurable
06:50:39 <ais523> although I can't nominate it because I created the current version (although not the original version)
06:51:23 <ais523> October would be a good month to do the actual featuring for that
06:56:02 <Hooloovo0> recently I had a friend link to https://esolangs.org/wiki/SyL
06:56:16 <Hooloovo0> response: wow, I feel like that system of numbers is maximally designed to fuck with Japanese speakers
07:01:20 -!- adu has quit (Quit: adu).
07:01:41 -!- adu has joined.
07:02:06 -!- adu has quit (Client Quit).
07:02:28 -!- adu has joined.
07:02:53 -!- adu has quit (Client Quit).
07:03:21 -!- adu has joined.
07:03:40 -!- adu has quit (Client Quit).
07:04:06 -!- adu has joined.
07:04:19 <Hooloovo0> nothing else too interesting, some fish, a chicken, other boring ones, etc
07:04:26 -!- adu has quit (Client Quit).
07:04:53 -!- adu has joined.
07:05:13 -!- adu has quit (Client Quit).
07:08:59 -!- tromp has joined.
07:13:23 -!- tromp has quit (Ping timeout: 255 seconds).
07:17:15 -!- iconmaster has joined.
07:21:37 -!- ais523 has quit (Quit: quit).
07:48:50 -!- tromp has joined.
07:54:28 -!- arseniiv has joined.
08:14:48 -!- oerjan has quit (Quit: Nite).
09:37:24 -!- LKoen has joined.
09:48:41 -!- AnotherTest has joined.
09:48:48 -!- xkapastel has joined.
09:53:49 -!- tromp has quit (Remote host closed the connection).
09:58:03 -!- LKoen_ has joined.
10:01:27 -!- LKoen_ has quit (Client Quit).
10:01:41 -!- LKoen has quit (Ping timeout: 257 seconds).
10:01:42 -!- LKoen_ has joined.
10:14:51 -!- tromp has joined.
10:48:35 -!- 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.”).
10:48:52 -!- LKoen has joined.
10:49:52 -!- LKoen_ has joined.
10:53:54 -!- LKoen has quit (Ping timeout: 264 seconds).
11:25:38 -!- magickal has joined.
11:26:39 <magickal> can someone help? can all magick be considered witchcraft?
11:30:20 <myname> you might want to read the topic
11:32:38 -!- Phantom_Hoover has joined.
11:54:35 -!- magickal has left ("Leaving").
12:02:44 <LKoen_> oh, it's a cloning factory
12:02:50 <LKoen_> I got the wrong channel too
12:07:02 -!- xkapastel has quit (Quit: Connection closed for inactivity).
12:21:09 -!- Lord_of_Life_ has joined.
12:23:10 -!- Lord_of_Life has quit (Ping timeout: 250 seconds).
12:23:28 -!- Lord_of_Life_ has changed nick to Lord_of_Life.
12:55:01 <b_jonas> kmc: what framerate and exposure time do you use when measuring the power?
13:02:00 -!- Essadon has joined.
13:03:01 <b_jonas> ais523: has /// been featured yet?
13:03:08 -!- Essadon has quit (Max SendQ exceeded).
13:30:36 -!- S_Gautam has joined.
13:42:10 -!- FreeFull has joined.
14:10:26 <b_jonas> `bobadventureslist http://bobadventures.comicgenesis.com/d/20190303.html
14:10:27 <HackEso> bobadventureslist http://bobadventures.comicgenesis.com/d/20190303.html: b_jonas
14:10:53 <b_jonas> `ehlist http://eheroes.smackjeeves.com/comics/2755886/when-inspiration-strikes/
14:10:54 <HackEso> ehlist http://eheroes.smackjeeves.com/comics/2755886/when-inspiration-strikes/: b_jonas
15:31:11 -!- imode has joined.
15:40:18 -!- S_Gautam has quit (Quit: Connection closed for inactivity).
15:49:37 -!- tromp has quit (Read error: Connection reset by peer).
15:54:57 -!- copumpkin has quit (Quit: Textual IRC Client: www.textualapp.com).
16:01:25 -!- copumpkin has joined.
16:18:06 -!- S_Gautam has joined.
16:48:27 -!- iconmaster has quit (Quit: Leaving).
16:58:56 -!- Sgeo__ has joined.
17:00:27 -!- Sgeo has quit (Ping timeout: 240 seconds).
17:11:56 -!- xkapastel has joined.
17:25:55 <HackEso> U+1D455 - No such unicode character name in database \ UTF-8: f0 9d 91 95 UTF-16BE: d835dc55 Decimal: 𝑕 \ () \ Uppercase: U+1D455 \ Category: Cn (Other, Not Assigned)
17:26:28 <HackEso> U+1D6A8 MATHEMATICAL BOLD CAPITAL ALPHA \ UTF-8: f0 9d 9a a8 UTF-16BE: d835dea8 Decimal: 𝚨 \ 𝚨 \ Category: Lu (Letter, Uppercase) \ Bidi: L (Left-to-Right) \ Decomposition: <font> 0391 \ \ U+1D6A9 MATHEMATICAL BOLD CAPITAL BETA \ UTF-8: f0 9d 9a a9 UTF-16BE: d835dea9 Decimal: 𝚩 \ 𝚩 \ Category: Lu (Letter, Uppercase) \ Bidi: L (Left-to-Right) \ Decomposition: <font> 0392 \ \ U+1D6AA MATHEMATICAL BOLD CAPITAL GAMMA \ UTF-8: f0 9d
17:41:37 <b_jonas> https://esolangs.org/wiki/Esolang:Featured_languages says that slashes was featured
17:41:59 -!- testitemqlstudop has joined.
17:42:39 -!- testitemqlstudop has left.
17:42:55 <b_jonas> in that case, we could consider featuring befunge. afaik ais523 doesn't have much connection to it, but the esolang community at large does
17:53:14 <b_jonas> my honored and learned friend fungot, your source code is on whose T-shirt?
17:53:14 <fungot> b_jonas: anyone familiar with the fourstack idea didn't the person who introduced me to it. it routinely takes me 30+ minutes to fall asleep
18:00:01 -!- Sgeo has joined.
18:01:47 -!- Sgeo__ has quit (Ping timeout: 240 seconds).
18:04:21 <esowiki> [[Befunge]] https://esolangs.org/w/index.php?diff=60218&oldid=58624 * B jonas * (+543) language overview. let me try to improve the description a little so we can feature this.
18:05:20 -!- tromp has joined.
18:06:52 <esowiki> [[Befunge]] https://esolangs.org/w/index.php?diff=60219&oldid=60218 * B jonas * (+2) move history below the language overview, to make the article a better introduction.
18:08:44 <b_jonas> we should somehow move the "fungeoid" part out of the introduction, to the history stuff, and make the introd paragraph more informative
18:11:52 -!- rdococ has quit (Quit: CHEAPIE! What did you do to the bouncer?! :P (jk)).
18:11:57 <b_jonas> https://esolangs.org/wiki/Fungeoid says "Fungeoids, specifically Befunge, have the canonical goal of being REALLY hard to compile", but that seems to contradict https://esolangs.org/wiki/Nopfunge being a fungeoid
18:12:46 -!- rdococ has joined.
18:20:20 -!- S_Gautam has quit (Quit: Connection closed for inactivity).
18:20:46 <esowiki> [[Befunge]] https://esolangs.org/w/index.php?diff=60220&oldid=60219 * B jonas * (+246) mention fungot; remove fungeoids from the first paragraph, they're mentioned later anyway
18:22:05 <HackEso> fungot is our beloved channel mascot and voice of reason.
19:01:03 -!- tromp has quit (Remote host closed the connection).
19:05:19 -!- S_Gautam has joined.
19:15:19 <esowiki> [[Works in progress]] https://esolangs.org/w/index.php?diff=60221&oldid=59261 * Cortex * (+14)
19:15:30 -!- tromp has joined.
19:23:14 <esowiki> [[Esolang:Featured languages/Candidates]] https://esolangs.org/w/index.php?diff=60222&oldid=60216 * B jonas * (+656) /* List of candidates */
19:24:13 <esowiki> [[Esolang:Featured languages/Candidates]] https://esolangs.org/w/index.php?diff=60223&oldid=60222 * B jonas * (+94) /* List of candidates */
19:25:52 <esowiki> [[User:Cortex]] https://esolangs.org/w/index.php?diff=60224&oldid=60100 * Cortex * (+14)
19:44:32 <esowiki> [[ALLSCII]] https://esolangs.org/w/index.php?diff=60225&oldid=60210 * Cortex * (+515)
19:51:04 -!- xkapastel has quit (Quit: Connection closed for inactivity).
20:04:46 <b_jonas> zzo38: I wonder how you could write sane M:tG rules text for a card like this: Three Wise Men / 1GWU / Sorcery / Look at the top five cards of your library. You may reveal a creature card from among them and cast it. When that spell resolves, put three +1/+1 counters on the permanent it becomes.
20:13:17 <zzo38> I think it look like OK the way it is
20:15:19 <kmc> shachaf: what do you think could be done to get better efficiency from the low ascii codepoints in utf-8
20:15:41 <kmc> obviously it would be incompatible but how could you do it while preserving the nice properties of utf8
20:15:49 <kmc> maybe you can't
20:18:16 <shachaf> Is there a real efficiency problem there?
20:20:04 <j4cbo> kmc: give commonly used codepoints lower values
20:21:04 <zzo38> j4cbo: Yes, that reduces the number of bytes needed to encode that number as UTF-8
20:21:19 <pikhq> Not sure there's that much of a point. While in principle you could get better efficiency, any such gain would be fairly minimal.
20:21:35 <pikhq> ... and you could get more mileage out of just using a common compression algorithm instead.
20:22:25 -!- adu has joined.
20:23:10 <zzo38> Yes, you can do that
20:25:19 <kmc> pikhq: yeah, that was my conclusion
20:29:02 <kmc> there are Unicode encodings which allow binding one-byte codes to frequently used characters for that specific document. but stateful codes are nasty (looking at you, ISO 2022) and I think a separate compression layer would almost always be better
20:29:33 <kmc> one of the best things about UTF-8 is that it's self synchronizing
20:29:55 <zzo38> Yes, and it is compatible with ASCII
20:35:23 <pikhq> Yeah. SCSU is kinda cute as a concept, but it's going to be somewhat rare that it's worth it.
20:36:15 <pikhq> (mostly if you have the need to compress, seperately, many different very short strings. Where "very short" here means "tweet sized".)
20:36:28 <Phantom_Hoover> i was kinda :psyduck: when some random blog post pointed out to me that 0xC0 is never a valid byte in UTF-8
20:36:55 <pikhq> Isn't that a lead byte for a surrogate?
20:37:15 <pikhq> Oh, no, for an over-long encoding.
20:37:31 <b_jonas> PH: yes, there are four invalid bytes
20:37:34 <pikhq> 0xC0 would be for a two-byte encoding of something under 0x7f.
20:37:40 <pikhq> b_jonas: There's more than that.
20:37:45 <Phantom_Hoover> it's the lead byte for a multibyte sequence which would have enough leading zeroes to not need a multibyte sequence
20:37:57 <b_jonas> pikhq: no, there are two invalid bytes because they would start the encoding of an ascii character, and two invalid bytes because they would start a too long encoding
20:38:02 <pikhq> 0xF5 through 0xFF are also invalid.
20:38:31 <pikhq> But those are would be used to encode a codepoint over U+10FFFF.
20:38:38 <b_jonas> pikhq: yeah, now that they claim that the largest character value can be 0x10FFFF, those are invalid too
20:39:17 <pikhq> And they're unlikely to go back on that, since that limitation exists so UTF-16 can work, and UTF-16 is gonna be hard to kill.
20:39:23 <b_jonas> but they'll change that later anyway when they start running out of the 17 planes. currently they only started 3 planes, plus a little bit of one more plane, plus one for non-standard user-defined stuff
20:39:37 <b_jonas> but people may want to encode non-characters in utf-8, for private purposes like formatting
20:40:00 <pikhq> I don't think so -- UTF-16 is a bit too entrenched.
20:40:16 <b_jonas> pikhq: true, but then, if they need more space for characters they will do something
20:40:30 <j4cbo> the amount of damage done in the 5-year period when Unicode was 16 bits is staggering
20:40:33 <b_jonas> UTF-16 was already entranched when they decided to go for more than the prime material plane
20:40:56 <j4cbo> b_jonas: that was UCS-2
20:41:19 <pikhq> And I have some doubts they'll even really need to go much past the assigned planes.
20:42:05 <pikhq> Considering well over half of the supplementary multilingual plane is unassigned, and the supplementary ideographic plane is running out of CJK characters to encode.
20:42:39 <zzo38> Codes that are encoding above U+10FFFF are just not going to encode valid Unicode characters, but otherwise it may be considered as valid in some cases.
20:43:06 <kmc> j4cbo: truth
20:43:13 <kmc> Windows, Java, and JavaScript all adopted UCS-2 :(
20:43:31 <kmc> mankind will never be free of the scourge of JavaScript
20:43:34 <kmc> it's with us for the rest of civilization
20:43:40 <b_jonas> why did they put characters on the astral plane anyway? are those just to make it easier to test that software is compatible with that?
20:43:46 <zzo38> UTF-16 is helpful when working with Unicode text in JavaScript, since JavaScript strings are sequences of 16-bit characters.
20:44:08 <kmc> b_jonas: which characters?
20:44:12 <pikhq> b_jonas: Because the BMP is is almost entirely full.
20:44:28 <kmc> b_jonas: Unicode has more than 2^16 (minus surrogate pairs) codepoints, so the astral planes are required
20:44:29 <b_jonas> pikhq: I mean the astral plane, the one that starts at 0x100000
20:44:38 <kmc> b_jonas: that's not what astral plane means
20:44:44 <kmc> it's any plane besides the basic plane
20:44:52 <b_jonas> kmc: it's also not what prime material plane means, but meh
20:44:54 <j4cbo> the USB spec says “strings in descriptors shall be Unicode”
20:44:54 <pikhq> b_jonas: That's private use area.
20:45:05 <kmc> I have an irrational loathing for WebAssembly because it's contributing to Rust getting ruined by web hipsters
20:45:10 <j4cbo> they mean UTF-16, I forget which endianness
20:45:15 <pikhq> The entire U+10xxxx plane is a private use area.
20:45:18 <Phantom_Hoover> the 'we're too boring and shit to put tengwar in unicode proper' area
20:45:30 <kmc> they want Cargo to adopt "best practices from NPM", when somebody pointed out that there was no such thing their comment was deleted by moderators
20:45:34 <zzo38> WebAssembly may be a reasonable VM code, but that doesn't mean that Rust or JavaScript or any other programming language would be avoided
20:45:38 <kmc> criticism is not allowed in the Rust community
20:45:39 <pikhq> As is U+Fxxxx, and U+E000-U+F8FF.
20:45:57 <kmc> because all criticism is "unconstructive"
20:45:59 <Phantom_Hoover> that was part of the whole 'welcome our new community manager'
20:46:04 <kmc> yeahhhhhhhh
20:46:11 <Phantom_Hoover> 'i dont want to welcome someone who goes around saying kill all men on twitter'
20:46:29 <kmc> I really shouldn't bring it up, because that whole incident upsets me a great deal
20:46:43 <kmc> those kinds of people are why i don't feel comfortable in open source anymore :/
20:46:43 <pikhq> It's some grade A bullshit though.3
20:47:09 <Phantom_Hoover> it upsets me in principle too ive just positioned myself so they mostly dont matter in my life
20:47:14 <zzo38> Even if you work in open source you do not have to deal with all of the open source projects
20:47:26 <kmc> Phantom_Hoover: me too, but I have unresolved trauma re: being trans and stuff
20:47:28 <Phantom_Hoover> paranoid proprietary bullshit has its upsides i suppose
20:47:38 <kmc> being trans fucking sucks, i'll say that much
20:48:08 <kmc> at the same time I don't think i'd press a magic button to be not trans
20:48:10 <kmc> it's complicated
20:48:18 <pikhq> Identity tends to be.
20:48:32 <Phantom_Hoover> this reminds me of the wikipedia page on paperclip optimisation
20:48:33 <zzo38> (UTF-16 would also be helpful in my proposed X 12 core font system; if the font is a Unicode font, then astral characters are just considered ligatures of the surrogate pairs, so if ligatures are enabled then you can work with Unicode text.)
20:48:50 <kmc> is X12 the successor to X11?
20:49:02 <Phantom_Hoover> anyway one of my poor naive colleagues was asking me the other day what he was supposed to do with a core dump
20:49:12 <kmc> Phantom_Hoover: lol
20:49:16 <kmc> load it into GDB!
20:49:18 <zzo38> (There are other things too I have proposed to do it)
20:49:26 <Phantom_Hoover> (poor naive = plucked from a stem degree and trained in kdb and little else)
20:49:27 * int-e suspects another zzo38 vapourware project.
20:49:33 <kmc> you can even run a coredump
20:49:58 <Phantom_Hoover> kmc, yeah except how much debug info do you think kx systems compile into their binary
20:49:58 <b_jonas> I believe they're regular files, so rm can handle them
20:50:04 -!- ais523 has joined.
20:50:18 <Phantom_Hoover> kx 'our entire database package fits into L2 instruction cache!!!!' systems
20:50:21 <kmc> Emacs has a "feature" where you can initialize all the bloat, core dump it, and then use that initialized image to start emacs faster
20:50:26 <zzo38> Another thing of my X12 is that a mouse cursor position is allowed to be null (which is different from zero), although this might not be implemented on all implementations.
20:50:29 <kmc> which I imagine breaks a lot of modern things like ASLR
20:50:31 <kmc> but whatever
20:50:35 <int-e> b_jonas: but only if you can find them *glares at systemd*
20:50:39 <b_jonas> ais523: do you have any significant involvement in befunge? I'm asking because of potential featured langauge status
20:50:51 <ais523> b_jonas: not really any more than the rest of the esolang community
20:50:53 <kmc> there was that awesome Linux vuln involving coredumping in /etc/cron.d
20:51:04 <ais523> I've written a few programs in it, and I wrote an FFI between INTERCAL and Befunge
20:51:07 <b_jonas> PH: there's no such thing as "L2 instruction cache". L2 cache doesn't know the distinction between code and data
20:51:15 <ais523> but I wouldn't be afraid to feature it
20:51:25 <b_jonas> well, it knows the distinction between reading and writing, but it's still not a separate instruction cache
20:51:33 <int-e> b_jonas: are you sure that's universally true...
20:51:38 <Phantom_Hoover> but b_jonas do the guys making acquisition decisions in investment banks know that
20:51:44 <shachaf> Is the cures of the featured language that people make erivatives of it?
20:51:48 <b_jonas> int-e: but Kx isn't so portable
20:51:50 <pikhq> I think systemd would upset me less if it had actually been designed with clear defined API boundaries between components, permitting alternate implementations.
20:52:04 <kmc> you could get a setuid program to core dump in /etc/cron.d, with a valid crontab entry somewhere in its memory space
20:52:08 <ais523> shachaf: well, BF was the featured language for ages so we don't have much evidence
20:52:14 <Phantom_Hoover> systemd just upsets me because lennart seems to be an antisocial psycho
20:52:21 <kmc> cron will happily skip over megabytes of binary garbage and execute that crontab entry
20:52:23 <pikhq> Phantom_Hoover: Also that.
20:52:35 -!- xkapastel has joined.
20:52:46 <Phantom_Hoover> and apparently nobody making decisions in the entire linux world thinks 'hmm maybe we shouldnt give this guy supreme political influence over the entire system'
20:53:09 <j4cbo> kmc: ~robustness principle~
20:53:23 <kmc> p o s t e l ' s ~ l a w
20:53:25 <kmc> it's really the worst thing
20:53:38 <shachaf> kmc: I think they ported that Emacs "feature" to some portable representation that's compatible with ASLR.
20:53:44 <kmc> shachaf: ok
20:53:54 <pikhq> Phantom_Hoover: I mean honestly, ESR is still respected in some corners.
20:54:12 <Phantom_Hoover> well he's a shithead in ways largely orthogonal to software
20:54:18 <kmc> I don't exactly respect ESR but I appreciate some things he's said more than I used to
20:54:33 <Phantom_Hoover> also lmao i occasionally remember the period of my youth wasted on rationalwiki
20:54:35 <pikhq> Getting people to question that requires people to question that maybe an egotistic shithead should be questioned rather than just accepted.
20:54:38 <kmc> maybe it's just because i hate the wokelords who hate him
20:54:43 <kmc> Phantom_Hoover: lol
20:54:44 <b_jonas> let me repeat my question then. fungot's befunge source code is printed on whose T-shirt?
20:54:44 <fungot> b_jonas: no. i think he's normally asleep at this time it was the next thing i need
20:54:50 <kmc> shachaf: yeah
20:54:51 <ais523> kmc: re Postel's Law, it strikes me that there are two modes in which a program can run: fail fast, and try to make things work even when they're broken
20:55:05 <ais523> the former is much better for development, and for the future of the system; the latter is better for the present
20:55:13 <Phantom_Hoover> and i remember that it was using my lingering social status as a high volume shitposter in aid of emily's crusade against ESR
20:55:17 <kmc> live fast, die young, bad code does it well
20:55:35 <pikhq> Phantom_Hoover: I mean okay, as far as software goes ESR's worst sin is that he just doesn't really... matter.
20:55:51 <kmc> "<--- I'M WITH THOSE GUYS"
20:55:52 <b_jonas> ais523: most of my programs are full of asserts and fail fast
20:56:06 <pikhq> He's only influential in terms of writing about software.
20:56:07 <b_jonas> both asserts checking input that I didn't appreciate in advance, and internal bugs
20:56:07 <Phantom_Hoover> whereas david gerard was quite insistent that rationalwiki's take be "this ELITE HACKER GOD WHO BUILT THE INTERNET later went crazy after 9/11"
20:56:18 <pikhq> (and to be fair, some of his writing about software is, well, still worth reading)
20:56:30 <kmc> I still talk to emily... we have a complicated history but I like her
20:56:31 <ais523> b_jonas: my preferred principle is to work out what inputs /could/ be correct, in that a) they're not an obvious sign of a bug existing, and b) we can define plausible and unsurprising output in that case
20:56:38 <pikhq> Phantom_Hoover: Oh, set that on fire.
20:56:40 <b_jonas> and then, when an assert of the first kind triggers, or I anticipate that it will trigger, I make the program more robust for those inputs;
20:56:48 <b_jonas> if the second kind of assert triggers, I try to fix the bug
20:56:57 <ais523> and then document the function as supporting only those inputs
20:57:00 <ais523> then, fail fast on everything else
20:57:03 <pikhq> kmc: Yeah, life hasn't been the kindest to her.
20:57:09 <kmc> seriously.
20:57:14 <kmc> neither have i, at times
20:57:17 <ais523> your former type of assert is an interesting idea
20:57:18 <kmc> b/c of my own bullshit
20:57:42 <b_jonas> sometimes the asserts even need some extra computation just to detect problems
20:57:50 <kmc> shachaf: back to earlier topic, EMDR therapy is p. esoteric
20:58:09 <kmc> thinking about upsetting things is healing if you move your eyes back and forth while you do it???
20:58:12 <kmc> and nobody knows why
20:58:15 <kmc> brains are weird
20:58:34 <ais523> b_jonas: this reminds me; a while ago I was looking for a way to determine whether asserts were enabled in Java (so as to produce extra debug information in that case)
20:58:44 <b_jonas> also, a good lesson I learned from writing programs is to try to represent data compactly, in the sense that there's no redundancy as in state stored multiple times such that they have to be consistent, because whenever you have redundancy, you often later modify the program and forget about what invariants you wanted to keep
20:58:49 <ais523> and it turns out that the only official method is to write an assert condition with side effects
20:58:59 <b_jonas> obviously there are exceptions from this when you need redundancy for efficiency
20:58:59 <kmc> the best theory I've heard is that it emulates REM sleep, but I don't know how much of an ass-pull that is
20:59:07 <ais523> boolean assertsEnabled = false; assert(!(assertsEnabled = true));
20:59:17 <ais523> boolean assertsEnabled = false; assert((assertsEnabled = true));
20:59:28 <Phantom_Hoover> i remember you introducing me to the bicameral mind thesis ages ago in here kmc
20:59:36 <shachaf> kmc: do you know of public examples of good high-performance api design twh
20:59:41 <kmc> I think there should be multiple assert levels, each of which can be disabled either at runtime or compile time
20:59:43 <Phantom_Hoover> which has stuck in my head for being particularly interesting even though im 80% sure its total bullshit
20:59:53 <b_jonas> ais523: that's more or less true in C too, because someone might redefine or reundefine _NDEBUG without reincluding <assert.h>
20:59:56 <kmc> Phantom_Hoover: I think I learned of it from Snow Crash
21:00:01 <kmc> and yes, it's almost certainly bullshit
21:00:05 <b_jonas> mind you, I don't use the actual assert macro from C
21:00:19 <ais523> b_jonas: yes, but in this situation, the value of _NDEBUG is what I'd care about more than the actual behaviour of assert
21:00:23 <kmc> Rust's debug logging is kind of nice, you can enable/disable for any subtree in the module tree
21:00:28 <kmc> (module/crate tree)
21:00:32 <ais523> because I'm trying to detect a debug versus release build, not the actual behaviour of the assert macro
21:01:06 <pikhq> Hey, don't knock printf debugging.
21:01:10 <kmc> rust has that too
21:01:11 <Phantom_Hoover> because at work we have a guy who's the only one who really cares about architecture and gets shit done
21:01:18 <kmc> if cfg!(debug)
21:01:21 <kmc> or something like that
21:01:42 <Phantom_Hoover> and he added some debugging code which means that our logs are now 90% duplicated spam
21:01:44 <b_jonas> oh darn, gmane is not available. I'll have to look if an alternate archive exists for this mail
21:01:53 <kmc> cfg's can be used as compiler directives, user-defined conditional compilation, or compile-time constants, or build-system rules
21:02:11 <Phantom_Hoover> and i was like 'man these log messages are really repetitive and useless, can i disable them'
21:02:11 <shachaf> context free grammars are often used as compiler directives
21:02:21 <kmc> shachaf: look around you is tg
21:02:26 <Phantom_Hoover> yes but now i cant read any other fucking log messages!!
21:02:42 <ais523> «if cfg!(debug){...}» looks weird, I'd expect something more along the lines of «#[if(cfg(debug))]{…}»
21:02:44 <b_jonas> PH: yeah, at that point I direct those messages to a separate file
21:03:00 <ais523> i.e. conditionally compiling, rather than unconditionally compiling dead code (and then presumably optimisingit out)
21:03:23 <Phantom_Hoover> also a lot of our code alternately use two different logging functions, one of which logs in the local timezone and one of which logs in UTC
21:03:24 <b_jonas> ais523: such a thing exists, yes, but only for items, not for statements in rust
21:03:30 <b_jonas> so you have to put yoru conditional stuff in a separate function
21:03:32 <ais523> Phantom_Hoover: aimake has something like 4 or 5 verbosity levels for debug logging because some of them are both useful and /really/ spammy
21:03:54 <b_jonas> have two versions of the function, conditionally, with the same name, and call it
21:04:02 <shachaf> Should conditional compilation just be a regular if in a meta-level language?
21:04:14 <j4cbo> “the local timezone”
21:04:22 <ais523> shachaf: well, that's how it works in C
21:04:30 <ais523> #if is basically just a regular statement in cpp the language
21:04:31 <b_jonas> well, maybe that's no longer true with the macro advancements now
21:04:35 <shachaf> Except CPP is very different from C.
21:04:54 <pikhq> j4cbo: I have seen some disturbingly large environments where the local timezone ends up mattering...
21:04:56 <ais523> indeed; there's no obvious reason other than programmer familiarity why the two languages should be the samea
21:04:56 <j4cbo> any code in a server that tries to read the “local timezone” should trip an assert
21:05:13 <j4cbo> there’s a test suite at work that only passes if you set your system tz correctly
21:05:18 <b_jonas> shachaf: yeah, I was trying to design a language that is preprocessing all the way down, with infinitely many layers, each of which produce a program for the layer below it, and the layer isomorphic to each other
21:05:20 <ais523> j4cbo: I think it's a good idea to use capabilities for things like timezones
21:05:30 <shachaf> ais523: Well, if it's the same language, you can reuse code to do compile-time computation and so on.
21:05:31 <ais523> a function is only given access to the timezone if it actually needs it
21:05:33 <b_jonas> ais523: yeah, the C++ concept guys are trying that.
21:05:35 <Phantom_Hoover> kdb has nice concise shortcuts for both UTC and system timestamps
21:05:37 <shachaf> b_jonas: You've mentioned.
21:05:38 <b_jonas> I don't like the idea much
21:05:45 <shachaf> b_jonas: But I want this for practical rather than theoretical reasons.
21:05:49 <pikhq> A former employer of mine set all their servers to use the timezone of corporate HQ.
21:05:51 <Phantom_Hoover> i have no clue why anyone on our team was dumb enough to use the system tz ones
21:06:16 * pikhq wonders if we're talking about the same employer
21:06:22 <ais523> j4cbo: really, timezones aren't even the biggest problem, the largest environment-related issue I see (other than encoding, which is something of a separate topic as correct behaviour is hard to define) is decimal separators
21:06:40 <j4cbo> a company out of Mountain View that made lots of money from tiny classified ads?
21:06:52 <b_jonas> ais523: I think the syntax is like #[cfg(debug_assertions)]
21:07:12 <kmc> you can do either. cfg!() is a macro that expands to a boolean constant
21:07:18 <ais523> I don't have most of the Rust preprocessor syntax memorised
21:07:31 <kmc> whereas #[cfg(...)] is conditional removal of a lexical scope
21:07:34 <b_jonas> like #[cfg(debug_assertions)] fn foo() { /* print stuff here */ } #[cfg(not(debug_assertions))] fn foo() {} fn bar() { ... foo() ... }
21:07:51 <ais523> I like Rust; I've written a few (small but serious) programs in it and it's almost as fast as writing in a scripting language, but the resulting programs run much faster and are more likely to be correct
21:08:02 <kmc> so e.g. #[cfg(thing_thats_false)] { type_error } will not error, but if cfg!(thing_thats_false) { type_error} will
21:08:10 <kmc> each is useful in different circumstances
21:08:13 <pikhq> There's lots to like there, and some things that are a bit frustrating.
21:08:15 <j4cbo> you can’t format an integer in a non-locale-dependent way in c++14
21:08:40 <b_jonas> ais523: yeah, it will eventually become a good language. I should fix the few library programs it has with a custom library and then I should be able to use it.
21:08:53 <kmc> you can't remove a whole item (function, type, etc) with cfg!() but you can't use #[cfg] in an expression
21:09:00 <ais523> FWIW, I believe that it is incorrect to ever format an integer in a locale-dependent way, unless the result is output directly to a human without being stored accessibly in memory
21:09:05 <pikhq> (WHY would you give all these powerful tools for memory safety and error handling, and then "oh, and we just crash on OOM")
21:09:10 <kmc> zzo38: it's not a preprocessor, but yeah
21:09:20 <j4cbo> std::to_chars showed up in C++17
21:09:30 <kmc> zzo38: the syntax is fairly simple. a cfg expression is either an identifier, identifier = "string", or identifier(cfg_item)
21:09:34 <kmc> and there's all() and any()
21:09:36 <pikhq> ais523: Yeah, presentation for a human and serializing to a string are two distinct problems.
21:09:39 <Phantom_Hoover> haskell has made me intrinsically suspicious of seeing compiler directives ahead of functions
21:09:56 <ais523> pikhq: OSes don't handle OOM conditions in the way that programmers would like them to, unless memory limits have been set explicitly
21:09:57 <kmc> there are also other #[...] attributes besides cfg, which are like traditional compiler pragmas, but lexically scoped
21:10:03 <Phantom_Hoover> although in rust they seem to be generally comprehensible to the human mind
21:10:04 <kmc> lexical scoping for warnings is nice
21:10:11 <pikhq> ais523: s/OSes don't/Linux doesn't/
21:10:15 <kmc> there's allow, warn, deny, and forbid
21:10:22 <kmc> forbid is like deny except you can't allow inside forbid
21:10:34 <ais523> the problem is that a no-physical-memory-allocation-failure OOM doesn't necessarily hit the program that caused the problem
21:10:35 <kmc> Phantom_Hoover: it's pretty necessary in a systems language
21:10:39 <b_jonas> ais523: oh yeah. I got some surprise when vbscript printed booleans as "IGAZ" and "HAMIS" by default. C++ has the sane default, printing them as "0" and "1". in vbscript you have to -0 for that
21:10:46 <j4cbo> pikhq: it’s relic from when you could safely assume that anyone who would care about the output from a computer lived in the same city as said computer
21:10:53 <ais523> pikhq: Windows doesn't either, Windows' OOM behaviour is to swap everything possible out of memory, and increase the size of the swap file if it doesn't fit
21:10:54 <Phantom_Hoover> kmc, i know its necessary for sufficiently low-level stuff
21:10:58 <kmc> many of them control linkage, etc
21:11:03 <j4cbo> “system locale”, “system time zone”, etc
21:11:09 <kmc> at least it looks nicer than __attribute__((bleh))
21:11:18 <shachaf> What's the difference between lexical and dynamic scoping for warnings?
21:11:21 <b_jonas> ais523: and then freeze in a way that only the power button helps
21:11:26 <ais523> presumably at some point the hard disk ends up full, but you'll never reach that point; the system runs so slowly that the user will be force-quitting things and/or force-powering-off the system
21:11:29 <Phantom_Hoover> im just used to seeing any serious haskell include pragmas for like half a dozen arcane ghc extensions
21:11:32 <kmc> I hope one day I get to the point where I can use Rust without feeling icky
21:11:34 <pikhq> ais523: And yes, how OSes signal memory pressure needs some work. But at the same time, if(!malloc()) abort(); is just shit.
21:11:37 <b_jonas> you can force-quit things?
21:11:46 <b_jonas> I never managed to when it ran out of memory
21:11:51 <ais523> b_jonas: via Ctrl-Alt-Del, although under heavy swapping it's very slow
21:11:52 <kmc> shachaf: well, I mean as opposed to linear file scope, like preprocessor
21:12:05 <ais523> Linux has the amazing Alt-Sysrq-F, although it's disabled by default
21:12:16 <ais523> it's defined as "guess which process I want to kill, and kill it"
21:12:17 <pikhq> Especially if you still care about 32-bit platforms, where you can hit that on running out of virtual memory for the process without too much difficulty.
21:12:27 <kmc> pikhq: OOM is really hard problem
21:12:35 <ais523> under heavy swapping it's often the only plausible way to kill the offending program without causing a lot of collateral damage
21:12:45 <b_jonas> ais523: there's no need to guess, it's always firefox-esr
21:13:12 <ais523> b_jonas: both Firefox and Chrome have a multiprocess architecture nowadays, so often alt-sysrq-f kills a few browser tabs rather than the browser as a whole
21:13:13 <pikhq> kmc: It's a really hard problem to solve ideally, but not even trying is irritating.
21:13:34 <pikhq> Especially in a language that's selling itself on solving hard problems around memory and error handling.
21:13:45 <ais523> I believe that the correct solution to physical memory shortage is to automatically set memory limits for programs
21:13:51 <ais523> according to some heuristic
21:13:52 <b_jonas> ais523: but why would I want to kill just a few browser tabs? firefox is good enough at remembering session history, saving it quite frequently just until it starts to lag
21:13:58 <ais523> and report memory shortage to the program when it hits its limit
21:14:05 <shachaf> I liked the argument this person was making the other day that what you really want is a variant of abort that doesn't terminate the entire process.
21:14:06 <ais523> b_jonas: because they're typically the offending ones
21:14:16 <shachaf> But is local to some library or something.
21:14:24 <b_jonas> mind you, they do change the binary name every few years, it used to be firefox-bin at some point and iceweasel at some other point
21:14:35 <ais523> shachaf: that's pretty much what an exception is
21:14:37 <shachaf> Which is much more coarse-grained than RAII or whatever.
21:14:57 <shachaf> Exceptions are way more complicated.
21:15:13 <ais523> well, yes, but does the complexity hurt in this case?
21:15:18 <pikhq> kmc: All that said, I can't fault it too hard when very few languages do anything other than what Rust is doing here...
21:15:18 <j4cbo> good news! I might be switching from an insulin pump powered by a Renesas H8 and Microchip PIC16 to one powered by an STM32
21:15:24 <b_jonas> ais523: not clear. on my system the offending ones are the ones that play video, the video playback runs at a too high priority so firefox can't react to the GUI events like trying to close a tab
21:15:35 <pikhq> For stuff that's vaguely mainstream, we've got alternative approaches offered by: C, and C++.
21:15:38 <int-e> oh I can "killall 'Web Content'", fun
21:15:38 <b_jonas> so it can crawl even without running out of memory
21:15:45 <pikhq> And I don't think I need to elaborate on the problems there.
21:15:51 <shachaf> j4cbo: What happened to the one powered by \rainbow{JavaScript}?
21:16:09 <b_jonas> mind you, the fix for that is probably to buy a stronger desktop computer hardware for myself
21:16:10 <shachaf> I feel like you were saying something about that once.
21:16:21 <ais523> pikhq: so C's approach is for malloc to return NULL, which normally either ends up calling abort() via a wrapper function, or causing SIGSEGV when the returned pointer is used without checking
21:16:35 <pikhq> ais523: The language itself permits you to handle it more cleanly.
21:16:35 <j4cbo> the closed loop I’m using now is mostly Swift though
21:16:37 <ais523> and C++'s approach is to throw std::bad_alloc, which rarely gets caught except by the outermost exception handler, so the program exits
21:16:43 <pikhq> Even if nobody... does.
21:16:51 <ais523> even though the languages have different approaches, the actual practical behaviour is very similar
21:17:09 <shachaf> Banning exceptions is probably a pretty reasonable thing to do.
21:17:17 <pikhq> And perhaps the worst thing is, in C a lot of libraries have that behavior as well, so you're kinda fucked.
21:17:27 <shachaf> If you do use exceptions you have to manage all your resources with RAII-style things.
21:17:35 <pikhq> Good luck handling OOM robustly when your GUI toolkit doesn't.
21:17:38 <b_jonas> if you have a long-running program, it is often the right idea to make it so it saves its state to the file system occasionally, because it could crash in ways other than out of memory, such as power lost or hardware dying
21:18:02 <shachaf> I tried writing some GTK code a few days ago.
21:18:08 <shachaf> It was so demoralizing that I gave up on programming.
21:18:31 <b_jonas> shachaf: hmm. doesn't your job involve programming?
21:18:32 <ais523> IMO the correct solution is to a) ban unchecked exceptions, b) stop using exceptions in situations where it's possible that they could never come up
21:18:32 <shachaf> Did you know they style widgets with CSS now?
21:18:35 <pikhq> (Qt even lets you do this better: on std::bad_alloc, you can't go back into Qt, it'll be in an invalid state, but it doesn't crash. You can catch the exception in main() and at least save some state before dying.)
21:19:10 <b_jonas> I don't know what everyone else in this channel does in real life
21:19:12 <ais523> shachaf: I believe that there are no good GUI libraries
21:19:39 <shachaf> I mean, all the standard ones are certainly quite bad.
21:19:44 <ais523> most of them suck in terms of API or in terms of what they don't let you do
21:20:03 <b_jonas> ais523: agreed, all of them suck
21:20:03 <ais523> a few of them don't (e.g. Java Swing's API is actually pretty good), but those tend to be terrible in other respects (there's a reason hardly anyone uses Swing nowadays)
21:20:04 <shachaf> Is https://github.com/ocornut/imgui good?
21:20:09 <j4cbo> shachaf: do you still work for the place I interviewed that time?
21:20:19 -!- S_Gautam has quit (Quit: Connection closed for inactivity).
21:20:55 <ais523> shachaf: outputting the GUI as an image immediately makes it incompatible with other programs on the same OS
21:20:56 <shachaf> And have been uncertain what to do with my life etc.
21:21:31 <ais523> shachaf: imagine things like accessibility programs that need to do tree-walking of the GUI structure
21:21:37 <pikhq> I hear leaving the Bay Area and going out to live in a commune is popular these days.
21:21:48 <shachaf> Accessibility is a good point that I'm not quite sure about.
21:22:02 <shachaf> But I don't think that style of UI necessarily requires that you output the GUI as just an image.
21:22:10 <shachaf> You can include widget metadata and things.
21:22:23 <ais523> shachaf: I don't believe it's theoretically impossible to create a good GUI library
21:22:28 <ais523> it's just that I'd be surprised if one existed at the moment
21:22:31 * pikhq just moved back home to Colorado
21:23:38 <shachaf> Do you know what a good one would look like?
21:24:30 -!- ais523 has quit (Remote host closed the connection).
21:24:43 -!- ais523 has joined.
21:24:49 <ais523> <ais523> not fully; I have some ideas but they probably aren't enough by themselves
21:24:57 <kmc> pikhq: living in a commune in the bay area is also popular
21:25:16 <kmc> despite what one might think I am not that excited (anymore) about the idea of living in a commune
21:25:23 <pikhq> Phantom_Hoover: At the rate things are going, you might end up changing citizenship without doing much of anything.
21:25:36 <shachaf> ais523: What are the ideas?
21:25:45 <pikhq> kmc: What about fully automated gay space communism?
21:26:18 <kmc> a friend of mine started a vegan sex commune
21:26:24 <kmc> it didn't work out, i'm not sure the details though
21:26:30 <ais523> shachaf: I think being responsive to changes in available space for a widget is important (e.g. window resizing, other widgets gaining more information, and the like), which in turn means that the GUI's API has to be descriptive rather than imperative
21:26:31 <pikhq> Phantom_Hoover: Forgot
21:26:36 <j4cbo> I thought Bay Area communes tended to be full of rationalists
21:26:38 <kmc> I'm not surprised, but also good for her for trying something weird
21:26:42 <kmc> j4cbo: some of them
21:27:01 <kmc> Phantom_Hoover: I didn't get to go to any of their parties either
21:27:03 <pikhq> 'Tis a silly place overall.
21:27:15 <ais523> I think the easiest/best way to implement that might require something akin to a physics engine, although I'm not 100% sure on that
21:27:26 <Phantom_Hoover> the nice thing about not living in the bay area is that you can save a lot of mental effort by writing off everyone in the bay area as a pretentious wanker
21:27:39 <kmc> we're probably leaving soon too
21:27:52 <pikhq> Hey, I'm out of the Bay and I think I'm still a pretentious wanker sometimes.
21:28:04 <j4cbo> I was part of a p nice rave cult in the bay area
21:28:11 <shachaf> ais523: that sounds p. complicated
21:28:13 <kmc> j4cbo: that's cool
21:28:24 <kmc> thanks PH <3
21:28:26 <kmc> I like you too
21:28:39 <ais523> shachaf: one thing I've learned about programming is that there's always a tradeoff between complexity of the language/interface/API, and complexity of the code implementing it
21:28:42 <kmc> i'm definitely a pretentious wanker sometimes
21:28:56 <b_jonas> shachaf: does styling widgets with CSS mean that you can stop firefox widgets to do all the annoying animations, even if it doesn't respect the Windows control panel's setting that does that for normal windows GUI applications?
21:28:56 <shachaf> Phantom_Hoover: you can do that even if you do live in the bay area, hth
21:29:45 <ais523> I believe (although it is certainly reasonable to disagree with me on this!) that compromising as part of that tradeoff is never a good idea, and ideal languages/libraries/etc. should /always/ aim to place the complexity at one extreme or the other
21:29:58 <shachaf> I don't think "there's always a tradeoff" is exactly true. Sometimes the code is more complicated and the interface is also more complicated.
21:30:04 <b_jonas> ais523: theoretically possible => sure, but is it theoretically possible to create one that doesn't have to be thrown away ten years later?
21:30:35 <b_jonas> the expectations of what we want from GUIs seems to have changed too much, which is, I think, part of why all the GUI libraries suck
21:30:35 <pikhq> Yeah, sometimes the API design just sucks because it was done with no consideration of what it would mean to implement.
21:30:36 <ais523> b_jonas: in theory, if you had a good enough GUI library, you could just stick with it and just change out the backend as technology improved
21:30:38 <b_jonas> they've all been written in the past
21:30:55 <shachaf> There's also a third thing which is the complexity of the overall system, if your goal is to understand the overall system rather than treat libraries as black boxes.
21:31:01 <ais523> I am not convinced that user interfaces are, on average, improving
21:31:08 <shachaf> No, they're obviously getting worse.
21:31:11 <ais523> you can take a dialog box from Windows 95 and still be perfectly capable of using it nowadays, for example
21:31:19 <ais523> so the problem is not the user interface part of the GUI
21:31:24 <shachaf> Everything in computers is getting worse.
21:31:43 <pikhq> Computers stopped getting much faster, but developers act like they are.
21:32:15 <ais523> ah yes, performance is another big gripe of mine, especially in terms of rendering libraries
21:32:24 <pikhq> Well, really. High-end computers are still getting some advances. Not as much as they used to, but some.
21:32:28 <ais523> take something like SDL for example; it's widely used, and yet some basic tasks require polling in a loop
21:32:39 <pikhq> Low-end ones that non-developers actually use, though? Naaah.
21:33:15 <ais523> shachaf: well, for one thing, if you look at an SDL program in strace, you'll see repeated 1-millisecond sleeps; I think those are coming from SDL itself
21:33:22 <ais523> but what I was mostly thinking of is things like thread safety
21:33:48 <ais523> for example, there is no safe way to send information to the SDL main loop from a signal handler, using only primitives provided by SDL
21:34:07 <ais523> which is annoying because there's an obvious way to do it via the SDL API, it just incurs undefined behaviour
21:34:44 <Phantom_Hoover> pikhq are you saying you don't have 32gb of ram to run electron applications?
21:34:46 <b_jonas> ais523: I don't know. you'd have to be prescient. we can't get GUIs that scale well for any screen resolution including very high ones, and any font size, and more than 8 bit color depth, partly because we didn't anticipate that we'll need it, but partly because it's just hard to let the programs easily define how the gui elements should scale depending on what fits in the window
21:35:19 <ais523> b_jonas: Swing's API, if correctly used, has been able to do that ever since it was created
21:35:26 <zzo38> By looking at source code for SDL, it look to me it can work to post events from another thread (I don't know about signals)
21:35:29 <shachaf> ais523: "the SDL main loop"? You mean if your program is blocking on SDL_PollEvent?
21:35:30 <ais523> the API is agnostic to things like font size
21:35:47 <pikhq> Phantom_Hoover: My daily driver has 4 gigs of RAM.
21:35:51 <b_jonas> ais523: hmm. I don't know much about Swing api, apart from some horribly bad GUI applications written in it
21:35:59 <b_jonas> they don't seem to be navigable with keyboard at all
21:36:13 <ais523> zzo38: the problem is that the even posting API in SDL calls malloc, which is not async-signal-safe and deadlocks if called re-entrantly
21:36:31 <b_jonas> but presumably that's not the fault of the library
21:36:53 <ais523> b_jonas: Swing dialog boxes are navigable with tab by default; things get more complex when you're talking about an entire application rather than a single dialog box, though
21:37:06 <ais523> it's easy to make those keyboard-navigable but you have to do so explicitly because there's more than one plausible way to do it
21:38:26 <zzo38> ais523: O, OK. Then perhaps use another thread that waits for a signal and then uses it outside of the signal handler, will that work?
21:39:09 <ais523> zzo38: adding extra threads seems to be the standard solution to all this sort of thing; I think it could work via event posting, assuming that it is at least thread-safe
21:39:52 <pikhq> IIRC, it wasn't in SDL2 but is in SDL3.
21:40:01 <shachaf> I think typically your program has a way to send messages to other threads that don't use the SDL mechanism?
21:40:25 <zzo38> Posting events does seem to be thread-safe as far as I can tell (in SDL1, at least), but other functions (including events) might not be
21:40:50 <shachaf> I'm not sure about the 1ms sleeps, what triggers them?
21:40:57 <zzo38> (although maybe not in the earliest version of SDL1; I looked at the code for the version I have)
21:41:06 <ais523> shachaf: so the problem is, you'd want a library like SDL to handle abstraction over OSes for you, and it does in fact have a set of threading primitives for that purpose; however, none of them allow one thread to block on a message sent by another thread (it has no semaphores nor any way to create them)
21:41:47 <ais523> the only synchronization primitive it had, last time I checked, was mutexes (possible exception: I checked several rendering libraries for this and it's possible that I'm confusing SDL with somethinh else here)
21:41:53 -!- arseniiv has quit (Ping timeout: 255 seconds).
21:42:06 <shachaf> Libraries that handle abstraction over OSes are often problematic.
21:42:43 <pikhq> They have a tendency to be busted.
21:42:47 <ais523> logically, they shouldn't be; the set of common functionality between OSes tends to be very large
21:42:53 <ais523> I agree that they often fail in practice, though
21:43:27 <b_jonas> I thin it's more like that the abstraction libraries are lagging behind the OSes
21:43:46 <b_jonas> because each functionality first appears in one OS, and then an abstraction library pops up that does some crazy workaround on another OS to emulate it
21:44:02 <b_jonas> and then nobody fixes the abstractino library later when that other OS gains a native way to do the same thing
21:44:10 <b_jonas> possibly because of compatibility issue
21:44:43 <ais523> well, you could fix that by, say, only abstracting over features which were commonly available in OSes in 2010
21:44:52 <ais523> it's not like most programs will need most features introduced since then
21:45:11 <b_jonas> sure, that sort of thing exists
21:45:19 <b_jonas> the python and rust standard libraries try to do that
21:45:25 <b_jonas> heck, even the C standard library started like that
21:45:58 <pikhq> Nah, the C standard library was more a formal definition of the random pieces of Unix that other C implementations happened to implement.
21:46:42 <pikhq> Some of the abstraction libraries try to be overly generic, and some of them are just very poorly designed.
21:46:52 <shachaf> Are any of them well-designed?
21:46:55 <b_jonas> and also happened to include a relatively sane (though not entirely complete) date function API, but somehow everyone hates that and tries to invent worse datetime libraries
21:47:00 <pikhq> shachaf: Not really.
21:47:43 <shachaf> I was writing some Xlib code the other day.
21:47:52 <shachaf> Kind of scow but not as bad as I thought.
21:48:18 <pikhq> Quite a few of them only even abstract over the portions of OS differences that are relatively easy to handle.
21:49:11 <pikhq> (yeaaaah, as far as things like FS APIs go there's only two choices: "basically or literally Unix" and "Windows")
21:49:27 <b_jonas> but, for example, the threading libraries don't seem to have abstractions yet for setting CPU affinity of threads, despite that all OSes have that, because of what ais523 says: you don't need that until you want to optimize your program on a NUMA machine, and home computers don't have a NUMA cpu yet
21:49:28 <kmc> i'm still messing about with this stats problem
21:49:49 <b_jonas> but this will change just like how back fifteen years ago home computers didn't have SMP cpus
21:49:54 <HackEso> U+1F615 CONFUSED FACE \ UTF-8: f0 9f 98 95 UTF-16BE: d83dde15 Decimal: 😕 \ 😕 \ Category: So (Symbol, Other) \ Bidi: ON (Other Neutrals)
21:51:44 <ais523> b_jonas: most programs won't /know/ what the best CPU affinity is anyway, so why not let the OS decide? that's its job
21:51:56 <ais523> (note: although I don't know for certain, I have some suspicion that Windows is bad at this job)
21:51:58 <b_jonas> ais523: sure, so the programs aren't required to call that function
21:52:06 <zzo38> Other possibilities that sometimes you can use VM rather than native code, although that depends on the program.
21:52:21 <b_jonas> the default is to inherit the cpu affinity of the calling process through forks and thread creation
21:52:29 <ais523> sometimes I see a Windows program using 25% of four CPUs, manually pegging it to a single CPU tends to help in that case
21:52:58 <b_jonas> ais523: is that on non-NUMA machines?
21:54:15 <ais523> I guess that's a double negative, they should just be called UMA machines
21:57:51 <zzo38> Xlib is not that bad, and I have written some X programs using Xlib, including to display a picture, to make a screenshot, and to warp the mouse cursor (this last one was written for someone who needed to work around a bug in Chromium; I wrote it to see if it would help, and he said it does help)
21:58:34 <b_jonas> home computers having powerful GPUs is also a similar change I guess
21:58:48 <kmc> and phones even
21:59:44 <b_jonas> yeah... but I don't care about those
22:13:29 <b_jonas> also, apparently they moved the Red Bull Air Race from Budapest to the south coast of the Balaton. that might actually be a good idea from my point of view.
22:17:36 -!- ais523 has quit (Quit: quit).
22:31:12 -!- LKoen_ has quit (Quit: “It’s only logical. First you learn to talk, then you learn to think. Too bad it’s not the other way round.”).
23:25:13 -!- adu has quit (Quit: adu).
23:31:38 -!- S_Gautam has joined.
23:54:17 <esowiki> [[ALLSCII]] https://esolangs.org/w/index.php?diff=60226&oldid=60225 * Cortex * (+445)
23:55:32 -!- AnotherTest has quit (Ping timeout: 255 seconds).
23:56:48 -!- oerjan has joined.