Skip to main content
Commonmark migration
Source Link

#Ruby, 74 60 45 bytes

Ruby, 74 60 45 bytes

Input is in command line, run it like ruby f.rb 0 20. Only works in current directory.

-1 byte from unpacking the ARGV into variables, and -13 bytes from replacing the select and grep with a set subtraction.

V3: -5 bytes from using a substitution for Dir.glob in an old Ruby answer to another filesystems challenge, as suggested by @PatrickOscity. -10 from remembering some quirks in Ruby's String#next function.

a,b=$* f=[*a..b]-Dir[?*] puts f-f.map(&:next) 

#Ruby, 74 60 45 bytes

Input is in command line, run it like ruby f.rb 0 20. Only works in current directory.

-1 byte from unpacking the ARGV into variables, and -13 bytes from replacing the select and grep with a set subtraction.

V3: -5 bytes from using a substitution for Dir.glob in an old Ruby answer to another filesystems challenge, as suggested by @PatrickOscity. -10 from remembering some quirks in Ruby's String#next function.

a,b=$* f=[*a..b]-Dir[?*] puts f-f.map(&:next) 

Ruby, 74 60 45 bytes

Input is in command line, run it like ruby f.rb 0 20. Only works in current directory.

-1 byte from unpacking the ARGV into variables, and -13 bytes from replacing the select and grep with a set subtraction.

V3: -5 bytes from using a substitution for Dir.glob in an old Ruby answer to another filesystems challenge, as suggested by @PatrickOscity. -10 from remembering some quirks in Ruby's String#next function.

a,b=$* f=[*a..b]-Dir[?*] puts f-f.map(&:next) 
replaced http://codegolf.stackexchange.com/ with https://codegolf.stackexchange.com/
Source Link

#Ruby, 74 60 45 bytes

Input is in command line, run it like ruby f.rb 0 20. Only works in current directory.

-1 byte from unpacking the ARGV into variables, and -13 bytes from replacing the select and grep with a set subtraction.

V3: -5 bytes from using a substitution for Dir.glob in an old Ruby answer to another filesystems challengean old Ruby answer to another filesystems challenge, as suggested by @PatrickOscity. -10 from remembering some quirks in Ruby's String#next function.

a,b=$* f=[*a..b]-Dir[?*] puts f-f.map(&:next) 

#Ruby, 74 60 45 bytes

Input is in command line, run it like ruby f.rb 0 20. Only works in current directory.

-1 byte from unpacking the ARGV into variables, and -13 bytes from replacing the select and grep with a set subtraction.

V3: -5 bytes from using a substitution for Dir.glob in an old Ruby answer to another filesystems challenge, as suggested by @PatrickOscity. -10 from remembering some quirks in Ruby's String#next function.

a,b=$* f=[*a..b]-Dir[?*] puts f-f.map(&:next) 

#Ruby, 74 60 45 bytes

Input is in command line, run it like ruby f.rb 0 20. Only works in current directory.

-1 byte from unpacking the ARGV into variables, and -13 bytes from replacing the select and grep with a set subtraction.

V3: -5 bytes from using a substitution for Dir.glob in an old Ruby answer to another filesystems challenge, as suggested by @PatrickOscity. -10 from remembering some quirks in Ruby's String#next function.

a,b=$* f=[*a..b]-Dir[?*] puts f-f.map(&:next) 
added 145 characters in body
Source Link
Value Ink
  • 13.5k
  • 1
  • 18
  • 46

#Ruby, 74 6060 45 bytes

Input is in command line, run it like ruby f.rb 0 20. Only works in current directory.

-1 byte from unpacking the ARGV into variables, and -13 bytes from replacing the select and grep with a set subtraction.

V3: -5 bytes from using a substitution for Dir.glob in an old Ruby answer to another filesystems challenge, as suggested by @PatrickOscity. -10 from remembering some quirks in Ruby's String#next function.

a,b=$* f=[*a..b]-Dir.glob(Dir[?*)*] puts f-f.map{|e|"#{e.to_i+1}"}(&:next) 

#Ruby, 74 60 bytes

Input is in command line, run it like ruby f.rb 0 20. Only works in current directory.

-1 byte from unpacking the ARGV into variables, and -13 bytes from replacing the select and grep with a set subtraction.

a,b=$* f=[*a..b]-Dir.glob(?*) puts f-f.map{|e|"#{e.to_i+1}"} 

#Ruby, 74 60 45 bytes

Input is in command line, run it like ruby f.rb 0 20. Only works in current directory.

-1 byte from unpacking the ARGV into variables, and -13 bytes from replacing the select and grep with a set subtraction.

V3: -5 bytes from using a substitution for Dir.glob in an old Ruby answer to another filesystems challenge, as suggested by @PatrickOscity. -10 from remembering some quirks in Ruby's String#next function.

a,b=$* f=[*a..b]-Dir[?*] puts f-f.map(&:next) 
added 132 characters in body
Source Link
Value Ink
  • 13.5k
  • 1
  • 18
  • 46
Loading
Source Link
Value Ink
  • 13.5k
  • 1
  • 18
  • 46
Loading