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
| TranslationUnitDecl 0x6845b8 <<invalid sloc>> <invalid sloc> | |
| |-TypedefDecl 0x684e20 <<invalid sloc>> <invalid sloc> implicit __int128_t '__int128' | |
| | `-BuiltinType 0x684b80 '__int128' | |
| |-TypedefDecl 0x684e90 <<invalid sloc>> <invalid sloc> implicit __uint128_t 'unsigned __int128' | |
| | `-BuiltinType 0x684ba0 'unsigned __int128' | |
| |-TypedefDecl 0x685208 <<invalid sloc>> <invalid sloc> implicit __NSConstantString '__NSConstantString_tag' | |
| | `-RecordType 0x684f80 '__NSConstantString_tag' | |
| | `-CXXRecord 0x684ee8 '__NSConstantString_tag' | |
| |-TypedefDecl 0x6852a0 <<invalid sloc>> <invalid sloc> implicit __builtin_ms_va_list 'char *' | |
| | `-PointerType 0x685260 'char *' |
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
| use std::future::Future; | |
| use tokio; | |
| async fn foo(a: &i32, b: i32, c: i32) -> i32 { | |
| a + b + c | |
| } | |
| async fn generic_fn<'a, F, Fut>(f: F, a: &'a i32) -> i32 | |
| where |
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
| use std::future::Future; | |
| use tokio; | |
| async fn foo<'a, 'b>(a: &'a i32, b: &'b i32, c: &'b i32) -> i32 { | |
| a + b + c | |
| } | |
| async fn generic_fn<F, Fut>(f: F, a: &i32) -> i32 | |
| where | |
| F: Fn(&i32, &i32, &i32) -> Fut, |
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
| #include <iostream> | |
| int* getIntP(bool return_null) { | |
| if (return_null) return nullptr; | |
| return new int(3); | |
| } | |
| int main(int argc, char** argv) { | |
| if(int* i1 = getIntP(true)) { | |
| std::cout << *i1 << std::endl; |
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 program is free software: you can redistribute it and/or modify | |
| it under the terms of the GNU General Public License as published by | |
| the Free Software Foundation, either version 3 of the License, or | |
| (at your option) any later version. | |
| This program is distributed in the hope that it will be useful, | |
| but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| GNU General Public License for more details. |
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
| module Main where | |
| import Control.Monad | |
| import qualified Data.ByteString as BS | |
| import qualified Data.ByteString.Unsafe as BS | |
| import Data.Word | |
| import Data.Bits | |
| import Foreign.C.String | |
| import Foreign.Ptr | |
| import Foreign.Storable |
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
| module Main where | |
| import Control.Monad | |
| import Data.Array | |
| import Data.Array.ST | |
| import Data.Bits | |
| import qualified Data.ByteString as BS | |
| import Data.Word | |
| import System.Environment (getArgs) |
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
| module Main where | |
| import Control.Concurrent | |
| import Control.Concurrent.STM (STM, atomically, retry) | |
| import Control.Concurrent.STM.TVar (TVar, newTVarIO, modifyTVar', readTVar, writeTVar) | |
| import Control.Concurrent.STM.TMVar (TMVar, newTMVarIO, takeTMVar, putTMVar) | |
| import Control.Monad (when, forM) | |
| import Data.Array | |
| import System.IO (hFlush, stdout) | |
| import System.Random |
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
| import "other_functions.texc" | |
| fun foo(a, b, \theta in reals, N in integers) -> reals = | |
| \sum_{i=0}^{N} ( \sin(\theta) + a^i + b^i ) | |
| fun foorec(a, b, \theta in reals, N in integers) -> reals = | |
| if N < 0 then | |
| return 0 | |
| else | |
| \sin(\theta) + a^N + b^N + foorec(a, b, \theta, N-1) |
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
| class BufferIterator | |
| { | |
| private BlockingCollection<byte[]> queue; | |
| private byte[] cur_msg = null; | |
| private int cur_msg_index; | |
| public BufferIterator(BlockingCollection<byte[]> queue) | |
| { | |
| this.queue = queue; | |
| } |
NewerOlder