Discrete mathematics and calculus from Core math section.

Hi!  I have few suggestions regarding Core math section:

Calculus by “The Ohio State University” looks like half-baked course (in comparison to other courses which I had chance to take). The main problem is that it was left by course staff and they do not fix errors and improve content.
From alternatives which I have seen there was only calculus by “University of Pennsylvania”. There are no reviews, but probably someone from ossu students have tried it and could compare to calculus course which is in the current curriculum.
https://www.coursera.org/learn/single-variable-calculus
https://www.coursera.org/learn/differentiation-calculus
https://www.coursera.org/learn/integration-calculus
https://www.coursera.org/learn/applications-calculus
https://www.coursera.org/learn/discrete-calculus

“Mathematics for Computer Science” – as far as I understood it was added to curriculum because no mooc alternative was available (see https://github.com/ossu/computer-science/issues/104 ) . But as I see now coursera offers https://www.coursera.org/specializations/discrete-mathematics . So probably it should be considered to be put in curriculum along with MIT course, which still could have material which is missed in coursera specialization.

@a1h05 the coursera course looks promising. I am just not sure where it fits in. Would it be either or as the coursera course is an actual specialisation which takes about 6-8 months to complete. Are there any overlaps between the existing math courses and the one provided by coursera?
I am personally finishing off the Linear Algebra course, which I am then thinking of taking the coursera course. Any reason why I would need to take the other Math classes?

Exciting finds, @a1h05!
I just watched the introduction of the first Calculus course and my qualm is that it presupposes some familiarity with Calculus. It explicitly states that it is not suitable for someone taking Calculus for the first time.
The Discrete Math course looks like a good contender for the MIT course, though.

@TYRONEMICHAEL

where it fits in

Right into Core Math section instead of "Calculus" and "Mathematics for Computer Science"

which takes about 6-8 months to complete

Effort of "Mathematics for Computer Science" from current curriculum estimated as 13 * 5 hours, effort of specialization estimation is about 24 * 5 hours (one course missed information, but I have assumed it’s the same 5 hours per week). So, its 6-8 month for those who plan to spend about 5 hours per week on this course.
@Nixerrr
good catch. I don't know why such information is hidden behind enrollment.

Each course builds on the previous. For the first course, students are expected to have had prior exposure to Calculus at the high-school (e.g., AP Calculus AB) level. It will be assumed that students: are familiar with transcendental functions (exp, ln, sin, cos, tan, etc.); are able to compute very simple limits, derivatives, and integrals; and have seen slope and area interpretations of derivatives and integrals, respectively. This material will be reviewed; however, it is important to begin the course with some prior calculus background.

Regarding calculus
I agree that Ohio State Calculus is not ideal for a number of reasons.  The quizzes are riddled with errors; the course moves at a dizzying pace giving piecemeal opportunities for practice; and the videos often gave me the feeling that I've "missed" something, as if the course is meant for review rather than for teaching the material fresh.
U Penn Calculus looks really attractive. Not only does it break up the material into nice bite-sized chunks, it offers an exam at the very beginning to help the student figure out if it will be too hard for them. And it has more recent reviews. On the other hand, the description of part 1 is worrying (emphasis mine):

"In this first part--part one of five--you will extend your understanding of Taylor series, review limits, learn the why behind l'Hopital's rule, and, most importantly, learn a new language for describing growth and decay of functions: the BIG O."

This makes it sound like you were already supposed to take some calculus beforehand...? And that would seem to line up with @Nixerrr's comment about what he saw in the first video.
So I think more investigation is needed on this course. A possible solution would be to replace Ohio State Calculus with a combination of Pre-College Calculus (or something like it) and then U Penn Calculus, but again, someone needs to dig into these courses to confirm that everything is of sufficiently high quality, and particular that there is no huge knowledge gap between them (i.e., that Pre-College Calculus isn't too advanced for students who have completed up to pre-calculus, and that it sufficiently prepares students for U Penn Calculus).
Let's not forget, another option is MIT Calculus:

MIT Calculus 1A: Differentiation
MIT Calculus 1B: Integration
MIT Calculus 1C: Coordinate Systems & Infinite Series

If we're dead serious about putting the best possible calculus courses in the curriculum, it's hard to imagine doing any better than MIT. The reason I haven't put them in the curriculum is because they are super long — 13 weeks (one semester) each, so 39 weeks total. Since discrete math is more important to computer science (technically, it is computer science), I didn't want to over-emphasize continuous math. My choice is consistent with what I have seen with university CS curriculums, which typically only require 1-2 semesters of continuous math, but many more discrete math / CS courses.
Since replacing Ohio State Calculus isn't the highest priority right now, I don't have time to dig into these courses myself yet. But if someone else wants to do it and report on their findings, I would be happy to listen and make changes to the curriculum if it makes sense to do so.

Regarding discrete mathematics
I'm very open to suggestions regarding the curriculum's coverage of discrete mathematics, probably the most fundamental part of the curriculum. MIT Math for CS is exceptionally well-regarded, but it is lacking solutions to the problem sets and exams, which is really problematic from a pedagogical standpoint.
The Coursera specialization does look promising. I like that the course is filled with puzzles to reinforce understanding and that there is apparently some Python programming involved.
I am however concerned that this is another one of Coursera's "kind of free but not really" courses where access is somewhat limited to those who don't pay; with these, you get a certain number of videos per week, and you can't necessarily do all the assignments. Someone would need to audit the course to see just how limited you are as a free user.
If it is too limited, then the course will effectively be the same as MIT Math for CS: just a mostly-static course with a tiny bit of interactivity. If that were the case, replacing MIT Math for CS with this one would actually be a downgrade.

@hanjiexi
Unfortunately, it looks like this specialization is actually "kind of free but not really". If you use "audit" option assignments will have "Upgrade to submit" instead of "Submit" button and are marked with a lock.
Probably this specialization could have be placed like Haskell book after courses table with "paid" label as alternative or should not be at curriculum at all.

@a1h05 Thank you for your help in confirming that. It can't be mandatory then, but next time we do a curriculum update I'll consider adding it as an optional paid alternative.

Btw, I'm doing the MIT Calculus course, and I can wholeheartedly recommend it if anyone is looking for an alternative to the Ohio State Uni course. It's a little light on exercises to my liking, so I often find myself doing extra practice on Khan Academy, but otherwise I'm very happy with it.

An important part of the Ohio State course is the exercises at https://mooculus.osu.edu/. You need to have a Google account to log in. I got more than enough practice there.

OSU Calculus has been replaced by MIT Calculus, and I added a note about the paid Coursera Discrete Math course, so I'm closing this issue. Thanks everyone!


Docker-compose

When i change Demomode=true and run docker-compose up it does exit with code 1.
When looking at the logs it shows this
blackbird_1  | Blackbird is running... (pid 7) blackbird_1  |  compose.cli.verbose_proxy.proxy_callable: docker wait <- ('7166aee47fa032ac92beca8ecd15d8a624b3526c5ce5eb4bcb70ffb4dbf81206') compose.cli.verbose_proxy.proxy_callable: docker inspect_container <- ('7166aee47fa032ac92beca8ecd15d8a624b3526c5ce5eb4bcb70ffb4dbf81206') urllib3.connectionpool._make_request: http://localhost:None "POST /v1.22/containers/7166aee47fa032ac92beca8ecd15d8a624b3526c5ce5eb4bcb70ffb4dbf81206/wait HTTP/1.1" 200 30 compose.cli.verbose_proxy.proxy_callable: docker wait -> {'Error': None, 'StatusCode': 1}
Anny idea why happens only when switching DemoMode off?


cluster_deploy_operator: deploy_cr: add a namespace parameter when deploying the CR

…
otherwise it will be deployed in the active namespace
and that won't work in the CI

tested locally, merging.


Allow controlling whether a node is editable

So I would like to enable node editing for a few (not all) nodes.
Currently there's no node-level control over this. Is it possible to add an editable attribute to node?

Never mind, I find I can use an attribute of the node as filter, like this:
function editNode(data, cancelAction, callback) {
	if (data.editable === undefined) {
		callback(null);
  	  return;
	}
    ...
}


fix: set the initial condition like selected

The idea was to maintain the exact behavior of the old editor, when an abandoned cart was created, the initial condition was settled like the component selected.
related to DOP-1389

👍


Response model

To be merged after acr/pay_with_amazon branch

Add SpreeAmazon::Response to help clean up the amazon gateway file

@mtomov @dhonig Probably merge this into acr/pay_with_amazon before merging that branch into master

All good


Allow multiple grpc clients through one connection

Make grpc client hold a smart pointer reference to the http client
Fixes #76

Thanks!


.libPaths() can conflict with user/system installed R/RStudio

Hello,
I think I've finally found the issue and the right place to post it, but apologies if I'm mistaken.
It appears that when you have R installed from conda-forge and a system R (say RStudio), the conda installed R will include the user-package directory used by the system R in it's search path (.libPaths()).
This means if you have an R package installed with conda in your environment and the same package installed in RStudio, your conda environment will use the RStudio package (from your user directory) instead of the conda package. If there were any built extensions in that package (which usually there are) you'll end up with a cryptic segfault or memory not mapped error as the conda R is not binary compatible with the system R.
The reason the user-directory is included in .libPaths() is because of this section of the Renviron file.
If you install r-base and then comment out that section in ~/.conda/envs/<whatever>/lib/R/etc/Renviron the issue with .libPaths() disappears and your library() calls will only ever see your conda environment's packages, which I believe is kind of the entire point of conda.
I think this repo is where one would provide a patch file to drop that section of the Renviron file to make R installations isolated under conda. Assuming I'm not missing something important, would it make sense to provide a PR to fix this for everyone?
Cross referencing this issue: https://github.com/qiime2/q2-dada2/issues/68 (where we have been trying to figure this out for a while).

Thanks for starting this discussion @ebolyen and sharing your research.
I also get frustrated that the conda R does not ignore the user's personal R directory. To me this defeats one of the main reasons I use conda, which is to create reproducible computational environments that I can share with colleagues via an environment.yaml file. Even if my colleagues install and activate a given conda environment, I can't guarantee the setup is correct because I don't know what packages they have installed in their user directory.
Also, this has bitten me before on Ubuntu, e.g. this bug where the user directory caused conda packages to be installed in the wrong location.
However, I don't think we want to make the change unilaterally here. conda-forge is the community collection of conda packages, and I don't think we would want R to behave differently whether it was installed from the conda-forge channel or the defaults channels (the defaults recipe is hosted at AnacondaRecipes/r-base-feedstock).
@mingwandroid What is your opinion on modifying the R installed by conda to ignore the user's local package directory?

I am in two minds about this.
Making such changes can annoy upstreams and lead to claims that we're fragmenting the ecosystem. Also documentation is no longer valid.
But while we're at it how about re-routing install.packages() through conda in the first instance? I've been tempted to try to do this for a while. I'd probably hide it behind an env var that's off by default though.
With R upstream providing binaries for Windows and now macOS it makes us no longer fully compatible. Will the same thing happen on Linux?
I think I'd like there to be a manylinux2 style approach for binaries there but I'd like it to be based on our compilers.

To me this defeats one of the main reasons I use conda, which is to create reproducible computational environments that I can share with colleagues via an environment.yaml file.

Exactly! We distribute a bioinformatics framework called QIIME 2, and our installation mechanism is a conda environment which has worked amazingly for the most part. The only exception is R, as many bioinformaticians use RStudio and have some of the very same libraries we use, so we run into this reasonably often.

However, I don't think we want to make the change unilaterally here. conda-forge is the community collection of conda packages, and I don't think we would want R to behave differently whether it was installed from the conda-forge channel or the defaults channels (the defaults recipe is hosted at AnacondaRecipes/r-base-feedstock).

That makes sense, and it got me thinking, "well if Python is virtualized by conda, why shouldn't R be as well? Maybe this should go in defaults!"
So I double checked how conda treated Python's sys.path, which apparently has the same concept of a user site-packages and much to my dismay I do see the user site-packages in my sys.path within an active conda environment (and even at a higher precedence than my env site-packages!).
So I suppose conda isn't treating R any differently than Python, you can escape the environment in either language. It's just that a lot more people use RStudio which uses the user-package directory than there are people that know about that user site-packages for Python.

But while we're at it how about re-routing install.packages() through conda in the first instance? I've been tempted to try to do this for a while. I'd probably hide it behind an env var that's off by default though.

That would be pretty incredible.

With R upstream providing binaries for Windows and now macOS it makes us no longer fully compatible. Will the same thing happen on Linux?

Doesn't this already happen with libc? I know we're stuck using Centos 5 for the older libc, but it's probably only a matter of time before the forwards-compatibility breaks in a way that matters.

I wonder if maybe the right way to go about this would be to create a patch-only package which alters the way conda integrates with R, then if you want to ship a reproducible R environment you can include that package in your environment list, otherwise R acts like it "should" and will prefer your user-packages, binary incompatible though they may be. That would work well for our purposes, and would make it easy for anyone to opt-in to the same behavior.
Technically the same thing could be done for Python as well (though I've really never seen the user site-packages until I looked for them today).

Making such changes can annoy upstreams and lead to claims that we're fragmenting the ecosystem. Also documentation is no longer valid.

@mingwandroid I agree this is a big concern. However, I still think it makes sense to do this. The entire reason for the user directory is because the user needs a location where they have write-access. One of the benefits of using conda is that its a local installation. In that sense, when an R user installs R via conda, they are already breaking from the traditional ecosystem. Using the system .Renviron settings from a traditional ecosystem only serves to interfere with the conda setup.

But while we're at it how about re-routing install.packages() through conda in the first instance? I've been tempted to try to do this for a while. I'd probably hide it behind an env var that's off by default though.

That would be a cool feature, but I think it is less urgent than fixing the current issue with the user directory.

I wonder if maybe the right way to go about this would be to create a patch-only package which alters the way conda integrates with R. Then if you want to ship a reproducible R environment you can include that package in your environment list.  That would work well for our purposes, and would make it easy for anyone to opt-in to the same behavior.

@ebolyen That's an interesting proposal. I'd be willing to take that compromise. My worry though is that new conda users would be unlikely to know about this alternative R conda package.
This comes down to what the purpose of installing R via conda is. When I just want to use R to do some exploratory analysis, I use the system version of R and R packages installed via install.packages (and on Ubuntu I make heavy use of the APT binary packages available from cran2deb4ubuntu). It's only once I have a mature project (that often involves collaborators), that I want to start isolating my environment. For my use cases, I never want to mix the conda R environment with the system R environment.

as many bioinformaticians use RStudio and have some of the very same libraries we use

@ebolyen Also, I wanted to note that this isn't an RStudio feature. As you noted in your original post, the location of the user directory is determined by the configuration files shipped with R.

Not to complicate things further, but there's also the root environment, which I've always thought of as a replacement for a system-install. In the root env you could argue that user-package directories make sense again (but why even use conda??).

In the root env you could argue that user-package directories make sense again (but why even use conda??).

@ebolyen I'd argue that mixing conda and system packages is a bad idea even in the root environment. In the long run, mixing and matching always ends in frustration. So many users get frustrated with conda because they'll install a few compiled packages via conda, but then also set a custom LD_LIBRARY_PATH for compiling packages from source, which always ends in disaster. To me this issue with the R library paths is analogous to the LD_LIBRARY_PATH  issue. conda works with a conda setup, not mix-and-match.

@mingwandroid Another complication with trying to override install.packages is that RStudio also intercepts any call to install.packages (it offers to restart the session first if the package to be installed is currently loaded).
# from within RStudio
> install.packages
function (...)
.rs.callAs(name, hook, original, ...)
<environment: 0x1041c0840>

To me this issue with the R library paths is analogous to the LD_LIBRARY_PATH issue. conda works with a conda setup, not mix-and-match.

I like this line of argument. So then should the Anaconda distribution of Python also be patching sys.path to not include $HOME/.local/lib/python3.X/site-packages? That is the most direct analogue the the R's .libPaths() I think (with the exception that the use of R's user-directory is very common in contrast to Python's).

We did sort out some issues early on to ignore site-packages from the system IIRC. Not sure if that would solve .local based paths or not. Could you please test and report the findings over at the python feedstock (even if they are affirmative)?

Sure thing! I've already tested that the .local is indeed included, but I'll create a little write-up demonstrating that.

I like this line of argument. So then should the Anaconda distribution of Python also be patching sys.path to not include $HOME/.local/lib/python3.X/site-packages?

@ebolyen I agree. I'm surprised that this also affects local Python packages.
Here's the test I performed to complement your test:
# Start a Docker container running Ubuntu
$ sudo docker run --rm -ti ubuntu bash
$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.3 LTS"

# Install system Python
$ apt update
$ apt install -y python python-pip wget

# Install requests in user library
$ pip install --user requests
$ python -c 'import sys; print sys.path'
['', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/root/.local/lib/python2.7/site-packages', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages']

# Install Miniconda2
$ wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh
$ bash Miniconda2-latest-Linux-x86_64.sh
$ source ~/.bashrc

# Confirm that user library still included on path
$ python -c 'import sys; print sys.path'
['', '/root/miniconda2/lib/python27.zip', '/root/miniconda2/lib/python2.7', '/root/miniconda2/lib/python2.7/plat-linux2', '/root/miniconda2/lib/python2.7/lib-tk', '/root/miniconda2/lib/python2.7/lib-old', '/root/miniconda2/lib/python2.7/lib-dynload', '/root/.local/lib/python2.7/site-packages', '/root/miniconda2/lib/python2.7/site-packages']
$ python -c 'import requests'

I had no idea pip had a --user flag. That's much easier than what I did!

My current plan is to use post-link/pre-unlink scripts.

@ebolyen Could you please elaborate? How are you planning to use these script to modify the library paths?
My idea would be to include a patch that deletes the R_LIBS_USER definitions from /etc/Renviron.in:
https://github.com/wch/r-source/blob/af7f52f70101960861e5d995d3a4bec010bc89e6/etc/Renviron.in#L43
This would cover the most common use case, where a user is installing local R packages to the default R_LIBS_USER for their OS. It wouldn't be able to prevent the situation in which a user has defined a custom R_LIBS_USER in their ~/.Renviron, but presumably a user with a custom user library would have an easier time debugging any issues that arose from this.
There may be a better way to do this (i.e. passing an option to one of the commands in build.sh), but I couldn't find an obvious solution after skimming R Installation and Administration

Ah, yeah that is essentially my plan as well. Using Renviron.in looks like the best way to do this.
My plan was to avoid creating a different version of R by instead making a recipe that modified your conda environment directly (instead of the R package before installation into the conda-environment).
YAML:
...
requirements:
  run:
    - r-base  # already installed
...

/bin/.isolate-r.post-link.sh
#/bin/bash
sed -i '/R_LIBS_USER/d' $CONDA_PREFIX/R/etc/Renviron

/bin/.isolate-r.pre-unlink
# undo that somehow, maybe there's a backup made

Basically, there isn't actually any source to install, the package would just be a vehicle for executing the environment modifications (similar to distributing shared environment variables with post-activate hooks).

OK. That makes sense. Please let me know when you have a prototype that I can test out.

Will do!

What were you planning on calling this new package?

¯\_(ツ)_/¯  conda-lang-isolation maybe? It would be easy to roll in the same changes for Python as well.

I was wondering why conda's Renviron defines R_LIBS_USER and not R_LIBS?
The documentation at https://stat.ethz.ch/R-manual/R-devel/library/base/html/libPaths.html says the following:

The library search path is initialized at startup from the environment variable R_LIBS (which should be a colon-separated list of directories at which R library trees are rooted) followed by those in environment variable R_LIBS_USER. Only directories which exist at the time will be included.

As such, if a user has a local Renviron file (e.g., ~/.Renviron) which defines R_LIBS, this will always be given precedence over the conda settings.
While for the sake of true installation-isolation I would not suggest to do so, conda's Renviron could prepend the conda-respective path to R_LIBS, thus enabling access to the user's local and the environment-based R packages.

Has there been any progress with this?
I'm also maintaining a conda environment for a bioinformatic application and was pretty frustrated, when I found out that R (within conda) does not prioritize the packages installed in the conda environment.
I thought I could share this little bodge to prioritize the conda packages, in case anybody might find it useful. I place it at the beginning of my R scripts to change the order of .libPaths():
prioritize_conda <- function(lib_tree){
  cpath <-  grep('conda', lib_tree, value=TRUE, ignore.case=TRUE)
  if (length(cpath) != 0) {return(rev(c(lib_tree, cpath)))}
}

new_tree <- prioritize_conda(lib_tree=.libPaths())
.libPaths(new_tree)

Our solution was to just set the env vars in a post-activate hook: https://github.com/qiime2/qiime2/pull/395
We haven't had an issue with this since, but it would be very nice if upstream considered changing the default behavior w.r.t. user-packages.

Yes. Please see PR #65. Any feedback would be much appreciated!
On Fri, Feb 22, 2019, 10:52 AM Evan Bolyen<EMAIL_ADDRESS>wrote:

Our solution was to just set the env vars in a post-activate hook:
qiime2/qiime2#395 https://github.com/qiime2/qiime2/pull/395
We haven't had an issue with this since, but it would be very nice if
upstream considered changing the default behavior w.r.t. user-packages.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/conda-forge/r-base-feedstock/issues/37#issuecomment-466485495,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABiKfSlNoCW9prmNhHXwGCyWNcNbP7w2ks5vQC5CgaJpZM4Sk2P0
.

For what it's worth: I may have a similar issue with singularity: My container has an R installation, but if the user of the container also has local packages, R run in the container will try to load things from the user local packages. Its quite annoying that just by having local packages makes the container not usable.

I've read this thread several times, but I still don't fully understand what the problem is. Can someone write up a reproducible example and explain specifically what the problem is?

I've read this thread several times, but I still don't fully understand what the problem is.

conda-installed R will use the R packages installed in the users personal directory instead of the versions installed via conda because the user directory is listed first in .libPaths(). Therefore the conda environment is not "isolated". The user may be using completely different versions of R packages than what was specified, e.g. in an environment.yml file.

Can someone write up a reproducible example and explain specifically what the problem is?

This can be tricky because it depends on the setup on your machine. Here is an example I ran on Ubuntu. I have R3 installed, and I installed R4 with conda. If you have R4 installed on your machine, install R3 with conda to achieve the same effect.
Rscript --version
export R_LIBS_USER=/tmp/rlibs/
mkdir -p $R_LIBS_USER
Rscript -e '.libPaths()'
Rscript -e 'install.packages("jsonlite")'
mamba create --yes -n reprex r-base=4 r-jsonlite
conda activate reprex
Rscript --version
Rscript -e 'library("jsonlite")'

Here's what I see:
$ Rscript --version
R scripting front-end version 3.6.3 (2020-02-29)
$ export R_LIBS_USER=/tmp/rlibs/
$ mkdir -p $R_LIBS_USER
$ Rscript -e '.libPaths()'
[1] "/tmp/rlibs"                    "/usr/local/lib/R/site-library"
[3] "/usr/lib/R/site-library"       "/usr/lib/R/library"
$ Rscript -e 'install.packages("jsonlite")'
Installing package into ‘/tmp/rlibs’
...
$ mamba create --yes -n reprex r-base=4 r-jsonlite
$ conda activate reprex
$ Rscript --version
R scripting front-end version 4.0.5 (2021-03-31)
$ Rscript -e 'library("jsonlite")'
Error: package or namespace load failed for ‘jsonlite’:
 package ‘jsonlite’ was installed before R 4.0.0: please re-install it
Execution halted

The above demonstrates the issue when the user has explicitly set a value for R_LIBS_USER. It's even more insidious when the user is using R's default OS-specific location for the user directory. If I have time, I'll try to create an example using a Docker image.
Please see PR #65 for additional discussion and a proposed solution.

For me as a long-time R user this is the expected and appropriate behavior. You specified R_LIBS_USER and so R looked there for packages, as documented. Any other behavior would be a bug from my perspective.
If you don't set R_LIBS_USER then running .libPaths() at the end of the example returns
"~/.conda/envs/reprex/lib/R/library"

That is a problem for the reason I explain in https://github.com/conda-forge/r-base-feedstock/issues/169 , but that doesn't seem to be the thing people are objecting to here.
?.libPaths says

By default ‘R_LIBS’ is unset, and ‘R_LIBS_USER’ is set to
directory ‘R/R.version$platform-library/x.y’ of the home directory
(or ‘Library/R/x.y/library’ for CRAN macOS builds), for R x.y.z.

and indeed
$ Rscript -e 'Sys.getenv("R_LIBS_USER")'
[1] "~/R/x86_64-conda-linux-gnu-library/4.0"

That isn't environment-specific, but it is conda and R version specific, which will avoid the version incompatibility in your example, and that directory won't be used by default anyway.

Any other behavior would be a bug from my perspective.

I agree that R is doing what it is documented to do in regards to the user library. I and others use conda environments to create isolated computational environments. I don't want them to be affected by what I happened to have installed in my user library for use with my system-wide installation of R. When I give a collaborator an environment.yml file, I want them to run the code with the R package versions I specified in that file, not whichever versions that installed in their user library.

That isn't environment-specific, but it is conda and R version specific, which will avoid the version incompatibility in your example, and that directory won't be used by default anyway.

That is a new development. That wasn't the case when this issue was originally created. This fixes the default situation on Linux, as I had noted in https://github.com/conda-forge/r-base-feedstock/pull/65#issuecomment-715371226
But conda-installed R is still not isolated if 1) the user has manually specified R_LIBS_USER, or 2) they are using Windows (and maybe macOS, not sure).

That is a new development. That wasn't the case when this issue was originally created. This fixes the default situation on Linux, as I had noted in #65 (comment)

I think that is the key fact I missed, makes much more sense now! Thanks for helping me understand that.

But conda-installed R is still not isolated if 1) the user has manually specified R_LIBS_USER,

