00:00:38 (#undef and replacing a macro is UB iff the macro starts with _[A-Z_]) 00:02:31 It's possible. 00:03:02 I'm referring to the last draft of C11, FWIW. 00:03:28 (which is officially distinct from the actual spec, but in practice is the same damned thing) 00:03:51 That must be one of the things they changed. 00:03:57 Maybe. 00:04:03 You should pay ISO a bunch of money to make sure. 00:04:04 Or it could be that POSIX is different. 00:04:20 POSIX does like adding extra UB. 00:04:28 Time to go back to K&R C. 00:05:07 Where there's a definition I guess, but every single aspect of it is something some implementation felt free to change? :) 00:05:33 But also implementations were reasonable rather than malicious. 00:05:49 No, they were differently malicious. 00:06:11 Possibly incompetent, but not malicious. 00:06:22 Okay, I suppose that's fair. 00:17:28 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 https://groups.google.com/d/msg/comp.std.c/v5hsWOu5vSw/zHU1sw7_2mIJ 00:18:14 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 So, only likely to be all that relevant if you're being especially rules-lawyerly 00:18:53 I guess since C18 was finalized, it's time to start citing that now. 00:21:56 Not sure it has as convenient a draft though. 00:22:22 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 Typesetting isn't bad, but the PDF TOC only goes three levels deep. 00:23:52 Formatting kind of reminds me of the c 00:23:58 ...C++ standard drafts. 00:25:21 Also, you can buy INCITS/ISO/IEC 9899:2012 for just $60, compared to the CHF 198 ISO wants. 00:25:32 I think it was $30 earlier, but, you know, trying times. 00:27:28 That's $60 more than I'm happy with, but that's not _that_ crazy. 01:01:09 `? html 01:01:11 HTML is short for "hope this mess loads". 01:32:21 `learn html5 is something that should definitely not be parsed with regex 01:32:23 Learned 'html5': html5 is something that should definitely not be parsed with regex 01:33:06 `learn John Skeet is the king of Stack Overflow 01:33:08 Learned 'john': John Skeet is the king of Stack Overflow 01:34:09 `forget john 01:34:12 Forget what? 01:34:19 `learn John_Skeet is the king of Stack Overflow 01:34:21 Learned 'john_skeet': John_Skeet is the king of Stack Overflow 01:36:15 `revert 01:36:16 Done. 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 [[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 [[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 [[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 [[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 [[HQ9F+]] https://esolangs.org/w/index.php?diff=61445&oldid=61444 * YamTokTpaFa * (+366) 08:33:02 [[HQ9F+]] https://esolangs.org/w/index.php?diff=61446&oldid=61445 * YamTokTpaFa * (+177) 08:36:12 [[HQ9F+]] https://esolangs.org/w/index.php?diff=61447&oldid=61446 * YamTokTpaFa * (+13) 08:39:11 -!- tromp has joined. 08:39:23 [[Pxem]] https://esolangs.org/w/index.php?diff=61448&oldid=61440 * YamTokTpaFa * (+31) /* Instructions */ 08:46:49 I started playing Baba Is You last night 08:46:55 It is enjoyable 08:56:53 good! 10:00:21 Did you manage to enjoy it? 10:00:42 Not in its entirety yet 10:01:02 Sure, only the parts you played. 10:06:52 goood game 10:13:45 -!- arseniiv has joined. 10:35:29 [[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:===
 jcln *, line #For example, to jump to line 5, you..."
10:38:38  It's fun and challenging
10:38:46  I'm going to take a long time to complete it, I feel
10:39:54  [[OISC]]  https://esolangs.org/w/index.php?diff=61450&oldid=61271 * A * (+167) /* List of OISCs */
10:45:24  like a good puzzle game should
10:45:35  Mhmm
10:46:00  I've looked at a couple of levels and given up and moved on
10:46:11  But luckily it lets you play non-linearly enough to accomplish that
10:48:31  i still recommend having a look at snakebird
10:50:49  [[User:YamTokTpaFa/sandbox2]]  https://esolangs.org/w/index.php?diff=61451&oldid=61443 * YamTokTpaFa * (+1394) 
10:51:08  [[Talk:Bitch]]  https://esolangs.org/w/index.php?diff=61452&oldid=61438 * A * (+433) incomplete
10:51:15  [[User:YamTokTpaFa/sandbox2]] M https://esolangs.org/w/index.php?diff=61453&oldid=61451 * YamTokTpaFa * (-1883) Blanked the page
10:52:07  [[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  [[Brainfuck extensions]]  https://esolangs.org/w/index.php?diff=61455&oldid=60983 * YamTokTpaFa * (+16) 
10:53:57  [[Brainfuck.NET]] M https://esolangs.org/w/index.php?diff=61456&oldid=56294 * YamTokTpaFa * (+38) /* Language overview */
10:54:00  [[Talk:Bitch]]  https://esolangs.org/w/index.php?diff=61457&oldid=61452 * A * (+111) incomplete
10:54:06  snakebird is great
10:54:51  What's the concept?
10:58:20  you have figures that behave like in a snake game with gravity and you have to move those to a goal
10:59:29  they are actually birds though
10:59:40  they're just long birds
11:00:05  snakebirds, kinda
11:00:07  Ah, I'll have to check it out when I'm finished with BIY
11:00:50  there is a mobile version of it
11:04:48  [[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  [[Braincrash]]  https://esolangs.org/w/index.php?diff=61459&oldid=38051 * YamTokTpaFa * (+37) 
11:13:29  [[BrainCrash]]  https://esolangs.org/w/index.php?diff=61460&oldid=61454 * YamTokTpaFa * (+18) 
11:14:00  [[HQ9F+]]  https://esolangs.org/w/index.php?diff=61461&oldid=61447 * YamTokTpaFa * (+18) 
11:21:16 -!- wob_jonas has joined.
11:23:48  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  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:31:43  Hmm, structs...
11:37:32  `? structs
11:37:35  structs? ¯\(°​_o)/¯
11:40:12  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  int-e: oh sure, but that's not really my question
11:41:00  my question is whether you're allowed to define a struct right inside the offsetof
11:41:41  ah.
11:42:55  if it's allowed then you can use that to write alignof as a macro
11:43:04  a macro not using the builtin _Alignof that is
11:43:19  "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  it doesn't matter much anymore, because today's compilers all support the builtin alignof
11:43:35  it cam up more back when some compilers didn't yet have it
11:43:52  So I'd argue that your use case should be valid. But I can easily see it go wrong in practice :)
11:44:04  I not -> I note
11:45:07  ... well, actually it's tricker than that
11:46:29  you've probably done more digging into the standard than I have in the past 10 minutes :)
11:46:51  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  no, I mean it's trickier than "toyda's compilers all support the builtin alignof"
11:49:23  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  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  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  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  Because you could put it in the `static struct { ... } t;` as well.
11:59:17  But it's true it's a pretty brief description.
12:00:47  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  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  int-e: right, that's why I tried gcc and clang, and one of them accepted it, the other didn't
12:04:06  wob_jonas: are you willing to divulge which one accepted it?
12:09:24  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  okay apparently gcc accepts it.
12:22:25  but so does clang :P
12:22:56  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  printf("%zu\n", offsetof(struct{char a; int b;}, b)); <-- this is what I tried now.
12:29:57  uh, wrong format specifier; offsets are signed.
12:38:39  fizzie: ok, but that doesn't really help you tell what it accepts
12:40:54  fizzie: the traditional definition was something like #define offsetof(t,f) (long)((t*)0->f)
12:41:14  and that's why it was originally a macro rather than a keyword
12:41:17  on old compilers
12:43:37 -!- AnotherTest has joined.
12:44:04 -!- adu has quit (Quit: adu).
12:55:20  int-e: No, the format specifier was fine.
12:55:54  oh.
12:56:02  "-- `offsetof(/type/, /member-designator/)` which expands to an integer constant expression that has type `size_t`, --"
12:56:09  (C18 7.19p3)
12:56:11  right, I didn't think that through :)
12:56:33  (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  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  (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`.)
15:59:26  s/\*s/s*/
16:05:33 -!- wob_jonas has quit (Remote host closed the connection).
16:14:53  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  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  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  [[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  [[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:42  `? mushroom
21:45:43  A mushroom is a fungus that grows above ground, especially after rain.
21:45:49  there's not mush room for factual entries in this database
21:47:23  Why not?
21:47:31  `dowg mushroom
21:47:33  11801:2019-04-29  `` set -e; cd wisdom; mv -vi fungus mushroom; sed -i "s/^/A mushroom is /" mushroom; cat mushroom; echo ok
21:47:46  `dowg fungus
21:47:48  11801:2019-04-29  `` set -e; cd wisdom; mv -vi fungus mushroom; sed -i "s/^/A mushroom is /" mushroom; cat mushroom; echo ok \ 11797:2019-04-29  ` mv wisdom/fungu wisdom/fungus  # you may opt to `forget it if you wish
21:47:57  `dowg fungu
21:47:59  11797:2019-04-29  ` mv wisdom/fungu wisdom/fungus  # you may opt to `forget it if you wish \ 11796:2019-04-29  learn a fungus that grows above ground, especially after rain.
21:50:49  yeah I was surprised about an entry that attempted to be factual
21:54:49  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  and then ais came in and mentioned that he wants more factual wisdom entries and less stupid jokes
21:55:13  `? tanebventions
21:55:14  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:28  `? tanebventions: food
21:55:29  Culinary tanebventions include automatic squirrel feeders, weetoflakes, mushrooms, nutella, and cognac.
21:56:09  `? ruin
21:56:11  ruin? ¯\(°​_o)/¯
21:56:22  `? the universe
21:56:23  The universe was invented by Taneb as an opposing force to oerjan. Escardó proved that it was indiscreet.
21:56:23  `? universe
21:56:25  A universe is a poem in one stanza.
21:57:18  `? linear logic
21:57:19  linear logic? ¯\(°​_o)/¯
21:57:22  `? tanebventions: math
21:57:23  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:44  yeah, it was three
21:57:52  linear logic, ruin, and linear logic
22:00:07  . o O ( Are you even allowed to use "linear logic" twice in a sentence? )
22:01:46  um
22:01:50  mushroom, linear logic, and ruin
22:02:05  and yes you are
22:22:06 -!- sleepnap has left.
22:39:02  [[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  [[Esolang:Introduce yourself]]  https://esolangs.org/w/index.php?diff=61464&oldid=61409 * Mipinggfxgbtftybfhfyhfn * (+229) /* Introductions */
23:11:59 -!- oerjan has joined.
23:20:39  @messages-loud
23:20:40  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  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  so, definitely horrible.  it reminds to see if anything goes right.
23:28:39  *remains
23:30:03  `? fungus
23:30:07  fungus? ¯\(°​_o)/¯
23:30:16  `dowg fungus
23:30:18  11801:2019-04-29  `` set -e; cd wisdom; mv -vi fungus mushroom; sed -i "s/^/A mushroom is /" mushroom; cat mushroom; echo ok \ 11797:2019-04-29  ` mv wisdom/fungu wisdom/fungus  # you may opt to `forget it if you wish
23:30:31  `? mushroom
23:30:32  A mushroom is a fungus that grows above ground, especially after rain.
23:36:09  `? toilet
23:36:11  toilet is elliot spelled backwards, without the extra l, with a t at the end.
23:43:52  `` ls -l wisdom/ha
23:43:53  ls: cannot access 'wisdom/ha': No such file or directory
23:44:11  `dowg wisdom/ha
23:44:13  No output.
23:44:22  curious
23:44:50  `` dowg ha
23:44:52  11802:2019-04-29  forget ha \ 7443:2016-04-17  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:36  `2 dowg ha
23:45:38  2/1:
23:45:53  hm that doesn't explain the permission thing.
23:48:38  `forget toilet
23:48:39  Forget what?
23:49:08  no one seemed to actually complete the quality control
23:50:19  although it's a little suspicious when `5 w gives the last one added...
23:50:30  `cat bin/5
23:50:31  cmd="${1-quote}"; \`^ 5 "$cmd"
23:50:48  `cat bin/^
23:50:49  cat: 'bin/^': No such file or directory
23:50:57  `cat bin/`^
23:50:58  ​[[ $# == 2 ]] || { echo "Usage: $0 n cmd" >&2; exit 2; }; for ((i=0; i < $1; i++)); do \` "$2"; done | sport
23:51:17  `cat bin/w
23:51:18  wisdom "$@"
23:51:28  `cat bin/wisdom
23:51:29  ​#!/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  you'd think urandom would be enough.
23:52:03  i suppose it was just meant to be deleted.
23:56:48  `before wisdom/if
23:56:51  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: