چه زبان برنامه نویسی جینی ساخته شده است؟

تو اینجایی:
<بازگشت

امن امن. بر خلاف "monolithic blobs" of Bitcoin and other cryptocurrencies, Gini's systems are designed to be قابل اطمینان بودن which means it will be possible to employ mathematical analysis of Gini's systems to provide quantifiable assurances that the software source code can perform as expected within specific statistical thresholds of security and reliability. This is possible primarily because Gini's systems and architecture are created with the زبان برنامه نویسی Haskellکه دارای مزایای فنی منحصر به فرد است. به همین دلیل است که هاسل توسط ناسا، لاکهید مارتین، بوئینگ و بسیاری دیگر از شرکت های هوا فضا و دفاعی که باید سیستم ایمن و ایمن برای هواپیما، ماهواره ها، شاتل فضایی و دیگر سیستم های حیاتی مأموریتی که باید در سطح استثنایی ایمنی، امنیت و قابلیت اطمینان.

کد امنیتی Gini High-Reliability. Since the core Gini components (Gini Settlement Layer and Gini Computation Layer) are produced with Haskell, which is classified as a "عملکردی programming language," Gini's software source code is up to 80% more time- and cost-efficient than it would be if we used other امری ضروری (aka، رویه ای  یا شی گرا) زبان هایی مانند C ++، C #، جاوا و اکثر زبان های دیگر. Haskell به طرز چشمگیری تعداد اشکالات و حفره های امنیتی را در سراسر چرخه عمر نرم افزار کاهش می دهد. Haskell همچنین کد بسیار زیبا و قابل نگهداری را به ارمغان می آورد که نتیجه آن سیستم های بسیار قابل اعتماد و مقرون به صرفه می باشد. (در اینجا برخی از مشخصات فنی خوب از مایکروسافت و جامعه مجازی در مورد مزایای زبان برنامه نویسی کاربردی.)

چند عدد گلوله فنی دیگر در مورد هاسلل:

Haskell is a "functional programming language," که به معنای تقریبا همه چیز در Haskell بر پایه است تعاریف تابع. این باعث می شود کد بیشتر سازماندهی شده و قابل خواندن باشد و کدور را مجبور به فکر کردن در مورد حل مشکلات در یک راه عمیق تر و بصری تر به جای دادن کامپیوتر به مجموعه ای طولانی از دستورات خسته کننده و decontextualized برای انجام یک رفتار مشابه. همچنین به این معنی است که برنامه نویسی در Haskell بر توصیف آنچه داده / عملکردهاست متمرکز است هستند خیلی بیشتر از آن چه که باید باشد انجام دادن. این امر برای هر جنبه ای از فرایند برنامه نویسی جالب و قابل توجه است.

Everything in Haskell is "immutable," به این معنی است: هنگامی که یک مقدار برای یک متغیر معین، ثابت یا تابع تعیین می شود، این مقدار تعیین می شود برای همیشه (یا تا زمانی که برنامه در حال اجرا است). مانع از بسیاری از اشکالات می شود، زیرا مانع از متغیرها می شود و توابع که در برخی از محدوده محلی تغییر یافته از ایجاد عوارض ناخواسته / غیر منتظره در سطح جهانی در سایر توابع که به متغیر / تابع مشابه در طول برنامه بستگی دارد.

In fact, Haskell technically doesn't have "variables"; it has "constants" (values) and "functions" (which are also treated as values) that never change. The only way to update a constant/function in Haskell is to define a new constant/function. However, the scope of a constant matters. For example, a constant declared at the global level can be دوباره اعلام کرد به عنوان یک مقدار متفاوت درون تابع دیگری که عملیات I / O را مدیریت می کند، اما این مقدار جدید است فقط وجود دارد در داخل محدوده محلی از آن عملکرد I / O. این مقدار ثابت در محدوده جهانی یا در محدوده محلی هر تابع دیگر را تغییر نمی دهد.

غیر قابل تغییر بودن باعث می شود که کد های Haskell بازپرداخت واقعا سریع و کارآمد باشد because there's no possibility for unexpected gotchas (i.e., side-effects and state changes) that might cause a program to crash or create unexpected security vulnerabilities. In Haskell, the value of functions, variables, and constants can't be changed during run-time after they've already been declared, which simplifies source code analysis during the refactoring process. This eliminates one of the most tedious parts of refactoring and optimizing code: function performance profiling. Thus, it's much easier to maintain, update, and continuously improve all our Haskell-based Gini systems over time.