It is isolated if the user sets R_LIBS_USER to a conda environment specific location :-) Users setting R_LIBS_USER are presumably doing so because they want R to look for libraries there, and that should be respected.

or 2) they are using Windows (and maybe macOS, not sure).

I just checked on Windows, and indeed R installed in conda environments shares the same R_LIBS_USER environment variable as R installed directly from CRAN. I agree that is a problem, and I'll look into fixing it the same way as was done for Linux. I don't have a Mac to test on, but possibly the same thing should be done there as well.

It's a problem on Mac.  Much googling has led me here.  :).   What is the recommended solution for a mac user?

@kevinpauli Assuming you want R to ignore non-conda packages, put this in your scripts before any library() or require(): .libPaths(R.home("library"))

Another potential solution: you can force conda-installed R to ignore an explicitly set R_LIBS_USER by installing the conda-forge package conda-ecosystem-user-package-isolation. Thanks to @mfansler for the tip in https://github.com/conda-forge/r-base-feedstock/pull/65#issuecomment-1098457402
Warning though: this will not save you from user-installed packages installed in the default user-library on Windows and macOS.


MudDrawer: Removed spelling mistake in docs

Description

Removed the spelling mistake in the variants section of the drawer docs

How Has This Been Tested?

Types of changes

[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

[x] The PR is submitted to the correct branch (dev).
[x] My code follows the code style of this project.
[ ] I've added relevant tests.

Thanks a lot 🙏


Couldn't use the visualize_helper function to visualize the bounding boxes in the tutorials

Hi, I loved the concept of the project. Could you help me out on why am I not visualize the data? Thank you.

Figured, it didn't work in Jupyter lab. But did in jupyter notebook.

If you mean download videos with the metadata drawn on them, we don't support that functionality -- our visualization tools are just for quick visualization in a web browser.
I would suggest something like openCV if you want to write new videos with metadata drawn on them (https://pythonprogramming.net/drawing-writing-python-opencv-tutorial/ is a tutorial for drawing on images, but it generalizes to their video interfaces).

I meant writing a new trimmed & merged video which has a particular set of events mentioned in the queries.

Thank you. This is helpful!


Cannot resume Alphazero training with torchlib

I'm trying to resume training training an Alphazero model as described here
But i receive this error message:
$ ./build/examples/alpha_zero_torch_example $VSC_DATA/shared/robin/os_out/rthex_5x5_2/config.json Logging directory: /data/gent/465/vscxxxxx/shared/robin/os_out/rthex_5x5_2 Using existing model: /data/gent/465/vscxxxxx/shared/robin/os_out/rthex_5x5_2/vpnet.pb Playing game: rthex Spiel Fatal Error: /data/gent/465/vscxxxxx/shared/robin/open_spiel/open_spiel/utils/json.cc:67 error == str.substr(0, std::min(30, static_cast<int>(str.size()))) error = Empty string, str.substr(0, std::min(30, static_cast<int>(str.size()))) =
These are the files in the model path:
checkpoint-0-optimizer.pt  learner.jsonl    log-actor-2.txt	 log-evaluator-1.txt checkpoint-0.pt		   log-actor-0.txt  log-actor-3.txt	 log-learner.txt config.json		   log-actor-1.txt  log-evaluator-0.txt  vpnet.pb
And this is the config.json file
{   "actors": 4,   "checkpoint_freq": 1,   "cutoff_probability": 0.800000,   "cutoff_value": 0.950000,   "devices": "cuda:0,cpu:0",   "eval_levels": 7,   "evaluation_window": 100,   "evaluators": 2,   "explicit_learning": false,   "game": "rthex",   "graph_def": "vpnet.pb",   "inference_batch_size": 6,   "inference_cache": 262144,   "inference_threads": 3,   "learning_rate": 0.000100,   "max_simulations": 300,   "max_steps": 0,   "nn_depth": 10,   "nn_model": "resnet",   "nn_width": 128,   "path": "/data/gent/465/vscxxxxx/shared/robin/os_out/rthex_5x5_2",   "policy_alpha": 1.000000,   "policy_epsilon": 0.250000,   "replay_buffer_reuse": 3,   "replay_buffer_size": 65536,   "temperature": 1.000000,   "temperature_drop": 10.000000,   "train_batch_size": 1024,   "uct_c": 2.000000,   "weight_decay": 0.000100 }
Any idea what might cause this or how i could resolve it?

Hi @robinpdev ,
Apologies for the lateness on this.
This seems like an error when parsing the json, maybe it's missing a specific entry or has a syntax error.
Have you tried reading that json file separately using utils/json.{h,cc}  ?
Did you manually create that .json file or was it printed out from AlphaZero training?  Have you modified it?

That error is coming from here: https://github.com/google-deepmind/open_spiel/blob/7cbb52e7beae5c4bb3d8371149bdbc69130ae247/open_spiel/utils/json.cc#L67
It would be good to have the full stack trace or at least the token that's causing the issue. Either way, would be good to reproduce in a simpler setting.
Can you reproduce the problem in a much simpler main program that only tries to read that .json file to see if it's the reader itself stumbling?

The JSON file was generated by the alphazero training implementation and was not edited.
I however got it to work for my current configuration so this is not an immediate problem anymore. I will look into it more if i encounter this problem again. Thanks for the response.

Hey robin. Did you manage to get it combiled for gpu? Im really struggling to build the project for gpu

Hi, sorry for not responding! I have been away from GitHub for a while and didn't realize there are more people using Libtorch AZ. That's great to hear!
If you have the chance, would you be able to post your solution to this problem? Or maybe even the configuration that caused errors and the configuration you used that resolved the problem?


Add optional start delay to Timer

Timer(), Timer.timeout(), Timer.periodic() and Timer.reset() now take an optional start_delay option to make the timer start after some delay.

I will merge, but @jh2007github and @shsms feel free to make any comments if you find anything.


Update CODEOWNERS: add Sid.

Let's give the magic powers to Sid. @sid-dahiya
He's been a long-time here, practically "old-timer" - surprising that he's not on this list.
I hope there are no objections from Sid and others? 😃

Let's give the magic powers to Sid. @sid-dahiya
He's been a long-time here, practically "old-timer" - surprising that he's not on this list.
I hope there are no objections from Sid and others? 😃

Haha, I am honored.


Don't delete query when reopen hain

Don't clear last query, just select it

I couldn't agree with this in my usecases, but i think it can be added as an option

@appetizermonster thank you )

+1 I'm almost always using this just to run whatever app I'm currently working on. It's super annoying that I have to keep typing the app name to run it.
I'll add to the feature suggestion that there should be a history of recent commands that I can scroll through. Probably the up arrow should go through recent commands (kind of like how shells work)

Resolved at 3958a0f7b799dcc418be554dfac0b2a063c5a2fa


Add simpleblack theme

Hi, great work on this plugin =)
I had this theme sitting in my own configuration for awhile and I was wondering if it would be nice to add to lightline's available themes.
This is how it looks like:

