Skip to main content
edited body
Source Link
Carcigenicate
  • 3.6k
  • 2
  • 22
  • 30

Clojure, 93 92 bytes

#(do(print"Loading... -")(doseq[c(cycle"\\|/-")](print(str"\b"c))(flush)(Thread/sleep 250)))

Basically the Haskell answer (I swear I didn't cheat!).

It must be run in a console. IDE REPL'sIDE's REPL (Intellij) just prints a garbage character in place of the "\b".

And it's late, and I've never even created a GIF before, so I'm going to have to pass on that part.

Clojure, 93 92 bytes

#(do(print"Loading... -")(doseq[c(cycle"\\|/-")](print(str"\b"c))(flush)(Thread/sleep 250)))

Basically the Haskell answer (I swear I didn't cheat!).

It must be run in a console. IDE REPL's (Intellij) just prints a garbage character in place of the "\b".

And it's late, and I've never even created a GIF before, so I'm going to have to pass on that part.

Clojure, 93 92 bytes

#(do(print"Loading... -")(doseq[c(cycle"\\|/-")](print(str"\b"c))(flush)(Thread/sleep 250)))

Basically the Haskell answer (I swear I didn't cheat!).

It must be run in a console. IDE's REPL (Intellij) just prints a garbage character in place of the "\b".

And it's late, and I've never even created a GIF before, so I'm going to have to pass on that part.

Cleaned up
Source Link
Carcigenicate
  • 3.6k
  • 2
  • 22
  • 30

Clojure, 9393 92 bytes

#(fn[]do(print"Loading... -")(doseq[c(cycle"\\|/-")](print(str"\b"c))(flush)(Thread/sleep 250)))

Basically the Haskell answer (I swear I didn't cheat!). I'm going to try to convert the doseq to a mapv, and try to get rid of the explicit flush. The initial - in the string is also unfortunate, but I need to make sure theres a char there initially to delete. Maybe I'll print first, then delete? I'll see.

It must be run in a console. IDE REPL's (Intellij) just printprints a garbage character in place of the "\b""\b".

And it's late, and I've never even created a GIF before, so I'm going to have to pass on that part.

Clojure, 93 bytes

(fn[](print"Loading... -")(doseq[c(cycle"\\|/-")](print(str"\b"c))(flush)(Thread/sleep 250)))

Basically the Haskell answer (I swear I didn't cheat!). I'm going to try to convert the doseq to a mapv, and try to get rid of the explicit flush. The initial - in the string is also unfortunate, but I need to make sure theres a char there initially to delete. Maybe I'll print first, then delete? I'll see.

It must be run in a console. IDE REPL's (Intellij) just print a garbage character in place of the "\b".

And it's late, and I've never even created a GIF before, so I'm going to have to pass on that part.

Clojure, 93 92 bytes

#(do(print"Loading... -")(doseq[c(cycle"\\|/-")](print(str"\b"c))(flush)(Thread/sleep 250)))

Basically the Haskell answer (I swear I didn't cheat!).

It must be run in a console. IDE REPL's (Intellij) just prints a garbage character in place of the "\b".

And it's late, and I've never even created a GIF before, so I'm going to have to pass on that part.

Source Link
Carcigenicate
  • 3.6k
  • 2
  • 22
  • 30

Clojure, 93 bytes

(fn[](print"Loading... -")(doseq[c(cycle"\\|/-")](print(str"\b"c))(flush)(Thread/sleep 250)))

Basically the Haskell answer (I swear I didn't cheat!). I'm going to try to convert the doseq to a mapv, and try to get rid of the explicit flush. The initial - in the string is also unfortunate, but I need to make sure theres a char there initially to delete. Maybe I'll print first, then delete? I'll see.

It must be run in a console. IDE REPL's (Intellij) just print a garbage character in place of the "\b".

And it's late, and I've never even created a GIF before, so I'm going to have to pass on that part.