Skip to content
  • Categories
  • Recent
  • Tags
  • All Topics
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Caint logo. It's just text.
Shane BeckerV

veganstraightedge@ruby.social

@veganstraightedge@ruby.social
Welcome to Caint!

Issues? Post in Comments & Feedback
You can now view, reply, and favourite posts from the Fediverse. You can click here or click on the on the navigation bar on the left.
About
Posts
5
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

View Original

Posts

Recent Best Controversial

  • Today in hare brained programming ideas— what if we wrote code in Markdown files
    Shane BeckerV Shane Becker

    Tradeoffs of Markdown as code files:

    - notice I didn't use code fencing backticks around the Ruby code… that would get noisy

    - default would be to treat text between ## h2 headings as code?

    - comments have to be… blockquotes? wrapped in --- HRs? or something

    - what syntax for code comments? //

    Uncategorized

  • Today in hare brained programming ideas— what if we wrote code in Markdown files
    Shane BeckerV Shane Becker

    Really REALLY hare brained idea—

    Multiple programming languages

    - in the same file!?

    - with file extension? eg, foo.rb.md

    - …

    Uncategorized

  • Today in hare brained programming ideas— what if we wrote code in Markdown files
    Shane BeckerV Shane Becker

    Bonus hare brained programming idea— what if we inferred the conventional class name/namespace from its filename/folder?

    foo.rb:

    def bar
    puts “ab”
    end

    def baz
    puts “xy"
    end

    def whoami
    puts class.name
    end

    ———

    foo.md:

    ## bar
    puts "ab

    ## baz
    puts “xy

    ## whoami
    puts class.name

    Uncategorized

  • Today in hare brained programming ideas— what if we wrote code in Markdown files
    Shane BeckerV Shane Becker

    Benefits of Markdown as code files:

    - docs / code are the same thing

    - pretty formatting of comments

    - all of the Markdown editors already Just Work™

    - flatter file / two levels less indentation

    - inferred ends/closers from starting the next heading

    - directly linkable with href=#___ links

    Uncategorized

  • Today in hare brained programming ideas— what if we wrote code in Markdown files
    Shane BeckerV Shane Becker

    Today in hare brained programming ideas— what if we wrote code in Markdown files?

    Hear me out…

    A simple Ruby class (PORO): Foo
    w/ methods: bar & baz

    foo.rb:

    class Foo
    def bar
    puts “ab”
    end

    def baz
    puts “xy”
    end
    end

    ———

    foo.md:

    # Foo

    ## bar
    puts "ab

    ## baz
    puts “xy

    Uncategorized
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • All Topics
  • Popular
  • World
  • Users
  • Groups