Haskell دارای شفافیت مرجع است، به این معنی که توابع در عبارات Haskell و مقادیر خروجی آنها قابل تعویض هستند بدون تغییر رفتار برنامه. این مربوط به تغییر غیر قابل تغییر است، اما شفافیت رفرنس به این واقعیت اشاره دارد که توابع همیشه یک نتیجه را با توجه به همان ورودی تولید می کنند که در مورد اشکال زدایی، ممیزی های امنیتی، موازی سازی، همپوشانی و بهینه سازی کد بسیار سودمند است. به همین دلیل Haskell به طور فوق العاده در برنامه های شبکه همزمان با حجم بالا، با کارایی بالا، بسیار کار می کند. در مقابل، توابع در زبان های ضروری اغلب به حالت توابع و متغیرهای دیگر بستگی دارند که می توانند در هر زمان بسته به وضعیت سایر اجزای یک برنامه تغییر کنند. این باعث ایجاد بسیاری از خطرات و عدم اطمینان می شود که باعث می شود تا امنیت و یکپارچگی برنامه های نوشته شده در زبان های غیر کاربردی تضمین شود.

In Haskell, we say "functions are first-class citizens." این به این معنی است که توابع می توانند به عنوان پارامتر / استدلال به سایر توابع منتقل شوند درست مثل هر متغیر یا ارزش دیگر. این مقدار زیادی از امکانات خلاقانه برای نوشتن کد تمیز، کارآمد، قابل اعتماد و ظریف را فراهم می کند که زبان های غیرفعال نمی توانند تکرار شوند.

استنتاج هوشمند Typeclass و تشخیص خطای کامپایل زمان. Haskell به طور گسترده ای در نظر گرفته شده است که دارای سیستم هوشمند ترین نوع هر زبان برنامه نویسی است. این به این معنی است که انواع داده (به عنوان مثال، رشته ها، اعداد صحیح، بولی ها، لیست ها و بسیاری دیگر) به صورت خودکار هستند و به درستی detected by Haskell's type system and intelligently inferred from how the functions interact with the values that are passed between functions. For this reason, many computer scientists say, "In Haskell, if it compiles, it's correct." This may seem like a boring, arcane concept, but it's actually one of the most significant reasons why programs built with Haskell are so reliable and secure.

In fact, typeclass errors and associated bugs frequently cause software programs to crash when they're written in other languages because the compilers and interpreters for those other languages often allow disparate data types to interact with one another, which can cause unexpected results. For example, if a function passes a string type (e.g., "four") to another function, but the receiving function is expecting an integer type (e.g., 4), the receiving function will choke because it doesn't know what "four" actually means. This type of scenario causes many programs to crash, but Haskell completely prevents these crashes by catching type errors or intelligently inferring typeclass membership for a given value before a program is even deployed to a live environment.

رکود اغلب استفاده می شود. این کار توابع کارآمد تر و کارآمدتر با کد کمتری ایجاد می کند، اما توابع بازگشتی توخالی می توانند برای تازه های Haskell گیج کننده باشند زیرا کد به طور مطلوب تر از کد در زبان های ضروری است.

Code abstraction is a byproduct of Haskell's extremely intelligent compiler. کامپایلر Haskell از بسیاری از اقدامات و عوامل زمینه ای است که کل کد مورد نیاز برای تولید رفتار برنامه مشخص را تا 70٪ (یا حتی اگر بیشتر ترکیب عملکرد is used). This is one of the primary reasons why the Haskell-based Web server ("Warp") can be written در کمتر از 1000 خط کد در حالی که وب سرور آپاچی نیاز به در مورد 1،5 میلیون خط کد. و Warp بیش از 100 برابر سریعتر از آپاچی است و بسیار کمتر از بسیاری از اشکالات و اشکالات امنیتی آسیب پذیر است. (البته تمام معیارها به نحوه پیکربندی هر سیستم بستگی دارد اما به طور کلی, Warp's per-CPU HTTP request processing is at least two orders of magnitude faster than a similarly powered server running Apache without any load-balancing and caching techniques.)

