5 ms·
Potion Lang
- peteretep 7y agoTrying to understand what this represents -- looks like it's an implementation by rurban of that Ruby dude's Potion language?
- peteretep 7y agohttps://groups.google.com/forum/#!topic/potion-lang/TRDuHMxzR9Y https://groups.google.com/forum/#!topic/potion-lang/TRDuHMxz... rurban writes: I plan to use potion, the VM and compiler for a perl fork, codename p2. perl5 and perl6, in spirit of parrot, just 40x faster, and better than the ongoing perl on JVM plans. See https://github.com/perl11/potion/blob/p2/README.p2 https://github.com/perl11/potion/blob/p2/README.p2 So naturally I'm going to enhance potion also. New are libpotion.so, improved make times, seperated config and dist/install targets via config.inc, dist.mak. I didn't like that every make probed and shelled too much. Now it only does when needed. I fixed load readline (the wrong path), and changed the LOADER_PATH to (lib, PREFIX/lib/potion, .) . at first is a security risc. added support native extensions: darwin .dylib vs .bundle. With load .pnb is favored over .pn. I also added libdisasm support for nicer jit debugging, and improved the parser interface for multiple language support. I'll add in the next months dlcall (FFI), exception handling, arbitrary precision math and a lot of libraries to support perl5 and nqp, the perl6 bootstrapper. I'll probably come up with a fast intermediate language to write those libraries, and I'm not sure if it will be potion (the language) or a small fast subset of perl.
- timClicks 7y ago"that Ruby dude" is "_why the lucky stiff" for anyone who learned to program post Rails 1. He's probably the reason I started programming.
- thelazydogsback 7y ago[FWIW, dev work on this was started 7 yrs ago and ended 4 years ago.] I like many features of this language -- although the feature I don't like is traits/mixins (one of the lang's central tenants), which seems like a bad idea in the general case -- it makes implementation inheritance even more abusable, rather than preferring delegation. "hello" print in addition to someObj.ToString() in Java-esque languages are just horrible, IMHO. An arbitrary object should have absolutely no business knowing how to render itself, nor should a string know how to do I/O on itself, as these operations depend on the context of their usage. Rather, for example, if you want to stick with message-sends: console [print "foo"] would delegate the printing of "foo" to the console object. (here the brackets reify the message -- not sure about the syntax in Potion. I can't tell you how many time in my code or in others', a .ToString() was expected to do one thing (pretty-print, for example) when instead it used some default method, such as the base method that prints " <a Foo>" or something. These things even end up in production output.
- dmix 7y ago> I can't tell you how many time in my code or in others', a .ToString() was expected to do one thing (pretty-print, for example) I'd expect this to turn the object into a String.
- thelazydogsback 7y agoSure. What kind of string? For debugging? If so, is a recursive? For output to a log? For output to a widget in a UI? To a string suitable for a report? What encoding? What language?
- earenndil 7y agoWhy not add an expectation, then, for what kind of string it is? You just have to have one. E.G. perl has .perl, which has the constraint that, for any obj, it should be that obj == (EVAL obj.perl). It doesn't matter what that is, as long as you agree on it. Having objects that know how to print themselves isn't intrinsically problematic.
- thelazydogsback 7y agoThat is serialization, which is one purpose for converting to a string. Dynamic languages already tend to be able to print objects in a way that's meaningful -- such as most REPL-based languages that have a reader (or eval) and a printer. As do ML-derived languages the print in constructor format, but they tend not to have readers or eval. Having it called .perl in this case is already a step in the right direction from toString, as you know what its for.
- ludamad 7y agoThat's almost comically underspecified. One big concern that comes to mind, is the string a complete view of the object (and thus suitable for serialization) or not? Or is it more succinct and suitable for a print statement?
- 7y ago
- beefhash 7y agoTheir TLS certificate expired over a year ago. This doesn't exactly seem to inspire my confidence in the project's ongoing development.
- petre 7y agoI think Rieni Urban abandoned working on this project over cperl. https://github.com/perl11/cperl https://github.com/perl11/cperl
- rurban 7y agoNot really abandoned. It's just not the main priority anymore. And perl6 decided to do something else, to go forward with a very shortsided and wrong approach (again). There are two major blocks here, 1) the parser surviving a GC. There was one help from outside, but without real code. It almost got fixed by myself recently. macros depend on this, and improving the compiler and adding a matcher on macros. 2) threads support for the GC. hard problem. would need to switch to boehmgc, as fellow Tiny(Ruby,Python) folks did with this codebase. But they got not much farther. Only wren did. I liked his approach. The TLS cert if unfortunately out of my hands. Someone else is maintaining the domain.