It was based on my colorscheme called simpleblack
I'm open to any feedback.
Thanks :)

I can't assign you as a reviewer, so I'm pinging you @itchyny =)

Thank you.

Cool, thanks =)


Crash on mouse hover on Wayland

Hello,
I am getting a crash running the tutorial code. This is on Fedora 36, running Gnome and Wayland. The window is created normally, but as soon as the mouse cursor hovers the window, the program exits with the following output. If the mouse cursor happens to be within the window bounds when the program starts, the program exits immediately.
Initialized OpenGL with: 4.6 (Core Profile) Mesa 22.1.7, Shader Language Version: 4.60
Error sending request: Resource temporarily unavailable

The contents of the project:

Cargo.toml

[package]
name = "bracket_bug"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
bracket-lib = "0.8"

main.rs

use bracket_lib::prelude::*;

struct State {}

impl GameState for State {
    fn tick(&mut self, ctx: &mut BTerm) {
        ctx.print(1, 1, "Hello Bracket World");
    }
}

fn main() -> BError {
    let context = BTermBuilder::simple80x50()
        .with_title("Hello Minimal Bracket World")
        .build()?;

    let gs: State = State {};
    main_loop(context, gs)
}

I am happy to provide more information, but please bear in mind I am just learning Rust, and I would appreciate it if you could also provide some instructions on how to obtain any traces/logs you might want to see.

