text:
# planet

## July 28, 2015

### <NAME>

#### Darcs rebase by example

July 28, 2015 10:40 AM UTC

Darcs is a patch-centric version control system. In Darcs, there is no “correct” linear history of a repository – rather, there is a poset of patches. That means that most of the time you are pushing and pulling changes you can cherry-pick patches without a problem. However, in some cases you cannot perform a pull (or some other operation on the repository) smoothly. Sometimes it is necessary to rewrite the “history” – i.e. modify a patch that is a dependency of one or more other patches. For those cases darcs rebase comes in handy. To put it in the words of the implementor “Rebase is a workaround for cases where commutation doesn’t do enough”.

A repository can change it’s state from rebase-in-progress back to normal if there are no suspended patches left. However, be aware that you cannot unsuspend a patch1 if you have unrecorded changes in the repository. In light of this, I suggest recording a temporary patch with current changes

darcs record -am DRAFT

You can suspend that patch at the beginning of your rebase process and apply it at the end.

# General overview of rebase

darcs rebase is an operation (or, rather, a family of operations) that allows one to make changes “deep down” in the repository history. One of the crucial things that allows for rebase to work is the fact that since darcs 2.10 patches can be suspended. When one performs any of the darcs rebase commands, the repository moves to a special rebase-in-progress state. In this state repository contains a pristine, a set of patches, a working copy, and — in addition to all the usual stuff — a set of suspended patches. Suspended patches are not active in the repository — that is, they are not applied.

Let’s go over the rebase subcommands

## rebase log/rebase changes

This is simple: list the suspended patches

## rebase suspend

Moves selected patches into the suspended state. Once the patch is suspended it is no longer active in the repository.

Note: once you suspend a patch, it changes its identity. That means that even if you suspend a patch and unsuspend it immediately, you will get a different repository that you have started with. Let this be a good reason (one of a couple!) for doing rebase on a separate branch.

> cat file
test
123
> darcs rebase suspend
Author: <NAME>
Date:   Thu Jul 23 18:49:30 MSK 2015
* 123
Shall I suspend this patch? (1/5)  [ynW…], or ? for more options: y
patch cc54d7cf4b9e3d13a24ce0b1b77b76581d98d75d
Author: <NAME>
Date:   Thu Jul 23 18:43:53 MSK 2015
* Test
Shall I suspend this patch? (2/5)  [ynW…], or ? for more options: d
Rebase in progress: 1 suspended patches
> darcs rebase log
Author: <NAME>
Date:   Thu Jul 23 18:49:30 MSK 2015
* 123
Shall I view this patch? (1/?) [yN…], or ? for more options: y
[123
<NAME> **20150723154930
Ignore-this: 43e09e6503ac74688e74441dc29bce25
] hunk ./file 2
+123
Rebase in progress: 1 suspended patches
> cat file
test

## rebase unsuspend

Does the opposite of suspend: applies a suspended patch to the repository and changes its state to normal.

> darcs rebase unsuspend
Author: <NAME>
Date:   Thu Jul 23 18:49:30 MSK 2015
* 123
Shall I unsuspend this patch? (1/1)  [ynW…], or ? for more options: y
Do you want to unsuspend these patches? [Yglqk…], or ? for more options: y
Rebase finished!

## rebase apply

Rebase apply takes a patch bundle and tries to apply all the patches in the bundle to the current repository. If a patch from the bundle conflicts with a local patch, then the local patch gets suspended. You will thus have a chance to resolve the conflict by amending your conflicting patches, at a price of.. well, changing the identity of your local patches.

## rebase pull

Sort of like rebase apply, but instead of a patch bundle it obtains the patches from a remote repository.

Specifically, rebase pull applies all the remote patches, one-by-one, suspending any local patches that conflict. We will see more of rebase pull in the second example.

# Example 1: suspending local changes

Imagine the following situation: at point A you add a configuration file to your repository, then you record a patch B that updates the settings in the configuration file. After that you make some more records before you realize that you’ve included by accident your private password in patch A! You want to get rid of it in your entire history, but you can’t just unrecord A, because B depends on A, and possibly some other patches depend on B.

The contents of the configuration file after patch A:

port = 6667
host = irc.freenode.net
password = awesomevcs

Patch B, diff:

@@ -1,3 +1,4 @@
-port = 6667
+port = 6697
+usessl = True
host = irc.freenode.net
password = awesomevcs

You cannot just amend patch A, because the patch B depends on A:

> darcs amend
patch 1925d640f1f3180cb5b9e64260c1b5f374fce4ca
Author: <NAME>
Date:   Tue Jul 21 13:23:07 MSK 2015
* B

Shall I amend this patch? [yNjk…], or ? for more options: n

Skipping depended-upon patch:
patch 22d7c8da83141f8b1f80bdd3eff02064d4f45c6b
Author: <NAME>
Date:   Tue Jul 21 13:22:24 MSK 2015
* A

Cancelling amend since no patch was selected.

What we will have to do is temporarily suspend patch B, amend patch A, and then unsuspend B.

> darcs rebase suspend
patch 1925d640f1f3180cb5b9e64260c1b5f374fce4ca
Author: <NAME>
Date:   Tue Jul 21 13:23:07 MSK 2015
* B

Shall I suspend this patch? (1/2)  [ynW…], or ? for more options: y
patch 22d7c8da83141f8b1f80bdd3eff02064d4f45c6b
Author: <NAME>
Date:   Tue Jul 21 13:22:24 MSK 2015
* A

Shall I suspend this patch? (2/2)  [ynW…], or ? for more options: d
Rebase in progress: 1 suspended patches

At this point, the state of our repository is the following: there is one (active) patch A, and one suspended patch B.

> darcs rebase changes -a
patch 4c5d45230dc146932b21964aea938e2a978523eb
Author: <NAME>
Date:   Tue Jul 21 13:28:58 MSK 2015
* B

Rebase in progress: 1 suspended patches
> darcs changes -a
patch 21f56dfb425e4c49787bae5db4f8869e96787fb2
Author: <NAME>
Date:   Tue Jul 21 13:28:49 MSK 2015
* A

Rebase in progress: 1 suspended patches
> cat config
port = 6667
host = irc.freenode.net
> $EDITOR config # remove the password bit > darcs amend patch 22d7c8da83141f8b1f80bdd3eff02064d4f45c6b Author: <NAME> Date: Tue Jul 21 13:22:24 MSK 2015 * A Shall I amend this patch? [yNjk…], or ? for more options: y hunk ./config 3 -password = awesomevcs Shall I record this change? (1/1) [ynW…], or ? for more options: y Do you want to record these changes? [Yglqk…], or ? for more options: y Finished amending patch: patch 21f56dfb425e4c49787bae5db4f8869e96787fb2 Author: <NAME> Date: Tue Jul 21 13:28:49 MSK 2015 * A Rebase in progress: 1 suspended patches Now that we’ve removed the password from the history, we can safely unsuspend patch B (in this particular situation we actually know that applying B to the current state of the repository won’t be a problem, because B does not conflict with our modified A) > darcs rebase unsuspend patch 1925d640f1f3180cb5b9e64260c1b5f374fce4ca Author: <NAME> Date: Tue Jul 21 13:23:07 MSK 2015 * B Shall I unsuspend this patch? (1/1) [ynW…], or ? for more options: y Do you want to unsuspend these patches? [Yglqk…], or ? for more options: y Rebase finished! And that’s done! > cat config port = 6697 usessl = True host = irc.freenode.net You may use this rebase strategy for removing sensitive information from the repository, for removing that 1GB binary .iso that you added to your repository by accident, or for combining two patches into one deep down in the patchset. # Example 2: developing against a changing upstream – rebase pull Imagine you have a fork R’ of a repository R that you are working on. You are implementing a feature that involves a couple of commits. During your work you record a commit L1 that refractors some common datum from modules A.hs and B.hs. You proceed with your work recording a patch L2. At this point you realise that after you forked R, the upstream recorded two more patches U1 and U2, messing with the common datum in A.hs. If you just pull U1 into your fork R’, you will have a conflict, that you will have to resolve by recording another patch on top.  S / \ / \ L1 U1 Note: if you run darcs rebase pull in R’, then the only patches that will be suspended are the ones which are already in R’. Because suspended patches gain new identity, make sure that you do not have other people’s conflicting patches present in R’. The way to solve this would be to first do darcs rebase pull, which would suspend the conflicting patches, and then start unsuspending the patches one by one, making sure that you fix any conflicts that may arise after each unsuspend. Consider a concrete example with two repositories rep1 and rep1_0. rep1_0 > darcs changes patch ebaccd5c36667b7e3ee6a49d25ef262f0c7edf2b Author: <NAME> Date: Mon Jul 27 20:56:25 MSK 2015 * commit2 patch a7e0d92a53b0523d0224ef8ffae4362adf854485 Author: <NAME> Date: Mon Jul 27 20:56:25 MSK 2015 * commit1 rep1_0 > darcs diff —from-patch=commit2 patch ebaccd5c36667b7e3ee6a49d25ef262f0c7edf2b Author: <NAME> Date: Mon Jul 27 20:56:25 MSK 2015 * commit2 diff -rN -u old-rep1_0/dir1/file2 new-rep1_0/dir1/file2 — old-rep1_0/dir1/file2 1970-01-01 03:00:00.000000000 +0300 +++ new-rep1_0/dir1/file2 2015-07-28 12:25:54.000000000 +0300 @@ -0,0 +1 @@ +double whatsup rep1_0 > cd ../rep1 rep1 > darcs changes patch e3df0e23a3915910a81eb8181d7b3669e8f270a9 Author: <NAME> Date: Tue Jul 28 12:27:55 MSK 2015 * commit2’ patch a7e0d92a53b0523d0224ef8ffae4362adf854485 Author: <NAME> Date: Mon Jul 27 20:56:25 MSK 2015 * commit1 rep1 > darcs diff —from-patch=“commit2’” patch e3df0e23a3915910a81eb8181d7b3669e8f270a9 Author: <NAME> Date: Tue Jul 28 12:27:55 MSK 2015 * commit2’ diff -rN -u old-rep1/dir1/file2 new-rep1/dir1/file2 — old-rep1/dir1/file2 1970-01-01 03:00:00.000000000 +0300 +++ new-rep1/dir1/file2 2015-07-28 12:28:39.000000000 +0300 @@ -0,0 +1 @@ +touch file2 \ No newline at end of file diff -rN -u old-rep1/file1 new-rep1/file1 — old-rep1/file1 2015-07-28 12:28:39.000000000 +0300 +++ new-rep1/file1 2015-07-28 12:28:39.000000000 +0300 @@ -1 +1 @@ -whatsup \ No newline at end of file +double whatsup \ No newline at end of file The patch commit2 from rep1_0 conflicts with commit2’ from rep1. rep1 > darcs rebase pull ../rep1_0 patch ebaccd5c36667b7e3ee6a49d25ef262f0c7edf2b Author: <NAME> Date: Mon Jul 27 20:56:25 MSK 2015 * commit2 Shall I pull this patch? (1/1) [ynW…], or ? for more options: y Do you want to pull these patches? [Yglqk…], or ? for more options: y The following local patches are in conflict: patch e3df0e23a3915910a81eb8181d7b3669e8f270a9 Author: <NAME> Date: Tue Jul 28 12:27:55 MSK 2015 * commit2’ Shall I suspend this patch? (1/1) [ynW…], or ? for more options: y Do you want to suspend these patches? [Yglqk…], or ? for more options: y Finished pulling. Rebase in progress: 1 suspended patches Now we have one patch — commit2’ — in the suspended state. We want to resolve the conflict by amending commit2’. We will do that by unsuspending it and manually editing out the conflicting lines. This will also make it depend on commit2. rep1 > darcs rebase unsuspend patch e3df0e23a3915910a81eb8181d7b3669e8f270a9 Author: <NAME> Date: Tue Jul 28 12:27:55 MSK 2015 * commit2’ Shall I unsuspend this patch? (1/1) [ynW…], or ? for more options: y Do you want to unsuspend these patches? [Yglqk…], or ? for more options: d We have conflicts in the following files: ./dir1/file2 Rebase finished! rep1 > cat dir1/file2 v v v v v v v ============= double whatsup ************* touch file2 ^ ^ ^ ^ ^ ^ ^ rep1 >$EDITOR dir1/file2
rep1 > darcs amend -a
patch 40b3b4123c78dba6a6797feb619572072654a9cd
Author: <NAME>
Date:   Tue Jul 28 12:32:56 MSK 2015
* commit2’
Shall I amend this patch? [yNjk…], or ? for more options: y
Finished amending patch:
patch c35867259f187c1bc30310f1cacb34c1bb2cce41
Author: <NAME>
Date:   Tue Jul 28 12:34:30 MSK 2015
* commit2’
rep1 > darcs mark-conflicts
No conflicts to mark.

