We're already using a Seq Docker Container to having .NET logs centralized in Web UI.
Now I have a dart / flutter application and don't find any adapter for usage that stack with Seq.
On Homepage there is named the following one's to be supported:
Seq accepts logs via HTTP, GELF, custom inputs, and the seqcli command-line client, with plug-ins or integrations available for .NET Core, Java, Node.js, Python, Ruby, Go, Docker, message queues, and many other technologies.
So my question is now, if I can easily support Dart within Seq for saving Logs etc. without writing everything completely new.
Thank you.
I can't find a Dart client library for Seq. Perhaps you could use the Dart JS interop and one of the Seq JavaScript clients?
Related
I need to connect to different crypto exchanges from java or kotlin, but most of the libraries I have found are for python or other languages, I would like to know how to connect ccxt to java or kotlin, or to know if there is an alternative library for my needs.
I expected to find a guide on how to use ccxt with java or kotlin but I could not find it.
there is actually no active Java project to connect to crypto exchanges. There is https://github.com/knowm/XChange but it's not supported as much as CCXT, which is updated almost on a daily basis with a very responsive community.
The best way is actually to run CCXT in a small application and find a way for your java application to communicate with it (through a middleware). It's a bit overkill but it works.
I’m trying to use Lua/Moonsharp API scripting. There’s a command library, but there isn’t a function that I need. My question is, am I able to create my own function, or am I limited to what’s been written?
Specifically, for a software called BobCAD a Lua plugin is available. There are lists of commands like Bcc.SetCamObjParameter, though, there isn’t the command that I need. I’m assuming that some aspects of the BobCAD software are inaccessible to API, but am I limited to the library in this plugin, or can I add my own commands? I thought that there would be some C# file somewhere in the program directory where I can read the functions and possibly learn how to create my own, but I don’t see anything like that. (Or are scripting functions set up internally to the software, and I’m only given access to what has been provided?)
(N.b. I'm not familiar with BobCAD specifically, but this answer should be generally applicable.)
Generally speaking, for use cases like this (where Lua scripting is provided as part of a larger program, or by a plugin for a larger program), it's the developer of the program or plugin who decides what API is available to Lua. In the latter case they may also be limited by what the program's plugin API allows; in the case of BobCAD you are likely limited to what the BobCAD plugin API permits, and then further limited by what parts of that API the developers of the Lua plugin chose to make available to Lua itself.
You can of course write your own functions in Lua, but in terms of actually talking to the host program you are restricted to the API that program makes available, unless they make available some mechanism (like LuaJIT's Foreign Function Interface) for reaching into the program from Lua and calling functions that were not made explicitly available -- which most do not.
As for finding "a C# file somewhere in the program directory" -- C# is a compiled language; C# libraries are generally shipped as pre-compiled CLR binaries (with a .dll extension) and do not contain source code. If the source code for BobCAD and/or the Lua plugin is available you could always modify it and re-compile it, but as BobCAD is commercial, closed-source software, I would not expect it to be available.
At that point, your options are basically:
figure out a way to do what you need with the commands that are available;
try to reverse engineer enough of the program to do what you need without access to the source code;
or look for another program that has the features you need.
Can someone explain what does this phrase mean in this sentence?
Dart is a client-optimized programming language for apps on multiple platforms.
The first thing you need to understand is that it is about optimization by the Dart developer (that is, Google).
This means that Google does not optimize Dart for use in applications other than client-oriented applications.
For example, in Dart there is no such thing as RDBMS (Relational Database Management System) and Google does not plan to contribute to this kind of development (to optimize the use of this type).
All software like this is very fragmented and not compatible with each other due to the lack of optimization from the developer’s side.
Simple, dart use a Dart Virtual machine that helps to optimize the code and compile just in time super fast and render or re-render UI very easy, Dart VM works very similar that JVM with Java, Dart Virtual Machine compile your code to low level very fast so if you want to build web apps, mobile apps o desktop apps you will has a full optimized machine code, for Flutter, dart VM compile from Dart to C++, for the web Dart VM compile from dart to Javascript, Dart is a good robust language designed to make very easy characteristics like Hot reload and Hot restart.
A programming language optimised for building user interfaces with features such as the spread operator for expanding collections, and collection if for customising UI for each.
For example spread operator
var list = [1, 2, 3];
var list2 = [0, ...list];
assert(list2.length == 4);
To clarify, the "Client" in Client-Optimized is referring to the actual user client, same idea as as Client/Server in web technologies.
Here it refers to the part of the App that is responsible for sending requests to the rest of your App for it to do all the functions you've built it to do.'Client' here includes the front-end parts that the person using your application is interacting with
For many reasons (including the ones mentioned in the other answers), Dart is really well suited to make all things Client run super smoothly. Its Optimized how it renders the UI, the layout, the animations, the load times, how it compiles, etc so everything the user (or "Client") does is Optimized.
As mentioned before, it lacks optimization for things that are not client facing such as database management.
The feature widely advertised about Erlang is its ability to hot-swap code modules while the app is running and is shown as a unique killer-feature not available in other languages.
Here is a quote from Joe Armstrong's book:
Most servers execute a fixed program, and
if you want to modify the behavior of the server, you have to stop the server
and then restart it with the modified code.
Though, in context of web development, the majority of languages support so-called hot-swapping of the code even without calling it so. It's just updating code and publishing it on the web via git or a continuous integration solution.
I know Erlang has a lot of applications in domains other than web, so I am sure it makes sense in those cases.
But, does this feature have benefits in comparison to dynamic languages used for web, like Python, Ruby, JavaScript? What are the cases for web development where it outperforms popular web-oriented languages?
The hot code swaping in erlang offers more than the ability to upgrade the code (I won't make any comparison with python, ruby or javascript, I have a very limited knowledge of them):
You can decide, for each node, when you will load a new version of code
Then 2 versions of code will be present in the VM, all the running processes will use the old version of each module until a next fully qualified call to this module occurs (Mod:Func/arity)
if you are using OTP behaviors, the server (or fsm or gen_event) will be called first with their code_change call_back, receiving in the parameters, the old version of the module. So it is possible to check either or not it is possible to manage the upgrade, and to perform any necessary operation on the state Data, ETS, process synchronization... before really jumping into the new code.
if you are not using OTP behavior, it is still possible to receive the messages of the form {system, From, Req} and then call sys:handle_system_msg/6 which in turn will call the code_change call_back.
This feature is not targeted at web development just as Erlang itself was not created with web development specifically in mind.
One possible area where this feature outperforms model used in general dynamic languages used for web is precise control over the way code is upgraded.
code can be updated not only between calls, but also during call
you can provide explicit path of upgrade for state related to call
I'm currently starting to integrate "Delphi Web Script" in my application basically only as a scripting engine (interfacing with functions, classes, etc.); awesome software for the standard delphi open source quality in my opinion, but just for curiosity,
What's exactly the "web part" of the project?
How is intended to be used?
It was used somewhere with some success commercially?
Thanks!
As ain said, the original use was for PHP-like, ASP-like server-side web-page generation, but it was also capable of general purpose use, which is what I used it for. And as I did not use the "web" side of DWScript, most of the "web-oriented" features haven't been ported over (only the HTML Filter was ported actually).
The Web functionality is still available in the SourceForge repository, if someone wants to tackle the port. Though, they may be outdated beyond simple renamed methods and classes, as since DWSII, the script engine has gained various features. For instance, it is now capable of multiple thread-safe executions of a single compiled script, while the old codebase is built around the limitation that a compiled script can be executed by only one thread at a time.
On the other hand, there are some new features that could simplify the porting, the simple WebServer demo recently added uses RTTI to expose TWebResponse & TWebRequest f.i. (was manually exposed in DWSII). On the down side, that's only possible with recent Delphi versions.
AFAIK the main focus of the original author of this scripting engine was to make it possible to embed Pascal scripts into HTML pages, just like ie PHP does it. Hence the name "Delphi Web Script". While the focus of the current maintainer, Eric Grange, is on using it as a general purpose scripting engine, it should still be possible to use it for web purposes as well - for that you use the "filters" feature of the library. Check out the dwsHtmlFilter unit for HTML filter.