(Homebrew Install) Link fails if Crystal & its dependencies are not in /usr/lib or /usr/local/lib

I am using Crystal through homebrew, and I install into ~/.brew, which means that the garbage collector is in $(brew --prefix)/lib/libgc.dylib (➡ ~/.brew/lib/libgc.dylib).
I can only compile if I add --link-flags -L$(brew --prefix)/lib to my crystal build command line:
crystal build program.cr --link-flags -L$(brew --prefix)/lib
The problem is at src/compiler/crystal/codegen/link.cr:85 in that there appears to be no way for you to do anything except support /usr/lib and /usr/local/lib without specifying.
Ideally, this will look for a file that contains additional configuration defaults (possibly project-specific). If this file were something like crystal-config, I would look for:

config/crystal-config
./.crystal-config
./.config/crystal-config
~/.crystal-config
/etc/crystal/config

Maybe with version distinction at the ~/.config, ~/, and /etc/crystal level. Looking for /etc should not be a fixed value, either, because if Crystal were installed in /opt, it should be looking in /opt/etc first. In my homebrew case, if I do brew --prefix crystal-lang, I get the result ~/.brew/opt/crystal-lang/, under which there is an etc directory. Perhaps looking for a configuration relative to the crystal binary might be a good choice.

The code you link are the default paths, and they are indeed appended to the link command, but the system linker will still use the paths you define to its environment variables or configuration files.
For example on OSX, you may set:
LIBRARY_PATH=~/.brew/lib:$LIBRARY_PATH

What I’m saying is that the default paths included are insufficient because it assumes a particular installation location for Crystal, its dependencies, and system dependencies. Should Windows become a priority at some point, having /usr/lib and /usr/local/lib as the defined values will completely fail. I think that if I were to use Crystal under Nix or Guix, I would run into the same problem (without patching Crystal’s link.cr and recompiling).
I don’t know what the correct solution is, but telling users to set LIBRARY_PATH is not a solution. (It’s a fine interim workaround, but it’s not a solution, as it would also change any other language’s library search path which I may not want by default.)

The library paths specified by crystal are in addition to the default ones that the linker should search. In a properly configured system, crystal shouldn't have to specify any linker paths at all. Crystal is not assuming a default install location, the default linker should find the libraries. The lack of all the paths where libraries reside in LIBRARY_PATH is a configuration error, and should not be accounted for by crystal. NixOS modifies LIBRARY_PATH in it's linker wrapper to fix this, as it should.

Well, I'm not sure where the bug rests, but Crystal is the only brew-installed language I have that can't find its own link-time dependencies in my Homebrew install.
I realize this may not be a priority for you, but it makes Crystal unusable for me.

If it helps, I remember at some point noticing that our homebrew formula might not work if homebrew is not configured with the default paths. I can't remember why, now.

Hmmm... reading the comments above I agree with @ysbaddaden and @RX14 : Crystal just passed -lgc to the linker and it expects a properly configured system. Maybe other things installed via homebrew don't need to execute a link command?

Pretty sure that’s not the case, since some of them are also built on LLVM as you are. It may be that “they” (that is, whoever made the Homebrew formula) are doing something within their Homebrew config that makes it work correctly.
I understand having to provide -L$(brew --prefix)/lib for tarballs that I download (or Rubygems that I install and want to use my homebrew versions of libraries rather than system ones, for example). I even understand that this is a use-case that you didn’t think of. I can’t understand that you think that this is not a “properly configured system”. My system is properly configured, and I expect languages that have link times to be aware that, if they are not installed in a “normal” place (e.g., /usr/local/…), they should ensure that their sibling directories are included as appropriate so that they can actually work out of the box. This is how /opt is supposed to work. This is how installing Homebrew in a directory different than /usr/local/ is supposed to work.
Idris provides idris --link, which on my system shows idris --link -L/Users/austin/.brew/Cellar/idris/0.12.1/share/x86_64-osx-ghc-8.0.1/idris-0.12.1/rts -lidris_rts -lpthread, which means it knows a bit more about its install environment.
One (probably easy) fix would be to modify the Homebrew formula so that it modifies link.cr to include the Homebrew prefix. This will only work as long as Crystal is delivered by source instead of a bottle, but it would be a start until you make your installation relocatable.

One solution would be making the crystal installed executable a wrapper which sets the correct LIBRARY_PATH before invoking crystal. That's much cleaner to me.

@RX14, that would be fine. I haven’t yet learned Idris to be able to tell you how it’s able to determine its link parameters, but it is fairly smart.

