Skip to main content
fix syntax highlighting
Source Link

Erlang, 180 bytes, 11 versions, score 16.36

20-length([A||A<-[schedulers,c_compiler_used,cpu_topology,snifs,dynamic_trace,port_count,nif_version,end_time,max_heap_size,atom_count],{'EXIT',_}<-[catch erlang:system_info(A)]]). 

With indentation and line breaks:

20-length([A||A<- [schedulers, c_compiler_used, cpu_topology, snifs, dynamic_trace, port_count, nif_version, end_time, max_heap_size, atom_count], {'EXIT',_}<-[catch erlang:system_info(A)]]). 

Tested on one minor release of each major version since 10:

  • R10B-9
  • R11B-5
  • R12B-5
  • R13B04
  • R14B04
  • R15B03
  • R16B03
  • 17.5.6.2
  • 18.2.1
  • 19.2
  • 20.0

The idea is that every major release has added at least one new allowable argument for the function erlang:system_info, so let's try the ones in the list, count how many of them fail, and subtract the number of failures from 20, which is the current version.

Erlang, 180 bytes, 11 versions, score 16.36

20-length([A||A<-[schedulers,c_compiler_used,cpu_topology,snifs,dynamic_trace,port_count,nif_version,end_time,max_heap_size,atom_count],{'EXIT',_}<-[catch erlang:system_info(A)]]). 

With indentation and line breaks:

20-length([A||A<- [schedulers, c_compiler_used, cpu_topology, snifs, dynamic_trace, port_count, nif_version, end_time, max_heap_size, atom_count], {'EXIT',_}<-[catch erlang:system_info(A)]]). 

Tested on one minor release of each major version since 10:

  • R10B-9
  • R11B-5
  • R12B-5
  • R13B04
  • R14B04
  • R15B03
  • R16B03
  • 17.5.6.2
  • 18.2.1
  • 19.2
  • 20.0

The idea is that every major release has added at least one new allowable argument for the function erlang:system_info, so let's try the ones in the list, count how many of them fail, and subtract the number of failures from 20, which is the current version.

Erlang, 180 bytes, 11 versions, score 16.36

20-length([A||A<-[schedulers,c_compiler_used,cpu_topology,snifs,dynamic_trace,port_count,nif_version,end_time,max_heap_size,atom_count],{'EXIT',_}<-[catch erlang:system_info(A)]]). 

With indentation and line breaks:

20-length([A||A<- [schedulers, c_compiler_used, cpu_topology, snifs, dynamic_trace, port_count, nif_version, end_time, max_heap_size, atom_count], {'EXIT',_}<-[catch erlang:system_info(A)]]). 

Tested on one minor release of each major version since 10:

  • R10B-9
  • R11B-5
  • R12B-5
  • R13B04
  • R14B04
  • R15B03
  • R16B03
  • 17.5.6.2
  • 18.2.1
  • 19.2
  • 20.0

The idea is that every major release has added at least one new allowable argument for the function erlang:system_info, so let's try the ones in the list, count how many of them fail, and subtract the number of failures from 20, which is the current version.

Source Link

Erlang, 180 bytes, 11 versions, score 16.36

20-length([A||A<-[schedulers,c_compiler_used,cpu_topology,snifs,dynamic_trace,port_count,nif_version,end_time,max_heap_size,atom_count],{'EXIT',_}<-[catch erlang:system_info(A)]]). 

With indentation and line breaks:

20-length([A||A<- [schedulers, c_compiler_used, cpu_topology, snifs, dynamic_trace, port_count, nif_version, end_time, max_heap_size, atom_count], {'EXIT',_}<-[catch erlang:system_info(A)]]). 

Tested on one minor release of each major version since 10:

  • R10B-9
  • R11B-5
  • R12B-5
  • R13B04
  • R14B04
  • R15B03
  • R16B03
  • 17.5.6.2
  • 18.2.1
  • 19.2
  • 20.0

The idea is that every major release has added at least one new allowable argument for the function erlang:system_info, so let's try the ones in the list, count how many of them fail, and subtract the number of failures from 20, which is the current version.