Noutați

What Is The Integer Sequence (std::integer_sequence) In C++ 14

In modern programming sometimes we want to use a sequence of integers that are created at compile-time. In C++14, the std::integer_sequence is a class template for the sequence of integers that is generated at compile-time. In this post, we explain what integer sequence (std::integer_sequence) is in modern programming. What is the integer sequence (std::integer_sequence) in C++ 14? In C++14, the std::integer_sequence is a class template defined in a header that can be used for the sequence of integers generated at compile-time. In some cases, looping through a range of numbers whose span is unknown is used and, in these cases, we can use the std::integer_sequence integer sequence. Thus, we can create a sequence of integers at compile time. Our application knows the sequence of integers before it runs, and we use them on runtime as a package. In other words, the std::integer_sequence is used to hold a sequence of integers which can be turned into a parameter pack. We can use integer_sequence in template programming or meta-programming algorithms, and this will make our code faster and less complex. In C++14, a simple syntax for the std::integer_sequence can be written as shown below.   template class integer_sequence;   Here, T is the type of integers and val is a parameter pack of integers. Is there a simple integer sequence (std::integer_sequence) example in C++ 14? Here is a simple example how we can use std::integer_sequence.   template void print_sequence2(std::integer_sequence) { ( (std::cout

Read More

Visual Studio Code CMake Tools Extension 1.16 Update: New CMake Tools Sidebar and CMake Debugging options

Visual Studio Code CMake Tools Extension 1.16 Update: New CMake Tools Sidebar and CMake Debugging options Sinem Akinci November 15th, 20230 1 The November release of the CMake Tools extension in VS Code is now available. With this release, we have two major new updates to the extension:  A new, customizable CMake Tools status bar and side bar for your presets and CMake actions  Script mode debugging support for the CMake Debugger  The full list of updates can be seen in our change log. This release features 10 contributions from the open-source community. Thank you all for your continued support!  Release Schedule Updates Starting with this November release, CMake Tools will now release every 3 months. You can learn more about our release schedules on our release schedule wiki.  Updates to the default CMake Tools UI Starting in this 1.16 release, the default CMake Tools status bar will only have commonly-used actions like Build, Debug, and Run to de-clutter the status bar by default. All options for configuring your project through CMake presets or kits/variants will be found in the CMake Tools side bar under their respective node. There are new items for Deleting Cache and Reconfiguring and accessing CMake settings at the top of the Project Status view.  New CMake Tools Sidebar Under each respective node, you will be able to view and toggle your active CMake presets and targets and perform Configure, Build, Test, Debug, and Launch actions on your project configurations. This will provide a one-stop location to view and edit all your CMake configurations by default.  New Simplified CMake Status Bar Items The previous status bar displayed a plethora of CMake configuration options, but with the new default, you will have access to only the commonly-used CMake actions in the status bar in order to clean up space in the view by default. Then, you can expand the CMake sidebar for your configuration needs. This view can be customized to suit your needs, so you can pull whatever relevant items you want to the status bar and configure the amount of space each command takes up. If you have any other feedback on this new experience, please comment on our open GitHub issue. Added script mode for the CMake Debugger We have now added support for users to use the CMake debugger to debug externally launched CMake processes or any generic CMake script. To do so, please add cmakeDebugType to your launch.json  configurations to specify whether you are debugging with the three available modes: configure, external, and script. Example launch.json with CMake debug types { “configurations”: [ { “type”: “cmake”, “request”: “launch”, “name”: “Debug CMake script”, “cmakeDebugType”: “script”, “scriptPath” “${workspaceFolder}/anyScript.cmake }, { “type”: “cmake”, “request”: “launch”, “name”: “Debug externally launched CMake processes”, “cmakeDebugType”: “external” “pipeName”: “” } ] } To learn more about the supported CMake debug variables in your launch.json, please see our CMake debug documentation. You can also debug vcpkg portfiles using the CMake Debugger in the new script mode. source cross-platform library manager that uses portfiles to know how to acquire, build, and install libraries. Debugging portfiles can be helpful whenever you are adding a new library of your own to the vcpkg catalog. To learn more, please see our blog post on debugging vcpkg portfiles. What’s next? For our next release of CMake […]

Read More

Microsoft Previews Additional Copilot Tools for Azure

At its Ignite 2023 conference, Microsoft this week previewed Copilot tools to simplify the management of the Azure cloud service along with a tool that streamlines the building and deploying of artificial intelligence (AI) applications on the Azure platform. In addition, Microsoft launched Microsoft Copilot Studio, a low-code tool that automates the process of creating data integration plugins and adding custom copilots within the Microsoft Copilot for Microsoft 365 tool that Microsoft previously launched. Microsoft Copilot for Azure leverages large language models (LLMs) to enable IT teams to use natural language to create, configure, discover and troubleshoot Azure services. It also enables IT teams to create complex commands, ask questions and optimize costs. Erin Chapple, corporate vice president for Azure Core at Microsoft, told Ignite attendees that Microsoft, along with a handful of customers, is already using Microsoft Copilot Azure to manage Azure infrastructure. In the long term, it’s clear that Microsoft is moving toward streamlining the building and deployment of AI applications using Azure AI Studio, a framework for invoking the AI models that Microsoft makes available on the Azure platform. The goal is to make it possible for organizations to create their own copilots based on AI models they have trained. It’s still early days in terms of organizations leveraging AI models to build applications, but it’s already apparent that DevOps and machine learning operations (MLOps), along with data engineering and cybersecurity best practices, will need to converge. Microsoft is making a case for Azure AI Studio as the framework that will enable IT organizations to achieve that goal. Of course, Microsoft is not the only provider of IT infrastructure resources with similar ambitions, but thanks to its investments in OpenAI and the acquisition of GitHub, it is furthest along in terms of defining a framework for building AI applications at scale. Last week, GitHub previewed an extension of the Copilot tools it already provides to help developers write code that leverages generative AI to automatically propose an editable plan for building an application based on natural language descriptions typed into the GitHub Issues project management software. Copilot Workspace will generate editable documents via a single click that can be used to create code that developers can then visually inspect. Any errors discovered by application developers or the Copilot Workspace platform can also be automatically fixed. At the same time, GitHub has extended the scope and reach of Copilot Chat to make it simpler for developers to use natural language to discover issues in their code base. Generative AI is already having a massive impact on the rate at which applications are developed, but that code still needs to be reviewed. Chat GPT is based on a general-purpose large language model (LLM) that is trained by pulling in code of varying quality from all across the web. As a result, code generated by the platform might contain vulnerabilities or be inefficient. In many cases, professional developers still prefer to write their own code. Of course, not every programming task requires the same level of coding expertise. In many instances, ChatGPT will generate, for example, a script that can be reused with confidence across a DevOps workflow. There is no shortage of mediocre developers who are now writing better code thanks to tools such as GitHub Copilot, and soon, […]

Read More

What Are The Member Initializers And Aggregates Features in C++14?

C++14 brought us a lot of useful things that we use today. One of the great features of C++14 was the member initializers and aggregates feature that a class with default member initializers may now be an aggregate. In this post, we explain how can use member initializers and aggregates with examples. What are the member initializers and aggregates features in C++14? With the new C++14, a class or struct with default member initializers may now be an aggregate in definition. “If there are fewer initializer-clauses in the list than there are members in the aggregate, then each member not explicitly initialized shall be initialized from its brace-or-equal-initializer or, if there is no brace-or-equal-initializer, from an empty initializer list“. Here is an example,   struct st_X { int a; int b = 100; }; st_X X = { 5 };   Here, X.b will be 100 automatically. Are there simple examples about member initializers and aggregates features in C++14? This feature can be good to be used with default values (i.e. “Unknown”), here is an example.   struct st_student { std::string name; int score; std::string uni = “Unknown”; };   st_student s0 = { “David Millington”}; st_student s1 = { “Yilmaz Yoru”, 98 }; st_student s2 = { “Ian Barker”, 99, “Harvard University” };   Here, David will have 0 score and “Unknown” university, Yilmaz will have “Unknown” university. We can use parameters in the next parameters.   struct st_test {  const char* str; int a; int val = str[a]; }; st_test test = { “ABCD”, 2 };   Here example above, value of test.val is initiated automatically to 67 which is third char ‘C’. Is there a full example about member initializers and aggregates feature in C++14? Here is a full example. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35   #include #include   struct st_student { std::string name; int score; std::string uni = “Unknown”; };   struct st_test {  const char* str; int a; int val = str[a]; };   struct st_X { int a; int b = 100; };   int main() { st_student s0 = { “David Millington”}; st_student s1 = { “Yilmaz Yoru”, 98 }; st_student s2 = { “Ian Barker”, 99, “Harvard University” };   std::cout

Read More

C++ Extension in VS Code 1.18 Release: Quick Fixes for missing header files, Extract to Function & More 

C++ Extension in VS Code 1.18 Release: Quick Fixes for missing header files, Extract to Function & More  Alexandra Kemper November 15th, 20231 1 The 1.18 version of the C++ Extension in Visual Studio Code has been released. With this version of the extension, we have added several new features such as:   Quick Fixes for missing header files  Extract to function/member function  Assistance acquiring a compiler   For the full list of changes, please reference the 1.18 release notes.   Quick Fixes for missing header files  Have you ever written C++ code and forgotten to add the right header? Gotten frustrated because of an IntelliSense error that turns out to just be a missing header file? We have now added a quick fix suggestion (lightbulb) to make the process of adding the correct header files to C++ files easier. If there is an unknown symbol in your C++ code and the C/C++ Extension identifies the correct header file in your workspace, you will now have a quick fix available. Select the quick fix and the necessary header file include will be added to the top of your current C++ file.   Extract to Function/Member Function  One of the most highly requested features for C++ in VS Code is support for extracting functions or member functions from code. With the 1.18 release, you can now select a section of your code, extract it into a separate function, and place a reference to the new function in the old location.   To try this feature, select the C++ code you would like to extract. A code action (lightbulb) will appear with the option Extract to Function. Otherwise, right click on the code and select Refactor > Extract or use the keyboard command Ctrl + Shift + R, Ctrl + E to get more information. As you can see below, you will then have the option to name the new function that has been created. The new function containing your highlighted code will be placed above the current function.  Upcoming improvements will further streamline the extraction process, such as being able to extract to a free function. Any feedback you have would be very valuable to share through our GitHub issues to help us build the best experience.   New C++ Compiler Acquisition Process  To streamline the C++ setup process, we have created an easier C++ compiler installation experience.   For Mac and Linux users, you can now use the Install Compiler button to install a C++ compiler quickly and easily. The button will install a default C++ compiler on your system through the VS Code command line. This compiler will be automatically configured for IntelliSense. On a Mac, the default compiler installed is clang, while for supported Linux distros it is gcc and g++.  To access this experience, you can use the C++ walkthrough or configuration quickpick.  To access the walkthrough, use the Open Walkthrough command in the command palette and select the Get Started with C++ Development option. Under the Set Up your C++ Environment, if you do not have a compiler already installed, you will see an Install Compiler button.   To access the IntelliSense configuration quick pick, enter the Select IntelliSense configuration command in the command palette. From the list, select the Install a Compiler option. A notification will open asking you to confirm the installation process. […]

Read More

Functions View for Build Insights in Visual Studio 2022 17.8

Functions View for Build Insights in Visual Studio 2022 17.8 Eve Silfanus November 17th, 20230 2 Introduction We are excited to unveil a new feature in Build Insights for Visual Studio: Functions View! This feature is available in Visual Studio 2022 version 17.8. Functions View offers essential insights into functions and forceinlines within your codebases. Download Visual Studio 2022 17.8 We extend our sincere thanks thanks to the developer community, especially our game studio partners, for actively providing feedback. Your contributions are invaluable in shaping this new feature. For more details about Build Insights and to explore other features like Included Files and Include Tree Views, please visit our initial announcement blogpost. Code Generation Insights with Functions View Functions View is a powerful tool that displays the impact of each function on the total build time by analyzing code generation times and forceinlines. Forceinlines, commonly used to boost runtime efficiency, can also influence build times. The following sample code is based on a public code sample by Aras Pranckevičius. We will use it to show you how you can optimize your builds with Functions View. To setup your project, create a C++ Console application and copy the following sample code: #include struct float4 { __m128 val; float4() { val = _mm_setzero_ps(); } float4(float x) { val = _mm_set1_ps(x); } float4(float x, float y) { val = _mm_set_ps(y, x, y, x); } float4(float x, float y, float z) { val = _mm_set_ps(0.f, z, y, x); } float4(float x, float y, float z, float w) { val = _mm_set_ps(w, z, y, x); } float4(__m128 v) { val = v; } }; static __forceinline float4 operator+(const float4& a, const float4& b) { return float4(_mm_add_ps(a.val, b.val)); } static __forceinline float4 operator-(const float4& a, const float4& b) { return float4(_mm_sub_ps(a.val, b.val)); } static __forceinline float4 operator*(const float4& a, const float4& b) { return float4(_mm_mul_ps(a.val, b.val)); } static __forceinline float4 operator/(const float4& a, const float4& b) { return float4(_mm_div_ps(a.val, b.val)); } static __forceinline float4 csum(const float4& p) { __m128 r = _mm_add_ps(p.val, _mm_castsi128_ps(_mm_shuffle_epi32(_mm_castps_si128(p.val), _MM_SHUFFLE(0, 3, 2, 1)))); return _mm_add_ps(r, _mm_castsi128_ps(_mm_shuffle_epi32(_mm_castps_si128(r), _MM_SHUFFLE(1, 0, 3, 2)))); } static __forceinline float4 dot(const float4& p0, const float4& p1) { return csum(p0 * p1); } static __forceinline float4 dot(const float4& p) { return dot(p, p); } static __forceinline float4 rsqrt(const float4& x) { #define C0 9.999998e-01f #define C1 3.0000002e+00f #define C2 .5f #define C3 340282346638528859811704183484516925440.f __m128 e = _mm_mul_ps(_mm_rsqrt_ps((__m128) x.val), _mm_set_ps(C0, C0, C0, C0)); e = _mm_min_ps(e, _mm_set_ps(C3, C3, C3, C3)); return _mm_mul_ps(_mm_mul_ps(e, _mm_set_ps(C2, C2, C2, C2)), _mm_sub_ps(_mm_set_ps(C1, C1, C1, C1), _mm_mul_ps(_mm_mul_ps(x.val, e), e))); } static __forceinline float4 normalize(const float4& v) { return v * rsqrt(dot(v)); } static __forceinline float4 ident() { return float4(0.f, 0.f, 0.f, 1.f); } static __forceinline float4 sampleFun1(const float4& x, const float4& y) { return csum(x) / x + y; } static __forceinline float4 sampleFun2(const float4& q1, const float4& q2) { return sampleFun1(q1 * q2, q2 – q1) * (q1 + q2); } static float4 sampleFun3(const float4& pq, const float4& mask) { const float c8 = 0.923879532511287f; const float s8 = 0.38268343236509f; const float g = 5.82842712474619f; float4 ch = float4(2) * (normalize(pq) – normalize(mask)); float4 sh = pq * normalize(ch); float4 r = ((g * sh * sh – ch * ch) + sh / float4(s8, s8, s8, c8)) * mask; return normalize(r); } struct matrix […]

Read More

『RAD Studio 12 Athens』の提供開始

本日、Embarcaderoは、RAD Studio、Delphi、C++Builder 12 Athensをリリースしました。RAD Studio 12 Athensリリースには、製品の将来の基盤となるエキサイティングな新機能が満載されています。 Table of Contents 主な新機能 C++向けの重要な革新 Delphiの素晴らしい追加機能 新しい基盤としてのFireMonkeyとSkia MDIとタブ付きUIアーキテクチャによるVCLのモダナイゼーション Delphi RTL、データ、その他の新機能 RAD Studio IDEの改善 RAD ServerとInterBase 多数の機能改善と要望への対応 RAD Studio 12 Athensのリリース情報 主な新機能 以下はRAD Studio 12 で導入された主な機能の概要です。次のセクションで詳細を説明いたします。 C++BuilderのIDEにVisual Assistを統合し、高水準なC++言語のコード補完、コードナビゲーション、名前変更リファクタリングを提供 大幅に更新されたWin64向けのCLANGベースC++コンパイラのプレビュー。最新のC++標準言語機能をサポートし、外部ライブラリやC++コードとの統合を強化 お客様からの要求に対応するため、複数行の文字列リテラルを含むDelphi言語を追加 FireMonkeyでのSkiaのサポート。FireMonkeyの新しい基盤の採用により、すべてのターゲットプラットフォームにおいて、グラフィックスと UI コントロールのレンダリングでより高いパフォーマンスと品質を提供 VCLのMDIと新しいタブUIアーキテクチャを再構築し、お客様は最小限の労力で既存のプログラムにHighDPI とスタイル設定のサポートを追加することによって、既存のアプリケーションをモダナイズ 新しいFireDAC Query by Example (QBE)コンポーネントにより、データのフィルタリングが容易になりました。またDelphi向けの新しいJSONウィザードによってXMLと同様に、一般的なJSON形式のデータをオブジェクトにマッピング可 IDE の生産性と品質が大幅に向上し、RAD Studio を日常的なタスクで、さらに簡単かつ迅速に使用可能に! RAD Server のスマート ID をサポートし、RAD Server の使いやすさを維持しつつ、お客様がホストする REST API をより強力かつ柔軟に対応 C++向けの重要な革新 このリリースでは、C++Builder と C++ ツールチェーン(RAD Studio でも利用可能)に重点を置いています。エンバカデロの開発チームは、C++コンパイラとツールチェーンのモダン化、コード補完による驚異的な生産性の提供、Visual Assistの統合によるリファクタリングとナビゲーションの追加という2 つの重要な C++ の改善に焦点を当ててきました。 C++ツールチェーンのアップグレードは、C++サポートの驚くべき全面的な見直しです。Clangの新バージョンだけでなく、CおよびC++ランタイムライブラリ、STL(C++標準テンプレートライブラリ)、さらにリンカとデバッガも含まれています。 この大規模な取り組みの目標は 最近のライブラリやプロジェクトで見かけるC++コードを実行できること サードパーティ製ライブラリを簡単に使用できること 最新の安全なコーディング標準の活用 よりパフォーマンスの高いアプリの提供 優れたデバッグ機能を備えた最新のC++標準を提供 などを目指しています。 またリンクやSTLのような分野を直接改善し、COFFやPDBオブジェクトフォーマットやデバッグ・フォーマットを使用するようなWindowsプラットフォーム標準に移行することを目指しています。この機能の詳細については、こちらのブログをご覧ください。 12.0では、コマンドラインコンパイラとして利用可能な新しいC++ツールチェインのプレビューを提供しています。 エンバカデロでは、既存のC++コンパイラと並行して、この新しい C++ ツールチェインの IDE 統合、および VCLやFireMonkey UX ライブラリを含む RAD Studio の Delphi ライブラリとの統合に引き続き取り組んでいきます。これらのアップデートが利用可能になり次第、サブスクリプションでお客様に提供する予定です。 12.0におけるC++Builderのもう1つの重要な革新は、これまで Visual Studio でしか利用できなかった、世界をリードする C++ 生産性ツールである Visual Assist テクノロジの統合によってもたらす機能としてコード補完、コードナビゲーション、リファクタリングなどを含む、より優れたコード インサイトの提供です。これらは、コーディング中に頻繁に呼び出されるコード補完から、開発者が手作業でコードベースを検索する代わりにコードの関連部分を簡単に見つけられるナビゲーション、コードの整理と安全性を支援するリファクタリングまで、一般的な開発作業を支援する重要な生産性ツールです。 RAD Studio 内では、シンボルと参照の検索、プロジェクトのアウトラインの表示、実装から宣言への移動、およびリファクタリング名の変更など、Visual Assist 機能の重要な初期サブセットが利用可能になります。 Delphiの素晴らしい追加機能 Delphiコンパイラ側では、12.0から長い文字列リテラル、三重引用符で制限された複数行の文字列リテラルのサポートなど、小さいながらも優れた拡張機能がいくつか追加されており、SQL、HTML、JSON、XML、および同様の複数行テキストを簡単に埋め込むことができます。 この機能の詳細については、こちらのブログをご覧ください。 またDelphi 12 コンパイラは、Win32/Win64 互換性の強化、NaN 浮動小数点数比較のサポート強化、すべてのプラットフォームでの浮動小数点例外の無効化のために、NativeIntの弱い型エイリアス定義も提供しています。 プラットフォームのサポートに関しては、Delphi 12.0 では、Play ストア アプリの提出に対する Google の要件である Android API レベル 33 との互換性を提供しています。 新しい基盤としてのFireMonkeyとSkia UI ライブラリに関してDelphiとC++Builderの両方で RAD Studio 12.0 の最も重要な改善点は、非常に人気のあるクロスプラットフォームレンダリングエンジン Skia を FireMonkey に統合したことです。これはSkia4Delphi オープンソースプロジェクトを統合することで実現されていますが、Vulkan サポート、Skia Shading Language によるエフェクトとフィルタのサポート、WebP エンコーダー、プリンターのサポート、PDF への印刷などの機能拡張も行われています。 RAD Studio Skia のサポートには、ダイレクトAPI、特定の UI コントロール(TSkAnimatedImage、TSkLabel、TSkPaintBox、TSkSvg)、および FireMonkey UI コントロールの UI レンダリングの Skia による自動マッピングがあります。一般的に、Skia はレンダリングの品質とパフォーマンスを向上させます。同じ Skia UI コントロールが VCL Windows ライブラリでも使用できることに注意してください。 ライブラリの将来に向けた新たな強固な基盤を提供する Skia サポート以外にも、最近の多くのプラットフォームの機能強化に合わせて Android サポートを改善し、分割画面サポートを追加し、FireMonkey アプリケーションを横に並べたペインで動作できるようにしました。これは、利用可能な画面の一部のみを使用するものであり、大きな画面を備えたタブレット デバイスで特に便利な機能です。またiOS と Android の両方に対応し、単一行 TEdit コントロールと複数行 TMemo コントロールのIME テキスト入力機能を大幅に刷新しました。 FireMonkey 開発向けの IDE のもう 1 つの重要な改良点は、Apple と Google が要求するすべての解像度でアイコンとスプラッシュ画面を生成するウィザードの導入とAndroid Adaptative Iconのサポートです。詳しくは、こちらのブログを参照ください。 MDIとタブ付きUIアーキテクチャによるVCLのモダナイゼーション エンバカデロは、お客様の既存アプリケーション(多くの場合、ターゲットとする業界で非常に大規模で確立されているもの)の移行を支援するために、VCLのモダナイゼーションを行ってきました。12.0では、昔ながらの、しかし今でも人気のあるMDI(WindowsのMulti Document Interface)モデルを維持することに重点を置いています。新しいリリースでは、MDIアプリケーションの完全なHighDPIサポートを採用し、VCLスタイルも採用できるようになります。これによってマイクロソフトが近年MDIのサポートを軽視していることに起因するプラットフォームの問題を回避することができます。 さらにRAD Studio 12.0では、新しいTFormTabsBarコントロールにより、MDIからの簡単な移行や全く新しいモデルとして、新しい MDI タブ付きフォーム のUI(Google Chromeや他の多くの人気アプリのようなもの)が導入されました。VCLライブラリには、高DPI画面向けのフォント管理が改良されています。 またVCL の改善の一環として、新しいリリースでは、作業の簡素化に役立つ多数の新しいデザイナーが導入されています。新しい文字列リストエディタ、複数行文字列エディタ、ボタン、ラジオグループ、パネルのクイック設定ダイアログがあります。これらの便利なツールのいくつかは、もともとKSVC(Konopka Signature VCL Controls)の一部でしたが、このKSVCのアドオンコントロールパックのインストールが不要になり、最初から誰でも利用できるようになりました。 コア機能となるRTL定義の他に、Delphi開発者がコンポーネントライブラリで公開していないWindowsプラットフォームAPIを簡単に呼び出せるように、Object Pascal に変換された完全な Windows API ヘッダーの新しいユニットセットを作成しました。このAPI変換には311個のDelphiヘッダーファイルと41MBのコードが含まれ、Microsoftが提供するプラットフォームAPI全体をカバーしています。 さらに、新しいインターフェイス、プロパティ、イベントにより、Edgeブラウザの統合が改善され、前回のリリース以降のプラットフォームWebView 2コントロールの改良に対応しました。そして VCL のさらなる改善点としては、非常に柔軟なTControl 列挙子、Desktop Windows Manager (DWM)の機能強化、ダブルバッファリングモードへの変更が挙げられます。 Delphi RTL、データ、その他の新機能 他のDelphiコアランタイムライブラリにも多くの改良が加えられており、C++Builderでも活用されています。また主力データベースアクセスライブラリであるFireDACでは、クラシック なQBEモード(Query-By-Example)のサポートが追加され、簡単なデータフィルタリング条件を入力するためのUIを開発できるようになりました。 さらに、FireDAC コンポーネントは、特定のクエリコントロールの SQLコマンドの種類の制限、複数の SQL コマンドの禁止、実行時にSQL クエリの変更をブロックなど、開発者がアプリケーションのセキュリティを向上させるための追加機能を提供します。これらの改善により、他の業界のベストプラクティスと併用することで、開発者はアプリケーションのセキュリティを向上できるようになります。 RAD Studio 12.0 では、新たに JSON データバインディングウィザードも導入されています。 JSON データバインディングウィザードでは、JSON データ構造に基づいて、新しいファイルにストリーム出力するためDelphi データ型を作成することができます。 RAD Studio IDEの改善 もちろん、IDE にも多数の変更点があります。 まずは、機能インストーラの新しいUXで、製品の初期インストールや、後から機能やプラットフォームを追加する際に使用されます。このダイアログボックスは、最新のVCLコントロールを使用して、動作とUIが完全に再設計されました。以前の複数ステップの設計とは異なり、追加アドオンを含むすべての主要なインストールオプションが1ページにまとめられているため、ユーザーにとって非常に使いやすくなっています。また、新しいダイアログでは、インストールの問題が発生した場合に、より適切なエラー情報も提供されます。 次に呼び出しスタック、構造体ビュー、 構造ペインのような多くのサブウィンドウでIDE カラー パレットを使用した構文の強調表示が追加されています。またソースコードの検索、ナビゲーションツールバーの機能、複数の編集ウィンドウの使用、その他多くの小さな調整も改善されています。 そしてC++BuilderのVisual Assist統合の導入に加え、Code Insightに使用されるDelphiLSPのサポートもさらに改善されました。例えば、たとえば、コード補完に言語キーワードが含まれるようになり、補完中にコード テンプレートがコード文脈的に正しい領域に表示されるほか、ジェネリックスや補完配列または配列型のサポートが強化されました。 最後に、RAD Studio はコードエディタ向けの新しい ToolsAPI をさらに拡張し、開発者やサードパーティベンダーが IDE 向けのさらに柔軟なプラグインを作成できるようにしました。 RAD ServerとInterBase RESTサーバーAPI ホスティングプラットフォームである RAD Server には、いくつかの注目すべき改善点があります。 最も大きな変更点は、スマート ID モデルを簡単にサポートできるようになったことで、標準ライブラリを使用して、サーバーが公開するリソースに対してより優れた識別子を定義できるようになりました。RAD Server は、パフォーマンスの向上、データ ページングの改善、セッション認証の向上、および全体的な品質も提供します。 最後に、RAD Studio の新バージョンでは、最近リリースされた InterBase 2020 Update 5 のDeveloper Editionと組み込み版(ToGo、IBLite)が提供されています。 多数の機能改善と要望への対応 RAD Studio 12.0のリリースでは、上記で紹介した機能に加え、IDE を始め、Delphi RTL ライブラリ、VCL UI ライブラリ、FireMonkey クロスプラットフォームライブラリ、FireDAC などのデータアクセスレイヤ、HTTP クライアントおよびサーバコンポーネント、RAD Server など、複数のサブシステムにおける品質向上に焦点を当てています。 RAD Studio 12 では、Quality Portal(https://quality.embarcadero.com)でお客様から報告された 1,027 件の問題の修正を実施し、877 件のパブリックなバグレポートへの対応、そしてお客様から要望された150 件の新機能に対応いたしました。 RAD Studio 12 Athensのリリース情報 本日より、RAD Studio / Delphi / C++Builder 12の無料トライアルをダウンロードできるようになりました。また、新たにバージョン12を購入される方は、アップデートされた製品ビルドのダウンロードURLが案内されます。アップデートサブスクリプションまたは上位のサポートプログラムに加入されている方は、既存のライセンスを使用してRAD Studio 12をカスタマーポータルサイト(https://my.embarcadero.com)からダウンロード/インストールできます。 詳細については、以下のリンクをご確認してください。 エンバカデロテクノロジーズの製品ページ DocWikiの新機能情報 – RAD Studio 12 Athens RAD Studio 12 Athensのリリースノート RAD Studio 12 Athensのインストール_ノート 12.0で修正されたお客様から報告された問題(英語) RAD Studio 12機能一覧(PDF) GitHubのアップデートされたRAD Studio 12のデモ RAD Studio/Delphi/C++Builder 12.0の詳細について、日本時間11月10日午前1時に開催される “What’s Coming“ウェビナーにご参加ください。 Reduce development time and get to market faster with RAD Studio, Delphi, or C++Builder. Design. Code. Compile. Deploy. Start Free Trial   Upgrade Today    Free Delphi Community Edition   Free C++Builder Community Edition

Read More

Grafana Labs Acquires Asserts.ai to Bring AI to Observability

At its ObservabilityCON event, Grafana Labs today announced it has acquired Asserts.ai to automate configurations and customization of dashboards. In addition, the company is previewing an ability to apply artificial intelligence (AI) to incident management to make it simpler to surface the root cause of an issue. Sift is a diagnostic assistant in Grafana Cloud that automatically analyzes metrics, logs and tracing data, while Grafana Incident is a generative AI tool that summarizes incident timelines with a single click, creates metadata for dashboards and simplifies the writing of PromQL queries. Grafana Labs is also making generally available an Application Observability module for Grafana Cloud to provide a more holistic view of IT environments. Finally, Grafana Beyla, an open source auto-instrumentation project that makes use of extended Berkeley Packet Filtering (eBPF), is now also generally available. That tool enables DevOps teams to collect telemetry data for an IT environment from a sandbox environment running in the microkernel of an operating system. That approach makes it simpler to automatically instrument an IT environment, but there are instances where DevOps teams will be managing complex applications that will still require them to collect telemetry data via the user space of an application. Richi Hartmann, director of community for Grafana Labs, said collectively, these additional capabilities will make it simpler to apply observability across increasingly complex IT environments. For example, the AI technologies developed by Assert.ai will make it possible for DevOps teams to start sending data to Grafana Labs that will enable the cloud service to identify the applications and infrastructure being used. AI models will then be able to automatically generate a custom dashboard for that environment that DevOps teams can extend as they see fit, said Hartmann. In general, machine learning algorithms and generative AI are starting to be more widely applied to observability. The ultimate goal is to automatically identify issues in ways that reduce the cognitive load required to manage complex IT environments while also making it easier to launch queries that identify bottlenecks that could adversely impact application performance and availability. It’s not clear to what degree observability tools might eliminate the need for monitoring tools that track pre-defined metrics, but most DevOps teams will likely be using a mix of both for the foreseeable future. In the meantime, IT environments are only becoming more complex as various types of cloud-native applications are deployed alongside existing monolithic applications that are continuously being updated. The challenge is the overall size of DevOps teams is not expanding, so there is a greater need for tools to streamline the management of DevOps workflows. AI will naturally play a larger role in enabling organizations to achieve that goal, but it’s not likely to replace the need for DevOps engineers, said Hartmann. Conversely, many DevOps teams will also naturally gravitate toward organizations that make the tools they need to succeed available. Today, far too many manual tasks are increasing turnover as DevOps teams burn out. Organizations that want to hire and retain the best DevOps engineers will need to invest in AI. Of course, DevOps, at its core, has always been about ruthlessly automating as many manual tasks as possible. AI is only the latest in a series of advances that, over time, continue to make DevOps more accessible to IT professionals of […]

Read More

What Are The New Overloads For Ranges In C++ 14?

In C++14, there are pretty good new overloads of std::equal, std::mismatch, and std::is_permutation that can be used to take a pair of iterators for the second range. They can be used with the new C++ Builder 12 along with the 11.x, or 10.x versions too. In this post, we explain these new overloads that we use ranges of iterations. What are the new overloads for ranges in C++ 14? In C++14, there are new overloads of std::equal, std::mismatch, and std::is_permutation that can be used to take a pair of iterators for the second range. We can pass them in two full ranges that have a beginning and end. In modern C++, the range parameter is obtained from a std::list without the original list that needs to be traversed through to get the size. In C++11, std::equal, std::mismatch, and std::is_permutation had 3 parameters, these were First1, Last1 for the Range1 and First2 for the Range2. In C++ 14, there is one more parameter that you can use, it is the Last2 for the Range2. What is the new overload for the std::equal in C++14? In C++11, std::equal is defined as below.   template inline bool equal(_InIt1 _First1, _InIt1 _Last1,_InIt2 _First2)   The std::equal is defined in the header included in the header that returns true if the range between the First1 and Last1 is equal to the range between the First2 and the First2 + (Last1 – First1), and it returns false if this is not satisfied.   std::string s = “abCba”; std::cout

Read More

Debug vcpkg portfiles in CMake script mode with Visual Studio Code

Debug vcpkg portfiles in CMake script mode with Visual Studio Code Ben McMorran November 16th, 20230 0 We recently announced support for debugging the CMake language using the VS Code CMake Tools extension. Now in version 1.16 of the extension, you can fine-tune the debugger configuration using a launch.json file. This enables debugging in CMake script mode in addition to the existing debugging of CMake project generation.  CMake script mode is an alternative way of running CMake that does not generate a build system, but instead uses the CMake language as a general-purpose scripting language. While script mode is not widely used (although there are fun esoteric examples), it is the mechanism that powers vcpkg portfiles. vcpkg uses portfiles to know how to acquire, build, and install libraries. Through a combination of the new experimental “–x-cmake-debug” vcpkg option and CMake Tools, it’s now possible to debug these portfiles in VS Code. This is helpful when adding a library to the vcpkg catalog.  Debugging vcpkg portfiles As an example, we’ll explore how to debug the vcpkg portfile for zlib. First, ensure you have CMake Tools 1.16 and CMake 3.27 installed. Next, clone the vcpkg repo and open it in VS Code.  > git clone https://github.com/microsoft/vcpkg > cd vcpkg > .bootstrap-vcpkg.bat (or bootstrap-vcpkg.sh on Linux) > code . We’ll use a tasks.json to define a task that installs the zlib library with the –x-cmake-debug option and a launch.json file to configure CMake Tools to attach to the zlib portfile as it’s being run. In VS Code, create a new “.vscode” directory. Add the following tasks.json and launch.json files to this directory. tasks.json {      “version”: “2.0.0”,      “tasks”: [          {              “label”: “Reinstall zlib”,              “type”: “shell”,              “isBackground”: true,              “command”: “& “${workspaceFolder}/vcpkg.exe” remove zlib; & “${workspaceFolder}/vcpkg.exe” install zlib –no-binarycaching –x-cmake-debug \\.\pipe\portfile_debugging”,              “problemMatcher”: [                  {                      “pattern”: [                          {                              “regexp”: “”,                              “file”: 1,                              “location”: 2,                              “message”: 3                          }                      ],                      “background”: {                          “activeOnStart”: true,                          “beginsPattern”: “.”,                          “endsPattern”: “Waiting for debugger client to connect”                      }                  }              ]          }      ]  }  The important parts of the configuration are the command, which removes zlib if it’s already installed and then reinstalls it, and the endsPattern, which tells VS Code when it can consider the task complete. CMake will output the “Waiting for debugger client to connect” string as soon as it has finished initializing the debugger. The rest of the problemMatcher values are required to satisfy VS Code’s launch configuration schema but are not used in this example.  launch.json {      “version”: “0.2.0”,      “configurations”: [          {              “type”: “cmake”,              “request”: “launch”,              “name”: “Debug zlib portfile”,              “cmakeDebugType”: “external”,              “pipeName”: “\\.\pipe\portfile_debugging”,              “preLaunchTask”: “Reinstall zlib”          }      ]  }  This CMake Debugging configuration uses a cmakeDebugType of external, meaning the CMake Tools extension is not responsible for launching CMake (in this case vcpkg is launching CMake). Notice how we use the same pipe name as the vcpkg install task. Finally, open ports/zlib/portfile.cmake and set a breakpoint on line 2 (the call to vcpkg_from_github). In the VS Code Run and Debug view, select the Debug zlib portfile configuration and click the play button to start debugging. VS Code will automatically run the vcpkg install task […]

Read More