Perl 6 - the future is here, just unevenly distributed

IRC log for #testml, 2012-12-26

| Channels | #testml index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
02:09 GitHub114 [testml-lite-tml] ingydotnet pushed 1 new commit to master: http://git.io/KhxjEQ
02:10 GitHub114 testml-lite-tml/master 0a6507e Ingy döt Net: ...
04:37 ingy rking: I feel myself switching to Ruby as my prototype lang
04:38 ingy I think this is a decent move, because I won't be exposed to much new in Perl
04:38 ingy and also because I am in no danger of becoming a Ruby fan boi
04:38 ingy the acmeist force is strong in this one
04:40 rking ingy: I'm still enjoying mining new depths with it. I still have plenty to learn before I'm bored enough to think about it critically.
04:40 rking But yeah, Acmeism FTW
04:41 ingy hmm, yeah I don't get tickled by anything in the language proper
04:41 ingy except maybe 0 => true
04:41 ingy because truth is a bitch
04:41 ingy in python [] => false
04:43 ingy python is fond of casting to boolean, and ruby makes you say exactly what you mean
04:43 ingy wich is odd, because in other ways it's the opposite with ruby and python
04:43 ingy I think of python as more strict in general
04:44 ingy rking: ^^ (rking has irc ADD)
04:44 ingy I think I found out what is going to be a real pita for my acmeism
04:45 ingy but I also have a solution
04:45 ingy bascially library naming
04:45 ingy not what you probably think though
04:45 ingy say foo and bar are acmeist libs
04:46 ingy and foo uses bar internally
04:46 ingy but on ruby bar is taken
04:46 ingy it's a pretty big deal
04:47 ingy you basically need a name mapping
04:48 ingy I'm not sure where it goes in cdent
04:48 ingy but I already have the idea of API wrappers
04:49 ingy like for say http
04:49 ingy every lang has a different http lib
04:49 ingy and you want to use the native one from your cdent module
04:50 ingy so you just write a cdent module called http that connects one API to many backend apis
04:50 ingy so you can use that same mechanism when something else is sitting on your name
04:51 ingy hopefully it will be as simple as a yaml file
04:51 ingy but we'll have pegex if we need a new dsl
04:52 rking That's definitely a problem.
05:00 rking One thing at a time, I guess.
05:02 ingy rking++
05:02 ingy I like to at least know I have a reasonable out to problems I think of
05:02 ingy so far there isn't a showstopper
05:03 ingy (or else I'd have to stop the show :)
05:14 GitHub64 joined #testml
05:14 GitHub64 [testml-tml] ingydotnet created coffee (+1 new commit): http://git.io/Qm5Jqg
05:14 GitHub64 testml-tml/coffee 7d4bd44 Ingy döt Net: Try out new CoffeeScript inspired syntax.
05:14 GitHub64 left #testml
05:14 ingy rking: check out that commit ^^
05:16 rking ;~)
05:17 ingy rking: so now I'm completely focused on porting testml to ruby
05:17 ingy and reinventing the testml lang along the way
05:18 ingy rkingit's also extremely possible that I can (fairly easily) be backwards compat
05:19 rking That's a good hack.
05:42 ingy rking: I'm wondering if indentation makes sense inside curlies
05:42 ingy I'm thinking probably not
05:42 rking ingy: I'm not sure that I follow
05:43 ingy rking: I will likely require semis inside curlies
05:43 ingy except on the last statement
05:44 rking )~;
05:44 ingy effectively I'm going to make indentation imply {} \ and ;
05:45 rking Aha
05:45 ingy I think the result will be fine
05:46 rking Do implicit curlies also mean implicit semis?
05:46 ingy no
05:46 ingy of course not
05:46 ingy it's somewhat like yaml
05:46 rking That would be good, though, because then the curlies and semis together could be known as "Dork Mode"
05:46 ingy once you go into json mode you can't indent
05:47 ingy not really
05:47 ingy foo = {if x {a=1;b=2}}
05:48 rking Yeah, that much is fine. The part I don't like is:
05:48 ingy that's much nicer than the alternative 4 liner
05:48 rking foo = if x
05:48 rking a = 1;
05:48 rking b = 2
05:49 rking Like little Chesire Eyes, winking at me as they mock me.
05:49 ingy well you missed the semantic
05:49 ingy foo = ->
05:49 ingy if x
05:49 ingy a = 1
05:49 ingy b = 2
05:49 rking Right.
05:49 rking But my point was about the "a = 1;"
05:50 ingy why would you need that?
05:50 ingy what you can't do is mix them...
05:50 ingy foo = {
05:50 ingy if x
05:50 ingy a = 1
05:50 ingy b = 2
05:50 ingy }
05:51 ingy I mean maybe I could but it seems not worth it
05:51 rking K, I think I misunderstood.
05:52 rking The thing about this topic is that my input can be replaced by a short list of rules written on a piece of cardboard
05:52 rking So I know you know what I want, otherwise I'll sit back and watch and try not to complain when the cardboard isn't referenced.
05:52 rking Looks good so far, I think.
05:52 ingy where is this piece of cardboard?
05:53 ingy I think you should comment on upcoming changes to testml-tml
05:53 rking K
05:53 ingy I just changed everything from one syntax to another
05:53 ingy but I need tests for all syntax
05:54 ingy oh I can do syntax-equivalence.tml :)
05:55 ingy like this in pegex: https://github.com/ingydotnet/pegex-pm/blob/master/t/compiler-equivalence.t
05:55 rking Yeah
05:55 ingy that's nice because it keeps the tests clean and maintainable
05:55 ingy instead of tests what ast it compiles to
05:56 ingy which might churn a lot
05:56 ingy I mean some of that is important too
05:56 ingy but once you have the basics covered you can just compare things to themselves
05:56 ingy yaml-tml and jsony-tml would have similar tests
06:01 rking As a general rule, I think one line of implementation changes should mean one test failure
06:01 rking s/test/unit test/
06:01 rking Anything for which that isn't true is closer to an end-to-end ("acceptance"/"integration") test
06:13 ingy yeah, I know that's your thing
06:14 ingy it's probably just a big impedance mismatch with how we see software
06:15 ingy rking: ^^
06:16 ingy I don't see code as a very important part of software
06:17 ingy for me it's all about ideas and putting them into a reusable form
06:18 ingy but if you can give me a failing test that proves your way is right, I'd be interested :)
06:19 rking We've still never once developed my way, that I recall.
06:20 rking But I get what you mean about the unimportance of code. I'm trying to get it, I mean.
06:20 ingy yeah, we should pair on something of yours and I'll see how you do it
06:21 ingy it would at least be interesting
06:21 ingy I'm definitely a fan of pry
06:22 ingy do you have tests for ... stuffs?
06:22 ingy I need testml-vim
06:23 ingy and I don't mean syntax highlighting
06:23 ingy I need to add vim lang to the acmeist lang set
06:23 ingy maybe anyway
06:23 ingy can vim load json?
06:24 ingy or use pcre style regexen?
06:24 * ingy says rking rking rking
06:24 ingy is there a webserver written in vim lang?
06:25 rking Haha whoa
06:25 ingy if not, then it's not turing complete ;)
06:25 ingy berners complete
06:25 rking There are a few ... tests, but not very thorough
06:25 rking You can run ... unittest
06:26 ingy huh
06:41 GitHub25 [testml-tml] ingydotnet pushed 1 new commit to coffee: http://git.io/h-Mu1w
06:41 GitHub25 testml-tml/coffee af2cd33 Ingy döt Net: add some syntax tests
06:41 ingy rking: ^^
06:42 ingy don't go apeshiz on the repetition :)
06:44 ingy basically that's just one way to do syntax equiv
07:02 ingy rking: you still awake?
07:02 ingy I got something rockin
07:23 GitHub34 [testml-tml] ingydotnet pushed 1 new commit to coffee: http://git.io/4eZiNg
07:23 GitHub34 testml-tml/coffee 008bfa6 Ingy döt Net: redo syntax in a dry style
07:23 ingy rking: check ^^ out
07:23 ingy that would take a bit of doing, but that's where things needs to go...
07:37 ingy *a.{a == b}(*b)
07:37 ingy I guess that wants to be valid
07:37 ingy same as
07:38 ingy (a, b) { a == b } (*a, *b)
07:39 ingy similar to
07:40 ingy x(*a, *b)
07:41 ingy x = (c, d)->
07:41 ingy c == d
13:59 rking ingy: Looks nice (I hope it takes a smaller bit of doing rather than a larger bit)
19:13 ingy rking: at some point last night I gave up on the idea of skipping testml-lite
19:13 ingy testml is a bit too hairy to be trivially ported
19:14 ingy I should spec it
19:16 rking ingy: Cool.
20:34 ingy rking: tml tests currently need a test/foo.rb shim to run a test/testml/foo.tml test
20:34 ingy that's ok because rake testml generates the shims from test/testml.yaml
20:35 ingy but I'm looking for ways to improve on that
20:35 ingy one idea is to start .tml files with '#!/usr/bin/env testml'
20:36 ingy which can look at its environment, find a test/testml.yaml file and dtrt
20:37 ingy the bridge class can be in the yaml file
20:37 ingy I mean the name of it
20:38 ingy so all bin/testml needs to figure out is the language and the bridge class
20:38 ingy then we write a rake/testml that injects testml logics into `rake test`
20:39 ingy so whatever `rake test` did before still works but it also runs .tml files
20:40 ingy cops!!!
20:40 ingy lots of cops just drove by
20:41 ingy anyway I think that's pretty solid, at least in the rubygems scenario
20:42 ingy to use a testml suite in a project you just add a test/testml.yaml file and a line to your rakefile
20:43 ingy and to use testml inline inside of test/foo.rb files you don't need to do anything different
21:04 ingy rking: does a hashbang executable need to be binary?
21:23 rking ingy: Nope
21:23 rking Just chmod +x

| Channels | #testml index | Today | | Search | Google Search | Plain-Text | summary