Skip to main content
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link

Kotlin + Jline 2, 58 bytes

{print(jline.TerminalFactory.get().run{"$width $height"})}

Because why not. Turns out the standard lib actually has no way to determine console sizeactually has no way to determine console size so pulling in a library is required, lest you want to gold launching another process and parsing the input stream... would be a shame if somebody did that..

Kotlin + Jline 2, 58 bytes

{print(jline.TerminalFactory.get().run{"$width $height"})}

Because why not. Turns out the standard lib actually has no way to determine console size so pulling in a library is required, lest you want to gold launching another process and parsing the input stream... would be a shame if somebody did that..

Kotlin + Jline 2, 58 bytes

{print(jline.TerminalFactory.get().run{"$width $height"})}

Because why not. Turns out the standard lib actually has no way to determine console size so pulling in a library is required, lest you want to gold launching another process and parsing the input stream... would be a shame if somebody did that..

SO botched my link?
Source Link
F. George
  • 347
  • 1
  • 10

Kotlin + Jline 2, 58 bytes

{print(jline.TerminalFactory.get().run{"$width $height"})}

Because why not. Turns out the standard lib actually has no way to determine console size so pulling in a library is required, lest you want to gold launching another process and parsing the input stream... [would be a shame if somebody did that..would be a shame if somebody did that..

Kotlin + Jline 2, 58 bytes

{print(jline.TerminalFactory.get().run{"$width $height"})}

Because why not. Turns out the standard lib actually has no way to determine console size so pulling in a library is required, lest you want to gold launching another process and parsing the input stream... [would be a shame if somebody did that..

Kotlin + Jline 2, 58 bytes

{print(jline.TerminalFactory.get().run{"$width $height"})}

Because why not. Turns out the standard lib actually has no way to determine console size so pulling in a library is required, lest you want to gold launching another process and parsing the input stream... would be a shame if somebody did that..

http://chat.stackexchange.com/rooms/58225/discussion-between-meq5anlrk3lqs3kfsa5hbvstwe0niu-and-adam
Source Link
F. George
  • 347
  • 1
  • 10

Kotlin + Jline 2, 58 bytes

{print(jline.TerminalFactory.get().run{"$width $height"})}

Because why not. Turns out the standard lib actually has no way to determine console size so pulling in a library is required, lest you want to gold launching another process and parsing the input stream... would be a shame if somebody did that..

Whoops I had too much free time.

(noncompeting) Java 8 (SE only), Windows, 270 bytes

Marked as noncompeting due to arbitrary restriction of using no external libraries.

interface A{static void main(String[]a)throws Exception{Object[]r=new java.io.BufferedReader(new java.io.InputStreamReader(Runtime.getRuntime().exec("cmd /c mode").getInputStream())).lines().map(s->s.replaceAll("[^\\d]+","")).toArray();System.out.print(r[3]+" "+r[4]);}}

Ungolfed:[would be a shame if somebody did that..

interface A {
    static void main(String[] a) throws Exception {
        Object[] r = new java.io.BufferedReader(
                new java.io.InputStreamReader(
                        Runtime.getRuntime().exec("cmd /c mode")
                                .getInputStream()
                )
        ).lines().map(s -> s.replaceAll("[^\\d]+", "")).toArray();
        System.out.print(r[3] + " " + r[4]);
    }
}

Kotlin + Jline 2, 58 bytes

{print(jline.TerminalFactory.get().run{"$width $height"})}

Because why not. Turns out the standard lib actually has no way to determine console size so pulling in a library is required, lest you want to gold launching another process and parsing the input stream... would be a shame if somebody did that..

Whoops I had too much free time.

(noncompeting) Java 8 (SE only), Windows, 270 bytes

Marked as noncompeting due to arbitrary restriction of using no external libraries.

interface A{static void main(String[]a)throws Exception{Object[]r=new java.io.BufferedReader(new java.io.InputStreamReader(Runtime.getRuntime().exec("cmd /c mode").getInputStream())).lines().map(s->s.replaceAll("[^\\d]+","")).toArray();System.out.print(r[3]+" "+r[4]);}}

Ungolfed:

interface A {
    static void main(String[] a) throws Exception {
        Object[] r = new java.io.BufferedReader(
                new java.io.InputStreamReader(
                        Runtime.getRuntime().exec("cmd /c mode")
                                .getInputStream()
                )
        ).lines().map(s -> s.replaceAll("[^\\d]+", "")).toArray();
        System.out.print(r[3] + " " + r[4]);
    }
}

Kotlin + Jline 2, 58 bytes

{print(jline.TerminalFactory.get().run{"$width $height"})}

Because why not. Turns out the standard lib actually has no way to determine console size so pulling in a library is required, lest you want to gold launching another process and parsing the input stream... [would be a shame if somebody did that..

added 102 characters in body
Source Link
F. George
  • 347
  • 1
  • 10
Loading
added 859 characters in body
Source Link
F. George
  • 347
  • 1
  • 10
Loading
Source Link
F. George
  • 347
  • 1
  • 10
Loading