I just tested and the error does not occur when running with webgpu instead of the default back-end.

Same issue for me with Fedora 36, GNOME 42 and Wayland. It must be a issue with a project dependency, as it was working correctly until I updated my crates with cargo update a few weeks ago.
If you want to focus on learning Rust with this toolkit and you don't mind using X.org, just switch to a GNOME on X.org session until there's a fix with an upstream dependency.

Same issue on Fedora / Wayland. The webgpu workaround seems to work for me.

Has there been any other research into this? I gave it a few kicks, tried tracking down the error source and what changed but honestly had little luck.
I did identify that glutin has recently been decoupling from winit to raw-window-handle and moved their 'support' for winit to glutin_winit. Given the crash occurs on mouse-over and not display, it seems the issue would be related to event handling.

I've been banging my head against this one; Wayland has always been a
difficult one, the winit support has wildly varying quality. At one point,
I had a "fix" in place because the code for obtaining physical mouse
coordinates returned scaled (DPI scaling) numbers, not the real ones - and
the code to get the current DPI didn't give the right answer in all cases
(Ubunutu would let you set it to 150%, winit returned 1 or 2). It's quite
possible that they've finally fixed this, and my "fix" is now breaking it?
I'm trying to get a Wayland-based setup going in a VM to hack on - pretty
much everything I have is X based, and I use X remote displays a lot, so
I'm not eager to switch!
On Mon, Jan 9, 2023 at 8:37 PM William Chambers @.***>
wrote:

Has there been any other research into this? I gave it a few kicks, tried
tracking down the error source and what changed but honestly had little
luck.
I did identify that glutin has recently been decoupling from winit to
raw-window-handle and moved their 'support' for winit to glutin_winit.
Given the crash occurs on mouse-over and not display, it seems the issue
would be related to event handling.
—
Reply to this email directly, view it on GitHub
https://github.com/amethyst/bracket-lib/issues/318#issuecomment-1376645053,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ADRU435QEABM7QMM42AXX7LWRTDNNANCNFSM6AAAAAAR7BG3EU
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

Ok, I can now reproduce it and have a workaround (at least on ubuntu/wayland/gnome in a VM). Enabling the low_cpu feature stops things from crashing.
For example:
cargo run --example astar_mouse --features low_cpu

Works well. Without the feature, it instantly crashes.
So that narrows it down a bit. The issue is that the busy loop is polling Wayland too often, which kills it in response.

I've added a delay back into the main loop when low_cpu isn't enabled. It's not ideal, but it seems to have solved the crash on my system at least. Anyone care to test it for me, please?

Thanks for the update! Confirm not happening anymore on Fedora 37 + Wayland.

Works correctly with Fedora 37, Wayland and GNOME 43.2. Thanks! :+1:

I've added a delay back into the main loop when low_cpu isn't enabled. It's not ideal, but it seems to have solved the crash on my system at least. Anyone care to test it for me, please?

I can also confirm it is now running without issue. Glad I mentioned it as I'd have spent ages barking up the wrong tree! Thank ya kindly. :+1:

Same issue on Fedora / Wayland. The webgpu workaround seems to work for me:
# Cargo.toml

[dependencies]
bracket-lib = {version="~0.8", features=["webgpu"], default-features=false }

Thank you ser, you are a lifesaver. This issue was driving me insane!

Getting the same bug; waiting on a master build right?

I'm working through Hands-on Rust and have the beginning dungeon crawler window with moveable character (page 88).
For posterity, the latest repo commit is 0d2d5e6.
No crash on mouse over using the repo as the dependency:
bracket-lib = { git = "https://github.com/amethyst/bracket-lib.git" }
Operating System: Fedora Linux 38
KDE Plasma Version: 5.27.4
KDE Frameworks Version: 5.105.0
Graphics Platform: Wayland

I've added a delay back into the main loop when low_cpu isn't enabled. It's not ideal, but it seems to have solved the crash on my system at least. Anyone care to test it for me, please?

Using this in my project and this fixed the crash for me as well! I'm using Arch with Hyprland as a Compositor

I had this problem on 0.8.0 but updating rltk to 0.8.7 in Cargo.toml fixes it.

This bug is fixed by upgrading rltk from 0.8.0 to 0.8.7 in Cargo.toml.


Update Deploymate to 1.2.9

Thank you for the contribution. It was merged directly as 364564b8d796c5b1c95eaa2970f6f42ce975b7f1 to keep commit history cleaner. Your contribution is still credited to you.


Choose a Development Platform

Let's decide whether you want to build a native app (iOS/Android) or a cross-platform app (using frameworks like React Native, Flutter).

Flutter


Add namespace launch argument to launch files in turtlebot4_bringup

Describe the the feature you would like
A clear and concise description of what you want to happen.
When configuring multiple tb4s to run on the same wifi network (same DDS domain id), it is important to namespace the nodes/topics in order for the same external application to interact with two or more robots simultaneously (eg fleet management).
It would be great of each launch file in turtlebot4_bringup declare a namespace launch arg which is then passed to each Node in the LaunchDescription that is returned.
My workaround for now is manually editing each launch file and adding a namepace for each node before restarting the tb4 systemctl process.
Other notes
Open to suggestions on any better way to accomplish the above.

