Recommended Scala io library [closed] - scala

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed last year.
Improve this question
By all accounts, Scala's Source is a bit of a mess - everything I've read about it mentions resources left open, mysterious bugs...
I was wondering whether that was still the case in recent versions of Scala and, if so, what are worthy alternatives?
I've mostly heard of scala-io and scalaz-streams (and, obviously standard Java IO primitives). Did I miss anything? If anyone has experience with these or other projects, what are their respective pros and cons?
I'm inclined to go for scala-io, since I found the author's blog to be a fairly high quality source of useful of information, but I'd love to know more about the alternatives and what other people use.

Rapture IO might be worth trying.
It provides some nice DSL for managing IO resources of various kinds.

Using the package java.nio.file in Java standard library may also be simple enough if you don't require advance features. For example, to read the lines of a file into memory:
Files.readAllLines(Paths.get("file_name"), StandardCharsets.UTF_8).asScala
And to write a sequence of lines into a file:
val strs = Seq("line1", "line2", "line3")
Files.write(Paths.get("output_file"), strs.mkString("\n").getBytes())
Check
http://docs.oracle.com/javase/tutorial/essential/io/file.html
for more information.

Related

Which tools can I use to benchmark a scala code? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
I'm doing a project where I need to analyze the differences between functional programming and imperative programming. I'm using Scala since it's a multi-paradigm language, for a fair comparison.
Using languages that have a front-end on gcc, pin and perf(hardware) are suitable tools to do these comparisons, but now on Scala, I'm not finding substitutes.
I'm not interested on microbenchmark that only observe the time it took to run the algorithm. Since it's a conway's game of life implementation, a number of memory access is required and so on. I'm grateful for any help
I would recommend ScalaMeter. It is a microbenchmarking tool, but it does what you want by running the code multiple times, and removing the effects of JIT compiler warm-up, garbage collection, etc. It can also be configured to report memory usage, etc.

Finding Common Lisp Libraries [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I'm using QuickLisp to load Common Lisp libraries. However, there are many libraries that all do similar things. For example, there are many libraries that all deal with parsing a CSV file.
Are there any resources you use to check which libraries meet your needs? How do you determine if a library is still being supported? Are there any heuristics short of visiting individual libraries's websites?
I'm aware of http://www.cliki.net/, which provides some recommendations.
There are two separate questions:
Are there any resources you use to check which libraries meet your
needs?
I just use the library's official documentation, or quickdocs as mentioned earlier. I don't think there are any comparison tables between similar libraries. But you can always ask for help on #lisp on Freenode IRC network (since StackOverflow doesn't like questions like "What's the best CL library for parsing CSV?")
How do you determine if a library is still being supported? Are there any heuristics short of visiting individual libraries's websites?
If a library is on Quicklisp then it is supported. Unsupported libraries usually drop out soon enough. Xach (Quicklisp's developer and maintainer) makes sure that there is no library in Quicklisp which can't be built on a supported CL implementation.
you can try http://quickdocs.org/
it contains a number of references to widely used libraries from quicklisp, shows their last update time and some documentation. As for me, it was nice starting point to avoid the choice paralysis

serialization (pickling / marshalling) in scala? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
Are there are any examples, tutorials or docs for serialization / pickling / marshalling objects in Scala? I know of existence of scala.util.Marshal and scala.reflect.internal.pickling, but what is a difference between them? how can I use it? Is that some experimetal feature or can I use it in production ... ?
You should use either java serialization (I recommend using the Externalizable approach for complex cases). You can find lots of tutorials by googling "java serialization tutorial".
If you want to stay in Scala, you should have a look to SBinary which uses composable type classes. The project seems old and unmaintained but works like a charm with Scala 2.9.2. There's a tutorial link in the README and I'm currently writing another one.
Not sure about the requirements you have, but it's worth looking at Google's Protocol Buffers and Apache Thrift. Both provide efficient mechanism for serialization.
There is a Protocol Buffers scala compiler ScalaBuff

Is there anything like rubygems.org for scala libraries [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I notice there is an sbaz tool that seems to have similar functionality to the ruby gem tool but I don't see any community site like gemcutter.org / rubygems.org. Is there something like this around.
There are 1084 repositories on github with scala in them. I'm surprised I can't find some centralized package management utility. Perhaps I'm just googling the wrong keywords.
The closest equivalent is probably http://scala-tools.org which maintains a Maven (ivy, sbt, etc) repository of most of the best-known packages.
Scala Tools appears to no longer be functional as of this writing. It says:
We are no longer providing any support for scala-tools.org.
Instead, it is suggested to use https://oss.sonatype.org/
As Kris said, http://scala-tools.org is the closest thing so far. We're working on improving the site, and will be enabling "static project sites" shortly. There's also http://implicit.ly/ which aims to be the standard new source for published releases.

A good source for lisp libraries? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
Is there a PEAR kind library for lisp? I hope there is, but I read somewhere that one of the disadvantages of lisp is its lack of serious libraries. I find that hard to believe since lisp is half a century old now.
Have you tried quicklisp?
http://www.quicklisp.org/beta/
The Common Lisp Wiki is a good place to start.
As jlf said www.cliki.net is a good starting point. Also take a closer look at asdf-install and clbuild. If you are on linux clbuild is like package manager for lisp libraries.
common-lisp.net hosts a lot of Lisp projects. Many are installable via ASDF.
See also The Common Lisp Directory.
Mudballs is also worth a look.
It's a myth that there's a lack of libraries for CL.
I can recommend clbuild to manage your libraries.
Use cl-user.net to find specific libraries.