We will use coroutines as custom hyperthreading. We want to be able to dealn with memory as if it were a remote location from where we are fetching data. When issuing a prefetch command we want to switch to a different.
This file contains 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 <experimental/coroutine> | |
#include <stdio.h> | |
#include <future> | |
// we get suspend_never and return_value | |
// template<typename T,typename... Args> | |
// struct std::experimental::coroutine_traits<std::future<T>,Args...> { | |
// struct promise_type { |
This file contains 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 <experimental/coroutine> | |
#include <stdio.h> | |
#include <assert.h> | |
using namespace std::experimental; | |
#define SCH_SIZE 10 | |
// The queue can run concurrently as long as | |
// | |
// write{i}(dist,n), load{i+n}(dist,n) |
This file contains 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
# Abstract positions | |
alias full move screenOriginX;screenOriginY screenSizeX;screenSizeY | |
alias lefthalf move screenOriginX;screenOriginY screenSizeX/2;screenSizeY | |
alias righthalf move screenOriginX+screenSizeX/2;screenOriginY screenSizeX/2;screenSizeY | |
alias topleft corner top-left resize:screenSizeX/2;screenSizeY/2 | |
alias topright corner top-right resize:screenSizeX/2;screenSizeY/2 | |
alias bottomleft corner bottom-left resize:screenSizeX/2;screenSizeY/2 | |
alias bottomright corner bottom-right resize:screenSizeX/2;screenSizeY/2 | |
alias hyper ctrl;alt;cmd |
This file contains 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
<?xml version="1.0"?> | |
<root> | |
<item> | |
<name>Find using vimperator</name> | |
<identifier>private.find</identifier> | |
<only>FIREFOX</only> | |
<autogen>__KeyToKey__ | |
KeyCode::F, ModifierFlag::COMMAND_L, | |
KeyCode::F, ModifierFlag::OPTION_L</autogen> | |
</item> |
This file contains 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
{-# LANGUAGE FlexibleContexts #-} | |
{-# LANGUAGE RankNTypes #-} | |
module Main (main) where | |
import Control.Monad | |
import Control.Monad.Except | |
import Data.Bifunctor | |
import Data.Constraint | |
import Data.List | |
import GHC.Generics |
This file contains 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
{-# LANGUAGE OverloadedStrings #-} | |
import Control.Applicative | |
import Text.HTML.Scalpel | |
import Data.Char | |
import Data.Hashable | |
import qualified Data.HashMap.Strict as HM | |
import Data.List | |
import Data.Ord |
This file contains 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
{-# LANGUAGE OverloadedStrings #-} | |
import Control.Applicative | |
import Text.HTML.Scalpel | |
import Data.Char | |
import Data.List | |
import Data.Ord | |
This file contains 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
{-# LANGUAGE OverloadedStrings #-} | |
module Angelos () where | |
import Control.Applicative | |
import Text.HTML.Scalpel | |
type Author = String | |
data Comment |
This file contains 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
s1870697 Use the standard library function for sorting in-memory stuff. Use enumerate() to assign indexes to a list's elements. Use list comprehensions instead of for loops where possible to make your code more readable. | |
s1830962 Good | |
s1831707 No solution | |
s1833978 r is a table of indexes (ie naturals) so initialize it with -1 as 0 is a valid value. | |
s1836526 Good | |
s1837246 Good, use the standard library sort | |
s1837803 Good | |
s1839518 No solution | |
s1840235 j is not a hash of the lengths. You should search for one that works. | |
s1840770 No solution |