00:00:38 <pikhq> (#undef and replacing a macro is UB iff the macro starts with _[A-Z_])
00:03:02 <pikhq> I'm referring to the last draft of C11, FWIW.
00:03:28 <pikhq> (which is officially distinct from the actual spec, but in practice is the same damned thing)
00:03:51 <shachaf> That must be one of the things they changed.
00:04:03 <shachaf> You should pay ISO a bunch of money to make sure.
00:04:04 <pikhq> Or it could be that POSIX is different.
00:04:20 <pikhq> POSIX does like adding extra UB.
00:05:07 <pikhq> Where there's a definition I guess, but every single aspect of it is something some implementation felt free to change? :)
00:05:33 <shachaf> But also implementations were reasonable rather than malicious.
00:05:49 <pikhq> No, they were differently malicious.
00:06:11 <shachaf> Possibly incompetent, but not malicious.
00:06:22 <pikhq> Okay, I suppose that's fair.
00:17:28 <fizzie> There's a comp.std.c post where someone involved in the standardization process (I forget their actual job title, and it's not very easily searchable) lists the changes between N1570 and the final text.
00:17:39 <fizzie> https://groups.google.com/d/msg/comp.std.c/v5hsWOu5vSw/zHU1sw7_2mIJ
00:18:14 <fizzie> There's a few errors where it's implied _Alignof can take an expression (rather than just a parenthesized type name), but I doubt that's a big deal.
00:18:40 <pikhq> So, only likely to be all that relevant if you're being especially rules-lawyerly
00:18:53 <fizzie> I guess since C18 was finalized, it's time to start citing that now.
00:21:56 <fizzie> Not sure it has as convenient a draft though.
00:22:22 <fizzie> http://iso-9899.info/wiki/The_Standard says the latest availale is c17_updated_proposed_fdis.pdf (N2176), which claims to be the "version of the document -- intended to be the version that is to go into ballot for C17".
00:23:25 <fizzie> Typesetting isn't bad, but the PDF TOC only goes three levels deep.
00:23:52 <fizzie> Formatting kind of reminds me of the c
00:23:58 <fizzie> ...C++ standard drafts.
00:25:21 <fizzie> Also, you can buy INCITS/ISO/IEC 9899:2012 for just $60, compared to the CHF 198 ISO wants.
00:25:32 <fizzie> I think it was $30 earlier, but, you know, trying times.
00:27:28 <pikhq> That's $60 more than I'm happy with, but that's not _that_ crazy.
01:01:11 <HackEso> HTML is short for "hope this mess loads".
01:32:21 <gerzytet> `learn html5 is something that should definitely not be parsed with regex
01:32:23 <HackEso> Learned 'html5': html5 is something that should definitely not be parsed with regex
01:33:06 <gerzytet> `learn John Skeet is the king of Stack Overflow
01:33:08 <HackEso> Learned 'john': John Skeet is the king of Stack Overflow
01:34:19 <gerzytet> `learn John_Skeet is the king of Stack Overflow
01:34:21 <HackEso> Learned 'john_skeet': John_Skeet is the king of Stack Overflow
01:54:22 -!- adu has quit (Quit: adu).
02:01:16 -!- adu has joined.
02:02:19 -!- atslash has joined.
02:09:39 -!- atslash has quit (Quit: This computer has gone to sleep).
02:53:15 -!- tromp has joined.
02:57:27 -!- tromp has quit (Ping timeout: 240 seconds).
03:07:05 <esowiki> [[Bur]] M https://esolangs.org/w/index.php?diff=61441&oldid=61362 * Zane * (+547)
04:21:53 -!- FreeFull has quit.
04:58:38 -!- tromp has joined.
04:59:40 -!- tromp_ has joined.
05:02:58 -!- tromp has quit (Ping timeout: 259 seconds).
05:04:07 -!- tromp_ has quit (Ping timeout: 258 seconds).
06:09:45 -!- Frater_EST has joined.
06:36:17 -!- rodgort has quit (Quit: Leaving).
06:37:14 -!- Frater_EST has left.
06:38:52 -!- tromp has joined.
06:46:27 -!- rodgort has joined.
06:48:39 -!- atslash has joined.
07:35:03 -!- Lord_of_Life has quit (Ping timeout: 245 seconds).
07:39:42 -!- Lord_of_Life has joined.
07:52:48 <esowiki> [[User:YamTokTpaFa/sandbox]] https://esolangs.org/w/index.php?diff=61442&oldid=61429 * YamTokTpaFa * (-15613) Replaced content with "'''Devilic10''' is an assembly language for esoteric machine "'''Devilic10 Machine'''" designed by [[User: YamTokTpaFa]]. This language features binary-coded 9-ary value,..."
07:55:05 -!- AnotherTest has joined.
08:02:59 <esowiki> [[User:YamTokTpaFa/sandbox2]] N https://esolangs.org/w/index.php?oldid=61443 * YamTokTpaFa * (+489) Created page with "{{Distinguish/Confusion|Braincrash}} '''BrainCrash''' is a [[:Category:Brainfuck derivatives|Brainfuck derivative language]] designed by , published in 2008. The purpos..."
08:16:33 -!- tromp has quit (Remote host closed the connection).
08:23:40 <esowiki> [[HQ9F+]] N https://esolangs.org/w/index.php?oldid=61444 * YamTokTpaFa * (+280) Created page with "{{Stub}} '''HQ9F+''' is a derivative language of [[HQ9+]] but with [[FizzBuzz]] feature, designed by , published in 2007. == Links == *[https://web.archive.org/web/200..."
08:30:08 <esowiki> [[HQ9F+]] https://esolangs.org/w/index.php?diff=61445&oldid=61444 * YamTokTpaFa * (+366)
08:33:02 <esowiki> [[HQ9F+]] https://esolangs.org/w/index.php?diff=61446&oldid=61445 * YamTokTpaFa * (+177)
08:36:12 <esowiki> [[HQ9F+]] https://esolangs.org/w/index.php?diff=61447&oldid=61446 * YamTokTpaFa * (+13)
08:39:11 -!- tromp has joined.
08:39:23 <esowiki> [[Pxem]] https://esolangs.org/w/index.php?diff=61448&oldid=61440 * YamTokTpaFa * (+31) /* Instructions */
08:46:49 <Taneb> I started playing Baba Is You last night
10:00:21 <shachaf> Did you manage to enjoy it?
10:00:42 <Taneb> Not in its entirety yet
10:01:02 <shachaf> Sure, only the parts you played.
10:13:45 -!- arseniiv has joined.
10:35:29 <esowiki> [[JCLN]] N https://esolangs.org/w/index.php?oldid=61449 * A * (+442) Created page with "[[JCLN]] (Jump Conditionally to a LiNe) is an [[OISC]] instruction. ==Syntax== ===To unconditionally jump to a line:=== <pre> jcln *, line #For example, to jump to line 5, you..."
10:38:38 <Taneb> It's fun and challenging
10:38:46 <Taneb> I'm going to take a long time to complete it, I feel
10:39:54 <esowiki> [[OISC]] https://esolangs.org/w/index.php?diff=61450&oldid=61271 * A * (+167) /* List of OISCs */
10:45:24 <myname> like a good puzzle game should
10:46:00 <Taneb> I've looked at a couple of levels and given up and moved on
10:46:11 <Taneb> But luckily it lets you play non-linearly enough to accomplish that
10:48:31 <myname> i still recommend having a look at snakebird
10:50:49 <esowiki> [[User:YamTokTpaFa/sandbox2]] https://esolangs.org/w/index.php?diff=61451&oldid=61443 * YamTokTpaFa * (+1394)
10:51:08 <esowiki> [[Talk:Bitch]] https://esolangs.org/w/index.php?diff=61452&oldid=61438 * A * (+433) incomplete
10:51:15 <esowiki> [[User:YamTokTpaFa/sandbox2]] M https://esolangs.org/w/index.php?diff=61453&oldid=61451 * YamTokTpaFa * (-1883) Blanked the page
10:52:07 <esowiki> [[BrainCrash]] N https://esolangs.org/w/index.php?oldid=61454 * YamTokTpaFa * (+1940) Created page with "{{Distinguish/Confusion|Braincrash}} '''BrainCrash''' is a [[:Category:Brainfuck derivatives|Brainfuck derivative language]] designed by , published in 2008. The purpos..."
10:53:07 <esowiki> [[Brainfuck extensions]] https://esolangs.org/w/index.php?diff=61455&oldid=60983 * YamTokTpaFa * (+16)
10:53:57 <esowiki> [[Brainfuck.NET]] M https://esolangs.org/w/index.php?diff=61456&oldid=56294 * YamTokTpaFa * (+38) /* Language overview */
10:54:00 <esowiki> [[Talk:Bitch]] https://esolangs.org/w/index.php?diff=61457&oldid=61452 * A * (+111) incomplete
10:54:06 <rain1> snakebird is great
10:54:51 <Taneb> What's the concept?
10:58:20 <myname> you have figures that behave like in a snake game with gravity and you have to move those to a goal
10:59:29 <rain1> they are actually birds though
10:59:40 <rain1> they're just long birds
11:00:07 <Taneb> Ah, I'll have to check it out when I'm finished with BIY
11:00:50 <myname> there is a mobile version of it
11:04:48 <esowiki> [[Talk:Bitch]] https://esolangs.org/w/index.php?diff=61458&oldid=61457 * A * (+145) Phew! Fill up the rest of the specification.
11:13:08 <esowiki> [[Braincrash]] https://esolangs.org/w/index.php?diff=61459&oldid=38051 * YamTokTpaFa * (+37)
11:13:29 <esowiki> [[BrainCrash]] https://esolangs.org/w/index.php?diff=61460&oldid=61454 * YamTokTpaFa * (+18)
11:14:00 <esowiki> [[HQ9F+]] https://esolangs.org/w/index.php?diff=61461&oldid=61447 * YamTokTpaFa * (+18)
11:21:16 -!- wob_jonas has joined.
11:23:48 <wob_jonas> fizzie, pikhq, shachaf: as for the C standard, what I'd like to know is whether I'm allowed to write offsetof(struct { char b; T v; }, v) in an expression instead of alignof(T), where T is some object type.
11:24:27 <wob_jonas> I looked at the drafts, but since offsetof is just a macro rather than a builtin, it doesn't have dozens of paragraphs of strict definitions, just some very brief description. at one point gcc and clang interpreted this differently, one allowed it and the other banned it.
11:40:12 <int-e> wob_jonas: at the very least 6.7.2.1.15 (in the? C18 draft) seems vague enough that the compiler is free to align the T v field more coarsely than strictly required.
11:40:39 <wob_jonas> int-e: oh sure, but that's not really my question
11:41:00 <wob_jonas> my question is whether you're allowed to define a struct right inside the offsetof
11:42:55 <wob_jonas> if it's allowed then you can use that to write alignof as a macro
11:43:04 <wob_jonas> a macro not using the builtin _Alignof that is
11:43:19 <int-e> "an integer constant expression" yeah that doesn't really help. But I not that there's no explicit restriction on the 'type' argument and struct{...} is a valid type in other contexts...
11:43:22 <wob_jonas> it doesn't matter much anymore, because today's compilers all support the builtin alignof
11:43:35 <wob_jonas> it cam up more back when some compilers didn't yet have it
11:43:52 <int-e> So I'd argue that your use case should be valid. But I can easily see it go wrong in practice :)
11:45:07 <wob_jonas> ... well, actually it's tricker than that
11:46:29 <int-e> you've probably done more digging into the standard than I have in the past 10 minutes :)
11:46:51 <wob_jonas> but every compiler has either alignof, or the gcc extension __alignof__, or the MS extension __alignof, or the C++ template std::alignment_of, or the boost version of that latter
11:47:12 <wob_jonas> no, I mean it's trickier than "toyda's compilers all support the builtin alignof"
11:49:23 <int-e> The main thing I did was to confirm that the compiler is free to align the T v field in whatever way it pleases as long as the minimum alignment is satisfied (the latter follows indirectly because you can take the address of that field and continue to access it through the resulting pointer without limitations)
11:52:33 <wob_jonas> yes, I know, technically the standard allows extra padding between and after struct elements. but as far as I know, in reality in only happens in old architectures and only at the very end of structs whose contents are too small.
11:53:18 <wob_jonas> in any case, these days compilers try to compile code with ABI compatible with that of other compilers, so they won't randomly add padding
11:58:52 <fizzie> FWIW, I'd read the bit where it says "the type and member designator shall be such that given `static /type/ t;` then the expression `&(t./member-designator/)` evaluates to an address constant" at least implying that it should be fine to put the struct definition there.
11:59:09 <fizzie> Because you could put it in the `static struct { ... } t;` as well.
11:59:17 <fizzie> But it's true it's a pretty brief description.
12:00:47 <int-e> wob_jonas: but if you only care about what happens in reality then you never need to consult the standard at all ;-)
12:01:46 <wob_jonas> fizzie: yes, they say that to exclude types like `int [2]`, which doesn't matter in the usual definition of offsetof, but this way it's uniform with va_arg.
12:02:17 <wob_jonas> int-e: right, that's why I tried gcc and clang, and one of them accepted it, the other didn't
12:04:06 <int-e> wob_jonas: are you willing to divulge which one accepted it?
12:09:24 <fizzie> I seem to recall on GCC offsetof(a,b) is just __builtin_offsetof(a,b). But of course that doesn't necessarily mean it would accept a struct definition in there.
12:18:59 <int-e> okay apparently gcc accepts it.
12:22:25 <int-e> but so does clang :P
12:22:56 <int-e> clang version 7.0.1-8, gcc (Debian 8.3.0-7) 8.3.0
12:23:55 -!- AnotherTest has quit (Ping timeout: 246 seconds).
12:25:20 <int-e> printf("%zu\n", offsetof(struct{char a; int b;}, b)); <-- this is what I tried now.
12:29:57 <int-e> uh, wrong format specifier; offsets are signed.
12:38:39 <wob_jonas> fizzie: ok, but that doesn't really help you tell what it accepts
12:40:54 <wob_jonas> fizzie: the traditional definition was something like #define offsetof(t,f) (long)((t*)0->f)
12:41:14 <wob_jonas> and that's why it was originally a macro rather than a keyword
12:43:37 -!- AnotherTest has joined.
12:44:04 -!- adu has quit (Quit: adu).
12:55:20 <fizzie> int-e: No, the format specifier was fine.
12:56:02 <fizzie> "-- `offsetof(/type/, /member-designator/)` which expands to an integer constant expression that has type `size_t`, --"
12:56:11 <int-e> right, I didn't think that through :)
12:56:33 <int-e> (it can't be negative even though I think of it as a difference of pointers...)
14:01:17 -!- AnotherTest has quit (Ping timeout: 244 seconds).
15:58:54 <fizzie> I think there's also an implementation like `#define offsetof(s,m) ((size_t)((char *)((s *)0)->m - (char *)0))` where it really is a difference of pointers.
15:59:09 <fizzie> (I don't think that's any better, or worse, than the other: it avoids the implementation-defined pointer-to-integer conversion, but still relies on making up the hypothetical `((*s)0)->m`.)
16:05:33 -!- wob_jonas has quit (Remote host closed the connection).
16:14:53 <rdococ> What if a language only had downward funargs (functions don't extend the lifetime of their scope, can't use them when their scope dies), but simulated upward funargs by converting functions to CPS at runtime if they return anything that contains functions that are about to go out of scope?
16:15:46 <rdococ> For example, if F calls G, and G returns a function, then instead of popping G, F's continuation would be pushed. When that gets popped, G and F would be popped as well, returning whatever F's continuation popped.
16:15:56 <rdococ> s/continuation popped/continuation returned/
16:25:51 -!- AnotherTest has joined.
17:52:23 -!- arseniiv has changed nick to arseniiv_.
17:52:30 -!- arseniiv_ has changed nick to arseniiv.
18:10:12 -!- bobby has joined.
18:32:44 <esowiki> [[User talk:A]] https://esolangs.org/w/index.php?diff=61462&oldid=61278 * Helen * (+3327) Java implementation of [[Volatile]]
18:40:31 -!- b_jonas has joined.
18:47:58 -!- Lord_of_Life has quit (Ping timeout: 245 seconds).
18:49:32 -!- Lord_of_Life has joined.
19:41:42 -!- TheWild has joined.
19:47:30 -!- FreeFull has joined.
19:47:44 -!- S_Gautam has joined.
20:09:53 -!- atslash has quit (Quit: This computer has gone to sleep).
20:16:20 -!- arseniiv has quit (Ping timeout: 255 seconds).
20:30:09 -!- LKoen has joined.
20:31:39 <esowiki> [[Bur]] M https://esolangs.org/w/index.php?diff=61463&oldid=61441 * Zane * (+8)
20:37:56 -!- FreeFull has quit.
20:38:28 -!- AnotherTest has quit (Ping timeout: 276 seconds).
20:46:52 -!- FreeFull has joined.
21:02:00 -!- LKoen has quit (Remote host closed the connection).
21:02:26 -!- LKoen has joined.
21:07:44 -!- TheWild has quit (Ping timeout: 246 seconds).
21:34:32 -!- LKoen has quit (Remote host closed the connection).
21:37:40 -!- LKoen has joined.
21:45:43 <HackEso> A mushroom is a fungus that grows above ground, especially after rain.
21:45:49 <b_jonas> there's not mush room for factual entries in this database
21:47:33 <HackEso> 11801:2019-04-29 <wob_jonäs> `` set -e; cd wisdom; mv -vi fungus mushroom; sed -i "s/^/A mushroom is /" mushroom; cat mushroom; echo ok
21:47:48 <HackEso> 11801:2019-04-29 <wob_jonäs> `` set -e; cd wisdom; mv -vi fungus mushroom; sed -i "s/^/A mushroom is /" mushroom; cat mushroom; echo ok \ 11797:2019-04-29 <fizzïe> ` mv wisdom/fungu wisdom/fungus # you may opt to `forget it if you wish
21:47:59 <HackEso> 11797:2019-04-29 <fizzïe> ` mv wisdom/fungu wisdom/fungus # you may opt to `forget it if you wish \ 11796:2019-04-29 <gerzytët> learn a fungus that grows above ground, especially after rain.
21:50:49 <kmc> yeah I was surprised about an entry that attempted to be factual
21:54:49 <b_jonas> kmc: it came about because I listed the few tanebventions that don't have an entry – there are about three or four – and then gerzytet created one, and then I renamed it to place
21:55:10 <b_jonas> and then ais came in and mentioned that he wants more factual wisdom entries and less stupid jokes
21:55:14 <HackEso> Tanebventions include necessity, Go, submarine jousting, Fueue, the universe, metar, sand, dragons, persistence, the BBC, _46bit, progress, sanity, Italian, the grace period, the limerick, ruin, and this sentence. See also tanebventions: maths or tanebventions: foods. He never invents anything involving sex.
21:55:29 <HackEso> Culinary tanebventions include automatic squirrel feeders, weetoflakes, mushrooms, nutella, and cognac.
21:56:23 <HackEso> The universe was invented by Taneb as an opposing force to oerjan. Escardó proved that it was indiscreet.
21:56:25 <HackEso> A universe is a poem in one stanza.
21:57:23 <HackEso> Mathematical tanebventions include D-modules, Chu spaces, the torus, Stephen Wolfram, Klein bottles, string diagrams, linear logic, the reals, Lambek's lemma, Curry's paradox, Stone spaces, algebraic geometry, locales, and histograms.
21:57:52 <b_jonas> linear logic, ruin, and linear logic
22:00:07 <int-e> . o O ( Are you even allowed to use "linear logic" twice in a sentence? )
22:01:50 <b_jonas> mushroom, linear logic, and ruin
22:22:06 -!- sleepnap has left.
22:39:02 <esowiki> [[Special:Log/newusers]] create * Mipinggfxgbtftybfhfyhfn * New user account
22:41:09 -!- 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.”).
22:45:44 -!- S_Gautam has quit (Quit: Connection closed for inactivity).
22:48:39 -!- b_jonas has quit (Quit: leaving).
22:57:12 <esowiki> [[Esolang:Introduce yourself]] https://esolangs.org/w/index.php?diff=61464&oldid=61409 * Mipinggfxgbtftybfhfyhfn * (+229) /* Introductions */
23:11:59 -!- oerjan has joined.
23:20:40 <lambdabot> int-e said 1d 1h 33m 5s ago: Seems you were correct... things are finally on track for going horribly right. Probably not in the way you expected though :)
23:24:34 -!- atslash has joined.
23:26:12 <oerjan> i'm worried about the bears, they might try to prevent anyone neutralizing him. (like the time creature trying to reverse the change...) krosp might go either way.
23:28:30 <oerjan> so, definitely horrible. it reminds to see if anything goes right.
23:30:18 <HackEso> 11801:2019-04-29 <wob_jonäs> `` set -e; cd wisdom; mv -vi fungus mushroom; sed -i "s/^/A mushroom is /" mushroom; cat mushroom; echo ok \ 11797:2019-04-29 <fizzïe> ` mv wisdom/fungu wisdom/fungus # you may opt to `forget it if you wish
23:30:32 <HackEso> A mushroom is a fungus that grows above ground, especially after rain.
23:36:11 <HackEso> toilet is elliot spelled backwards, without the extra l, with a t at the end.
23:43:53 <HackEso> ls: cannot access 'wisdom/ha': No such file or directory
23:44:52 <HackEso> 11802:2019-04-29 <wob_jonäs> forget ha \ 7443:2016-04-17 <b_jonäs> learn Ha van sz\xc3\xadved, hogy mindazt, mit el\xc3\xa9rt\xc3\xa9l, / Ha kell, egyetlen kock\xc3\xa1ra rakd, / s t\xc3\xbaltegyed magad, ha vesztes\xc3\xa9g \xc3\xa9r, / s ne legyen r\xc3\xb3la t\xc3\xb6bb\xc3\xa9 egy szavad
23:45:53 <oerjan> hm that doesn't explain the permission thing.
23:49:08 <oerjan> no one seemed to actually complete the quality control
23:50:19 <oerjan> although it's a little suspicious when `5 w gives the last one added...
23:50:31 <HackEso> cmd="${1-quote}"; \`^ 5 "$cmd"
23:50:49 <HackEso> cat: 'bin/^': No such file or directory
23:50:58 <HackEso> [[ $# == 2 ]] || { echo "Usage: $0 n cmd" >&2; exit 2; }; for ((i=0; i < $1; i++)); do \` "$2"; done | sport
23:51:29 <HackEso> #!/bin/sh \ f=$(find wisdom -ipath "wisdom/*$1*" -type f -print0 | shuf --random-source=/dev/urandom -z -n1); if [ -n "$f" ]; then echo -n "${f#wisdom/}//"; cat "$f"; else echo "That's not wise."; fi | rnooodl
23:51:49 <oerjan> you'd think urandom would be enough.
23:52:03 <oerjan> i suppose it was just meant to be deleted.
23:56:51 <HackEso> wisdom/if//If you can make one heap of all your winnings / And risk it on one turn of pitch-and-toss, / And lose, and start again at your beginnings / And never breathe a word about your loss: