No results when searching rvm gems directory (multi-user install)

I have install rvm (doing a multi-user install) into /usr/local.
Then I created gemsets for each of my projects.
When opening a gem's directory with atom
EDITOR=atom bundle open [gem_name] and try to search something with cmd+shift+f nothing ever shows up in the results even though the search term exists in several files.
Could this be an issue with file/directory permissions due to the multi-user install?
Any ideas how to debug/fix?

Hey @glampr :wave:

Any ideas how to debug/fix?

Provide more information :newspaper:
See if you can debug this yourself :fishing_pole_and_fish:
If not, try reproducing the problem in other projects/folders -- do you see the same problem there? If so, can you provide more specific steps to reproduce this on a simpler example?
Can you clarify why you're using atom bundle open [gem_name] to open a folder, and not just atom [gem_name]?

bundle open [gem_name] open the gem's directory without having to specify the full path.
eg. EDITOR=atom bundle open rgeo is the same as writing atom<EMAIL_ADDRESS>(bundle knows wher the rgeo gem is installed to).

Moving the same folder to e.g. my desktop solves the issue.
When opening the folder at<EMAIL_ADDRESS>the filenames are displayed grayed out. I'm guessing this is an indication for something gone wrong, although clicking on a filename displays the contents of the file.

Moving the folder to my desktop and opening it works ok.

Both folders have the same permissions:
drwxrwsr-x   5 root    rvm     306B Apr 15 19:14 rgeo-0.3.20
and my account is part of the rvm group.

Using the latest version 0.240 on Mac OS X Yosemite 10.10.3

It appears that bundle open [gem name] doesn't respect environment variables passed on the command line. I have EDITOR set to atom --wait in my profile and tried, EDITOR=vi bundle open [gem name] and the Gem I listed opened in Atom.

I also just tried this:
$ EDITOR=vi
$ echo $EDITOR
vi
$ bundle open pry

And pry opened in Atom. So perhaps it launches a copy of your shell without inheriting the local environment and opens that?

@lee-dohm this seems irrelevant with the issue I'm having, but could it be that you have the env variable BUNDLER_EDITOR set to atom?

No, BUNDLER_EDITOR is empty.
I was simply trying to follow what I understood to be the steps to reproduce your issue. If you can provide us with simplified repro steps that isolate your exact issue, I would be happy to try those.

the filenames are displayed grayed out. I'm guessing this is an indication for something gone wrong,

It is an indication that the files/folders are ignored by the .gitignore file that applies to them. This could also be why trying to do a Project Find on those files isn't working.  That options was causing this! When it is unchecked searching works as expected!!
Thank you!

Maybe it should say "Exclude VCS Ignored Paths from search results" ?

It excludes ignored paths from more than just the search results. It's kind of a catch-all for search results, fuzzy-finder and I think one more thing. It could use a description that makes it more clear.

This seems to be a hidden and vague setting and I'm glad I came across this page. As soon as I unchecked the ''Exclude VCS Ignored Paths'', the results showed up. I'm running Win8 and working in the active git directory (i.e. not searching for items in the excludes list, in the .git folder, or searching outside of the project directory). Why this works or this does is beyond me. I’m not searching the .git (ignored paths) directory, so it is baffling why this should be unchecked. Providing a tooltip/description for this setting or renaming it so it is clear could be helpful for future users.

This behaviour makes Atom far less useful when used in combination with commands like bundle open; searching within a bundled gem is basically impossible unless this value is toggled.
The behaviour I'd expect is for Atom to respect .gitignore if it's present at the root of the current project/tree-view, but not to search upwards if I've explicitly opened Atom with a root directory that's within an ignored path. Does that make sense?

Agreed. In my case, atom is searching all the way up to the .rbenv directory which is under git version control.


Is it possible to arrange Gviz plots in a grid?

I'd like to know if there is a way to arrang multiple Gviz plots in a grid. For example, I have two plots p1 and p2, both were produced using plotTracks and contains only DataTracks.
p1 <- plotTracks()
p2 <- plotTracks()

I tried
gridExtra::grid.arrange(p1, p2)

and
cowplot::plot_grid(p1, p2)

Both obviously return errors but I am using them to illustrate what I am trying to do

Hi @MahShaaban ,
This question should go to Bioc Mailing list, this is not an issue. Therefore closing it.
Best
Robert
BTW. You can use grid package in combination with add parameter in plotTracks function.
library(grid)
library(Gviz)

st <- c(2000000, 2070000, 2100000, 2160000)
ed <- c(2050000, 2130000, 2150000, 2170000)
str <- c("-", "+", "-", "-")
gr <- c("Group1","Group2","Group1", "Group3")

annTrack1 <- AnnotationTrack(start=st, end=ed, strand=str, chromosome=7, genome="hg19", feature="test", group=gr, id=paste("annTrack item", 1:4), name="A1", stacking="squish")

annTrack2 <- AnnotationTrack(start=st, end=ed, strand=str, chromosome=7, genome="hg19", feature="test", group=gr, id=paste("annTrack item", 1:4), fill="gray", name="A2", stacking="squish")

grid.newpage()
pushViewport(viewport(layout = grid.layout(2, 1, heights=c(0.5,0.5))))
pushViewport(viewport(layout.pos.col = 1, layout.pos.row = 1))
plotTracks(annTrack1, add=TRUE)
popViewport(1)
pushViewport(viewport(layout.pos.col = 1, layout.pos.row = 2))
plotTracks(annTrack2, add=TRUE)
popViewport(1)

Thank


feat: add kata runtime

qemu works, but firecracker needs a rootfs: https://github.com/kata-containers/documentation/blob/master/Developer-Guide.md#create-and-install-rootfs-and-initrd-image

just a poc, closing


Adding/deleting/editing rows in GridView on the client side

Let's say I have a table of messages on my page. I can add messages via Ajax dynamically, and I want all of my new messages to appear in the table without loading the page, but how can one do that?
You could render the whole GridView table and send it back to the client through Ajax, but it is a bad idea because:

you send HTML code, not pure data.
you request a certain number of rows from the DB, even though your message may be the only difference, thus you request and send unnecessary data.

You could use some other approach to fetch only those messages or rows that haven't been yet shown, but in that case you face following the issues:

When inserting a row on the client side, it needs to look exactly the same and it needs to be as workable as other ones.
You need to update the paginator because new pages might've been added.
Even if you write such code, it may be incompatible with newer versions of Yii2, while if it were in its code base, it would be rewritten to work well with the new changes.

So, I really think there should be a native way of doing this kind of thing. Thanks for reading!

The first approach that I'd use is Pjax, but it will send html code and will make a new complete request to db (not only differences).
But I'd evaluate simplicity of pjax implementation and cons with html and bigger db load.

Won't be implemented in 2.0.


IndexError: list index out of range

Hello,
Getting this error intermittently when chatting with the assistant, could you please advise?
IndexError: list index out of range
File "app.py", line 101, in get_message_value_list
message_content = message.content[0].text
Thanks!
C

Thank you for the issue
There may be cases where there is no content at all.
I'll try to fix that bug.

@chris77TNow If you check carefully, it's an old version code.
Currently, the code is as follows, and it supports streaming.
https://github.com/ryo-ma/gpt-assistants-api-ui/blob/main/app.py
Please try this.

Thank you very much for this, works great!


Push 1.0.7 release to Atmosphere

Hi @rgould,
Could you please push the 1.0.7 release to Atmosphere. Same issue as https://github.com/okgrow/analytics/issues/116
Thanks!

@skirunman Sorry about that! Thought I had, but clearly it either didn't work, or I forgot about it. It's up there now.

Awesome, thanks.


android version : can not new a caffe::net

hello:
I  builded a .so file which linked against  minicaffe of android version. And I also have written a JNI file. But when I invoke the JAVA class in android studio ,a error was occurred：
A/libc:Fatal signal 6 (SIGABRT),code -6 in aid 28981.
I located the question in one sentence：caffe::Net net_ = new caffe::Net("..."). It seems like the  the caffe's construct function was not invoked at all. So I doubt the size of stack was overflow or the program was failed to link against the libcaffe.so.
Could you give me some advice ? Thank you a lot !

@ligongzheng Did you compile your jni file successfully? Please take a look at jni.c, this file use C interface. If you compile another C++ file, you should link the libcaffe.so file and generate another *.so file.

I have figure it out. I use temp file( mkstemp ) in my code but android does not support it. Even I change the temp dir from /tmp to /data/lcoal/tmp.
Thank you a lot !


Can't hit url pattern of custom view

I'm using the latest django 1.8 My urls.py looks this:
from django.contrib import admin
from adminplus.sites import AdminSitePlus
from django.conf.urls import include, url
admin.site = AdminSitePlus()
admin.autodiscover()
urlpatterns = [
url(r'^admin/', include(admin.site.urls)),
url(r'^chaining/', include('smart_selects.urls')),
]
My view looks like this:
def my_view(request, *args, **kwargs):
pass
admin.site.register_view('somepath', view=my_view)
When i go to
mysite.com/admin/somepath I get a 404.  Do you know what I'm doing wrong?

Can you try with the latest (v0.4, which is out now) and see if it still fails? Make sure to follow the installation instructions for Django >=1.7.


v1.0.5 upgrade to React 18.x

Small set of changes to make this work with React 18.x
Updated the rest of the dependent packages in the change as well, which can perhaps be skipped.
Tests pass, but please ensure this works for you as well.

Further poking around shows this might introduce some issue with how react-refresh is used since it is now integrated with react 18.

thanks for the PR, we may release it as a major update, since it's dependency would have major version update


Added steps to set up OneTouch on IOS

Hey, I just wanted to help out by documenting the steps I took to get the PayPal button working on ios (One Touch)
Feel free to suggest changes to my PR, I hope this helps.  Your project has been very helpful to me, much appreciation to you and those who have contributed on this! 👍

Thanks much!

Looks great, Thanks!


Feature request: local custome channel support

I run this tools on a channel, now it bridge many channels ( irc, gitter, tg, etc.) but I want implement a custom channel.
so I hope, when get a message from the gitter,irc,etc. it can send this message to a local socket address, for exmaple <IP_ADDRESS>:8989,  and when a message set to <IP_ADDRESS>:8989 it can also relay the message to gitter/irc.

hmm, I hope we can config it in config file, such as add:
[local]
    [local.custom]
    Server="<IP_ADDRESS>:8989"
    Nick="SpaceVimBot"
    RemoteNickFormat="[{PROTOCOL}] <{NICK}> "

[[gateway]]
name="mygateway"
enable=true
    [[gateway.inout]]
    account="local.custom"
    channel="<IP_ADDRESS>:8989"

@wsdjeg you could use the REST API for this

I just search REST inrepo， donot see any doc about it。

The documentation is a bit sparse. See for example
https://github.com/42wim/matterbridge/blob/master/matterbridge.toml.sample#L1134-L1141