This is planned and will likely come with the Humble release. There is also a ticket open for namespacing in the simulator (https://github.com/turtlebot/turtlebot4_simulator/issues/10)

Added with https://github.com/turtlebot/turtlebot4_robot/pull/11.


Why is divisor argument in mod method of type Money

Hey, forgive me if this is a dummy question. I might be missing something totally obvious.
But I was asking myself, why the argument for the mod method is of type Money. Shouldn't the $divisor argument here be the same as for the divide method?
Thanks!

Interesting:

If you divide new_price / old_price, you get the price increase, a unitless number usuall represented as percentage.
If you divide wins / shareholders, you get the amount each shareholder gets of the gains.

So, depending on the type of calculation, division should support a divisor of type Money or unitless number. The library provides allocate() and allocateTo() instead.
The modulo operation is different, its left and right operands should be the same type. At least that's what I think... can you provide an example usage where the parameters don't fit?

Thanks for looking into this!

If you divide new_price / old_price, you get the price increase, a unitless number usually represented as percentage.
If you divide wins / shareholders, you get the amount each shareholder gets of the gains.

Yeah right. Both calculations make sense and have a use case. In your first example a ratio of two money values are calculated, in the second the equal share of money.

The modulo operation is different, its left and right operands should be the same type. At least that's what I think...

When looking a the example in the docs and looking at how the remainder is defined:

The remainder (r) is defined as: num1 = i * num2 + r, for some integer i

For the example it means:
8.30€ % 3.00€ = 2.30€
because:
8.30€ = 2 * 3.00€ + 2.30€
However this calculation is valid as well:
8.30€ % 3 = 2.30€
because:
8.30€ = 2€ * 3 + 2.30€

can you provide an example usage where the parameters don't fit?

The use case for my calculation could be:
"If we want split the bill equally between 3 people, what is the raining remainder, that can't be split equally"
While mathematically totally correct, I can't come up with what the use case of the documented example is. Can you help me out?
Anyway, for my use case I could of course do:
$bill = Money::EUR(830);            // € 8.30
$bill->mod(Money::EUR(300));  //  € 2.30

But that does not seem to carry the intention right.
I'd rather want to write this:
$bill = Money::EUR(830);            // € 8.30
$bill->mod(3);                              //  € 2.30

It does not matter much, though. Thanks again for taking the time and for providing/ maintaining this useful library. It helps a lot.
If you'd consider the use case I presented, I could come up with a PR that allows the mod method to work with both, a money object or a number.

Rather than having another allowed -mod() parameter I think a new method would be more appropriate, e.g. ->allocateForRemainder(int $n)


Error reports when loading the dataset

Hi, I am try to load your dataset with the provided command:
from datasets import load_dataset
dataset = load_dataset("MMMU/MMMU")
However, one error reports as:

ExpectedMoreSplits: {'dev'}

Can u check it?

Thank you for using our dataset!
Because the  dataset includes multiple subsets, and you need to specify which subset you want to load.
To resolve this, you should specify the subset while loading the dataset like follow:
from datasets import load_dataset
dataset = load_dataset("MMMU/MMMU", 'Computer_Science')

Let us know if you have any further issues.

I was meeting the same problem and I solved it by updating my datasets package. @XiongweiWu you may try it.

I was meeting the same problem and I solved it by updating my datasets package. @XiongweiWu you may try it.

@Yushi-Hu Thx for your help! After upgrading the datasets to 2.15.0, the problem is solved.


[r] Add three valgrind options

Issue and/or context:
Valgrind summaries are a little sparse by default.
Changes:
Three options are added at the valgrind invocation in the GitHub Action
Notes for Reviewer:
SC-33661

Codecov Report
Patch has no changes to coverable lines.
:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the GitHub App Integration for your organization. Read more.
:loudspeaker: Thoughts on this report? Let us know!.


Make APIM 4.x compatible with IS 7.x

This issue is created to track the tasks related to making IS 7.x compatible with APIM 4.x using the KM connector.

Closing as completed.

Reopening as new requirements have been raised.

Set “Role audience” of applications through DCR call.
Update displayName and description of custom API resource scopes.


Can not parse frontend_ip_configuration.0.subnet_id as a resource id

Trying to run terraform against your own example and getting an error:
$ terraform  init -v
Terraform v0.11.7
+ provider.azurerm v1.9.0
+ provider.template v1.0.0
$ terraform plan
Error: module.loadbalancer.azurerm_lb.azlb: Can not parse "frontend_ip_configuration.0.subnet_id" as a resource id: Cannot parse Azure ID: parse : empty url
This used to work month ago. Has there been Azure API change that broke it?

Having a similar issue ; it's not accepting my sub-net ID.  though mine says "invalid URI for request.".

Oh cool, I'll check it out.  My issue was more of a face-palm though.  It turned out that I was trying to use an existing sub-net so I actually had to use a data source to query the existing one's ID (which is a URL) rather than just give the name.  Just started with Terraform yesterday, so still learning.
Thanks so much for the info & link.


Remove the WIP app from our repo/org

Now that draft pull requests are a thing, and you can easily switch back and forth between a draft and ready for review status, we should just drop the WIP bot. It adds unnecessary information to the checks page on PRs.
@kf6gpe WDYT?

Hi @dnfield do you know if this issue has been worked on?

Is this bot still something we are using?

@dnfield Were you referring to the app or a tag?

The github application has been removed!


Is isLoadingMore used anyhow?

Does not seem so, couldn't find even a single reference to it.

We're using loadMoreAsync instead. Will update the README doc in a bit.


bacula: 9.4.2 -> 9.4.3

Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools. This update was made based on information from https://repology.org/metapackage/bacula/versions.
meta.description for bacula is: '"Enterprise ready, Network Backup Tool"'.

Checks done (click to expand)

built on NixOS
/bin/sh passed the binary check.
1 of 1 passed binary check by having a zero exit code.
0 of 1 passed binary check by having the new version present in output.
found 9.4.3 with grep in /nix/store/ygl1njb83pmacbn5almp2mprm9f729ik-bacula-9.4.3
directory tree listing: https://gist.github.com/8abd487d2413f6f55b2dcaf62ea2be68
du listing: https://gist.github.com/4db0e98429e2b110ba70062f5155377a

Rebuild report (if merged into master) (click to expand)

4 total rebuild path(s)
1 package rebuild(s)
1 x86_64-linux rebuild(s)
1 i686-linux rebuild(s)
1 x86_64-darwin rebuild(s)
1 aarch64-linux rebuild(s)
First fifty rebuilds by attrpath
bacula

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/ygl1njb83pmacbn5almp2mprm9f729ik-bacula-9.4.3 \
  --option binary-caches 'https://cache.nixos.org/ https://r-ryantm.cachix.org/' \
  --option trusted-public-keys '
  r-ryantm.cachix.org-1:gkUbLkouDAyvBdpBX0JOdIiD2/DP1ldF3Z3Y6Gqcc4c=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(r-ryantm's Cachix cache is only trusted for this store-path realization.)
Or, build yourself:
nix-build -A bacula https://github.com/r-ryantm/nixpkgs/archive/41d4eb51f0c51cef016b1cb497a7db7eb9d811c4.tar.gz

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/ygl1njb83pmacbn5almp2mprm9f729ik-bacula-9.4.3
ls -la /nix/store/ygl1njb83pmacbn5almp2mprm9f729ik-bacula-9.4.3/bin

cc @domenkozar @lovek323 @proteansec for testing.

Changelog: https://www.bacula.org/bacula-release-9-4-3/


quick start app npm install fails

Following instructions on http://electron.atom.io/
# Clone the Quick Start repository
$ git clone https://github.com/electron/electron-quick-start

# Go into the repository
$ cd electron-quick-start

# Install the dependencies and run
$ npm install && npm start

I am on Mac OS X El Capitan Version 10.11.6
node version: v6.2.1
npm version: 3.9.3
ouput:
% npm install

><EMAIL_ADDRESS>postinstall /Users/someone/misc_code/electron-quick-start/node_modules/electron
> node install.js

undefined:1
{=true
 ^

SyntaxError: Unexpected token = in JSON at position 1
    at Object.parse (native)
    at exports.parse (/Users/someone/misc_code/electron-quick-start/node_modules/rc/lib/utils.js:15:17)
    at addConfigFile (/Users/someone/misc_code/electron-quick-start/node_modules/rc/index.js:31:20)
    at Array.forEach (native)
    at module.exports (/Users/someone/misc_code/electron-quick-start/node_modules/rc/index.js:44:36)
    at Object.<anonymous> (/Users/someone/misc_code/electron-quick-start/node_modules/electron-download/build/index.js:12:26)
    at Module._compile (module.js:541:32)
    at Object.Module._extensions..js (module.js:550:10)
    at Module.load (module.js:458:32)
    at tryModuleLoad (module.js:417:12)

npm-debug.log: https://gist.github.com/tonygaetani/3c0050ed91f755c0086a578105b6068b

my .npmrc was the problem, sorry, closing

I'm having a very similar problem, except I'm on Linux Debian. If I try to install it under the cloned repo with just npm install, it fails with the following error:
Error: GET https://github.com/electron/electron/releases/download/v1.4.3/electron-v1.4.3-linux-x87.zip returned 404
/usr/local/lib/node_modules/electron/install.js:22
  throw err
  ^

And indeed there is no such download directory (aside: I don't know where it's getting linux-x87 from). If I try to install either 1.4.3 or 1.4.1 globally with npm install -g<EMAIL_ADDRESS>it gives the same error. Npm version is 3.4.0 (node 4.3.1) so I doubt it's because I don't have the latest npm or node.
If I remove/edit my .npmrc, which only has prefix=/usr/local, it  first gives the following warning:
npm WARN checkPermissions Missing write access to /usr/lib/node_modules

and then complains that I don't have access to that directory and that perhaps I should run as root. But I definitely don't want to install electron under /usr/lib/node_modules, only under /usr/local/lib/node_modules like all the other node modules that I have installed there.
Let me know if I should open a separate issue.

I just saw issue #92 and decided to give the global install a try after installing the nodejs-legacy package, but it still fails.

@jmafc Just uninstall all previous versions of node (Your nodejs and nodejs-legacy packages)
And then install the glorious, wonderful, maginficent, life saving nvm

That doesn't seem to make sense: nvm says it's a "bash script to manage multiple active node.js versions", if I uninstall all previous versions of node (I only have one--nodejs-legacy only creates a symlink), what is nvm going to manage? and what will happen when I invoke node? Also, when it comes to basic packages like node, python, etc., I prefer to install the distribution package--which has never given me trouble until I tried to install electron (and I've install lots of other modules).

@jmafc nvm is the best (and most reliable) way I have ever found for installing whatever version of node you need on any linux based distro regardless of package manager, flavor or architecture.
I reccomend it because it "Just Works"(TM) and has the added bonus of an easy node version upgrade.  nodejs is very fast moving and last time I tried to install it from package managers on debian based systems the node version so far out of date it wasn't even funny.
So all you need to do to get node running properly is run that nvm install script. Then
nvm install 6
nvm use 6

NVM handles adding the node binaries to your path for you.

@MarshallOfSound Why should I have to install a newer version of node if the one I have works well with all the other modules I use?  Plus, from the error messages there seems to be wrong with the electron distribution, not with node (why does it try to install from a non-existent github url? why is it looking for linux-x87?). So, until someone from electron says otherwise, I'll stick with what I have.

Why should I have to install a newer version of node

Because it's always better to be up to date?  Especially when their are basically no breaking changes and a massive performance boost?

Plus, from the error messages there seems to be wrong with the electron distribution

It is trying to download x87 because you're node version is reporting it's architecture as x87.  This is wrong, and it's either a broken node install or your computer is on one hell of a funky architecture 😆

So, until someone from electron says otherwise, I'll stick with what I have.

I mean, I'm literally just trying to help you but if you want to wait for someone different on the Electron team to tell you something else be my guest.

Re: Quark. No, it's a Core i5.
Re: performance boost. I hardly ever use node. I was just curious about electron.

@jmafc Then you somehow have the wrong node installed.  (Don't know how).  But if you run console.log(require('os').arch()) in node you should see x87.  The x87 build of node.js is for Quark based intel CPU's only.
You need to install the correct version of node for your architecture 👍


Symbiotic does not correctly model zero-size realloc on valid pointers

Hi,
POSIX says, that if realloc is called with a valid pointer and 0, one of the three cases must happen:

realloc fails, NULL is returned and errno is set to ENOMEM -> original pointer is still valid,
realloc succeeds and returns NULL,
realloc succeeds and returns a valid zero-size pointer that shall not be dereferenced and must be later free'd.

Symbiotic does not consider the last case. The first case may be broken too, but I can't check that until #154 is resolved.
#include <errno.h>
#include <stdlib.h>

int main(void)
{
    void *ptr1 = malloc(sizeof(char));
    if (ptr1 == NULL)
        return EXIT_SUCCESS;

    errno = 0;
    void *ptr2 = realloc(ptr1, 0);
    if (ptr2 == NULL) {
        /* if realloc fails, it returns NULL and sets ENOMEM */
        if (errno == ENOMEM)
            free(ptr1);

        return EXIT_SUCCESS;
    }

    /* leak */
}

#include <errno.h>
#include <stdlib.h>

int main(void)
{
    void *ptr1 = malloc(sizeof(char));
    if (ptr1 == NULL)
        return EXIT_SUCCESS;

    errno = 0;
    char *ptr2 = realloc(ptr1, 0);
    if (ptr2 == NULL) {
        /* if realloc fails, it returns NULL and sets ENOMEM */
        if (errno == ENOMEM)
            free(ptr1);

        return EXIT_SUCCESS;
    }

    *ptr2 = 'A'; /* error */

    free(ptr2);
}

Output for the first example:
$ symbiotic --prp=memsafety 0059-test.c
7.0.0-dev-llvm-10.0.0-symbiotic:7aa510d4-dg:8fd21926-sbt-slicer:ce747eca-sbt-instrumentation:ff5d8b3f-klee:8340acee
INFO: Looking for invalid dereferences, invalid free, memory leaks, etc.
INFO: Starting instrumentation
wrapper: `which slllvm` failed with error code 1

INFO: Instrumentation time: 0.13282251358032227
INFO: Optimizations time: 0.05361819267272949
INFO: Starting slicing
[RD] error: no reaching definition for:   call void @free(i8* %22) #5, !dbg !40
[DU] error: no reaching definition for:   call void @free(i8* %22) #5, !dbg !40
INFO: Total slicing time: 0.05880928039550781
INFO: Optimizations time: 0.02026844024658203
INFO: After-slicing optimizations and transformations time: 2.8371810913085938e-05
INFO: Starting verification
b'KLEE: WARNING: undefined reference to function: __symbiotic_keep_ptr'
b'KLEE: WARNING: undefined reference to function: klee_make_nondet'
b'KLEE: WARNING ONCE: Alignment of memory from call "malloc" is not modelled. Using alignment of 8.'
INFO: Verification time: 0.3564143180847168
No error found.
NOTE: In the future, the result is going to be reported in SV-COMP format only with --report=sv-comp switch
RESULT: true
INFO: Total time elapsed: 3.4115078449249268

Interesting -- in this case the POSIX and man pages diverge. From man pages:
if size is equal to zero, and ptr is not NULL, then the call is equivalent to free(ptr).

Similarly, we do not model the case when malloc can return a non-null object that cannot be dereferenced. This needs to be fixed in KLEE.

By default man 3 realloc (that goes for other functions too) points to the documentation of given implementation of libc. The snippet you posted is relevant mainly for the GNU C Library. However, if you open man 3p realloc manual page, you get the documentation for POSIX.1-2008.

... then the call is equivalent to free(ptr).

This obviously describes only the side-effect of the call, not its return value, because free does not return any value (unlike realloc).


Want to contribute with your framework

Hi Volkan, i want to contribute with you in Serenity my playlist link in youtube that build a website with serenity is in the next link
https://www.youtube.com/watch?v=op15-Q2TDjg&list=PLZyQU-WOzZF0Ub4jHd-LXT_hzHsUd5oD4
my playlist is in Arabic language

thanks @MohamedEbrahimSaad for your contribution!

Hi Volkan, i want to contribute with you in Serenity my playlist link in youtube that build a website with serenity is in the next link
https://www.youtube.com/watch?v=op15-Q2TDjg&list=PLZyQU-WOzZF0Ub4jHd-LXT_hzHsUd5oD4
my playlist is in Arabic language

Great work Mohamed,

@volkanceylan  can you add my channel link in your repository Video Tutorials section ?

@ysaadh thanks alot

@volkanceylan

Added link to readme.

thanks alot @volkanceylan


Iterator: unable to evaluate path

I'm submitting a ...  (check one with "x")
[X] bug report => search github for a similar issue or PR before submitting
[] feature request
[X] support request
[] general question

Using the iterator to loop over an array of objects works (using $current.iteration.key or even $current.iteration.value), but accessing fields of the current iteration object fails.
Activity settings
{
            "id": "log_3",
            "type": "iterator",
            "name": "Log Message",
            "description": "Simple Log Activity",
            "settings": {
              "iterate": "$activity[githubissues_2].result"
            },
            "activity": {
              "ref": "github.com/TIBCOSoftware/flogo-contrib/activity/log",
              "input": {
                "message": "",
                "flowInfo": "false",
                "addToFlow": "false"
              },
              "mappings": {
                "input": [
                  {
                    "type": "assign",
                    "value": "$current.iteration.value.title",
                    "mapTo": "message"
                  }
                ]
              }
            }
          }

Data object (abbreviated)
{
    "id": 323859596,
    "number": 2,
    "state": "open",
    "locked": false,
    "title": "Hello World",
    "body": ""
    ...
}

Error shown on console
2018-05-16 22:07:24.587 INFO   [activity-githubissues] - GitHub returned 2 issues
2018-05-16 22:07:24.588 ERROR  [engine] - unable to evaluate path: .title
2018-05-16 22:07:24.589 ERROR  [engine] - Execution failed for Activity[Log Message] in Flow[Get GitHub Issues] - unable to evaluate path: .title
2018-05-16 22:07:24.590 ERROR  [flowmodel-simple] - Error evaluating activity 'Log Message'[github.com/TIBCOSoftware/flogo-contrib/activity/log] - unable to evaluate path: .title
2018-05-16 22:07:24.591 INFO   [engine] - Flow instance [613d34838f509b85fba43687f928f5db] Failed

Flogo details
λ flogo version
flogo cli version [v0.5.3-16-g80636ce]
Your project uses github.com/TIBCOSoftware/flogo-contrib branch master and revision 1688c9ba8e90a24251a13333aedae1aac59f21d1
Your project uses github.com/TIBCOSoftware/flogo-lib branch master and revision d311aa9db6f5e592df5c533776355bd1f89fa750
Your project uses github.com/retgits/flogo-components branch master and revision 6c85d7d9c68d9ad58550bf4778f7a3bb2eb70ac1

I'm using the master branches of flogo-lib and flogo-contrib due to TIBCOSoftware/flogo#213

@fm-tibco, the branch doesn't seem to fix the issue.
Created the app with command:
flogo create -f git_hub.json -flv github.com/TIBCOSoftware/flogo-lib/engine@master,github.com/TIBCOSoftware/flogo-contrib/action/flow@issue_273 github

After flogo build the issue is still the same. The object (using $current.iteration.value) is printed, but accessing a specific field (like $current.iteration.value.title) doesn't seem to work
Attached flogo.zip with a flogo.json
flogo.zip

Thanks, I’ll try out you app

Fixed with https://github.com/TIBCOSoftware/flogo-lib/pull/179 so closing this


Death Knight Incorrect Ghoul Scaling

This one I'm not 100% sure on but I think I figured it out.
All of this was done WITHOUT the glyph of raise dead.
The sim is showing this for my ghoul's stats, 18102 attack power with only Horn of Winter:

Meanwhile ingame my ghoul has 13010 AP:

In the sim it is saying the ghoul is inheriting 8585 strength which I believe is incorrect. When I use Horn of Winter I gain 720 str. My ghoul gains 1454 AP which seems almost appropriate for a 720 str gain. I don't know why its more, the pet sheet doesn't display str anymore.
The sim seems to show the ghoul having 476 base str. When my strength is added you get 6455 x 2 = 12910 AP which is very close to the 13010 on the pet sheet. I believe the ghoul gains 100% of the player's strength.
Also the Raise Dead for Blood/Frost have the same scaling as the base unglyphed unholy ghoul. I think on the current sim they both do have the same scaling but I'm not 100% sure. Frost is top and Unholy is bottom. Removed cloak as unholy so both have about the same strength:

After looking at the sim source code I found that the ghoul inherits 101% strength, has 476 base strength and -20 ap.
(((5979x1.01) + 476)x2)-20 = 13009.58 rounded up to 13010 is the exact AP my ghoul has.
I think this is causing the incorrect scaling, it is making the ghoul inherit 143.54% strength:

@Cazera90 Can you also provide your ghouls AP in the same set but with the glyph equipped?


devcontainer broken due to expired GPG key

The latest devcontainer is based on devbox:1.0 image:
https://github.com/AztecProtocol/aztec-packages/blob/19a500ffc09ab8bc367a78599dd73a07a04b426e/.devcontainer/dev/devcontainer.json#L3
However, if you try to use it, installation of docker-in-docker fails with:
GPG error: https://cli.github.com/packages stable InRelease: The following signatures were invalid: EXPKEYSIG 23F3D4EA75716059 GitHub CLI<EMAIL_ADDRESS>
You can trigger the same GPG issue with a below one-liner:
docker run -it --rm --entrypoint /bin/bash aztecprotocol/devbox:1.0 -c "apt update"

For upstream report see https://github.com/cli/cli/issues/9569.
The simplest solution is to update devbox image, you can either:

rebuild container from scratch,
add step fetching new GPG key.

Workaround

Prepare empty directory:

mkdir /tmp/devbox-fixed
cd /tmp/devbox-fixed

Create the following Dockerfile:

FROM aztecprotocol/devbox:1.0

RUN wget -qO- https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null \
    && chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg

Build image, while overwiting original tag:

docker build -t aztecprotocol/devbox:1.0 .

Run devcontainer and be happy that it works.

Hi @koxu1996, thanks for raising this. devbox:1.0 is an old version of the dev container image. You can use aztecprotocol/devbox:1.1 which contains the right versions of our toolchains.
PR here to bump devcontainer #10836


cannot change end date for range

perhaps after both dates are selected a new click should erase both and interpret new click as start date?

You can reset the end date to the start date by double clicking.

This feature support has been added in version 1.0.0

You can set the reSelected prop to true to activate the feature


type bound not respected by code completion

If a generic function f has a type bound A on its generic argument T,
then code completion should know that variables of type T extend A...
yet it doesn't seem to in practice.  For example, enter the following into dartpad:
class A {
  final int x;

  A(this.x);
}

// Put the cursor just after the 't.' on the next line and ask for code
// completion.  It will foolishly say "No suggestions", but it should suggest x.
int f<T extends A>(T t) => t.x;

void main() {
  var a = new A(1);
  print(f(a));
}

It gets worse:
int f<T extends A>(T t) {
  T t2 = t;
  t2.x;  // No code completion here either.
  A t3 = t;
  t3.x;  // Perversely, you get code completion here with the _weaker_ type declaration.
  return t.x;
}

This sucks because you need to declare weaker types to get maximum help from the IDE.
The weird thing is that when you put your cursor over the x,
dartpad still says "int x" in the lower right corner.
So at some level, it understood.

@eernstg @lukechurch

See also https://github.com/dart-lang/sdk/issues/29383

Duplicate of https://github.com/dart-lang/sdk/issues/24255.


📁  Removing jobseeker app

The jobseeker app should be removed because this app was created for demo purpose only.

[ ] Remove jobseeker app
[ ] Remove jobseeker url from main app urls.py file
[ ] Remove the jobseeker app from the installed apps list on the main app settings.py file

Closing this issue.
We have decided to keep the jobseeker app and to use its content as our about page.


chore: Added badges to readme

Codecov Report

Merging #58 into develop will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff            @@
##           develop      #58   +/-   ##
========================================
  Coverage    91.38%   91.38%
========================================
  Files           34       34
  Lines          557      557
  Branches        79       79
========================================
  Hits           509      509
  Misses          48       48

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d63ee77...6c68133. Read the comment docs.


Create 0069-sqrtx.js

File(s) Modified: 0069-sqrtx.js
Language(s) Used: JavaScript
Submission URL: https://leetcode.com/problems/sqrtx/submissions/980450986/

Will close my PR since another contributor has created a solution for this problem.


added missing RU localizations

added missing RU localizations, please merge

Thanks, please thumb up here https://pub.dev/packages/flutter_country_selector

would you please update pub.dev version as I still can not see changes with 'dart pub add flutter_country_selector'


CVS: mip_era

The CCMI2022_CV.json file lists the mip_era as CMIP6, but this is not part of CMIP6. I suggest using post-CMIP6, or something similar. I'll raise it with the WGCM Infrastructure Panel. This may affect the way in which data appears in ESGF.

No objections from me with adopting whatever the WGCM Infrastructure Panel thinks is best. Note that many of the forcings for the historical simulation are extended versions of the CMIP6 historical forcings, while the forcings for the projections are largely consistent with CMIP6. The exception is the specification for the Ozone Depleting Substances, which use the baseline projection from the 2018 Ozone Assessment.


Luiz/Submenu feature

Notes

To use the parent item, should set the $menuParent on class extending AbstractController

👍


Return indices for further logging.

This PR adds mask indices returned value to draw mask. It could be used for further logging.

Solved ;)

Could you check the CI? Other than that LGTM.


[FEATURE] Add parameters to adjust the page width

Would you please add a param to let us adjust the page width?
For example:
width: 80  # Percentage of page width

or

width: "wide" # compact\normal\wide

Would you please add a param to let us adjust the page width?
For example:
width: 80  # Percentage of page width

or

width: "wide" # compact\normal\wide

It's technically possible to do this using data-attributes, but adding more data-attributes for one parameter makes the css size increase with redundant css properties. it will be even simpler if you change the value inside _override.scss with !important rules. For example:
// assets/css/_override.scss
// Override Variables

@media only screen and (max-width: 2560px) {
  .page {
    width: 70% !important;
  }
}

Thank you for your reply.
I've actually been modifying it this way so far, but I'm finding that there are more attributes that need to be modified. Not only do I need to make separate changes for different sized devices, but I also need to consider modifying the location of the toc otherwise it will leave a large spacing.
So I want a reserved style option, such as compact/normal/wide, to be able to modify these multiple attributes at the same time.
For the css redundancy issue, I wonder if it is possible to use conditions to control the css output, instead of selecting different css properties by class.

So I want a reserved style option, such as compact/normal/wide, to be able to modify these multiple attributes at the same time.

Sorry for the late responses,
Can you be more specific? which page size do you mean? is it entire page or only for single class?

is it entire page or only for single class?

entire pages including posts, simple pages, archive page, list page, tag page, category page, etc.

entire pages including posts, simple pages, archive page, list page, tag page, category page, etc.

I do agree if the user chooses the page size they want,
but come back again that this will cost a lot of redundant resources as I mentioned before.

It's technically possible to do this using data-attributes, but adding more data-attributes for one parameter makes the css size increase with redundant css properties.

Even using PurgeCSS as postcss can't handle the removal unused css (cause every single class were mentioned in html template).
So I choose not to make any changes about this and it think the current page-sizes is good enough for us.


missing Close() method for VirtualNetwork

Currently, there's no way to free the memory allocated by VirtualNetwork.
For instance, the following code will leak around ~100MB of memory:
	config := types.Configuration{
		Debug:             false,
		CaptureFile:       "",
		MTU:               1500,
		Subnet:            "<IP_ADDRESS>/16",
		GatewayIP:         "<IP_ADDRESS>",
		GatewayMacAddress: "12:34:56:78:aa:bb",
		DHCPStaticLeases:  map[string]string{},
		DNS:               []types.Zone{},
		Forwards:          map[string]string{},
		NAT:               map[string]string{},
		GatewayVirtualIPs: []string{"<IP_ADDRESS>"},
		Protocol:          types.QemuProtocol,
	}

	fmt.Println("Memory usage before creating virtual networks:")
	memStats()

	for i := 0; i < 1000; i++ {
		_, err := virtualnetwork.New(&config)
		if err != nil {
			panic(err)
		}
	}

	runtime.GC()

	fmt.Println("Memory usage after creating virtual networks:")
	memStats()

Output:
Memory usage before creating virtual networks:
Alloc = 0 MiB   TotalAlloc = 0 MiB      Sys = 10 MiB    NumGC = 0
Memory usage after creating virtual networks:
Alloc = 97 MiB  TotalAlloc = 125 MiB    Sys = 410 MiB   NumGC = 6

The implementation of memStats() (taken from here):
func memStats() {
	var m runtime.MemStats
	runtime.ReadMemStats(&m)
	// For info on each, see: https://golang.org/pkg/runtime/#MemStats
	fmt.Printf("Alloc = %v MiB", bToMb(m.Alloc))
	fmt.Printf("\tTotalAlloc = %v MiB", bToMb(m.TotalAlloc))
	fmt.Printf("\tSys = %v MiB", bToMb(m.Sys))
	fmt.Printf("\tNumGC = %v\n", m.NumGC)

}

func bToMb(b uint64) uint64 {
	return b / 1024 / 1024
}

Created a small GitHub repo with a reproduction:
https://github.com/urish/virtualnetwork-leak
It's basically the same code as above, but packaged into a go project for easier reproduction.

Thanks. Sorry for not noticing this earlier, but I will take a look at this.

The code as in the example
	for i := 0; i < 1000; i++ {
		_, err := virtualnetwork.New(&config)
		if err != nil {
			panic(err)
		}
	}

	runtime.GC()

just claims a new device and never release, hence an out-of-memory.
The queston however is when you want to release it. Opening multiple is allowed and is hold on until released/closed. At what point would you make that decision?

From my point of view, having a Close() method which would release a VirtualNetwork would be ideal

OK, just to confirm that the issue is about adding additional functionality
to deconstruct. :+1
On Fri, Dec 2, 2022 at 2:23 PM Uri Shaked @.***> wrote:

From my point of view, having a Close() method which would release a
VirtualNetwork would be ideal
—
Reply to this email directly, view it on GitHub
https://github.com/containers/gvisor-tap-vsock/issues/161#issuecomment-1334814236,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAAAOZRUSWCPD3CPBC7JMZDWLGIUTANCNFSM6AAAAAASHPZ3JI
.
You are receiving this because you were assigned.Message ID:
@.***>

--
Gerard Braad | http://gbraad.nl
STEM is the source, but BUILD is how you develop!
[ Better Understanding Involves Learning and Doing ]

Yes 😀

will also have to spend more time on this. I see memory leaks on Windows, but they are caused by something else that fails first


Shielded coins aren't displayed in the balance

Shielded coins aren't displayed in the balance

Please provide your database and password?

logs.zip
Password: 1

Remove tab "shielded" . Only "available" balance should be as in UI wallet

Remove word 'shielded' from balance


Fixed strings in migration

Right now, if you're using Python3 and Django 1.7+, if you install django-waffle and run manage.py makemigrations, it will create a migration because the help_text on all the fields contains text, not bytes as implied in the initial migration.
This PR changes the initial migration to use native strings (by removing the b'' prefix), so it will work in py2 and py3 environments.

LGTM

@jsocol any thoughts on this?  Should be a painless change.

Shouldn't we also add unicode_literals to waffle/models.py? This fix makes sense but it does move the models out of sync with the migrations, on py2.

Ah yes, good catch -- I forgot that Django migrations automatically use unicode_literals.  I've added that everywhere, and I also added Django's python_2_unicode_compatible decorator to all models.

Thanks!


High load on Rancher server and DB when starting/stopping containers

Rancher Versions:
Server: 1.3.3
healthcheck: 0.2.0
ipsec: 0.0.2
network-services: 0.0.8
scheduler: 0.3.0
kubernetes (if applicable):-
Docker Version:
1.12.6, overlayfs
OS and where are the hosts located? (cloud, bare metal, etc):
AWS, Ubuntu 16.04 LTS
Setup Details: (single node rancher vs. HA rancher, internal DB vs. external DB)
external DB Aurora db.r3.large , HA and single (1-2x c4.xlarge), 26 m4.xlarge nodes, 800 containers avg.
Environment Type: (Cattle/Kubernetes/Swarm/Mesos)
Cattle
Steps to Reproduce:
Start and stop containers
Results:
High load on Rancher sevrer (+ lots of DB querries)
We are constantly starting/stopping containers (rancher-cron and a AWS lambda like system to run arbitrary scripts in well defined environments). We are starting around 15 containers per minute. The CPU of the server  is around 381% (4 cores). The RDS Aurora DB gets 1650 req/s constantly.
I'd say this needs some tuning as we're running into scaling problems ( see https://github.com/rancher/rancher/issues/6858#issuecomment-276465779 ).
THX

@pschrammel have you seen this in more recent versions of rancher? This should have been improved dramatically in later releases.

Let us know if this is still seen in recent versions.


NoSuchFileException

Hi,
I'm trying to run your sample in IntelliJIdea, but get this error when I run it: Caused by: java.nio.file.NoSuchFileException: jte/hello.jte
I have this in my pom.xml:
<dependency>
            <groupId>gg.jte</groupId>
            <artifactId>jte</artifactId>
            <version>1.0.0</version>
        </dependency>
...
 <plugin>
                <groupId>gg.jte</groupId>
                <artifactId>jte-maven-plugin</artifactId>
                <version>1.0.0</version>
                <configuration>
                    <sourceDirectory>${basedir}/src/main/jte</sourceDirectory>
                    <targetDirectory>${basedir}/jte-classes</targetDirectory>
                    <contentType>Html</contentType>
                </configuration>
                <executions>
                    <execution>
                        <phase>process-classes</phase>
                        <goals>
                            <goal>precompile</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

And in the main function:
CodeResolver codeResolver = new DirectoryCodeResolver(Path.of("jte")); // This is the directory where your .jte files are located.
        TemplateEngine templateEngine = TemplateEngine.create(codeResolver, ContentType.Html); // Two choices: Plain or Html
        TemplateOutput output = new StringOutput();
        templateEngine.render("hello.jte", 1, output);
        System.out.println(output);

How does compiler find template files? What is the path Path.of("jte") relative to?
Are the .jte files source or resources?

Hi @mahdix!
the Path.of("jte") is relative to the working directory of your program. In IntelliJ you can check this when you edit your run configuration under Working Directory.
Where did you put your jte files? In src/main/jte? Then you'd need to put new DirectoryCodeResolver(Path.of("src/main/jte")).
You can put the template files as resources (by using ResourceCodeResolver) if required, but I wouldn't recommend it, since ResourceCodeResolver doesn't support hot reload.
Let me know if you get it to work :-)

Cool! It worked!
I had to change working directory in Run config and use "src/main/jte".
But what about production?  In that case, what will be the correct path?

Awesome!
I think you would do something like this for production:
    private static TemplateEngine createTemplateEngine() {
        if (devSystem) {
            DirectoryCodeResolver codeResolver = new DirectoryCodeResolver(Path.of("src", "main", "jte"));
            return TemplateEngine.create(codeResolver, ContentType.Html);
        } else {
            return TemplateEngine.createPrecompiled(Path.of("jte-classes"), ContentType.Html);
        }
    }

You'd need to copy the jte-classes directory to production as part of your deployment.

Any idea on how to automatically include compiled class files in the uber-JAR created via "mvn package" command?

Hmm, you could instruct the jte maven plugin to compile everything to target directory. In theory this should include the files in your final build.
However, I will have to implement another createPrecompiled method, that looks at the existing class path, instead of a directory on the filesystem.
That'd be a pretty cool feature actually :-) Gonna try and give it a shot today.

I have already tried that, but those compiled class files are not included in the jar file.
This is what I have in my pom.xml for jte plugin:
<configuration>
                    <sourceDirectory>${basedir}/src/main/resources/templates</sourceDirectory>
                    <targetDirectory>${basedir}/target/jte-classes</targetDirectory>
                    <contentType>Html</contentType>
                </configuration>

But there is not "generated" package inside "gg.jte". Looks like only standard jte classes are included int he final JAR file:

Hey @mahdix, the TemplateEngine can now be created so that the application class loader is used. This way it should be possible to bundle templates into the application JAR!
At least it worked in my test setup :-) Here's a working example:
https://github.com/casid/jte/tree/master/jte-runtime-cp-test
TemplateEngine creation is even easier that way!
TemplateEngine.createPrecompiled(ContentType.Html);
And in pom.xml, you'd need to change the target directory to:
<targetDirectory>${basedir}/target/classes</targetDirectory>
Would you mind to check it out and see if this works for you? I'd then release 1.1.0 shortly after.
If you want to try it you'd need to change ${jte.version} in your pom.xml to 1.1.0-SNAPSHOT and build jte locally.
To build the jte:

Clone this repository
Run mvn clean install in the project's root directory

Hope it works! Also, thanks for your suggestion, I really like this new way of running in production :-)

Awesom!
I did what you said above:

Clone this repo
Maven install
Get back to my project and change all versions to 1.1.0-SNAPSHOT, also change target path of the plugin to to target/classes
Mvn package
java -jar app.jar
Browse the web page at http://localhost:8080

And it shows me my template! :-)
Also inside the final JAR I have generated files:

On a separate matter, When I commented out my previous template content and replaced it with a simple text, I got a compiler error (This was resolved when I removed comments). Not sure if I am commenting them out correctly:
This is the template:
<%--@import java.util.List--%>
<%--@import io.justread.api.model.Email--%>

<%--@param List<Email> inbox--%>

<%--
--%>
<%--@for(var email: inbox)--%>
<%--
--%>
<%--    ${email.getSource()}	--%>
<%--    ${email.getSubject()}	--%>
<%--    ${email.getTimestamp()}	--%>
<%--
--%>
<%--@endfor--%>
<%--
--%>

this is inbox jte v6

The error I got when I ran mvn package:
illegal start of expression
render(jteOutput, jteHtmlInterceptor, inbox--%>);

Looks like either something is wrong with the way I commented out the template content or jte parser, thinks that my comments are not comments and are code.

Oh nice, thanks for the quick update! I'm glad it worked!
Yeah it looks like this should work.. I believe the parser is confused by the commented out parameter.
Thanks for reporting. Gonna write a test & fix for this and then release 1.1.0.

Fixed! https://github.com/casid/jte/commit/5993bca658cef5aee93478a1d69ac7477f37e339
Gonna release 1.1.0 now :-)

