text:
Problem with umbraco 7.3.5

Hi,
I think there is a problem with umbraco version 7.3.5 and ditto. When instantiating the rendermodel in controller, it throws always null-reference exception.
Stack Trace:
[NullReferenceException: Object reference not set to an instance of an object.]
KarateclubRemzi.Controllers.PartialsController.Header(RenderModel model) in C:\Users\mehmet.inan\OneDrive\PROJECTS\KarateclubRemzi\KarateclubRemzi\Controllers\PartialsController.cs:21
lambda_method(Closure , ControllerBase , Object[] ) +104
System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters) +14
System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary2 parameters) +157    System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary2 parameters) +27
System.Web.Mvc.Async.AsyncControllerActionInvoker.b__39(IAsyncResult asyncResult, ActionInvocation innerInvokeState) +22
System.Web.Mvc.Async.WrappedAsyncResult2.CallEndDelegate(IAsyncResult asyncResult) +29    System.Web.Mvc.Async.WrappedAsyncResultBase1.End() +49
System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult) +32
System.Web.Mvc.Async.AsyncInvocationWithFilters.b__3d() +50
System.Web.Mvc.Async.<>c__DisplayClass46.b__3f() +225
System.Web.Mvc.Async.<>c__DisplayClass46.b__3f() +225
System.Web.Mvc.Async.<>c__DisplayClass46.b__3f() +225
System.Web.Mvc.Async.<>c__DisplayClass33.b__32(IAsyncResult asyncResult) +10
System.Web.Mvc.Async.WrappedAsyncResult1.CallEndDelegate(IAsyncResult asyncResult) +10    System.Web.Mvc.Async.WrappedAsyncResultBase1.End() +49
System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult) +34
System.Web.Mvc.Async.<>c__DisplayClass2b.b__1c() +26
System.Web.Mvc.Async.<>c__DisplayClass21.b__1e(IAsyncResult asyncResult) +100
System.Web.Mvc.Async.WrappedAsyncResult1.CallEndDelegate(IAsyncResult asyncResult) +10    System.Web.Mvc.Async.WrappedAsyncResultBase1.End() +49
System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +27
System.Web.Mvc.Controller.b__1d(IAsyncResult asyncResult, ExecuteCoreState innerState) +13
System.Web.Mvc.Async.WrappedAsyncVoid1.CallEndDelegate(IAsyncResult asyncResult) +29    System.Web.Mvc.Async.WrappedAsyncResultBase1.End() +49
System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +36
System.Web.Mvc.Controller.b__15(IAsyncResult asyncResult, Controller controller) +12
System.Web.Mvc.Async.WrappedAsyncVoid1.CallEndDelegate(IAsyncResult asyncResult) +22    System.Web.Mvc.Async.WrappedAsyncResultBase1.End() +49
System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +26
System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute(IAsyncResult asyncResult) +10
System.Web.Mvc.MvcHandler.b__5(IAsyncResult asyncResult, ProcessRequestState innerState) +21
System.Web.Mvc.Async.WrappedAsyncVoid1.CallEndDelegate(IAsyncResult asyncResult) +29    System.Web.Mvc.Async.WrappedAsyncResultBase1.End() +49
System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +28
System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +9
System.Web.Mvc.<>c__DisplayClassa.b__9() +22
System.Web.Mvc.<>c__DisplayClass4.b__3() +10
System.Web.Mvc.ServerExecuteHttpHandlerWrapper.Wrap(Func`1 func) +27
System.Web.Mvc.ServerExecuteHttpHandlerWrapper.Wrap(Action action) +64
System.Web.Mvc.ServerExecuteHttpHandlerAsyncWrapper.EndProcessRequest(IAsyncResult result) +71
System.Web.HttpServerUtility.ExecuteInternal(IHttpHandler handler, TextWriter writer, Boolean preserveForm, Boolean setPreviousPage, VirtualPath path, VirtualPath filePath, String physPath, Exception error, String queryStringOverride) +1438
[HttpException (0x80004005): Error executing child request for handler 'System.Web.Mvc.HttpHandlerUtil+ServerExecuteHttpHandlerAsyncWrapper'.]
System.Web.HttpServerUtility.ExecuteInternal(IHttpHandler handler, TextWriter writer, Boolean preserveForm, Boolean setPreviousPage, VirtualPath path, VirtualPath filePath, String physPath, Exception error, String queryStringOverride) +3379301
System.Web.HttpServerUtility.Execute(IHttpHandler handler, TextWriter writer, Boolean preserveForm, Boolean setPreviousPage) +77
System.Web.HttpServerUtility.Execute(IHttpHandler handler, TextWriter writer, Boolean preserveForm) +29
System.Web.HttpServerUtilityWrapper.Execute(IHttpHandler handler, TextWriter writer, Boolean preserveForm) +24
System.Web.Mvc.Html.ChildActionExtensions.ActionHelper(HtmlHelper htmlHelper, String actionName, String controllerName, RouteValueDictionary routeValues, TextWriter textWriter) +463
System.Web.Mvc.Html.ChildActionExtensions.Action(HtmlHelper htmlHelper, String actionName, String controllerName, RouteValueDictionary routeValues) +83
System.Web.Mvc.Html.ChildActionExtensions.Action(HtmlHelper htmlHelper, String actionName, String controllerName) +11
ASP._Page_Views_Master_cshtml.Execute() in c:\Users\mehmet.inan\OneDrive\PROJECTS\KarateclubRemzi\KarateclubRemzi\Views\Master.cshtml:61
System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +198
System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +105
System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +90
System.Web.WebPages.<>c__DisplayClass3.b__2(TextWriter writer) +232
System.Web.WebPages.HelperResult.WriteTo(TextWriter writer) +10
System.Web.WebPages.WebPageBase.Write(HelperResult result) +80
System.Web.WebPages.WebPageBase.RenderSurrounding(String partialViewName, Action1 body) +63    System.Web.WebPages.WebPageBase.PopContext() +237    System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +98    System.Web.Mvc.RazorView.RenderView(ViewContext viewContext, TextWriter writer, Object instance) +235    System.Web.Mvc.BuildManagerCompiledView.Render(ViewContext viewContext, TextWriter writer) +107    Umbraco.Core.Profiling.ProfilingView.Render(ViewContext viewContext, TextWriter writer) +113    System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +291    System.Web.Mvc.ControllerActionInvoker.InvokeActionResult(ControllerContext controllerContext, ActionResult actionResult) +13    System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +56
System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +420    System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +420
System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList1 filters, ActionResult actionResult) +52    System.Web.Mvc.Async.<>c__DisplayClass2b.<BeginInvokeAction>b__1c() +173    System.Web.Mvc.Async.<>c__DisplayClass21.<BeginInvokeAction>b__1e(IAsyncResult asyncResult) +100    System.Web.Mvc.Async.WrappedAsyncResult1.CallEndDelegate(IAsyncResult asyncResult) +10
System.Web.Mvc.Async.WrappedAsyncResultBase1.End() +49    System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +27    System.Web.Mvc.Controller.<BeginExecuteCore>b__1d(IAsyncResult asyncResult, ExecuteCoreState innerState) +13    System.Web.Mvc.Async.WrappedAsyncVoid1.CallEndDelegate(IAsyncResult asyncResult) +29
System.Web.Mvc.Async.WrappedAsyncResultBase1.End() +49    System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +36    System.Web.Mvc.Controller.<BeginExecute>b__15(IAsyncResult asyncResult, Controller controller) +12    System.Web.Mvc.Async.WrappedAsyncVoid1.CallEndDelegate(IAsyncResult asyncResult) +22
System.Web.Mvc.Async.WrappedAsyncResultBase1.End() +49    System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +26    System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute(IAsyncResult asyncResult) +10    System.Web.Mvc.MvcHandler.<BeginProcessRequest>b__5(IAsyncResult asyncResult, ProcessRequestState innerState) +21    System.Web.Mvc.Async.WrappedAsyncVoid1.CallEndDelegate(IAsyncResult asyncResult) +29
System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +49
System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +28
System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +9
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +9644037
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155

@minan61 Thanks for raising this.
A couple of questions...

Which version of Ditto are you using? (I'm assuming latest v0.8.4).
Did you upgrade Umbraco? Did your code work previously, on an early Umbraco version?

Looking at the exception stack-trace you provided I couldn't see any mention of Ditto in there. I'm not saying that it isn't Ditto, just that I have zero info to go on.

Hi LeeTnx for your answer. We can delete my entry about the problem since it was my fault. I was sending the data with html.action to the controller. That means that my rendermodel is empty. RegardsMehmet Inan
Date: Sun, 17 Jan 2016 10:03:06 -0800
From: notifications@github.com
To: umbraco-ditto@noreply.github.com
CC: inan_mehmet@hotmail.com
Subject: Re: [umbraco-ditto] Problem with umbraco 7.3.5 (#154)
@minan61 Thanks for raising this.
A couple of questions...
Which version of Ditto are you using? (I'm assuming latest v0.8.4).
Did you upgrade Umbraco? Did your code work previously, on an early Umbraco version?
Looking at the exception stack-trace you provided I couldn't see any mention of Ditto in there. I'm not saying that it isn't Ditto, just that I have zero info to go on.
—
Reply to this email directly or view it on GitHub.

No worries @minan61 - thanks for following up on it :+1:


text:
Error when searching particular input

Getting "Cannot read properties of undefined (reading 'slice')" error when needle is "an"
Minimal Reproduction in CodeSandbox
This only happens when interLft is set to 1 ("loose") and intraIns is > 1

hmm. minimal repro: https://jsfiddle.net/okjfLhvc/
const data = [
  "Sabine State Bank and Trust Company",
];

const fuzzyOptions = {
  intraIns: 2,
  intraChars: ".",
  interLft: 1
};

const fuzzy = new uFuzzy(fuzzyOptions);

const inputVal = "an";
const result = fuzzy.search(data, inputVal);

console.log(result);

so, there is a bug here that causes the crash. i will fix it.
however, you would end up with 0 results in this case instead of 1. here's why:
the regex for this ends up being something like /a.{0,2}n/
for the item Sabine State Bank and Trust Company there are actually 4 possible matches here:

uFuzzy does not try to get and analyze all these possible matches (via the g flag), but just takes the first one:
Sabine State Bank and Trust Company
there is an additional refinement that uFuzzy tries, and that is to search for the exact needle later in the item if the matched part was not exact. in this case it finds the second match and uses it.
Sabine State Bank and Trust Company
it will then proceed to discard this full result because interLft: 1 requires that the "an" lands on a left word boundary...so you will get zero results. if the code instead continued to iterate through the other matches, it would next land on the "and" and not discard the result. but this process is too expensive to do in the general case of multiple terms, out of order, and hundreds of thousands of haystack items.
what you probably want is to use is interLft: 2 which constructs a more precise regexp that includes the word boundary requirement: /\ba.{0,2}n/, and will give you only the requird match:

intraLft: 1 exists to be able to also match things like "ma" in  "SuperMan" as well as "Super Man". i don't see this patten in your haystack. intraLft: 1 is mostly useful for camel-case file, function, or class names in code searches or maybe some occasional brand names like FedEx or WordPerfect.

actually, that's not fully correct. there is an exhaustive search for matched at interLft: 1 boundaries. in this case it's done as a follow-up refinement to the first one. need to figure out if this can be correctly handled by the range marking code...

should be fixed now: https://leeoniya.github.io/uFuzzy/demos/compare.html?libs=uFuzzy&lists=test&search=an&interLft=1&intraIns=2

source: gharchive/issue

authors: Wolfgang-stack leeoniya

repo: leeoniya/uFuzzy

license: MIT

license_type: permissive

license_source: github-api


text:
请教一下 v8n-p2

您好 请问您的 v8n-p2 的rknn 部署问题解决了吗

这个问题我已经解决了，但是由于各种因素，我没能将代码开源，之后可能会出一个demo。如果你很急，可以尝试自己在后处理方面做一些工作去解决这个问题。希望我的回答对你有所帮助。
---- 回复的原邮件 ----
| 发件人 | @.> |
| 发送日期 | 2024年06月17日 17:02 |
| 收件人 | leepinkz/test @.> |
| 抄送人 | Subscribed @.***> |
| 主题 | [leepinkz/test] 请教一下 v8n-p2 (Issue #2) |
您好 请问您的 v8n-p2 的rknn 部署问题解决了吗
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: @.***>

这个问题我已经解决了，但是由于各种因素，我没能将代码开源，之后可能会出一个demo。如果你很急，可以尝试自己在后处理方面做一些工作去解决这个问题。希望我的回答对你有所帮助。
…
---- 回复的原邮件 ---- | 发件人 | @.> | | 发送日期 | 2024年06月17日 17:02 | | 收件人 | leepinkz/test @.> | | 抄送人 | Subscribed @.> | | 主题 | [leepinkz/test] 请教一下 v8n-p2 (Issue #2) | 您好 请问您的 v8n-p2 的rknn 部署问题解决了吗 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.>

方便参考一下代码吗，可以有偿

不着急的话，后续我会将代码在开源在我的github仓库，你可以持续关注😄
---- 回复的原邮件 ----
| 发件人 | @.> |
| 发送日期 | 2024年06月17日 17:48 |
| 收件人 | leepinkz/test @.> |
| 抄送人 | PingzhenLi @.>,
Comment @.> |
| 主题 | Re: [leepinkz/test] 请教一下 v8n-p2 (Issue #2) |
这个问题我已经解决了，但是由于各种因素，我没能将代码开源，之后可能会出一个demo。如果你很急，可以尝试自己在后处理方面做一些工作去解决这个问题。希望我的回答对你有所帮助。
…
---- 回复的原邮件 ---- | 发件人 | @.> | | 发送日期 | 2024年06月17日 17:02 | | 收件人 | leepinkz/test @.> | | 抄送人 | Subscribed @.> | | 主题 | [leepinkz/test] 请教一下 v8n-p2 (Issue #2) | 您好 请问您的 v8n-p2 的rknn 部署问题解决了吗 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.>
方便参考一下代码吗，可以有偿
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: @.***>

期待您的回应，十分感谢

您好，请问什么时候考虑开源呢，如果暂时不开源，可以方便私聊吗，我可以有偿购买源码，希望能得到您的回复  十分感谢

authors: Cigarliu leepinkz

repo: leepinkz/test


text:
feature: optimized array patch

splice, shiftなど、配列のインデックスに影響のあるメソッドの呼び出しをトラックし、パッチの計算時に新旧配列を調整してから各要素同士の比較を行うように変更した。
具体的には、

配列インデックスに影響のあるメソッドの呼び出し時に、どのインデックスがどう変更されたかをトラックする

e.g. splice(1, 1) -> [[removed, 1]], unshift('hello') -> [[added, 0]]

パッチの計算時に、配列インデックスの変更履歴を新旧配列（copy, original）に適用する

e.g. copy: [Removed, 1, 2, 3], original: [0, 1, Added, 3]

調整済みの配列を要素ごとにshallowに比較する

NOTE: 元のmutativeがArray.prototype.lengthの挙動に依存していたりするので、処理の互換性が壊れています。また生成されるパッチの最適化（e.g. 削除されるアイテムへの変更が含まれたりする）はやっておらず、主に計算量の削減を目的とした変更になっています。この辺りは本家へPRを送る時に修正する予定...

お二人ともレビュー有り難うございます！こちらは一旦closeします。

@skobaken7 お手数ですが再度レビューしていただきたいです！ 🙏🏼 🙇🏼

これまで利用されていたバージョン（最後にレジストリへpublishしたバージョン）からの差分
https://github.com/legalscape/mutative/compare/96137ec9a194e8bad65cd789d77d89a1b92283ce..55ad5234f67eb6948d54fd64ef83011efde56d10

source: gharchive/pull-request

repo: legalscape/mutative


text:
🛑 VePhim API hf is down

In 2d2fc97, VePhim API hf (https://api.vephim.online/api/ping) was down:

HTTP code: 503
Response time: 256 ms

Resolved: VePhim API hf is back up in ba1ed66 after 4 minutes.


text:
Update scalafmt-core to 3.5.2

Updates org.scalameta:scalafmt-core from 3.0.8 to 3.5.2.
GitHub Release Notes - Version Diff
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

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

Or, add this to slow down future updates of this dependency:
dependencyOverrides = [{
  pullRequest = { frequency = "@monthly" },
  dependency = { groupId = "org.scalameta", artifactId = "scalafmt-core" }
}]

labels: library-update, early-semver-minor, semver-spec-minor, commit-count:1

Superseded by #162.


text:
建议目录探测加个可选参数

咱这个工具默认是加了一些敏感目录探测吗

目标多了,影响速度 而且遇到泛解析的扫描结果简直没法看😢
希望师傅有空优化下

哦 poc里配置route, 没事了


text:
Electric climatization does not track status after activation

After I updated a few days ago, I have noticed that the electric_climatisation switch turn back off after being turned on.
On the previous release I was using, the switch stayed on until the car finished heating/cooling.
Is this not possible now?
Also the sensor climatisation_time_left is not working.
"This entity is currently unavailable and is an orphan to a removed, changed or dysfunctional integration or device."
Is it not supported any more?

Should be fixed in latest release

authors: Farfar StoricU


text:
Get npm run dev to work again

Current state:

In one terminal run npm run dev:library at the root
In a second terminal (once the first terminal goes to watch mode) run npm run dev-run in packages/open-lens

Problems:

~The rebuild order seems to be wrong, namely if @k8slens/core changes then it rebuilds all of the dependencies of @k8slens/core and then rebuilds @k8slens/core instead of rebuilding @k8slens/core and then all of its dependents.~
The next problem is that now only the package that changes is rebuilt, but none of its dependents are after it is finished.

npm run before-dev-actions before npm run dev:library on the root followed by npm run dev-run in packages/open-lens is working

It would make more sense to me if:

We split dev to build and start
Remove all dev scripts from the packages
Introduce start script to packages which want to start something (e.g. open-lens)
Introduce one dev script in the root package.json which uses lerna watch to run npm run build in packages.

In that way, we would utilize lerna / nx to figure out what are the packages that changed, and then it would have the benefit of knowing package dependencies and therefore rebuild the correct packages whenever needed.
Something like this is operating in one of the repositories (monorepo) in the organization. Keep in mind, that the npm run build script will need a flag for development and to do so with minimal duplication, I think we should introduce our own script in the @k8slens/webpack package

Another topic is the pre-* scripts, which are sign of trouble to me. It shouldn't be that hard to make the scripts not entangled (coupled) with each other.

@jansav let me try that

In that way, we would utilize lerna / nx to figure out what are the packages that changed, and then it would benefit of knowing package dependencies and therefore rebuild changed packages and the packages that are using the changed package.

NOTE: we are currently doing that in this PR

authors: Nokel81 gabriel-mirantis jansav

repo: lensapp/lens


text:
🛑 App Chot.Sale is down

In 598e1e7, App Chot.Sale (https://app.chot.sale) was down:

HTTP code: 0
Response time: 0 ms

Resolved: App Chot.Sale is back up in a53ed79.


text:
LabPBR dosnt work with Create: Copycats+ Cogs

Setup: Minecraft 1.20.1 on Forge, Oculus Embeddium and Create: Copycats+ together with in Dev Bliss (when Pbr reflections are enabled) and Labpbr pack
Problem: CopyCat Cogs dosnt render properly in Bliss (and other shaders)

Sorry for my first bug report I did yesterday about this problem didnt mean to send it. Hope you can fix those problems great mod btw :)
If you need more info let me know

Also happend with BSL Shader when actvating advanced materials.
Happens to Both Cogwheels variants and Shaft but not to the fluidpipe of the mod

It seems duplicated with #78。

Oh that is  bad its the only thing that breaks with the shader (when disabling Pom). It even fixes a bug with contraption shadows.
So good work and good luck

I'm really sorry, it seems that it's not the same issue as #125, it was my oversight.

There is a relative issue:

#78

really no problem im just here to report. With the egotisticle reason that I want to include this mod in a modded valhelsia 6 Modpack and Im having 20fps compared to smooth 60 near my village without your mod.
anyways great work

Oculus flywheel compat 1.1.2 didnt fix anything with bliss in my testing (as a quick follow-up)

repo: leon-o/iris-flw-compat


text:
Train with own dataset on Resnet34

Hello Sir! I found your repo to be very helpful and useful.
I'm planning to train a model with my own dataset which consist of person images (mostly selfies) and their ID photos, so currently I'm doing some data cleaning and preparation.
My question is, is face detector included in this repo? Or do I have to crop and extract the face from the ID photos?
Thanks again!

Yes, you have to crop and extract the face from the ID photos before training.
You can use Face_detection from my eval_folder.py. It will download and init a face detector from insightface.
pip install insightface

from eval_folder import Face_detection
dd = Face_detection()  # Init a detector

# Test image
from skimage.data import astronaut
img = astronaut()
bbs, ccs, pps, nimg = dd.detect_in_image(img)

# bbs is the bbox, ccs is the confidence, pps is the key points, nimg is the aligned face images.
print(bbs.shape, ccs.shape, pps.shape, nimg.shape)
# (1, 4) (1,) (1, 5, 2) (1, 112, 112, 3)

plt.imshow(nimg[0])

dd.show_result(img, bbs, ccs, pps)

dd.detect_in_folder will do detection in folder and save results to {DATASET}_aligned_112_112
dd.detect_in_folder(dataset_folder)


text:
Add validations for configs

With new changes in config, structure, following validations has to be added.

Validate task exists when referenced via follow
Validate Commands field of config

If there are any more validations to be added, it can be included.
Expected

When dunner validate is run, above validations should be checked
When dunner do <task> is run, same validations should work

Done.

repo: leopardslab/dunner


text:
Would it be open to migrate to other search engine or LLMs?

I'd like to implement a internal conversational search with custom search engine and LLMs, would it be easy to do so? (i.e. is there a plugable interface/plugin system?)
Or is it strongly coupling with Bing search and lepton LLM?

Yep, it's possible.
For the search engine part, check out e.g. the search_with_bing() function, and the photon's init() function. We currently support bing, google and https://serper.dev/. It's probably easy to swap in your own search engine.
For the LLM model, you can replace the openai client to connect to other openai-compatible servers. The related question part requires a bit care, as your llm server need to support function calling / structured output. All lepton LLM endpoints support this (with custom models too) out of the box. With others, you might need a bit of adjustment, and you can also choose to simply turn off related questions.

I have successfully deployed on lepton.ai, and its lightning-fast response has left a deep impression on me : )
For local deployment, I guess we need to modify the following two parts, right?
https://github.com/leptonai/search_with_lepton/blob/a6ac6da2b3505111b86680aa886948579e24d687/search_with_lepton.py#L256-L260
https://github.com/leptonai/search_with_lepton/blob/a6ac6da2b3505111b86680aa886948579e24d687/search_with_lepton.py#L215
For online deployment, is it not possible to switch to other non-Lepton Hosted models (even those I deployed on Lepton)?"

LLM_MODEL: the LLM model to run. We recommend using mixtral-8x7b, but if you want to experiment other models, you can try the ones hosted on LeptonAI, for example, llama2-70b, llama2-13b, llama2-7b. Note that small models won't work that well.

https://dashboard.lepton.ai/workspace/olcdfyso/explore/detail/search-by-lepton

For local deployment, you just need to do (in commandline):
pip install -U leptonai
lep login

and make sure you log in to your workspace.
For the other non-Lepton hosted models, see above - essentially it is this line
https://github.com/leptonai/search_with_lepton/blob/db27467/search_with_lepton.py#L257
You might want to start with environmental variable RELATED_QUESTIONS=False with other api endpoints.

authors: SLAPaper Yangqing georgefeng


text:
🛑 Lessonpal is down

In 97c6292, Lessonpal (https://lessonpal.com) was down:

HTTP code: 0
Response time: 0 ms

Was getting the following error temporarily:
Error 503 first byte timeout
first byte timeout

Error 54113
Details: cache-hyd1100025-HYD 1655227927 2531727137

Varnish cache server

Resolved: Lessonpal is back up in 5785292.

authors: heIsThePirate rachanapand

repo: lessonpal/upptime-lessonpal


text:
Catch error without panic

I'm trying to send same email to multiple users, and do not want the app to panic if email could not be sent to any of the users, just need to be notified, and continue sending other emails, soI wrote this code:
use lettre::smtp::response::Response;
use lettre::smtp::error::Error;

let users = vec!("wrong@email", "correct@gmail.com");

let template = Email::builder()
       .from("myEmail@gmail.com")
       .subject("subject new")
       .html("
Hi man
")
       .text("message");

    let creds = Credentials::new(
        "myEmail@gmail.com".to_string(),
        "myPassword".to_string(),
    );

    let mut mailer = SmtpClient::new_simple("smtp.gmail.com")
        .unwrap()
        .credentials(creds)
        .transport();

    for user in users {
        let email = template.clone().to(user)
            .build().unwrap();

        let result: Result<Response, Error> = mailer.send(email.into());

        match result {
            Ok(_) => println!("Email sent to: {}", user),
            Err(e) => println!("Could not send to: {}, email error: {:?}", user, e)
        }
}

But the app is panic and exit at the first wrong case it face, and I got this error:
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Envelope(InvalidEmailAddress)', src/libcore/result.rs:999:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

How can I avoid this panic?

I solved it as:
use lettre_email::{Email};
use lettre::smtp::authentication::Credentials;
use lettre::{SmtpClient, Transport};
use std::path::Path;

fn main() {

    let users = vec!("wrong@email", "correct@gmail.com");

    match SmtpClient::new_simple("smtp.gmail.com") {
        Err(e) => println!("Could not connect to server: {:?}", e),
        Ok(client) => {
            let mut mailer = client.credentials(Credentials::new(
            "myLOGIN@gmail.com".to_string(),
            "myPSSWD".to_string(),
             )).transport();

            match Email::builder()
                .attachment_from_file(Path::new("myfile.pdf"), None, &mime::APPLICATION_PDF)
                {
                    Err(e) => println!("Error in preparing attachment {:?}", e),
                    Ok(e_builder) => {
                        let template = e_builder
                            .from("myEMAIL@gmail.com")
                            .subject("subject new")
                            .html("
Hi man
")
                            .text("message");

                        for user in users {
                            match template.clone().to(user).build() {
                                Err(e) => println!("error: {:?} in email: {}", e, user),
                                Ok(e) => {
                                    match mailer.send(e.into()) {
                                        Err(e) => println!("error: {:?} in emailing: {}", e, user),
                                        Ok(r) => println!("Emailing: {}, {:?}", user, r.message)
                                    }
                                }
                            }
                        }
                    }
                }
        }
    }
}

repo: lettre/lettre

license: mit

license_source: bigquery


text:
Default branch name breaks update functionality in packer.nvim

Is there any reason the default branch is called main and not master? I'm not sure about other package managers but packer.nvim seems to look for the master branch which is not available in this repository if you run PackerUpdate.
I fixed it for now by specifying the default branch via:
    use {
      "lewis6991/gitsigns.nvim",
      branch = "main",
      requires = {
        "nvim-lua/plenary.nvim"
      }
    }

Maybe this is a packer.nvim issue though and other package mangers are handling it "better".

All new projects on github now default with a main branch as opposed to master: https://github.com/github/renaming
Looks like this is already a confirmed packer issue: https://github.com/wbthomason/packer.nvim/issues/86

I've adjusted the README instructions to account for this. Thanks for raising.

This is no longer needed as of: https://github.com/wbthomason/packer.nvim/commit/a68b21be60a08a2ea1eb6c8964891d8611719d85


text:
vue的依赖应该放在devDep 和peerDep里吧

我看了下你的package.json目前在dep里

你说得对！！我前端工程化基础太烂了 ：（
我这就改一下

authors: Syntax-J lewkamtao

repo: lewkamtao/lew-ui


text:
Dead links

There are number of dead links that I'm not sure how to deal with:
In packages/lingua-franca/src/templates/pages/publications-and-presentations.tsx, there are pointers to a number of "assets" (mostly in the presentations section) that do not exist.  Anyone know where these are?  The problems are these:

https://www.lf-lang.org/publications-and-presentations/assets/slides/Lohstroh_etAl_CyPhy19.pdf
https://www.lf-lang.org/publications-and-presentations/assets/slides/Lohstroh_etAl_EMSOFT19.pdf
https://www.lf-lang.org/publications-and-presentations/assets/slides/Lohstroh_Lee_FDL19.pdf
https://www.lf-lang.org/publications-and-presentations/assets/slides/Lee_ActorsRevisited_CyPhy.pdf
https://www.lf-lang.org/publications-and-presentations/assets/slides/Lohstroh_etAl_FDL20.pdf

In packages/lingua-franca/src/components/layout/fonts.scss there are URLs for the following fonts that all yield 404s:

leelawadeeui-light.woff2
leelawadeeui-light.woff
leelawadeeui-semibold.woff2
leelawadeeui-semibold.woff

There are also a number of dead links in the Distributed Execution page, but this page needs a complete overhaul, so I'm not worried about those yet.
You can check for dead links using this website: https://www.deadlinkchecker.com/website-dead-link-checker.asp

They are here: https://github.com/lf-lang/website-lingua-franca/tree/main/packages/lingua-franca/static/assets/slides

authors: edwardalee lhstrh

repo: lf-lang/website-lingua-franca


text:
Weird default background / cannot be set

I have tried some of the examples and in each one my canvas ends up like this:
<canvas width="800" height="600" style="background:  0% 0% / contain rgb(15, 15, 19);"></canvas>

I don't set this random looking background anywhere and there don't seem to be any options.

This is how the debug renderer applies backgrounds, for performance reasons. The options are render.options.background and render.options.wireframeBackground which can be a CSS background value or just a url.
I think though as it stands it will always apply the inline style which I guess is your problem? Try something like this which might get around that:
Render.create({ currentBackground: null, options: { background: null })

authors: liabru xehpuk

repo: liabru/matter-js


text:
Parse traceroute arrays when they don't show up as JSON already

Without this, for my local installation (and some other private ones I've seen), you'll get traceroutes that show up as impossible numbers of hops and lots of !NaN nodeids and things. Basically, if it gets a string instead of a JSON array, it treats each character of the string as a hop in the route. This changes it to parse it to JSON if it gets it from the DB as a string.
I dunno why the DB isn't returning that field as JSON, but it isn't, so this should ensure it works right, anyway!

Looks good to me, thanks! :)

authors: ianmcorvidae liamcottle

repo: liamcottle/meshtastic-map


text:
在执行lua代码的时候想要中途退出但不关闭app可以怎么做

如果销毁栈的话,lua还是会运行

lua.close(); //养成良好习惯，在执行完毕后销毁Lua栈。
这句执行lua还是会运行的

Lua 栈仅仅是 Lua 与 java 的桥梁。Lua 是独立运行的，关闭栈不能结束正在执行的 lua 进程。
你也不应该强制结束 lua 进程（正如你不应该强制结束 java 进程一样）以免进入未定义的状态。
建议在 lua 中留一个接口，让 lua 自己结束任务。


text:
TextView设置行间距后，Span不居中

TextView添加lineSpacingExtra属性之后，CenterImageSpan不居中
binding.tv11.text =
    "I __ Emily Parker. The long text is used to help verify whether the grammar choice on Android widens the text spacing. The long text is used to help verify whether the grammar choice on Android widens the text spacing. The long text is used to __ verify whether the grammar choice on Android widens the __ spacing."
        .replaceSpan("__") {
            CenterImageSpan(this, R.drawable.bg_label)
                .setDrawableSize(-1)
                .setPaddingHorizontal(6.dp)
                .setPaddingVertical(3.dp)
                .setTextSize(16.dp) // 区别于AbsoluteSizeSpan是完全居中对齐行
                .setTextVisibility(false)
        }

<TextView
    android:id="@+id/tv11"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginTop="20dp"
    android:gravity="center"
    android:lineSpacingExtra="8dp" />

的确无法居中, 官方ImageSpan也是如此
我目前不知道如何获取lineSpacingExtra进行偏移计算, 而且我目前在更新其他优先级更高的框架并且工作繁忙实在没有时间/能力实现本功能
本框架由开源社区维护, 欢迎你或者其他有能力的人实现该功能

如何发起PullRequest

已经由 @ccominghome 修复本问题

authors: TwilightKHQ liangjingkanji

repo: liangjingkanji/spannable


text:
CRC32 verification depends on an unprotected bit that could be corrupted

Brief
When using LIBCSP with the CSP_O_CRC32 option, we should throw away corrupted messages. However, if the option bit is corrupted, I think the packet can bypass the security route because it wouldn't be verified.
Current understanding
I found in the source code how the packet can skip the security path with a bit change in the packet header:
https://github.com/libcsp/libcsp/blob/develop/src/csp_route.c#L63
Expected behavior
If a message is corrupted, it should be thrown away.
Impact
A message can pass the CRC32 security with only a bit change, which shouldn't be the case.
Correction
I don't know yet how to avoid this situation, but I wanted to share it with others.

@moonlight83340  Good point. The only proper solution might be to always add and check the CRC of outgoing and incoming packets. If this is not done, the responsibility lies with the underlying driver implementation. Of course, this is not an issue when CAN bus is being used.

Although, it seems like you can avoid corrupted packets by simply adding a CRC flag to your socket options. The router checks the socket/connection options against the incoming packet options and if they don't match the packet seems to be dropped. The check is performed here https://github.com/libcsp/libcsp/blob/develop/src/csp_route.c#L69 . So if the packet is with CRC flag set to 0 but the socket accepts only packets with CRC flag set to 1 -> packet is dropped.

I'm not sure but based on what I have understood with the source code. The option can be set on client side but not on server side ?
Am I wrong ?

Every time you call csp_accept() on server side, and it succeeds, a connection has been created by csp_route_work() again on the server side, e.g.:
https://github.com/libcsp/libcsp/blob/develop/src/csp_route.c#L250 this is where the new connection inherits the socket options
https://github.com/libcsp/libcsp/blob/develop/src/csp_route.c#L282 this is where the new connection is queued in your socket queue (at this point csp_accept() is unblocked if your are waiting on it).
To test it - just send a packet without CRC to a destination socket with CRC OPT enabled and on your server side you can put print statements inside csp_route_work() to verify whether or not the packet gets rejected.

Every time you call csp_accept() on server side, and it succeeds, a connection has been created by csp_route_work() again on the server side, e.g.:
https://github.com/libcsp/libcsp/blob/develop/src/csp_route.c#L250 this is where the new connection inherits the socket options https://github.com/libcsp/libcsp/blob/develop/src/csp_route.c#L282 this is where the new connection is queued in your socket queue (at this point csp_accept() is unblocked if your are waiting on it).
To test it - just send a packet without CRC to a destination socket with CRC OPT enabled and on your server side you can put print statements inside csp_route_work() to verify whether or not the packet gets rejected.

I meant where do we init the  CRC OPT on server side ? I'm not sure.

I don't think there is an existing example, but you can add this sock.opts = CSP_SO_CRC32REQ;  here: https://github.com/libcsp/libcsp/blob/develop/examples/csp_server.c#L43 and run the example. There are no functions for modifying the socket options, as far as I am aware, so you have to do it with direct modification of .opts.

Thank you, I wasn't sure about that, I will test with the option.
It would be nice to have a function or to be able to configure the socket option when creating the server socket.

repo: libcsp/libcsp


text:
IndexOutofBoundsException in AndroidInput

Hi,I have used libGDX for Android TV games,thank you for libGDX.
Now there having a issue about Key Value.
On Android TV telecontroller,some key's Key Value is unusually.When you press them,program will crash.
Error log:
FATAL EXCEPTION: main
java.lang.ArrayIndexOutOfBoundsException: length=256; index=389
at com.badlogic.gdx.backends.android.AndroidInput.onKey(AndroidInput.java:496)
at android.view.View.dispatchKeyEvent(View.java:7208)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1362)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1362)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1362)
at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchKeyEvent(PhoneWindow.java:1920)
at com.android.internal.policy.impl.PhoneWindow.superDispatchKeyEvent(PhoneWindow.java:1395)
at android.app.Activity.dispatchKeyEvent(Activity.java:2392)
...

Which Libgdx version are you using?

I'm using gdx-1.5.4.
And I have tried gdx-1.6.0,this issue never appear again.Have you fixed it?

Well, just update to 1.6.0 or newer :)

authors: davebaol s565288909 saltares

repo: libgdx/libgdx


text:
Add/Fetch NSData from index

Hi,
I added support for libgit2 git_index_add_frombuffer function on GTIndex with the following methods:
// - (NSData *)dataWithName:(NSString *)name error:(NSError **)error; (removed)
- (BOOL)addData:(NSData *)data withName:(NSString *)name error:(NSError **)error;

I still have to add some documentation and need to make it work with an inMemoryIndexWithRepository:error:
Also I had to update External/libgit2 to get the method, not sure if there's an issue with this.
Right now GTIndexSpec is passing but have failing specs at GTConfigurationSpec and GTRemoteSpec
So, I'm still working on it but I'm pushing this in case you find something fishy (specially with the updated dependency and the two failing specs)

I think I will move the data fetching to GTIndexEntry to make it work more like GTTreeEntry for API consistency.

Now this is working better.
The only problem I'm having is that this doesn't work with in memory indexes because git_index_add_frombuffer fetches the repository from the struct's rc.owner property which looks like it can't be set without touching libgit2.
Let me know if you see any issue with this PR :+1:

Awesome, thanks! :beers:

The only problem I'm having is that this doesn't work with in memory indexes because git_index_add_frombuffer fetches the repository from the struct's rc.owner property which looks like it can't be set without touching libgit2.

No worries. Just a couple other notes.

There it is :smile:
I addressed those notes and a couple more I found around

:metal:
Thanks!

Cool :+1:

authors: joshaber sagmor


text:
with mingw, winpthread is slow

authors of winpthreads are saying that it is slower than a usage of "native" thread API
as there is already a usage of the win32 thread API with Visual Studio,  would it be possible to also use it with mingw ?
thank you

as a "reference", read this message from one of the mingw-w64 developper :  https://sourceforge.net/p/mingw-w64/mailman/message/37379354/

The MINGW64/UCRT64 environments will use the GNU libstdc++ which implements std::thread via pthreads only so this is AFAICT not possible, while CLANG64 will use LLVM libc++ which implements it using native win32 calls.
So, this block is not really valid for all MSYS2 environments: better check for both MINGW AND GNU compiler.

authors: kmilos vtorri

repo: libjxl/libjxl


text:
[Core modules] Use LibraTimestamp to check whether in genesis

This has minor changes to enable use of LibraTimestamp to
check whether a function is running during genesis or not.
We are running in genesis if the time is 0, after genesis if the
time is > 0.

In LibraTimestamp:
I changed the name of "is_genesis" to "is_during_genesis" and
removed the condition where it checks for existence of an
instance CurrentTimeMicroseconds on the assoc address.
That value should always be stored there when we try to
look it up, and, if it isn't, the best thing to do is fail.
I changed the "aborts_if" spec for is_during_genesis to
specify abort when the CurrentTimeMicroseconds value is
absent.
I added a function "end_genesis" to set the time to 1.

In Genesis.move, I moved LibraTimestamp::initialize to the
very beginning of the initialize, and LibraTimestamp::end_genesis
to the very end.

I changed the name of is_genesis in LibraAccount and
AccountLimits.

Motivation
To prove everything is initialized only once, it is useful to have a test for whether we're in the "genesis" phase (executing code that builds the genesis state).
Have you read the Contributing Guidelines on pull requests?
yes
Test Plan
cargo test
Related PRs
(If this PR adds or changes functionality, please take some time to update the docs at https://github.com/libra/website, and link to your PR here.)

:umbrella: The latest upstream changes (presumably ed682258fc098416df36af91186d72cd7f9234b3) made this pull request unmergeable. Please resolve the merge conflicts.

@bors-libra r=tzakian

:pushpin: Commit a143a71 has been approved by tzakian

:umbrella: The latest upstream changes (presumably a902bf5f28ccebd56bb9b2f79cf763e31303b842) made this pull request unmergeable. Please resolve the merge conflicts.

:umbrella: The latest upstream changes (presumably 25a7f7640317381622142c0a649f781596208e4b) made this pull request unmergeable. Please resolve the merge conflicts.

authors: DavidLDill bors-libra

repo: libra/libra


text:
Vertex Shader Syntax Megathread

I NEED FEEDBACK. IF YOU LOVE OR HATE THIS, PLEASE SPEAK LOUDLY.
IF THIS WILL ABSOLUTELY CAUSE PAIN AND MISERY, SPEAK TWICE AS LOUDLY.
THANK YOU.
Here's a first example of where I'm heading towards. The syntax and the heavy commenting explaining the syntax are what's important; the code itself is not and just meant to be an example.
/*
 * FIRST DRAFT OF SDL SHADER LANGUAGE (or whatever we're calling it) SYNTAX.
 *
 * This was a random HLSL shader generated by Unreal Engine 3, that I trimmed up
 * to remove unused code, etc.
 *
 * Don't worry about what this shader _does_, as it's just one of thousands of
 * variations UE3 generated from whatever and I grabbed one at random.
 *
 *
 * I don't know if this program is correct yet; not only is the grammar still
 * evolving and the compiler still in development, it's possible I deleted
 * a needed function by accident or fat-fingered a simple edit. Just get the
 * idea of what I'm trying to do here.
 *
 * Anything in here might change. Also, if something looks like a
 * short-sighted, dumbass mistake, it probably is. Come talk to me about it.
 *
 * --ryan.
 *
 * icculus@icculus.org
 * https://twitter.com/icculus
 */

// These are constants (uniforms). We put them in a struct, because we'll be
// setting them up in a buffer on the CPU and sending them to GPU memory all
// at once, where the shader will _also_ be treating them as fields in a block
// of memory instead of individual variables. In that sense, there's no value
// in considering them individually.
//
// Since this piece happens to be compatible with C/C++ syntax, and you
// can #include files from there _and_ in these shaders, it's not unreasonable
// that this would go in a header by itself that the shader and native code
// can share (or the shader can have some #ifdefs so you can include it and
// only see this part of the file from C)...this can help make sure they're
// definitely looking at the same data layout.
//
// Alignment and packing on these will be well-defined.
struct FVertexConstants
{
    float4x4 ViewProjectionMatrix;
    float4x4 LocalToWorld;
    float3x3 WorldToLocal;
    float4 CameraPosition;
    float4 ScreenPositionScaleBias;
};

// This is _also_ a constant, but it's one that changes at a different
// rate than the others (one lives per-mesh, one lives per-frame), so
// it will live in a seperate buffer.
struct BoneMatricesConstants
{
    float4x3 BoneMatrices[75];
};

// These are your vertex attributes. You set up your arrays however you like
//  (interleaved in a single buffer, or totally separate buffers, or a little
//  of both), and fill in the details (format, offset, stride, buffer index)
//  when creating a pipeline object. Then assign the buffers with the data to
//  the appropriate indices before drawing, and when the vertex shader
//  runs, it assembles this struct from those sources. You specify
//  this struct as an argument to your main function.
//
// "@attribute(0)" means "this value is retrieved with the details in the
// first entry of SDL_GpuPipelineDescription::vertices array." There are
// several things with "@keyword" in the current language. I call them
// ATtributes. I'm _funny_!
struct FVertexInput
{
    float4 Position @attribute(0);
    half3 TangentX @attribute(1);
    half4 TangentZ @attribute(2);
    int4 BlendIndices @attribute(3);
    float4 BlendWeights @attribute(4);
    float3 DeltaPosition @attribute(5);
    half3 DeltaTangentZ @attribute(6);
};

// This struct holds all the _outputs_ from this shader.
// This struct is passed to the next stage of the pipeline (the fragment
// shader, at this moment). That next shader will need to know what these
// attributes mean and match up, so putting this in a common header
// (or having the matching fragment shader function _in the same source
// file_) is highly recommended.
//
// Other shader languages let you specify what these outputs mean, so
// the fragment shader can pick out the parts it cares about, but I'm
// hoping to avoid that and just pass it all through. If this turns out
// to be a terrible idea, we have @attributes at the ready!
//
// The "@position" means "this is the vertex position set by this shader"
// The system needs to know this beyond your shader pipeline, so there's
// an attribute to let it know where to find it in the output. Everything
// else here is just data that the fragment shader acts on.
struct FVertexOutput
{
    float4 ScreenPosition;
    float4 CameraVector_FogA;
    float4 Position @position;
};

// Heretical to C, functions start with the word "function" ...I am
// gambling that when people say "C-like language" they mean some
// set of characteristics that may include: curly braces, a preprocessor,
// almost no rules about whitespace, the distinctive for-loop syntax,
// and calculate-then-assign operators like +=, *=, etc. But not that it
// exactly resembles C in all ways.
//
// Notably, PHP and Javascript both use the "function" keyword and
// everyone thinks they are "C enough," so I hope this is okay.
//
// The C grammar just expects you to drop right into a datatype and figure
// out what you're talking about several tokens down the line...was it a
// function declaration? A function definition? A variable? A struct that
// might be defining a variable or a new type...?! An identifier, which
// might be a user-declared typedef, making parsing REALLY HARD...?!
//
// Sprinkling some "function" and "var" prefixes on these things helps me,
// the parser writer, immensely, and if we're being honest I bet it helps
// you, the program writer, too.
function float3 MorphPosition(FVertexInput Input)
{
    return Input.Position.xyz + Input.DeltaPosition;
}

// This function uses intrinsic functions, like "normalize" and "cross". Right now
// these match naming conventions in Direct3D, but that may change (GLSL provides
// many of the same functions but disagrees on what to call some of them).
//
// You can also see that matrices can be dereferenced like arrays.
//
// local variables are defined with a "var" keyword, which is also heretical
// to C users, but I couldn't help but notice WebGPU did this too, probably
// because parsing C is hard.
function float3x3 MorphTangents(FVertexInput Input)
{
    var float3x3 Result = 0;
    var float3 TangentX = ((Input.TangentX / 127.5) - 1);
    var float4 TangentZ = ((Input.TangentZ / 127.5) - 1);
    var float3 DeltaTangentZ = ((Input.DeltaTangentZ / 127.5) - 1);
    Result[2] = normalize(float3(TangentZ.x, TangentZ.y, TangentZ.z) + DeltaTangentZ);
    Result[0] = normalize(TangentX - (dot(TangentX, Result[2]) * Result[2]));
    Result[1] = normalize(cross(Result[2], Result[0]) * TangentZ.w);
    return Result;
}

// Note that this calls CalcBoneMatrix which has not been predeclared (it appears
// later in the file). There is no predeclaration; as long as the function is
// in the same compilation unit, the compiler will accept it (parsing accepts all
// function calls, then during semantic analysis, it parses functions definitions
// first to build a full list of predeclarations).
function float3 SkinPosition(FVertexInput Input, BoneMatricesConstants BoneBuffer)
{
    var float4 Position = float4(MorphPosition(Input), 1);
    var float4x3 BoneMatrix = CalcBoneMatrix(Input, BoneBuffer);
    return Position * BoneMatrix;
}

// Notable: all structs are passed by reference (which means if you change
// a field, it will be changed for the caller too). There are no pointers,
// references, or copies made. We should probably offer a way to mark it "const" though...
function float4x3 CalcBoneMatrix(FVertexInput Input, BoneMatricesConstants BoneBuffer)
{
    var float4x3 BoneMatrix = Input.BlendWeights.x * BoneBuffer.BoneMatrices[Input.BlendIndices.x];
    BoneMatrix += Input.BlendWeights.y * BoneBuffer.BoneMatrices[Input.BlendIndices.y];
    BoneMatrix += Input.BlendWeights.z * BoneBuffer.BoneMatrices[Input.BlendIndices.z];
    BoneMatrix += Input.BlendWeights.w * BoneBuffer.BoneMatrices[Input.BlendIndices.w];
    return BoneMatrix;
}

// Vector constructors work like you'd expect. Also, if you haven't noticed, these are
// floatX instead of vecX.
// Matrix and vector multiplication is built-in using standard C operators (even if this
// dithers down to an intrinsic "mul" function in Direct3D, etc).
function float3x3 SkinTangents(FVertexInput Input, BoneMatricesConstants BoneBuffer)
{
    var float3x3 Tangents = MorphTangents(Input);
    var float3x3 TangentBasis;
    var float4x3 BoneMatrix = CalcBoneMatrix(Input, BoneBuffer);
    TangentBasis[0] = float4(Tangents[0], 0) * BoneMatrix;
    TangentBasis[1] = float4(Tangents[1], 0) * BoneMatrix;
    TangentBasis[2] = float4(Tangents[2], 0) * BoneMatrix;
    return TangentBasis;
}

// The main event, literally. This is called once for each vertex. A vertex shader!
//
// You'll note the "@vertex" attribute. General functions can be shared between different shader types, but
// you have to flag the entry point as @vertex so certain magic can occur. Likewise for @fragment entry points.
// One parameter is marked "@inputs," which tells the compiler that this is the magic struct that will be
// assembled from various buffers based on the pipeline details. It changes values for every vertex. "@buffer(1)" means
// "whatever was bound to buffer index 1 with SDL_GpuSetRenderPassVertexBuffer() is available here." It stays
// the same for every vertex until you change it.
// The outputs are returned from the function in a struct.
// Note that you can have more than one shader in a single source file, and can also have vertex _and_
// fragment shaders in the same file; when loading shaders for use, you tell it the name of the entry point
// you want.
// Note that local variable declarations can be interspersed with code.
// Note that assignment is NOT an expression; the `Output.ScreenPosition = Output.Position = X;` works because
// assignment statements allow this as syntactic sugar, but something like `if (X = Y)` or even `if ((X = Y) != 0)` would be illegal.
function @vertex FVertexOutput VertexMain(FVertexInput Input @inputs, FVertexConstants Constants @buffer(0), BoneMatricesConstants BoneBuffer @buffer(1))
{
    var FVertexOutput Output;
    var float4 WorldPosition = Constants.LocalToWorld * float4(SkinPosition(Input, BoneBuffer), 1);
    Output.ScreenPosition = Output.Position = Constants.ViewProjectionMatrix * WorldPosition;
    var float3x3 TangentBasis = SkinTangents(Input, BoneBuffer);
    var float3 WorldVector = Constants.CameraPosition.xyz - WorldPosition.xyz * Constants.CameraPosition.w;
    Output.CameraVector_FogA.xyz = TangentBasis * (Constants.WorldToLocal * WorldVector);
    Output.CameraVector_FogA.w = 0;
    return Output;
}

// end of example_sdlsl_vertex_shader_ue3.sdlsl ...

Hello.
I notice that some of the comments are criticizing the declaration syntax only such as var float3x3 Result = ...;.
I understand that this is done to keep it as C-like as possible with its pseudo type-focused declaration syntax but it adds extra noise for not added benefit. A simple approach would be consistent with the qualifier focused declaration syntax, which would make it look a lot more like Go or Rust.
The rest of the syntax and smenatics for the language can remain the same or be whatever you like, but when people judge a language, I have noticed that the first thing that they focus on is the declaration syntax. Even if two languages have wildly different semantics but have the same declaration syntax, people will judge them to be the same.
I have to done two mockups of your original code but with the newer declaration syntax and showing the benefits of what the newer syntax allows for too. Both declaration syntaxes will be easier to parse than any C-like type-first syntax, and as an added benefit allow for very basic type inference allowing the user to omit the type in the declaration if the type can be trivially inferred from the expression.
Minor note: I am the creator and main architect of the Odin programming language, and have created numerous different programming languages over the years. I know quite a lot of the pitfalls in terms of designs of languages. I also recommend reading an old article of mine On The Aesthetics of the Syntax of Declarations.

VERSION 1
Without : and -> (Go-like as some people will say)
// Qualifier-focused declaration syntax
// KEYWORD NAME TYPE
struct FVertexConstants
{
    ViewProjectionMatrix    float4x4;
    LocalToWorld            float4x4;
    WorldToLocal            float3x3;
    CameraPosition          float4;
    ScreenPositionScaleBias float4;
}

struct BoneMatricesConstants
{
    BoneMatrices [75]float4x3;
}

struct FVertexInput
{
    Position      float4 @attribute(0);
    TangentX      half3  @attribute(1);
    TangentZ      half4  @attribute(2);
    BlendIndices  int4   @attribute(3);
    BlendWeights  float4 @attribute(4);
    DeltaPosition float3 @attribute(5);
    DeltaTangentZ half3  @attribute(6);
}

struct FVertexOutput
{
    ScreenPosition    float4;
    CameraVector_FogA float4;
    Position          float4 @position;
}

func MorphPosition(Input FVertexInput) float3
{
    return Input.Position.xyz + Input.DeltaPosition;
}

func MorphTangents(Input FVertexInput) float3x3
{
    var Result float3x3 = 0;
    // Basic type inference based declaration
    var TangentX = float3((Input.TangentX / 127.5) - 1);
    var TangentZ = float4((Input.TangentZ / 127.5) - 1);
    var DeltaTangentZ = float3((Input.DeltaTangentZ / 127.5) - 1);
    Result[2] = normalize(float3(TangentZ.x, TangentZ.y, TangentZ.z) + DeltaTangentZ);
    Result[0] = normalize(TangentX - (dot(TangentX, Result[2]) * Result[2]));
    Result[1] = normalize(cross(Result[2], Result[0]) * TangentZ.w);
    return Result;
}

func SkinPosition(Input FVertexInput, BoneBuffer BoneMatricesConstants) float3
{
    var Position = float4(MorphPosition(Input), 1);
    var BoneMatrix = CalcBoneMatrix(Input, BoneBuffer);
    return Position * BoneMatrix;
}

func CalcBoneMatrix(Input FVertexInput, BoneBuffer BoneMatricesConstants) float4x3
{
    var BoneMatrix = Input.BlendWeights.x * BoneBuffer.BoneMatrices[Input.BlendIndices.x];
    BoneMatrix += Input.BlendWeights.y * BoneBuffer.BoneMatrices[Input.BlendIndices.y];
    BoneMatrix += Input.BlendWeights.z * BoneBuffer.BoneMatrices[Input.BlendIndices.z];
    BoneMatrix += Input.BlendWeights.w * BoneBuffer.BoneMatrices[Input.BlendIndices.w];
    return BoneMatrix;
}

func SkinTangents(Input FVertexInput, BoneBuffer BoneMatricesConstants) float3x3
{
    var Tangents = MorphTangents(Input);
    var TangentBasis float3x3;
    var BoneMatrix = CalcBoneMatrix(Input, BoneBuffer);
    TangentBasis[0] = float4(Tangents[0], 0) * BoneMatrix;
    TangentBasis[1] = float4(Tangents[1], 0) * BoneMatrix;
    TangentBasis[2] = float4(Tangents[2], 0) * BoneMatrix;
    return TangentBasis;
}

// I'm putting this attribute at the front compared to fields/parameters because it is easier for the user to read
@vertex
func VertexMain(Input FVertexInput @inputs, FVertexConstants Constants @buffer(0), BoneBuffer BoneMatricesConstants @buffer(1)) FVertexOutput
{
    var Output FVertexOutput;
    var WorldPosition = Constants.LocalToWorld * float4(SkinPosition(Input, BoneBuffer), 1);
    Output.ScreenPosition = Output.Position = Constants.ViewProjectionMatrix * WorldPosition;
    var TangentBasis = SkinTangents(Input, BoneBuffer);
    var WorldVector = Constants.CameraPosition.xyz - WorldPosition.xyz * Constants.CameraPosition.w;
    Output.CameraVector_FogA.xyz = TangentBasis * (Constants.WorldToLocal * WorldVector);
    Output.CameraVector_FogA.w = 0;
    return Output;
}

VERSION 2
With : and -> (Rust-like as some people will say)
// Qualifier-focused declaration syntax
// KEYWORD NAME TYPE
struct FVertexConstants
{
    ViewProjectionMatrix:    float4x4;
    LocalToWorld:            float4x4;
    WorldToLocal:            float3x3;
    CameraPosition:          float4;
    ScreenPositionScaleBias: float4;
}

struct BoneMatricesConstants
{
    BoneMatrices: [75]float4x3;
}

struct FVertexInput
{
    Position:      float4 @attribute(0);
    TangentX:      half3  @attribute(1);
    TangentZ:      half4  @attribute(2);
    BlendIndices:  int4   @attribute(3);
    BlendWeights:  float4 @attribute(4);
    DeltaPosition: float3 @attribute(5);
    DeltaTangentZ: half3  @attribute(6);
}

struct FVertexOutput
{
    ScreenPosition:    float4;
    CameraVector_FogA: float4;
    Position:          float4 @position;
}

func MorphPosition(Input FVertexInput) -> float3
{
    return Input.Position.xyz + Input.DeltaPosition;
}

func MorphTangents(Input FVertexInput) -> float3x3
{
    var Result: float3x3 = 0;
    // Basic type inference based declaration
    var TangentX = float3((Input.TangentX / 127.5) - 1);
    var TangentZ = float4((Input.TangentZ / 127.5) - 1);
    var DeltaTangentZ = float3((Input.DeltaTangentZ / 127.5) - 1);
    Result[2] = normalize(float3(TangentZ.x, TangentZ.y, TangentZ.z) + DeltaTangentZ);
    Result[0] = normalize(TangentX - (dot(TangentX, Result[2]) * Result[2]));
    Result[1] = normalize(cross(Result[2], Result[0]) * TangentZ.w);
    return Result;
}

func SkinPosition(Input FVertexInput, BoneBuffer BoneMatricesConstants) -> float3
{
    var Position = float4(MorphPosition(Input), 1);
    var BoneMatrix = CalcBoneMatrix(Input, BoneBuffer);
    return Position * BoneMatrix;
}

func CalcBoneMatrix(Input FVertexInput, BoneBuffer BoneMatricesConstants) -> float4x3
{
    var BoneMatrix = Input.BlendWeights.x * BoneBuffer.BoneMatrices[Input.BlendIndices.x];
    BoneMatrix += Input.BlendWeights.y * BoneBuffer.BoneMatrices[Input.BlendIndices.y];
    BoneMatrix += Input.BlendWeights.z * BoneBuffer.BoneMatrices[Input.BlendIndices.z];
    BoneMatrix += Input.BlendWeights.w * BoneBuffer.BoneMatrices[Input.BlendIndices.w];
    return BoneMatrix;
}

func SkinTangents(Input FVertexInput, BoneBuffer BoneMatricesConstants) -> float3x3
{
    var Tangents = MorphTangents(Input);
    var TangentBasis: float3x3;
    var BoneMatrix = CalcBoneMatrix(Input, BoneBuffer);
    TangentBasis[0] = float4(Tangents[0], 0) * BoneMatrix;
    TangentBasis[1] = float4(Tangents[1], 0) * BoneMatrix;
    TangentBasis[2] = float4(Tangents[2], 0) * BoneMatrix;
    return TangentBasis;
}

// I'm putting this attribute at the front compared to fields/parameters because it is easier for the user to read
@vertex
func VertexMain(Input FVertexInput @inputs, FVertexConstants Constants @buffer(0), BoneBuffer BoneMatricesConstants @buffer(1)) -> FVertexOutput
{
    var Output FVertexOutput;
    var WorldPosition = Constants.LocalToWorld * float4(SkinPosition(Input, BoneBuffer), 1);
    Output.ScreenPosition = Output.Position = Constants.ViewProjectionMatrix * WorldPosition;
    var TangentBasis = SkinTangents(Input, BoneBuffer);
    var WorldVector = Constants.CameraPosition.xyz - WorldPosition.xyz * Constants.CameraPosition.w;
    Output.CameraVector_FogA.xyz = TangentBasis * (Constants.WorldToLocal * WorldVector);
    Output.CameraVector_FogA.w = 0;
    return Output;
}

First shot at semantic analysis just landed in revision control; got a little to clean up in there and then I'm going to start incorporating feedback from this thread.

Opinions on constructors, anyone?
The language is fairly strict about not implicitly coercing datatypes to match (assigning an int to a float will fail, you can't do if (1) because it's not a bool, etc). There is a little syntactic sugar to make things less ugly in one specific case, though: int literals will promote to various things:
var float x;
var int y = 5;
x = y;  // compiler error, you can't assign an int to a float!
x = 5;  // this will work, though, but only because it's a literal.
var float4 z = y;   // an int is not a float4.
z = 5;  // the compiler understands this literal is shorthand for float4(5.0,5.0,5.0,5.0)
// the real reason for this:
var float4 a = z / 5;  // this looks nice and clear instead of having to build a float4 to divide.

(float literals will do this too, but only promotes to vector and matrix types, not integers, bools, etc.)
That digression aside, GLSL is also strict in similar ways, but has a constructor syntax for when you need to cast, and it's the wild west: basically you can construct anything from almost anything:
bool x = bool(232);  // becomes true
vec4 f = vec4(1);  // becomes 1,1,1,1
vec4 u = vec4(2,3);
vec4 z = vec4(y.xy, f.z, float(true));

How permissive do we want this to be? Do we want this to be "almost anything can construct anything" as a guarantee you won't get stuck in a situation where you can't reasonably get your data into the necessary format, or do we want to impose rules of some sort?
We can be as strict as "you can't construct an int from a bool, even though it would be obvious for true to become 1 and false to become 0, use the ? operator instead", or we can be as loose as "if you construct a float4 from a user-defined struct, it'll use the fields until it has enough elements to fill in the whole vector and default to zero for the fields that can't be initialized because there weren't enough fields in the struct."

(We can be whatever we want to be, we don't have to say "GLSL/HLSL/MSL does this, so we must match it perfectly." If GLSL's constructors are a footgun, let's do our own thing.)

I would start conservative, you can always relax the restrictions in future versions of the language. I think coercing ints or floats to bools is a no-go and I think the vec constructors should accept the correct number of elements, no more or no less (assigning a scalar TO the vector feels like the right way to set all the elements). It's too easy to end up with weird bugs due to GLSL and HLSL's behaviors here.

assigning a scalar TO the vector feels like the right way to set all the elements

I think there's going to be way to much temporary object creation that wants to do...
myfunction(float4(splat));

...without an explicit temporary var and an assignment statement, so I don't think we can avoid it completely.
The other thing I see all over the place, that feels like fingernails on a chalkboard to me despite its popularity, is this...
x = float4(myvar.xyz, 1.0);

...and once you have that, it's pretty much open season.
I'm still fighting with this.

assigning a scalar TO the vector feels like the right way to set all the elements

As much as I hate it, NOT doing this has saved me a lot of bugs.
The following should be ok:
float4( float, float, float, float )
float4( float3, float )
float4( float2, float2 )
float4( float2, float, float )

These are in hot water:
float4( float, float3 )
float4( float, float, float2 )

These are not ok:
float4( float )
float4( float2 )
float4( float3 )

It may seem arbitrary, but it just comes from experience. The thing is that this hides a lot of bugs:
result = float4( myValue );
When myValue can be either float or float4 (or worse if float3 & float2 are allowed).
Nothing worse than realizing result.xyzw == result.xxxx because myValue is accidentally a scalar.
The following idiom will compile correctly and avoid bugs:
result = float4( myValue.xxxx );
Metal unfortunately doesn't allow this for float (because float is a native datatype while floatN is a template class) but I think that was mistake.
Additionally IMO swizzles on literals should work:
result = float4( 4.0f.xxxx );
Or in any case:
result = float4( float( 4.0f ).xxxx );
Open Question
In my experience, although more verbose, I've learnt to appreciate using explicit swizzles.
For example:
float3 myValue;
r = float4( myValue, anotherVar );

vs
float3 myValue;
r = float4( myValue.xyz, anotherVar );

Functionally they're the same. However it may be worth debating if you want to forbid r = float4( myValue, anotherVar ); while allowing r = float4( myValue.xyz, anotherVar ); since the former hides a potential bug (are myValue & anotherVar both float2? or float3 and float? or viceversa?) while the latter leaves no room for doubt (myValue.xyz is float3, anotherVar must be float).

Explicit swizzles for all these cases could be a good compromise. They're not super verbose but they clearly state intent.
Hypothetical question: If you were to require val = float4(foo.xxxx) what's wrong with val = foo.xxxx at that point, assuming you prohibit val = foo (i'm fine with this)?
The float4(a.xyz, w) case is common enough that I'm receptive to the need to support it without having things explode out into all sorts of gross permutations. @darksylinc's suggested list of patterns seems good to me - the rule can generalize to '1-N parameters containing a total of N scalars, where the size of each parameter is equal or less than the size of the previous parameter'. That prohibits stuff like float4(1, r.xyz) and such happening by accident (they can always recreate it at 0 execution cost with a swizzle).

Heretical thought: should we require flow control statements to use {}?
So this wouldn’t work:
if (x) do_something();

But this would:
if (x) { do_something(); }

This way there’s no risk of this mistake:
if (x);  // uhoh, the following statement block always runs!
{
   do_something();
}

But this might drive people positively nuts. But if we’re killing sacred C cows to remove C footguns, this would be an easy fix.

But if we’re killing sacred C cows to remove C footguns, this would be an easy fix.

I killed the sacred cow this morning; braces required now.
While I'm issuing decrees here: since we need braces and expressions can't be statements (etc), it's not ambiguous if you don't have parentheses around the condition expression, so they're optional, now...
if x == 1 {   // now legal!
    do_something();
}

C aficionados can wrinkle their nose then ignore this, since an expression can be wrapped in parentheses for the expected effect without any changes to the parser:
if (x == 1) {    // like C requires, it doesn't make any difference to us.
    do_something();
}

Now I'm sitting here deciding if the function signature should allow void:
function int x(void) { return 1; }   // this is currently legal.
function int x() { return 1; }   // this is also legal, but maybe it should be the only thing that is...?

Call me ignorant, but is inventing yet another high-level shading language strictly necessary? Is it possible to just adopt SPIR-V as an intermediate shading format instead? Then the developers can use any shading language they like, as long as there is a compiler to output SPIR-V for it. I admit, I have not researched if this is even remotely feasible, especially on Apple platforms, but it seems theoretically possible at least.
Creating your own shading language seems like too much of a duplicated effort to me. Additionally, you should have to maintain it like forever, adding new features constantly, every time a new video card with a new shading model hits the market

I can't speak for Ryan, but adopting SPIR-V as your official IR and (presumably) GLSL or HLSL as your official language has problems. Here are some reasons I can think of for a custom language:

SDL_gpu users will attempt to use features from GLSL or HLSL and file bugs when they don't work.
SDL_gpu users will have to install and keep up-to-date the whole toolchain (GLSL/HLSL compiler, spirv-cross, etc) and navigate compatibility issues
You need to maintain some amount of adaptor/interop layer for each of your supported targets just to map the SPIRV to that target
SDL_gpu has its own specific feature set, so a custom language can map well to that feature set and the intended way to use it - for example perhaps GLSL or HLSL have multiple ways you can represent uniforms, while SDL_gpu's shader language will make sure you do uniforms and constants right every time.
SDL_gpu's shader language can maintain a lower barrier to entry than other languages, much like how SDL has a low barrier to entry for casual developers.
<possible legal hazards censored so you don't have to think about them>

While I disagree with their decision for other reasons, the WebGPU spec committee also opted to do stuff custom instead of adopt GLSL+SPIR-V for multiple reasons. Sadly it is a decision with precedent so it's not weird for SDL_gpu to do it.  I don't personally want to learn another language but if SDL_gpu is going to have a custom one, it should be good :-)
The need to maintain it forever adding new features is overstated - SDL_gpu doesn't have to support every new feature. If you want to use a bleeding edge Vulkan extension, you're probably not using SDL_gpu to begin with.
fwiw I've been using d3d9/ps3_0 for like 12 years now (first via XNA, now via FNA+SDL2+MojoShader) and while it's annoying to have limitations, I've been able to do high spec experimental graphics stuff with that toolchain for a long time. I think people underestimate what the average developer can get done if they have a good toolchain and SDL+SDL_gpu will likely empower a lot of people to focus on being productive.

For what it's worth (and just because I want to be part of this thread in case it becomes historical or something :P), adding to @kg 's excellent points above, BGFX already does what @vanka78bg mentions, using GLSL as its base and it's not really a pleasant experience.
Besides a completely lack of documentation about the actual incompatibilities with "raw" GLSL (which is not GLSL's fault of course), it converts GLSL to GLSL (for optimizations I think), ESSL, SPIRV, HLSL and Metal (using HLSL as a base for everything except GLSL/ESSL IIRC), but you always have different gotchas depending on what the target actually is and you need to change your GLSL slightly depending on unknown rules.
Granted, this doesn't mean it cannot be done better, but given the "market share" BGFX already has and the base projects it uses to do all this (I don't think you'd be reinventing the wheel if you go this route, but using existing compilers I'm assuming) I really doubt you'll get a different result unless you write everything from scratch, and that's already a similar (and huge!) amount of work just to shoehorn GLSL into all of this, at which point creating your own flavor with your own limitations seems to be a better solution.
Just my (hopefully slightly informed) 2c.

This may or may not be interesting: https://twitter.com/icculus/status/1557753925469671425

This may or may not be interesting: https://twitter.com/icculus/status/1557753925469671425

1129 votes total, was almost exactly 70/30 at any given hour of the poll in progress.

I ended up letting both forms be valid, so use what you like!
https://github.com/icculus/SDL_shader_tools/blob/e2b3df139ac4118d9894bd7c4b54b703d324bac1/docs/README-shader-language-quickstart.md#variable-declaration-can-be-c-like-or-not

I don't know how widespread switch statements are in shaders in general, but do we want to remove fallthrough cases as a footgun?
This thing:
switch (x) {
    case 1:
         do_something();
         /* there's no `break` statement here */
    case 2:
         do_something_else();
         break;
}

Where if x == 1, this will call both do_something() and do_something_else().
This can be useful, but it can also be a disaster, as everyone knows. Should we require cases to end with a break/return/discard, or require them to be wrapped in braces that imply a break, or maybe just even imply a "break" at the end of a case without braces?
(or just dump the switch statement entirely? Or leave it as-is? There are arguments for every possibility on this one.)

I lack enough understanding to offer advise other than

Historically switch statements had been deemed as slow (if ladders, divergence, etc). We're talking > 10 year habits
Later certain usages of switch statements could degrade into high register pressure as a worst case. I can't remember if lack of default statement was good or worse, but it had an impact. If/else are more predictable. However for simple cases there's no difference (perf speaking)

if ladders

I'm certain on some targets, this is absolutely going to degrade to a collection of if-statements.
But like I said, the argument might be not to fix switch syntax, but to remove the switch statement outright (and revisit in version 2 if people really miss it).

About fallthrough:
Both on nelua and odin, you need to use the fallthrough keyword instead of break in order to use fall through.
This way, accidental fall through is avoided.

I've started work on the bytecode format, so if anyone has opinions on that sort of thing, discussion is sitting over in #6.

I admit having another shading language makes me edgy.  However, there is something else to consider: what GPU features are to be considered "core" and what features are optional? Across desktop and mobile there is a huge range of features (or tiers). Is it for GL2 class features, GL3 class features, GL4 class features and/or bleeding edge features?

GL2.x vs GL3.x class hardware: which means things like UBO's, native integer support, floating point texture and render target support. Actually it is even harsher, if one wants to support GLES2; that nightmare requires that all loops in fragment shading must be unrollable at compile time and even getting fp32 support in fragment shading is optional.
GL3 features that can be awkward on some platforms: transform feedback, geometry shaders, texture buffer objects
HW tessellation is usually considered a bad thing to do on mobile, even when it is offered, such as in GLES3.2
Compute shaders in how to specify buffer reads and writes: some platforms have additional limitations that others do not.
Fancy features that are big game changers: bindless texturing, sparse texturing come to mind immediately.

It seems VERSION 1 is simpler and with less clutter so I'd use that but I don't have a strong opinion there.
In general I wanted to share that the idea of SDLSL is cool, and I was waiting for something like this, an in-SDL way to deal with pixel shaders, to substitute a lot of custom cpu code to do sprite outlines, effects etc in my 2D engine and games.
Whatever you do, I'd just ask to keep it as simple as possible; if one wants access to super complex features and have a million options, they can use vulkan, Direct3D, OpenGL etc, but at least for me (solo dev, working on my own 2D engine and small games in my free time) simple and uncluttered is the main thing. Just like SDL is.
I currently use SDL2 with plain C and with its builtin texture render API, it has the minimum needed and I love it for it.
I also use SDL_image to load pngs, and SDL_mixer for the simple audio part of the engine.
If SDLSL were available I would use it to make the existing stuff more efficient and simple, doing outlines, shading the sprites,  some water effects etc.
Thanks and can't wait to use it!

I also strongly dislike the idea of having two syntaxes for variable declarations. I don't really care about how it looks like in the end, but please stick with one. The C-like style probably makes more sense given how C-like the rest of the language is, and out of practical concerns such as GLSL/HLSL compatibility for people who enjoy pain.
I'm not a fan of the var either; personally I think it should be removed if it doesn't complicate the parsing, but I can live with it.

I can remove one of them, but why is this such a terrible thing that there are two ways to do this? Are people that are capable of developing shaders going to see an unexpected "var mydata : int;" and not be able to piece together its cryptic meaning?
I think part of the struggle is not just creating a better language, but creating something that is still close enough to C that people won't rebel--which drives me nuts, but feels crucial. Keeping the C-like version of variable declaration as an option is part of that.
But if I had to drop one, the C-like version would be the one I'd like to drop.
The good news is that, since this is currently just syntactic sugar, it's easy to leave it in place now, and yank either out at the last moment, so decisions don't need to be made now.

I can remove one of them, but why is this such a terrible thing that there are two ways to do this? Are people that are capable of developing shaders going to see an unexpected "var mydata : int;" and not be able to piece together its cryptic meaning?

No that's not the problem. As I said above, the actual syntax doesn't matter all that much. But when (not if, when) I eventually see both of those syntaxes used in the same project I'm working on, or god forbid in the same file, I'm probably punching my monitor in OCD fueled rage :)
Are there actually any examples of other languages with two different, functionally identical syntaxes for variable declaration?

I think part of the struggle is not just creating a better language, but creating something that is still close enough to C that people won't rebel--which drives me nuts, but feels crucial. Keeping the C-like version of variable declaration as an option is part of that.
But if I had to drop one, the C-like version would be the one I'd like to drop.

I'm personally not very invested in keeping the language very C-like. I'm just saying that if that's the direction you're going with, the "rusty" declaration style makes little sense, in my opinion. I just don't see it adding anything other than needless inconsistency and mild confusion. For one, you can't use it in structs you share with your C/C++ code. And at that point, why would you go out of your way to use it anywhere else? Is there any reason for the alternative syntax to exist other than that it looks nicer (which is debatable in itself)?
On that note, I think the compiler needs some sort of a "reflection" API to probe at the layout of types for non-C-like languages and people who don't want or can't share headers between C/C++ and the shaders.

By the way, I have to say one departure from C that I really love is requiring braces for if/else/for/while/etc. clauses. Sometimes I wish actual C compilers had warning options to enforce this style.
One question though: how does else if work with this syntax? In C it emerges naturally, but I guess it's a special case syntactic sugar here?

By the way, I have to say one departure from C that I really love is requiring braces for if/else/for/while/etc. clauses. Sometimes I wish actual C compilers had warning options to enforce this style.
One question though: how does else if work with this syntax? In C it emerges naturally, but I guess it's a special case syntactic sugar here?

I think I probably forgot to update the grammar to deal with this, but yeah, I'd like "else if" to be legal. But it also makes me nervous that so many popular programming languages went with a separate elseif or elsif keyword here, like they discovered that this was a giant pain to parse. I guess I'll report back when I try this and find out its a disaster.

Does anyone have strong feelings about using array dereferencing with vectors?
So you have a float4 named x, and it's legal to do y = x[2]; and this is exactly identical to y = x.z; ... referencing x[4] would be a compile error, and possibly we disallow variables here,  too, so it's literally syntactic sugar that needs an integer constant.
Or maybe we just forbid array syntax at all with vectors?
Opinions?

I can remove one of them, but why is this such a terrible thing that there are two ways to do this? Are people that are capable of developing shaders going to see an unexpected "var mydata : int;" and not be able to piece together its cryptic meaning?

No that's not the problem. As I said above, the actual syntax doesn't matter all that much. But when (not if, when) I eventually see both of those syntaxes used in the same project I'm working on, or god forbid in the same file, I'm probably punching my monitor in OCD fueled rage :)

I'd prefer a single syntax for the language too, no matter which one is chosen in the end.

Does anyone have strong feelings about using array dereferencing with vectors?

There has been various times where I would've wanted to do that.
However bear in mind such cases were usually of the sort:
vec3 myVec = ...;
for( int i = 0; i < 3; ++i )
   myVec[i] = ...;

Rather than using literals. Which adds a few issues on the compiler side:

Some HW has no problem with i being dynamic (i.e. unknown at compile time). For the rest, older HW, however:
As long as i is known at compile time, it should be possible to support everywhere

This can be a rabbit hole of loop unrolling though
There are weird cases like:

for( int i = 0; i < fully_dynamic_variable; ++i )
{
    if( someBuffer[i] < 3 )
         myVector[someBuffer[i]]; // Technically legal, it's possible to support with an if-ladder. Do you want to support this?
}

FXC HLSL supports this (D3D11), but it can result in weird compiler errors once you nest a few loops or use ThreadGroup barriers, or divergence is involved; and it can lead to long compile times as FXC goes the extra mile to unroll the loop and try to make it work.
I don't know if all Vulkan/D3D12 HW would support dynamic addressing just fine though.

So, for a large number of GPU's there is a world of difference between dynamic and static array access. The usual story is that all variables (except UBO's, SSBO's and samplers/textures) in a shader are realized as a register. An array access determined at compile time is easy, but an array access of run time is a proper pain. For Intel GPU's the shader driver then stores these arrays in a scratch buffer (with enough buffer to cover all threads of all EU's). Reading and writing to that array then becomes a memory read and write with the gamble that the read and write are heavily cached. However, this is much, much slower than straight up register access.
The upshot is that allowing for the index of myVec4[] to be dynamic means a proper nightmare when it finally runs on a GPU. With that in mind, I suggest to avoid the issue completely and to not have array syntax to access elements of a [iu]vec2, [iu]vec3, [iu]vec4 unless the indices are static constants. Ditto for matrix element access too.

We have a parser, it's built with Lemon. Here it is:
https://github.com/libsdl-org/SDL_shader_tools/blob/main/SDL_shader_parser.lemon
(This is still work in progress, so things are changing.)
An overview of the language syntax is here: https://github.com/libsdl-org/SDL_shader_tools/blob/main/docs/README-shader-language-quickstart.md

Nice to see shader work aimed at the SDL community!
Can you elaborate a little on the design goals, please?  I've been looking around a bit for GLSL alternatives, and there seem to be a bunch of other shader languages out there (slang, rust-gpu, shady, ...), and I am a bit lost as to what the different advantages of the different languages are-- why would I use SDLSL instead of GLSL or one of the other shader languages?
You list "fast and cheap" and "reasonable to ship at runtime or embed in another project" as goals for the compiler, but it's not clear to me that this requires a new language (as opposed to a new compiler for an existing language).
I do agree that language design informs the necessary complexity of the compiler, but, if I may play devil's advocate for a second, making a compiler "fast and cheap" through a new language design is probably easier if you drop complex syntax and go for LISP-like S-expressions; parsing is still a nontrivial part of compile-time overhead.  Also, removing the preprocessor would avoid costly token/string manipulation; for meta-programming / modularisation, a macro mechanism that operates directly on the AST (or perhaps just better options for linking) would likely be faster.
Thus, my guess is that SDLSL has additional design goals, on top of the ones that are explicitly listed?

The upshot is that allowing for the index of myVec4[] to be dynamic means a proper nightmare when it finally runs on a GPU. With that in mind, I suggest to avoid the issue completely and to not have array syntax to access elements of a [iu]vec2, [iu]vec3, [iu]vec4 unless the indices are static constants. Ditto for matrix element access too.

Right now (in my working copy), my_vector[2] will dither down to the same code as my_vector.z ...if one were to specify my_vector[i] then it becomes a VECTORDEREF instruction in the bytecode instead, which I fully expect might turn into something at runtime as atrocious as this psuedo code:
float val;
if (i == 0) {
    val = my_vector.x;
} else if (i == 1) {
    val = my_vector.y;
} else if (i == 2) {
    val = my_vector.z;
} else if (i == 3) {
    val = my_vector.w;
} else {
    val = 0.0f;
}

I don't intend to bog down into loop unrolling to attempt to turn that back into a simple swizzle operation, because there will certainly be times where one can't obviously unroll the loop, and I don't want to have people trying to solve compiler error messages by making their code arbitrarily less complex.
I haven't decided if the luxury of this working slowly is worth it...if people are bothered that there's two ways to declare variables, surely they'll also be bothered by both vec[0] and vec.x working, and the unexpectedly bad fallback to that psuedocode when you don't have a constant index is probably not worth it.

why would I use SDLSL instead of GLSL or one of the other shader languages?

My personal hopes are that it's enjoyable to use, can be jumped into with an absolute minimum of hassle, and it Just Works everywhere you want your games to be. If other languages offer that, too, that's fantastic.

if people are bothered that there's two ways to declare variables, surely they'll also be bothered by both vec[0] and vec.x working, and the unexpectedly bad fallback to that psuedocode when you don't have a constant index is probably not worth it.

IMO this is not as bad as the two ways to declare a variable, because vec[i] and vec.x suggest different purposes: the former allows dynamic access and the later allows swizzling (and is arguably easier to read and write).
Dynamic access being silently transformed into horrible if-ladders is a nasty surprise, however. If the vec[i] syntax stays in the language, I would like to have a compiler option to make any non-constant access an error and/or a warning (regardless of whether the backend supports it or not). That'll be useful for people who wish to target hardware that does not support actual dynamic vector access.

I'd prefer a language completely different from GLSL over a language that is GLSL-like with a handful of differences. It's easier for my brain to compartmentalize it.
For instance, jumping between C11 and Python I can do very easily on the fly. Jumping between C# and Swift, also very easy. They inhabit separate parts on my brain.
However, jumping between GLSL and HLSL? Bit more cumbersome. I keep wanting to write something like GLSL in HLSL and vice versa. Jumping between JavaScript and Typescript, also cumbersome. My brain doesn't fully switch modes.
Makes me think of back when unity had javascript-like "UnityScript" and python-like "Boo" which were .NET CLR langs they made to look like javascript and python but worked different under the hood in many ways. Absolutely hated it. Programming in a language that looks like a certain language you have much muscle memory in, but behaves differently, is very annoying. I don't think I was alone in this, so few people used UnityScript and Boo they eventually removed both. Community in mass glommed onto C# even though it was technically more complex than either one and had "fluff" syntax for unity that you didn't really need. Knowing a more complex language with some things you don't need depending on context is less mental overhead than knowing two different languages that look the same but behave differently.
So, I'd expect if it is 95% like GLSL with a few differences, those few differences are going to be really obnoxious to me. Especially under-the-hood behavior changes where I have to go read docs to figure out what's happening. That is the type of thing that I can imagine for years, over and over, I will just keep forgetting on the periodic times I might jump out of GLSL and into this other lang. I'm inclined to say, if you're going to take GLSL style, take it all, even what you might not like. If it looks like GLSL it should behave like GLSL.
Or make it behave like C. Since SDL is so C-friendly making it so C can compile to shaders would probably fit quite well.
Changing the way buffers and images are declared is fine, probably preferable. Or changing/adding some attributes, that's probably fine. But the syntax and behavior of the general ops that do the logic? Something "GLSL-Like with little differences" will be far more annoying to me than just GLSL with things I have to omit or some methods I have to change. I'd rather copy over a chunk of GLSL and get a list of methods it doesn't support when trying to compile rather than rewriting it with a bunch of little nuances here and there.

What about adopting ReShade FX?
One advantage there is that there's a wealth of examples and shaders that you can potentially just drop into your project.

Also want to point out this to be thorough:
https://github.com/heroseh/hcc
Although I don't seriously consider anyone would get on board with making C11 the shader lang at this point :P But it's sitting right there, working, and is being actively worked on by its author. It would fit in with the overtly C-Style aesthetic of everything else in SDL well. Also the author heroseh might find SDL3 adopting this pretty cool and be into helping make changes.

something like https://github.com/heroseh/hcc seems perfect for me doing my indy stuff, as my engine and games are in C anyway, using C also for the shader lang would be the simplest thing.
But I'll use what is there as long as it fairly simple to get going, and can be made to work on all relevant platforms (pc, android etc).

Is there going to be @compute attribute and other kind?

authors: Akaricchi Andre-LA Arcnor Qubrick creichen darksylinc gingerBill hw-claudio icculus kevin-rogovin kg rygo6 slouken vanka78bg

license: Zlib


text:
FAST: compilation warnings on GCC 5.1

gcc version 5.1.1 20150422 (Red Hat 5.1.1-1) (GCC)

In file included from lib/proto/fast_book.c:2:0:
lib/proto/fast_book.c: In function ‘apply_increment.constprop’:
/home/denis/devel/arbcap/libtrading/include/libtrading/proto/fast_book.h:134:17: warning: array subscript is above array bounds [-Warray-bounds]
   if (set->books[i].secid == secid)
                 ^
lib/proto/fast_book.c: In function ‘fast_books_join’:
/home/denis/devel/arbcap/libtrading/include/libtrading/proto/fast_book.h:134:17: warning: array subscript is above array bounds [-Warray-bounds]
   if (set->books[i].secid == secid)
                 ^
/home/denis/devel/arbcap/libtrading/include/libtrading/proto/fast_book.h:134:17: warning: array subscript is above array bounds [-Warray-bounds]
   if (set->books[i].secid == secid)
                 ^

@mstanichenko Can you please take a look? Perhaps GCC 5.1.1 optimizes the inline functions more aggressively and discovers an off-by-one somewhere? Or then it's just a false positive.

Hello guys! I was already thinking of the problem. Need to reproduce it as don't know what it could be.
I just compile gcc locally but don't see these warnings. @divaykin, could you please tell what source I can use to get release you were building against? Thanks!
xgcc (GCC) 5.1.0
Copyright (C) 2015 Free Software Foundation, Inc.

@mstanichenko just master branch. we've not modified fast_book.c/.h lately. if can't be reproduced easily I don't think it make sense to bother much

@divaykin, I'm sorry for confusion. I meant GCC release. Is it available here? You must be also using additional optimization flags that might trigger that issue.

It's Fedora 22 beta's GCC. Nope, optimization flags are standard i.e.
unmodified Makefile.
Maybe just too bleeding edge compiler.
Best
D
On Wednesday, May 13, 2015, Marat Stanichenko notifications@github.com
wrote:

@divaykin https://github.com/divaykin, I'm sorry for confusion. I meant
GCC release. Is it available here https://gcc.gnu.org/releases.html?
You must be also using additional optimization flags that might trigger
that issue.
—
Reply to this email directly or view it on GitHub
https://github.com/libtrading/libtrading/issues/74#issuecomment-101446343
.

I was advised that there is a temporary workaround here. Do not use -O3 optimization. Use -O2 for example for the time being.

I am unable to reproduce with the GCC version from Fedora 23:
gcc version 5.3.1 20160406 (Red Hat 5.3.1-6) (GCC)

Closing.

authors: divaykin mstanichenko penberg

repo: libtrading/libtrading


text:
I need libuv.so.1 on...

I need libuv.so.1 on the Xubuntu derivitive of Trusty 14.04.2
A game I want to play requires it.
14.04.2 is the latest lts that AMD supports for my laptop's apu's gpu drivers.
The latest non lts they support is 15, but 15's security support has expired so no thanks.
P.S. Not sure if I should make new issue or not. See this
Edit: yeaaaah. that one's too old. the other issue I mean

Then build it from source?  Closing, not a bug.  If you're looking for help, go to libuv/help.

authors: GazbonicAcid bnoordhuis

repo: libuv/libuv


text:
hook for estimating gas

To avoid having to hard-code the gas limits for a transaction, we need a hook that simulates the transaction. As JsonRpcProvider does not have a signer, we would also need the public address for an account with some ETH and various tokens, including stETH, wstETH, LDO, etc.

Discussed on the call, we will try to implement it in staking widget, if it will go nicely, we will move it to js-sdk

authors: kozlovzxc-at-lido mymphe

repo: lidofinance/lido-js-sdk


text:
希望新增一个单点登录回调的入口

你当前使用的是哪个版本的 MinDoc(godoc_linux_amd64 version)?
最新版本master

你当前使用的是什么操作系统?
docker

————————————————————————————
体验了一下MINDOC，感觉很不错。虽然有些小瑕疵，但是不影响。目前主要有几个问题，我们企业内部使用，需要从自己的办公或工作平台登录，登陆后登录信息需要同步登录到MINDOC，目前用户同步我已经通过MYSQL写表完成了，但是因为整个项目是golang开发的，没办法下手去改，我期望如下：
新增一个页面，比如叫：http://www.test.com/login/login_back
这个页面要支持跨域。我可以在我的系统登录完成后直接用JS请求这个页面，并且传递UID和一个自定义的秘钥，这个秘钥可以写在配置文件里。这样在login_back页面完成查询用户及写入SESSION的工作，可以理解为一键登录了。严格来说，安全性有点点小问题，但是这个功能很实用，使用者应该能正确理解其风险。

这个涉及到用户同步问题，如果当前系统中不存在你回调的这个用户，还是无法继续下面的工作。

恩，不存在回调用户时直接略过操作即可。用户的同步其实是个小问题，我看了你的ISSUES里的回复，你的期望是MINDOC作为企业内部文档管理系统，那单点登录的接入您是一定要考虑的，没有那个系统会先上文档系统在上OA或ERP。


text:
new banner!

if you link to LL page, let's change current series graphic to this as well so they match.

Cute, right? Kinda proud of this one! :-)

Is this a slider I need to add to the homepage?

Yes
Sent from my iPhone

On Apr 18, 2018, at 6:56 AM, Adam Garrett-Harris notifications@github.com wrote:
Is this a slider I need to add to the homepage?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

authors: agarrharr keelyjay


text:
Extract-o-matic: Extract event handlers to page JS (take 2)

The main functionality here moves event handler attachment from inline
attributes to the page JavaScript that Lift 3 now supports. The reason for
this is so that, out of the box, Lift will be compatible with very restrictive
Content Security Policy settings when using built-in Lift features.
To do this, we add a lift.onEvent function that has both jQuery and vanilla
implementations. There are also a couple of fixes to existing JS functionality
here.
This fella's ready for a look, though I'm thinking we may want to do an M3
release before this goes in. This'll change behavior in a few ways and it'll be
good to have a stable fallback in case the changed behavior breaks things.
Also, this PR consists of a single commit because I accidentally merged
#1608  while cherry-picking another contribution into a branch that I merged
to master 😞 A cone of shame will ensue.

:+1:

Kk, now that M3 is out, will give another day or two for folks to raise any concerns/remarks and then merge this guy.

Aaaand movin' it.

authors: Shadowfiend eltimn

repo: lift/framework