Another repository saved from conflicting patches, yay!

1. See this discussion for details

## July 12, 2015

### <NAME>

#### Darcs 2.10.1 (Mac OSX build)

July 12, 2015 06:13 PM UTC

Darcs 2.10.1 has been released!

Citing the official release notes

> The darcs team is pleased to announce the release of darcs 2.10.1 !
> ..
>
> # What's new in 2.10.1 (since 2.10.0) #
>
> - generalized doFastZip for darcsden support
> - support terminfo 0.4, network 2.6, zlib 0.6, quickcheck 2.8 and
> attoparsec 0.13
> - errorDoc now prints a stack trace (if profiling was enabled) (<NAME>)
> - beautified error messages for command line and default files (<NAME>)
> - fixed the following bugs:
>       - issue2449: test harness/shelly: need to handle
> mis-encoded/binary data (<NAME>)
>       - issue2423: diff only respecting --diff-command when a diff.exe
> is present (Alain91)
>       - issue2447: get contents of deleted file (<NAME>)
> 'darcs help markdown' (<NAME>)
>       - issue2461: darcs log --repo=remoterepo creates and populates
> _darcs (<NAME>)
>       - issue2459: cloning remote repo fails to use packs if cache is
> on a different partition (<NAME>)
>
> # Feedback #
>
> If you have an issue with darcs 2.10.0, you can report it on
> http://bugs.darcs.net/ . You can also report bugs by email to
> bugs at darcs.net, or come to #darcs on irc.freenode.net.

I’ve updated Mac OS to version 2.10.1. You can install it with

brew install http://darcs.covariant.me/darcs.rb

## July 11, 2015

### <NAME>

#### HTTP Basic auth in Snap

July 11, 2015 09:27 AM UTC

Recently, I’ve implemented HTTP Basic auth for darcsden and wrote a simple wreq test for it. In this post I would like to outline the main technical details.

# Server side

## Transient storage

A lot of darcsden code is (especially the parts that are closer to the users’ web browser — handlers, pages, so on) is written around sessions. Sessions are stored in a special storage — implemented by the DarcsDen.Backend.Transient, but if we abstract away from the details we have a Session datatype. Authorization and authentication information is handled by sessions using functions setUser :: (BTIO bt) => Maybe User -> Session -> Snap Session, notice :: (BTIO bt) => String -> Session -> Snap () (display a message to the user) and others. The BTIO bt part is just a synonym for

type BTIO bt = (BackendTransient bt, ?backendTransient :: bt, MonadIO (BackendTransientM bt))

Which basically says that we are operating with a transient backend that supports all of necessary operations, and we can also do IO in it. Right now there are only two transient backends (read: two ways of storing sessions): Redis and in-process memory.

## Running sessions

If we have a piece of Snap code that we want to “sessionify” we use the following interface:

withSession :: (BTIO bt) => (Session -> Snap ()) -> Snap ()

What this does is it basically checks for a cookie — in case it is present it grabs the session information from the storage (in accordance with the cookie); if the cookie is not present it creates a new session and stores it in a cookie.

If we have a page of a type Session -> Snap (), we might want to give user an option to do HTTP authentication on that page. We introduce another function

withBasicAuth :: (BP bp, BTIO bt)
=> (Session -> Snap ())
-> (Session -> Snap ())
withBasicAuth act s = do
rq  do
rawHeader <- maybe throwChallenge return $getHeader “Authorization” rq let (Just (usr,pw)) = getCredentials rawHeader c errorPage “Unknown user” Just u -> if checkPassword (fromBS pw) u then doLogin (fromBS usr) else errorPage “Bad password” _ -> act s So, what is going on in here? First of all, we check if the “login” parameter is set to “true”. If it does, we try to get the “Authorization” header, de-encode it, and check whether the credentials are good. throwChallenge :: Snap a throwChallenge = do modifyResponse$ (setResponseStatus 401 “Unauthorized”) .
getResponse >>= finishWith

If the response header is present, it is of a form Basic x, where x is a base64 encoded string user:password. We can extract the credentials from the header like this:

import qualified Data.ByteString          as B
import qualified Data.ByteString.Base64   as B
…
getCredentials :: B.ByteString  — ^ Header
then fmap extract (hush (B.decode (B.drop 6 header)))
else Nothing
where
extract cred = case (B.breakByte (c2w ‘:’) cred) of
(usr, pw) -> (usr, safeTail pw)

# On the client

The tests that I am currently writing for darcsden are all of the same form: I use wreq to do requests to the darcsden server, then, if necessary, I run taggy to extract information from the webpage, and compare it to the “canonical” information.

As it turns out, doing HTTP Basic Auth is very easy with wreq! First of all, we define a function for doing a GET request that will do some exception handling for us:

getSafeOpts :: Options -> String -> IO (Either Status (Response ByteString))
getSafeOpts opts url = fmap Right (getWith opts url) catch hndlr
where
hndlr (StatusCodeException s _ _) = return (Left s)
hndlr e = throwIO e

This way, we won’t get a runtime exception when accessing a non-existing page or getting a server error. Doing a GET request with HTTP Basic Auth is now very easy:

getWithAuth :: (String, String) -> String -> IO (Either Status (Response ByteString))
getWithAuth (username,pw) url = getSafeOpts opts url
where
opts = defaults & auth ?~ basicAuth (toBS username) (toBS pw)
& param “login” .~ [“true”]

In that snippet we use lenses to set up an auth header and an HTTP parameter (?login=true).

Finally, after obtaining a Response ByteString, we can parse it with taggy-lens:

parsed :: Fold (Response L.ByteString) Text.Taggy.Node
parsed = responseBody
. to (decodeUtf8With lenientDecode)
. html

We can then play with it in GHCi

