This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Алгоритм устроен так, что место ошибки определить невозможно | |
хм строит систему из пицотыщ уравнений и потом начинает ее решать унификацией | |
то есть он берет какоето уравнение, подставляет туда абстрактный аргумент, | |
по нему подставляет в другое у-е и т.д. - в каком-то у-е на аругмент накладывается ограничение, аргумент становится более конкретным | |
если где-то ошибка - то В НЕКОТОРОМ месте в графе возникнет противоречие - будет наложено ограничение, которому аргумент уже не может | |
удовлетворить (из-за другого ограничения, которое было наложено раньше, например сперва сказали, что должна быть строка, а потом - что | |
число, при этом неизвестно где именно ошибка - там где фиксирована строка, или там где фиксировано число, и в зависимости от хода | |
реализации алгоритма он выведет ошибку или в том месте или в другом) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#![feature(unboxed_closures, fn_traits)] | |
pub enum Either<L, R> { | |
Left(L), | |
Right(R), | |
} | |
impl<L: FnOnce() -> i32, R: FnOnce() -> i32> FnOnce<()> for Either<L, R> { | |
type Output = i32; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
root = true | |
[*] | |
charset = utf-8-bom | |
indent_style = space | |
indent_size = 4 | |
insert_final_newline = true | |
trim_trailing_whitespace = true | |
[*.{sol,xml,xsd}] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#![feature(lang_items)] | |
#![feature(start)] | |
#![no_std] | |
#![no_main] | |
// These functions are used by the compiler, but not | |
// for a bare-bones hello world. These are normally | |
// provided by libstd. | |
#[lang = "eh_personality"] | |
#[no_mangle] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Настало, наконец, время поговорить о третьем законе «диалектической триады». О законе «единства и борьбы противоположностей». | |
Формулируется этот закон примерно следующим образом. | |
Каждый объект заключает в себе противоположности, которые находятся одновременно в единстве и в борьбе между собой, что как раз и вызывает развитие этого объекта. | |
Звучит красиво, однако, если даже самую малость вдуматься, то тут же окажется, что эта формулировка лишена какого-либо внятного содержания. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
rustup component add rustfmt-preview | |
rustfmt_path=`which rustfmt` | |
echo "#!/bin/sh | |
declare -a rust_files=() | |
declare -a cpp_files=() | |
files=\$(git diff-index --name-only HEAD) | |
echo 'Formatting source files' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template<typename T> | |
struct CResult | |
{ | |
T value; | |
const char* error; | |
static CResult<T> FromFunction(std::function<T()> function) | |
{ | |
CResult<T> result = {}; | |
try |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Linq; | |
using System.Linq.Expressions; | |
using System.Reflection; | |
using System.Threading; | |
using System.Threading.Tasks; | |
using MongoDB.Bson; | |
using MongoDB.Bson.Serialization.Attributes; | |
using MongoDB.Driver; | |
using MongoDB.Driver.Core.Bindings; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.AspNetCore; | |
using Microsoft.AspNetCore.Builder; | |
using Microsoft.AspNetCore.Hosting; | |
using Microsoft.Extensions.DependencyInjection; | |
using Microsoft.Extensions.Logging; | |
namespace SelfHostAspCoreExample | |
{ | |
public class Program | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Linq.Expressions; | |
using System.Reflection; | |
namespace Helpers | |
{ | |
/// <summary> |