News for hackers. Stuff that matters.

0x0dea

Re:Quick, Draw on Wednesday November 16, 2016 @10:07AM (#12967520)
Do you know what year it is?
Re:Fixing C on Tuesday April 12, 2016 @05:41AM (#11478230)
Vim auto-indents macro blocks just fine, and preprocessing isn't compilation. For your edification, clang-format is amazing: https://youtu.be/JSjoCisIHcM?t=1764
Re:Show HN: VeryAnts: Probabilistic Integer Arithmetic for Ruby on Tuesday February 23, 2016 @12:06AM (#11156712)
Couldn't find a probabilistic testing library, eh?
Re:A Better Varargs on Wednesday February 10, 2016 @08:22PM (#11077615)
The magic __COUNTER__ macro supported by some compilers can be used to simulate gensym.
Does the body have ways of shutting that down?
Re:Improving your code readability with namedtuples on Saturday October 31, 2015 @01:50PM (#10483430)
Ruby's Struct is pretty nifty.

    Person = Struct.new :name, :age

    people = [
      Person.new('Alice', 42),
      Person.new('Bob',   23),
      Person.new('Carol', 30)
    ]

    people.sort_by(&:age).map(&:name)
    # => ["Bob", "Carol", "Alice"]
Re:What is code? on Wednesday September 09, 2015 @05:42AM (#10190531)

    $ whatis code
    code: nothing appropriate.
Re:Experiments with Ruby and Go on Sunday June 14, 2015 @04:23PM (#9716199)
"Ruby code can have a syntax error in a conditional..."

No, it can't. If this is something you've seen "many times", would you mind providing an example? Show me a program that Ruby tries to execute without having been able to parse it.