Re: If code is data why do we use text editors?

2014-11-18 Thread Phillip Lord
Thomas Huber th0mas.hu...@googlemail.com writes: Hi Phil, thanks for your reply. The source data structure doesn't have to contain only bare source code. It could contain everything that is in a text file, but just saved in a structured way. To contain everything, then the data model

Re: If code is data why do we use text editors?

2014-11-17 Thread Thomas Huber
Hi Phil, thanks for your reply. The source data structure doesn't have to contain only bare source code. It could contain everything that is in a text file, but just saved in a structured way. The data needs to be compiled to bytecode anyway. I'm not sure if diffing is a huge problem. You can

Re: If code is data why do we use text editors?

2014-11-17 Thread Thomas Huber
Yes that s ounds quite reasonable to me Am Freitag, 14. November 2014 18:01:04 UTC+1 schrieb Jan-Paul Bultmann: Yeah this would be awesome, but sadly representing Clojure code as data is as hard as representing Java. All the reader macros make it a nightmare, and the closest thing you'll

Re: If code is data why do we use text editors?

2014-11-17 Thread janpaulbultmann
To be honest I think that all the whitespace retaining approaches kinda miss the point. The reason code is mannually formatted is only because it consists of characters in a grid aka text. To me manual formatting is a chore, most of the time I rely on paredits or codemirrors auto formatting

Re: If code is data why do we use text editors?

2014-11-17 Thread Fluid Dynamics
On Monday, November 17, 2014 5:20:36 PM UTC-5, Jan-Paul Bultmann wrote: To be honest I think that all the whitespace retaining approaches kinda miss the point. The reason code is mannually formatted is only because it consists of characters in a grid aka text. To me manual formatting is a

Re: If code is data why do we use text editors?

2014-11-17 Thread Raoul Duke
Code is data, and sometimes the best way to format that data for human readability is sufficiently ad-hoc that no autoindent/pprinter could do a fully general good job. +1 there should therefore be a region annotation that tells IDEs to leave it the hell alone when the user invokes reindent

Re: If code is data why do we use text editors?

2014-11-17 Thread janpaulbultmann
Example 1: I'm pretty sure one could create a set of rules with penalty scores, like latex does, for rendering the prettiest, most dense code. (- (some lengthy collection expr here) (map f2) (reduce f1 #{})) But I find this to be the most readable. [[(dec x) y wh

Re: If code is data why do we use text editors?

2014-11-17 Thread Colin Fleming
there should therefore be a region annotation that tells IDEs to leave it the hell alone when the user invokes reindent the whole file type commands :-) FWIW IntelliJ has had this for a while, and I'd be surprised if other systems didn't as well. I haven't gotten around to adding support for

Re: If code is data why do we use text editors?

2014-11-16 Thread Angel Java Lopez
Loosely related, but interesting http://blog.interfacevision.com/design/design-visual-progarmming-languages-snapshots/ Angel Java Lopez @ajlopez On Sun, Nov 16, 2014 at 4:11 AM, Colin Fleming colin.mailingl...@gmail.com wrote: Hi Mike, Actually, I haven't - I probably should spend more

Re: If code is data why do we use text editors?

2014-11-15 Thread Johannes
Perhaps a look at subtext (http://www.subtext-lang.org/demo1.html) could be interesting. Johannes -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are

Re: If code is data why do we use text editors?

2014-11-15 Thread Mike Haney
Colin - I'm just curious if you have any experience with Jetbrains MPS? I was into it pretty heavily before I got into Clojure, and I've thought a lot about how to add support for Clojure to it (would be pretty straightforward, actually), but haven't had the time to pursue it or the conviction

Re: If code is data why do we use text editors?

2014-11-15 Thread Colin Fleming
Hi Mike, Actually, I haven't - I probably should spend more time investigating it, there are bound to be some interesting ideas. If you have thoughts about aspects of it that might be useful, I'd be very interested in hearing about them either on or off list (co...@colinfleming.net). On 16

If code is data why do we use text editors?

2014-11-14 Thread Thomas Huber
Hi, here is an idea that has been in my mind for a while. I wonder what you think about it. In Clojure code is data, right? But when we program we manipulate flat text files, not the data directly. Imagine your source code where a data structure (in memory). And programming is done by

Re: If code is data why do we use text editors?

2014-11-14 Thread Simon Brooke
I wrote a couple of blog-posts on this topic - On Editing, and Clojure http://blog.journeyman.cc/2013/09/on-editing-and-clojure.html, and Editing and clojure revisited: this time, with structure! http://blog.journeyman.cc/2013/09/yesterday-i-blogged-on-editing-clojure.html I also wrote a bit

Re: If code is data why do we use text editors?

2014-11-14 Thread Erlis Vidal
This is an interesting topic, and I think this applies to most of the programming languages not just Clojure. I'm still waiting the day where we finally abandon the idea that the file is the minimal point of change, by this I mean that today we do changes on files when actually what we are

Re: If code is data why do we use text editors?

2014-11-14 Thread atucker
As I understand it, Session https://github.com/kovasb/session and codeq https://github.com/Datomic/codeq are tools that somehow keep your code in a database instead of plain text. On Friday, 14 November 2014 12:42:57 UTC, Thomas Huber wrote: Hi, here is an idea that has been in my mind for a

Re: If code is data why do we use text editors?

2014-11-14 Thread Christopher Small
Are you familiar with LabView? It allows you to create a program graphically. Aside from simple programming in Mathematica during college (simple in the sense that while the math was advanced, the programming was not), that was how I learned to program. It was actually pretty awesome to be

Re: If code is data why do we use text editors?

2014-11-14 Thread Jan-Paul Bultmann
Yeah this would be awesome, but sadly representing Clojure code as data is as hard as representing Java. All the reader macros make it a nightmare, and the closest thing you'll get is tools.analyzer AST nodes. Session is certainly a step in the right direction, and I wish more people would

Re: If code is data why do we use text editors?

2014-11-14 Thread Phillip Lord
I can think of several reasons. First and most important, code is data, but source files are not code. They are source and include many things a lot of which do not obey the syntactic rules of the language. Comments and indentation are the most obvious ones. Second, reason is that not only do

Re: If code is data why do we use text editors?

2014-11-14 Thread Max Kreminski
A little bit ago there was a reddit /r/Clojure http://www.reddit.com/r/Clojure/comments/2kolip/i_made_a_structural_editor_in_clojurescript_and/ thread http://www.reddit.com/r/Clojure/comments/2kolip/i_made_a_structural_editor_in_clojurescript_and/ about structured editors – code editors that

Re: If code is data why do we use text editors?

2014-11-14 Thread Raoul Duke
http://en.wikipedia.org/wiki/Intentional_programming -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post.

Re: If code is data why do we use text editors?

2014-11-14 Thread Daniel Orias
On Friday, November 14, 2014 4:42:57 AM UTC-8, Thomas Huber wrote: Hi, here is an idea that has been in my mind for a while. I wonder what you think about it. In Clojure code is data, right? But when we program we manipulate flat text files, not the data directly. Imagine your source

Re: If code is data why do we use text editors?

2014-11-14 Thread Colin Fleming
This is an interesting topic. Unfortunately I'm quite busy getting ready for the conj, but my talk on Cursive at the conj is actually quite related to this. I think text is actually a pretty good representation for programs - at least, I haven't seen anything more convincing except for very