+ 1 -

language design control flow yield coroutines continuations delimited continuations

Yield : Mainstream Delimited Continuations

Roshan P. James Amr Sabry (2011)

Many mainstream languages have operators named yield that share common semantic roots but differ significantly in their details. We present the first known formal study of these mainstream yield operators, unify their many semantic differences, adapt them to to a functional setting, and distill the operational semantics and type theory for a generalized yield operator. The resultant yield, with its delimiter run, turns out to be a delimited control operator of comparable expressive power to shift-reset, with translations from one to the other. The mainstream variants of yield turn out to be one-shot or linearly used restrictions of delimited continuations. These connections may serve as a means of transporting ideas from the rich theory on delimited continuations to mainstream languages which have largely shied away from them. Dually, the restrictions of the various existing yield operations may be treated as shift-reset variants that have found mainstream acceptance and thus worthy of study.

Un commentaire

Lire maintenant ?

+ 1 -

nlp

Using uh and um in spontaneous speaking

Herber H. Clark Jean E. Fox Tree (2002)

The proposal examined here is that speakers use uh and um to announce that they are initiating what they expect to be a minor (uh), or major (um), delay in speaking. Speakers can use these announcements in turn to implicate, for example, that they are searching for a word, are deciding what to say next, want to keep the floor, or want to cede the floor. Evidence for the proposal comes from several large corpora of spontaneous speech. The evidence shows that speakers monitor their speech plans for upcoming delays worthy of comment. When they discover such a delay, they formulate where and how to suspend speaking, which item to produce (uh or um), whether to attach it as a clitic onto the previous word (as in “and-uh”), and whether to prolong it. The argument is that uh and um are conventional English words, and speakers plan for, formulate, and produce them just as they would any word.

Commenter

Lire maintenant ?

+ 1 -

simulation sociology

A simulation of segregation in cities and its application for the analysis of price regulation

Wolfgang Wagner (2004)

Social segregation in cities takes place where different household groups exist and when, according to Schelling, their location choice either minimizes the number of differing households in their neighbourhood or maximizes their own group. In this contribution an evolutionary simulation based on a monocentric city model with externalities among households is used to discuss the spatial segregation patterns of four groups. The resulting complex spatial patterns can be shown as graphic animations. They can be applied as initial situation for the analysis of the effects a price regulation has on segregation. JEL classification: D62, R14, R31, R52 Keywords: simulation, segregation, monocentric city, price regulation

Commenter

Lire maintenant ?

+ 2 -

pixelart image processing

Depixelizing Pixel Art

Johannes Kopf Dani Lischinski (2011)

We describe a novel algorithm for extracting a resolution-independent vector representation from pixel art images, which enables magnifying the results by an arbitrary amount without image degradation. Our algorithm resolves pixel-scale features in the input and converts them into regions with smoothly varying shading that are crisply separated by piecewise-smooth contour curves. In the original image, pixels are represented on a square pixel lattice, where diagonal neighbors are only connected through a single point. This causes thin features to become visually disconnected under magnification by conventional means, and it causes connectedness and separation of diagonal neighbors to be ambiguous. The key to our algorithm is in resolving these ambiguities. This enables us to reshape the pixel cells so that neighboring pixels belonging to the same feature are connected through edges, thereby preserving the feature connectivity under magnification. We reduce pixel aliasing artifacts and improve smoothness by fitting spline curves to contours in the image and optimizing their control points.

Un commentaire

Lire maintenant ?

+ 0 -

dependent types

Do we Need Dependent Types?

Daniel Fridlender Mia Indrika (2001)

Inspired by Functional Unparsing (Danvy 1998), we describe a technique for dening, within the Hindley-Milner type system, some functions which seem to require a language with dependent types. We illustrate this by giving a general denition of zipWith for which the Haskell library provides a family of functions, each member of the family having a dierent type and arity. Our technique consists in introducing ad hoc codings for natural numbers which resemble numerals in λ-calculus.

3 commentaires

Lire maintenant ?