Suma

Czech Republic

Age: 43

Programmer

Areas of interest:

  • Native Win32 programming
  • Visual C++
  • Scala
  • C++ templates
  • Multicore scalability
  • DirectX, OpenGL, 3D graphics
  • Performance optimizations
23h
awarded Guru
1d
awarded Constituent
Apr
14
asked Can Windows 7 OS on harddrive use SSD for prefetch (SuperFetch)?
Apr
13
awarded Caucus
Apr
13
comment Invoke a method using a tuple as the parameter list
possible duplicate of scala tuple unpacking
Apr
9
comment Scala pattern matching on sequences other than Lists
Note: s.size >= 1 can be slow on Seq and can be replaced with s.nonEmpty (which also seems more descriptive).
Apr
7
comment Replace mapValues for ListMap
Is there a guarantee lm.mapValues and ++ with Map will maintain the order? Where does the guarantee come from?
Apr
7
accepted Replace mapValues for ListMap
Apr
7
asked Replace mapValues for ListMap
Apr
7
comment Immutable Scala Map implementation that preserves insertion order
possible duplicate of Scala Map implementation keeping entries in insertion order?
Apr
6
comment Idiomatic way of treating Option[Boolean]
Instead of exists { _ == true } it is more sensible to write exists(identity) or contains(true). Comparing bool to true is frowned upon by many programmers Is it bad to explicitly compare against boolean constants e.g. if (b == false) in Java.
Apr
4
comment Scala equivalent of C++ static variable in a function
possible duplicate of In Scala, how would you declare static data inside a function?
Apr
3
comment Scala script in 2.11
Unfortunately the example application does not work for me. I have the compiler dependency added in build.sbt. I have tried both 2.11.5 and 2.11.6, and both from IntelliJ IDE and from sbt command line (using sbt 0.13.8), I always get the same exception: [init] error: error while loading Object, Missing dependency 'object scala in compiler mirror', required by ... /// Failed to initialize compiler: object scala in compiler mirror not found.
Apr
3
comment Scala script in 2.11
I can get rid of the exception by using e.asInstanceOf[IMain].settings.usejavacp.value = true, but then I get very strange errors on second script execution (CaseClassException when casting IMain to IMain). My wild guess embedding Scala in JSR-223 style is intended for Java applications, and not for Scala ones?
Apr
3
comment Scala script in 2.11
Note: Scripting engine created getEngineByName succeeds, but I get exception when calling the eval function on it.
Apr
3
comment Scala script in 2.11
This looks promising, however when I run this in my application (not REPL), I get error scala.reflect.internal.MissingRequirementError: object scala in compiler mirror not found.. I have all of "scala-reflect", "scala-compiler" and "scala-library" in my build.sbt (and actually I already had the script compilation working using universe.runtimeMirror, only variable setting was something I was unable to do).
Apr
3
revised Scala script in 2.11
Added hyperlinks.
Apr
1
comment Scala - ScheduledFuture
I do not understand one thing: there is an implicit ctx: ExecutionContext argument to apply, but I cannot see where it would be used - I do not see makeTask or timer.schedule expecting it.
Apr
1
comment Generating a class from string and instantiating it in Scala 2.10
The answer seems deprecated for 2.11. However as the function specifically mentions 2.10, I am not sure if it is worth updating? Note: Meanwhile I have asked a similar question for 2.11
Apr
1
reviewed Leave Open DLL To EXE Conversion? [C++]
1 2 3 4 5