3 ms·
Back in 2010 I wanted to try out Scala. I fired up the REPL and did this: scala> 1+2 res0: Int = 12 Here is a blog post I wrote about it at the time:
by pjungwir 9y ago
Back in 2010 I wanted to try out Scala. I fired up the REPL and did this:
scala> 1+2
res0: Int = 12
Here is a blog post I wrote about it at the time: https://illuminatedcomputing.com/posts/2010/11/no-luck-trying-out-scala/ https://illuminatedcomputing.com/posts/2010/11/no-luck-tryin...
I was running under Cygwin and the issue was something about the Java-based readline library.
I filed a ticket (linked in my blog post but the link is broken now), but the maintainers' response was something like "Yeah right. Closed."
You'd think compiler bugs would be more obscure than 1+2. :-)
- goialoq 9y agoWhat's old is new again: https://www.google.com/search?q=ios+1+2+3 https://www.google.com/search?q=ios+1+2+3
- saagarjha 9y agoThis isn't related…
- mgraczyk 9y agoThe issue is now on github: https://github.com/scala/bug/issues/4009 https://github.com/scala/bug/issues/4009
- milcron 9y ago> I was running under Cygwin and the issue was something about the Java-based readline library. Apparently the problem is that the '+' character was being thrown out, so Scala only saw '12'.
- FeepingCreature 9y agoThis reminds me of my favorite "bug" in my language. I was trying to show off string representations of arithmetic expressions, so I typed in this. <feep> .neatex string-of 2+2 <feepbot> 23 That took a little figuring! Turns out, I'd forgotten my own precedence rules, and it'd interpreted it as (string-of 2) + 2; string-of, being a compile-time operator, yielded a string literal "2", which then implicitly cast to a string pointer, which then got incremented by two right past the end and into the next string, which happened to be "23".
- TickleSteve 9y agoThis isn't a bug in the compiler... its a bug in the readline library.
- dkersten 9y ago> but the maintainers' response was something like "Yeah right. Closed." That sounds pretty horrifying! But reading the issue (linked from the github issues linked by sibling), the actual response seems pretty reasonable. He looked into it and determined it was an issue with your setup, and asked for more information (if he couldn't reproduce it, what else could he do?). He also made a guess at what was wrong. You provided more information and a workaround (nice!) and a few weeks later he closed it saying he believes its now fixed. Seems ok to me.