Downloads Documentation Community Contribute Demo






Show Sidebar
Login | Register

IRC Logs

05. 07 2008

2008 7
Mo Tu We Th Fr Sa So
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      
[00:29:23] <maveriick> !ping
[00:29:23] <OpenMRSBot> pong
[00:59:39] *** shahid_ has joined #openmrs
[00:59:39] *** maveriick has quit IRC
[01:00:15] *** shahid_ is now known as maveriick
[01:01:04] <maveriick> Nice!
[01:13:39] *** TorLye has joined #openmrs
[01:53:37] *** maveriick has quit IRC
[04:14:26] *** njero has joined #openmrs
[04:14:26] *** ChanServ sets mode: +v njero
[05:11:59] *** sioraiocht has joined #openmrs
[06:10:13] *** TorLye has quit IRC
[06:10:18] *** TorLye has joined #openmrs
[07:32:39] *** sioraiocht has quit IRC
[07:52:23] *** sioraiocht has joined #openmrs
[08:11:13] *** sioraiocht has quit IRC
[08:23:17] *** nribeka has joined #openmrs
[09:07:55] *** nribeka has quit IRC
[09:26:42] *** TorLye has quit IRC
[09:28:58] *** TorLye has joined #openmrs
[09:56:04] *** TorLye has quit IRC
[09:56:16] *** TorLye has joined #openmrs
[10:43:41] *** njero has quit IRC
[10:59:16] *** TorLye_ has joined #openmrs
[11:00:09] *** TorLye has quit IRC
[11:08:52] *** njero has joined #openmrs
[11:08:52] *** ChanServ sets mode: +v njero
[11:30:20] *** nribeka has joined #openmrs
[11:55:09] *** njero has quit IRC
[11:55:46] *** njero has joined #openmrs
[11:55:47] *** ChanServ sets mode: +v njero
[12:17:22] *** njero has quit IRC
[12:18:43] *** pearlbear has joined #openmrs
[12:18:43] *** ChanServ sets mode: +v pearlbear
[12:20:40] *** TorLye_ has quit IRC
[12:41:07] *** TorLye has joined #openmrs
[13:38:09] *** sgrannis has joined #openmrs
[13:38:22] *** ChanServ sets mode: +v sgrannis
[13:40:12] <sgrannis> nribeka: u there?
[13:44:17] *** sgrannis has quit IRC
[13:59:56] *** pearlbear has quit IRC
[14:06:43] <r0bby> meh
[14:25:49] *** TorLye has quit IRC
[14:26:08] *** TorLye has joined #openmrs
[15:22:06] *** lh has joined #openmrs
[15:32:53] <r0bby> lh: o/
[15:33:02] <r0bby> what'd I do :(
[15:33:13] <r0bby> this can't be good :<
[15:33:28] <lh> r0bby: you say whatever is on your mind. this is not always a bad thing, but sometimes it is worth exercising restraint
[15:33:52] <r0bby> Shouldn't this be said in private, not where its logged?
[15:34:19] <r0bby> and not publically chastising(sp?) me
[15:35:29] <r0bby> ugh
[15:37:15] <r0bby> lh: you're never in here
[15:37:19] <r0bby> or rarely
[15:42:07] <r0bby> :x
[15:47:58] <r0bby> :/
[15:55:12] <r0bby> I hate my life.
[16:29:30] <r0bby> I wish burke were accessible :|
[16:29:36] <r0bby> esp. considering midterm is coming up
[16:44:37] *** njero has joined #openmrs
[16:44:38] *** ChanServ sets mode: +v njero
[16:46:57] <r0bby> njero: o/
[16:47:12] <njero> heya r0bby
[16:48:12] <r0bby> Concept c = "WEIGHT IN (KG)".concept()
[16:48:15] <r0bby> NICE!!!!!!!!!!!
[16:48:36] <njero> ooooh
[16:48:39] <njero> that is fancy
[16:49:22] <njero> Personally I am tending away from any string constants for concepts in code... but that is elegant
[16:49:39] <r0bby> wanna see the code?
[16:49:46] <njero> heck ya
[16:49:50] <njero> pastie.org
[16:49:58] <r0bby> String.metaClass.concept << {
[16:49:58] <r0bby> Context.conceptService.getConceptByName(delegate)
[16:49:59] <r0bby> }
[16:50:19] <njero> Yeah that is nice
[16:50:38] <njero> I love when cool code is short
[16:50:44] <r0bby> I need to see if this works via an abstract class
[16:51:26] <njero> you could do more weird stuff like ["Identifier Type", "Identifier"].patient()
[16:51:37] <njero> but that is not as natural
[16:52:00] <r0bby> njero: sure I could
[16:52:18] <r0bby> you can do some weird stuff in your controller/model if you know what you're doing
[16:52:39] <njero> Like I say though, in the Baobab/PIH registration system we have *one* concept hard coded like "WEIGHT IN (KG)" in the code and there are lots of commets around it saying that it is evil
[16:53:08] <r0bby> heh
[16:53:23] <njero> but it was hard code, or spend two weeks reworking things
[16:53:27] <r0bby> Okay if i don't get this done I won't pass midterm -- or i'm paranoid i wont
[16:53:51] <njero> you seem to have quite a bit working from the sounds
[16:53:51] * r0bby hugs lh
[16:53:56] <r0bby> thanks for helping me
[16:54:14] <r0bby> yes
[16:54:21] <r0bby> I have some ajax goodness working
[16:54:28] <njero> I didn't realize lh was in this channel
[16:54:29] <r0bby> it's hot
[16:54:44] <r0bby> I think she's here about me, not sure though
[16:54:50] <r0bby> :/
[16:55:07] <njero> I am really excited bout the stuff you are working on...
[16:55:18] <r0bby> Yeh that's what's motivating me
[16:56:26] <r0bby> njero: as a user
[16:56:46] <r0bby> would it help if I gave you the template, or if I just gave the final markup?
[16:57:02] <r0bby> the template being something like <%= textArea(...) %>
[16:57:03] <njero> Probably not... we have a lot vested in Ruby... I want to see how you did it then clone it... or clone you
[16:57:26] <r0bby> Hell no, i'm not re-writing this thing
[16:57:32] <njero> No I will :)
[16:57:47] <r0bby> oh you can look at my design right now
[16:57:53] <njero> :)
[16:57:59] <r0bby> but i assume you want the final product?
[16:57:59] <njero> I want to steal all of your work
[16:58:17] <r0bby> nobody steals my workl and gets away with it
[16:58:22] <njero> Yeah... for general openmrs Groovy is really important
[16:58:25] * r0bby dials up his hitman
[16:58:30] <njero> we are weird and iconoclastic
[16:58:46] <r0bby> njero: but yeh -- I'd be willing to help you
[16:58:54] <njero> Would be killer
[16:59:23] <r0bby> If ruby has a built in templating engine the templating would be easy
[16:59:31] <njero> erb
[16:59:33] <r0bby> also -- you need to interrogate your model's properties
[16:59:43] <njero> yep, easy too
[17:00:06] <njero> The hard part is doin it all from a module and using the services on the backend...
[17:00:14] <njero> what you are figuring out...
[17:00:32] <r0bby> The data types I'm implementing for are: sublcasses of Number, Concept, Patient, String and Boolean/boolean
[17:00:41] <r0bby> also Date
[17:00:44] <njero> hmm
[17:00:50] <njero> It is not loosely typed?
[17:01:24] <njero> Does groovy have magic like method_missing?
[17:01:38] <r0bby> I use a container class to store the data types (when i interrogate the properties; i have a list of the container class)
[17:01:41] <r0bby> yup
[17:02:03] <r0bby> it's how Builders work in groovy
[17:02:18] <njero> it seems like instead of impementing all of the possible classes you could cheat and use method missing to get at properties, raise an exception if not there
[17:02:44] <r0bby> no, different widgets need to be rendered
[17:03:13] <njero> c = "WEIGHT IN (KG)".concept() / c.dataType() == "Numeric"
[17:03:16] <njero> or some such
[17:03:30] <r0bby> http://dev.openmrs.org/browser/openmrs-modules/groovyforms/src/org/openmrs/module/groovyforms/util/GroovyFormsGenerationUtil.groovy
[17:03:36] <njero> .dataType is not defined, instead it gets handled by method_missing
[17:03:36] <OpenMRSBot> <http://ln-s.net/20cM> (at dev.openmrs.org)
[17:03:52] <r0bby> maybe after midterm
[17:04:04] <r0bby> but right now let's get the basic system in place
[17:04:21] <njero> yeah, wise plan
[17:04:38] <njero> Have you ever seen our code?
[17:04:48] <r0bby> no I haven't
[17:04:54] * r0bby doesn't know ruby well
[17:05:19] <njero> It is *very* similar to groovy
[17:05:50] <r0bby> I know
[17:05:52] <r0bby> seen it
[17:06:00] <r0bby> except closure syntax is slightly different
[17:06:07] <r0bby> |x| for passing params iirc
[17:06:14] <r0bby> vs
[17:06:17] <r0bby> x ->
[17:06:57] <njero> yep
[17:07:08] <njero> This is our concept model (the whole thing) http://github.com/baobab/mateme/tree/master/app/models/concept.rb
[17:07:15] <OpenMRSBot> <http://ln-s.net/20cO> (at github.com)
[17:08:42] <r0bby> nice
[17:09:09] <r0bby> njero: what's your license?
[17:09:21] <njero> Hmm, I think MIT
[17:09:41] <njero> We are pretty dang open to re-releasing under other licenses
[17:09:55] <njero> But I think officially MIT
[17:10:10] <njero> We would have used the OpenMRS license but there is specific wording to Java
[17:10:12] <r0bby> good then you're fine w/ basically ripping my code :>
[17:10:38] <njero> Your license is OpenMRS or other?
[17:11:12] <r0bby> OpenMRS License is MIT license w/ a medical liability clause i think
[17:11:33] * r0bby is cloning your sourc e
[17:12:20] * r0bby will look when soc is over
[17:12:28] <njero> Yeah, that is why we went there
[17:12:51] <njero> The code will be much prettier then
[17:12:53] <njero> :)
[17:13:30] <r0bby> if I get this working i'll show you it shouldn't be too bad
[17:13:51] <njero> We were on an amazing run of cutting the code base in half every two weeks while simultaneously adding features and making it more readable
[17:14:12] <njero> If only that could continue forever
[17:14:24] <r0bby> njero: the cool thing about my code is AJAX validates as you go :)
[17:14:41] <njero> eventually our source code would be "OpenMRS" or "openMRS()" in groovy :)
[17:14:50] <r0bby> so you get near instant feedback -- it doesn't do it as you type but when you hit tab (de-focus on the text area it does)
[17:14:56] <njero> Aha, what kind of on the fly validation?
[17:15:03] <r0bby> sorta yeh
[17:15:04] <njero> what fields?
[17:15:17] <r0bby> ideally all of them
[17:15:32] <njero> How are you building the validation rules?
[17:16:01] <njero> reasonableMin, allowableMin? isn't there something like that in ConceptNumeric?
[17:17:07] <r0bby> oh it's just doing checks
[17:17:24] <r0bby> right now I have it checking 1) syntax 2) there *MUST* be fields
[17:17:32] <r0bby> and that's it
[17:17:36] <njero> aha
[17:17:41] <njero> makes sense
[17:20:28] <r0bby> in order to check syntax i parse it through the classloader
[17:20:38] <njero> Aha
[17:20:39] <r0bby> \if an exception occurs i display the exception
[17:20:45] <njero> yeah, makes sense
[17:21:10] <r0bby> Basically in orderr to do this in ruby you'll need to dynamically load ruby from ruby ;)
[17:21:21] <r0bby> and compile (or at least parse it)
[17:21:25] <njero> Could create a lot of traffic especially in satellite (latent) internet environments... but if that is configrable it is good
[17:21:36] <r0bby> it could
[17:22:14] <njero> heh
[17:22:22] <r0bby> One concern i have is resource leaks w/ the classloader
[17:22:37] <njero> Worry about that after midterm
[17:22:41] <r0bby> yeh
[17:22:49] <r0bby> i know it's in the back of my mind though
[17:22:53] <njero> classloader/leak issues are hydras
[17:23:03] <r0bby> yeh I know
[17:23:12] <r0bby> I have to get creative
[17:23:32] <njero> and whenever you change the code you change the issue. And you will surely change the code along the way... so why deal with the issue twice?
[17:23:54] <r0bby> It has to be parsed
[17:24:07] <r0bby> no way around it
[17:24:23] <njero> Fair enough... but leaking is fine for now
[17:24:25] <njero> :)
[17:24:37] <r0bby> I can fix it later
[17:24:45] <r0bby> When i have people battle test it
[17:24:47] <r0bby> aka a beta release =)
[17:27:58] <r0bby> retaining references in templates is hard
[17:28:08] <r0bby> considering that in the ened it's just a string
[17:29:27] <njero> give an example
[17:30:00] <r0bby> well
[17:30:14] <r0bby> to generate the concept answer selector i need a Concept object ;)
[17:30:50] <r0bby> I think i'll generate all the markup right away before i process..
[17:31:06] <r0bby> actually funny thing
[17:31:15] <r0bby> I may not even need to run it through the engine!
[17:34:06] <njero> hmm
[17:34:14] <njero> I am a little lost, but uh....
[17:34:35] <njero> I think I get it
[17:36:58] <r0bby> njero: I'll try to document the code as best as possible for you
[17:37:14] <njero> you're the best: )
[17:37:15] <r0bby> Note: I used duck typing a crapton your best docs are my unit tests
[17:37:28] * njero <3 r0bby
[17:38:12] <r0bby> oddly enough that's the best way to learn about what code does
[17:38:51] <njero> Wait till you start specing :)
[17:39:41] <njero> Let me find a sample
[17:40:34] <njero> http://github.com/baobab/mateme/tree/master/spec/models/encounter_spec.rb
[17:40:40] <OpenMRSBot> <http://ln-s.net/20co> (at github.com)
[17:41:12] <njero> Then you get to stories which are even more fun... http://github.com/baobab/mateme/tree/master/stories/login_story
[17:41:17] <OpenMRSBot> <http://ln-s.net/20cp> (at github.com)
[17:41:28] <njero> executable documentation
[17:42:59] <r0bby> oh joy
[17:43:06] <r0bby> I'm not specing
[17:43:30] <r0bby> no way in hell I'll document -- and trust me documenting isn't going to be fun =(
[17:43:47] <r0bby> njero: i'll use yours as a guideline
[17:44:31] <njero> heh
[17:44:37] <njero> you are welcome to it
[17:44:44] <r0bby> for future reference my gmail/aim/yahoo/email are on my user page
[17:44:58] <njero> we actually gave a presentation on story driven development in Druban
[17:45:01] <njero> Durban*
[17:45:12] <r0bby> you'll have more mileage on those than irc privmsgs
[17:46:13] <r0bby> you can either speak w/ me or burke both of us know this project fairly well (burke knowing it better than me, but i'm more or less driving it)
[17:46:44] <njero> cool
[17:47:21] <r0bby> ben is my backup mentor but he's helpin w/ openmrs stuff not groovy and such
[17:47:47] <r0bby> I'm learning to be independent in solving complex issues
[17:48:09] <r0bby> ugh
[17:48:30] <r0bby> I have no idea how to run this through the engine
[17:48:54] <njero> the dreaded eval
[17:49:01] <r0bby> yeh
[17:49:32] <njero> Otherwise break it down into params and do things like "Concept".classify()
[17:49:41] <njero> or somesuch (in Ruby)
[17:50:21] <r0bby> it's not that
[17:50:35] <r0bby> the controller is piss easy
[17:50:47] <njero> ah, I thought this was the helper
[17:50:53] <r0bby> yeh it is
[17:51:00] <r0bby> but i'm specifically referring to the view
[17:51:21] <r0bby> I have a reference to the model =)
[17:51:32] <njero> tsk tsk
[17:51:42] <r0bby> model's properties is hould say (a list of GroovyFormsDomainModelMetaData objects
[17:51:51] <njero> oh, fair then
[17:52:10] <r0bby> I store the name, value, and type
[17:52:18] <r0bby> all the things we're interested in :)
[17:52:29] <r0bby> for a concept the reference is in the value
[17:53:11] <njero> ah, as an object not an id in the db?
[17:55:07] <r0bby> there is no database
[17:55:12] <r0bby> this is serialized to XML :)
[17:55:22] <r0bby> Burke and I chose to use flat files
[17:55:59] <r0bby> this indeed motivates me to get this done so you can copy my work and not credit me :<
[17:56:28] <njero> heh
[17:56:37] <r0bby> njero: one thing that's cool about groovy
[17:56:57] <r0bby> def writer = new StringWriter(); writer << "hai" << "\n" << "bai";
[17:57:23] <njero> the << operator?
[17:57:34] <r0bby> overridden
[17:57:53] <r0bby> in groovy operator overloading existing
[17:57:56] <r0bby> exists*
[17:58:02] <njero> Yeah, it is a rubyism... but nice :)
[17:58:27] <r0bby> njero: yeh don't piss on my picnic
[17:58:32] <r0bby> wait til i'm done eating
[17:58:34] <njero> More languages should embrace it
[17:58:39] <njero> you are right :)
[18:26:48] *** TorLye has quit IRC
[18:51:00] *** sgrannis has joined #openmrs
[18:51:23] *** ChanServ sets mode: +v sgrannis
[19:53:14] *** sgrannis has quit IRC
[20:29:42] *** upul has joined #openmrs
[20:58:42] *** upul has quit IRC
[20:58:43] *** upul_ has joined #openmrs
[21:07:29] *** bwolfe has joined #openmrs
[21:07:29] *** ChanServ sets mode: +o bwolfe
[21:23:17] *** upul has joined #openmrs
[21:23:24] *** upul_ has quit IRC
[21:51:05] *** bwolfe has quit IRC
[22:19:48] *** upul has quit IRC