Entries by mentics

Dependent Types in Java

No, you generally can’t do dependent types in Java. However, there are some techniques that one can do to get some of the same benefits. The thing with any nominative type system is you can always just put more stuff in the name. It’s klunky and sometimes absurd, but it can work in many cases. Let’s take […]

Constructive Type Theory is Hard but People Want It

“What every software developer should know”: I’m not going to list them here, but in my own current exploration into the various crevices of computer science, I’m finding it amazing how the software development industry is constantly rethinking of what has been around a long time. The latest experience with this is a post “I […]

Compiling on the Fly with the Eclipse Compiler

There is this question about how to compile code on the fly using the eclipse compiler. A useful link was posted, but it didn’t deal with cascading compilation, which is something I found out the eclipse compiler can support in the comments here. So, I thought it would be useful to get a sample of how to do […]

How to find one in a thousand in under a second

This is my post for an unordered hierarchically categorized list (aka. a tree). See future articles for other important cases. This is the kind of question that HCI people should be asking in my opinion. As far as I know, I have never seen any UI control that comes anywhere close. But I think I […]

Constructor driven development

Again a misnomer, it’s more datatype driven development, but the constructor part is what just clicked in my head linking data types and functions. I had been thinking along the lines of specifying entire applications by types. But what I couldn’t quite link together was… you define these types but where do functions come in? […]

Auto typing Java things in Shen

I want to autotype Java things so integration with Java can all be type checked, too. I can use reflection at compile time to get information about the calls, but doing the appropriate thing with that will be more of a challenge. Let’s look at this expression: (.setVisible (javax.swing.JFrame. “title”:java.lang.String):javax.swing.JFrame true) First, this part: (javax.swing.JFrame. “title”:#String) That […]

Implementing Echo App in Shen

Implementing the echo app described in my previous post poses a few challenges in Shen as it currently is. For example, my intention was that every keystroke would be echoed, but consoles don’t generally provide that level of interaction. So, let’s expand it a little to be a very simple gui application. Echo App -> […]

Convenient “optional” args in functions

Inaccurate title, but… especially when working with persistent data structures, you often want a copy of a structure with one piece of it changed. Instead of creating a new function for each thing, you could create one with the pattern matching. I had a (vector * vector * list symbol) structure with meanings (alias * […]

Visual vs. Linguistic Design and Development

Recently someone shared this talk by Zed Shaw:  It’s Not You, It’s Them: Why Programming Languages Are Hard To Teach Zed references Bret Victor’s post entitled Learnable Programming A brief response to Bret’s post: I find it rather funny that he’s so keen on visuals and yet he’s manipulating visuals with text. In most of the […]