layout | title | date | comments | author | categories | commentIssueId |
---|---|---|---|---|---|---|
post |
A comonad of graph decompositions |
2016-04-02 13:02:54 -0400 |
true |
Rúnar |
scala comonads |
22 |
{-# LANGUAGE MultiParamTypeClasses, ExistentialQuantification, ScopedTypeVariables, FlexibleInstances, FlexibleContexts, UndecidableInstances #-} | |
module TransientCont where | |
-- some imports | |
import Control.Applicative | |
import Control.Monad.IO.Class | |
import Control.Monad.Trans |
-- in response to https://www.reddit.com/r/haskell/comments/a50xpr/datahaskell_solve_this_small_problem_to_fill_some/ | |
{-# LANGUAGE BangPatterns, OverloadedStrings, RecordWildCards, ScopedTypeVariables #-} | |
module Main where | |
import Control.Category ((>>>)) | |
import Data.Function ((&)) | |
import Data.Map.Strict (Map, (!)) | |
import Data.Set (Set) | |
import Test.DocTest (doctest) |
{-# LANGUAGE AllowAmbiguousTypes #-} | |
{-# LANGUAGE DataKinds #-} | |
{-# LANGUAGE DeriveGeneric #-} | |
{-# LANGUAGE FlexibleContexts #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE FunctionalDependencies #-} | |
{-# LANGUAGE PolyKinds #-} | |
{-# LANGUAGE ScopedTypeVariables #-} | |
{-# LANGUAGE TypeApplications #-} | |
{-# LANGUAGE TypeFamilies #-} |
# Haskell stack project Github Actions template | |
# https://gist.github.com/mstksg/11f753d891cee5980326a8ea8c865233 | |
# | |
# To use, mainly change the list in 'plans' and modify 'include' for | |
# any OS package manager deps. | |
# | |
# Currently not working for cabal-install >= 3 | |
# | |
# Based on https://raw.githubusercontent.com/commercialhaskell/stack/stable/doc/travis-complex.yml | |
# |
The following are appendices from Optics By Example, a comprehensive guide to optics from beginner to advanced! If you like the content below, there's plenty more where that came from; pick up the book!
{-# LANGUAGE DeriveFunctor, DeriveFoldable, DeriveTraversable, TypeFamilies, TemplateHaskell #-} | |
import Data.Functor.Foldable | |
import Data.Functor.Foldable.TH | |
import Data.Functor.Compose | |
-- Example type | |
data Exp | |
= IntValue Int | |
| Sum Exp Exp |
Audience: I assume you heard of chatGPT, maybe played with it a little, and was imressed by it (or tried very hard not to be). And that you also heard that it is "a large language model". And maybe that it "solved natural language understanding". Here is a short personal perspective of my thoughts of this (and similar) models, and where we stand with respect to language understanding.
Around 2014-2017, right within the rise of neural-network based methods for NLP, I was giving a semi-academic-semi-popsci lecture, revolving around the story that achieving perfect language modeling is equivalent to being as intelligent as a human. Somewhere around the same time I was also asked in an academic panel "what would you do if you were given infinite compute and no need to worry about labour costs" to which I cockily responded "I would train a really huge language model, just to show that it doesn't solve everything!". We