Haskell has no "for" or "while" loops or "variables" در عقل سلیم است، اما دارای ثابت و ویژگی های تکرار بسیار قوی و الگویی است. این نیاز به نیاز برای / در حالی که حلقه ها و متغیرهای قابل تغییر را جایگزین می کند. در حقیقت، بازگشت و تطبیق الگو ابزار بسیار کارآمد برای انجام وظایف مشابه است، به همین دلیل زبان برنامه نویسی Haskell برای حلقه ها / در حالی که حلقه ها را شامل نمی شود.

Haskell تنبل است Being lazy is not always a virtue, but in this case, it means that Haskell always consumes the least amount of resources (CPU, memory, and thus, electricity) possible. Specifically, Haskell doesn't force a computer to execute more CPU cycles or consume more memory than is needed at the moment of each function's execution. For example, in Haskell we can define an infinite list of data objects at any time, but a Haskell program will not traverse the entire list because that would quickly consume all system resources and cause it to crash. Instead, a Haskell function will only traverse an infinite list until it finds the value it's looking for based on the efficient pattern-matching functions that Haskell provides. (See note 4 for a special exception to Haskell's laziness.)

در خلاصه: Haskell's approach to system resource management and its intelligent typeclass system alone eliminate many (50-70%) of all the bugs and security vulnerabilities that typically plague code written in other programming languages. Haskell's virtuous lazy processing prevents many stack and heap buffer overflows and corresponding system crashes caused by unintended infinite loops, which are often caused by poorly designed code in non-functional programming languages. Haskell's succinct syntax and well-organized functional design philosophy enforce good coding habits, which also eliminates many bugs.

Haskell provides many other benefits, but the benefits listed above are several of the most significant reasons why we chose to build Gini's systems with Haskell. To learn a lot more about Haskell, visit the صفحه زبان Haskell.


یادداشت:

1. Some of Gini's early prototypes and test systems are built with Java, C++, and Python, but those are just for our R&D and proof-of-concept systems. The 1.0+ versions of all Gini systems will always be built with Haskell (for PC-based systems) and standard Web-based languages (e.g., browser-agnostic Javascript, HTML, and CSS delivered on the Haskell-based Yesod/Warp Web framework) for all Web-based Gini systems. Mobile apps for Gini are built in Haskell and cross-compiled into each mobile platform's native language (e.g., Objective-C for iOS and Java for Android).

2. Some open source software libraries that are integrated into Gini's systems (including certain well-known cryptography packages like the Blake2 تابع هش کردن و آرگون 2 تابع مشتق کلید) در C، C ++ و جاوا نوشته شده و گاهی اوقات نیاز به ایجاد رابط بین آنها و اجزای Haskell ما هستیم. با این حال، ما در تلاش برای استفاده از Haskell به عنوان بسیاری از اجزای Gini که ممکن است؛ و در طول زمان، ما کتابخانه های منبع باز غیر Haskell را با کتابخانه های منبع باز مبتنی بر Haskell و / یا اجزای مبتنی بر Haskell خودمان هر جا که معتقدیم سیستم هایمان را امن تر و قابل اعتماد تر می کنیم، جایگزین می کنیم.

3. بعد از رسیدن به طور رسمی، تمام نرم افزار Gini به جامعه منبع باز منتشر خواهد شد جینی بلوگرد و مبادله تقسیم شده جینی برای عموم مردم

4. دو ویژگی استثنایی در Haskell وجود دارد: Bytestrings Strict Bytesrings و Lazy Bytestrings. Bytestrings های شدید نشان دهنده داده ها به عنوان 8 بیت (1 بایت) داده ها تکه هایی که تنبل نیست, but they're used in special cases where large data files must be processed more efficiently than the typical lazy processing. In contrast, Lazy Bytestrings represent data as 64K-byte data chunks, the first of which is processed immediately like Strict Bytestrings, but all subsequent 64K-byte data chunks within a given file (or data stream) are processed lazily, i.e., processing is deferred until the data is actually needed for a given function.


Did You Like This Resource?


Gini is doing important work that no other organization is willing or able to do. Please support us by joining the Gini Newsletter below to be alerted about important Gini news and events and follow جینی در توییتر.




Warning: sprintf(): Too few arguments in /home/customer/www/ginifoundation.org/public_html/wp-content/plugins/popup-maker/classes/Upsell.php on line 82