@mahdix I've updated the documentation with the new way to bundle templates:
https://github.com/casid/jte/blob/master/DOCUMENTATION.md#using-the-application-class-loader-since-110
Thanks again for the suggestion and helping me to test it 👍

@mahdix I've just released 1.2.0. With this version it is even easier to achieve precompiled templates with application class loader:
https://github.com/casid/jte/issues/7
Just in case you're interested :-)


Update wasmtime-wasi to new wasi-common interface

This PR updates wasmtime-wasi to the new public interface exposed by wasi-common and introduced in CraneStation/wasi-common#34.

Even though this is marked "Draft", merging due to https://github.com/CraneStation/wasi-common/pull/34 landing.


SDL2: 2.24.2 -> 2.26.2

Automatic update generated by nixpkgs-update tools. This update was made based on information from https://repology.org/metapackage/SDL2/versions.
meta.description for SDL2 is: A cross-platform multimedia library
meta.homepage for SDL2 is: http://www.libsdl.org/
Updates performed

Version update

To inspect upstream changes
Impact

Checks done (click to expand)

built on NixOS
The tests defined in passthru.tests, if any, passed
found 2.26.2 with grep in /nix/store/6c61802hhvl9aj6znixfm1mz5gvy9xdz-SDL2-2.26.2
found 2.26.2 in filename of file in /nix/store/6c61802hhvl9aj6znixfm1mz5gvy9xdz-SDL2-2.26.2

