Functions Removed from Julia 1.0.0 - julia

According to the August 2018 Julia blogpost
The language itself is significantly leaner, with many components split out into “standard library” packages that ship with Julia but aren’t part of the “base” language.
Is there a link to what was removed from the "base" language for the 1.0.0 version and the appropriate packages to use those items?

First of all, you can inspect all standard libraries in the documentation. Check the navigation on the left side for the section "Standard Library".
Note that there are also efforts to improve the documentation of the stdlibs.
Regarding the pre v0.7 -> v1.0 transition, to my knowledge there is no all-encompassing document that tells you where functionality has been moved. However, there are fairly comprehensive sources like
Julia v0.7 release notes
Julia v0.7 itself (run your old colde in it and you'll get very helpful deprecation warnings)
Julia v0.7's base/deprecations.jl (basically the same as above in non-executable form)
And last but not least, there is stackoverflow and discourse where you can simply ask (after checking above sources yourself)!

Related

Question about Julia version 1.8 and XLSX

I used Julia 1.7
The command
dfc = DataFrame(XLSX.readtable("data.xlsx","sheet1")...) worked good
After migrating to Julia 1.8 the same command stopped working and generated the following error message:
ERROR: MethodError: no method matching iterate(::XLSX.DataTable)
Closest candidates are:
iterate(!Matched::Union{LinRange, StepRangeLen}) at range.jl:872
iterate(!Matched::Union{LinRange, StepRangeLen}, !Matched::Integer) at range.jl:872
iterate(!Matched::T) where T<:Union{Base.KeySet{<:Any, <:Dict}, Base.ValueIterator{<:Dict}} at dict.jl:712
what has changed with that command with the new release?
Looking forward to some information
This has nothing to do with the Julia version you are using, and everything with the XLSX.jl version you are using. The XLSX documentation actually has a while section devoted to this here. The relevant bit for you is that readtable now returns a Tables.jl compatible table and so can passed into the DataFrame constructor directly, so instead of
DataFrame(XLSX.readtable(myfile, sheet)...)
You do
DataFrame(XLSX.readtable(myfile, sheet))
(note the lack of the splatting operator)
Note that these kinds of issues are expected when you move between breaking releases of a package according to Semver, so either between major releases (version 1.x to version 2.x) or between minor releases pre 1.0 (eg 0.5.x to 0.6.x). If you want to avoid these issues you should work with project specific environments so that the Manifest records the versions of all packages you are using and they don't change unless you manually do ] up for that specific environment.

Including hpp files in an R package

I'm writing an R package making use of Rcpp to call functions written in C++ into the R code. Some of these functions and templates are written in files with a .hpp extension following the convention used by boost (and also discussed here).
This does not result in an error when building (R CMD build .) and checking (R CMD check --as-cran package.tar.gz) the package, but it returns the next warning:
Subdirectory ‘src’ contains:
file.hpp example.hpp
These are unlikely file names for src files
Ok, this is not a big issue, but my concern is, why the warning? is naming *hpp files considered a bad practice in the R community? Are there objective or community reasons why I should use *cpp/*h files instead of *hpp for the templates?
I originally left this information as a comment, but realized it actually answers your question I think, so here goes:
As Dirk Eddelbuettel points out in the comments, when you have a question about an R Core Team policy on R extension packages, your best bet is to look through their excellent Writing R Extensions manual. This manual tells you almost anything you could ever need to know.
In your case specifically, you needed to look at Section 1.1.5, which explains that "[the R Core Team] recommend[s] using .h for headers" because (as they explain in footnote 18) "Using .hpp is not guaranteed to be portable."

Adding Code of missing functions in frama-c

Forgive my ignorance. I need to do calculate backward slices for a project. After some searching, I came across frama-c. I downloaded the package on my ubuntu system which got me Frama-c Version: Fluorine-20130601. I am trying to use it for the first time. When finding out the undefined functions in my project almost all library functions are undefined, even printf, scanf etc(Neither code nor specification for function printf). According to the tutorial, I have to add stubs for all the undefined functions. Do I really have to add code for every library function that I am using even printf? Please guide.
You should update to Frama-C Phosphorus, which brings tons of improvements regarding Variadic functions. In particular, specifications are automatically generated for printf/scanf-like functions when they are called on a constant format string. For non-variadic functions, some basic implementations are available in the directory $FRAMA_C_INSTALL/share/libc/*.c (in recent releases of Frama-C).

Is it possible to check the code of a function in R of a package's previous version?

A professor shared his R code, where he start by redefining an existing function f from package X.X.1. The package has been updated since then, so that now I have package X.X.3 installed.
His modified code and the function code in version X.X.3 are almost the same, aside from little things which don't really impact its purpose.
I wonder whether it's possible to look for its code in older versions (aka X.X.1) of the package (to see what has changed) WITHOUT having to download the older versions (I've seen from other SO questions that it is possible to download the older versions of the package, but I'd prefer just looking at the older codes, if possible), and so to avoid rewriting the version I have now.

specify external system utility dependency in R package

I wrote a R package which uses awk to do some initial filtering on data. But the awk the package uses needs be higher than a certain version.
Where do you recommend to specify this dependency?
I can list the dependency in SystemRequirements in DESCRIPTION file
http://r.789695.n4.nabble.com/how-to-list-external-dependencies-i-e-non-R-packages-td4693947.html
But it doesn't really do the check. Anyway, it may be good enough.
If you really wanted to go the long way, we now provide a template:
package x13binary installs the X-13ARIMA-SEATS binary from US Census
it takes a binary from a matching GitHub repo x13prebuilt we have set up just to provide these binaries
packages needing X-13 deseasonalization such as seasonal simply depend on x13binary
they then use wrapper scripts that find the binary as part of x13binary and use it
X-13ARIMA-SEATS is open source under a weird US Government license meaning that it is available as source, but with terms that vary a little a between the US and the rest of the world -- reflecting its origin from a world where license were less well understood.
This scheme might be overkill for you. On the other hand, you have simply no way to ensure that you will get the correct / minimally required awk version on Windows, OS X or arbitrary Linux.
List it in the SystemRequirements field of the DESCRIPTION file. For an example, see Ryacas.

Resources