this can only send data to a url, but Can not read data from it?

 #To read from the api:
    #curl http://localhost:4242/api/messages

@42wim, I know this feature, but I need to read the message, I hope, when get a message , matterbridge can send a message to an address by itself

No that's not possible at the moment.. it can be implemented with websockets though

@42wim I have such config in my vps:
[api]
    [api.local]
    BindAddress="<IP_ADDRESS>:5564"
    Buffer=1000
    RemoteNickFormat="{NICK}: "

[[gateway]]
name="SpaceVim-cn"
enable=true
    [[gateway.inout]]
    account="gitter.mygitter"
    channel="SpaceVim/cn"

    [[gateway.inout]]
    account="api.local"
    channel="api"

when I start matterbridge, I can use curl -XPOST -H 'Content-Type: application/json'  -d '{"text":"test","username":"randomuser","gateway":"SpaceVim-cn"}' http://localhost:5564/api/message to send message,
and I have record my domain for example  fooooo.org to the ip of this vps, I can not run this command:
curl http://fooooo.org:5564/api/messages

because the ip of fooooo.org is not <IP_ADDRESS> as specified in your BindAddress
so set BindAddress=vpsip:5564 and it should work (if you don't have a firewall)

Thanks, I will have a try.

@wsdjeg does it work, or do you still have need for a tcp socket?

Sorry, you need to set your actual IP (the numbers and dots), not the string @wim42 used as an example. Alternatively, you could use <IP_ADDRESS>:1234 where 1234 is the port you're using. The zero format means that any IP can bind.

Thanks, it works for me now.

Shidong Wang
-------- 原始邮件 --------
主题：Re: [42wim/matterbridge] Feature request: local custome channel support (#309)
发件人：Patrick Connolly
收件人：42wim/matterbridge
抄送：Wang Shidong ,Mention
Sorry, you need to set your actual IP (the numbers and dots), not the string @Wim42https://github.com/Wim42 used as an example. Alternatively, you could use <IP_ADDRESS>:1234 where 1234 is the port you're using. The zero format means that any IP can bind.
―
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/42wim/matterbridge/issues/309#issuecomment-449113549, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AMiJkuqYdOk0eFg2A01kfWdQR37-iRoIks5u6-f6gaJpZM4Q4Ff6.

Awesome! Glad to hear :)
Any thoughts on how we could improve the documentation or defaults so that the next person to walk your path doesn't have the same issue? Would totally appreciate feedback on that!


Move bug repro

Moving bug repro test cases into their own folder

:tada: This PR is included in version 0.382.1 :tada:
The release is available on:

npm package (@next dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


scaleway-cli: 2.25.0 -> 2.26.0; re-enabled tests, configured installCheckPhase

Description of changes
https://github.com/scaleway/scaleway-cli/releases/tag/v2.26.0
updated scaleway-cli to 2.26.0
enabled doCheck and skipped all failing tests that require access to the scaleway API allowing other tests to run
configured installCheckPhase
added myself as a maintainer

Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[x] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[x] Tested basic functionality of all binary files (usually in ./result/bin/)
24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.


Cannot find -lcppurses

Whenever I try to compile my project I get this error:
/usr/bin/ld: cannot find -lcppurses
collect2: error: ld returned 1 exit status

My CMake file:
cmake_minimum_required(VERSION 2.8)

project(CPPursesTest)
add_executable(${PROJECT_NAME} "main.cpp")

target_link_libraries(${PROJECT_NAME} -lcppurses -lncurses -pthread)

The same thing happens when I compile it with this command:
% gcc -o program main.cpp -lcppurses -lncurses -pthread

Can anybody help me, please? Thanks in advance!

Okay, so after reinstalling the library using my package manager (I compiled it myself before) the error disappeared.


Decimal separator hangs

Open https://robinherbots.github.io/Inputmask/#/demo
Try entering 1234.12341234123412341234 in decimal input - the webpage will hang.

I suggest you limit the digits option to 9-10. Most of the time you don't evened need more than 2-3 decimal places, unless you are developing some scientific software where precision matters that much.

Fixed in c45a51b0fc142d737e81d21d1b32f4c1037ffdfa.


NativeScriptRouter Lazy Loading not working if component has hyphen "-" in name of component

Environment
"@angular/animations": "~7.1.0",
"@angular/common": "~7.1.0",
"@angular/compiler": "~7.1.0",
"@angular/core": "~7.1.0",
"@angular/forms": "~7.1.0",
"@angular/http": "~7.1.0",
"@angular/platform-browser": "~7.1.0",
"@angular/platform-browser-dynamic": "~7.1.0",
"@angular/router": "~7.1.0",
"core-js": "^2.5.4",
"nativescript-angular": "~7.1.0",
"nativescript-theme-core": "~1.0.4",
"reflect-metadata": "~0.1.8",
"rxjs": "~6.3.3",
"tns-core-modules": "~5.1.1",
"zone.js": "^0.8.26"
Describe the bug
** Call Lazy Loaded module **

{
path: 'main,
loadChildren: './main/main/main.module#MainModule'
},
Broken Route file

import { MainComponent } from '../main/main-main.component'; // notice the hyphen
const routes: Routes = [
{
path: '',
component: MainMainComponent
}

Working Route file

import { MainComponent } from '../main/main.component';
const routes: Routes = [
{
path: '',
component: MainComponent
}

Expected behavior

@abcfoundry can you share the error log (you can enable the route tracing with enableTracing: true)
I've created this test application which uses lazy loading + and a component that uses a hyphen and everything works as expected on my side. Let me know if there are some additional changes that need to be done to reproduce the issue.

I will recreate repository and see if this is still an issue.  If it is I will share more details.
cheers,
Art


Experimental: Overwrite with zero instead of random when shredding

shred default behavior is to write random data, but getting random data is slower than writing zeroes. In my small test with 8G file, I saw write with zeroes being almost twice faster than write with random. shred has option to add zero-fill at the end, but with setting number of random writes to zero, there will be only zero-write pass.
I want to see how this affects overall test duration.
Also, we may discuss is fill with zeroes actually enough for real operation of the plugin, instead of even more secure fill-with-random style.

This is not very good measurement as different PRs may bring various changes to timing, but timing list of recent jobs:
https://cloudnative-k8sci.southcentralus.cloudapp.azure.com/job/pmem-csi/view/change-requests/
indicate that job for this PR ran in almost 10% shorter time (5h5min) than other PRs close to it (5h30min):

I propose we consider changing our erasing methods as in this PR.
The stronger "overwrite with random" method (based on what I have been seen documented) is meant to extra-assure data is even harder to recover from hard drives compared to data overwritten with static pattern. But this claim seems has roots with technology where the media (like hard disk surface) can be post-analyzed with special tools out-of-box. In our PMEM case, data is memory value (no surface), so does it matter at all do we overwrite it with zero or random? I think not, and thus we should select the faster method. Using random data is slower and consumes system random data pool. Proposal: lets shred with zeroes.

Proposal: lets shred with zeroes.

I agree with this.


[Feature Request] Add customized tooltips

Hi, could we enhance Tooltip component let it be able to consume and render a React.ReactNode?
The effect just like Material-UI customized tooltip shows below.

You can customize tooltip as shown below:

@cheton
Wow, fantastic!
Let it be documented. A helpful tooltip example.

@cheton
Tooltip's label property could be ReactNode type!

It's a kind of mistake in the API document. I will create a PR to fix incorrect value in docs. Thank you.

@cheton
And would you like add a customized HTML Tooltip example to Tonic Styled UI demo page? It's so cool!

@zihengCat

Added in PR #316


WIP: Escape non janet values from the repl as a string

Fixes #211
This isn't done, but I wanted to get it up to see what you thought of the idea. Essentially it's just doing essentially what (I think) @bakpakin was suggesting. We add our own peg for janetsh, which allows embedded janet values, but also raw tokens that are not limited to valid janet symbols. Those tokens are then escaped as strings before being passed to ($ ...).
This seems to work, but I could be missing something. Or there could be a better way to do this. For example, we might want to expose something to the user that they could call like ($-raw "ls 1.png") or something.
Note also this is my first time writing a PEG, so if things can be done more cleanly, let me know.

Thank you for experimenting with this.  A huge downside to this approach is it entirely breaks expectations in script mode.
I am not yet convinced this work around is better than just having users understand that janet shell is a janet repl more than 'sh'. Perhaps we could just have an explanation in a well written tutorial telling people to use quotation in this case?
The thing I am most concerned about floats being reprinted differently from what a user typed. It is a correctness foot gun which bothers me much more than the error messages about symbols starting with numbers.
In any case, I am still quite tempted to close #211 as won't fix (after changing keywords).

Something like this makes some sense to me as a user extension/plugin that can be advertised so people can make the explicit choice.

The thing I am most concerned about floats being reprinted differently from what a user typed. It is a correctness foot gun which bothers me much more than the error messages about symbols starting with numbers.

Why do we need to parse everything, and then write it back via (buffer/format buf "(sh/$? %s)\n" (escape-raw-line line))? Couldn't the peg parse the arguments and invoke sh/$? on them directly? I think that would eliminate correctness and reprinting issues.

here is the problem with numbers:
$ echo 1.34322343243232432432532432432432
1.34322

The truncation is because of number precision, obviously not what the user intended.

I think the issue here is that the peg defines :value to be (+ :janet ... :number). If :janet were last in the ordered choice, the long number would be converted to a string before it was truncated.

An example of why I object to this change as is:
This will be totally ok:
echo 1.c

But now this is broken because it doesn't use the string version of the macro:
(and ($ echo 1.c) ($ echo 2.c))

Yeah, if you want to be able to have identical syntax inside ($ ...), you would need either a completely custom parser, wrap the whole command in quotes, or just live with the fact that some tokens will need quotes that wouldn’t otherwise. I think the original problem isn’t so bad in retrospect.

Maybe a case of https://en.wikipedia.org/wiki/Worse_is_better

Hmm, my initial reaction was that not being able to, for example, cat files starting with numbers without quoting them would be very annoying. In practice though, such files are probably not much more common than ones containing parenthesis. I think you may be right and just documenting this is a better solution. I'll think on this a bit more an probably close this PR if I can't come up with any compelling cases where it would be a problem.

Hmm, looking at my bash history, there are quite a few cases where I would need to quote things with janetsh without this pr. For example, any git command using a hash would need the hash quoted, as well as any branch creation starting with a number (like this branch, which I think is a common idiom). Even more significantly, any ip address would need to be quoted. I think those together are a pretty significant usability issue, and suggest that we should not consider this something that we should close as just a documentation issue (though I am not saying this particular PR is the best approach).

I'm not sure what can be done without adding something like a parser macro to janet that lets you overload the janet parse module within the brackets. I do think that would be pretty cool, but it has been ruled out as overcomplicated.
Some research could be done as to how racket adds this feature to make a more informed proposal.

This seems to work, but I could be missing something.

@ALSchwalm I've been playing with this for few days now and there were some things missing. I've added/modified (see x4lldux/janetsh@cebd3572f7ab0b808f5cc8b19a9a37ec054d9b96) to make it more bearable in day to day use:

quoting (any thing after a quote was removed),
support for double & single quotes (single quotes are translated to double quotes and any double quote in them is escaped),
support for env variables (env vars were quoted as strings and weren't interpolated by janetsh),
redirecting (it was impossible to redirect stderr),
support for escaping spaces (translates it to a quoted string)

But still something like echo "User's home dir is $HOME" is not possible.

A huge downside to this approach is it entirely breaks expectations in script mode.

@andrewchambers I think it's actually the opposite. Shell users expect to be able do the same things in scripting mode as they can do in shell mode. In Janetsh you can write expression ls | wc -l in shell but you can't do that in script where you need to enclose it in sh/$ functions/macros. Whilist you can use the same expresion in both scripting and shell mode in other lisp shells like Closh or Eshell (Emacs Lisp shell).
Right now janetsh scripting is nothing more than a janet scripting (even sh module is not auto imported) - so what's the use case here? Users wanting to write Janet scripts, can just use plain Janet.

I am not yet convinced this work around is better than just having users understand that janet shell is a janet repl more than 'sh'.

@andrewchambers IMHO, this work is a step in a right direction.

That said, I don't think that needing to quote things that start with a number is such a problem in the first place, as long as its possible to enter any possible filename.

@bakpakin  Unless you're a sys-admin or and has to deal with a lot of IP addresses (also port numbers, git hashes, orprocess ids). Quoting starts be annoying real quick.

Janet shell could fairly easily implement it's own reader by forking the parser module, but then it is no longer janet code and we might as well change the name.

@andrewchambers It still would be janet code but it would be enhanced to be more usable in a shell environment. Once again, look at Closh or eshell (Emacs Lisp shell).

echo "User's home dir is $HOME"

This is something that can be fixed at the macro level and I am interested in fixing this.

Right now janetsh scripting is nothing more than a janet scripting

Yes this is by design, Not compatibility with janet is a feature. The only reason the 'sh' mode in scripting is not just a janet library is that janetsh has a 'runtime' to do with signal handling.

Whilist you can use the same expresion in both scripting and shell mode in other lisp shells like Closh or Eshell

Last time I used closh it did not have a scripting mode at all. I don't really have too much interest in Eshell or Elisp.

@bakpakin Unless you're a sys-admin or and has to deal with a lot of IP addresses (also port numbers, git hashes, orprocess ids). Quoting starts be annoying real quick.

IP addresses are definitely annoying.

It still would be janet code but it would be enhanced to be more usable in a shell environment. Once again, look at Closh or eshell (Emacs Lisp shell).

It still would be janet code but it would be enhanced to be more usable in a shell environment. Once again, look at Closh or eshell (Emacs Lisp shell).
I feel the only way this is going to get implemented is if Janet gets a custom reader api. I know GNU guile has an api that should make this possible, it is probably quite doable to port janetsh to guile scheme which may be a fun experiment.

Last time I used closh it did not have a scripting mode at all. I don't really have too much interest in Eshell or Elisp.

I know GNU guile has an api that should make this possible, it is probably quite doable to port janetsh to guile scheme which may be a fun experiment.

I'm not advertising to change Janet lisp to some other lisp language, but that both Closh and Eshell were able to retain it's lisp-iness and also get shell-iness.

Yes this is by design, compatibility with janet is a feature.
That creates inconsistency between what you can do interactively & in scripting mode.

I feel the only way this is going to get implemented is if Janet gets a custom reader api.

Not necessarily. We can use transpilation. In a sens it has always been used with implicit parens, while this PR extends it further by using PEG's replace to quote tokens or automatically add a colon before redirects.
To do this, we could add an import-sh function, which would work like import but would first transpile from Janetsh to Janet (maybe via that ($-raw "foo")). That would need to create a version of dofile & require. Or if @bakpakin would allow to add custom transformation to be run before loading a file on dofile we could skip those -sh functions all together. Maybe a  custom module/loaders kind could also work here...

This is basically my original suggestion, although I had not originally envisioned using dofile. Perhaps dofile could take some data structure for reading forms, and this would make it easier. However, if you read through dofile, it shouldn’t be too hard to modify for the needs of janetsh.

I hit  #217,  the more issues I encounter the more likely this is to be merged, so don't give up hope totally.
We should also consider some edge cases.
($ "ls -la (+ 1 2 3) ")
($ "ls -la" (+ 1 2 3))
($ "ls -la" (+ 1 2 3))

@x4lldux janet already supports custom loaders btw, so we definitely could do that.

@andrewchambers I don't :) In fact, after reading through bakpakin/mendoza repo some more, I did find that Janet already supports custom loaders and was I planning to start working on it. Just now, it would translate to ($ ) in the form it is defined right now, so I could just concentrate in unification of shell/repl & script mode.  But that is a little different story than this PR and #211.


fix "add custom network" opening "edit network" modal

Fixes https://linear.app/thirdweb/issue/FTD-1648#comment-84e8ecf3
and some code cleanup

📝 Changed routes:

/evm/[...paths]

(view full size)

Commit 257942f4615b415bc71709bd651a8ed6570aa9aa (https://thirdweb-l5aeubkjm.thirdweb-preview.com).


fix: update pyircsdk module

:tada: This PR is included in version 1.0.3 :tada:
The release is available on:

v1.0.3
v1.0.3
GitHub release

Your semantic-release bot :package::rocket:


Include updating context_uri along with tracks and current index

Some more low-hanging fruit but useful for other things. It also allows remote clients to show the green now-playing indication (#57).

So I didn't realise that shuffle and repeat were also not updated. Is there a reason we don't just copy all of the incoming State in response to kMessageTypeLoad?

I can change this to copy the whole entire state. Or not, I'm not bothered. But we do want these three fields at least.

I think you can probably copy all state, unless you or someone else can think of a reason for not doing so. Also I've held off merging this as it looked like you were trying to add support for retrieving tracks from the context_uri in Gitter. Are you still working on that/should I hold off on merging this, or should that functionality be done in a seperate PR later on?

I am looking at that but that's very separate to this. I'd prefer this just be merged.

Ok, will merge this. If you later decide to copy all state, that can be handled in a subsequent PR.


parser+ast: remove MethodCall and finalise work on Expr::Access

This patch reworks how the parser deals with "singular expressions". There is now a loop that essentially tries to continue parsing "chunk" connectors like ::, <, ., [, ( and then the relevant inner expression, and then continues to try and parse the next chunk until it runs out of tokens or it didn't match any more applicable connecting tokens.
closes #394
closes #403

I think I am going to do this in a separate PR, same with a type variant


make method non-static

Cool!  One more small change tied with this.  Could you take a look? getProjectPath doesn't need to be static anymore either.


abs responds to exit

Problem
when running ledger-tool, sometimes startup background operations take a long time (clean, shrink, etc.).
Summary of Changes
Abort the accounts background service loop in between operations when exit is set.
Fixes #

Codecov Report
Attention: Patch coverage is 60.00000% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 81.8%. Comparing base (0025ecd) to head (0298d70).
Report is 9 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##           master     #664     +/-   ##
=========================================
- Coverage    81.8%    81.8%   -0.1%
=========================================
  Files         851      851
  Lines      230370   230374      +4
=========================================
- Hits       188669   188618     -51
- Misses      41701    41756     +55

thoughts?

this helps because nothing else runs after clean. It does not interrupt clean in the middle of clean. It does prevent shrink and ancient shrink. Thus, if we also merge something that allows ledger tool to skip the initial clean, then this will help with solving the problem. But, it is not a complete solution.

if we were to interrupt clean by triggering exit, then something like this would still be required to not start another operation. So, this is required by any solution that also interrupts clean, for example.

@jeffwashington - Finally got around to testing this out; this PR did not avoid the holdup described in https://github.com/anza-xyz/agave/issues/346.
Here are logs from verifying a couple hundred slots with this PR:
[2024-05-29T17:15:02.444948540Z INFO  solana_metrics::metrics] datapoint: accounts_db_active hash=1i
[2024-05-29T17:15:02.446397061Z INFO  solana_metrics::metrics] datapoint: accounts_db_active hash_scan=1i
[2024-05-29T17:15:02.872101391Z INFO  solana_metrics::metrics] datapoint: accounts_db_active flush=1i
[2024-05-29T17:15:02.872113364Z INFO  solana_metrics::metrics] datapoint: accounts_db_active flush=0i
[2024-05-29T17:15:02.872115558Z INFO  solana_metrics::metrics] datapoint: accounts_db_active clean=1i

[2024-05-29T17:17:23.121183654Z INFO  solana_ledger::blockstore_processor] ledger processed in 2 minutes, 20 seconds, 246 ms, ...

[2024-05-29T17:17:42.029377762Z INFO  solana_metrics::metrics] datapoint: accounts_db_active hash_scan=0i
[2024-05-29T17:17:42.066207558Z INFO  solana_metrics::metrics] datapoint: accounts_db_active hash_dedup=1i
[2024-05-29T17:18:00.965311654Z INFO  solana_metrics::metrics] datapoint: accounts_db_active hash_dedup=0i
[2024-05-29T17:18:00.980008602Z INFO  solana_metrics::metrics] datapoint: accounts_db_active hash_merkle_tree=1i
[2024-05-29T17:18:02.218567428Z INFO  solana_metrics::metrics] datapoint: accounts_db_active hash_merkle_tree=0i
[2024-05-29T17:18:13.628383972Z INFO  solana_metrics::metrics] datapoint: accounts_db_active hash=0i
[2024-05-29T17:18:13.661989984Z INFO  solana_metrics::metrics] datapoint: accounts_db_active hash=1i
[2024-05-29T17:18:13.663247821Z INFO  solana_metrics::metrics] datapoint: accounts_db_active hash_scan=1i
[2024-05-29T17:18:19.393629231Z INFO  solana_metrics::metrics] datapoint: accounts_db_active hash_scan=0i
[2024-05-29T17:18:19.393751724Z INFO  solana_metrics::metrics] datapoint: accounts_db_active hash_dedup=1i
[2024-05-29T17:18:20.100557640Z INFO  solana_metrics::metrics] datapoint: accounts_db_active hash_dedup=0i
[2024-05-29T17:18:20.105439944Z INFO  solana_metrics::metrics] datapoint: accounts_db_active hash_merkle_tree=1i
[2024-05-29T17:18:20.146674334Z INFO  solana_metrics::metrics] datapoint: accounts_db_active hash_merkle_tree=0i
[2024-05-29T17:18:21.851065346Z INFO  solana_metrics::metrics] datapoint: accounts_db_active hash=0i
[2024-05-29T17:25:31.015283032Z INFO  solana_metrics::metrics] datapoint: accounts_db_active clean=0i

Same as before, we start the clean and then are waiting for it to finish


build: Build movement-controller image in CI

This PR will always build the movement-controller image that is used in some demos.

Can you explain why? I thought that you only use it for local testing and otherwise it is bundled in the manager

We're using the image quite a bit for internal demos. And like this it's easy to access it. Also it can be very useful for the mover development as it helps to deploy a minimal setup to quickly test changes to the motion controller in a K8s integrated scenario.


Delayed execution of task nodes

Search before asking

[X] I had searched in the issues and found no similar feature requirement.

Description
我的服务是32+64资源的三节点集群，每天运行大概20000左右任务，但是发现有很多任务延迟执行，任务的并发量我调节到了96，这个延迟执行的原因是什么？请有经验的大佬告知一下
Are you willing to submit a PR?

[X] Yes I am willing to submit a PR!

Code of Conduct

[X] I agree to follow this project's Code of Conduct

Please using english to describe.

My service is a three-node cluster with 32+64 resources. It runs about 20,000 tasks per day, but I've found that a lot of them are delayed in execution. I adjusted the number of task concurrency to 96. What are the reasons for the delay in execution? Can someone with experience tell me?

请用英文来描述。
My service is a three-node cluster with 32+64 resources. It runs about 20,000 tasks per day, but I've found that a lot of them are delayed in execution. I adjusted the number of task concurrency to 96. What are the reasons for the delay in execution? Can someone with experience tell me?


Doc: Could you add  some documentation please! Nice work!

started adding some documentation. Will try to finish it all soon.


NNDescent.update(X) not working as expected

I wanted to do the following:

Create a NNDescent object from the first batch of data.
Query some data.
Wait for some time.
Update the object with new data, but not start from scratch.
Query some data.

I assumed that NNDescent.update(fresh data) would do the trick. However, maybe I am using it in a wrong way, since it seems that the returned neighbours are only those from the first batch of the data. While inspecting index = NNDescent(...) after the update in debug mode I discovered that

index._raw_data and index.neighbor_graph (and index._neighbor_graph) seem to be updated properly (the indices of the neighbours of all 205 instances follow the basic intuition - see below),
index._vertex_order was not updated properly (it still has the length of 100 and not 205).

 Thus, the nearest neighbours of the instance i (0 <= i <= 204) should typically be i, i - 1, i + 1, i - 2, i + 2, ... (possibly not in this exact order). However, the code below says that the neighbours of the instances i >= 100 (those from ys) are 99, 98, 97 ... which suggests that the neighbours were found only among xs.
The actual output of the code below (indices/distances):
[99, 98, 97, 96, 95, 94, 93, 92, 91, 90]
[98, 99, 97, 96, 95, 94, 93, 92, 91, 89]
[99, 98, 97, 96, 95, 94, 93, 92, 91, 90]
... (some lines omitted)
[99, 98, 97, 96, 95, 94, 93, 92, 91, 90]
[99, 98, 97, 96, 95, 94, 93, 92, 91, 90]

[2.1192119121551514, 2.8882203102111816, 4.930568218231201, 5.635573387145996, 6.850753307342529, 7.7378249168396, 8.205963134765625, 9.593037605285645, 10.798347473144531, 11.230871200561523]
[4.201259613037109, 4.454722881317139, 5.768087387084961, 6.7560529708862305, 7.452332973480225, 8.632887840270996, 9.428315162658691, 9.682640075683594, 11.393900871276855, 13.470145225524902]
[4.810489654541016, 5.09433650970459, 6.398769378662109, 7.656699180603027, 8.318954467773438, 9.736209869384766, 9.871195793151855, 11.387312889099121, 12.959441184997559, 13.922148704528809]
... (some lines omitted)
[105.62753295898438,<PHONE_NUMBER>9511719,<PHONE_NUMBER>3808594,<PHONE_NUMBER>5341797,<PHONE_NUMBER>2529297,<PHONE_NUMBER>9873047,<PHONE_NUMBER>4453125,<PHONE_NUMBER>6259766,<PHONE_NUMBER>584961,<PHONE_NUMBER>7734375]
[106.41008758544922,<PHONE_NUMBER>6738281,<PHONE_NUMBER>6748047,<PHONE_NUMBER>2949219,<PHONE_NUMBER>8955078,<PHONE_NUMBER>7626953,<PHONE_NUMBER>8828125,<PHONE_NUMBER>3027344,<PHONE_NUMBER>1113281,<PHONE_NUMBER>7998047]

The code:
import numpy as np
import pynndescent
import pickle
import os
import numba

@numba.njit()
def my_manhattan(x, y):
    return np.sum(np.abs(x - y))

def test3():
    n_x = 100
    xs = np.random.rand(n_x, 5)
    xs[:, 0] = np.arange(0, n_x, 1)
    n_y = 105
    ys = np.random.rand(n_y, 5)
    ys[:, 0] = np.arange(n_x, n_x + n_y, 1)
    index = pynndescent.NNDescent(xs, metric=my_manhattan, n_neighbors=5)
    # index.prepare()
    k = 10
    ns_x, ds_x = index.query(xs, k=k)
    index.update(ys)
    # index._init_search_graph()
    ns_y, ds_y = index.query(ys, k=k)
    for n_y in ns_y:
        print(n_y.tolist())
    print(" ")
    for d_y in ds_y:
        print(d_y.tolist())

test3()

I installed pynndescent via pip.

It is quite possible there is a bug here -- it is likely we need to rebuild the supporting data (including recompiling the query function) for querying. Thanks for spotting this. I'll see if I can figure something out soon.

Ok, then I will just try to find a workaround. It seems that simply constructing a new NNDescent object with init_graph=... should do: init graph would contain the "correct" neighbours for already known data and random ones for the fresh part.

This works for me and is probably not that far from a "proper" solution (e.g., the sparse case is not covered).
def update_graph(index: pynndescent.NNDescent, xs_fresh):
    ns, _ = index.neighbor_graph
    n, k = ns.shape
    n_fresh = xs_fresh.shape[0]
    ns = np.vstack((ns, np.random.randint(0, n + n_fresh, size=(n_fresh, k))))
    data = np.vstack((index._raw_data, xs_fresh))
    return pynndescent.NNDescent(data, metric=my_manhattan, n_neighbors=k, init_graph=ns)

def test3_2():
    n_x = 100
    xs = np.random.rand(n_x, 5)
    xs[:, 0] = np.arange(0, n_x, 1)
    n_y = 105
    ys = np.random.rand(n_y, 5)
    ys[:, 0] = np.arange(n_x, n_x + n_y, 1)
    index = pynndescent.NNDescent(xs, metric=my_manhattan, n_neighbors=25)
    index.prepare()
    k = 10
    ns_x, ds_x = index.query(xs, k=k)
    index = update_graph(index, ys)
    ns_y, ds_y = index.query(ys, k=k)
    for n_y in ns_y:
        print(n_y.tolist())
    print(" ")
    for d_y in ds_y:
        print(d_y.tolist())
    z = index.neighbor_graph
    print(z)

Yes, the init_graph option should do the job; it's not quite as good as what update should be, but hopefully will provide a workaround until I can get it working properly. Your use case is definitely intended, it just wasn't properly debugged apparently.

So in good news this actually looks quite fixable. There are just some annoying kinks to work out to make sure it is reasonably smooth. Hopefully I'll have a fix in shortly.

I have tested the solution (mostly for its speed as compared to the init_graph approach - indeed, the proper solution is considerably faster). One update seems to work, even two in a row. Strangely, after the third update, things start to go wrong:

the third update causes SpaceEfficiencyWarning (also note that query time in this round is considerably longer that the previous ones (cca. 50 seconds),
the fourth update causes IndexError.

Here are the code and its full output:
Code
import numpy as np
import pynndescent
import numba
import time

np.random.seed(1234)

@numba.njit()
def my_manhattan(x, y):
    return np.sum(np.abs(x - y))

def test3_2():
    n_x = 10**5
    xs = np.random.rand(n_x, 5)
    xs[:, 0] = np.arange(0, n_x, 1)
    n_y = 10**5
    t0 = time.time()
    index = pynndescent.NNDescent(xs, metric=my_manhattan, n_neighbors=25)
    t1 = time.time()
    print("init1", t1 - t0)
    index.prepare()
    t2 = time.time()
    print("prep1", t2 - t1)
    k = 10
    ns_x, ds_x = index.query(xs, k=k)
    print("quer1", time.time() - t2)
    for i in range(6):
        print("#################################")
        print(f"round {i + 1}")
        print("#################################")
        t3 = time.time()
        ys = np.random.rand(n_y, 5)
        ys[:, 0] = np.arange(n_x + i * n_y, n_x + (i + 1) * n_y, 1)
        # index = update_graph(index, ys)
        index.update(ys)
        t4 = time.time()
        print("updat", t4 - t3)
        index.prepare()
        t5 = time.time()
        print("prep2", t5 - t4)
        ns_y, ds_y = index.query(ys, k=k)
        t6 = time.time()
        print("quer2", t6 - t5)

test3_2()

Output
C:\Users\...\pynnd\Scripts\python.exe C:/Users/..../fast_nn/pynnd_test.py
init1 34.970775842666626
prep1 26.96660089492798
quer1 0.8135221004486084
#################################
round 1
#################################
updat 24.724597454071045
prep2 0.0
quer2 0.7625434398651123
#################################
round 2
#################################
updat 24.66456961631775
prep2 0.0
quer2 0.858508825302124
#################################
round 3
#################################
C:\Users\...\pynnd\lib\site-packages\scipy\sparse\_index.py:125: SparseEfficiencyWarning: Changing the sparsity structure of a csr_matrix is expensive. lil_matrix is more efficient.
  self._set_arrayXarray(i, j, x)
updat 16.782644987106323
prep2 0.0
quer2 49.37075424194336
#################################
round 4
#################################
C:\Users\...\pynnd\lib\site-packages\scipy\sparse\_index.py:125: SparseEfficiencyWarning: Changing the sparsity structure of a csr_matrix is expensive. lil_matrix is more efficient.
  self._set_arrayXarray(i, j, x)
Traceback (most recent call last):
  File "C:/Users/.../fast_nn/pynnd_test.py", line 129, in <module>
    # test3()
  File "C:/Users/.../fast_nn/pynnd_test.py", line 118, in test3_2
    index.update(ys)
  File "C:\Users\...\pynnd\lib\site-packages\pynndescent\pynndescent_.py", line 1744, in update
    self.prepare()
  File "C:\Users\...\pynnd\lib\site-packages\pynndescent\pynndescent_.py", line 1587, in prepare
    self._init_search_graph()
  File "C:\Users\...\pynnd\lib\site-packages\pynndescent\pynndescent_.py", line 1126, in _init_search_graph
    self._vertex_order = self._search_forest[0].indices
IndexError: list index out of range

I think I found the remaning bug. Will create a pull request


Add automatic setting of zeroLineIndex

Closes: #5032

Please run gulp lint locally. There are some lint errors in this PR

@dariobraun just a reminder that there are pending comments on this PR

@dariobraun I'm going to temporarily close this PR since we haven't gotten any response on it. If you're able to make the suggested changes, please feel free to reopen it


Difference between n_it and actual function execution in optimize

Hello,
I try to use your BFGS algorithm for an optimisation problem, where
each function execution is quite costly.
The problem is that it seems that the first iteration step is performed twice
I assume this is for testing determinedness?
Can I switch it off?
Besides the number of iteration in the optimized result instance differs from the number of actual iterations. Is this due to not counting line searches?
Reproducing code example:
def f(v):
    x, y = v
    return x ** 2 + y ** 2

def grad_f(v):
    x, y = v
    return np.array([2 * x, 2 * y])

def combined(v, times_executed=[0]):
    times_executed[0] += 1
    print('Function was actually executed {} times'.format(times_executed[0]))
    return f(v), grad_f(v)

result = minimize(combined, x0=np.array([1, 1]), jac=True, method='BFGS')
print('Scipy says {}'.format(result.nit))

STDOUT:
Function was actually executed 1 times
Function was actually executed 2 times
Function was actually executed 3 times
Function was actually executed 4 times
Scipy says 2

Scipy/Numpy/Python version information:
0.19.1 1.13.3 sys.version_info(major=3, minor=6, micro=2, releaselevel='final', serial=0)

What you need to look at is result.nfev.
Consider the following examples:
import numpy as np
from scipy.optimize import minimize, rosen, rosen_der
class fun(object):
    def __init__(self):
        self.calls = 0
        self.jcalls = 0

    def combined(self, x):
        self.calls += 1
        self.jcalls += 1
        return rosen(x), rosen_der(x)

    def indiv(self, x):
        self.calls += 1
        return rosen(x)

    def jac(self, x):
        self.jcalls += 1
        return rosen_der(x)

f = fun()
res = minimize(f.indiv, x0=np.random.random(10), jac=False, method='BFGS')
print(f.calls, res.nfev)

f = fun()
res = minimize(f.combined, x0=np.random.random(10), jac=True, method='BFGS')
print(f.calls, f.jcalls, res.nfev, res.njev)

f = fun()
res = minimize(f.indiv, x0=np.random.random(10), jac=f.jac, method='BFGS')
print(f.calls, f.jcalls, res.nfev, res.njev)

gives:
588 588
52 52 51 51
42 42 42 42

If you don't provide minimize with a Jacobian then res.nfev is correct.
If you provide a combined function returning (fun, jac) then an extra function evaluation is required to make sure the returned value from the function is indeed the fun and jac.
If you provide a callable to the jac kwd then res.nfev and res.njev are correct.

Thank you very much for your answer. From this logic I would expect the result to be:
(If it is just one additional function evaluation).
588 588
43 43 42 42
42 42 42 42

But in any way, this should be made more clear in the documentation.
Our minimization problems for example are near the the minimum and require around 20 iteration steps but have very costly single point calculations. So already one additional iteration step is quite bad for performance reasons.
I can make a PR for the documentation.


Question on Restangular and PUT request

I have a question about the way that this project handles PUT requests, and I would like to have your input on whether we should / how to refactor the codes, thanks.
The standard restful PUT request should be sent like this:
PUT /api/roles/1

where 1 is the ID of the object to update. However, the front end of this project sends the PUT request like this:
PUT /api/roles

and then back end takes the object in request payload to update the one in DB. So in this case it works fine, but if I define resource like this in routes.php
$api->resource('vacancies', 'VacancyController');

the PUT requests without ID won't work. Back end only takes the one with ID because that is how PUT should be coded. I did some investigation on why Restangular in this project behaves like this, and it is related to how back end responded the original GET request:
{"errors":false,"data":{"id":2, "xxx": "xxxxxxx"}}

the data object is wrapped inside so Restangular is unable to get the data ID, and also when the PUT request is sent, this whole thing including {"errors":false, ... is included in the PUT request - while it should be just the data object.
I would like to seek you guys' opinions on whether this should be changed, and if needed, which way we should do. I am happy to submit PR for this.

Option 1: In API.service.js, add logic in addResponseInterceptor to return only the data object inside (if no error), but this may add difficulties when we need to handle things like pagination
Option 2: Update Restangular.configuration.getIdFromElem to get the ID correctly. In this case the {"errors":false, ... parts are still sent back during PUT requests
Option 3: Not to make any changes

Thanks.

actually what i liked about the current is that you could simply put the returned object in an instance and simply do a this.role.put() which is all being handled by restangular,  that i think save coding time and make things simpler, i think that was the reason i gave up the api/roles/1 standards. specially PUT is the verb being used and its being done on a background (ajax) anyway. also another disadvantage is that you get ugly remote method name like for this example putRolesShow


Feature/add first post issue 3

edited a sample post for details re: upcoming Gyst Rewind episode
added a sample post of an existing Gyst Rewind episode
this initial PR should resolve #3

👷 Deploy Preview for stately-mochi-93d6d5 processing.

Name
Link

🔨 Latest commit
8dbce8b956de104698cf7fec129e4cd5954e27bc

🔍 Latest deploy log
https://app.netlify.com/sites/stately-mochi-93d6d5/deploys/64de4d0d1d0e280008c4e5e8

hi it's me not me don't forget

nice job me


Support of Cmake.

Adding support of CMake, adds possibility to easily integrate uWebSockets to other C++ projects.
For my project I wrote small CMakeLists.txt for uWebSockets and it works very well. So If maintainer of project agrees to add Cmake support I could prepare PR.

No thank you. Anything "build system" is unnecessary friction and nobody will ever agree on anything. We use 1970s Makefile because it does the job and has done for 5 decades.

it is not about build-systems debate, it is about integration, - allows people to use it.
people ask themselves how to plug this into any test project on windows, a: let's use make, it knows to generate vc++ projects. or better let's use vcpkg it will download all dependencies, but then how...
I solved it by:
C:\vcpkg\vcpkg.exe install uwebsockets --triplet x64-windows
and CMakeLists.txt file (only relevant basics are here):
cmake_minimum_required(VERSION 3.9)
set(CMAKE_TOOLCHAIN_FILE "C:/vcpkg/scripts/buildsystems/vcpkg.cmake")
project(app)
set(CMAKE_CXX_STANDARD 20)
find_package(ZLIB REQUIRED)
find_library(USOCKETS_LIB uSockets)
find_package(unofficial-libuv CONFIG REQUIRED)
find_library(LIBUV_LIB libuv)
find_path(UWEBSOCKETS_INCLUDE_DIR uwebsockets)
include_directories(${UWEBSOCKETS_INCLUDE_DIR})
add_executable(app app.cpp)
in vcpkg only on windows package uwebsockets is installed with libuv
target_link_libraries(app PRIVATE
ZLIB::ZLIB
${USOCKETS_LIB}
${LIBUV_LIB}
)

@alexhultman-2fa
It will also gain popularity among the young generation as they usually start cpp with CMake.
Uneasy integration of the lib will also make them turn to other libs...

It's ultimately a problem of time and energy.
I did have CMake in this project 5 years ago, and I did deal with all the dissatisfied people constantly making changes to the CMake-files becuase "they needed to".
Since I removed CMake I have stopped getting tons and tons of PR only about CMake. And when you have CMake you get a lot of people saying that you should have Meson, and Bazel and whatnot.
 If you can't infer how to compile a header-only standards compliant project you're not the intended audience anyways.
If you want to make a test - add CMake and maintain it - see how that goes.

The problem is also that I've used CMake on Windows since pretty much it was created way back, and I have ALWAYS been greatly dissatisfied with it. C++ development on Windows is and has always been horrible in that regard.
Makefiles work really well on Linux and macOS and other Unix-like systems and those are pretty much the only platforms I care about anyways so I don't care about Windows being impossible without CMake. It's a non-issue.

Then you have the problem of CMake abstracting the compiler and wrapping important flags into their own flags, often times putting many years of delay on new flags that are brand new. I remember once where a bug in CMake made it impossible to perform a certain thing for many many months. It's a wrapper that's distancing you from the compiler and it is the complete opposite of where I stand. A developer should be one with his compiler and know it intimately.

OK, this is a fair-enough answer.
As I'm mainly developing Windows, I guess I'm not among the intended audience of this library.
I think CMake system has improved a lot during the past 5 years, and becomes almost a standard for cross-platform stuffs.
so if you, in the future, have any interest in making this lib more cross-platform, give it a try, if possible.
In the meantime, thank you for your time and answer.

I swapped from Windows to Linux in 2006 for doing C++ development and the difference in developer experience is jaw dropping.
Clang on Linux with proper tools like AddressSanitizer is the way to go. Then you can get rid of half-assed wrappers like CMake.

find_package(ZLIB REQUIRED)

Finding a package is a Windows-only problem. On Unix you have packages in /usr/include or maybe in /usr/local/include.  And it doesn't even find C:/Zlib which is where the official installer puts it. So it fails to even perform its very purpose. And you want me to add this crap? Never.

hehe yes it is an old problem

Check ‘vcpkg’ please.
On 14 Mar 2021, 22:17 +0100, Shimon Doodkin @.***>, wrote:

hehe yes it is an old problem
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.

vcpkg works I used uWebSockets from vcpkg

I don’t recommend any build system, but what I want to say is that I can’t find a one-click compilation method. I have failed many times. I believe that many people repeat this failure, but there is no silence and choose to give up.

If one click is all the attention you are willing to invest in this project then you clearly do not fall in the category of "audience".
I can clone this lib on Linux and Mac, hit "make" and have example binaries compiled and working within a minute.
Whether we provide a plugin to your Tamagochi set up or not is irrelevant, you as user are encouraged to set up whatever build system you need to solve your problems.

I would never recommend cmake myself, either -- a turing-complete program just for figuring out the correct $CXXFLAGS $LDFLAGS? What the heck.
However, this project's own Makefile seems to indicate you need -pthread, -lz, and the uSockets.a installed by the project available as a git submodule, in order to successfully link the example applications. Looking at the actual headers, <thread> and <libusockets.h> are unconditionally required, <zlib.h> is required if you don't pass certain defines to disable it, so... seems reasonable that you do need it.
A simple key: value pkg-config text file exposes exactly that for people who have done make install, and pkg-config is the unix standard. It has a defined unixy location to search for the file. It's trivially usable from any build system -- Makefiles, autotools, waf, scons, meson, even cmake (though cmake makes it really complicated to use for bizarre reasons). If Tamagochis don't support pkg-config already, it would be trivial to add support (may need to speak to the Tamagochi developers).
You can even use pkg-config on Windows, but you'll need to set up a global search path for pkg-config; still, that's not a bad investment, because you consolidate knowledge of installed libraries in one place. Windows package managers like conan can automate this for you, or so I've heard.
So that seems like a reasonable thing to add -- switching build systems, less so. Make is a perfectly reasonable build system if you don't need to do anything complicated, and the world is full of Makefile-using projects.

@shimondoodkin Were you ever able to get uWebSockets statically linked to your Visual Studio C++ project?  I am able to get the statically linked libs doing the vcpkg install uwebsockets:x64-windows-static and I can even build against them.  The problem I am having is that the dll runtimes need to be next to the executable for it to run.  I thought that using static libraries would allow dev to NOT have to ship the dlls.  Any ideas why the -static install from vcpkg requires the .dlls
See here for more details:  https://stackoverflow.com/questions/72931905/uwebsockets-static-library-installed-via-vcpkg-but-dll-are-still-needed-for-exec

Look at this https://github.com/Kitware/CMake/blob/master/Modules/FindZLIB.cmake

Strictly speaking I think Find*.cmake modules are mostly soft-deprecated. It's expected that vendor provides CMakeLists file, not some third-party.

It's expected that vendor provides CMakeLists file, not some third-party.

Well, I do dearly hope third parties don't provide CMakeLists.txt, which is distinct from Find*.cmake.

@eli-schwartz I mean CMakeLists.txt would generate necessary package information modules and install them instead of FindFoo.cmake.

Why what it seems to be the best C++ websocket lib is maintained by a smartass cave man who think its 1970 hand written makefile is better than a modern build sytem because "it compiles fine on my environment" :sigh:

I would like to speak in defense of handwritten Makefiles for projects that don't actually make use of any of the functionality which a "modern" build system provides.
However I noticed that the current Makefile now compiles build.c and executes it, and build.c is responsible for executing the compiler via system().

When you need to cross-compile a project from linux to windows with a mingw toolchain with many libs as shared libs, a functionality like cmake -S . -B build  -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN} -DBUILD_SHARED_LIBS=ON make the things quite simple. Spending time figure it out how to do the same "by hand" is just painful, regarding the number of issues about building shared lib or compiling in windows this project I am not the only one thinking it.
I'm going to setup vcpkg in my docker builds env to reuse my CMake toolchain and do the job.

Why what it seems to be the best C++ websocket lib is maintained by a smartass cave man who think its 1970 hand written makefile is better than a modern build sytem because "it compiles fine on my environment" :sigh:

Is it good because I'm a cave man, or am I a cave man because it is good?
Clearly it's good because I'm a cave man, because what you are looking for (shared lib compilation) will ruin performance by 80%.
The lib is good, exactly because I don't make it easy to do the wrong thing. You want easy shared lib compilation on windows - both of which lower performance to 10% of where you would be with LTO compiled static lib on Linux.
That's why, the lib is good, exactly because I'm a cave man. Oogha boogha smash

When you need to cross-compile a project from linux to windows with a mingw toolchain

Literally just setting $CC and $CXX, handwritten Makefiles and all. I've done this for lots of projects with handwritten Makefiles.

with many libs as shared libs

This is a valid case of

projects that don't actually make use of any of the functionality which a "modern" build system provides.

And really, cmake will not help you here, because cmake doesn't mean shared libs will be created. The project maintainer doesn't like shared libs? Easily enforced in cmake: just set the library as STATIC to disable this cmake feature that won't be used now.
But since it's not being used, there's less motivation to avoid handwritten Makefiles.

Spending time figure it out how to do the same "by hand" is just painful,

... But this is orthogonal, the complexity of a handwritten Makefile is a developer burden, not an end user burden, it either works or it doesn't. If it works, you don't need to figure out how to use it. If it doesn't work, there's nothing to figure out.

regarding on the number of issues about building shared lib or compiling in windows this project I am not the only one thinking it.

And that's not really an issue of Makefiles or cmake!
If the project says "no we hate shared libs" then the number of issues about doing that anyway, would exist regardless of build system used. Any build system would have issues with shared libs on account of intentionally disabling them. Or simply not caring about them, because you need to specially set up shared libs support on Windows at the *.cpp sources level, whereas it works by accident on Linux.

I ended up finding a pull request with a CMake integration in this repo, I just copied his CMakeLists.txt rework and tuning it a bit then setup a github action to automatically create release with fetched uWebsocket submodule and thats it.
For people who need a CMake integration there is the fork, I added some options but not all.
Now I can integrate this lib as all others (a dozen or more) in my docker builds env with neat syntax and custom integration.
FROM alpine:latest

ARG GCC_VERSION
ARG MINGW_VERSION
ARG CMAKE_VERSION
ARG BINUTILS_VERSION
ARG LIBUV_VERSION
ARG U_WEB_SOCKETS_VERSION
# ...

RUN apk add --no-cache bash make gcc=~${GCC_VERSION} g++=~${GCC_VERSION} mingw-w64-gcc=~${MINGW_VERSION} \
    mingw-w64-binutils=~${BINUTILS_VERSION} mingw-w64-headers mingw-w64-winpthreads mingw-w64-crt cmake>${CMAKE_VERSION}

ENV INSTALL_PREFIX=/usr/x86_64-w64-mingw32
ENV CMAKE_TOOLCHAIN=/tmp/mingw-w64-x86_64.cmake
ENV CMAKE_COMMON_OPTION="--install-prefix ${INSTALL_PREFIX} -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN} -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON"

# Copy cmake toolchain from windows cross compiling
COPY cmake/mingw-w64-x86_64.cmake /tmp

# Install libuv with the given LIBUV_VERSION version from https://github.com/libuv/libuv
RUN wget https://github.com/libuv/libuv/archive/refs/tags/v${LIBUV_VERSION}.tar.gz \
    -q -O /tmp/libuv-${LIBUV_VERSION}.tar.gz && \
    cd /tmp && ls && tar -xvzf libuv-${LIBUV_VERSION}.tar.gz && cd libuv-${LIBUV_VERSION} && \
    cmake -S . -B build ${CMAKE_COMMON_OPTION} -DWITH_OPENSSL=OFF && \
    cmake --build build -j ${MAX_CPU_CORES} && cmake --install build && \
    rm -rf /tmp/libuv-${LIBUV_VERSION}.tar.gz /tmp/libuv-${LIBUV_VERSION}

# Install uWebSockets with the given U_WEB_SOCKETS_VERSION version from forked https://github.com/ZiperRom1/uWebSockets
RUN wget https://github.com/ZiperRom1/uWebSockets/releases/download/v${U_WEB_SOCKETS_VERSION}/uWebSockets-${U_WEB_SOCKETS_VERSION}.tar.gz \
    -q -O /tmp/uWebSockets-${U_WEB_SOCKETS_VERSION}.tar.gz && \
    cd /tmp && ls && tar -xvzf uWebSockets-${U_WEB_SOCKETS_VERSION}.tar.gz && cd uWebSockets-${U_WEB_SOCKETS_VERSION} && \
    cmake -S . -B build ${CMAKE_COMMON_OPTION} -DWITH_OPENSSL=OFF -DWITH_QUIC=OFF -DWITH_BORINGSSL=OFF -DWITH_ASIO=OFF \
    -DWITH_ASAN=OFF -DWITH_LTO=OFF -DWITH_LIBUV=ON -DWITH_ZLIB=ON && \
    cmake --build build -j ${MAX_CPU_CORES} && cmake --install build && \
    rm -rf /tmp/uWebSockets-${U_WEB_SOCKETS_VERSION}.tar.gz /tmp/uWebSockets-${U_WEB_SOCKETS_VERSION}

# ...

WORKDIR /app

CMD ["/bin/bash"]

I tested your CMake variant. The first observation is that, it doesn't work on Linux - it always links to libuv. The second observation is that it builds unoptimized by default, which runs with 30% the performance of a release build. This is major PR suicide to have debug builds by default. But even when specifying release, it still runs significantly slower than when built as is.
So this change, essentially is a performance degradation at best, a performance (and PR) suicide at worst.

I'm literally getting 300k req/sec with my Makefile and 268k with your CMake (release). This is, the most quintessential example of why I don't let people who have not the slightest idea about what they are doing, weigh in on how this project is to be run. End of story.

Btw your fork is breaking the licensing agreement. Will DCMA it in 1 week if not fixed.

Btw your fork is breaking the licensing agreement. Will DMCA it in 1 week if not fixed.

The CI definition from that fork is GPL2 licenced, which is incompatible with the original project's Apache-2.0 license, but it's not obvious that it constitutes a combined work... it's an odd look to go do that, but I'd still assume that the CMakeLists.txt falls under the project license, not the license that's scoped to the file header for the CI definition.

If you succeeded cross compiling a lib with "just" setting 2 env vars and no other compile options / directories prefix etc congrats. I hope your hello word printed well on windows.

What an odd skepticism, especially when dealing with a mingw toolchain instead of Visual Studio.

Btw your fork is breaking the licensing agreement. Will DMCA it in 1 week if not fixed.

The CI definition from that fork is GPL2 licenced, which is incompatible with the original project's Apache-2.0 license, but it's not obvious that it constitutes a combined work... it's an odd look to go do that, but I'd still assume that the CMakeLists.txt falls under the project license, not the license that's scoped to the file header for the CI definition.

This is not what is the problem. I don't care about some CMakeLists.txt file. The person is entirely disregarding the very README.md file like blowing past a stop sign because there seems to be no traffic. This blatant disregard for a) licenses b) benchmarking what you make and c) even making it work on the main platform is what really makes me lose hope in humanity.

Intellectual property, all rights reserved.
Where such explicit notice is given, source code is licensed Apache License 2.0 which is a permissive OSI-approved license with very few limitations. Modified "forks" should be of nothing but licensed source code, and be made available under another product name. If you're uncertain about any of this, please ask before assuming.

@uNetworkingAB The fork I made is not attended to replace your makefile, it only fit my personal needs (like linking to libuv yes or linking as shared lib), I only shared it as base for people who want a CMake build integration.

This is major PR suicide to have debug builds by default

Not my problem if people do not set their release type build before building.

I'm literally getting 300k req/sec with my Makefile and 268k with your CMake (release)

It is just static link with LTO optimisation, for my personnal needs it is perfectly fine to not have a 1 million req/sec as the application is not a server with high demands trafic.

Btw your fork is breaking the licensing agreement. Will DMCA it in 1 week if not fixed.

Do what you want, if you do not want your project to be used and customized do not put it on an open-source platform which make the later process as easy as a click on "fork this repository" button.

I only shared it as base for people who want a CMake build integration

You are, literally, legally not allowed to. Not in the current form. This is not opinion, this is basic intellectual property law. Educate yourself in basic law before making legal decisions. None of your opinion matters. This project is owned intellectual property and the more you fight it, the further up your anushole the foot will be for medical removal. Of course, right now it's a non-issue and I don't need to do anything. Should time tell otherwise, we will see.


Rename protobuf-swift

Link should go to https://github.com/alexeyxo/protobuf-swift instead of http://protobuf.io/#swift

That link was already there, this is an additional link
Removing..


vue-simple-icons name is claimed

There already is the vue-simple-icons package in npm! @gabrieledarrigo @ericcornelissen What should we do?

@ericcornelissen ok, or maybe rename the package?

If all else fails we can have a look at that, but "vue-simple-icons" is a perfect name for this project and the other project looks to be abandoned anyway.

@ericcornelissen I wrote a message on the website


Chaining piped jobs raises error (sometimes)

Snakemake version
5.15
Describe the bug
I want to define a workflow in which two jobs with piped output are chained together. My test example worked fine but another workflow using the actual programs I want to run would not run. The error message is:
WorkflowError in line 10 of /work/snakemake_demo/pipeline_multi_output/main.make:
An output file is marked as pipe, but consuming jobs are part of conflicting groups.
I can't see the difference between how the two workflows were designed. I'm attaching files with the two examples and the output they produced.
Logs
If applicable, any terminal output to help explain your problem.
Example that worked:
Building DAG of jobs...
candidate job all
	wildcards:
candidate job step3
	wildcards: number=1
candidate job step2
	wildcards: number=1
candidate job step1
	wildcards:
selected job step1
	wildcards:
selected job step2
	wildcards: number=1
selected job step3
	wildcards: number=1
candidate job step3
	wildcards: number=2
candidate job step2
	wildcards: number=2
candidate job step1
	wildcards:
selected job step1
	wildcards:
selected job step2
	wildcards: number=2
selected job step3
	wildcards: number=2
selected job all
	wildcards:
Using shell: /usr/bin/bash
Provided cores: 4
Rules claiming more threads will be scaled down.
Job counts:
	count	jobs
	1	all
	1	step1
	2	step2
	2	step3
	6
[Thu Apr 23 12:18:46 2020]

group job bfe2940f-037c-4036-8eb8-7cb65b7ff26a (jobs in lexicogr. order):

    [Thu Apr 23 12:18:46 2020]
    rule step1:
        output: step1_file1 (pipe), step1_file2 (pipe)
        jobid: 5

    [Thu Apr 23 12:18:46 2020]
    rule step2:
        input: step1_file1
        output: step2_file1
        jobid: 3
        wildcards: number=1

    [Thu Apr 23 12:18:46 2020]
    rule step2:
        input: step1_file2
        output: step2_file2
        jobid: 4
        wildcards: number=2

[Thu Apr 23 12:18:47 2020]
Finished job 5.
[Thu Apr 23 12:18:47 2020]
Finished job 3.
[Thu Apr 23 12:18:47 2020]
Finished job 4.
3 of 6 steps (50%) done

[Thu Apr 23 12:18:47 2020]
rule step3:
    input: step2_file1
    output: step3_file1.txt
    jobid: 1
    wildcards: number=1

[Thu Apr 23 12:18:47 2020]
rule step3:
    input: step2_file2
    output: step3_file2.txt
    jobid: 2
    wildcards: number=2

[Thu Apr 23 12:18:47 2020]
Finished job 1.
4 of 6 steps (67%) done
[Thu Apr 23 12:18:47 2020]
Finished job 2.
5 of 6 steps (83%) done

[Thu Apr 23 12:18:47 2020]
rule all:
    input: step3_file1.txt, step3_file2.txt
    output: result.txt
    jobid: 0

[Thu Apr 23 12:18:48 2020]
Finished job 0.
6 of 6 steps (100%) done
Complete log: /work/snakemake_demo/pipeline_multi_output/.snakemake/log/2020-04-23T121846.487527.snakemake.log

Example that didn't work:
Building DAG of jobs...
candidate job all
	wildcards:
candidate job quality_filter
	wildcards: number=1
candidate job trim
	wildcards: number=1
candidate job unzip
	wildcards:
selected job unzip
	wildcards:
selected job trim
	wildcards: number=1
selected job quality_filter
	wildcards: number=1
candidate job quality_filter
	wildcards: number=2
candidate job trim
	wildcards: number=2
candidate job unzip
	wildcards:
selected job unzip
	wildcards:
selected job trim
	wildcards: number=2
selected job quality_filter
	wildcards: number=2
selected job all
	wildcards:
WorkflowError in line 10 of /work/snakemake_demo/pipeline_multi_output/main.make:
An output file is marked as pipe, but consuming jobs are part of conflicting groups.

Minimal example
Add a minimal example for reproducing the bug.
Example that worked:
rule all:
    input:
         files=["step3_file1.txt", "step3_file2.txt"]
    output:
        'result.txt'
    run:
        for f in input.files:
            shell('cat {input} > {output}')

rule step1:
    output:
        p1=pipe("step1_file1"),
        p2=pipe("step1_file2")
    shell:
        """
        echo 'step1'
        date +%s%N
        echo 'hello1' > {output.p1} & echo 'hello2' > {output.p2}
        """

rule step2:
    input:
        file="step1_file{number}"
    output:
        pipe="step2_file{number}"
    shell:
        """
		echo 'step2'
        date +%s%N
        data=$(cat {input.file})
		data="step2\n$data"
		echo $data > {output.pipe}
        """

rule step3:
	input:
		file="step2_file{number}"
	output:
		file="step3_file{number}.txt"
	shell:
		"""
		echo 'step3'
		cat {input.file} > {output.file}
		echo 'step3' >> {output.file}
		"""

Example that failed:
rule all:
    input:
        file1='fqf_R1.fastq',
        file2='fqf_R2.fastq'
    output:
        'combined.fastq'
    shell:
        'cat {input.file1} {input.file2} > {output}'

rule unzip:
    input:
        file1='1K/1K_R1.fastq.gz',
        file2='1K/1K_R2.fastq.gz'
    output:
        pipe1=pipe('unzip_R1'),
        pipe2=pipe('unzip_R2')
    shell:
        """
        gunzip -c {input.file1} > {output.pipe1} &
        gunzip -c {input.file2} > {output.pipe2}
        """
rule trim:
    input:
        file="unzip_R{number}"
    output:
        pipe=pipe("trim_R{number}")
    shell:
        """
        echo 'trim'
        cat {input.file} | cutadapt -q 20,20 --minimum-length 10 -g CTGTCTCTTATACACATCT -o {output.file} - 2>/dev/null'
        """
rule quality_filter:
	input:
		file="trim_R{number}"
	output:
		file="fqf_R{number}.fastq"
	shell:
		"""
		echo 'quality filter'
		cat {input.file} | fastq_quality_filter -q 20 -p 75 -Q33 1 -o {output.file}
		"""

Additional context
Add any other context about the problem here.
CentOS7 64 -bit

Based on the example, the rule unzip could be split into two rules on read, which would probably solve the problem.
When you use pipe, the consuming and producing rules are placed into a group with a unique name.  My guess is that sometimes snakemake detects you have two consumers and one producer, placing them in the same group, and sometimes it pairs a consumer/producer then fails to add on the other consumer to the existing group.  Using explicit group names may also address the problem.
Finally, you can use zcat in trim and skip the separate unzip/pipe/group altogether.

Thanks!
Splitting the unzip into two separate rules did the trick. There was also another error in my example where I referred to {output.file_n_} instead of {output.pipe_n_} in the trim step. I know about zcat but I prefer to keep unzip as a separate rule because when I do this for real I need to collect some per-step statistics and while that would possible to do  when combining zcat with the trim step its a little cleaner and easier to understand when each step is in a separate rule.

Hi @pdagosto ,
Does the new PR resolve this issue? Can this be closed now?


mixin: share type when use mixin for schema

[x] I have searched the issues of this repository and believe that this is not a duplicate.

Summary 💡
I want to share an Enum cross entities, so I created a mixin as ConfirmMixin as follow:
// ConfirmMixin implements the ent.Mixin for sharing
// confirm with package schemas.
type ConfirmMixin struct {
	mixin.Schema
}

func (ConfirmMixin) Fields() []ent.Field {
	return []ent.Field{
		field.Enum("confirm_status").
			Values("confirm", "decline").
			Optional(),
	}
}

then, use it in schema defination:
func (JobApplication) Mixin() []ent.Mixin {
	return []ent.Mixin{
		ConfirmMixin{},
	}
}

func (ShiftShowUp) Mixin() []ent.Mixin {
	return []ent.Mixin{
		ConfirmMixin{},
	}
}

Currently, ent generate both jobapplication.ConfirmStatus and shiftshowup.ConfirmStatus with exactly same.
Motivation 🔦
I wish ent generate a single type for ConfirmStatus and share it cross entities.

Hey @giautm,
You can use the GoType option to create your own type, and share it with multiple schemas.

Yup, but I will lost validation logic that ent ready generated. :p

It should enforce validation as well. See a usage example -
https://github.com/facebook/ent/blob/master/entc/integration/ent/schema/fieldtype.go#L132
https://github.com/facebook/ent/blob/master/entc/integration/ent/role/role.go

Nice, It work as expected.

btw, I think this line should convert to role.Read. Because "role" is not valid value and it make confusing
https://github.com/facebook/ent/blob/3daea98d76a3200f8e9f5727fdbf864e1caa0abb/entc/integration/ent/schema/fieldtype.go#L134
			GoType(role.Read),

Hi @a8m , I open an issue for new bug: https://github.com/facebook/ent/issues/1056

btw, I think this line should convert to role.Read. Because "role" is not valid value and it make confusing
https://github.com/facebook/ent/blob/3daea98d76a3200f8e9f5727fdbf864e1caa0abb/entc/integration/ent/schema/fieldtype.go#L134
			GoType(role.Read),

Feel free to send a patch for fixing this. Thanks


change the image in product admin do not update the thumbnails CatalogListPlugin

I tried with several version and docker image, thumbnails do not update.
The thumbnails is updated only if the server is restarted or reloded.

I try to investigate without success, any track would be welcome.

Thanks for the clue. Effectively, if we change the cache parameter temporarily, it works.
It must be a problem with the redis setting or logic, it's the same problem with docker-compose.
CACHES = {
    'default': {
        'BACKEND': 'django.core.cache.backends.dummy.DummyCache',
    }
}

There is a special admin mixin to invalidate the cache whenever we save the product. It's named InvalidateProductCacheMixin  and I have seen, that it currently is not added to myshop.admin.i18n_polymorphic. SmartCardAdmin. I tried ti do that, but still get an old version of the <figure>... template. I have to investigate further on this.
Caching the figures in the catalog's list view has a quite dramatic speed influence.

I do not know if this is binding, but by doing this manipulation: I get this error:

MultiValueDictKeyError at /admin/myshop/smartcard/5/change/

"'productimage_set-0-id'"

Request Method: 	POST
Request URL: 	http://<IP_ADDRESS>:8000/admin/myshop/smartcard/5/change/?language=en&cms_path=%2Fshop%2Fsmartcards%2Fsdxc-card-64gb
Django Version: 	1.10.8
Exception Type: 	MultiValueDictKeyError
Exception Value:

"'productimage_set-0-id'"

Exception Location: 	/home/path/sources/testshop/Tutorial/shoptutorial/lib/python3.6/site-packages/django/utils/datastructures.py in __getitem__, line 85
Python Executable: 	/home/path/sources/testshop/Tutorial/shoptutorial/bin/python
Python Version: 	3.6.4
Python Path:

['/home/path/sources/testshop/Tutorial/django-shop/example',
 '/home/path/sources/testshop/Tutorial/shoptutorial/lib/python36.zip',
 '/home/path/sources/testshop/Tutorial/shoptutorial/lib/python3.6',
 '/home/path/sources/testshop/Tutorial/shoptutorial/lib/python3.6/lib-dynload',
 '/usr/lib64/python3.6',
 '/usr/lib/python3.6',
 '/home/path/sources/testshop/Tutorial/shoptutorial/lib/python3.6/site-packages',
 '/home/path/sources/testshop/Tutorial/django-shop']

Server time: 	Sun, 15 Apr 2018 14:02:40 +0200

(It may be normal since the previous one no longer exists)

By keeping InvalidateProductCacheMixin at the beginning it works. #730
Thanks for the indication !


Improve summary formatter robustness

It really needs to stop splitting up math equations and other things with - signs

It would also be nice if it could do nested bullet points. This will require some additional GPT prompting, since it puts them all as
'-' signs right now even when it clearly intends to nest them


Please help me

What is your question?
how do i change the background of a song after another song has played during the week?
please help me with this i have a great idea for another background during a song in the week but i dont know how to-

it should be easy, just change the background for the songs json

thank you draconic-hybrid and ckwood23 ill try using both of these ways and if either one of them work thank you both!


BLE advertisement channel 39 is not working on Bluedroid on ESP32S3 (IDFGH-13802)

Answers checklist.

[X] I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
[X] I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
[X] I have searched the issue tracker for a similar issue and not found a similar issue.

IDF version.
IDF 5.4
Espressif SoC revision.
ESP32S3
Operating System used.
Linux
How did you build your project?
Command line with idf.py
If you are using Windows, please specify command line type.
None
Development Kit.
Seeed ESP32S3 module
Power Supply used.
USB
What is the expected behavior?
I configured the advertisement like this:
static esp_ble_adv_params_t adv_params = {
    .adv_int_min        = 0x20, // fastest, very 20ms
    .adv_int_max        = 0x20,
    .adv_type           = ADV_TYPE_NONCONN_IND,
    .own_addr_type      = BLE_ADDR_TYPE_RANDOM,
    .channel_map        = ADV_CHNL_39,         // bitmap 0x07, ADV_CHNL_ALL
    .adv_filter_policy  = ADV_FILTER_ALLOW_SCAN_ANY_CON_ANY,
};

After setting the advertisement data esp_ble_gap_config_adv_data_raw() it starts advertising.
Confirming with a spectrum analyzer as well as a BLE scanner app on the phone (LightBlue) the chip is not advertising.
There are no error reports, all events are occurring correctly.
Chainging the channel_map to either ADV_CHNL_38 or ADV_CHNL_ALL works ok. I can see the advertisments.
Unfortunately I have no way to control the receiving channels to listen only on channel 39 for example. There is no API, unless you know how to do that. I would appreciate it. So I use external instruments and receivers to check for any channel 39 only advertisements and there are none.
What is the actual behavior?
no error, just does not do what it suppose to do
Steps to reproduce.
I only tested Bluedroid, not Nimble.
To reproduce, use the iBeacon demo app in the IDF examples and change the advertisement config to channel 39 only.
Debug Logs.
No logs, no errors, just not doing what it should.

More Information.
No response

This hardware bug seems to be on a ESP32S3 chip with revision v0.1.  I was successfully working with only channel 39 on revision v0.2 on a ESP32-S3-WROOM-1 module, not on a XIAO-ESP32-S3 module.
If you can verify, it's probably ok to close this issue.

@aircable
Could you provide me with a full log?

Log of what? There is no error. All commands are executing correctly. You just look on a Bluetooth scanner or write your own scanner code for another ESP32 or use LightBlue on your Android. On the ESP32S3 v0.1 there is just no microwaves generated.

I would like to obtain the startup log information to identify various details about the chip（v0.1）.

Thanks for reporting, sorry that we failed to reproduce the issue locally, will close due to inactivity, feel free to reopen with more updates per the suggestion https://github.com/espressif/esp-idf/issues/14659#issuecomment-2401169715, thanks.


Add support for arm64

Given the proliferation of arm based cloud instances and the nvidia arm platforms it would make sense to support running on arm64.

I also have this issue. Thanks for raising it @holdenk .

any news?

any news?

any news?

Hey there, adding my 2 cents here, because I just got it working. It looks like this has no more support so I'll tell you the steps I did to get it working
#. Change this line from GOARCH=amd64 to GOARCH=arm64.
#. Run docker buildx build --platform linux/arm64 --build-arg SPARK_IMAGE=apache/spark:v3.2.2 -t your-repo/your-image:v3.2.2-arm .
I'm currently testing that no problems arise from this, but it seems like these are the only change requirements

@gonzalezzfelipe I've done so, and I'm getting the following error once container is started:
exec: "/usr/bin/entrypoint.sh": permission denied: unknown

@mfidemraizer,
I was just working on this trying to deploy spark operator on an AWS Graviton cluster. After successfully building the image and attempting to run the container on docker desktop, I got the same error as you:

To fix this issue, I added a new RUN line to my dockerfile and was able to initialize the container:
COPY spark-operator/entrypoint.sh /usr/bin/
RUN chmod +x /usr/bin/entrypoint.sh
ENTRYPOINT ["/usr/bin/entrypoint.sh"]

tested spark 3.5.0 on RPi microk8s today using docker image and can confirm it is working fine by following the instructions above.

Given that #1735 would likely be solved by an arm64 image, is there any reason the project does not publish arm64 images?

I'm new to this community, but it looks like the arm64 image of spark-operator has been available on Docker Hub for a while. I have successfully run the operator, webhook, and spark driver/exec pods on AWS graviton instances.

/close
The images are built for both amd64 and arm64 in the release workflow.


Exposure creation benchmarks Julia (juliaactuary) and R (actxps)

This will be a direct comparison of https://mattheaphy.github.io/actxps/ and https://github.com/JuliaActuary/ExperienceAnalysis.jl
input and output formats are as in actxps. Julia package's flatten step will be included.
Likely to use census data that comes with actxps.

[x] ~set up census data from Git LFS~ not using LFS, data small and not changing
[x] benchmarking of scripts
[x] refactor code for each folder to have a single entrypoint which runs all code

Custom Rcpp implementation required as well.

https://github.com/actuarialopensource/benchmarks/pull/11


Secure AWS Deployments with a VPN

Currently the AWS deployment allows incoming connections from the Internet to the controller on ports 22 and 443 and to the works on port 22.  It would be nice if there was the option to set up a VPN along with Kubernetes, and lock down the security group ingress rules to only allow connections from within the VPC.
Here you can find a CloudFormation template that instantiates an OpenVPN access server on an existing VPC that already has an Internet gateway.  It could be integrated into the Kubernetes CF template while tightening down the ingress security groups.
After that, one only needs to SSH to the VPN instance as openvpnas, change the password for the openvpn user, visit https://[elastic_ip]:943/admin to change any configuration, visit https://[elastic_ip] to download the VPN profile, import the profile into your VPN client (e.g. Tunnelblick), and connect to the VPN.

+1!

As mentioned in the PR, I think configuring a VPN instance is outside the scope of this project, and is something that should be left to the user to decide.

@aaronlevy The default kube-up cluster is too open (eg, ssh and the k8s API open to the world). This access needs to be tightened down, which will consequently make interacting with the cluster harder. So, either a) a proper VPN should be part of the default setup, b) kube-proxy should be used for all cluster interactions and documented as such, with a corresponding or other backing service to enable this, or c) pointers in a "how to get your cluster production ready" doc describing a/b/other.
If services like Heapster and ELK are available out of the box for cluster monitoring, surely a VPN should be available out of the box for cluster access? It all falls under the umbrella of cluster management.

The core motivation of this project is to launch a baseline Kubernetes cluster on CoreOS, from which users can then build on for their particular needs / infrastructure. In the case of services/addons such as Heapster, we still leave this up to the end-user to decide to run. We do automatically deploy the DNS addon, as this is essentially required for a fully functioning Kubernetes cluster.
This isn't to say this will always be the case, and additional services / addons / documentation can be integrated, but I don't think deciding that a user should use a VPN for cluster access is something this project can assume.


Signature trailing whitespace

As far as I know the oficial way of starting a signature is with "-- " (note the trailing space). When composing a new email the trailing whitespace gets removed.
The signature does get saved properly, though.

Hi,
I search how to have a correct signature (with trailing space).
Maybe it can be fine to write this tip in an rainloop page like an FAQ or directly in account preferences page.
Best regards


[Docs]: Clarification on best practice for context usage

Page(s)
https://playwright.dev/dotnet/docs/browser-contexts#multiple-contexts-in-a-single-test
https://playwright.dev/dotnet/docs/browser-contexts#how-playwright-achieves-test-isolation
Description
Hi there. Hoping to get clarification on best practice when using contexts in C#.
In the two links below, the way in which contexts are generated are slightly different i.e.
In the first link the using statement is not used in
var context = await browser.NewContextAsync();

but in the second link it is
await using var userContext = await browser.NewContextAsync();

https://playwright.dev/dotnet/docs/browser-contexts#how-playwright-achieves-test-isolation
https://playwright.dev/dotnet/docs/browser-contexts#multiple-contexts-in-a-single-test
I'd like to understand if there's a reason for the difference and if there are any caveats one needs to consider when not using it.
Cheers

To add to this - what led me to this page was that I was getting warnings in Rider that several node.exe instances were dangling and asked whether I wanted to kill off the processes. Similarly in azure piplines, I'm seeing a scenario where the pipeline just hangs for no apparent reason when reaching a certain point - the second point may be unrelated, but thought it worth mentioning

This highly depends on where you are using the context. Using with Playwright is equal of calling .Close().
Depending on the use-case using might make sense or not, if you pass it around into different functions, dispose the browser afterwards anyways etc. So there is unfortunately not a clear recommendation for this.


Image alternative text

Hi,
Thanks for making this real useful tool.
In my opinion, the outline tool shouldn't ignore alternative text values for images.
An example:

Currently, the outliner tool will not include the company name as a header.
Cheers! Bob

There's a PR waiting for this: https://github.com/h5o/h5o-js/pull/34
I will try to get back to it soon.