GNU social JP
  • FAQ
  • Login
GNU social JPは日本のGNU socialサーバーです。
Usage/ToS/admin/test/Pleroma FE
  • Public

    • Public
    • Network
    • Groups
    • Featured
    • Popular
    • People

Conversation

Notices

  1. Embed this notice
    Andy Wingo (wingo@mastodon.social)'s status on Thursday, 15-Jun-2023 06:27:35 JST Andy Wingo Andy Wingo

    the people require __attribute__((__musttail__)) in gcc. we require it

    In conversation Thursday, 15-Jun-2023 06:27:35 JST from mastodon.social permalink
    • clacke likes this.
    • Embed this notice
      Laurence Tratt (ltratt@mastodon.social)'s status on Thursday, 15-Jun-2023 06:27:39 JST Laurence Tratt Laurence Tratt
      in reply to
      • Stephen Kell
      • CF Bolz-Tereick

      @stephenrkell @cfbolz @wingo Many years ago I wrote a blog post on the downsides of tail calls on debugging https://tratt.net/laurie/blog/2004/tail_call_optimization.html only to discover later that at least one paper (Smith and Ungar, cited at the end in an update) had also alluded to the problem. I've sometimes wondered: how soon after tail calls were introduced did the debugging downsides become known?

      In conversation Thursday, 15-Jun-2023 06:27:39 JST permalink

      Attachments


      clacke likes this.
    • Embed this notice
      Stephen Kell (stephenrkell@recurse.social)'s status on Thursday, 15-Jun-2023 06:27:44 JST Stephen Kell Stephen Kell
      in reply to
      • CF Bolz-Tereick

      @cfbolz @wingo Tangential, but one of the tricky things I sometimes think about is how to reconcile tail-call optimisation with debuggability. Do you have a take?

      E.g. with tail recursion, even supposing you can reconstruct the stack depth and locals from ambient other state, it's not expressible within DWARF to 'synthesise n frames, computed like so'... and it'd probably be a misfeature even if it were. What should happen?

      Sibling tail-call opt is even trickier... I often tell it to -f off.

      In conversation Thursday, 15-Jun-2023 06:27:44 JST permalink
    • Embed this notice
      CF Bolz-Tereick (cfbolz@mastodon.social)'s status on Thursday, 15-Jun-2023 06:27:47 JST CF Bolz-Tereick CF Bolz-Tereick
      in reply to

      @wingo oh yes, that would be excellent

      In conversation Thursday, 15-Jun-2023 06:27:47 JST permalink
    • Embed this notice
      Andy Wingo (wingo@mastodon.social)'s status on Thursday, 15-Jun-2023 06:27:49 JST Andy Wingo Andy Wingo
      in reply to
      • Laurence Tratt
      • Stephen Kell
      • CF Bolz-Tereick

      @ltratt @stephenrkell @cfbolz i think in this concrete case there is no issue because it's something the programmer intends, rather than an unexpected optimization. would be weird to see a stack frame when you explicitly asked not to have one :)

      In conversation Thursday, 15-Jun-2023 06:27:49 JST permalink
      clacke likes this.
    • Embed this notice
      Andy Wingo (wingo@mastodon.social)'s status on Thursday, 15-Jun-2023 06:27:51 JST Andy Wingo Andy Wingo
      in reply to
      • Laurence Tratt
      • Stephen Kell
      • CF Bolz-Tereick

      @ltratt @stephenrkell @cfbolz ok gotta be pedantic here, what is being opted into is proper tail calls, not tail call *optimization*; clang::musttail means tail calls even when -O0

      In conversation Thursday, 15-Jun-2023 06:27:51 JST permalink
      clacke likes this.
    • Embed this notice
      Laurence Tratt (ltratt@mastodon.social)'s status on Thursday, 15-Jun-2023 06:27:52 JST Laurence Tratt Laurence Tratt
      in reply to
      • Stephen Kell
      • CF Bolz-Tereick

      @wingo @stephenrkell @cfbolz I agree -- when one opts in to TCO, one implicitly accepts the lack of stack traces.

      In conversation Thursday, 15-Jun-2023 06:27:52 JST permalink
    • Embed this notice
      Stephen Kell (stephenrkell@recurse.social)'s status on Thursday, 15-Jun-2023 06:27:54 JST Stephen Kell Stephen Kell
      in reply to
      • Laurence Tratt
      • CF Bolz-Tereick

      @wingo @ltratt @cfbolz Time for my pedantry... let's not mix 'stack traces' (a debugging feature) with 'stack frame' (a memory allocation). Stack traces already include 'frames' that do not correspond to any physical frame, thanks to inlining

      (That is another example of something that can be done at -O0, via always_inline, and straddles 'correctness' vs 'optimisation'. For TC[O] it depends whether you classify asymptotic space usage as functional or extrafunctional... the use case matters.)

      In conversation Thursday, 15-Jun-2023 06:27:54 JST permalink
      clacke likes this.
    • Embed this notice
      clacke (clacke@libranet.de)'s status on Thursday, 15-Jun-2023 06:27:54 JST clacke clacke
      in reply to
      • James Henstridge
      @jamesh @wingo Being a normal person is overrated.
      In conversation Thursday, 15-Jun-2023 06:27:54 JST permalink
    • Embed this notice
      James Henstridge (jamesh@aus.social)'s status on Thursday, 15-Jun-2023 06:28:00 JST James Henstridge James Henstridge
      in reply to

      @wingo Or you could just learn to use while loops like a normal person 😃

      In conversation Thursday, 15-Jun-2023 06:28:00 JST permalink

Feeds

  • Activity Streams
  • RSS 2.0
  • Atom
  • Help
  • About
  • FAQ
  • TOS
  • Privacy
  • Source
  • Version
  • Contact

GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.