Mmm... but imagine you want to use the XML module. Crystal uses libxml2 for that, and it expects it to be in the library path: in the system's library path, not in crystal's library path (Crystal doesn't provide libxml2, nor it provides any C library you could possibly link to). So what would we do in that case?

As crystal developers, we consider installing brew to a non standard directory but not declaring that special directory to the system to be a "non properly configured system" because installed libraries can't be found by the system linker, and there isn't much that the crystal compiler can do about it (we won't add hacks for every single package manager).
That being said, since this is a Homebrew configuration I guess the brew install script should be capable to configure the bin/crystal binstub to include the brew libdir to the LIBRARY _PATH environment variable? That should avoid the non standard brew installation issues.

And that would help use linuxbrew.sh, IMO.
Because I'm having troubles installing it as stated in https://github.com/Linuxbrew/homebrew-core/issues/716

@ysbaddaden Pretty much. And maybe the bug should have been filed against the Homebrew formula instead, but as I’ve worked with other languages that do some sort of sibling-directory detection (e.g., if you install into /opt/…, it would find /opt/lib; if you install into /opt/crystal/…, it would find /opt/crystal/lib…).
I don’t actually want a special fix for Homebrew, just a sane addition to the sane default behaviour, or something that package managers can write to for configuration whether they use a precompiled version or compile it themselves (which is why I suggested the configuration option at the beginning of the post). Something that might be expressed sort of as:
def lib_flags
  library_path = [ Filename.expand_path("../../lib", $0), "/usr/local/lib", "/usr/lib" ]
  library_path.delete_if { |e| !Filename.exist?(e) }
  …

The code is more or less how I’d write it in Ruby (such that if $0 == "~/.brew/bin/crystal", so expanding ../../lib, would be ~/.brew/lib/). I’ve also written a minor bug fix into your code there, because the resulting list should be -L$(brew --prefix)/lib -L/usr/local/lib -L/usr/lib so that /usr/local/lib is searched before /usr/lib, which is the opposite of what you have now and not what most people would expect (if I install a different version of libxml2 in /usr/local/ than is in /usr/lib, it will be properly found).
BTW, I think this could have been avoided if bdw-gc (used in Homebrew) had used pkg-config because you have code for handling that, and it looks pretty sane, too.

Expanding ../../lib from $0 is a bold assumption. It should consider $0 to be a link, but the bigger problem is that in official tarballs and packages we distribute, it would point to /opt/crystal/embedded/bin/crystal and the linker won't find any libraries except for the embedded ones, that the binstub already added to LIBRARY_PATH.
pkg-config should help, but it doesn't seem to be used. Since this is a special directory installation, maybe it requires ~/.brew/lib/pkgconfig to be appended to PKG_CONFIG_PATH?

just to add to this:
I'm also using homebrew. Using Crystal 0.18.7 (2016-07-27) I compiled with
crystal build path/to/file.cr --link-flags "/usr/local/opt/libevent/lib/libevent.a /usr/local/opt/libpcl/lib/libpcl.a /usr/local/opt/bdw-gc/lib/libgc.a"

gave the binary to another mac user and they got
dyld: Library not loaded: /usr/local/opt/bdw-gc/lib/libgc.1.dylib
  Referenced from: /Users/sskates/projects/utilities/changelog_manager
  Reason: image not found

it'd be -static and -l before each path.

@jhass specifying the static libraries should tell the linker to use them directly so it never has to search for shares libraries, shouldn't it?

I'm not 100% sure, I don't trust it anymore about that. But it won't replace the -lfoos Crystal inserts anyway, so the dynamic links would happen either way, no?

Not sure if this is related but when trying to install Crystal from Homebrew I get this:
./bin/crystal build --release  -o .build/crystal src/compiler/crystal.cr -D without_openssl -D without_zlib                   │src
dyld: Library not loaded: /usr/local/opt/bdw-gc/lib/libgc.1.dylib                                                             │t
  Referenced from: /private/tmp/crystal-lang-20170124-40239-k8zgde/crystal-0.20.5/boot/embedded/bin/crystal                   │test
  Reason: image not found                                                                                │test.html
/private/tmp/crystal-lang-20170124-40239-k8zgde/crystal-0.20.5/boot/bin/crystal: line 102: 40380 Abort trap: 6           "$INS│tpow
TALL_DIR/embedded/bin/crystal" "$@"                                                                                │webdav
make: *** [.build/crystal] Error 134

My brew is also in .brew and this has caused no issues in the past with anything else.  Played around with DYLD_FALLBACK_LIBRARY_PATH but not sure where I'd need to put it in the brew for it to work.

I'm also having trouble with this. I would like to link Crystal against /opt/local/lib for MacPorts (I have LIBRARY_PATH set to it), but it still links against /usr/lib. Perhaps Crystal should read LIBRARY_PATH from the environment and fallback to the hardcoded values?

Has there been any progress on this?

I've written a script that you can use upon a dynamically-linked Crystal binary, to find all its environment-specific dynamic dependencies and copy them to a lib folder.
It then rewrites the binary and its dylibs into relative links.
Thus, you can use this to make portable distributions that you can give to your friends. They won't need to install brew dependencies or anything.
https://gist.github.com/Birch-san/e84cfa3b93ffa104af2bd9a047d14109
Example:
# write some trivial Crystal source code into hello.cr
echo 'puts "Hello world!"' > "$MYDIR/hello.cr"
# build a Crystal binary with dynamic linkage
crystal build "$MYDIR/hello.cr"

# try it out
./hello
Hello world!

Before making our binary portable:
# look at all those dynamic links pointing into /usr/local
otool -L hello
hello:
	/usr/local/opt/bdw-gc/lib/libgc.1.dylib (compatibility version 5.0.0, current version 5.3.0)
	/usr/local/opt/libevent/lib/libevent-2.1.6.dylib (compatibility version 7.0.0, current version 7.2.0)
	/usr/lib/libpcre.0.dylib (compatibility version 1.0.0, current version 1.1.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.50.4)
	/usr/lib/libiconv.2.dylib (compatibility version 7.0.0, current version 7.0.0)

Prepare hello for distribution:
make_portable.sh hello

After making our binary portable:
# dynamic links are now specified relative to a runtime search path
otool -L hello lib/*.dylib
hello:
	@rpath/libgc.1.dylib (compatibility version 5.0.0, current version 5.3.0)
	@rpath/libevent-2.1.6.dylib (compatibility version 7.0.0, current version 7.2.0)
	/usr/lib/libpcre.0.dylib (compatibility version 1.0.0, current version 1.1.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.50.4)
	/usr/lib/libiconv.2.dylib (compatibility version 7.0.0, current version 7.0.0)
# and we've also fixed up the links in the local copies of the dylibs
lib/libcrypto.1.0.0.dylib:
	@rpath/libcrypto.1.0.0.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.0.0)
lib/libevent-2.1.6.dylib:
	@rpath/libevent-2.1.6.dylib (compatibility version 7.0.0, current version 7.2.0)
	@rpath/libcrypto.1.0.0.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.0.0)
lib/libgc.1.dylib:
	@rpath/libgc.1.dylib (compatibility version 5.0.0, current version 5.3.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.50.4)

# we've told our hello binary to expand @rpath at runtime to @loader_path/lib
# and @loader_path is the directory from which ./hello executes
# watch how it expands to point to a local dependency
DYLD_PRINT_RPATHS=1 ./hello
RPATH successful expansion of @rpath/libgc.1.dylib to: dist/lib/libgc.1.dylib
RPATH successful expansion of @rpath/libevent-2.1.6.dylib to: dist/lib/libevent-2.1.6.dylib
RPATH successful expansion of @rpath/libcrypto.1.0.0.dylib to: dist/lib/libcrypto.1.0.0.dylib
Hello world!

# more generally, we can see all dyld loads (not just ones based on expanding @rpath)
DYLD_PRINT_LIBRARIES=1 ./hello
dyld: loaded: dist/hello
dyld: loaded: /usr/lib/libpcre.0.dylib
dyld: loaded: dist/lib/libgc.1.dylib
dyld: loaded: /usr/lib/libSystem.B.dylib
dyld: loaded: dist/lib/libevent-2.1.6.dylib
dyld: loaded: /usr/lib/libiconv.2.dylib
…
dyld: loaded: dist/lib/libcrypto.1.0.0.dylib
Hello world!

The root of the problem in my opinion is that libraries distributed/compiled by brew are created with an absolute path as their install name.
Let's take a look at one of the libraries that Crystal binaries typically link against, libgc.dylib:
# ask libgc.dylib what its install name is (the LC_ID_DYLIB load command):
otool -D /usr/local/Cellar/bdw-gc/7.6.6/lib/libgc.dylib
/usr/local/Cellar/bdw-gc/7.6.6/lib/libgc.dylib:
/usr/local/opt/bdw-gc/lib/libgc.1.dylib

Its install name is an absolute path, /usr/local/opt/bdw-gc/lib/libgc.1.dylib. So this is the path that gets written into our Crystal binary's LC_LOAD_DYLIB command when we dynamically link to libgc.dylib.
Works fine if people install our Crystal application via brew, but kills any other distribution method.
Really it'd be nice if brew could distribute/build libraries such that they had relative install names like @rpath/libgc.1.dylib. And that's easy; it can be done trivially at build-time (gcc -install_name<EMAIL_ADDRESS>or post-build using install_name_tool -id<EMAIL_ADDRESS>@rpath-relative install names would mean that all brew libraries would link to each other using relative paths, and that our Crystal binary could also link to any brew library using an @rpath-relative path.
Our Crystal binary can choose what we want to expand @rpath to (this is a list of expansions, so it gives you a lot of flexibility), and our only distribution job is to ensure that we've copied libraries somewhere on the rpath, and included that folder in our release.

@Birch-san Have you made an issue on homebrew upstream? This sounds like something they can fix or investigate.
Perhaps someone can patch the homebrew formula to always provide the correct LIBRARY_PATH to user too. Or at least start the discussion with the homebrew devs about how they configure the environment. I don't have OSX so it's hard for me to contribute much to homebrew...
Anyway, thanks for the super detailed analysis marisa-san!

@RX14 yes, I think I've seen this happen enough times that it's worth raising with Homebrew.
Issue opened:
https://github.com/Homebrew/brew/issues/4371

Perhaps someone can patch the homebrew formula to always provide the correct LIBRARY_PATH to user too. Or at least start the discussion with the homebrew devs about how they configure the environment. I don't have OSX so it's hard for me to contribute much to homebrew...

Ah, this brings us back to the original topic. OP has a build-time linking failure. this is actually completely unrelated to the dyld: Library not loaded problem (and the solution I proposed to that), which is a run-time dynamic linking failure (caused by distributing the software in a non-portable way).
My thoughts on the build-time environment problem:
====
It's weird that the crystal linker is hard-coded with a few favourite library search paths. What if you disagreed with the order of precedence? What about Windows support?
I suspect the reason you default to these is because you're guessing where libgc, libevent and libcrypto were installed.
There's a cheat: you could read your own load commands:
# find the directory containing the libgc dylib to which crystal is linked
otool -L `which crystal` | awk '/\/libgc\./ {print $1}' | awk -F'/' 'sub(FS $NF,x)'

Doing it recursively is harder (and necessary to find libcrypto, which is a dependency of libevent).
Or you could ask pkg-config (though that may need its env configuring, which gives you the same problem).
Or you could ship those libraries inside crystal's directory (so you can find them relative to a known location).
Or you could say there's nothing crystal-specific about those libraries, so really the user should tell you where they're installed.
If brew exists, then adding -L$(brew --prefix)/lib automatically might not be completely insane. But beware: it's hard for the user to remove that if they dislike it.
====
I wouldn't recommend editing LIBRARY_PATH. It's an env var, so it affects the whole process tree. When really you just want to talk to one subprocess. --link-flags -L has a much clearer guarantee of "which subprocesses will this be passed to". More importantly: LIBRARY_PATH has lower precedence than -L flags, so you can't use it to say "prefer this nightly build"
In any case, it's best not to create a permanent "environment management" burden for the user.
====

In a properly configured system, crystal shouldn't have to specify any linker paths at all

Build is most sane when it's configured in a project-specific manner, rather than being sensitive to environment. Relying on environment gets non-deterministic in ways that are hard to catch — i.e. when the same environment is shared (and updated) by a variety of projects, or when multiple versions of the same library exist in your search path.
So, I wouldn't say that "your system is only correctly configured once your LIBRARY_PATH is populated". I'd prefer an empty LIBRARY_PATH.

NixOS modifies LIBRARY_PATH in it's linker wrapper to fix this, as it should.

Okay, interesting. It could be a harsh reality of developing wrappers: environment is a more convenient way to affect subprocesses than building an API and routing the options.
====
I like the idea of a ~/.crystal-config. And maybe project-specific overrides (at ./.crystal-config). I think it actually solves all our problems:

sensible defaults can be instantiated here instead of being hardcoded
user doesn't need to pass in explicit flags on every build

To tie it all together: I reckon the brew formula should create for you a ~/.crystal-config, which specifies one default library search path: $(brew --prefix)/lib.
Other platforms could instantiate it with /usr/lib and /usr/local/lib as a "reasonably sensible" effort.

I don't know why the crystal compiler has any hardcoded library paths either, it looks like a hack to me. Crystal really shouldn't have to worry about the library path or where libraries are at all. We should be able to tell the system linker what libraries we want linked, either through using pkg-config or -lfoo, and which ones we want to be static/dynamic.
I consider it not crystal's job to tell the system linker where to find stuff. If homebrew installs libraries to a path which is nonstandard, it should be homebrew that works out how to inform the linker. So homebrew absolutely should add to LIBRARY_PATH. And it should do it globally, in /etc/profile or wherever, not just in a wrapper for crystal. But I think the homebrew developers wont accept that for whatever reason, so a wrapper specifically for crystal seems the way forward.

Seems working here, what's a test file (or steps) that repro's it for me?  Thanks.

This can probably be closed.


where are you selecting for layers 4-14 in Freeprompt

The paper discusses the selection of layers 4-14 of Self attention in the copying. I can't seem to find where in the code it is actually done. It appears to em that the 16 layers are being copied?
Also, is it possible to share the code for the Ablation in Figure 10 in the paper?
Many thanks.

I have the same question?


Add team retrospectives from 2015-11-04

@zachlatta Do you know what could be failing these tests? https://circleci.com/gh/hackedu/meta/99

Rebase the latest changes from master into the branch for this PR.


.ban no longer working

Heyo. I have a Nadeko bot on autoupdate stable build and we have an issue with the latest version this morning. The .ban command is not working currently giving me this error:
17:25:44 CommandHandler | System.NullReferenceException: Object reference not set to an instance of an object.
   at Discord.WebSocket.SocketGuildChannel.GetPermissionOverwrite(IRole role) in C:\Users\bartd\Desktop\Nadeko\NadekoBot\Discord.Net\src\Discord.Net.WebSocket\Entities\Channels\SocketGuildChannel.cs:line 71
   at Discord.Permissions.ResolveChannel(IGuild guild, IGuildUser user, IGuildChannel channel, UInt64 guildPermissions) in C:\Users\bartd\Desktop\Nadeko\NadekoBot\Discord.Net\src\Discord.Net.Core\Utils\Permissions.cs:line 128
   at Discord.WebSocket.SocketTextChannel.<get_Users>b__10_0(SocketGuildUser x) in C:\Users\bartd\Desktop\Nadeko\NadekoBot\Discord.Net\src\Discord.Net.WebSocket\Entities\Channels\SocketTextChannel.cs:line 23
   at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
   at System.Collections.Generic.EnumerableHelpers.ToArray[T](IEnumerable`1 source, Int32& length)
   at System.Collections.Generic.EnumerableHelpers.ToArray[T](IEnumerable`1 source)
   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
   at System.Collections.Immutable.ImmutableArray.CreateRange[T](IEnumerable`1 items)
   at Discord.WebSocket.SocketTextChannel.get_Users() in C:\Users\bartd\Desktop\Nadeko\NadekoBot\Discord.Net\src\Discord.Net.WebSocket\Entities\Channels\SocketTextChannel.cs:line 23
   at Discord.WebSocket.SocketGuildChannel.Discord.IChannel.GetUsersAsync(CacheMode mode, RequestOptions options) in C:\Users\bartd\Desktop\Nadeko\NadekoBot\Discord.Net\src\Discord.Net.WebSocket\Entities\Channels\SocketGuildChannel.cs:line 156
   at Discord.Commands.UserTypeReader`1.<Read>d__0.MoveNext() in C:\Users\bartd\Desktop\Nadeko\NadekoBot\Discord.Net\src\Discord.Net.Commands\Readers\UserTypeReader.cs:line 15
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Discord.Commands.ParameterInfo.<Parse>d__30.MoveNext() in C:\Users\bartd\Desktop\Nadeko\NadekoBot\Discord.Net\src\Discord.Net.Commands\Info\ParameterInfo.cs:line 65
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Discord.Commands.CommandParser.<ParseArgs>d__1.MoveNext() in C:\Users\bartd\Desktop\Nadeko\NadekoBot\Discord.Net\src\Discord.Net.Commands\CommandParser.cs:line 113
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Discord.Commands.CommandInfo.<ParseAsync>d__35.MoveNext() in C:\Users\bartd\Desktop\Nadeko\NadekoBot\Discord.Net\src\Discord.Net.Commands\Info\CommandInfo.cs:line 91
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at NadekoBot.Services.CommandHandler.<ExecuteCommand>d__30.MoveNext() in C:\Users\bartd\Desktop\Nadeko\NadekoBot\src\NadekoBot\Services\CommandHandler.cs:line 442
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at NadekoBot.Services.CommandHandler.<TryRunCommand>d__28.MoveNext() in C:\Users\bartd\Desktop\Nadeko\NadekoBot\src\NadekoBot\Services\CommandHandler.cs:line 385
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at NadekoBot.Services.CommandHandler.<>c__DisplayClass27_0.<<MessageReceivedHandler>b__0>d.MoveNext() in C:\Users\bartd\Desktop\Nadeko\NadekoBot\src\NadekoBot\Services\CommandHandler.cs:line 268
17:25:47 CommandHandler | Error in CommandHandler
17:25:47 CommandHandler | System.NullReferenceException: Object reference not set to an instance of an object.
   at Discord.WebSocket.SocketGuildChannel.GetPermissionOverwrite(IRole role) in C:\Users\bartd\Desktop\Nadeko\NadekoBot\Discord.Net\src\Discord.Net.WebSocket\Entities\Channels\SocketGuildChannel.cs:line 71
   at Discord.Permissions.ResolveChannel(IGuild guild, IGuildUser user, IGuildChannel channel, UInt64 guildPermissions) in C:\Users\bartd\Desktop\Nadeko\NadekoBot\Discord.Net\src\Discord.Net.Core\Utils\Permissions.cs:line 128
   at Discord.WebSocket.SocketTextChannel.<get_Users>b__10_0(SocketGuildUser x) in C:\Users\bartd\Desktop\Nadeko\NadekoBot\Discord.Net\src\Discord.Net.WebSocket\Entities\Channels\SocketTextChannel.cs:line 23
   at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
   at System.Collections.Generic.EnumerableHelpers.ToArray[T](IEnumerable`1 source, Int32& length)
   at System.Collections.Generic.EnumerableHelpers.ToArray[T](IEnumerable`1 source)
   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
   at System.Collections.Immutable.ImmutableArray.CreateRange[T](IEnumerable`1 items)
   at Discord.WebSocket.SocketTextChannel.get_Users() in C:\Users\bartd\Desktop\Nadeko\NadekoBot\Discord.Net\src\Discord.Net.WebSocket\Entities\Channels\SocketTextChannel.cs:line 23
   at Discord.WebSocket.SocketGuildChannel.Discord.IChannel.GetUsersAsync(CacheMode mode, RequestOptions options) in C:\Users\bartd\Desktop\Nadeko\NadekoBot\Discord.Net\src\Discord.Net.WebSocket\Entities\Channels\SocketGuildChannel.cs:line 156
   at Discord.Commands.UserTypeReader`1.<Read>d__0.MoveNext() in C:\Users\bartd\Desktop\Nadeko\NadekoBot\Discord.Net\src\Discord.Net.Commands\Readers\UserTypeReader.cs:line 15
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Discord.Commands.ParameterInfo.<Parse>d__30.MoveNext() in C:\Users\bartd\Desktop\Nadeko\NadekoBot\Discord.Net\src\Discord.Net.Commands\Info\ParameterInfo.cs:line 65
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Discord.Commands.CommandParser.<ParseArgs>d__1.MoveNext() in C:\Users\bartd\Desktop\Nadeko\NadekoBot\Discord.Net\src\Discord.Net.Commands\CommandParser.cs:line 113
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Discord.Commands.CommandInfo.<ParseAsync>d__35.MoveNext() in C:\Users\bartd\Desktop\Nadeko\NadekoBot\Discord.Net\src\Discord.Net.Commands\Info\CommandInfo.cs:line 91
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at NadekoBot.Services.CommandHandler.<ExecuteCommand>d__30.MoveNext() in C:\Users\bartd\Desktop\Nadeko\NadekoBot\src\NadekoBot\Services\CommandHandler.cs:line 442
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at NadekoBot.Services.CommandHandler.<TryRunCommand>d__28.MoveNext() in C:\Users\bartd\Desktop\Nadeko\NadekoBot\src\NadekoBot\Services\CommandHandler.cs:line 385
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at NadekoBot.Services.CommandHandler.<>c__DisplayClass27_0.<<MessageReceivedHandler>b__0>d.MoveNext() in C:\Users\bartd\Desktop\Nadeko\NadekoBot\src\NadekoBot\Services\CommandHandler.cs:line 268```

That's a bug that occasionally happens, seems to be related to the old discord.net version we're using, you can reopen this issue if it still continues happening when 1.4 is released, which uses newest discord.net.

Running version 1.6.4 same issue still occurring
15:34:37 NadekoBot | Starting NadekoBot v1.6.4 15:34:37 NadekoBot | Shard 0 logging in ... 15:34:38 NadekoBot | Shard 0 logged in. 15:34:38 NadekoBot | Shard 0 loading services... 15:34:39 NadekoStrings | Loaded 23 languages in 0.07s 15:34:39 ServiceProvider | All services loaded in 0.50s 15:34:39 NadekoBot | Shard 0 connected in 2.82s 15:34:40 NadekoBot | Shard 0 ready. 15:34:45 SelfService | Created 3 out of 3 owner message channels. 15:35:13 CommandHandler | Error in CommandHandler 15:35:13 CommandHandler | System.NullReferenceException: Object reference not set to an instance of an object.    at Discord.WebSocket.SocketGuildChannel.GetPermissionOverwrite(IRole role)    at Discord.Permissions.ResolveChannel(IGuild guild, IGuildUser user, IGuildChannel channel, UInt64 guildPermissions)    at Discord.WebSocket.SocketTextChannel.<get_Users>b__10_0(SocketGuildUser x)    at System.Linq.Enumerable.WhereEnumerableIterator1.MoveNext()
at System.Collections.Generic.EnumerableHelpers.ToArray[T](IEnumerable1 source, Int32& length)    at System.Collections.Generic.EnumerableHelpers.ToArray[T](IEnumerable1 source)
at System.Collections.Immutable.ImmutableArray.CreateRange[T](IEnumerable1 items)    at Discord.WebSocket.SocketTextChannel.get_Users()    at Discord.WebSocket.SocketGuildChannel.Discord.IChannel.GetUsersAsync(CacheMode mode, RequestOptions options)    at Discord.Commands.UserTypeReader1.d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Discord.Commands.ParameterInfo.d__33.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Discord.Commands.CommandParser.d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Discord.Commands.CommandInfo.d__38.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at NadekoBot.Services.CommandHandler.d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at NadekoBot.Services.CommandHandler.d__44.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at NadekoBot.Services.CommandHandler.d__43.MoveNext()`


Improve read throughput with larger worker side buffer

Current Alluxio worker uses gRPC stream isReady() signal for data path flow control. gRPC has a fixed buffer size of 32KB and is not configurable(See https://github.com/grpc/proposal/pull/135). This change work around this limitation by providing our own configurable flow control(client ack). In benchmark this shows 30% improvement on domain socket read with small number of concurrent streams.

@calvinjia @gpang PTAL.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Alluxio-Pull-Request-Builder/2508/
Test PASSed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Alluxio-Pull-Request-Builder/2515/
Test FAILed.

Merged build finished. Test FAILed.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Alluxio-Pull-Request-Builder/2521/
Test PASSed.

@calvinjia Thanks! I updated the PR to address your comments. PTAL.

alluxio-bot, check this please

Thanks @gpang! I updated the PR to address your comment. PTAL.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Alluxio-Pull-Request-Builder/2571/
Test PASSed.

alluxio-bot, merge this please


Improve syntax for passing Result as a parameter to magics

Is your feature request related to a problem? Please describe.
Currently one can pass a Result literal as a parameter to a magic command using integer literals: 1 for One and any other literal for Zero. I think it's confusing, since it's inconsistent with both Q# syntax and the syntax of passing parameters via the command line.
Describe the solution you'd like
Magic commands should support passing a Result literal using Zero and One literals.
I would also suggest limiting the integer literals supported to 0 and 1.

Changes should be made to ResultConverter to update this behavior.


Update DOModelDeployer for CPD 4.0

In CPD 4.0 (on-prem) with git integration, deployment of a DO model cannot be completed through the CPD UI.
In particular, the blue 'Promote to Deployment' button doesn't exist. Dev confirmed this feature is not yet supported.
The DOModelDeployer was developed for a similar situation in the past. However, it is based on the deprecated packages watson_machine_learning_client and dd_scenario.
Update the DOModelDeployer to use the current decision_optimization_client and ibm_watson_machine_learning.
Test in CPD4.0

In progress. dse-do-utils v<IP_ADDRESS> contains a working version for CPD v4.0.3

New: DOModelDeployerLocal (v<IP_ADDRESS>) for use from a local workstation (not CP4D). Tested with SaaS


Ember-Core / H2Stream: avoid wrapping in Chunk

The Queue in the H2Stream is always receiving elements as singleton
chunks, but we can just avoid those and send them directly.

On Discord Chris explains:

Because they can be passed in multiples. For example the header block which must be sent as one continuous block.
Any interspersed frames are a protocol violation. The chunk allows us to guarantee that semantic

https://discord.com/channels/632277896739946517/839254871646404638/1099703835670360117

@armanbilge Yes, but IIUC by changing the queue consumer to read its elements one by one, and keeping the queue order, that should still be correct.

Detailed discussion in https://discord.com/channels/632277896739946517/839254871646404638/1101885838893260811
The gist is that the H2 is not finished, and although current code does not make use of multi-item chunks, those are intended to be added later on.


The Flatpacker 1001 can now make flatpacks for computers.

About the PR
Computer boards can now be inserted into the flatpacker 1001 and used to create computer flatpacks just like with machine boards.
They cost 2 glass sheets + the default per machine cost.
Why / Balance
A lot of useful things on the station that one would want to flatpack are computers. Setting up xenoarchaeology, for example, requires a computer.
Technical details

Altered the MachineFlatpacker prototype to accept computer boards as well as machine boards.
Moved ComputerBoardComponent from Content.Sever to Content.Shared.
Altered SharedFlatpackSystem to add method GetFlatpackCreationCostForComputer(...), which returns the cost of creating a computer flatpack (2 glass sheets + default per machine cost).
Altered FlatpackCreatorMenu.xaml.cs to handle the situation in which the board contained within the Flatpacker has a ComputerBoardComponent instead of a MachineBoardComponent, using the GetFlatpackCreationCostForComputer(...) method instead of the GetFlatpackCreationCost(...) method.
Altered SharedFlatpackSystem methods which concern the cost of flatpack creation to work with computer boards instead of just machine boards, via the GetFlatpackCreationCostForComputer(...) method.
Duplicated SetupFlatpack(...) method in SharedFlatpackSystem to create overloaded method which takes an argument of Entity<ComputerBoardComponent> - this method sets up a flatpack and gets the protoype from the ComputerBoardComponent instead of the MachineBoardComponent.

Media
https://github.com/space-wizards/space-station-14/assets/66873282/bbc11aa7-3be5-4c38-918c-e9594525e4f6

[X] I have added screenshots/videos to this PR showcasing its changes ingame, or this PR does not require an ingame showcase

Breaking changes

ComputerBoardComponent has been moved from Content.Server to Content.Shared.
SharedFlatpackSystem has new method GetFlatpackCreationCostForComputer(...).
SharedFlatpackSystem has new overloaded method for SetupFlatpack.

Changelog
:cl:

tweak: The flatpacker 1001 can now create flatpacks for computers.

Good first pr! Left a few comments, mostly concerning code duplication.

Should I remove the plastic cost for printing a computer and have it be just 5 steel and 2 glass?

I'd increase mat cost overall for flatpack consoles since they all share the same recipe anyways

fyi, after completing review, you can simply hit the "resolve" button on each of the comments. That just lets us maints know you actually saw the review and did it.

liltenhead be like: noooooooooo :trollface:


Scratchblocks Export

This PR adds an IO file for exporting to the scratchblocks format, used on the official Scratch discussion forums and as a web-embeddable library. It resolves #11.
Changes in this PR depend on #12 and #13; if those hasn't been merged yet, you can preview the changes made in this PR by looking at c0edb7df720097b9620bc5100a6f44b5bfe6e244 and later commits.
The new API is (project).toScratchblocks, returning an object {[targetName]: "when green flag clicked..."}.
Snapshot tests should still be added before this PR is merged.

Very cool! Be sure to request a review from me (if that's a thing you're able to do) when you think this PR is ready. 👍

Thanks! Pretty sure I can't request a review unless I'm marked as a collaborator on the repo (which I'm not :P). Irregardless, you'll prolly get notified when I push the tests and mark this as ready for review :P

@PullJosh Alright, ready for review! There's a new PR as well - #16 - which should be merged before this.

Thanks a bunch for the thorough review! I've gone through and fixed all those issues in the commits above. (NB: my git-fu's not totally sharp; 08dd6d768857e201cf829a4d497434b7649bff84 contains some code meant for 992d70bf89c12bfdbfb379eb6e40c81fb83a242b, and db1179a00a569d190077d1b4bdeb257a3ffd0c4f should probably have been merged with that commit too. Sorry for the slightly mixed up commit history as a result! :P)


Stock Wrangle: Singular <> Plural Pairs

Often data contains singular or plural versions of the same words. This makes exact matching and remove words hard. Would be useful to have a stock wrangle that can standardize words to all singular, or plural, or both.
I'm sure tehre are plenty of packages out there but here are 2 that jump[ed out:

NLTK
Inflect

Inflect can convert numbers conveyed as words into number. We should offer this as a Wrgl too. (NLTK may also have that feature)


Added spine typings and sound events

It is a WIP, but should be a lot better for future development.
Take a quick review and check if I did not write anything dumb

Hello ! Thanks for your contribution.
All this repository have been generated with an automated tool ( https://github.com/sebbernery/haxe-phaser3-generator ).
Did you write all of this manually or did you used another tool ? In any case I need to adapt my tool to not overwrite your work when regenerating the bindings. I'll think about it.
At first look, those bindings seems perfectly fine to me, I'll check that more deeply at the end of the week.
Have a nice day !
Sébastien.


⚠ Samsung has degraded performance

In 9a9c12f, Samsung (https://samsung.com) experienced degraded performance:

HTTP code: 200
Response time: 2128 ms

Resolved: Samsung performance has improved in f3a06a6.


Add support for typescript plugins (.ts)

i want to work on this issue. please assign me this work


Add some code examples to explain the usage of the format function in the String .

Add some code examples to the format function of the String.

Good. Now, please squash your commits.

OK, this should be it. Now just squash your commits again.

OK, this should be it. Now just squash your commits again.

Yeah, But that may have to make a force-push, it doesn't seem to be  easy to see the details.

Yeah, but that may have to make a force-push, it doesn't seem to be easy to see the details.

With small PRs like this that doesn't really matter.

Well, indeed, more examples can refer to the tutorial.

Perhaps, I should state that this is the recommended usage.


Comments are outdented incorrectly in script blocks

Before You File a Bug Report Please Confirm You Have Done The Following...

[X] I have tried restarting my IDE and the issue persists.
[X] I have updated to the latest version of the packages.

What version of ESLint are you using?
8.46.0
What version of eslint-plugin-svelte are you using?
2.32.4
What did you do?
I linted the following outdented code using the enclosed ESLint configuration.
<script>

function demo1() {
// This should be indented with 4 spaces
console.log('ok');
}

function demo2() {
// This should be indented with 4 spaces
}

function demo3() {
// This should be indented with 4 spaces
// Another line
console.log('ok');
}

function demo4() {
// This should be indented with 4 spaces
// Another line
}

demo1();
demo2();
demo3();
demo4();

</script>

{
  "parserOptions": {
    "ecmaVersion": 2020,
    "sourceType": "module"
  },
  "env": {
    "browser": true,
    "node": true,
    "es6": true
  },
  "ignorePatterns": [
    "/expected.svelte",
    "/original.svelte"
  ],
  "extends": [
    "eslint:recommended",
    "plugin:svelte/recommended"
  ],
  "plugins": [
    "svelte"
  ],
  "rules": {
    "svelte/indent": "error"
  }
}

What did you expect to happen?
I expected ESLint to indent the code correctly; in my opinion, that is:
<script>

  function demo1() {
    // This should be indented with 4 spaces
    console.log('ok');
  }

  function demo2() {
    // This should be indented with 4 spaces
  }

  function demo3() {
    // This should be indented with 4 spaces
    // Another line
    console.log('ok');
  }

  function demo4() {
    // This should be indented with 4 spaces
    // Another line
  }

  demo1();
  demo2();
  demo3();
  demo4();

</script>

What actually happened?
Fixing it by running eslint --fix changed it to the following:
<script>

  function demo1() {
    // This should be indented with 4 spaces
    console.log('ok');
  }

  function demo2() {
  // This should be indented with 4 spaces
  }

  function demo3() {
    // This should be indented with 4 spaces
    // Another line
    console.log('ok');
  }

  function demo4() {
  // This should be indented with 4 spaces
    // Another line
  }

  demo1();
  demo2();
  demo3();
  demo4();

</script>

Link to GitHub Repo with Minimal Reproducible Example
Repository: https://github.com/garraflavatra/svelte-eslint-comment-repro.
The original code is in original.svelte, the expected result is in expected.svelte, and the actual output is in actual.svelte. The .eslintrc.json file contains the used (minimal) configuration.
Additional comments
I tried looking for similar issues before creating this one, but found none.
Thank you for maintaining this plugin. I use it frequently, and this is the only issue I've encountered.

In objects, this bug only happens on the first commented out key.
Here, it will complain only about the c key.
Repro
<script>
  /* eslint svelte/indent: "error" */
  const obj1 = {
    a: '',
    b: '',
    // c: '',
    // d: '',
    // e: '',
  }
</script>

EXPECTED: 'svelte/indent' should not complain about indent level.
ACTUAL: 'svelte/indent' has one complaint. It complains about the indent level for line number 6 (the line containing the c key). 'svelte/indent' wants line number 6 to be indented one level less than line number 5 and one level less than line number 7.

I tried creating a playground link but the indent rule doesn't work at all there (I disabled all rules except svelte/indent). But if you paste my snippet into the rule's example page you can reproduce the issue.


Request for Adapting Projects with Similarities to OpenAI Interfaces

Dear developers,
Hello! I would like to suggest an enhancement and kindly request your assistance. Could you please consider adapting certain projects that resemble OpenAI interfaces? Specifically, I am referring to projects such as LocalAi, text-generation-web-ui's REST API interface (which I primarily use for integrating third-party apps, as it automatically adapts various model prompts), and llama-cpp-python. These projects share the characteristic of being unable to utilize OpenAI's function directly. However, if we could incorporate the existing codes with slight modifications, it would greatly simplify the process. Currently, the closest approach I have found is to utilize the LlamaReplicate class for the necessary modifications.
Thank you for your attention to this matter. Your amazing work is greatly appreciated!
Best regards,
dbian

Hi dbian
Thanks for the suggestion. So far, I have not planned to add more models, as we as of now already have the best closed and the best open-source model integrated. The performance of llama, since it was not fine-tuned for using tools like interpreters, is already at the limit of what I think is useful. So for other models, I would first want to build a prototype and test them, before just adding more models.
Very open to change my mind if I see such a prototype, which yields useful results in the current interpreter setup :).
Cheers,
Silvan


Include zookeepercli in the image

include zookeepercli (https://github.com/outbrain/zookeepercli) in the image
examples:
docker exec -it zookeeper zookeepercli --servers localhost -c ls /zookeeper
docker run --rm -it --entrypoint zookeepercli zookeeper --servers zkserver -c ls /zookeeper
Currently, zookeepercli doesn't have all of the acl support we need but hopefully it will soon.

For now, this is pinned to a branch in my fork of zookeepercli. If/when https://github.com/outbrain/zookeepercli/pull/12 is merged, we can start using the original zookeepercli repo.
Also, this pulls in consul-template v0.10.0 from the base image asteris/consul-template:latest. This version has a bug (https://github.com/hashicorp/consul-template/issues/321) where it ignores -ssl-verify. You can now host mount a volume that contains valid certificates to get around this.

Updated for the official outbrain repo


Context Menu's functionality is not obvious

I see there is an option to activate the context menu in the settings, but not sure what it does and how to see the menu.

Thanks for the response.
It might need to tooltip, or an explanation of some sort in the option's page.


[EPH] Set the values of leaseDuration and leaseRenewInterval after validation

Since we have leaseDuration  and leaseRenewInterval  in both the places options and leaseManager:

If user will provide both then we will throw error.
If user will provide leaseManager, we will set leaseDuration  and leaseRenewInterval from the provided leaseManager.
If leaseDuration  and leaseRenewInterval  is undefined then we will set the defaults.

For more context refer: https://github.com/Azure/azure-sdk-for-js/issues/4363#event-2501651194

If possible please add some tests.

@amarzavery

error is thrown when both leaseDuration and leaseRenewInterval and leaseManager are provided

Why is it important to throw an error in this case?

@ramya-rao-a

error is thrown when both leaseDuration and leaseRenewInterval and leaseManager are provided

Why is it important to throw an error in this case?

If both are provided then what will we use eventually? leaseDuration and leaseRenewInterval  or leaseDuration  and leaseRenewInterval from the LeaseManager ?

What do you guys think if we remove _eitherLeaseManagerOrleaseDurationAndRenewal(options); method with the current changes?
Behavior if we remove _eitherLeaseManagerOrleaseDurationAndRenewal(options); method with the current changes:

If both are provided(leaseDuration and leaseRenewInterval or leaseDuration and leaseRenewInterval from the LeaseManager) - We will set these from the leaseManager.

If user doesn't pass any of leaseManager, leaseDuration and  leaseRenewInterval then we will set defaults.

Any thoughts @ramya-rao-a @amarzavery  ?

@ShivangiReja - Yes that should also work. Make sure to document this properly in the source code documentation for leaseDuration and leaseRenewal options.

@amarzavery

If both are provided then what will we use eventually? leaseDuration and leaseRenewInterval or leaseDuration and leaseRenewInterval from the LeaseManager ?

I would imagine we pick the values provided in the lease manager and update the docs on the leaseDuration and leaseRenewInterval in options that the if a lease manager is provided then these values will be ignored
@ShivangiReja Regarding your suggestion.... I believe leaseRenewInterval gets used outside of the lease manager in the partitionPump.ts file. So, we need to ensure that code path works in all cases as well


Automatically detect diagonal / sparse parameters

FORCES Pro has support for specially structured sparse parameters (see the FORCES documentation for details). It would be great if Y2F could identify this structure and take advantage of it when generating the solver.

That's a good idea. At least diagonal parameters for the quadratic cost should be easy to implement using the current data structures.

Y2F now supports diagonal parameters. It automatically checks if a parametric Hessian (quadratic cost) of a stage is diagonal, and uses diagonal FORCES parameters if possible. (see a8def660f7f4f18cd6a0c928aee8748e4360d875)
Regarding general sparse parameters: It is not clear, when exactly sparse parameters should be used. We would need to introduce some kind of measure of sparsity. Depending on this measure, a parameter would be added as a full parameter or as a sparse parameter. Another option would be to let the user decide using a setting.

That's great! I think we should also exploit sparsity in the polytonic constraints (A*x <= b) if say the density is below a threshold d, with d=0.3 or similar being the default option (which can be overridden by the user, d=0.0 would switch off sparsity and d=1.0 would always enforce sparsity)

There are different situations in which sparse inequalities can arise:

The user specifies a constraint A*x <= b and knows A will be sparse. In this case the user also has to provide the sparsity pattern.
The sparsity pattern emerges from the decomposition Y2F performs in which case the sparsity pattern is known to Y2F.
A combination of the two cases.

Sparse polytopic were added with commit 77d0df8f3e433a5e0f9666e76665814151a87311. The bound for the sparsity of a matrix was fixed at 30%, i.e. matrices with more than 70% zeros are regarded as sparse. This bound should be adjusted after we have more experience with the type of problems getting solved by Y2F. Making the bound a setting for users might also be a good a idea.


Stay aware of electron chromium update to offer --headless w/o xvfb

Chromium ships with a --headless starting in version 59. Electron 1.8.1 (in pre-release as of 2017/10/11) ships with Chromium 59. So our days of having to use xvfb might be numbered :tada:
But, this won't happen now. I tried<EMAIL_ADDRESS>in this gist, but looks like the --headless option (and additional required flags) aren't compatible with WebGL. If your interested, pull down that gist and run npm start -- gl3d_bunny - you should see electron hanging and failing to generate an image. In contrast, for regular SVG graphs e.g. npm  start -- 10, headless seems to work ok.
See https://github.com/electron/electron/issues/228 for more info.

Seems like a duplicate of https://github.com/electron/electron/issues/228


Randomize PartitionedOutput message sizes and add instrumentation

Calculates a target message size for PartitionedOutput based on the
page buffer size config. Randomize this by -30% - +20% so that all
destinations do not become ready at the same time.
Adds counters for message fetch delay in destination buffers.

Thank you, Masha. Edited the PR. The point of setting the target size at each batch is that all destinations get to the same average but that the ready times are staggered for each.
The next part of optimizing shuffle is to measure how long messages spend in the ready state in the buffer manager.
This runs in the existing tests and has been tested on a cluster. Will rerun some big shuffles before landing.
From: Maria Basmanova @.>
Sent: Wednesday, April 27, 2022 1:56 PM
To: facebookincubator/velox @.>
Cc: oerling @.>; Mention @.>
Subject: Re: [facebookincubator/velox] Randomize PartitionedOutput message sizes and add instrumentation (PR #1261)
@mbasmanova commented on this pull request.
@oerling https://github.com/oerling  Looks good overall, but how did you test this change?

In velox/exec/PartitionedOutput.h https://github.com/facebookincubator/velox/pull/1261#discussion_r860231427 :

#include "velox/exec/Operator.h"
#include "velox/exec/PartitionedOutputBufferManager.h"

+DECLARE_int32(min_partitioned_output_buffer_mb);
GFlags are hard to keep track of. Can we use query config instead?

In velox/exec/PartitionedOutput.h https://github.com/facebookincubator/velox/pull/1261#discussion_r860231906 :

@@ -72,6 +77,12 @@ class Destination {
void
serialize(const RowVectorPtr& input, vector_size_t begin, vector_size_t end);

void setTargetSizePct() {

Would you document this method and explain why don't we flush at 100% all the time?

In velox/exec/PartitionedOutput.h https://github.com/facebookincubator/velox/pull/1261#discussion_r860232581 :

@@ -82,6 +93,18 @@ class Destination {
vector_size_t row_{0};
std::unique_ptr current_;
bool finished_{false};

// Flush accumulated data to buffer manager after reaching this
// percentage of target bytes or rows. This will make data for
// different destinations ready at different times to flatten a
// burst of traffic.
int32_t targetSizePct_;

// Number of rows to accumulate before flushing.
int32_t targetNumRows_;

// Generator for varying target batch size. Randomly seededat construction.

typo: "seededat" -> "seeded at"

In velox/exec/PartitionedOutput.cpp https://github.com/facebookincubator/velox/pull/1261#discussion_r860234812 :

@@ -240,7 +245,7 @@ RowVectorPtr PartitionedOutput::getOutput() {
for (auto& destination : destinations_) {
bool atEnd = false;
blockingReason_ = destination->advance(

     kMaxDestinationSize,

     maxBufferedBytes_ / destinations_.size(),

I wonder if it is cleaner to specify the max-size in destination's constructor and move the logic of randomizing the limit to a single place which creates all the destinations.

In velox/exec/PartitionedOutput.cpp https://github.com/facebookincubator/velox/pull/1261#discussion_r860236097 :

@@ -86,6 +90,7 @@ BlockingReason Destination::flush(
current_->flush(&stream);
current_.reset();
bytesInCurrent_ = 0;

setTargetSizePct();

Why do we need to call this again?
—
Reply to this email directly, view it on GitHub https://github.com/facebookincubator/velox/pull/1261#pullrequestreview-955519509 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AKPPPT567XBYE65AHBT2OMDVHGSUPANCNFSM5RL2JFCQ .
You are receiving this because you were mentioned.Message ID: @.***>

Updated the description.

@oerling Based on your replies, I assume this PR does not add any instrumentation. I edited the title accordingly.


fix: compatible with powershell core 6.1.x

concfg [help] command now is compatible with powershell core 6.1.x
use Set-PSReadLineOption -Colors @{} to change token colors. cf. PSReadLine doc

@lukesampson would you merge this pull-request?

Sorry I missed that and thanks for the reminder.


Arbitrary Justification read exploit

Teacher test account username and password is ****:****, very insecure and could be cracked very quickly.

It's literally in application.properties. Regardless, the test user is almost exclusively read-only.

You can read anyone's personal discussion with a teacher. Not really sure why you don't care about this..


The address popup doesn't work when the debugger is ON

Is there any workaround or anything to make it pop up the address when the debugger is ON.

If you use debug, it so slow, so you should be wait for a long time.


Perform accessibility testing when PRs are published, in addition to production merges.

At the moment, accessibility tests are only performed when PRs are pushed to production, and not when they are initially created.
This means that developers will be surprised by test failures when publishing occurs, which is really too late in the development cycle.
I propose performing the same tests when PRs are created, so that accessibility issues can be caught earlier.

Tests have been added to the PR build process.  This will slow down PR builds by a little over a minute, but will enable us to catch accessibility issues more quickly and avoid surprises during the publishing process.


Update README.md

Fix typo

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

sha=1c1830e5d5c28880750ecf05cba1cedf826c3e51

Thanks for contribution again, changes have been merged with https://github.com/espressif/esp-idf/commit/11c03bca5313ac88cfe8b8fddc9fbc5ffe0f0daa.


The requested module 'livekit-client' does not provide an export named 'Room'

Describe the bug
When I am using the latest version, the 'livekit-client' module does not provide an export named 'Room'
Reproduction
Use the latest version and you should see the problem.
Logs
SyntaxError: The requested module 'livekit-client' does not provide an export named 'Room'
or
 SyntaxError: The requested module 'livekit-client' does not provide an export named 'ConnectionQuality'

System Info
macos, brave using
"https://cdn.jsdelivr.net/npm/livekit-client/dist/livekit-client.umd.min.js"
or
<EMAIL_ADDRESS>
Severity
blocking all usage of LiveKit
Additional Information
No response

Please follow instructions in the README. You need to prefix references with LivekitClient like LivekitClient.Room

Ok.


Update sbt to 1.3.1

Updates org.scala-sbt:sbt from 1.3.0 to 1.3.1.
Release Notes/Changelog
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention @scala-steward in the comments below.
Have a fantastic day writing Scala!

Ignore future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "org.scala-sbt", artifactId = "sbt" } ]

labels: semver-patch

Codecov Report

Merging #45 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master      #45   +/-   ##
=======================================
  Coverage   93.75%   93.75%
=======================================
  Files           1        1
  Lines          16       16
=======================================
  Hits           15       15
  Misses          1        1

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 206e359...5d25a44. Read the comment docs.


Reworks the prometheus metrics to adhere to best practices

https://github.com/kedacore/keda/issues/4854
I reworked the prometheus metric names to follow conventions: added units where needed, and appended total.
Also passed a time.Duration down to the metrics handlers, as the conversion to units needs to happen when construction the metrics.
No tests were present, none added.
No idea where to track deprecation actions (when and how will the deprecated metrics be removed?)
Checklist

[X] I have verified that my change is according to the deprecations & breaking changes policy
[ ] Tests have been added
[X] Changelog has been updated and is aligned with our changelog requirements
[X] Commits are signed with Developer Certificate of Origin (DCO - learn more)

Fixes #4854
Relates to https://github.com/kedacore/keda-docs/pull/1258

updated the e2e tests, didn't add anything for testing for the deprecation notice, seems silly to me to rework.
also made the needed changes in the webhook, as I only spotted those when going through the e2e tests.
not able to run the e2e tests locally, fingers crossed this passes

tests fail, but I don't think it's the part I was fiddling with. Also, the ending newline in the json - no idea what's the idea there, my VSCode removes the newline, and a vim-edit seems to add one, but then it's one too many ...

/run-e2e sequential

fixed the DCO and the newline - seems to be all green on those. E2E is out of my league ;-)

hey @wonko, would you be available to address the merge conflicts? I can see these files are now unable to merge.
        both modified:   CHANGELOG.md
        both modified:   pkg/metricscollector/metricscollectors.go
        both modified:   pkg/metricscollector/opentelemetry.go
        both modified:   pkg/metricscollector/prommetrics.go
        both modified:   pkg/scaling/scale_handler.go
        both modified:   tests/sequential/opentelemetry_metrics/opentelemetry_metrics_test.go
        both modified:   tests/sequential/prometheus_metrics/prometheus_metrics_test.go

hey @wonko, do you think you will be able to find some time to resolve the conflicts? It's ok if not, I can help out to cherry-pick your work and follow up in a new PR.

@wozniakjan Been busy with some other stuff lately, but I could pick this up either this week, or this weekend latest.

no pressure @wonko, I'm available at your convenience. I just think this is really solid work and it would be great to get this merged in the upcoming months :)

no pressure @wonko, I'm available at your convenience. I just think this is really solid work and it would be great to get this merged in the upcoming months :)

@wozniakjan I think it's good now ... please have a good look at it, as I did the merge with a lot of interruptions ...

/run-e2e sequential

hey @wonko, the e2e tests seem to fail with metrics registration error
2024/02/12 22:24:44 maxprocs: Updating GOMAXPROCS=1: determined from CPU quota
panic: a previously registered descriptor with the same fully-qualified name as Desc{fqName: "keda_scaler_errors_total", help: "The total number of errors
encountered for each scaler.", constLabels: {}, variableLabels: {namespace,metric,scaledObject,scaler,triggerIndex,type}} has different label names or a different
help string

goroutine 1 [running]:
github.com/prometheus/client_golang/prometheus.(*Registry).MustRegister(0x172ccd8?, {0xc000084e80?, 0x1, 0xc000c9f5d0?})
    /workspace/vendor/github.com/prometheus/client_golang/prometheus/registry.go:405 +0x78
github.com/kedacore/keda/v2/pkg/metricscollector.NewPromMetrics()
    /workspace/pkg/metricscollector/prommetrics.go:233 +0x30e
github.com/kedacore/keda/v2/pkg/metricscollector.NewMetricsCollectors(0xd?, 0x1)
    /workspace/pkg/metricscollector/metricscollectors.go:79 +0x25
main.main()
    /workspace/cmd/operator/main.go:148 +0xb3f

can you please take a look at it? The error location could mean it's related to the changes.

Sure thing, I can investigate tomorrow.


ICE: validity checks should have excluded dangling/unaligned pointer

repro repo
I'm unable to minimize this further; any attempt at further minification made the ICE go away. Running cargo miri test against the commit linked produces the ICE message:

thread 'rustc' panicked at 'validity checks should have excluded dangling/unaligned pointer: InterpErrorInfo { kind: Memory access failed: pointer must be in-bounds at offset 24, but is outside bounds of allocation 25410 which has size 16, backtrace: None }', src\libcore\result.rs:1165:5

I'm running on windows-mingw, so my backtrace isn't of much use. (It's pretty much just all _clzsi2.)
(Note that I'm not asking for help finding the unsoundness in the linked code.)
One interesting observation that may help narrow down the issue:
For the test exercising the ICE-causing dangling pointer
fn node() {
    let a = ThinArc::<usize, u8>::new(1, vec![]);
    ThinBox::new(1, vec![a]);
}

changing the first line to create a ThinBox instead causes the ICE (and dangling deref?) to go away.

Here's the 1-file version, I also replaced polyfill by alloc::layout: https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=6b993d79a2ec5fc0eb521100bfc328bc. This still ICEs.
I'll need to run this locally with tracing to say more. But I am quite startled by repr_c_3, are you really wrapping that entire function in unsafe to avoid 0-initializing 24 bytes?!?

I am quite startled by repr_c_3

It's because I copied over the const generic version. Definitely should replace that with a [0; 3], though. (This is in-progress code.)

Just to record it: the main issue in the linked code is that <*mut Erased>::offset is a nop because Erased has size 0. I was treating it as if *mut Erased were *mut u8.

The core of the backtrace is
  15: core::result::unwrap_failed
             at src/libcore/result.rs:1165
  16: core::result::Result<T,E>::expect
             at /rustc/56237d75b4271a8a2e0f47d86ea76ebf6d966152/src/libcore/result.rs:960
  17: miri::stacked_borrows::EvalContextPrivExt::reborrow
             at src/stacked_borrows.rs:536
  18: miri::stacked_borrows::EvalContextPrivExt::retag_reference
             at src/stacked_borrows.rs:599
  19: miri::stacked_borrows::EvalContextExt::retag
             at src/stacked_borrows.rs:641
  20: <miri::machine::Evaluator as rustc_mir::interpret::machine::Machine>::retag
             at src/machine.rs:341
  21: rustc_mir::interpret::step::<impl rustc_mir::interpret::eval_context::InterpCx<M>>::statement
             at /rustc/56237d75b4271a8a2e0f47d86ea76ebf6d966152/src/librustc_mir/interpret/step.rs:114
  22: rustc_mir::interpret::step::<impl rustc_mir::interpret::eval_context::InterpCx<M>>::step
             at /rustc/56237d75b4271a8a2e0f47d86ea76ebf6d966152/src/librustc_mir/interpret/step.rs:61
  23: rustc_mir::interpret::step::<impl rustc_mir::interpret::eval_context::InterpCx<M>>::run
             at /rustc/56237d75b4271a8a2e0f47d86ea76ebf6d966152/src/librustc_mir/interpret/step.rs:40
  24: miri::eval::eval_main::{{closure}}
             at src/eval.rs:190
  25: miri::eval::eval_main
             at src/eval.rs:189

That's this line:
https://github.com/rust-lang/miri/blob/09b0a8a813d178233aff88d521ff0aa672ff6dbe/src/stacked_borrows.rs#L536
So somehow we are reborrowing a dangling pointer... odd.
This is the last MIR it executed:
[INFO  rustc_mir::interpret::eval_context] CONTINUING(13) std::boxed::Box::<ThinData<usize, u8>>::from_raw
[INFO  rustc_mir::interpret::step] // bb1
[INFO  rustc_mir::interpret::step] StorageDead(_3)
[INFO  rustc_mir::interpret::step] (_0.0: std::ptr::Unique<T>) = move _2
[INFO  rustc_mir::interpret::step] Retag(_0)

That's somewhere inside <impl std::convert::From<ThinBox<usize, u8>> for std::boxed::Box<ThinData<usize, u8>>>::from. We have a dangling Box here it seems.

Minimal reproducer:
fn main() { unsafe {
    let ptr = Box::into_raw(Box::new(0u16));
    Box::from_raw(ptr as *mut u32);
} }


Secrets creator

https://issues.redhat.com/browse/OSD-2837

/retest

/lgtm
Also tested locally with byoc/account creation/federated access, all working fine.

@fahlmant @rogbas @iamkirkbater @ArielLima please test locally before we can merge that PR.

@iamkirkbater can we get a rebase?

@jharrington22 could you please take a look at that PR?

@jharrington22 When I went to rebase, out of the four commits one was a carry over commit that's already been merged, one was a WIP commit, and one was a "fix" commit, so I rebased into a single commit anyway.
I tested after the rebase with all of the make test-* commands I saw, and all completed successfully.

Rebased this from master locally, and tested with the make test-all target, with no issues.  Watched as secrets were created (though the tests would have caught that too).
/lgtm

@iamkirkbater could you please rebase and push changes again?

This should be all set and ready for final testing and review. @jharrington22 @rogbas @fahlmant


Permission Issue

I have enabled the Custom Tiles on the Portal web application (SharePoint 2019).
On the MySite Web application I ran the PowerShell commands as mentioned:
$w.Properties.CustomTilesListHostUrl = "Portal web app url"
$w.Update()
The custom tiles are not populated to the mysite. After investigation I came to the conclusion the application pools are different for both web apps (best practice, use another identity for you Mysite Pool).
Eventvwr error:
SQL Database 'WSS_Content_Portal02' on SQL Server instance '' not found. Additional error information from SQL Server is included below.
Cannot open database "WSS_Content_Portal02" requested by the login. The login failed.
Login failed for user '\sys_spMySitePool19'.
Ensure that the other Application Pool identity (Mysite) has permissions on the database where the Root site and the Custom Tiles list is located:

SPDataAccess / PSDataAccess

This solved my issue

@SPLeon thank you for submitting feedback.
I think the best way forward is if you open a service ticket in your tenant so this can get resolved ASAP. Based on the outcome let me know if it is something that can be called out in the docs.
Please follow this link to contact support for business products:https://docs.microsoft.com/office365/admin/contact-support-for-business-products
Please keep us posted here on the resolution so we can feed whatever information you discover into the content.


experimental partial pomodoro

closes #24
Work interruption feature
Implements work interruption logic.
When you click any button during working pomodoro it will be treated as not finished pomodoro.
Fixing waiting for user prompt before starting another pomodoro
Co-authored-by: Michal Franc<EMAIL_ADDRESS>

This function is quite handy!
I tried to use it and I tested the experimental version on PR and currently only Enter interrupts the Pomodoro session by restarting the count down. The log Pomodoro was interrupted. is vague, but hey! WIP!
Progressbar is getting multiplicated which does not look good. Maybe there is a way to listen to keystrokes without printing the input 🤔
I really like the hack with bool pointer :D This is a thing you couldn't do in Java for instance
PS: I put the same comment in the Issue by mistake 😄


下载weights失败

连不连vpn  在下载weights都显示git lfs install
[git clone https://huggingface.co/BadToBest/EchoMimicV2 pretrained_weights](fatal: unable to access 'https://huggingface.co/BadToBest/EchoMimicV2/': Failed to connect to huggingface.co port 443 after 21061 ms: Couldn't connect to server)是怎么回事啊

可以在讨论群里问一问

没有群呀

哇哦  谢谢  知道啦(●ˇ∀ˇ●)


I'd like to change how errors are handled

I strongly dislike the fact that this library seems to catch any and all exceptions, and returns them as an error response.
If I have a bug in my resolver code, this should be a 500 error, be tracked to Sentry, and the error message should not be exposed to the user.
If the user makes a mistake in their query, this should be a 400 error, with a clear message, and should not go to Sentry.
As it stands, this library (and thus all the integrations) do not seem to let me do this. I just get an error response, and I'd have to reverse engineer which class of error it is.

It seems what is really happening is this:

graphql-core itself already catches all errors.
graphql-server-core return the result from graphql-core as-is.
sanic_graphql then calls again into graphql-server-core, namely the encode_execution_results helper. This one essentially returns the data for an HTTP response (status code and so on). It passes through a format_error callback.

I guess what I want to do is override this format_error callback, and raise an exception there.
class MyGraphQLView(GraphQLView):

    @staticmethod
    def format_error(error):
        # graphene likes to wrap all of the exceptions, unwrap
        if isinstance(error, GraphQLLocatedError):
            error = error.original_error

        # Is this an error we want to pass through?
        if isinstance(error, GraphQLError):
            return graphql.error.format_error(error)
        else:
            # Unknown error, crash
            raise error

I think this is a bit confusing to achieve what I would perceive to be the "default" approach, but I am not sure if there is something actionable here right now from my point of view.

Most Excellent. This ought to be in the docs.
However, that seems to apply to the now legacy version https://github.com/graphql-python/graphql-core-legacy as I don't find the GraphQLLocatedError in the new core, which seems to loose the original exception type, as they only use the str(e.message) part of it!?


Update documentation on CoreDNS

Adding some minor changes to the documentation regarding CoreDNS

added a few more copyedits, adding lgtm based on Lubomir's comment.
/lgtm
/approve


timezone aware fixes?

would it be an idea to add the possibility of returning timezone aware datetime.datetime objects instead of datetime.time objects in the fix records?
in IGC files the time is recorded in UTC, leading to potentially weird situations when your are in a timezone far away from UTC. You can have fixes going over the date line, from 23:59 -> 00:00
this recently lead to a problem in my program, trying to analyze glider flights for the gliding world championship in uvalde (UTC-5).
Adding this optional conversion would necessitate less conversions in downstream packages/programs. I see from the reader that it finds utc_date from one of the H records. ~Im not sure if this field is required in the format.~ this source says this record is required and always declared before the B records, so this would be possible without having to loop in a weird order.
Curious to hear how you look at this 😄

This is also great idea! Please send PR, to merge. Thanks!

Nice to hear you like it! What would be an appropriate implementation? An optional flag on the constructor, similar to skip_duplicates? What would be an appropriate name: tz_aware_fixes?

Do we really need a flag or should this be standard behaviour? I don't see a case where the old Implementation should be preferred. What do you think?

Also fine, but it will break backwards compatibility so i suppose an increase in major version number would be justified

Agree

@GliderGeek @bubeck please see #302 for the requested fixes according to the implementation described above

I am on holiday until 2024-09-09. Please give me some time after this date to look at.

https://github.com/Turbo87/aerofiles/blob/184eb240654df2fc38e4bfd80332b6ccb0c67685/aerofiles/igc/reader.py#L204
I haven't looked at your implementation yet. However here are my general thoughts:

Add TZ=UTC to B record and also HFDTE (and more?) to change them from naive to aware.
Keep 'time' in B as datetime.time to be compatible, only make aware to UTC
Add 'localtime' as datetime.datetime with TZ from header (or UTC if HFTZN is not available) and do all the magic here with time overrun.

What do you think?

Add TZ=UTC to B record and also HFDTE (and more?) to change them from naive to aware.

Keep 'time' in B as datetime.time to be compatible, only make aware to UTC
Add 'localtime' as datetime.datetime with TZ from header (or UTC if HFTZN is not available) and do all the magic here with time overrun.

Agreed and done
I agree with your statement in https://github.com/Turbo87/aerofiles/issues/299#issuecomment-2322870854 , where you indicate that this behaviour is always wished. With a major version upgrade this should be covered. Otherwise an extra column is needed
Can be an option. You are essentially storing the same information twice in the dataset, might be a drawback

I'm aligned with your initial thoughts, seems logical to me!

Done with https://github.com/Turbo87/aerofiles/pull/307


[Proposal] Use the Ava Test runner

Ava is a new javascript test runner that claims to be futuristic. It built-in babel which allows us to write and run tests in ES2017 without the need of any other tool.
Only thing here is that it does not compile the source code, just the tests. As mentioned in ava's README, this can be easily fixed by using babel-register which hooks into ava and transpiles ESNext code on the fly while running tests.
All it takes is this small snippet of code in package.json:
"ava": {
    "require": [
      "babel-register"
    ]
 }

For our use case (of small exercises), this completely eliminates the need for bundling tools like gulp and to maintain the huge gulpfile and pass it along to the users with each exercise. Only thing we need to pass to users is package.json.
To demonstrate what it looks like I ported the first two exercises hello and leap to use ava tests in this repository. hello uses the standard xunit style that ava gives out of the box. While leap uses the BDD style which is provided by ava-spec.
PS: I also took the opportunity to use the latest ES using babel-preset-env which addresses my previous issue #259.
If maintainers agree, I would like to work on this.

@tejasbubane this looks very cool.  Myself I have been thinking about proposing migrating to using Jest, which appears to provide similar benefits.
Both projects appear similar in popularity, I'm not sure there's a compelling case for migrating to one versus the other.  My familiarity with Jest comes from its association with React, which is of course enormously popular these days.
I think there is another consideration involved here though: the gulpfile provides an example of what a typical Javascript build pipeline looks like these days, and I think that's invaluable.  Not every user will investigate that, but we should consider that aspect as well.
I have also been thinking about proposing changing the build to use Webpack, which has value for the same reasons that using Gulp has, but is more current technology.
@rchavarria what do you think about this?  Is it better to have a dead simple exercise environment, or to help expose users to build tools?  @tejasbubane what are your thoughts?

Is it better to have a dead simple exercise environment, or to help expose users to build tools? @tejasbubane what are your thoughts?

I am more of a simple environment guy.
Correct me if I am wrong, but build env and frameworks are not the core focus of exercism. We can probably add some resources to build tools and environments in the resources section.
I should probably investigate jest in context of exercism and see if it works the same way.
To be fair, I have become a fan of on-the-fly transpilation (using babel-register) which may be the reason I am biased towards this approach.

I haven't heard about Ava, and I've heard about Jest a little bit. So, I have no strong opinion on any of them. But something is clear, build tools are evolving.
For this track, it started using a build tool because of the need of the transpilation step. Nowadays, it seems to be better solved issue.
I don't care too much if we use Ava or Jest, but it seems that any of them will simplify things for final users, and that's a good thing.
We could start thinking about what we want to acomplish, more than the tool we want to use. How would final users use Ava or Jest? Is a complex installation needed? Is it complex to run tests? Sorry if the questions look stupid, but I don't know about Ava or Jest.

I don't care too much if we use Ava or Jest, but it seems that any of them will simplify things for final users, and that's a good thing.
We could start thinking about what we want to acomplish, more than the tool we want to use.

Good point. 👍

How would final users use Ava or Jest? Is a complex installation needed? Is it complex to run tests?

In my case, all a user needs to do is cd into the exercise directory, run npm install and then run npm test. The package.json has ava and babel as devDependencies and a script to run ava.

It looks promising. I'm worried about two things:

What happens to users with some completed exercises on this track? Your workflow seem identical to the current one (npm install, npm test, well the current one can be run as gulp test).
Should test specs be modified? Now, they are based on Jasmine. Does Ava follow the same approach?

I can speak to one thing: Jest uses essentially the same syntax as Jasmine, FWIW.  I have so far been able to run existing tests with no modifications, although I could imagine there might be some matchers that might not work out of the box.  @tejasbubane how about Ava?

So @rchavarria @tejasbubane I did some further checking in to this.

Ava does not use the same syntax, so the tests would have to be rewritten.
Jest can be configured to automatically transpile.  This would greatly simplify the directory structure.  We could change the devDependencies in package.json to be simply:

  "devDependencies": {
    "babel-jest": "^19.0.0",
    "babel-preset-env": "^1.4.0",
    "jest": "^19.0.2"
  },

and we would need to serve a .babelrc file:
{
  "presets": ["env"]
}

The tests can then simply be run by calling jest from the command line in the exercise directory-- no arguments needed.
That would eliminate the need for the gulp build pipeline for testing.  If we wanted to continue to provide linting as an option, we could do that, providing an npm script for doing test, linting, or linting then testing as we wanted.  It would be pretty simple to set up.
@tejasbubane I feel like the idea behind making the process simpler for the users is very valuable.  My gut is telling me that we'd be better off making this change using Jest than Ava, because it wouldn't require changing the tests themselves and the benefits are equivalent.
If we can get agreement on this I'm happy to do the work or work on it with others.  LMK.

If Ava uses a different syntax... I wouldn't go that path.
Instead of having a .babelrc file, would it be possible to include it in package.json? I know other tools (such as ESLint) support that. It's just to have less files moving around.
I like the idea of having a linting tool. I hope npm scripts will remain simple.
What do you think @tejasbubane ?

If Ava uses a different syntax... I wouldn't go that path.

Yes Ava uses a different syntax. So if jest works with the given syntax, (which it should since it uses jasmine under the hood) it makes sense to the Jest way. I am not sure what all config will be required and if it will comsume ES6 code directly without the need of a build tool.
I will put together a small repo with all jest config for couple of exercises like I did for ava.

@tejasbubane @rchavarria this sounds like a good plan to me.  @tejasbubane see my comments above, it was trivial to get it working.  If we could get @rchavarria's suggestion about getting the babel config into package.json instead of a separate file, that would be awesome.  I played around with it for a couple of minutes without success, but if it's doable that would be preferable-- one less file to serve!

I know other tools use the approach of extending the package.json file. Don't spend too much time with that because I don't even know if it's possible or not. I was just speaking my mind, without knowing the possibilities of the tool. Sorry if that confused you 😞

@tejasbubane I tried to reach you directly via gitter today-- I got so excited about this idea that I have opened a PR.  @rchavarria if you would have a look too please, I think this will work.  It may resolve a few other issues in the process.


⚠ Minecraft has degraded performance

In 3b7d483, Minecraft (https://www.minecraft.net) experienced degraded performance:

HTTP code: 200
Response time: 1011 ms

Resolved: Minecraft performance has improved in 74606f3.


What's the name of your avatar?

What's your avatar called? Pigen, right? Wasn't it a tiger in an unusual pose?

Seagull at Sydney Royal Botanic Garden.

?


getUtxos() returning inaccurate set when Value passed

Hi I was experimenting with finetuning my webstore and noticed that getUtxos(Value, pagination) does not always return null when the wallet does not have UTxOs that can match the Value provided.
I generated a value cbor string from Cardano Serialization Library for 1.35 ADA and 3500 $RAG to test against a wallet with no $RAG balance.
await wallet.getUtxos('821a00149970a1581cca942cb8bb5d1ef750766ded355f320880539111f10efa2b1a478ff9a143524147190dac') does not return null even though the wallet has no $RAG balance, but returns the full set of UTxOs of the wallet. Is this the expected behaviour?

This is not the expected behaviour. I'm having similar issues with getUtxos not returning the correct set. Too many utxos in my case. Much more than necessary to cover the value that I sent.
Here's the CIP-0030 definition:
api.getUtxos(amount: cbor = undefined, paginate: Paginate = undefined): Promise<TransactionUnspentOutput[] | null>
Errors: APIError, PaginateError
If amount is undefined, this shall return a list of all UTXOs (unspent transaction outputs) controlled by the wallet. If amount is not undefined, this request shall be limited to just the UTXOs that are required to reach the combined ADA/multiasset value target specified in amount, and if this cannot be attained, null shall be returned. The results can be further paginated by paginate if it is not undefined.

Having this issue as well. Either Nami returns an incorrect set, the entire set, or the correct set. Inconsistent and unexpected behavior when passing a value object inside getUtxos.

Anyone found a workaround aside from manually implementing their own utxo filtering?


useGeographic() and WebGLVectorLayerRenderer are not fully compatible

Simply,
    const layer = new WebGLLayer({
        source: new VectorSource({
          url...
          format: new GeoJSON(),
        })
      }

is working, but
    const layer: WebGLLayer = new WebGLLayer({
        source: new VectorSource({
            features
        })
    },
    style);

is not.
Tested  with same JSON in EPSG:4326, loaded by OL (first case) and preloaded and passed as Feature[] (second case).
In first case data comes to the renderer in EPSG:3857 (internal reprojection is done when data is loaded), in second case it comes in EPSG:4326 and rendering does not work at all.

Also applies to WebGLPointsLayer.  The first case is incorrect as the feature geometry should be in the user projection, not the view projection - it is only working because of the issue in the second case.  Both WebGLVectorLayer and WebGLPointsLayer are still experimental, so full support might not be expected.
But the Heatmap layer which uses WebGLPointsLayer is not experimental and therefore would be expected to support features in a user projection - but it does not https://codesandbox.io/s/heatmap-earthquakes-forked-es3mvf?file=/main.js

After #15118, you can call useGeographic() and the WebGL vector renderer will transform geometries with geographic coordinates before rendering.


Vegetable Image Classification

Deep Learning Simplified Repository (Proposing new issue)
:red_circle: Project Title :  Vegetable Image Classification
:red_circle: Aim : to predict correct vegetable names  corresponding to their images
:red_circle: Dataset : https://www.kaggle.com/datasets/misrakahmed/vegetable-image-dataset
:red_circle: Approach : Try to use 3-4 algorithms to implement the models and compare all the algorithms to find out the best fitted algorithm for the model by checking the accuracy scores. Also do not forget to do a exploratory data analysis before creating any model.

📍 Follow the Guidelines to Contribute in the Project :

You need to create a separate folder named as the Project Title.
Inside that folder, there will be four main components.

Images - To store the required images.
Dataset - To store the dataset or, information/source about the dataset.
Model - To store the machine learning model you've created using the dataset.
requirements.txt - This file will contain the required packages/libraries to run the project in other machines.

Inside the Model folder, the README.md file must be filled up properly, with proper visualizations and conclusions.

:red_circle::yellow_circle: Points to Note :

The issues will be assigned on a first come first serve basis, 1 Issue == 1 PR.
"Issue Title" and "PR Title should be the same. Include issue number along with it.
Follow Contributing Guidelines & Code of Conduct before start Contributing.

:white_check_mark: To be Mentioned while taking the issue :

Full name :
GitHub Profile Link :
Email ID :
Participant ID (if applicable):
Approach for this Project :
What is your participant role? (Mention the Open Source program)

Happy Contributing 🚀
All the best. Enjoy your open source journey ahead. 😎

Full name : Aditya Narayan Jha
GitHub Profile Link : https://github.com/aditya0929
Email ID<EMAIL_ADDRESS>Participant ID (if applicable):
Approach for this Project : I would be using cnn to make the models and for alternative methods i would choose to include architectures between mobileNet, ResNet , Alexnet or Vgg apart from adding convulational layers.  i will make comparison graphs between different models for easier understanding .
What is your participant role? SSOC-2023

Issue assigned to you @aditya0929


Add "deaccession" and "abort" functions

Currently, there is no means to remove an asset from the repository beyond deleting the relevant AIP manually.
There should be a function to remove an asset and record it as deaccessioned in the pymm database.
Use cases for this would be a film that needs to be rescanned or a video that is transferred with different specs.
Similarly, a failed ingest results in some stub AIPs and corresponding database records. There should be a function to select such a stub and scrub all its object and event records (and log entries?) to start from scratch.

👀


ActiveRecord::UnknownAttributeError: unknown attribute: Fabricate

user_fabricator:
Fabricator(:user) do
  email { Faker::Internet.email }
  name { Faker::Name.name }
end

category_fabricator:
Fabricator(:category) do
  transient user: Fabricate(:user)
  user { |attrs| attrs[:user] }
  category { Faker::Lorem.characters(5) }
  type 1
  update_time Time.zone.now
end

record_fabricator:
Fabricator(:record) do
  transient user: Fabricate(:user)
  user {|attrs| attrs[:user]}
  category { |attrs| Fabricate(:category, user: attrs[:user]).hash_key}
end

seed.rb:
lucasmf = Fabricate(:user)
record = Fabricate(:record, user: lucasmf)

I get following errors:
rake aborted!
ActiveRecord::UnknownAttributeError: unknown attribute: Fabricate
/Users/lucasmf/git/andromoney_server/spec/fabricators/record_fabricator.rb:8:in `block (2 levels) in <top (required)>'
/Users/lucasmf/git/andromoney_server/db/seeds.rb:10:in `<top (required)>'
NoMethodError: undefined method `Fabricate=' for #<Category:0x007fb06a058dc8>
/Users/lucasmf/git/andromoney_server/spec/fabricators/record_fabricator.rb:8:in `block (2 levels) in <top (required)>'
/Users/lucasmf/git/andromoney_server/db/seeds.rb:10:in `<top (required)>'
Tasks: TOP => db:seed
(See full trace by running task with --trace)

May I ask what the cause of the error and how to fix it?? Thanks~

I found the cause is form
transient user: Fabricate(:user)

It seems using Fabricate as default value is not feasible??

And I found passing Model as transient attribute won't work
After removing the default value of transient :user to avoid the error, then executing rake db:seed, the record, category and subcategory didn't associated with user.

Declaring the transient will tell Fabrication not to set the attribute on the underlying model. If you specify the field later like I've done here, it will automatically expand to Fabricate(:user) unless you pass in an override.
Give this a shot and let me know how it goes!
Fabricator(:category) do
  transient :user
  user
  category { Faker::Lorem.characters(5) }
  type 1
  update_time { Time.zone.now }
end

Fabricator(:record) do
  transient :user
  user
  category { |attrs| Fabricate(:category, user: attrs[:user]).hash_key}
end


tesseract adding new line in arabic prediction

Environment: Linux

Tesseract Version: 4.1.1
Platform:l inux

Current Behavior:
i have an arabic image which have a word  سام احمر it reads it as  ام احمر\nسام
Expected Behavior:
it should read it as سام احمر why is it including new line space in between character?
Suggested Fix:
any suggestion or tips?

Please attach the image and the hocr output.

No feedback from the OP.


Build failed with an exception.

react-native-android-lo cation-services-dialog-box/android/src/main/java/com/showlocationservicesdial ogbox/LocationServicesDialogBoxModule.java:13: error: LocationServicesDialogBoxModule is not abstract and does not override abstract method onActivityResult(int,int,Intent) in ActivityEventListener class LocationServicesDialogBoxModule extends ReactContextBaseJavaModule implements ActivityEventListener { ^ /home/algofocus/ReactNativeProjects/PSP2/node_modules/react-native-android-location-services-dialog-box/android/src/main/java/com/showlocationservicesdialogbox/LocationServicesDialogBoxModule.java:25: error: method does not override or implement a method from a supertype     @Override     ^ /home/algofocus/ReactNativeProjects/PSP2/node_modules/react-native-android-location-services-dialog-box/android/src/main/java/com/showlocationservicesdialogbox/LocationServicesDialogBoxModule.java:125: error: method does not override or implement a method from a supertype     @Override     ^ Note: /home/algofocus/ReactNativeProjects/PSP2/node_modules/react-native-android-location-services-dialog-box/android/src/main/java/com/showlocationservicesdialogbox/LocationServicesDialogBoxModule.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. 3 errors
when using with firebase crashlytics
"react": "16.3.1",
"react-native": "0.55.4",
"react-native-android-location-services-dialog-box": "^2.4.4",

my implementation is right. see react native source code
this error is  a firebase crashlytics bug.

@webyonet how to solve that?


Fix warnhandler formatting for 429 error

Call the seconds method on TooManyRequestsTimeout duration and cast to int. I do this because without it the arguments passed to the warnhandler do not match. The format string contains %d but the argument type is not an int (see https://go.dev/play/p/i79DM3YPdoo)

Fixed in other PR. Thanks!


Msal has code coverage above 80% threshold

Pick a tool that gives us code coverage and use any provided tooling like github badges

Current code coverage is at 81% https://coveralls.io/github/AzureAD/microsoft-authentication-library-for-js