question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

repl eats program output

See original GitHub issue

taken from http://scalapuzzlers.com/#pzzlr-013

Welcome to Scala.next (pre-alpha)  (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_45).
Type in expressions to have them evaluated.
Type :help for more information.
scala> implicit object RomanOrdering extends Ordering[RomanNumeral] {
         def compare(a: RomanNumeral, b: RomanNumeral) = a.value compare b.value
       }
defined module RomanOrdering
scala>
scala>
val numerals = SortedSet(RomanNumeral("M", 1000), RomanNumeral("C", 100), RomanNumeral("X", 10), RomanNumeral("I", 1), RomanNumeral("D", 500), RomanNumeral("L", 50),  RomanNumeral("V", 5))
numerals: scala.collection.immutable.SortedSet[RomanNumeral] = TreeSet(RomanNumeral(I,1), RomanNumeral(V,5), RomanNumeral(X,10), RomanNumeral(L,50), RomanNumeral(C,100), RomanNumeral(D,500), RomanNumeral(

scala>
scala> println("Roman numeral symbols for 1 5 10 50 100 500 1000:")
Roman numeral symbols for 1 5 10 50 100 500 1000:
scala> for (num <- numerals; sym = num.symbol) { print(s"${sym} ") }
scala> numerals map { _.symbol } foreach { sym => print(s"${sym} ") }
scala>

The numbers were printed, but then they were swallowed by repl and replaced by scala> invitation.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
allanrenuccicommented, Jan 10, 2018

I think a very simple fix would be to print a new line after a command is interpreted

0reactions
benkobalogcommented, Jan 11, 2018

Ammonite prints an additional new line after each command. It also prints a new line for commands returning Unit values.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Replit: the collaborative browser based IDE - Replit
Write and run code in 50+ languages online with Replit, a powerful IDE, ... "Tightly integrated code generation, editing and output - well...
Read more >
How do I display output in Repl.it using Javascript?
I'm trying to get the output to display to the console and I'm ... Run code snippet. Hide results. Expand snippet. javascript ·...
Read more >
Do Meal Replacements Work For Weight Loss? - Allina Health
athletic man eats meal replacement bar for weight loss ... day as part of a program results in calorie reduction and weight loss...
Read more >
Mitral valve repair and mitral valve replacement - Mayo Clinic
Results · Not smoking · Getting regular exercise · Eating a healthy diet · Managing stress ...
Read more >
Jenny Craig Diet Review 2022: Does It Work for Weight Loss?
The program delivers low calorie prepackaged meals and offers one-on-one support from a coach. The goal is to remove the guesswork about what...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found