6 ms·
Potion: A Short Pamphlet
- iamwil 17y ago"Even functions are functions! I invented this concept. Just like Steve Jobs will one day."
- andreyf 17y agoI don't get the joke. Is it a reference to Steve Jobs inventing UI concepts which were developed at Xerox?
- warwick 17y agoI think it's a reference to how Apple routinely claims things as new or revolutionary during their keynotes, even when they've been available from other manufacturers for some time.
- benmathes 17y agoFurthermore, there's lore about the "reality distortion field" around Steve Jobs. People would suggest ideas to him, he'd ridicule the ideas, and then a week later suggest them as his own.
- saturdayplace 17y agoThe output of this guy is simply staggering. I would love to know more about him, and I'm sure he'd hate that. Like Bill Watterson.
- _giu 17y agoyeah, _why is a mistic (and pretty smart) individual. he's also a cool guy. I enjoyed watching the speech he gave at the ART && CODE Symposium: http://www.vimeo.com/5047563 http://www.vimeo.com/5047563 . oh, and thanks to raju for submitting the link; I last checked hackety.org about two weeks ago and it was down then. it's nice to see that hackety.org is up and running again.
- iamwil 17y agoPart of the reason is that he keeps his projects limited in scope and simple. If his github repo is any indication, he only works on one or two things at a given time and is able to complete them (due to limited scope). Because he doesn't take himself seriously, no one is harping on him to say that "we need this or that, because we need it for ENTERPRISE!" So he's able to keep it simple, get it done, move on, and learn something in the process. As for how he supports himself and is able to make the time to code is a mystery to me. http://github.com/why/potion/graphs/punch_card http://github.com/why/potion/graphs/punch_card Looking at his commit patterns, it's throughout the days of the week, even though the bulk of it is at night. But it's reassuring to see that even _why stops for dinner, and the reason why the rest of us aren't as productive is because we're not as consistently hacking away as he is. As for knowing more about him, I'd say you'd probably learn more about him reading his code than digging up things like his real name.
- webology 17y agoI have no idea what why does for a living but apparently not having a day job or at least having a flexible enough schedule that allows one to write code for fun helps. The punch card view is one of the best visualizations I've seen yet.
- jobeirne 17y agoHe never completed Hackety Hack.
- misuba 17y agoThat's "has not yet completed." There've been a couple new versions fairly recently.
- tdavis 17y agoBecause he doesn't take himself seriously, no one is harping... I watched his talk at ART && CODE (http://www.vimeo.com/5047563 http://www.vimeo.com/5047563) and it was full of some awesome jokes at his expense. I think self-deprecation is the best of character traits. I am curious what he does for money, though. My ultimate goal is to have enough in the bank to solely hack on open source stuff for the remainder of my career.
- fiaz 17y agoYeah, him and Zed Shaw. But their personalities seem to be on opposite poles.
- anovaskulk 17y agohow's so?
- teej 17y ago_why is silly and fun, Zed is analytical and blunt.
- deleted 17y ago[deleted]
- deleted 17y ago[deleted]
- knowtheory 17y agoZed's writing can be analytical and blunt. If you've ever seen him give a presentation he's just as ridiculous and entertaining as _why can be.
- blasdel 17y agoWe don't even know his name! That nobody's outed him is a testament to his greatness.
- misuba 17y agoHis first name's Michael. He's not that secretive.
- blasdel 17y agoI think I was happier not knowing :/ It's not secrecy as much as it's mystery
- technoweenie 17y agoEven wikipedia doesn't know!
- henning 17y ago"The Mersenne Twister (MT19937) © 1997-2002, Makoto Matsumoto and Takuji Nishimura" A new language including a high performance, reasonably high quality (suitable for most Monte Carlo simulations) random number generator rather than the crap that you get by default in most languages? Well I never.
- deleted 17y ago[deleted]
- nuclear_eclipse 17y agoEven PHP includes a good Mersenne Twister implementation (mt_rand() [1]) as part of the core library... [1] http://www.php.net/manual/en/function.mt-rand.php http://www.php.net/manual/en/function.mt-rand.php
- blasdel 17y agoBut why wouldn't they just use it to replace rand()?
- nuclear_eclipse 17y agoBecause mt_rand(), even when seeded with the same number, does not generate a predictable sequence (ie, it's a really good MT implementation). For those who do want a predictable RNG based on seed value (regardless of whether you agree with this usage), they can opt to use the libc implementation of rand() and srand().
- crux_ 17y agoWhen you say "predictable", do you mean "repeatable?" Or do you really mean "predictable?" In the latter case, well, if you want predictable numbers you shouldn't be calling a RNG at all. And in the former, it's not good, it's broken, PRNGs are supposed to produce the same sequence, given the same seed....
- heap 17y ago
- trickjarrett 17y agoSome very interesting concepts in here, not sure where it would get used or have an advantage. Is it purely a mental exercise?
- pygy 17y agoOnly partly so. He's exploring various ideas in language and VM desings, which is interresting per se. But one of the goal of the project is to get a fun, fast and dynamic language to run on embedded processors. It would allow one of the goals stated in the Little coder's predicament: having an newbie-friendly environment that produces code runable on game consoles (though you'd have to create suitable libraries too for that to happen...). Maybe I'm reading too much into it, but I think it will be added to Hackety Hack sooner or later (if I remember well, he stated once that more languages would be added. The first lick sample hints to that too).
- shaunxcode 17y agoI think the use of , and or newline to separate statements is a stroke of genius instead of just treating them as optional whitespace. Totally feels like a more concise smalltalk if that makes sense.
- stcredzero 17y agoThe colon-period pairing to indicate a block is just as clever. That way, the colon actually serves a purpose instead of just being syntactic noise as it is in Python. The ability to use tables as arguments also gives you the advantages of keyword arguments in Smalltalk, but does it folded in with a generic mechanism. As a result, the language is bigger than Smalltalk, but it feels just as small.
- msluyter 17y agoMy eyesight isn't great and perhaps it just takes getting used to, but I found periods rather hard to scan visually. Ay first glance I'd prefer something else.
- silentbicycle 17y agoA syntax-aware editor's highlighting or automatic indentation could provide an extra clue, though. It can scan for periods quite easily. Prolog and Erlang (which was initially implemented in Prolog) use periods to end blocks, as well. While it can make rearranging expressions in a block a little annoying ("," vs "." in Prolog, "," and ";" vs "." in Erlang), it's small potatoes compared to the syntactic quirks in, say, C. Also, Lua does the same "table as an argument -> keyword arguments" trick. (He mentions Lua in the list of influences.)
- stcredzero 17y agoSo in reading English, you really don't use the periods. What about period-space-space? Using capitalization for delimiting code -- I'm not sure why I have a negative feeling about that.
- biohacker42 17y agoI hope this was only a brief interruption to an otherwise lush and exotic life. It's _why's work that makes my life more lush. Thanks you lucky stiff!
- jimbokun 17y agoInteresting idea to silo off "s-expressions" into only the data part of the language. He's stealing the idea of having a syntax for tree structures, without going all the way into macro-land. The syntax for whitespace as method invocation and the very sparse block syntax, however, gives a lot of flexibility for DSL contstruction, though. I also like that objects are not just tables, but some thought was give to efficiency. I also see that Potion compiles into machine code, so I wonder to what extent efficiency is driving the design compared to other "dynamic" languages. Is the absence of anything more than integers just a sign of the early stage of development, or does he want an efficient model for floats and bignums and not willing to settle for just any old thing? It would be nice to see another language shooting for that small, fast lower left corner of the graph. http://gmarceau.qc.ca/blog/2009/05/speed-size-and-dependability-of.html http://gmarceau.qc.ca/blog/2009/05/speed-size-and-dependabil...
- jongraehl 17y agoI browsed around the source. I like that it's actually possible to get something out of this activity. There's some use of macros where inline functions (or even C++ templates) would have been prettier. It's a shame C has such a lame macro language. I was interested in how he claims space efficiency for objects, while still leaving open the possibility of abusing an object (not its type; it's a prototype based duck typed language) as a hash table via definition of new methods. It seems that the object model does have vtable sharing between instances of the same type, so I assume there's some kind of copy on write when you add a method.
- silentbicycle 17y agoWhile I haven't looked at the source, if it's anything like other prototype-based languages, they would either share the same prototype ("vtable"), literally adding the method to both at the same time, or it would be added as an extension to only one of them. (Being able to add a method to just one object OR all sharing a common prototype is a feature.) Using prototypes, it would be one pointer. I don't see why that would be particularly space-inefficient.
- bluefish 17y agoAnyone use(ing) Potion for something other than just playing around with the source?
- technoweenie 17y agoNo, it's still missing floats, mixins, reflection, etc. Not to mention integration with existing libs like databases, xml parsing, etc.
- silentbicycle 17y agoWhich is too bad, because it really encumbers implementing something truly novel. To be realistically useful, a tool needs to integrate with existing tools and standards, but that's a lot of work. "I estimate that 90-95% of the work in Plan 9 was directly or indirectly to honor externally imposed standards." - Rob Pike, "Systems Software Research is Irrelevant" (http://www.cs.bell-labs.com/cm/cs/who/rob/utah2000.pdf http://www.cs.bell-labs.com/cm/cs/who/rob/utah2000.pdf)
- dublinclontarf 17y ago_why is like the Willy Wonka of the programming world. Absolutely genious, and barking mad to boot. I've been playing a little with Shoes, I love it.
- perezd 17y agoThis language is pretty fascinating, I like its concepts quite a bit...maybe someone needs to write Cauldron, Potion's agile web framework ? :P
- randallsquared 17y agoFirst, someone will have to write Vial, Potion's DB interface or persistence system.
- jasonkester 17y agoCool. One tiny nitpick: Periods as block terminators seems like a Classic Military Blunder to me. You really want something that stands out for something that important, which is why curly braces (and indentation (and "END IF")) work so well. I have 3 dozen period-sized flecks of dust on my screen right this minute. [pauses to wipe screen]. If this language went mainstream in its current state, I predict lawsuits for squint-blindness.
- silentbicycle 17y agoAs I've noted elsewhere in the thread, Prolog and Erlang do this too. They also use commas (and semicolons, in Erlang). OTOH, their syntaxes are pretty straightforward, so it's not hard to have an auto-indenting/highlighting editor make periods more noticeable. I agree with you, but I think in practice it's less a problem than syntax bugs caused by ambiguities in precedence, optional "else" clauses (shift-reduce conflicts), etc.
- r7000 17y agoI kind of like the distinction between single quotes and double. One allows escape codes and the other doesn't (except for one - itself). Cool idea.