*Main> Right r  r ^.. parsed
[NodeElement (Element {eltName = “DOCTYPE”, eltAttrs = fromList [(“html”,””)], eltChildren = [NodeElement (Element {eltName = “html”, eltAttrs = fromList [], eltChildren = [NodeElement (Element {eltName = “head”, eltAttrs = fromList [], eltChildren = [NodeElement (Element {eltName = “title”, eltAttrs = fromList [], eltChildren = [NodeContent “localhost”]}),NodeElement (Element {eltName = “link”, eltAttrs = fromList [(“href”,”http://localhost:8900/public/images/favicon.ico”),…

If we want to check that we are indeed logged in correctly, we should look for the “log out” button. Taggy does all the heavy lifting for us, we just have to write down a lens (more precisely, a fold) to “extract” a logout button from the page

logoutButton :: HasElement e => Fold e Text
logoutButton = allAttributed (ix “class” . only “logout”)
. allNamed (only “a”)
. contents

logoutButton searches for <div class=“logout”> and returns the text in the link inside the div. There might be many such links inside the node, hence we use a fold.

*Main> r ^.. parsed . logoutButton
[“log out”]

In this case, since we only care if such link is present, we can use a preview

*Main> r ^? parsed . logoutButton
Just “log out”

# Conclusion

Well, that’s about it for now. I regret taking way too much time writing this update, and I hope to deliver another one soon. Meanwhile, some information regarding the darcsden SoC project can be found on the wiki.

## July 09, 2015

### Darcs News

#### darcs 2.10.1 release

July 09, 2015 05:10 PM UTC

Hi all,

The darcs team is pleased to announce the release of darcs 2.10.1 !

The easiest way to install darcs 2.10.1 from source is by first installing the Haskell Platform (http://www.haskell.org/platform). If you have installed the Haskell Platform or cabal-install, you can install this release by doing:

$cabal update$ cabal install darcs-2.10.1

Alternatively, you can download the tarball from http://darcs.net/releases/darcs-2.10.1.tar.gz and build it by hand as explained in the README file.

The 2.10 branch is also available as a darcs repository from http://darcs.net/releases/branch-2.10

## What's new in darcs 2.10.1 (since darcs 2.10.0)

• support terminfo 0.4, network 2.6, zlib 0.6, quickcheck 2.8 and attoparsec 0.13
• errorDoc now prints a stack trace (if profiling was enabled) (<NAME>)
• beautified error messages for command line and default files (<NAME>)
• generalized doFastZip for darcsden support
• fixed the following bugs:
• issue2449: test harness/shelly: need to handle mis-encoded/binary data (<NAME>)
• issue2423: diff only respecting --diff-command when a diff.exe is present (Alain91)
• issue2447: get contents of deleted file (<NAME>)
• issue2307: add information about 'darcs help manpage' and 'darcs help markdown' (<NAME>)
• issue2461: darcs log --repo=remoterepo creates and populates _darcs (<NAME>)
• issue2459: cloning remote repo fails to use packs if cache is on a different partition (<NAME>)

## Feedback

If you have an issue with darcs 2.10.1, you can report it on http://bugs.darcs.net/ . You can also report bugs by email to <EMAIL>, or come to #darcs on irc.freenode.net.

## June 22, 2015

### <NAME>

#### Darcs binaries for OSX with Homebrew

June 22, 2015 12:33 PM UTC

Recently I’ve updated my Darcs homebrew build to Darcs 2.10. You can install it with

brew install http://darcs.covariant.me/darcs.rb

The formula contains a context (--exact-version) and it is a static binary.

## May 13, 2015

### <NAME>

#### Hoogle inside the sandbox

May 13, 2015 09:54 PM UTC

# Introduction

This is my first post from the (hopefuly fruitful!) series of blog posts as part of my Haskell SoC project. I will spend a great chunk of my summer hacking away on DarcsDen; in addition, I will document my hardships and successes here. You can follow my progress on my DarcsHub.

This particular post will be about my working environment.

# The problem

Hoogle is an amazing tool that usually needs no introduction. Understandably, the online version at haskell.org indexes only so many packages. This means that if I want to use hoogle to search for functions and values in packages like darcs and darcsden, I will have to set up a local copy.

Cabal sandboxing is a relatively recent feature of the Cabal package manager, but I don’t think it is reasonable in this day to install from the source (let alone develop) a Haskell package without using sandboxing.

The problem seems to be that the mentioned tools do not play well together out of the box, and some amount of magic is required. In this note I sketch the solution, on which I’ve eventually arrived after a couple of tries.

# Using hoogle inside a Cabal sandbox

The presumed setup: a user is working on a package X using the cabal sandboxes. The source code is located in the directory X and the path to the cabal sandbox is X/.cabal-sandbox.

Step 1: Install hoogle inside the sandbox. This is simply a matter of running cabal install hoogle inside X. If you want to have a standard database alongside the database for your packages in development, now is the time to do .cabal-sandbox/bin/hoogle data.

Step 2: Generate haddocks for the packages Y,Z you want to use with hoogle. In my case, I wanted to generate haddocks for darcs and darcsden. This is just a matter of running cabal haddock --hoogle in the correct directory.

Step 3: Convert haddocks to .hoo files. Run the following commands in X/:

.cabal-sandbox/bin/hoogle convert /path/to/packageY/dist/doc/html/*/*.txt

You should see something like

Converting /path/to/packageY/dist/doc/html/Y/Y.txt
Converting Y... done

after which the file Y.hoo appears in /path/to/packageY/dist/doc/html/Y/

Step 4: Moving and combining databases. The hoogle database should be stored in .cabal-sandbox/share/*/hoogle-*/databases. Create such directory, if it’s not present already. Then copy the ‘default’ database to that folder:

cp .cabal-sandbox/hoogle/databases/default.hoo .cabal-sandbox/share/*/hoogle-*/databases

Finally, you can combine your Y.hoo with the default database.

.cabal-sandbox/bin/hoogle combine /path/to/packageY/dist/doc/html/*/*.hoo .cabal-sandbox/share/*/hoogle-*/databases/default.hoo
mv default.hoo .cabal-sandbox/share/*/hoogle-*/databases/default.hoo

And you are done! You can test your installation

$.cabal-sandbox/bin/hoogle rOwner DarcsDen.State.Repo rOwner :: Simple Lens (Repository bp) String For additional usability, consider adding .cabal-sandbox/bin to your$PATH.

## April 20, 2015

### <NAME>

#### ssh, Darcs Hub vulnerability

April 20, 2015 11:10 PM UTC

I recently learned of a serious undocumented vulnerability in the ssh package. This is a minimal ssh server implementation used by darcsden to support darcs push/pull. If you use the ssh package, or you have darcsden’s darcsden-ssh server running, you should upgrade to/rebuild with the imminent ssh-0.3 release right away. Or if you know of someone like that, please let them know.

darcsden is of course the basis for Darcs Hub. Here’s the announcement I sent to users there a few days ago, with more details.

Hello darcs hub users,

This is <NAME>, operator of hub.darcs.net, with the first all-darcs-hub-users announcement. You’re receiving this because you have an email address configured in your darcs hub user settings.

Thank you for using darcs hub, and for any feedback/bug reports/patches you may have sent. Usage is growing steadily, and I plan to blog more about it soon at joyful.com.

This email is to announce a recently patched security vulnerability in darcs hub’s SSH server.

Timeline:

3/21: a software developer reports that the haskell “ssh” library used by darcs hub does not check for a valid signature on the public key during authentication. This means it was possible to authenticate as any other ssh user if you knew their public key.

3/21-: I discuss the issue with a small number of core darcs developers and the ssh author.

3/25: A preliminary fix is deployed. We believe this closed the vulnerability.

4/6: A more comprehensive and tested fix is deployed.

4/15: This announcement is sent to current darcs hub users with valid email addresses (714 of 765 users).

4/20: Public disclosure via blog, haskell mail lists and the issue tracker (darcsden #130).

Impact and current status:

We believe the vulnerability is now fixed. But we are not cryptographers - I’m sure the new ssh maintainer would welcome any help from some of those.

We have no reason to believe anyone discovered or exploited the vulnerability. Also, it seems unlikely there’s anything hosted on darcs hub that would attract this kind of attention. darcs hub logs are not good enough to be certain, however. It’s possible I’ll find a way to be more certain by looking at file timestamps or something.

The weakness was present in darcs hub’s ssh server since it went live (and in darcsden.com before that). As mentioned, it was possible to authenticate via ssh as another user if you provided their public ssh key. With ssh access, it’s possible to create, delete, modify or replace any repository in that darcs hub account (but not possible to change user settings in the web app, or to access the system hosting darcshub).

The worst-case scenario we’ve imagined is that a motivated attacker could have authenticated as you and replaced your repo with one that looks just like it, but with patches altered or added, any time since you created the repo on darcs hub (or on darcsden.com, if you moved it from there).

So if you’re paranoid/careful you may want to check the integrity of your repos, eg by reviewing the repo history (“changes” button on the website, “darcs log [-s] [-v]” at the console). If you have more questions about this, you can contact me (<EMAIL>) and if necessary <NAME> (<EMAIL>) privately.

Future plans:

• Public announcement on 4/20

• I’ll add a security section to the darcs hub FAQ

• Ganesh has stepped up to be maintainer of the ssh package, and will make a new release soon

• I’ll do a darcsden release not too long after that

• We’ll need to figure out Darcs hub’s sustainability plan. As it grows and more of you rely on it, so does the need for a revenue stream to allow decent maintenance and oversight. This could be from funding, donations, charging for private repos or something else.

Also:

Some logistical things to be aware of:

• this announcement has been sent via MailChimp, and as yet there’s no automatic integration between MailChimp and your settings on hub.darcs.net.

• remember that darcs hub’s issue tracker is here, and that it does not yet send email notifications - to see replies to an issue, you must visit the issue page.

• darcs hub’s password recovery emails may not always reach you - if you’re experiencing this, please contribute to #123.

Needless to say, I regret the vulnerability and am pleased to have it closed. Of course we are not alone, eg github had their own incident. Thank you very much to all who have been helping with this, especially the original reporter for letting us all know, and Ganesh for providing swift and high quality fixes.

## April 19, 2015

### Darcs News

#### darcs 2.10.0 release

April 19, 2015 10:01 PM UTC

Hi all,

The darcs team is pleased to announce the release of darcs 2.10.0.

The easiest way to install darcs 2.10.0 from source is by first installing the Haskell Platform (http://www.haskell.org/platform). If you have installed the Haskell Platform or cabal-install, you can install this release by doing:

$cabal update$ cabal install darcs-2.10.0

Alternatively, you can download the tarball from http://darcs.net/releases/darcs-2.10.0.tar.gz and build it by hand as explained in the README file.

The 2.10 branch is also available as a darcs repository from http://darcs.net/releases/branch-2.10

## Feedback

If you have an issue with darcs 2.10.0, you can report it via the web on http://bugs.darcs.net/ . You can also report bugs by email to bugs at darcs.net, or come to #darcs on irc.freenode.net.

# What's new since darcs 2.8.5

## New features

• darcs rebase: enable deep amending of history (Ganesh Sittampalam)
• darcs pull --reorder: keep local-only patches on top of mainstream patches (<NAME>, <NAME>)
• darcs dist --zip: generate a zip archive from a repository (Guillaume Hoffmann)
• patch bundle contexts are minimized by default. Enables bundles to be applied to more repositories. (Guillaume Hoffmann)
• darcs convert export/import for conversion to/from VCSes supporting the fast-export protocol (<NAME>, <NAME>, <NAME>, <NAME>, <NAME>)
• darcs test --backoff: exponential backoff test strategy, faster than bisect on big repositories (<NAME>)
• work normally on sshfs-mounted repositories (<NAME>)
• automatic detection of file/directory moves, and of token replaces (<NAME>)
• patience diff algorithm by default (<NAME>)
• interactive mode for whatsnew (<NAME>)
• tag --ask-deps to create tags that may not include some patches (Ganesh Sittampalam)

## User Interface

• add a last question after all patches have been selected to confirm the whole selection (<NAME>)
• command names:
• clone is the new name of get and put
• log is the new name of changes
• amend is the new name of amend-record
• show output of log into a pager by default (Guillaume Hoffmann)
• the output of log is more similar to git's:
• show patch hash in UI (hash of the patch's metadata)
• put author and date on separate lines (<NAME>)
• enable to match on patch hash prefix with -h and --hash (<NAME>, <NAME>)
• better messages:
• better error messages for http and ssh errors (<NAME>)
• init, add, remove, move and replace print confirmation messages (Guillaume Hoffmann)
• rollback only happens in the working copy (<NAME>, <NAME>)
• darcs send no longer tries to send a mail by default (Eric Kow)
• when no patch name given, directly invoke text editor (<NAME>, <NAME>)
• use nano as default text editor instead of vi (Guillaume Hoffmann)
• keep log files for patch name and mail content in _darcs (Ale Gadea)
• optimize and convert are now supercommands (Guillaume Hoffmann)
• improve darcs help environment and darcs help markdown (<NAME>, <NAME>)
• warn about duplicate tags when creating a new one (Ale Gadea)
• allow darcs mv into known, but deleted in working, file (Owen Stephens)
• improve--not-in-remote, allowing multiple repos and use default (Owen Stephens)

## Performance

• faster darcs diff (Petr Rockai)
• faster log and annotate thanks to patch index data structure (<NAME>, <NAME>, <NAME>, <NAME>, <NAME>)
• faster push via ssh by using compression (Ben Franksen)
• cloning to an ssh destination (formerly darcs put) is more efficient (Guillaume Hoffmann)
• faster internal representation of patch hashes (Guillaume Hoffmann)
• when cloning from http, use packs in a more predictable way (Guillaume Hoffmann)
• store global cache in bucketed format (Marcio Diaz)
• require and support GHC 7.4 to 7.10 (Ganesh Sittampalam)
• replace type witness CPP macros with plain Haskell (Eric Kow)
• hashed-storage is bundled into darcs (Ganesh Sittampalam)
• replace C SHA256 bindings with external libraries (Ganesh Sittampalam)
• move the bits of the datetime package we need into Darcs.Util.DateTime (Ganesh Sittampalam)
• build Darcs once rather than thrice. (Eric Kow)
• run tests through cabal test (<NAME>)
• run fewer darcs-1 related tests in testsuite (Ganesh Sittampalam)
• Use custom replHook to fix cabal repl (Owen Stephens)
• darcs.cabal: make Haskell2010 the default-language for all stanzas (Ben Franksen)
• always compile with mmap support (Ganesh Sittampalam)
• new options subsystem (<NAME>en)
• various cleanups, code restructurations and refactoring, haddocks (<NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>)

## Issues resolved in Darcs 2.10

• issue346: implement "patience diff" from bzr (<NAME>)
• issue642: Automatic detection of file renames (<NAME>)
• issue822: generalized the IO Type for better error messages and exception handling (<NAME>)
• issue851: interactive mode for whatsnew (<NAME>)
• issue904: Fix record on Linux/FUSE/sshfs (fall back to sloppy locks automatically) (<NAME>)
• issue1066: clone to ssh URL by locally cloning then copying by scp (Guillaume Hoffmann)
• issue1268: enable to write darcs init x (Radoslav Dorcik)
• issue1416: put log files in tempdir instead of in working dir (Ale Gadea)
• issue1514: send --minimize-context flag for send (Guillaume Hoffmann)
• issue1624: bucketed cache (Marcio Diaz)
• issue1828: file listing and working --dry-run for mark-conflicts (Guillaume Hoffmann)
• issue1987: Garbage collection for inventories and patches (Marcio Diaz)
$\$$darcs pull -a$r_1$so now we have,$r_2=p_{1,0}t_{1,0}t_{1,1}$and we see that$t_{1,0}$is dirty. Doing darcs optimize reorder not reorder nothing. What is going on is that to know what reorder, misplacePatches takes the first tag, in our case$t_{1,1}$, and "search" for what patches he don't tag. But$p_{1,0}$and$t_{1,0}$are tagged by$t_{1,1}$so there is nothing to reorder despite$t_{1,0}$is dirty. Therefore there is no way of clean$t_{1,0}$because misplacePatches always takes the first tag, so if a tag is tagging one or more dirty tags, this tags never be available to get clean. "Second", using the implementation of "reorder" one can get almost for free the option --reorder for the commands pull, apply and rebase pull. The behavior for the case of pull (for the others commands is the same basic idea) is that our local patches remain on top after a pull from a remote repository, e.i. suppose we have the followings$l$(ocal) and$r$(emote) repositories,$l=p_1p_2\ldotsp_nlp_{n+1}\ldotslp_mr=p_1p_2\ldotsp_nrp_{n+1}\ldotsrp_k$where$lp$are the local patches that don't belong to$r$, and vice versa for$rp$. Make darcs pull, leaves$l$as follow,$l=p_1p_2\ldotsp_nlp_{n+1}\ldotslp_mrp_{n+1}\ldotsrp_k$meanwhile make darcs pull --reorder, leaves$l$,$l=p_1p_2\ldotsp_nrp_{n+1}\ldotsrp_klp_{n+1}\ldotslp_m$making more easy to send the$lp$patches later. "Third", beginning a new task, implement option minimize-context for command darcs send. Still no much to comment, I have almost finished implementing the option but with some doubts, I hope that for the end of the week have a more "prettier" implementation as well as a better understanding. ## June 25, 2014 ### Darcs News #### darcs news #104 June 25, 2014 04:59 AM UTC ### News and discussions 1. Google Summer of Code 2013 has begun! BSRK and José will post updates on their blogs: ### Issues resolved (8) issue2163 <NAME> issue2227 <NAME> issue2248 <NAME> issue2250 BSRK Aditya issue2311 <NAME> issue2312 <NAME> issue2320 <NAME> issue2321 <NAME> ### Patches applied (20) See darcs wiki entry for details. #### darcs news #105 June 25, 2014 04:58 AM UTC ### News and discussions 1. This year's Google Summer of Code projects brought a lot of improvements to darcs and its ecosystem! • BSRK Aditya: Darcsden improvements: • <NAME>: patience diff, file move detection, token replace detection: 2. <NAME> asked why adjacent hunks could not commute: 3. We listed the changes that occurred between version 2.8.4 and the current development branch into a 2.10 release page: ### Issues resolved (8) issue346 <NAME> issue1828 <NAME> issue2181 <NAME> issue2309 <NAME> issue2313 <NAME> issue2334 <NAME> issue2343 <NAME> issue2347 <NAME> ### Patches applied (39) See darcs wiki entry for details. #### Darcs News #106 June 25, 2014 04:58 AM UTC ### News and discussions 1. Darcs is participating once again to the Google Summer of Code, through the umbrella organization Haskell.org. Deadline for student application is Friday 21st: 2. It is now possible to donate stock to darcs through the Software Freedom Conservancy organization. Donations by Paypal, Flattr, checks and wire transfer are still possible: 3. <NAME> wrote a presentation about Darcs as a higher inductive type: 4. Darcs now directly provides import and export commands with Git. This code was adapted from <NAME>'s darcs-fastconvert, with some changes by <NAME> from his Summer of Code project "darcs-bridge": ### Issues resolved (6) issue642 <NAME> issue2209 <NAME> issue2319 <NAME> issue2332 <NAME> issue2335 <NAME> issue2348 Ryan ### Patches applied (34) See darcs wiki entry for details. #### Darcs News #108 June 25, 2014 04:57 AM UTC ### News and discussions 1. We have a few updates from the Google Summer of Code projects. <NAME> about history reordering: 2. <NAME> about the cache system: 3. Incremental fast-export is now provided to ease maintenance of git mirrors: ### Issues resolved (8) issue2244 <NAME> issue2314 <NAME> issue2361 <NAME> issue2364 <NAME> issue2364 <NAME> issue2388 <NAME> issue2394 <NAME> issue2396 <NAME> ### Patches applied (39) See darcs wiki entry for details. ## June 12, 2014 ### Ale Gadea #### Third Week (02-06 june) June 12, 2014 04:58 PM UTC Well, well... Now with the solution already implemented here are a couple of time tests that show the improvement. For the repository of the issue2361: Before patch1169 "let it run for 2 hours and it did not finish" After patch1169 real 0m5.929s user 0m5.683s sys 0m0.260s For the repository generated by forever.sh, that in summarize has 12600~ patches, a bundle unrevert and doing reorden implies move 1100~ patches forward passing by 11500~ patches. Before patch1169 (Interrupted!) real 73m9.894s user 71m28.256s sys 1m11.439s After patch1169 real 2m23.405s user 2m17.347s sys 0m6.030s The repository generated by bigRepo.sh has 600~ patches, with only one tag and a very small bundle unrevert. Before patch1169 real 0m34.049s user 0m33.386s sys 0m0.665s After patch1169 real 0m1.053s user 0m0.960s sys 0m0.152s One last repository generated by bigUnrevert.sh, has 13 patches and a really big bundle unrevert (~10MB). Before patch1169 real 0m1.304s user 0m0.499s sys 0m0.090s After patch1169 real 0m0.075s user 0m0.016s sys 0m0.011s The repository with more examples is in here: ExamplesRepos. ## June 05, 2014 ### <NAME> #### Second Week (26-30 may) June 05, 2014 06:47 PM UTC Luckily, this week with Guillaume we found a "solution" for the issue 2361. But before of entering in details, let's review how the command darcs optimize --reorder does for reorder the patches. So, suppose we have the following repositories than, reading it from left to right we have the first patch till the last patch, besides with$p_{i,j}$we denote the$i$-th patch who belongs to the$j$-th repository, and when we want to specify that a patch$p_{i,j}$is a tag we write$t_{i,j}$.$r_1=p_{1,1}p_{2,1}\ldotsp_{n,1}p_{n+1,1}\ldotsp_{m,1}r_2=p_{1,1}p_{2,1}\ldotsp_{n,1}p_{1,2}\ldotsp_{k,2}t_{1,2}p_{k+1,2}\ldotsp_{l,2}$where the red part represent when$r_2$was cloned from$r_1$, and the rest is how each repository was evolved. Now, suppose we make a merge of$r_1$and$r_2$in$r_1$making a bundle of the patches of$r_2$and appling it in$r_1$. Thus, after the merge we have that$r_1=p_{1,1}p_{2,1}\ldotsp_{n,1}p_{n+1,1}\ldotsp_{m,1}p_{1,2}\ldotsp_{k,2}t_{1,2}p_{k+1,2}\ldotsp_{l,2}$and we found the situation where the tag$t_{1,2}$is dirty because the green part is in the middle. And now we are in conditions of finding out how darcs does the reorder of patches. So, the first task is to select the first tag seeing$r_1$in the reverse way, suppose$t_{1,2}$is the first (ie,$p_{k+1,2}\ldotsp_{l,2}$are not tags), and split the set of patches (the repository) in$ps_{t_{1,2}}=p_{1,1}p_{2,1}\ldotsp_{n,1}p_{1,2}\ldotsp_{k,2}t_{1,2}$and the rest of the patch set,$rest=p_{n+1,1}\ldotsp_{m,1}p_{k+1,2}\ldotsp_{l,2}$this is done by splitOnTag, which I don't totally understand yet, so for the moment... simply do the above :) Then, the part that interest us now is$rest$, we want to delete all the patches of$rest$that exist in$r_1$and then add them again, causing that they show up to the right. This job is done by tentativelyReplacePatches, which first calls tentativelyRemovePatches and then calls tentativelyAddPatches. So, tentativelyRemovePatches of$r_1$and$rest$makes,$r_{1}'=p_{1,1}p_{2,1}\ldotsp_{n,1}p_{1,2}\ldotsp_{k,2}t_{1,2}$and, tentativelyAddPatches of$r_{1}'$and$rest$,$r_{1}''=p_{1,1}p_{2,1}\ldotsp_{n,1}p_{1,2}\ldotsp_{k,2}t_{1,2}p_{n+1,1}\ldotsp_{m,1}p_{k+1,2}\ldotsp_{l,2}$leaving$t_{1,2}$clean. Well, all of this was for understanding the "solution" for the issue, we are almost there but before let's look at the function tentativelyRemovePatches. It attempts to remove patches with one special care: when one does darcs revert, a special file is generated, called unrevert in _darcs/patches, which is used for darcs unrevert in case that one makes a mistake with darcs revert. One important difference with unrevert is that unlike all the other files in _darcs/patches, unrevert in not a patch but a bundle, that contains a patch and a context. This context allows to know if the patch is applicable. So when one removes a patch (running for example oblitarete, unrecord or amend) that patch has to be removed from the bundle-revert (bundle of the file _darcs/patches/unrevert). It's now always possible to adjust the unrevert bundle, in which case, the operation continues only if the user agrees to delete the unrevert bundle. But now a question emerge. Is it necessary to accommodate the bundle-revert in the case of reorder?; the answer is no, and it's because we don't delete any patch of$r_1$so we still can apply the bundle-revert in$r_{1}''$. So, finally! we find out that for reorder we need a special case of removing, which doesn't try to update the unrevert bundle. And this ends up being the "solution" for the issue, since the reorder blocks in that function. But! beyond this solves the issue something weird is happening, that is the reason of the double quotes for solution :) This is more o less the step forward for now. The tasks ahead are, documenting the code in various parts and make the special case for the function tentativelyRemovePatches. On the way I will probably understand more about some of the functions that I mention before so probably I will add more info and rectify whatever is needed. ## June 03, 2014 ### <NAME> #### Google Summer of Code 2014 - Darcs June 03, 2014 06:46 PM UTC Hi hi all! I have been accepted in the GSoC 2014 :) , as part of the work I'll be writing about my progress. The original plan is have a summary per week (or at least I hope so jeje). I have already been reading some of the code of darcs and fixing some issues; Issue 2263 ~ Patch 1126 Issue 1416 ~ Patch 1135 - Issue 2244 ~ Patch 1147 (needs-screening) (not any more$\ddot\smile$) The details about the project is in History Reordering Performance and Features. Also some issues about the project are; Issue 2361 Issue 2044 Cheers! #### First Week (19-23 may) June 03, 2014 06:42 PM UTC Sadly, a first slow week, I lost the monday with problems with my notebook for which I have to reinstall ghc, cabal, all the libraries, etc.. but! in the end this helped :) The list of taks of the week include: 1. Compile and run darcs with profiling flags 2. Write scripts to generate dirty-tagged big repositories 3. Check memory usage with hp2any for the command optimize --reorder for the generated repositories and repo-issue2361 4. Check performance difference with and without patch-index 5. Document reorder implementation on wiki 6. Actually debug/optimize reorder of issue2361 (Stretch goal) 1. Compile and run darcs with prolfiling flags This seems pretty easy at first, but turned somewhat annoying because one have to install all the libraries with the option profiling. So a mini-step-by-step of the my installation of darcs with profiling flags is (i'm using ubuntu 14.04, ghc-7.6.3 and cabal-install-1.20.0.2) : - Install ghc-prof package, in my case with sudo apt-get install ghc-prof - Install depencencies of darcs with enable-library-profiling, doing: -$ cabal install LIB --enable-library-profiling ( for each library :) )
- or setting in ~/.cabal/config, library-profiling: True
- Finaly install darcs with enable-library-profiling and enable-executable-profiling

2. Write scripts to generate dirty-tagged big repositories

About this no much to say, I did some libraries to make the scripts that generates the repositories more straightforward. And I wrote some examples, but still in search of interesting examples. A long the week probably I will add examples, hopefully interesting.

3, 4 and 5 all together and mixed

Now, when finally start to generate the examples repositories and play with hp2ps to check differents things, I started to think about others things and I ended up studing the implementation of the command optimize --reorder, in particular I start to write a version which print some info during the ordering of patches, but for now is very dirty implementation.

## November 03, 2013

### <NAME>

#### darcsum 1.3

November 03, 2013 07:38 PM UTC

• Fix a hang when reverting, when darcs responds with “Will not ask whether to revert this already decided patch…”.

• Fixed an error in at least my local darcsum, which caused it to break when darcsum-debug was enabled.

• Fixed the four warnings my emacs gave when byte-compiling it. These fixes could use some testing.

• Reviewed the status and backlog. Last release was 2010, the ELPA package dates from 2012, there’s a bunch of unreleased fixes, the site script needs updating for hakyll 4, the project still needs a maintainer.

And since I came this far, I’ll tag and announce darcsum 1.3. Hurrah!

This release includes many fixes from <NAME> and one from <NAME>. Here are the release notes.

Site and ELPA package updates will follow asap. All help is welcome.

## September 26, 2013

### <NAME>

#### darcsden/darcs hub GSOC complete

September 26, 2013 11:48 AM UTC

Aditya BSRK’s darcsden-improvement GSOC has concluded, and I’ve recently merged almost all of the pending work and deployed it on darcs hub.

You can always see the recently landed changes here, but let me describe the latest features a little more:

File history - when you browse a file, there’s a new “file changes” button which shows just the changes affecting that file.

File annotate - there’s also a new “annotate” button, providing the standard view showing which commit last touched each line of the file. (also known as the blame/praise feature). It needs some CSS polish but I’m glad that the basic side-by-side layout is there.

More reliable highlighting while editing - the file editor was failing to highlight many common programming languages - this should be working better now. (Note highlighting while viewing and highlighting while editing are independent and probably use different colour schemes, this is a known open wishlist item.)

Repository compare - when viewing a repo’s branches, there’s a new “compare” button which lets you compare (and merge from) any two public repos on darcs hub, showing the unique patches on each side.

Cosmetic fixes - various minor layout and rendering issues were fixed. One point of discussion was whether to use the two-sided layout on the repo branches page as well. Since there wasn’t time to make that really usable I vetoed it in favour of the less confusing one-sided layout. I think showing both sides works well on the compare page though.

Patch bundle support - the last big feature of the GSOC was patch bundles. This is an alternative to the fork repo/request merge workflow, intended to be more lightweight and easy for casual contributors. There are two parts. First, darcs hub issue trackers can now store darcs patch bundle files (one per issue I think). This means patches can be uploaded to an issue, much like the current Darcs issue/patch tracker. But you can also browse and merge patches directly from a bundle, just as you can from another repo.

The second part (not yet deployed) is support for a previously unused feature built in to the darcs send command, which can post patches directly to a url instead of emailing them. The idea (championed by Aditya and Ganesh) is to make it very easy for someone to darcs send patches upstream to the project’s issue tracker, without having to fork a repo, or even create an account on darcs hub. As you can imagine, some safeguards are important to avoid becoming a spam vector or long-term maintenance headache, but the required change(s) are small and I hope we’ll have this piece working soon. It should be interesting to have both workflows available and see which works where.

I won’t recap the older new features, except to say that pack support is in need of more testing. If you ever find darcs get to be slow, perhaps you’d like to help test and troubleshoot packs, since they can potentially make this much faster. Also there are a number of low-hanging UI improvements we can make, and more (relatively easy) bugs keep landing in the darcs hub/darcsden issue tracker. It’s a great time to hack on darcs hub/darcsden and every day make it a little more fun and efficient to work with.

I really appreciate Aditya’s work, and that of his mentor, <NAME>. We did a lot of code review which was not always easy across a large time zone gap, but I think the results were good. Congratulations Aditya on completing the GSOC and delivering many useful features, which we can put to good use immediately. Thanks!

## August 09, 2013

### <NAME>

#### darcs hub, hledger, game dev

August 09, 2013 10:01 AM UTC

Hello blog. Since last time I’ve been doing plenty of stuff, but not telling you about it. Let’s do a bullet list and move on..

darcsden/darcs hub

hledger

• expanded the docs for conditional blocks (if statement) in CSV rules
• added an include directive to allow sharing of common CSV rules

FunGEn & game dev

A sudden burst of activity here.

• schmoozed in #haskell-game, got caught up on haskell game development, updated the Games wiki page a bit
• updated and published my template for SDL projects on OSX: hssdl-osx-template
• continued some FunGEn updates I’ve been sitting for a year and did a release - see next post.

## July 24, 2013

### <NAME>

#### darcs hub repo stats, hledger balance sheet

July 24, 2013 02:50 AM UTC

Recent activity:

I fixed another clumsy query on darcs hub, making the all repos page faster. Experimented with user and repo counts on the front page. I like it, but haven’t deployed to production yet. It costs about a quarter of a second in page load time (one 50ms couch query to fetch all repos, plus my probably-suboptimal filtering and sorting).

I’ve finally learned how many of those names on the front page have (public) repos behind them (144 out of 319), and how many private repos there are (125, higher than expected!).

Thinking about what is really most useful to have on the front page. Keep listing everything ? Just top 5 in various categories ? Ideas welcome.

Did a bunch of bookkeeping today, which inspired my first hledger commit in a while. I found the balancesheet command (abbreviation: bs) highly useful for a quick snapshot of assets and liabilities to various depths (add –depth N). The Equity section was just a distraction though, and I think it will be to most hledger users for the time being, so I removed it.

## July 23, 2013

### <NAME>

#### hub hacking

July 23, 2013 12:30 AM UTC

More darcs hub activity, including some actual app development (yay):

Cleaned up hub’s docs repo and updated the list of blockers on the roadmap.

Updated/closed a number of issues, including the app-restarting #58, thanks to a fast highlighting-kate fix by <NAME>.

Tested and configured the issue-closing commit posthook in the darcsden trunk repo. Commits pushed/merged there whose message contains the regex (closes #([0-9]+)|resolves #([0-9]+)|fixes #([0-9]+)) will now close the specified issue, with luck.

Consolidated a number of modules to help with code navigation, to be pushed soon.

Improved the redirect destination when deleting or forking repos or creating/commenting/closing issues.

Fixed a silly whitespace issue when viewing a patch, where the author name and date run together. I’m still confused about the specific code that generates this - the code I expect uses tables but firebug shows divs. A mystery for another day..

## July 22, 2013

### <NAME>

#### hub speedups

July 22, 2013 12:30 AM UTC

More darcs hub hacking today.

• Cleaned up some button text & styles

• Started playing around with the front page layout to add a news box. Accidentally deployed it to production briefly. Used make undeploy-web for the first time.

• Extracted more of darcs hub’s front page into a separate (local) module, DarcsDen.Hub, for easier customisation.

• Worked on optimising page load speed, especially the front page:

• instead of rendering the front page content from markdown on each request, do it only when changed. This saved, oh a good 50ms! But I now have the beginnings of a timing utility.

• load the large codemirror js/css files only on the add/edit file pages

• set a 7-day Expires header on static images. This took about an hour. Here’s the code (based on Yesod’s), it might fit well in Snap.

• combine the remaining js/css into one js and one css. This is not committed, I just did it by hand. Try less later (only if it’s really simple).

YSlow now gives us an A grade (score 95), and it feels pretty quick.

## July 21, 2013

### <NAME>

#### darcsden 1.1, darcs hub news

July 21, 2013 03:00 PM UTC

I’ve been hacking (mostly on darcsden/hub) but not blogging recently. Must get back to the old 45-15 minute routine.

• banged on hakyll for a while and set up tag feeds on this blog; joined Planet Darcs

• did code review, testing, deployment of BSRK Aditya’s GSOC enhancements

• spent about 8 hours clarifying darcsden history and writing release notes/announcement. Seriously ? Apparently yes.

• moved the darcs hub FAQ back to the front page, cleaned it up and added some javascript magic.

• fixed the slow user list on the front page - it was doing a query for each user. My effective page load time went from ~2 to 1s. Reducing the number of scripts will be a good next step.

• released darcsden 1.1 and the first darcs hub news update. Yay!

This packages up what we have been using at hub.darcs.net so that you can run it locally. It’s the first darcsden release installable from hackage, and the first with the UI updates from darcs hub. For now, it still requires CouchDB and Redis to run.

More importantly, this is about communicating the changes and current status of darcs hub, and doing a bit of marketing. Darcs hub hacking is fun, come and help! I include the announcement below.

# darcsden 1.1 released

darcsden 1.1 is now available on hackage! This is the updated version of darcsden which runs hub.darcs.net, so these changes are also relevant to that site’s users. (More darcs hub news below.)

darcsden is a web application for browsing and managing darcs repositories, issues, and users, plus a basic SSH server which lets users push changes without a system login. It is released under the BSD license. You can use it:

• to browse and manage your local darcs repos with a more comfortable UI
• to make your repos browsable online, optionally with issue tracking
• to run a multi-user darcs hosting site, like hub.darcs.net

http://hub.darcs.net/simon/darcsden - source
http://hub.darcs.net/simon/darcsden/issues - bug tracker

## Release notes for 1.1

Fixed:

• 21: anchors on line numbers exist but line numbers not clickable
• 28: forking then deleting a private repo makes repos unviewable
• 29: darcs get to an invalid ssh repo url hangs
• 46: if user kills a push, the lock file is not removed, preventing subsequent pushes

New:

• the signup page security question is case-insensitive (“darcs”)
• login redirects to the “my repos” page
• a more responsive layout, with content first, buttons at top/right
• more context sensitivity in buttons & links
• better next/previous page controls
• better support for microsoft windows, runs as a service
• builds with GHC 7.6 and latest libraries
• easier developer builds

Brand new, from the Enhancing Darcsden GSOC (some WIP):

• you can edit files through the web
• you can “pack” your repositories, allowing faster darcs get

Detailed change log: http://hub.darcs.net/simon/darcsden/CHANGES.md

## How to help

darcsden is a small, clean codebase that is fun to hack on. Discussion takes place on the #darcs IRC channel, and useful changes will quickly be deployed at hub.darcs.net, providing a tight dogfooding/feedback loop. Here’s how to contribute a patch there:

1. register at hub.darcs.net
3. fork your own branch: http://hub.darcs.net/simon/darcsden , fork
4. copy to your machine: darcs get http://hub.darcs.net/yourname/darcsden
5. make changes, darcs record
6. push to hub: darcs push <EMAIL>:darcsden --set-default
7. your change will appear at http://hub.darcs.net/simon/darcsden/patches
8. discuss on #darcs, or ping me (sm, <EMAIL>) to merge it

## Credits

<NAME> created darcsden. <NAME> led this release, which includes contributions from <NAME>, <NAME>, <NAME>, and BSRK Aditya (sponsored by Google’s Summer of Code). And last time I forgot to mention two 1.0 contributors: <NAME> and <NAME>.

darcsden depends on Darcs, Snap, GHC, and other fine projects from the Haskell ecosystem, as well as Twitter Bootstrap, JQuery, and many more.

# darcs hub news 2013/07

http://hub.darcs.net , aka darcs hub, is the darcs repository hosting site I operate. It’s like a mini github, but using darcs. You can:

• browse users, repos, files and changes
• publish darcs repos publicly or privately
• get, push and pull repos over ssh
• fork repos, then view and merge upstream and downstream changes
• track issues

The site was announced on 2012/9/15 (http://thread.gmane.org/gmane.comp.version-control.darcs.user/26556). Since then:

• The site has been deploying new darcsden work promptly; it includes all the 1.1 release improvements described above.

• The server’s ram has doubled from 1G to 2G (thanks Linode). This means app restarts due to excessive memory use are less frequent.

• The front page’s user list had become slow and has been optimised, halving the page load time.

• BSRK Aditya is doing his Google Summer of Code project on enhancing darcsden and darcs hub (mentored by darcs developer <NAME>). Find out more at http://darcs.net/GSoC/2013-Darcsden .

• The site is being used, with many small projects and a few well-known larger ones. Quick stats as of 2013/07/19:

user accounts                       317
repos                               579
disk usage                            2.5G
uptime last 30 days                  99.48%
average response time last 30 days    1.6s
• The site remains free to use, including private repos. Eventually, some kind of funding will be needed to keep it self-sustaining, and could also enable faster development. Donate button ? Gittip ? Charge for private repos ? Let’s discuss.

Please try it out, report problems, and contribute patches to make it better.


text:
# Adderall Brain Enhancement|Nootropics How Do They Work

References are publications that support the biological activity of the product.
of the Day Nootropics alter the concentration of existing neurotransmitters, meaning they can enhance the activity of mood-boosting neurochemicals in your brain, such as dopamine, acetylcholine (the learning neurotransmitter), serotonin, GABA, glutamate, adrenaline, and epinephrine.
Q&A July 22, 2012 # Fit based upon off diagonal values = 0.98 //www.ncbi.nlm.nih.gov/pubmed/15148255
<NAME> On Tour Creatine 101 — What Is It and What Does It Do? Address The Nootropic Revolution Random article
MESSAGES Piracetam (and Leviracetam) have been found to antagonize an inhibition of glucose uptake into erythrocytes induced by hypnotic drugs (including Melatonin)[15] which is likely related to membrane fluidity.[16][15] A possible connection between membrane fluidity and glucose consumption exists, although plausible mechanisms also exist for glucose consumption being enhanced downstream of modulating ion currents and action potentials.[3]
I was wondering I have just started taking mind lab pro; which I have read a great deal about along with great reviews. I take ciprilex antidepressents for many years. I still feel very flat sometimes.. I eat healthy and walk a lot. im 39 yrs old and really want to have back my tiger eyes back! you that feeling when you want jump out of bed in a morning! what could you recommend? mabe iodine?
A big part is your own lifestyle. I really doubt that a person with healthy life patterns runs into a catastrophe when taking Racetams. you just cant live a sloppy life and expect that Piracetam turns everything around. It also isnt that you dont have any influence what the Racetam does in your body. Its a big difference if you do it the lazy way: Waking up in the morning taking your teaspoon of Racetam and hope that everything will be good and then watching TV or anything like that. If you do meditations, excersise, affirmations, if you have a goal why you take Racetam, then you have a healthier approach to nootropics. You have to realize that there is a underlying reason why you feel like you feel.
Your personal work environment plays a large role in your ability to concentrate. The more comfortable and welcoming your environment is, the easier it will likely be for you to stay there and focus.
Kava Consumer Network So I eventually got around to ordering another thing of nicotine gum, Habitrol Nicotine Gum, 4mg MINT flavor COATED gum. 96 pieces per box. Gum should be easier to double-blind myself with than nicotine patches – just buy some mint gum. If 4mg is too much, cut the gum in half or whatever. When it arrived, my hopes were borne out: the gum was rectangular and soft, which made it easy to cut into fourths.
Manifesting The original magnesium l-threonate caused me no apparent problems by the time I finished off the powder and usage correlated with better days, further supporting the hypothesis that magnesium helps it. But l-threonate would be difficult to cap (and hence blind self-experiment) and is ruinously expensive on a per-dose basis. So I looked around for alternatives for the followup; one of the most common compounds suggested was the citrate form because it is reasonably well-absorbed and causes fewer digestive problems, so I could just take that. Magnesium oxide is widely available it looks cheap, but the absorption/bioavailability problem makes it unattractive: at a 3:5 ratio, an estimate of 4% absorption, a ZMA formulation of an impressive-sounding 500mg would be 500 \times \frac{3}{5} \times 0.04 = 12mg or a small fraction of RDAs for male adults like 400mg elemental. (Calcium shouldn’t be a problem since I get 220mg of calcium from my multivitamin and I enjoy dairy products daily.)
Leave a Reply: It should improve cognitive performance under stress (such as electrical shock or oxygen deprivation) Very few adults “are going to have a horrible effect from using these medicines,” <NAME>, a clinical psychiatrist at UCLA, told me. “They’re safe.”
Animals I don’t want to synchronize with the magnesium or lithium experiments, so I’ll use paired blocks of 3 days randomized 50:50, which will help with the reported tolerance of Noopept setting in after a few days and one needing to cycle.
Gujarati Movies Perluxan Capsules | 300mg Softgels | Proprietary Hops Resin Extract (80% Alpha Acids) $19.99 Choose Options Distractions could, of course, come in the form of people, internet, noise, and gadgets. In other words, remove your smartphone, or it will distract you! <NAME> I’m going to continue experimenting with some mild nootropics and in moderate doses but I would highly recommend giving Ashwagandha a try. It’s natural and comes from a root. Olive Leaf Extract Energy nootropics can help with “mental burnout.” NGF may sound intriguing, but the price is a dealbreaker: at suggested doses of 1-100μg (NGF dosing in humans for benefits is, shall we say, not an exact science), and a cost from sketchy suppliers of$1210/100μg/$470/500μg/$750/1000μg/$1000/1000μg/$1030/1000μg/$235/20μg. (Levi-Montalcini was presumably able to divert some of her lab’s production.) A year’s supply then would be comically expensive: at the lowest doses of 1-10μg using the cheapest sellers (for something one is dumping into one’s eyes?), it could cost anywhere up to$10,000.
Lung cancer: advances in management and therapy 21 – 23 May: 1 <NAME>, <NAME>, <NAME>. Anti-hypoxic effect of piracetam and its interaction with prostacyclin. Methods Find Exp Clin Pharmacol. (1984)
The 5 Most Popular Smart Drugs – Which One is Best? Agreed. Have you tried centro without oxi? Quote Dyan Yoga
One way or the other your brain is always going to be thinking about something. It will simply wander away to the most interesting thing if you don’t have control over it. By asking yourself questions you are forcing it to think about the topic at hand. This is the easiest and most effective way to improve concentration.
Authored by <NAME>, 14 Apr 2016 prototypical nootropic; a cyclic derivative of GABA. December 8, 2017 at 11:42 am
Because they are sold as nutritional supplements and natural products that refrain from making health claims, they avoid close government scrutiny.
Piracetam is eliminated via the kidneys and care should thus be taken in cases of renal insufficiency (see section 4.2). binom.test(c(sum(before), sum(after))) Piracetam and platelets
Head First – The Complete Guide to Healing & Optimizing Your Brain with Nootropic Supplements
Here are ten helpful tips to help you get rid of clutter in your home…once and for all! Premium Brain Function Supplement – Memory, Focus, Clarity – Nootropic Booster with DMAE, Bacopa Monnieri, L-Glutamine, Vitamins, Minerals – Arazo Nutrition
Brian 400g (powder only) $39.95$34.96 $29.96$24.96 Review article

# how to improve concentration

If you commonly skip meals because of an uncertain schedule, or if you tend to overeat in stressful situations, you’re making it much harder to concentrate. The body and mind need proper nutrition and regular energy intake to function properly. If you’re “hangry” and thinking about how much you wish you’d eaten lunch, you’re not going to be able to focus on anything until you get a snack.
Nootropics How To Get|Brain Enhancement Supplement Reviews Nootropics How To Get|Brain Enhancement Pills Fda Approved Nootropics How To Get|Brain Enhancement Drinks

Legal | Sitemap
[otp_overlay]

## 10 Replies to “Adderall Brain Enhancement|Nootropics How Do They Work”

1. <NAME> says:

In one study, stacking 100 mg of GABA and 50 mg of luobuma shortened the time it takes to fall asleep by  by 4.3 min and increased non-REM sleep time by 5% [*].
This is the brand name of something called a “mitochondrial energizer.” Your mitochondria are the little powerhouses that animate your cells.
2 – 8 December: 1
Abstract Charcoal Artwork
D

2. <NAME> says:

If you want a stronger antioxidant, go for C60.   It’s the strongest and most long lasting antioxidant I’ve ever tried.
Comment:
Shaving
Red skin rash
Brain Supplements
5 October – 11 October: 0
Rewa
So I had a palpable edge over the random guesser, although the sample size is not fantastic.↩

3. <NAME> says:

<NAME>ules | 300mcg $10.99 Choose Options I took only 800 mg a day for ~5 months. While I had noticeable cognitive enhancement, I also felt a personality change, and I started to act very cruelly to my girlfriend. I had no patience for anybody, and was acting like a dick all the time. I also became painfully self aware and self conscious of this, and developed social anxiety. It degenerated into full blown anxiety/panic disorder complete with severe heart palpitations and tachycardia. A doctor prescribed me an SSRI which aggravated the panic disorder. Thankfully in this time I had an awakening and quit smoking cigarettes. But I am convinced that the piracetam messed me up and in a way caused an anxiety disorder for me. It’s not worth the cognitive boost for me. I’ll stick to coffee and exercise. Voltaire Foundation Dear David, 4. <NAME> says: Recent articles Optineuro 110 mg Submitted August 21, 2015 03:45AM Est: 1 600 USD Lots Road Auctions Contents [hide] The packaging is nice, if a little confusing (it’s not entirely clear what packets are supposed to be taken on the initial days as part of the loading). The pills are swallowable (one takes a set with breakfast and a second set with lunch). I do not seem to have died or gone into untoward states like seizures, and the first day went swimmingly. By Pure Nootropics –$25.99 (\$0.86 / dose)
<NAME>
Said to be synergistic, this has not yet been demonstrated
Drugs

5. <NAME> says:

This is a much tighter upper bound than Southon et al 1994 gave us, and also kind of discouraging: remember, the smaller the effect size, the more data you will need to see it, and data is always expensive. If I were to try to do any experiment, how many pairs would I need if we optimistically assume that d=0.32?
Citations are publications that use Tocris products.
Anxiety
Diarrhoea
Cognitive Enhancers
FOOD

6. <NAME> says:

Forskolin and artichoke extract
Animal studies have shown that Noopept speeds up how quickly the brain forms and retrieves memories by boosting levels of brain-derived neurotrophic factor (BDNF), a compound that promotes the growth of brain cells (42, 43, 44).
The Geek on Neuro Optimizer Review – Powers Short-& Long-Term Brain Health & Memory
A 2001 Cochrane review concluded that there was not enough evidence to support piracetam for dementia or cognitive problems.[4] A 2002 review and 2005 review concluded that piracetam had some positive effects in older patients with these problems.[5][6] In 2008, a working group of the British Academy of Medical Sciences noted that many of the trials of piracetam for dementia were flawed.[7][8]
# 4 chains, each with 1e+06 iterations (first 5e+05 discarded), n.thin = 500
The Best Mattresses for Rejuvenating Sleep
kids on the go Amazon Restaurants

7. <NAME> says:

Ecdysterone
1ml is approx. 700mg.  I must add that when i begain taking piracetam in july, after a brake for about four weeks, i became stimulated and creative, just like i got when i tried it the first time, but eventually it faded away, so i do know what piracetam can bring, but i cant keep the effect, it always disappears.
Bacopa helps:
”<NAME> has accomplished something important in the field of nutrition and self-healing that few authors have been able to do, made even more remarkable by his own experience with traumatic brain injury.”

8. <NAME> says:

As I see you didn’t control for the training effect of dual-n-back. Are your dual-n-back scores generally stable enough that you don’t have a strong training effect anymore?
Pyritinol – similar to vitamin B6; also increases cerebral blood flow.
Also, as you study an assignment, make a list of questions you can bring to class. Listen to the lecture for answers to those questions.
Side effects from piracetam are considered very rare. The entire racetam family of nootropics has been shown to be extremely safe with low toxicity rates. The few reported adverse effects include headache, anxiety, and insomnia. Headache is the most widely reported side effect which can often be remedied by stacking with a choline supplement.
# MR4 0.15 0.25 0.04 1.00 0.32 0.01 -0.05 0.10
Johanna says:
We Ship Worldwide
Mixing a large dose along with a lot of drinking is going to slow motor functions and this could end up putting you in serious physical risk.

9. <NAME> says:

[PHOTO: FLICKR USER CHRIS CLOGG]
in the meaning defined above
QPR Training
In Stock. Sold by CEL Nutrition and Fulfilled by Amazon.
How to Survive a Tsunami
Given this, to build your concentration muscle, you need to stay focused on one activity at a time. Jumping back and forth between activities leads to inefficiency and errors. Your brain can get easily distracted in-between those jumps.
Media Kit
Studies show that it quickly works to improve memory, mental clarity, and sharpness within just a few hours of taking it.

format: plain


text:
# Electroweak Unification and Electroweak scale

+ 1 like - 0 dislike
80 views
1. We said that the EM and weak interactions are unified as Electroweak Unification. However, for usual Grand Unification, it requires that the gauge group G is simple Lie group -- which means the G has no nontrivial normal subgroup other than itself.

However, neither $$U(1) \times SU(2)$$ nor $$U(2)$$ are simple Lie groups. So why do we call Electroweak Unification? They are still two different forces with two different couplings in Weinberg model?

1. There are many energy scales related to Electroweak scale: https://en.wikipedia.org/wiki/Electroweak_scale
• Higgs mass 125GeV.

• the temperature of electroweak symmetry breaking - 159.5±1.5 GeV

• Fermi scale: vacuum expectation value $$v = (G_F \sqrt{2})^{-1/2}-$$ 246 GeV

What are these 3 scales so close to each other around 200 GeV? Are they related in some way or they are totally independent in the parameters of models? e.g. in Electroweak Unification, GUT or other models? For example, the Higgs potential has two parameters, the quadratic and quartic terms, so they seem not need to be so close in 200 GeV scales?

This post imported from StackExchange Physics at 2020-11-30 18:54 (UTC), posted by SE-user <NAME> heart

+ 4 like - 0 dislike
1. I don't know where that "we" came from, but the SM "unification" is partial, more of a Weinberg-angle tilt: It involves EM and WI inextricably linked and mixed. The different masses of W and the Z mirror the two couplings. For vanishing Weinberg angle, there would be no mixing and e=g'. The question then is just a matter of terminology, loose as is often in physics.

2. The SSB scale is the standard textbook Fermi scale, v = 246 GeV. The mass of the Higgs, 125 GeV is conceptually different, and, "in principle" could be very different; as different as the huge range of guesses/"predictions" covered, before the discovery of the Higgs, not to mention Higgsless models. Its value being so close to the Fermi scale is still a "mystery" to the hyper-ambitious.

• The thermal QFT crossover scale (between the symmetric and SSB phases), 159.5±1.5 GeV, utilizes both of the above scales into effectively modeling the thermal theory and checks by lattice simulation that it is in the same order of magnitude, almost certainly not coincidental. D’Onofrio, Rummukainen, & Tranberg (2014). Phys Review Lett 113 (14), 141602. It is the temperature/energy scale below which the universe slips into the SSB phase, ultimately with the above v.
This post imported from StackExchange Physics at 2020-11-30 18:54 (UTC), posted by SE-user <NAME>
answered Jul 17, 2020 by (370 points)
thanks so much for the expertise

This post imported from StackExchange Physics at 2020-11-30 18:54 (UTC), posted by SE-user <NAME> heart
Maybe interesting physics.stackexchange.com/questions/566668/breaking-tumbling-gauge-theory-and-composite-fermions

This post imported from StackExchange Physics at 2020-11-30 18:54 (UTC), posted by SE-user <NAME> heart
that question is evolved to a better one: physics.stackexchange.com/questions/566796/light-composite-fermion-as-a-bound-state-formed-by-su4-gauge-force-attractions

This post imported from StackExchange Physics at 2020-11-30 18:54 (UTC), posted by SE-user <NAME> heart
Can you give a good ref on attempts to answer this question --- "Its value being so close to the Fermi scale is still a "mystery" to the hyper-ambitious." thanks!?

This post imported from StackExchange Physics at 2020-11-30 18:54 (UTC), posted by SE-user <NAME> heart
@annie heart Sorry, I have no good or intro ref. There are literally hundreds of papers. First they predicted the Higgs mass to be light, then heavy, then infinite, then meaningless, and when it turned out to be medium and below WW threshold, they started exclaiming: "but why"??? Getting into the cottage industry might net you something usable...

This post imported from StackExchange Physics at 2020-11-30 18:54 (UTC), posted by SE-user Cosmas Zachos
thanks, accepted - can you shed light on this in more details ----physics.stackexchange.com/q/567976/42982 ?

This post imported from StackExchange Physics at 2020-11-30 18:54 (UTC), posted by SE-user <NAME> heart
Not, really, there are better reviews around than what I'd come up with...

This post imported from StackExchange Physics at 2020-11-30 18:54 (UTC), posted by SE-user Cosmas Zachos
If you can make any comments on this physics.stackexchange.com/q/567976/ still very helpful !! thanks!!

This post imported from StackExchange Physics at 2020-11-30 18:54 (UTC), posted by SE-user <NAME> heart

 Please use answers only to (at least partly) answer questions. To comment, discuss, or ask for clarification, leave a comment instead. To mask links under text, please type your text, highlight it, and click the "link" button. You can then enter your link URL. Please consult the FAQ for as to how to format your post. This is the answer box; if you want to write a comment instead, please use the 'add comment' button. Live preview (may slow down editor)   Preview Your name to display (optional): Email me at this address if my answer is selected or commented on: Privacy: Your email address will only be used for sending these notifications. Anti-spam verification: If you are a human please identify the position of the character covered by the symbol $\varnothing$ in the following word:p$\hbar$ysicsOve$\varnothing$flowThen drag the red bullet below over the corresponding character of our banner. When you drop it there, the bullet changes to green (on slow internet connections after a few seconds). To avoid this verification in future, please log in or register.


text:
Communication
Faster access than browser!

# Binomial distribution

In probability theory and statistics, the binomial distribution with parameters n and p is the discrete probability distribution of the number of successes in a sequence of n independent experiments, each asking a yes–no question, and each with its own boolean-valued outcome: a random variable containing a single bit of information: success/yes/true/one (with probability p) or failure/no/false/zero (with probability q. [1]

76 relations: Abraham de Moivre, Asymptotic distribution, Bayesian inference, Bernoulli distribution, Bernoulli process, Bernoulli trial, Beta distribution, Beta function, Beta-binomial distribution, Binomial coefficient, Binomial sum variance inequality, Binomial test, Binomial theorem, Bit, Blaise Pascal, Boolean-valued function, Central limit theorem, Chernoff bound, Continuity correction, Covariance, Cumulative distribution function, De Moivre–Laplace theorem, Expected value, Experiment (probability theory), Failure, Fair coin, False (logic), Floor and ceiling functions, Hoeffding's inequality, Hypergeometric distribution, Independence (probability theory), Jacob Bernoulli, Kullback–Leibler divergence, Law of total probability, Logistic regression, Marginal distribution, Measure (mathematics), Median, Mode (statistics), Multifractal system, Multinomial distribution, Nat (unit), National Institute of Standards and Technology, Natural number, Negative binomial distribution, Normal distribution, Outcome (probability), Poisson binomial distribution, Poisson distribution, Poisson limit theorem, ... Expand index (26 more) »

## <NAME>

<NAME> (26 May 166727 November 1754) was a French mathematician known for de Moivre's formula, a formula that links complex numbers and trigonometry, and for his work on the normal distribution and probability theory.

## Asymptotic distribution

In mathematics and statistics, an asymptotic distribution is a probability distribution that is in a sense the "limiting" distribution of a sequence of distributions.

## Bayesian inference

Bayesian inference is a method of statistical inference in which Bayes' theorem is used to update the probability for a hypothesis as more evidence or information becomes available.

## Bernoulli distribution

In probability theory and statistics, the Bernoulli distribution, named after Swiss mathematician <NAME>, is the discrete probability distribution of a random variable which takes the value 1 with probability p and the value 0 with probability q.

## Bernoulli process

In probability and statistics, a Bernoulli process is a finite or infinite sequence of binary random variables, so it is a discrete-time stochastic process that takes only two values, canonically 0 and 1.

## Bernoulli trial

In the theory of probability and statistics, a Bernoulli trial (or binomial trial) is a random experiment with exactly two possible outcomes, "success" and "failure", in which the probability of success is the same every time the experiment is conducted.

## Beta distribution

In probability theory and statistics, the beta distribution is a family of continuous probability distributions defined on the interval parametrized by two positive shape parameters, denoted by α and β, that appear as exponents of the random variable and control the shape of the distribution.

## Beta function

In mathematics, the beta function, also called the Euler integral of the first kind, is a special function defined by for.

## Beta-binomial distribution

In probability theory and statistics, the beta-binomial distribution is a family of discrete probability distributions on a finite support of non-negative integers arising when the probability of success in each of a fixed or known number of Bernoulli trials is either unknown or random.

## Binomial coefficient

In mathematics, any of the positive integers that occurs as a coefficient in the binomial theorem is a binomial coefficient.

## Binomial sum variance inequality

The binomial sum variance inequality states that the variance of the sum of binomially distributed random variables will always be less than or equal to the variance of a binomial variable with the same ''n'' and ''p'' parameters.

## Binomial test

In statistics, the binomial test is an exact test of the statistical significance of deviations from a theoretically expected distribution of observations into two categories.

## Binomial theorem

In elementary algebra, the binomial theorem (or binomial expansion) describes the algebraic expansion of powers of a binomial.

## Bit

The bit (a portmanteau of binary digit) is a basic unit of information used in computing and digital communications.

## <NAME>

<NAME> (19 June 1623 – 19 August 1662) was a French mathematician, physicist, inventor, writer and Catholic theologian.

## Boolean-valued function

A Boolean-valued function (sometimes called a predicate or a proposition) is a function of the type f: X → B, where X is an arbitrary set and where B is a Boolean domain, i.e. a generic two-element set, (for example B.

## Central limit theorem

In probability theory, the central limit theorem (CLT) establishes that, in some situations, when independent random variables are added, their properly normalized sum tends toward a normal distribution (informally a "bell curve") even if the original variables themselves are not normally distributed.

## Chernoff bound

In probability theory, the Chernoff bound, named after <NAME> but due to <NAME>, gives exponentially decreasing bounds on tail distributions of sums of independent random variables.

## Continuity correction

In probability theory, a continuity correction is an adjustment that is made when a discrete distribution is approximated by a continuous distribution.

## Covariance

In probability theory and statistics, covariance is a measure of the joint variability of two random variables.

## Cumulative distribution function

In probability theory and statistics, the cumulative distribution function (CDF, also cumulative density function) of a real-valued random variable X, or just distribution function of X, evaluated at x, is the probability that X will take a value less than or equal to x. In the case of a continuous distribution, it gives the area under the probability density function from minus infinity to x. Cumulative distribution functions are also used to specify the distribution of multivariate random variables.

## De Moivre–Laplace theorem

In probability theory, the de Moivre–Laplace theorem, which is a special case of the central limit theorem, states that the normal distribution may be used as an approximation to the binomial distribution under certain conditions.

## Expected value

In probability theory, the expected value of a random variable, intuitively, is the long-run average value of repetitions of the experiment it represents.

## Experiment (probability theory)

In probability theory, an experiment or trial (see below) is any procedure that can be infinitely repeated and has a well-defined set of possible outcomes, known as the sample space.

## Failure

Failure is the state or condition of not meeting a desirable or intended objective, and may be viewed as the opposite of success.

## Fair coin

In probability theory and statistics, a sequence of independent Bernoulli trials with probability 1/2 of success on each trial is metaphorically called a fair coin.

## False (logic)

In logic, false or untrue is the state of possessing negative truth value or a nullary logical connective.

## Floor and ceiling functions

In mathematics and computer science, the floor function is the function that takes as input a real number x and gives as output the greatest integer less than or equal to x, denoted \operatorname(x).

## Hoeffding's inequality

In probability theory, Hoeffding's inequality provides an upper bound on the probability that the sum of bounded independent random variables deviates from its expected value by more than a certain amount.

## Hypergeometric distribution

In probability theory and statistics, the hypergeometric distribution is a discrete probability distribution that describes the probability of k successes (random draws for which the object drawn has a specified feature) in n draws, without replacement, from a finite population of size N that contains exactly K objects with that feature, wherein each draw is either a success or a failure.

## Independence (probability theory)

In probability theory, two events are independent, statistically independent, or stochastically independent if the occurrence of one does not affect the probability of occurrence of the other.

## <NAME>

<NAME> (also known as James or Jacques; – 16 August 1705) was one of the many prominent mathematicians in the Bernoulli family.

## Kullback–Leibler divergence

In mathematical statistics, the Kullback–Leibler divergence (also called relative entropy) is a measure of how one probability distribution diverges from a second, expected probability distribution.

## Law of total probability

In probability theory, the law (or formula) of total probability is a fundamental rule relating marginal probabilities to conditional probabilities.

## Logistic regression

In statistics, the logistic model (or logit model) is a statistical model that is usually taken to apply to a binary dependent variable.

## Marginal distribution

In probability theory and statistics, the marginal distribution of a subset of a collection of random variables is the probability distribution of the variables contained in the subset.

## Measure (mathematics)

In mathematical analysis, a measure on a set is a systematic way to assign a number to each suitable subset of that set, intuitively interpreted as its size.

## Median

The median is the value separating the higher half of a data sample, a population, or a probability distribution, from the lower half.

## Mode (statistics)

The mode of a set of data values is the value that appears most often.

## Multifractal system

A multifractal system is a generalization of a fractal system in which a single exponent (the fractal dimension) is not enough to describe its dynamics; instead, a continuous spectrum of exponents (the so-called singularity spectrum) is needed.

## Multinomial distribution

In probability theory, the multinomial distribution is a generalization of the binomial distribution.

## Nat (unit)

The natural unit of information (symbol: nat), sometimes also nit or nepit, is a unit of information or entropy, based on natural logarithms and powers of ''e'', rather than the powers of 2 and base 2 logarithms, which define the bit.

## National Institute of Standards and Technology

The National Institute of Standards and Technology (NIST) is one of the oldest physical science laboratories in the United States.

## Natural number

In mathematics, the natural numbers are those used for counting (as in "there are six coins on the table") and ordering (as in "this is the third largest city in the country").

## Negative binomial distribution

In probability theory and statistics, the negative binomial distribution is a discrete probability distribution of the number of successes in a sequence of independent and identically distributed Bernoulli trials before a specified (non-random) number of failures (denoted r) occurs.

## Normal distribution

In probability theory, the normal (or Gaussian or Gauss or Laplace–Gauss) distribution is a very common continuous probability distribution.

## Outcome (probability)

In probability theory, an outcome is a possible result of an experiment.

## Poisson binomial distribution

In probability theory and statistics, the Poisson binomial distribution is the discrete probability distribution of a sum of independent Bernoulli trials that are not necessarily identically distributed.

## Poisson distribution

In probability theory and statistics, the Poisson distribution (in English often rendered), named after French mathematician <NAME>, is a discrete probability distribution that expresses the probability of a given number of events occurring in a fixed interval of time or space if these events occur with a known constant rate and independently of the time since the last event.

## Poisson limit theorem

In probability theory, the law of rare events or Poisson limit theorem states that the Poisson distribution may be used as an approximation to the binomial distribution, under certain conditions.

## Prior probability

In Bayesian statistical inference, a prior probability distribution, often simply called the prior, of an uncertain quantity is the probability distribution that would express one's beliefs about this quantity before some evidence is taken into account.

## Probability

Probability is the measure of the likelihood that an event will occur.

## Probability distribution

In probability theory and statistics, a probability distribution is a mathematical function that provides the probabilities of occurrence of different possible outcomes in an experiment.

## Probability mass function

In probability and statistics, a probability mass function (pmf) is a function that gives the probability that a discrete random variable is exactly equal to some value.

## Probability theory

Probability theory is the branch of mathematics concerned with probability.

## Probit

In probability theory and statistics, the probit function is the quantile function associated with the standard normal distribution, which is commonly denoted as N(0,1).

## Pseudorandom number generator

A pseudorandom number generator (PRNG), also known as a deterministic random bit generator (DRBG), is an algorithm for generating a sequence of numbers whose properties approximate the properties of sequences of random numbers.

## Quantile

In statistics and probability quantiles are cut points dividing the range of a probability distribution into contiguous intervals with equal probabilities, or dividing the observations in a sample in the same way.

## Random number generation

Random number generation is the generation of a sequence of numbers or symbols that cannot be reasonably predicted better than by a random chance, usually through a hardware random-number generator (RNG).

## Random variable

In probability and statistics, a random variable, random quantity, aleatory variable, or stochastic variable is a variable whose possible values are outcomes of a random phenomenon.

## Rounding

Rounding a numerical value means replacing it by another value that is approximately equal but has a shorter, simpler, or more explicit representation; for example, replacing \$ with \$, or the fraction 312/937 with 1/3, or the expression with.

## Rule of thumb

The English phrase rule of thumb refers to a principle with broad application that is not intended to be strictly accurate or reliable for every situation.

## SEMATECH

SEMATECH (from Semiconductor Manufacturing Technology) is a not-for-profit consortium that performs research and development to advance chip manufacturing.

## Shannon (unit)

The shannon (symbol: Sh), more commonly known as the bit, is a unit of information and of entropy defined by IEC 80000-13.

## Statistical hypothesis testing

A statistical hypothesis, sometimes called confirmatory data analysis, is a hypothesis that is testable on the basis of observing a process that is modeled via a set of random variables.

## Statistical mechanics

Statistical mechanics is one of the pillars of modern physics.

## Statistical significance

In statistical hypothesis testing, a result has statistical significance when it is very unlikely to have occurred given the null hypothesis.

## Statistics

Statistics is a branch of mathematics dealing with the collection, analysis, interpretation, presentation, and organization of data.

## The Doctrine of Chances

The Doctrine of Chances was the first textbook on probability theory, written by 18th-century French mathematician <NAME> and first published in 1718.

## The Mathematical Gazette

The Mathematical Gazette is an academic journal of mathematics education, published three times yearly, that publishes "articles about the teaching and learning of mathematics with a focus on the 15–20 age range and expositions of attractive areas of mathematics." It was established in 1894 by <NAME> as the successor to the Reports of the Association for the Improvement of Geometrical Teaching.

## Truth

Truth is most often used to mean being in accord with fact or reality, or fidelity to an original or standard.

## Variance

In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its mean.

## Yes and no

Yes and no, or word pairs with a similar usage, are expressions of the affirmative and the negative, respectively, in several languages including English.

## Yes–no question

In linguistics, a yes–no question, formally known as a polar question or a general question, is a question whose expected answer is either "yes" or "no".

## 0

0 (zero) is both a number and the numerical digit used to represent that number in numerals.

## 1

1 (one, also called unit, unity, and (multiplicative) identity) is a number, numeral, and glyph.

## References

Hey! We are on Facebook now! »


text:
## #498 SVDC in GDL 0.9.2 differs from IDL implementation

closed-wont-fix
nobody
None
2
2012-12-05
2012-11-12
ursus
No

Using the example data given at http://idlastro.gsfc.nasa.gov/idl_html_help/SVDC.html, the GDL and IDL implemtations appeart to deliver a different output for the same input:

<code>

; Define the array A:
A = [[1.0, 2.0, -1.0, 2.5], $[1.5, 3.3, -0.5, 2.0],$
[3.1, 0.7, 2.2, 0.0], $[0.0, 0.3, -2.0, 5.3],$
[2.1, 1.0, 4.3, 2.2], \$
[0.0, 5.5, 3.8, 0.2]]

; Compute the Singular Value Decomposition:
SVDC, A, W, U, V

; Print the singular values:
PRINT, W

; IDL prints:
; 8.81973 2.65502 4.30598 6.84484

</code>

However, GDL prints:
8.81973 6.84484 4.30598 2.65502

Note that the second and forth values are interchanged.

## Discussion

• ursus - 2012-11-12

SVDC application example taken from IDL documentation

• <NAME>. - 2012-11-12

OK, what is really the problem ?

What seems to be important for me is that the final check is OK, isn't it ?

(nevertheless we welcome suggestions !)

The GDL provided the outputs ordered following modulus:
http://www.gnu.org/software/gsl/manual/html_node/Singular-Value-Decomposition.html
"The singular values \sigma_i = S_{ii} are all non-negative and are generally chosen to form a non-increasing sequence \sigma_1 >= \sigma_2 >= ... >= \sigma_N >= 0. "

• <NAME>. - 2012-11-12
• priority: 5 --> 2

• <NAME> - 2012-12-05
• status: open --> closed-wont-fix

• <NAME> - 2012-12-05

To resemble the exact IDL behavior here would be a lot of effort. And the ordered result is usually prefered anyway (e. g. https://groups.google.com/forum/?fromgroups=#!topic/comp.lang.idl-pvwave/JwmLRGcsNwM\). We gain for maximum IDL compatibility, but I think this is not a game breaker as IDL does not seem to have any order in the results. So no sensible code will rely on a specific order and hence run fine on GDL as well.