Rebuild report (if merged into master) (click to expand)

2693 total rebuild path(s)

2693 package rebuild(s)

First fifty rebuilds by attrpath
ChowKick
CuboCore.corepdf
CuboCore.coretoppings
DisnixWebService
HentaiAtHome
MIDIVisualizer
PageEdit
R
SDL2
SDL2_gfx
SDL2_image
SDL2_mixer
SDL2_net
SDL2_sound
SDL2_ttf
SDL2_ttf_2_0_15
SDL_audiolib
SDL_compat
SDL_gpu
Sylk
_1oom
_20kly
_7kaa
_90secondportraits
aaxtomp3
abbaye-des-morts
abcl
acoustidFingerprinter
adapta-gtk-theme
adl
aegisub
agi
aitrack
alan
alass
alchemy
alda
alephone
alfaview
alfis
allure
almanah
alpine-make-vm-image
alsa-scarlett-gui
altair
amarok
amarok-kf5
amberol
amidst
ammonite

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/6c61802hhvl9aj6znixfm1mz5gvy9xdz-SDL2-2.26.2 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A SDL2 https://github.com/r-ryantm/nixpkgs/archive/a56a1fe26e1509bb7a21fdf1d7448f780711f818.tar.gz

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/6c61802hhvl9aj6znixfm1mz5gvy9xdz-SDL2-2.26.2
ls -la /nix/store/6c61802hhvl9aj6znixfm1mz5gvy9xdz-SDL2-2.26.2/bin

