Are there any Clojure DSLs?

Like any Lisp dialect, Clojure draws a very fuzzy line between API and DSL and therefore the term doesn’t hold the same mystique that it does in other languages. Lisp programmers tend to write their programs as layers of DSLs, each layer serving those above it. Having said that, here are a few that you … Read more

What does “DSL” mean in gradle?

Simply, it stands for ‘Domain Specific Language’. IMO, in gradle context, DSL gives you a gradle specific way to form your build scripts. More precisely, it’s a plugin-based build system that defines a way of setting up your build script using (mainly) building blocks defined in various plugins. For example, gradle scripts usually relies on … Read more

How to parse text for a DSL at compile time?

Disclaimer: I know nothing about metaparse, and very little about proto. The following code is my attempt (mostly via trial and error) to modify this example to do something similar to what you want. The code can be easily divided in several parts: 1. The grammar 1.1 Token definitions typedef token < lit_c < ‘a’ … Read more

When would I want to use a Free Monad + Interpreter pattern?

As mentioned in the comments, it is frequently desirable to have some abstraction between code and database implementation. You can get much of the same abstraction as a free monad by defining a class for your DB Monad (I’ve taken a couple liberties here): class (Monad m) => MonadImageDB m where indexImage :: (ImageId, UTCTime) … Read more

Mini-languages in Python

Pyparsing is handy for writing “little languages”. I gave a presentation at PyCon’06 on writing a simple adventure game engine, in which the language being parsed and interpreted was the game command set (“inventory”, “take sword”, “drop book”, etc.). (Source code here.) You can also find links to other pyparsing articles at the pyparsing wiki.

What are the main differences between Jetbrains’ MPS and Eclipse Xtext?

Xtext is a traditional parser-based approach that works with ordinary textual files. Those can be mailed, stored and compared with any version control system and even modified outside the editor using your favorite command line tool. It tightly integrates into Eclipse EMF and works pretty well with a whole bunch of tools you can find … Read more

Android Studio Gradle DSL method not found: ‘android()’ — Error(17,0)

I went ahead and downloaded the project from the link you provided: http://javapapers.com/android/android-chat-bubble/ Since this is an old tutorial, you simply need to upgrade the software, gradle, the android build tools and plugin. Make sure you have the latest Gradle and Android Studio: https://www.gradle.org/ http://tools.android.com/tech-docs/new-build-system/version-compatibility build.gradle: buildscript { repositories { jcenter() } dependencies { classpath … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)