Talk:Brainfuck bitwidth conversions

From Esolang
Jump to navigation Jump to search

This is still ugly - Is there some way to get <pre> style inside table cells without extra borders? (Better than the heap of <code>, <br>, &nbsp; and style="white-space:nowrap" I used in the Qdeql article, that is.) --Ørjan 14:00, 17 March 2012 (UTC)

I could add a class for it, but the thing is that this table really wants to have its cells vertically aligned at the top, and I don't know any way to conveniently do that other than annotating every single cell or adding another class. Better suggestions are welcome. —ehird 14:43, 17 March 2012 (UTC)
Well, I added a plain class for unadorned <pre>s. The wikicode on Qdeql is messy enough that I'll leave you to do the conversion of that article. Suggestions for the vertical alignment issue still welcome. —ehird 14:50, 17 March 2012 (UTC)
Oh, it only has to be applied to each row. That's much less painful. —ehird 14:53, 17 March 2012 (UTC)
Yay! --Ørjan 20:18, 17 March 2012 (UTC)
Now applied to Qdeql. Admittedly many of the replacements of <code> with <pre class="plain"> are unnecessary and actually make it more complicated, but it was easier to just search and replace all of them, and it helped a lot on the hairier instances. --Ørjan 21:54, 17 March 2012 (UTC)

Do 1->2 Compact copy and 1->4 Compact copy work

These two conversion methods don't work on my side, while the others do. What did I do wrong? --None1 (talk) 13:24, 26 February 2024 (UTC)

Perhaps didn't notice that "." converts to ">.<" and similarly for "," ? Rdebath (talk) 21:37, 3 May 2024 (UTC)
This works fine for me ...
#!/usr/bin/ruby
print ARGF.read.gsub(
        /./,
        '>'=>'>>>',
        '<'=>'<<<',
        '+'=>'+>+[<->[->>+<<]]>>[-<<+>>]<<<[->>+<<]',
        '-'=>'+>[<->[->>+<<]]>>[-<<+>>]<<<[->>-<<]>-<',
        '['=>'>[<+>[->>+<<]]>>[-<<+>>]<[<<+>>[->+<]]>[-<+>]<<<[[-]',
        ']'=>'>[<+>[->>+<<]]>>[-<<+>>]<[<<+>>[->+<]]>[-<+>]<<<]',
        '.'=>'>.<',
        ','=>'>,<')
        .gsub(/[^\[\]<>+,-.]/,'').gsub('<>','').gsub(/(.{1,72})/, "\\1\n");

Rdebath (talk) 21:37, 3 May 2024 (UTC)

> Perhaps didn't notice that "." converts to ">.<" and similarly for "," ?

The text didn't say it. --None1 (talk) 13:27, 5 May 2024 (UTC)