User loginNavigation |
LtU ForumCall for Papers: Symposium on Logical Foundations of Computer ScienceDeerfield Beach, Florida, January 3-6, 2009 The LFCS series provides an outlet for the fast-growing body of work in the logical foundations of computer science, e.g., areas of fundamental theoretical logic related to computer science. The LFCS series began with Logic at Botik, Pereslavl-Zalessky, 1989 and was co-organized by Albert R. Meyer (MIT) and Michael Taitslin (Tver), after which organization passed to Anil Nerode. LFCS Topics. Topics of interest include, but are not limited to: Proceedings will be published in the LNCS series. There will be a post-conference volume of selected works published in the Annals of Pure and Applied Logic. Important Dates: By yegor at 2008-06-18 21:26 | LtU Forum | login or register to post comments | other blogs | 4751 reads
Higher-order type constructor polymorphism vs./and template style specializationI'm wondering if there are language implementations that (elegantly?) combine what Scala (at least) refers to as "higher-order type constructor polymorphism" with the code specialization capabilities of C++ style templates? I don't mean the notion of "specialization" sometimes used to generically describe how instantiating a template List[int] will (likely) generate new code. I mean programmer driven template specialization. That's pretty much the question, so now I'll make a fool of myself trying to come up with an example. class Vector[T](size:int, init:T) extends Sequence[T] So Iterable, say, has methods like map and friends that will now return Vector[U] for some function (T => U). And all the Iterator and Builder machinery comes out nicely typed. Yada yada yada. Now, it would be *really* nice to somehow be able to implement bit vectors with custom code. Making up a silly keyword: specialize class Vector[Bool](.... We don't really want a vector of 32 bit Bool values! We want some custom bitwise code over an array of bytes or unsigned ints or something. We'll also need specialized Iterators[Vector[Bool]] (hopefully inlined) and associated machinery. But in the end we get a usable bit vector class (1) with much better space/speed for Vector[Bool] and (2) we can still write code like this. def somefun(vi:Vector[Int]): Vector[Bool] = vi.map((_ % 2 == 0)); Just a dumb and obvious example. We could also inquire about method (or function) specializations on values yada yada yada. Hence my question - are there language implementations that nicely combine their elegant type systems with the power of template style code specialization? Sorry if this is too implementation oriented a question. Scott SWI-Prolog FFI Problem: Getting Prolog and C to work together on MacOS?Hi, It seems that there are some issues with the foreign function interface specifically on MacOS. The Prolog manual has a very nice example of how to use FFI with C (http://gollem.science.uva.nl/SWI-Prolog/Manual/foreignxmp.html)... which this doesn't work for me on MacOS, but worked fine under Linux (Ubuntu 8.04 Hardy). I don't understand what's wrong with 'strlen' initially: $ gcc -I/opt/local/lib/swipl-5.6.15/include -fpic -c lowercase.c ... and even though we do get an object file in the end, we can't create (and register?) a library at the next step (this seems to be the MacOS-specific problem): $ gcc -shared -o lowercase.so lowercase.o Any suggestions? I couldn't find anything online except http://www.phil.uu.nl/~xges/HOWTO/swipldynlib.html which seems quite old? Should I go for it anyway? Thank you, Algebraic Data Types in JavaScriptIt is generally known that JavaScript supports a functional style of programming. But because it does not have algebraic data types, the functional programming is usually limited to some simple higher order functions applied to Arrays. I have often build small libraries that allow working with some aspects of algebraic data types in JavaScript. This time I thought is was cool enough to write a bit about it: Algebraic Data Types in JavaScript It includes:
I also show how to do the Data Types à la carte style of Wouter Swierstra with this library. Volta Job Opportunities
I have some openings in my team for people interested in programming languages, compilers, Web programming, type systems, and all that good stuff:
Don't hesitate to contact me for more information.
By Erik Meijer at 2008-06-16 20:54 | LtU Forum | login or register to post comments | other blogs | 5787 reads
Liquid TypesDependent typing is very interesting, although perhaps it can be pretty complicated to understand and use and implement? An alterantive, from Rondon, Kawaguchi, Jhala: Liquid Types.
By raould at 2008-06-16 18:56 | LtU Forum | login or register to post comments | other blogs | 5635 reads
Forex trading with functional programmingLet me apologize in advance for my poor English. I'm looking for information about how to program a forex trading system with functional programming (I use scheme). Any idea or link you could give me? Thanks Cat Interpreter in JavaScript with Turtle GraphicsEhud recently lamented the lack of small interpreters for people to play with. I thought I would take this as an invitation share my JavaScript version of Cat that supports turtle graphics: http://cat-language.com/interpreter.html The parsing code will definitely make the angels weep and programmers gnash their teeth. Enjoy! Program Visualization: Flowchart Layout Algorithms?Lots of times asking LTU is more effective than searching the ACM database (ie you guys are awesome!): Does anyone know of papers about flowchart layout algorithms? This could also be called 'automatic flowchart generation'. I've reviewed several commercial packages and it seems there are two approaches: Preemptive concurrency via compiler-inserted checksConsider a language that provides lightweight concurrency primitives, like JoCaml or Erlang, and which uses co-operative threads like GNU Pth for this concurrency. A co-operative thread must explicitly yield to permit other threads to execute. Has there been any research into some sort of inference for compiler-inserted yields? For instance, each co-operative thread has a "time slice" (or a "work slice"), and we would want the thread to yield after the slice has expired. In the limit, we can force each function call to decrement the "remaining slice" until it reaches zero, at which point we yield (I believe Erlang does this, or something similar). This would seem to be quite a heavy penalty though. I was wondering if there was a "smarter" way, that didn't cost a repeated test and branch on every function call. For instance, the compiler could analyze the control flow, and insert checks every X function calls, where X > 1. So is there any other way to build preemptive threading from co-operative threads, other than via timers, or the above technique of a runtime check per call? |
Browse archives
Active forum topics |
Recent comments
8 weeks 1 day ago
8 weeks 1 day ago
8 weeks 2 days ago
8 weeks 2 days ago
8 weeks 6 days ago
8 weeks 6 days ago
9 weeks 9 hours ago
9 weeks 13 hours ago
9 weeks 14 hours ago
9 weeks 14 hours ago