User loginNavigation |
LtU ForumF3: New statically typed scripting language for java
Chris Oliver has been working on F3 ("form follows function"), a new scripting language for the java platform. Here is a detailed description of F3's features.
It is already in heavy development but not yet released, and there are plugins for both Netbeans and Eclipse. Some of its functionality and the examples Chris has shared indicate it could be an alternative to Flash and processing. Summary of some of its features:
Have I Missed Something ?Hi, I have been learning Lisp (SBCL 1.0.1 for intel Mac) for a couple of months as time permits. I have installed and tweaked cl-opengl nnd I am now starting a 'project' as a learning experience, a simple Lisp editor using OpenGL. I have a package for it and all is well on the general code creating front. However, in the course of my fiddlings, I have created a structure called 'editor-env': (defstruct editor-env buf ; buffer for the loaded file top ; the top-edge [y] coordinate of the window left ; the left-edge [x] coordinate of the window row ; cursor row value col ; cursor column value row-max ; maximum height of full columns plus one col-max ; maximum width of full columns plus one csr-char ; character for the cursor position paper ; background color ink ; text foreground color font font-dx font-dy ; font face and cell size ) As my code is growing, I am finding that I am typing things like this:
(defun rowcol->screen (row col)
(let (x y)
(setq x (+ (editor-env-left *env*) (* col (editor-env-font-dx *env*))))
(setq y (+ (editor-env-top *env*) (* row (editor-env-font-dy *env*))))
(return-from rowcol->screen (values x y))))
(Any suggested style / Lisp idiomatic improvements always welcome.) I mean of course the (editor-env-FFFF *env*) idiom for setf/getf usage, over and over and over again. Dare I say that I almost miss the ability of the Java/C++ '.' operator (or -> etc). I have used Smalltalk for eight years and that even seems better than the above! So, my question is this...have I missed something fundamental in the way that I could be acessing fields in my structure. I know that I could declare a macro but
If it is a case of (1) using macros then I guess I am still climbing the learning curve. After 21 years in software, you still have to climb. Daily.... otherwise you slide back down. What I really want to know is, how does everybody else do it / deal with a high volume of field access. Is it with multiple-value-bind type things, is there a PASCAL 'with' or something that I have yet to find. The HyperSpec is truly huge and I think that the Hitch-Hikers Guide pales in comparison. Many thanks, Extracting Queries by Static Analysis of Transparent PersistenceBen Weidermann and William Cook of UT Austin have put together a paper on translating procedural code into SQL. From the abstract: "Transparent persistence promises to integrate programming languages You can find the paper here. By thgibbs at 2007-01-17 22:27 | LtU Forum | login or register to post comments | other blogs | 5849 reads
Great Expectations: Java Virtual Machinehi everybody, did you notice that... Java is now GPL! [tra la la la] but... I am not sure what it means for Java to be distributed under GPL. I reckon the first thing is, it can be distributed with Linux distros right away. was that impossible before? the second question, I hope, is more important. can there be forks of the Java legacy now? more specifically, *ahem* if now, can we implement a VM that satisfies the JVM specification but allows more? if not, consider the question hypothetical. so that, Java will run on the VM, but [a narrow example] there will be other bytecode operations... you know, things like JSR 292... invokedynamic, hotswapping... what would be, in your opinion, the most significant change you want to see in the current JVM? [don't mind me, I'm a newbie, I'll just follow the discussion. but even though it is not a language topic, some things, like the closure proposal, I suppose, are relevant.] Will Rubinius be an Acceptable Lisprubinius is a new, experimental VM for Ruby in (mostly) Ruby, based on the Smalltalk-80 blue book. Recently, the developers talked about building a lisp-dialect interpreter on top of the VM, to help shake out bugs and to provide an alternative syntax for write software on (or in) it. By pate at 2007-01-16 18:28 | LtU Forum | login or register to post comments | other blogs | 5924 reads
Help with a little geometric hackery...Hey LtUers, i discovered a cool way to visualize terms in reflective calculi. At (http://biosimilarity.blogspot.com/) i posted the core calculation. (Apologies for the layout... i don't know why the use of the table tags are causing so much spacing.) i'll recapitulate them here. i'm wondering if someone familiar with the gfx libs of OCaml or F# or Haskell would be interested in helping me implement the algorithm. It's dirt simple, but i'm pretty rusty on my basic geometry, anymore, and really don't know the gfx libs of these languages. Write me at lgreg.meredith@biosimilarity.com if interested. Best wishes, --greg Last night i discovered a geometric interpretation of the reflective versions of the λ- and π-calculi. It's 'simplicial' in nature. For example, take the reflective version of the asynchronous π-calculus.
Assign a dimension to each term constructor. Thus, we have
or 6 dimensions. We define a recursive function, G[ - ]: L(P) → R6, assigning to each term a shape in 6 dimensions. After doing some calculations, i'm pretty sure that you want to do scaling and offsets, but i've screwed up the accumulated scaling twice; so, i'm eliminating it and just giving the algorithmic scheme to which you can add your flavor or scaling and offset.
i believe that this will yield interesting visualizations of the terms of this calculus if we assign 3 dims to x,y,z and 3 dims to pitch, roll and yaw. The dynamics of execution will yield animations. Intellisense for dynamic languagesI've recently been toying with various approaches for supporting some level of intellisense on a dynamically typed language, specifically Lua (a functional scripting language with lexical scoping). I'd like to bounce some ideas around the community and hear some opinions. I should pretext this by stating that I'm not really a "languages guy." I have a CS degree with the standard compilers course but no advanced experience...which is probably why I was naive enough to undertake this in the first place :P But I have a significant amount working. Since intellisense information is based on type information, there are inherent difficulties in implementing this for dynamic languages. The problem I'm most interested in is the following. Let's say we have a name n in the scope s which is assigned different types within a conditional statement. For example, assume N and M are valid variables with different types below. function s() if x then n = N else n = M end ... We want to be able to resolve the type of n to provide intellisense information for it after the assignment. In order to do so, it seems we must first resolve x. However, this may not be possible outside of runtime (it could be a runtime lib call for instance). A similar problem occurs when a function has multiple return statements. The solution I'm currently considering is to present all possibilities to the user. For instance, in the example above we know n is either type of N or type of M. In an environment like Visual Studio or Eclipse the intellisense drop down could display both possibilities with a special icon or text that indicates the ambiguity. In some situations, it may be obvious to the author what the correct option is for a given case. In a nutshell, if the parser can't figure it out statically then we ask the author to disambiguate and treat the name as the disambiguated type from that point forward. At least until it's made ambiguous again by a similar sort of assignment. I can see a somewhat controversial aspect of this being that it can make you think about types while coding in a dynamically typed language. Also, since it's implied that the parser must keep track of every assignment, scalability is a concern. Comments? Alternatives? Will this be useful? Cheers, Finding Landin's "The Mechanical Evaluation of Expressions"I've been continually surprised by both the amount and the quality of comp sci literature that can be obtained from the web. Other than text books, there have been only a few occasions when I've been unable to locate an article. However one such exception has been Landin's "The Mechancial Evaluation of Expressions". At this point it feels that every other article I read cites Landin's paper. I have all of his other major papers, but TMEE is the one that is mentioned as the most central. I've tried and failed numerous times. Most inexplicably the Oxford Journal website appears to have no notion that this paper exists. Can anyone help me. On Presenting the Semantics of Cat FormallyFirst I want to say that I owe a debt of gratitude to the LtU community for the generous help I've had in developing the type system for Cat. Two threads last month were particularly helpful for me: http://lambda-the-ultimate.org/node/1879 and http://lambda-the-ultimate.org/node/1899. So thank you very much to everyone who contributed to these threads (and previous ones as well). I have been working hard on writing an article to present the Cat language formally, but I still lack confidence in my approach to presenting the type system. I felt that it would be useful in a paper which presents the semantics of Cat to demonstrate an implementation of the typed SK calculus. One burning question I have is whether such an endeavour would add value to the paper? Below is a synopsis of how I am planning on presenting the type system and SK calculus in the paper. For the purposes of this post I only show the type derivation of the K combinator, since the S combinator is much longer. Types of Common OperationsThe r stands for the row variable (rho or ρ).
pop : (r 'a -> r)
dup : (r 'a -> r 'a 'a)
swap : (r 'a 'b -> r 'b 'a)
dip : (r 'a 'b ('a -> 'c) -> r 'c 'b)
diip : (r 'a 'b 'c ('a -> 'd) -> r 'd 'b 'c) EDIT
eval : (r 'A ('A -> 'B) -> r 'B)
Core Typing Rules
These are attributed to Andreas Rossberg. -------------------------------------------- (EMPTY) T :- empty : (r)->(r) T(x) = forall a1..an A1..Am.t -------------------------------------------- (VAR) T :- x : t[t1/a1]..[tn/an][r1/A1]..[rm/Am] -------------------------------------------- (CONST) T :- c : (r)->(r prim) T :- p : t -------------------------------------------- (QUOTE) T :- [p] : (r)->(r t) T :- p1 : (r1)->(r2) T :- p2 : (r2)->(r3) -------------------------------------------- (COMPOSE) T :- p1 p2 : (r1)->(r3)Supplemental Typing Rules T :- p : (r A)->(r B) ---------------------------------------- (T-EVAL) T :- [p] eval : (r A)->(r B) T :- p : (r A)->(r B) ---------------------------------------- (T-DIP) T :- [p] dip : (r A 'c)->(r B 'c) T :- p : (r A)->(r B) ---------------------------------------- (T-DIIP) T :- [p] diip : (r A 'c 'd)->(r B 'c 'd)Derivation for the K Combinator K is implemented as "[pop] dip eval". The derivation is:
pop : (r0 'a0 -> r0)
0 ---------------------------------------------------- T-DIP
[pop] dip : (r1 'a1 'b1 -> r1 'b1),
eval : (r2 'A2 ('A2 -> 'B2) -> r2 'B2)
1 ---------------------------------------------------- COMPOSE
[pop] dip eval : (r1 'a1 'b1 -> r2 'B2)
, r1 'b1 = r2 'A2 ('A2 -> 'B2)
,'b1 = ('A2 -> 'B2)
, r1 = r2 'A2
2 ---------------------------------------------------- UNIFY
[pop] dip eval : (r2 'A2 'a1 ('A2 -> 'B2) -> r2 'B2)
3 ---------------------------------------------------- SIMPLIFY
[pop] dip eval : (r 'A 'b ('A -> 'C) -> r 'C)
What I am hoping for are suggestions on how I can better present the semantics of Cat in a way which would be appropriate for a "serious" paper, but also would make sense to relative newcomers to type theory. Thanks in advance!Call by push-valueThe Call By Push-Value FAQ
This topic is not unknown on LtU but my search did not turn up any thread focused on the subject. l am looking for some help understanding the concepts. |
Browse archives
Active forum topics |
Recent comments
8 weeks 3 days ago
8 weeks 3 days ago
8 weeks 4 days ago
8 weeks 4 days ago
9 weeks 1 day ago
9 weeks 1 day ago
9 weeks 2 days ago
9 weeks 2 days ago
9 weeks 2 days ago
9 weeks 2 days ago