SlideShare uma empresa Scribd logo
1 de 50
Baixar para ler offline
class Functor f => Applicative f where
 return :: a -> f a

instance Applicative [] where
 return a = [a]

instance Applicative Maybe where
 return a = Just a
switch (l->l_stat) {
case LSONPROC:
       break;

case LSRUN:
       if (l->l_swtime > outpri2) {
                outl2 = l;
                outpri2 = l->l_swtime;
       }
       break;
...
-- http://hackage.haskell.org/packages/archive/containers/
-- latest/doc/html/Data-Tree.html から抜粋
data Tree a = Node {
       rootLabel :: a,     -- ^ label value
       subForest :: Forest a -- ^ zero or more child trees
     }
type Forest a = [Tree a]

-- | The elements of a tree in pre-order.
flatten :: Tree a -> [a]
flatten t = squish t []
  where squish (Node x ts) xs = x:Prelude.foldr squish xs ts
$ sudo apt-get install haskell-platform
$ rehash
$ ghci
GHCi, version 7.0.4: http://www.haskell.org/ghc/ :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Prelude> fmap (foldr (++) "" . flip replicate "hoge") [1..3]
["hoge","hogehoge","hogehogehoge"]

$ irb
irb(main)> (1..3).collect{|a|s="";a.times{s+="hoge"};s}
=> ["hoge", "hogehoge", "hogehogehoge"]
$ sudo apt-get install cabal-install
$ rehash
$ cabal update
$ cabal install carettah
# がりがりっとコンパイルされる
$ ~/.cabal/bin/carettah
carettah version 0.0.4
$   sudo gem update
$   sudo gem install earchquake
#   月日は流れ、 、そしてある日、 、
$   sudo gem update
$ cabal update # ローカルの Hackage データベースを更新
$ cabal install yesod
# 後日yesodを最新版に更新しようと思いたつ
$ cabal upgrade
--snip--
The 'cabal upgrade' command has been removed
because people found it confusing and it often
led to broken packages.
--snip--
$ cabal install yesod
# yesodが動作しない or 依存関係をcabalが自動解決しない
# とりあえずcabalでインストールしたHackageを全部消そう
$ rm -rf ~/.ghc ~/.cabal
$ cabal update
$ cabal install yesod
$ cabal info yesod
--snip--
   Versions available: 0.6.7, 0.7.2, 0.7.3, 0.8.0, 0.8.1, 0.8.2,
               0.8.2.1, 0.9.1, 0.9.1.1 (and 35 others)
--snip--
   Dependencies: yesod-core >=0.9.1.1 && <0.10,
            yesod-auth ==0.7.*, yesod-json ==0.2.*,
            yesod-persistent ==0.2.*, yesod-form ==0.3.*,
            monad-control ==0.2.*, ...
$ sudo apt-get install 
  haskell-debian-utils haskell-devscripts
$ wget http://hackage.haskell.org/packages/archive/
  hcwiid/0.0.1/hcwiid-0.0.1.tar.gz
$ tar xfz hcwiid-0.0.1.tar.gz
$ cd hcwiid-0.0.1/
$ cabal-debian --debianize --ghc 
  --maintainer="Kiwamu Okabe <kiwamu@debian.or.jp>"
$ ls debian
changelog compat control copyright rules
$ debuild -rfakeroot -us -uc
$ ls ../*hcwiid*deb
../libghc-hcwiid-dev_0.0.1-1~hackage1_amd64.deb
../libghc-hcwiid-doc_0.0.1-1~hackage1_all.deb
../libghc-hcwiid-prof_0.0.1-1~hackage1_amd64.deb
$ cat debian/rules
#!/usr/bin/make -f
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/hlibrary.mk
$
後日談) JoachimからメールがあってDDやDMでなくても
pkg-haskellチームになれるそうです!
>> [Q2] Can the person as not DM (Debian Maintainer) join
>> pkg-haskell team? Or they should become DM, first?
> No need to be a DM, as there are DDs around that can do
> the sponsoring."
Package: wnpp
Severity: wishlist
Owner: Kiwamu Okabe <kiwamu@debian.or.jp>

* Package name : haskell-ansi-wl-pprint
 Version     : 0.6.3
 Upstream Author : Daan Leijen, Max Bolingbroke
<batterseapower@hotmail.com>
* URL         : http://github.com/batterseapower/ansi-wl-pprin
 Vcs-Browser     :
http://anonscm.debian.org/gitweb/?p=collab-maint/haskell-ans
* License      : BSD3
$ vi debian/control
Maintainer: Debian Haskell Group 
<pkg-haskell-maintainers@lists.alioth.debian.org>
Uploaders: Kiwamu Okabe <kiwamu@debian.or.jp>
Vcs-Darcs: 
http://darcs.debian.org/pkg-haskell/haskell-ansi-wl-pprint
Vcs-Browser: http://darcs.debian.org/cgi-bin/
darcsweb.cgi?r=pkg-haskell/haskell-ansi-wl-pprint
DM-Upload-Allowed: yes
haskell-ansi-wl-pprint (0.6.3-2) UNRELEASED; urgency=low

 * repo is moved to darcs.
 * change Vcs-* lines on debian/control.

-- Kiwamu Okabe <kiwamu@debian.or.jp> Wed, 12 Oct 2011

haskell-ansi-wl-pprint (0.6.3-1) UNRELEASED; urgency=low

 * Debianization generated by cabal-debian

-- Kiwamu Okabe <kiwamu@debian.or.jp> Wed, 05 Oct 2011
$ sudo apt-get install darcs
$ pwd
/home/kiwamu/deb/haskell-ansi-wl-pprint/debian
$ darcs init --darcs-2
$ darcs record -a -l -m "Initial Check-In"
Finished recording patch 'Initial Check-In'
$ darcs put kiwamu-guest@darcs.debian.org:/darcs
 /pkg-haskell/haskell-ansi-wl-pprint
Finished applying...
Put successful.
$ ssh kiwamu-guest@darcs.debian.org 
 /darcs/pkg-haskell/tools/add-hooks.sh 
 haskell-ansi-wl-pprint




pkg-haskell-commits@lists.alioth.debian.org
$ dch # エディタが起動される




$ darcs record -a
$ darcs push
Sending mail to pkg-haskell-commits@lists.alioth.debian.org..
http://pkg-haskell.alioth.debian.org/cgi-bin/pet.cgi
$ darcs get darcs.debian.org:/darcs/pkg-haskell/tools
$ tools/pkg-haskell-checkout haskell-ansi-wl-pprint
$ cd haskell-ansi-wl-pprint/
$ debuild -i -I
$ debrelease
$ debuild clean
$ cd debian/
$ darcs tag $(dpkg-parsechangelog -lchangelog |
 grep-dctrl -n -s Version .)
$ darcs push -a
HaskellとDebianの辛くて甘い関係
HaskellとDebianの辛くて甘い関係

Mais conteúdo relacionado

Mais procurados

(Practical) linux 104
(Practical) linux 104(Practical) linux 104
(Practical) linux 104Arie Bregman
 
(Practical) linux 101
(Practical) linux 101(Practical) linux 101
(Practical) linux 101Arie Bregman
 
Hive data migration (export/import)
Hive data migration (export/import)Hive data migration (export/import)
Hive data migration (export/import)Bopyo Hong
 
Hadoop 20111215
Hadoop 20111215Hadoop 20111215
Hadoop 20111215exsuns
 
Unix commands in etl testing
Unix commands in etl testingUnix commands in etl testing
Unix commands in etl testingGaruda Trainings
 
Basic unix commands
Basic unix commandsBasic unix commands
Basic unix commandsswtjerin4u
 
Docker & CoreOS at Utah Gophers
Docker & CoreOS at Utah GophersDocker & CoreOS at Utah Gophers
Docker & CoreOS at Utah GophersJosh Braegger
 
MongoDB Replication (Dwight Merriman)
MongoDB Replication (Dwight Merriman)MongoDB Replication (Dwight Merriman)
MongoDB Replication (Dwight Merriman)MongoSF
 
eZ Publish cluster unleashed revisited
eZ Publish cluster unleashed revisitedeZ Publish cluster unleashed revisited
eZ Publish cluster unleashed revisitedBertrand Dunogier
 
Course 102: Lecture 7: Simple Utilities
Course 102: Lecture 7: Simple Utilities Course 102: Lecture 7: Simple Utilities
Course 102: Lecture 7: Simple Utilities Ahmed El-Arabawy
 
DevOpsDays Warsaw 2015: Running High Performance And Fault Tolerant Elasticse...
DevOpsDays Warsaw 2015: Running High Performance And Fault Tolerant Elasticse...DevOpsDays Warsaw 2015: Running High Performance And Fault Tolerant Elasticse...
DevOpsDays Warsaw 2015: Running High Performance And Fault Tolerant Elasticse...PROIDEA
 
DBD::Gofer 200809
DBD::Gofer 200809DBD::Gofer 200809
DBD::Gofer 200809Tim Bunce
 
How to admin
How to adminHow to admin
How to adminyalegko
 
TP2 Big Data HBase
TP2 Big Data HBaseTP2 Big Data HBase
TP2 Big Data HBaseAmal Abid
 
Commands documentaion
Commands documentaionCommands documentaion
Commands documentaionTejalNijai
 
Intro KaKao MRTE (MySQL Realtime Traffic Emulator)
Intro KaKao MRTE (MySQL Realtime Traffic Emulator)Intro KaKao MRTE (MySQL Realtime Traffic Emulator)
Intro KaKao MRTE (MySQL Realtime Traffic Emulator)I Goo Lee
 
Docker tips & tricks
Docker  tips & tricksDocker  tips & tricks
Docker tips & tricksDharmit Shah
 

Mais procurados (20)

(Practical) linux 104
(Practical) linux 104(Practical) linux 104
(Practical) linux 104
 
(Practical) linux 101
(Practical) linux 101(Practical) linux 101
(Practical) linux 101
 
Hive data migration (export/import)
Hive data migration (export/import)Hive data migration (export/import)
Hive data migration (export/import)
 
Hadoop 20111215
Hadoop 20111215Hadoop 20111215
Hadoop 20111215
 
Unix Basics Commands
Unix Basics CommandsUnix Basics Commands
Unix Basics Commands
 
Unix commands in etl testing
Unix commands in etl testingUnix commands in etl testing
Unix commands in etl testing
 
Basic unix commands
Basic unix commandsBasic unix commands
Basic unix commands
 
Docker & CoreOS at Utah Gophers
Docker & CoreOS at Utah GophersDocker & CoreOS at Utah Gophers
Docker & CoreOS at Utah Gophers
 
Basics of unix
Basics of unixBasics of unix
Basics of unix
 
MongoDB Replication (Dwight Merriman)
MongoDB Replication (Dwight Merriman)MongoDB Replication (Dwight Merriman)
MongoDB Replication (Dwight Merriman)
 
Top Node.js Metrics to Watch
Top Node.js Metrics to WatchTop Node.js Metrics to Watch
Top Node.js Metrics to Watch
 
eZ Publish cluster unleashed revisited
eZ Publish cluster unleashed revisitedeZ Publish cluster unleashed revisited
eZ Publish cluster unleashed revisited
 
Course 102: Lecture 7: Simple Utilities
Course 102: Lecture 7: Simple Utilities Course 102: Lecture 7: Simple Utilities
Course 102: Lecture 7: Simple Utilities
 
DevOpsDays Warsaw 2015: Running High Performance And Fault Tolerant Elasticse...
DevOpsDays Warsaw 2015: Running High Performance And Fault Tolerant Elasticse...DevOpsDays Warsaw 2015: Running High Performance And Fault Tolerant Elasticse...
DevOpsDays Warsaw 2015: Running High Performance And Fault Tolerant Elasticse...
 
DBD::Gofer 200809
DBD::Gofer 200809DBD::Gofer 200809
DBD::Gofer 200809
 
How to admin
How to adminHow to admin
How to admin
 
TP2 Big Data HBase
TP2 Big Data HBaseTP2 Big Data HBase
TP2 Big Data HBase
 
Commands documentaion
Commands documentaionCommands documentaion
Commands documentaion
 
Intro KaKao MRTE (MySQL Realtime Traffic Emulator)
Intro KaKao MRTE (MySQL Realtime Traffic Emulator)Intro KaKao MRTE (MySQL Realtime Traffic Emulator)
Intro KaKao MRTE (MySQL Realtime Traffic Emulator)
 
Docker tips & tricks
Docker  tips & tricksDocker  tips & tricks
Docker tips & tricks
 

Semelhante a HaskellとDebianの辛くて甘い関係

Haskell Packageのdeb化
Haskell Packageのdeb化Haskell Packageのdeb化
Haskell Packageのdeb化Kiwamu Okabe
 
Debian Loves Haskell
Debian Loves HaskellDebian Loves Haskell
Debian Loves HaskellKiwamu Okabe
 
10 things I learned building Nomad packs
10 things I learned building Nomad packs10 things I learned building Nomad packs
10 things I learned building Nomad packsBram Vogelaar
 
파이썬 개발환경 구성하기의 끝판왕 - Docker Compose
파이썬 개발환경 구성하기의 끝판왕 - Docker Compose파이썬 개발환경 구성하기의 끝판왕 - Docker Compose
파이썬 개발환경 구성하기의 끝판왕 - Docker Composeraccoony
 
Using Puppet to Create a Dynamic Network - PuppetConf 2013
Using Puppet to Create a Dynamic Network - PuppetConf 2013Using Puppet to Create a Dynamic Network - PuppetConf 2013
Using Puppet to Create a Dynamic Network - PuppetConf 2013Puppet
 
NUMOSS 4th Week - Commandline Tutorial
NUMOSS 4th Week - Commandline TutorialNUMOSS 4th Week - Commandline Tutorial
NUMOSS 4th Week - Commandline TutorialGagah Arifianto
 
Ansible : what's ansible & use case by REX
Ansible :  what's ansible & use case by REXAnsible :  what's ansible & use case by REX
Ansible : what's ansible & use case by REXSaewoong Lee
 
101 3.3 perform basic file management
101 3.3 perform basic file management101 3.3 perform basic file management
101 3.3 perform basic file managementAcácio Oliveira
 
How to make debian package from scratch (linux)
How to make debian package from scratch (linux)How to make debian package from scratch (linux)
How to make debian package from scratch (linux)Thierry Gayet
 
Big data using Hadoop, Hive, Sqoop with Installation
Big data using Hadoop, Hive, Sqoop with InstallationBig data using Hadoop, Hive, Sqoop with Installation
Big data using Hadoop, Hive, Sqoop with Installationmellempudilavanya999
 
One-Liners to Rule Them All
One-Liners to Rule Them AllOne-Liners to Rule Them All
One-Liners to Rule Them Allegypt
 
PuppetConf 2016: The Challenges with Container Configuration – David Lutterko...
PuppetConf 2016: The Challenges with Container Configuration – David Lutterko...PuppetConf 2016: The Challenges with Container Configuration – David Lutterko...
PuppetConf 2016: The Challenges with Container Configuration – David Lutterko...Puppet
 
Challenges of container configuration
Challenges of container configurationChallenges of container configuration
Challenges of container configurationlutter
 
mapserver_install_linux
mapserver_install_linuxmapserver_install_linux
mapserver_install_linuxtutorialsruby
 
mapserver_install_linux
mapserver_install_linuxmapserver_install_linux
mapserver_install_linuxtutorialsruby
 

Semelhante a HaskellとDebianの辛くて甘い関係 (20)

Haskell Packageのdeb化
Haskell Packageのdeb化Haskell Packageのdeb化
Haskell Packageのdeb化
 
Dtalk shell
Dtalk shellDtalk shell
Dtalk shell
 
Debian Loves Haskell
Debian Loves HaskellDebian Loves Haskell
Debian Loves Haskell
 
10 things I learned building Nomad packs
10 things I learned building Nomad packs10 things I learned building Nomad packs
10 things I learned building Nomad packs
 
Puppet
PuppetPuppet
Puppet
 
파이썬 개발환경 구성하기의 끝판왕 - Docker Compose
파이썬 개발환경 구성하기의 끝판왕 - Docker Compose파이썬 개발환경 구성하기의 끝판왕 - Docker Compose
파이썬 개발환경 구성하기의 끝판왕 - Docker Compose
 
Linux Command Line
Linux Command LineLinux Command Line
Linux Command Line
 
Using Puppet to Create a Dynamic Network - PuppetConf 2013
Using Puppet to Create a Dynamic Network - PuppetConf 2013Using Puppet to Create a Dynamic Network - PuppetConf 2013
Using Puppet to Create a Dynamic Network - PuppetConf 2013
 
Docker perl build
Docker perl buildDocker perl build
Docker perl build
 
NUMOSS 4th Week - Commandline Tutorial
NUMOSS 4th Week - Commandline TutorialNUMOSS 4th Week - Commandline Tutorial
NUMOSS 4th Week - Commandline Tutorial
 
Ansible : what's ansible & use case by REX
Ansible :  what's ansible & use case by REXAnsible :  what's ansible & use case by REX
Ansible : what's ansible & use case by REX
 
101 3.3 perform basic file management
101 3.3 perform basic file management101 3.3 perform basic file management
101 3.3 perform basic file management
 
How to make debian package from scratch (linux)
How to make debian package from scratch (linux)How to make debian package from scratch (linux)
How to make debian package from scratch (linux)
 
Big data using Hadoop, Hive, Sqoop with Installation
Big data using Hadoop, Hive, Sqoop with InstallationBig data using Hadoop, Hive, Sqoop with Installation
Big data using Hadoop, Hive, Sqoop with Installation
 
One-Liners to Rule Them All
One-Liners to Rule Them AllOne-Liners to Rule Them All
One-Liners to Rule Them All
 
Puppet @ Seat
Puppet @ SeatPuppet @ Seat
Puppet @ Seat
 
PuppetConf 2016: The Challenges with Container Configuration – David Lutterko...
PuppetConf 2016: The Challenges with Container Configuration – David Lutterko...PuppetConf 2016: The Challenges with Container Configuration – David Lutterko...
PuppetConf 2016: The Challenges with Container Configuration – David Lutterko...
 
Challenges of container configuration
Challenges of container configurationChallenges of container configuration
Challenges of container configuration
 
mapserver_install_linux
mapserver_install_linuxmapserver_install_linux
mapserver_install_linux
 
mapserver_install_linux
mapserver_install_linuxmapserver_install_linux
mapserver_install_linux
 

Último

Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMKumar Satyam
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)Samir Dash
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAnitaRaj43
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 

Último (20)

Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDM
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by Anitaraj
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 

HaskellとDebianの辛くて甘い関係

  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6. class Functor f => Applicative f where return :: a -> f a instance Applicative [] where return a = [a] instance Applicative Maybe where return a = Just a
  • 7. switch (l->l_stat) { case LSONPROC: break; case LSRUN: if (l->l_swtime > outpri2) { outl2 = l; outpri2 = l->l_swtime; } break; ...
  • 8.
  • 9.
  • 10. -- http://hackage.haskell.org/packages/archive/containers/ -- latest/doc/html/Data-Tree.html から抜粋 data Tree a = Node { rootLabel :: a, -- ^ label value subForest :: Forest a -- ^ zero or more child trees } type Forest a = [Tree a] -- | The elements of a tree in pre-order. flatten :: Tree a -> [a] flatten t = squish t [] where squish (Node x ts) xs = x:Prelude.foldr squish xs ts
  • 11. $ sudo apt-get install haskell-platform $ rehash $ ghci GHCi, version 7.0.4: http://www.haskell.org/ghc/ :? for help Loading package ghc-prim ... linking ... done. Loading package integer-gmp ... linking ... done. Loading package base ... linking ... done. Prelude> fmap (foldr (++) "" . flip replicate "hoge") [1..3] ["hoge","hogehoge","hogehogehoge"] $ irb irb(main)> (1..3).collect{|a|s="";a.times{s+="hoge"};s} => ["hoge", "hogehoge", "hogehogehoge"]
  • 12.
  • 13. $ sudo apt-get install cabal-install $ rehash $ cabal update $ cabal install carettah # がりがりっとコンパイルされる $ ~/.cabal/bin/carettah carettah version 0.0.4
  • 14. $ sudo gem update $ sudo gem install earchquake # 月日は流れ、 、そしてある日、 、 $ sudo gem update
  • 15. $ cabal update # ローカルの Hackage データベースを更新 $ cabal install yesod # 後日yesodを最新版に更新しようと思いたつ $ cabal upgrade --snip-- The 'cabal upgrade' command has been removed because people found it confusing and it often led to broken packages. --snip--
  • 16. $ cabal install yesod # yesodが動作しない or 依存関係をcabalが自動解決しない # とりあえずcabalでインストールしたHackageを全部消そう $ rm -rf ~/.ghc ~/.cabal $ cabal update $ cabal install yesod
  • 17.
  • 18.
  • 19. $ cabal info yesod --snip-- Versions available: 0.6.7, 0.7.2, 0.7.3, 0.8.0, 0.8.1, 0.8.2, 0.8.2.1, 0.9.1, 0.9.1.1 (and 35 others) --snip-- Dependencies: yesod-core >=0.9.1.1 && <0.10, yesod-auth ==0.7.*, yesod-json ==0.2.*, yesod-persistent ==0.2.*, yesod-form ==0.3.*, monad-control ==0.2.*, ...
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30. $ sudo apt-get install haskell-debian-utils haskell-devscripts
  • 31. $ wget http://hackage.haskell.org/packages/archive/ hcwiid/0.0.1/hcwiid-0.0.1.tar.gz $ tar xfz hcwiid-0.0.1.tar.gz $ cd hcwiid-0.0.1/ $ cabal-debian --debianize --ghc --maintainer="Kiwamu Okabe <kiwamu@debian.or.jp>" $ ls debian changelog compat control copyright rules
  • 32. $ debuild -rfakeroot -us -uc $ ls ../*hcwiid*deb ../libghc-hcwiid-dev_0.0.1-1~hackage1_amd64.deb ../libghc-hcwiid-doc_0.0.1-1~hackage1_all.deb ../libghc-hcwiid-prof_0.0.1-1~hackage1_amd64.deb
  • 33. $ cat debian/rules #!/usr/bin/make -f include /usr/share/cdbs/1/rules/debhelper.mk include /usr/share/cdbs/1/class/hlibrary.mk $
  • 34.
  • 35.
  • 36.
  • 37. 後日談) JoachimからメールがあってDDやDMでなくても pkg-haskellチームになれるそうです! >> [Q2] Can the person as not DM (Debian Maintainer) join >> pkg-haskell team? Or they should become DM, first? > No need to be a DM, as there are DDs around that can do > the sponsoring."
  • 38.
  • 39.
  • 40. Package: wnpp Severity: wishlist Owner: Kiwamu Okabe <kiwamu@debian.or.jp> * Package name : haskell-ansi-wl-pprint Version : 0.6.3 Upstream Author : Daan Leijen, Max Bolingbroke <batterseapower@hotmail.com> * URL : http://github.com/batterseapower/ansi-wl-pprin Vcs-Browser : http://anonscm.debian.org/gitweb/?p=collab-maint/haskell-ans * License : BSD3
  • 41. $ vi debian/control Maintainer: Debian Haskell Group <pkg-haskell-maintainers@lists.alioth.debian.org> Uploaders: Kiwamu Okabe <kiwamu@debian.or.jp> Vcs-Darcs: http://darcs.debian.org/pkg-haskell/haskell-ansi-wl-pprint Vcs-Browser: http://darcs.debian.org/cgi-bin/ darcsweb.cgi?r=pkg-haskell/haskell-ansi-wl-pprint DM-Upload-Allowed: yes
  • 42. haskell-ansi-wl-pprint (0.6.3-2) UNRELEASED; urgency=low * repo is moved to darcs. * change Vcs-* lines on debian/control. -- Kiwamu Okabe <kiwamu@debian.or.jp> Wed, 12 Oct 2011 haskell-ansi-wl-pprint (0.6.3-1) UNRELEASED; urgency=low * Debianization generated by cabal-debian -- Kiwamu Okabe <kiwamu@debian.or.jp> Wed, 05 Oct 2011
  • 43. $ sudo apt-get install darcs $ pwd /home/kiwamu/deb/haskell-ansi-wl-pprint/debian $ darcs init --darcs-2 $ darcs record -a -l -m "Initial Check-In" Finished recording patch 'Initial Check-In' $ darcs put kiwamu-guest@darcs.debian.org:/darcs /pkg-haskell/haskell-ansi-wl-pprint Finished applying... Put successful.
  • 44. $ ssh kiwamu-guest@darcs.debian.org /darcs/pkg-haskell/tools/add-hooks.sh haskell-ansi-wl-pprint pkg-haskell-commits@lists.alioth.debian.org
  • 45. $ dch # エディタが起動される $ darcs record -a $ darcs push Sending mail to pkg-haskell-commits@lists.alioth.debian.org..
  • 47.
  • 48. $ darcs get darcs.debian.org:/darcs/pkg-haskell/tools $ tools/pkg-haskell-checkout haskell-ansi-wl-pprint $ cd haskell-ansi-wl-pprint/ $ debuild -i -I $ debrelease $ debuild clean $ cd debian/ $ darcs tag $(dpkg-parsechangelog -lchangelog | grep-dctrl -n -s Version .) $ darcs push -a