Naming an Ngram document after a string. Julia v1.1.1 - nlp

I am running Julia v1.1.1 on a windows 10 machine.
I recently went back to update my Julia v0.6.2 code to Julia v.1.1.1 as my code is no longer supported in Julia v0.6.2 anymore.
I was wondering if anyone knows how to name an Ngramdocument after a string, I think the function used to do this was in the TextAnalysis package :
name!(Ngramdocument, string)
However, recently now that I am trying to update my code to Julia v1.1.1 it is saying that the function is undefined. I was wondering if maybe I was wrong in assuming that the function was defined in the TextAnalysis.jl package or if they changed the name. I have not been able to find documentation of a name change however.

name! was changed to title!. title!(Ngramdocument, string) should work as expected in Julia 1.1.1 with the recent TextAnalysis.jl release. You can see the relevant pull request here.
While migrating code, if you face such undefined function errors, you may quickly find the changes looking at the commit history of the package repository or using search function on the GitHub repo of the package.

Related

Solidity compiler error loading specific function

Well, here we are once again.. It seems like there is literally NO docs for the usage of the Solidity compiler in Node.js.. Here is my question.
Context : I want to load a specific version of the Solidity compiler in my Node.js program. In order to do so, I installed the Solidity compiler through npm install solc . Then in my code I declared the solc variable, as follows : var solc = require('solc'). Until there no problem whatsoever.
Problem #1 : solc.loadRemoteVersion(version,callback) seems not to work correctly since this call instantly throw the following error: Error retrieving binaries: not found. Even tho this function is supposed to reach a remote folder on GitHub where all (or almost all) versions of the solidity compiler are stored it seems like it's not even trying to fetch the remote versions (it should at least look take some time before failing miserably)
Problem #2 : solc.useVersion(version) throw another error, more interesting in this case: solc.useVersion() is not a function. This call should go under the folder node_modules/solc/bin/solcjs-version.js and look for the desired version of the compiler but insted it decided to completely not work,
Any help is appriciated. I'm literally stuck on this since two days ago.
The package looks for the full version string, including the commit ID - not just the version number. See the wrapper.ts source.
You can find the specific full version strings in list.json that is mentioned in the docs.
And here is a working example:
solc.loadRemoteVersion("v0.8.0+commit.c7dfd78e", (err, solcSnapshot) => {
// prints: 0.8.0+commit.c7dfd78e.Emscripten.clang
console.log(solcSnapshot.version());
});

Typescript template literal strings type error

A new version of Typescript is allowing to use template litteral strings as types like for example:
type Hey = 'Hey';
type HeyThere = `${Hey} There`;
And it's working very well in the playground of Typescript with the last version which is 4.1.3.
But when I try using it in my projects, I still get the "Type expected. ts(1110)" error in my syntax.
Even though of course I updated the package to the latest version, I also tried to use it in a new project created from scratch and still didn't work. I'm sure it's a very simple mistake but I can't fix it. Also this is very new feature so I can't find much answers online.
Thank you very much for your help!
update ts-loader to version 8 or 9

How to replace a native dynamic library file permanently and appropriately

I try to develop a thirdparty unixODBC driver, it is a secondary development based on the original file libodbc.so.2.0.0.
so I want to rename 'libodbc.so.2.0.0' to 'libodbc.so.2.0.0_renamed'. And soft link my dynamic library file to libodbc.so.2.0.0.
But I found an issue bothering me, when I rename native file and run 'sudo ldconfig', the file named 'libodbc.so.2' automatically linked to the renamed file 'libodbc.so.2.0.0_renamed', as below:
I could not understand that:
why it occurs;
how to appropriately replace the library.
I don't have enough ackownledge about linux, so that I failed to get any keyword to search and deal with it.
Could you help me, thank you very much!
Shared objects under GNU/Linux follow a specific version naming scheme, which is known by the loader (and OS component, actually part of libc framework) to determine if a newer library is retro-compatible with some older version to which a binary was originally linked against. By adding the renamed suffix, you are violating the convention and the dynamic linking system is getting confused. You should renamed as suggested by #Bodo above.
In addition, perhaps rather than using rename, you might consider using the very versioning scheme. From GNU Build System (aka Autotools) manual, the version cheme is like it follows:
Versioning: CURRENT:REVISION:AGE
CURRENT The latest interface implemented.
REVISION The implementation number of CURRENT (read: number of bugs fixed...)
AGE The number of interfaces implemented, minus one.
The library supports all interfaces between CURRENT − AGE and CURRENT.
If you have
not changed the interface (bug fixes) CURRENT : REVISION+1 : AGE
augmented the interface (new functions) CURRENT+1 : 0 : AGE+1
broken old interface (e.g. removed functions) CURRENT+1 : 0 : 0
Therefore a possible history of your lib might be:
1:0:0 start
1:1:0 bug fix
1:2:0 bug fix
2:0:1 new function
2:1:1 bug fix
2:2:1 bug fix
3:0:0 broke api
3:1:0 bug fix
4:1:1 bug fix
5:0:0 broke api
You might, for instance, call the older and newer versions of libodbc.so.x.y.z, according to your needs. Just an idea.

What exactly is the difference between fuse2 and fuse3?

FUSE = Filesystem in user space recommends that distros package both a fuse2 and a fuse3 (see here) and indeed they do.
What exactly is the reason for this? Is it just that the init code in fuse3 is different?
The release notes for libfuse 3.0.0 appear comprehensive. Read below the heading 'Changes (since FUSE 2.9)'. Functions have been renamed for clarity, functions dropped and parameters tidied up. Here are a few examples from the release notes to give a flavour:
The fuse_lowlevel_new function has been renamed to
fuse_session_new and no longer interprets the --version or --help
options
fuse_loop(), fuse_loop_mt(), fuse_session_loop() and fuse_session_loop_mt() now return more detailed error codes instead of just -1. See the documentation of fuse_session_loop() for details
There are new fuse_session_unmount and fuse_session_mount
functions that should be used in the low-level API. The fuse_mount
and fuse_unmount functions should be used with the high-level API
only
The fuse_invalidate function has been removed
Installing libfuse2 alongside libfuse3 allows applications using libfuse2 to keep working without needing to be updated straight away.

Rustpkg fails to build a package

I tried to build the example package from here but sadly I get following error:
error: Couldn't find package std in any of the workspaces in the RUST_PATH (C:\U
sers\User\Desktop\test\hello.rust:C:\Users\User\Desktop\test\hello:C:\Users\Use
r.rust)
Now it's kinda obvious that there is some issue with RUST_PATH but I am somewhat unable to find documentation concerning it.
note: I'm using Windows 8 64 bit and Rust 0.8
Rustpkg has been removed from basic library and moved into librustpkg.
There are alternatives like Makefile or CMake, but I assume the preferred version it's using cargo-lite.
My advice is just look at Rust-CI for a project that uses package manager you like most and copy it's build shamelessly.
UPDATE: A new package manager for rust has been announced. It's called Cargo. We'll see how it works out, but that is possible future default.
Rustpkg has been removed from Rust. Hopefully we will get something to replace it.

Resources