Pre-merge build results
NixPkgs review skipped

Maintainer pings
cc @cpages for testing.

@ofborg build SDL2 SDL2.passthru.tests

Version 2.26.3 is available.
Latest: https://github.com/libsdl-org/SDL/releases/latest

Closed in favor #215310


An exception occurred while invoking executor 'executor://mstestadapter/v2': Method 'get_Properties'

2018-05-12T02:02:28.4850560Z ##[section]Starting: VsTest - All
2018-05-12T02:02:28.4857623Z ==============================================================================
2018-05-12T02:02:28.4858028Z Task         : Visual Studio Test
2018-05-12T02:02:28.4858647Z Description  : Run unit and functional tests (Selenium, Appium, Coded UI test, etc.) using the Visual Studio Test runner. Test frameworks that have a Visual Studio test adapter such as xUnit, NUnit, Chutzpah, etc. can also be run. Tests can be distributed on multiple agents using this task (version 2).
2018-05-12T02:02:28.4859452Z Version      : 2.5.8
2018-05-12T02:02:28.4859782Z Author       : Microsoft Corporation
2018-05-12T02:02:28.4860152Z Help         : More Information
2018-05-12T02:02:28.4860618Z ==============================================================================
2018-05-12T02:02:31.5714005Z Run the tests locally using vstest.console.exe
2018-05-12T02:02:31.5714497Z ========================================================
2018-05-12T02:02:31.5715501Z Test selector : Test assemblies
2018-05-12T02:02:31.5716127Z Test assemblies : **\Dx1.Dx1App.UnitTests\bin**\Dx1.Dx1App.UnitTests.dll
2018-05-12T02:02:31.5716721Z Test filter criteria : null
2018-05-12T02:02:31.5717318Z Search folder : C:\agent_workd\1\s
2018-05-12T02:02:31.5717887Z Run settings file : C:\agent_workd\1\s
2018-05-12T02:02:31.5718580Z Run in parallel : true
2018-05-12T02:02:31.5719097Z Run in isolation : false
2018-05-12T02:02:31.5723093Z Path to custom adapters : null
2018-05-12T02:02:31.5723653Z Other console options : null
2018-05-12T02:02:31.5724182Z Code coverage enabled : false
2018-05-12T02:02:31.5725332Z Rerun failed tests: false
2018-05-12T02:02:31.5726045Z VisualStudio version selected for test execution : latest
2018-05-12T02:02:32.8927069Z ========================================================
2018-05-12T02:02:46.7353328Z [command]"C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe" @C:\agent_workd_temp\863df241-5588-11e8-b942-fd8a90029632.txt
2018-05-12T02:02:46.8864849Z Microsoft (R) Test Execution Command Line Tool Version 15.7.1
2018-05-12T02:02:46.8865403Z Copyright (c) Microsoft Corporation.  All rights reserved.
2018-05-12T02:02:46.8865682Z
2018-05-12T02:02:46.8881482Z vstest.console.exe
2018-05-12T02:02:46.8882076Z "C:\agent_workd\1\s\ClientApp\Dx1.Dx1App.UnitTests\bin\Release\Dx1.Dx1App.UnitTests.dll"
2018-05-12T02:02:46.8882564Z /Settings:"C:\agent_workd_temp\89d3ea40-5588-11e8-b942-fd8a90029632.runsettings"
2018-05-12T02:02:46.8882925Z /logger:"trx"
2018-05-12T02:02:46.8883245Z /TestAdapterPath:"C:\agent_workd\1\s"
2018-05-12T02:02:47.0800460Z Starting test execution, please wait...
2018-05-12T02:02:49.1544170Z An exception occurred while invoking executor 'executor://mstestadapter/v2': Method 'get_Properties' in type 'Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.TestContextImplementation' from assembly 'Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' does not have an implementation.
2018-05-12T02:02:49.2720781Z
2018-05-12T02:02:49.2721761Z Test Run Failed.
2018-05-12T02:02:49.2891969Z ##[warning]Vstest failed with error. Check logs for failures. There might be failed tests.
2018-05-12T02:02:50.6024444Z ##[error]Error: C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe failed with return code: 1
2018-05-12T02:02:51.9294994Z ##[warning]No results found to publish.
2018-05-12T02:02:53.2412864Z ##[error]VsTest task failed.
2018-05-12T02:02:54.5633809Z ##[section]Finishing: VsTest - All

@xeroxe : Can you make sure you have same version of MSTest.TestAdapter and MSTest.TestFramework nuget packages on your machine? This seems like a version mismatch issue.

@xeroxe: Did the above suggestion work for you?

Thank you, It seems like in this solution, the unit tests project have different version so it have already updated to be the same version and they can run test properly. This issue can close.

I had old versions leftover in my /bin/ folders and had to delete them so they could restore properly. I'm not sure why they didn't overwrite on restore/build, but this allowed my tests to run.


Fixed OPA baseUri path

For context, the motivation is to let more of the settings be purely derived from config files and to make the configs more explicit.
Appending /v1/data is something that the end users can do by setting this on the URI. Making the URI be read from config and not get modified further lets us potentially introduce a base OpaS3SecurityMapper implementation in the future that sends a standard-format (which we'd need to decide upon) OPA request to whatever URI the user configured (similar to what the Trino OPA plugin does)


[CHALLENGE SUBMISSION] Challenge 3

Please provide the following information for your submission:
What is your name? (First, Last)
Deepak Dhami
Where is your GitHub Repo ?(With your challenge solution)
https://github.com/DexterPOSH/25dayofserverless/tree/master/day3SecretSanta
What Challenge is this for? (Challenge number between 1 and 25)
3
(Optional) Anything else we should know? e.g., language used, location, blog post?
Used Python

From all of us on the Cloud Advocacy team at Microsoft, thank you @DexterPOSH for creating this issue!
Have a Happy Holiday season!
Feel free to share your solution on Twitter with the tag #25DaysOfServerless

THANK YOU FOR YOUR #25DaysOfServerless SUBMISSION
We checked out your repository. We're thrilled to say your solution is now listed in our Hall of Fame
Thank you for your contributions!
This issue is now resolved! 🎉