Page 1 of 2 | Next »
[02:05:04] jnoob22: In a view I'm trying to get a username representation for users instead of the user_id -> http://pastebin.com/s5z1V3xe
[02:06:50] jnoob22: Can anyone maybe point me to where I can read on how to do this properly? I'm using 5.0.2
[02:14:30] jnoob22: baweaver, like this? <%= f.text_field :user_id, options_for_select([[User.username, User.id], [User.id, User.id]]) %>
[23:00:29] jnoob22: dunno if anyone has benchmarked specifically python and ruby scripts but I'm finding ruby scripts to run almost 2-3x faster. Anyone else see that?
[23:01:08] jnoob22: I'm originally a Python guy (who is forced to do Java for a living). I am astonished. But, maybe my tests are flawed, who knows.
[23:02:14] jnoob22: nofxx, tending to agree. I remember 1.9.3 being very fast but thought maybe there was something seriously wrong with my bm tests a year and a half ago.
[23:03:12] jnoob22: nofxx, yeah everything beats Java when you have to run maven on a large set of code ;-)
[23:03:48] jnoob22: havenwood, I was wondering where the version cutoff was ... you think <1.8 was somewhat slow, I take it.
[23:04:52] jnoob22: I have always liked it for writing os/systems type stuff.... more elegant than perl, more functional than bash
[23:07:18] jnoob22: anyways, 2.4.0 ruby seems to be running at Perl speed. Would never have expected that.
[23:08:20] jnoob22: ok, I'll try to cut out my fanboy fascinations and let you guys get back to important stuff.
[10:49:05] jnoob22: trying to learn oop in ruby, but I'm not doing something right -> http://paste.ofcode.org/4KpupLL8sPVVcZ5gECUiXb ... a downstream class that I'm not even using just yet is setting values to variables in other class... surely I'm missing the point.
[10:52:12] jnoob22: ive read about instance variables and class variables in ruby docs but im missing something it seems. This can be done easily in Python or Java
[10:56:22] jnoob22: ive been programming for close to 20 years and have never heard of that for any oop capable language. Now I'm intrigued :-)
[11:01:54] jnoob22: jhass, ok, cool I'll read up on that. Thanks so much for pointing me in the right direction
[11:06:26] jnoob22: the only thing going for me is that I understand Java errors a lot better at this point and know how to make it behave.
[11:08:37] jnoob22: oh Lord, yes workmad3 ... I work with that everyday ... doing support for Alfresco
[11:10:12] jnoob22: heh heh dont you love non-obvious error messages? heh Java is full of them. At least with Python, Ruby and PHP I can narrow it down (assuming i know what it means)
[11:12:13] jnoob22: well java's good for some things.... you have an obsessive disorder and love extreme organizing.... you cannot stand dynamic programming and like everything defined all the way down without allowances for anything outside the box...
[11:12:46] jnoob22: elomatreb, actually if i would have understood the instance vars better, that would have made sense. But nothing's perfect I guess ;-)
[11:13:24] jnoob22: ... on the java note .... you still think XML files are the best at describing a data structure.
[11:15:35] jnoob22: ddv elomatreb at least with json/dicts you are not having to define/describe what those curly braces and brackets mean ;-)
[03:11:56] jnoob22: If you don't use $LOAD_PATH << "." ... where does Ruby normally look for packages/modules?
[02:59:26] jnoob22: Weird thing I've found .... should 2.2.0 be 3 times faster than 2.3.1? my script is only going through a demo of array methods with a very small size array but should it be that much faster going over the same code?
[03:51:19] jnoob22: when I saw the 0.071 compared to a very equal python script at .200, I was impressed since I'm more of a Python guy
[03:53:10] jnoob22: yeah my thoughts too .... have been looking through release notes to see if there was possibly some new functionality in array methods to account for this but haven't seen anything even close to compelling yet.
[21:27:02] jnoob22: is this the official style guide for Ruby? https://github.com/bbatsov/ruby-style-guide or is there another one possibly?
[22:39:00] jnoob22: as far as style goes, does Ruby use c-like variable names like say temp_str as opposed to Java-ish tempStr ?
[22:43:59] jnoob22: ah ok... hmm I would say generally stay in school but I realize everyone's situations are very different.
[22:44:44] jnoob22: i work more on the support side of it though.... luckily i dont have to work on call often.
[22:46:00] jnoob22: ok.... i was just working in Maidenhead for about 6 weeks last Nov,Dec. Seemed to be tons of jobs in Reading/Maidenhead areas
[22:47:06] jnoob22: those will get you some jobs... you may have to get to the more trendier places here in the states to find a decent ROR job or the like.
[22:47:48] jnoob22: I live in Colorado Springs ... Denver has lots of jobs like that but you better know your stuff.
[22:49:51] jnoob22: von-strauss, if you do nothing but code... maybe eat a sandwich and then just code... the problem though with solo learning is that you don't usually get to learn how things are done.
[22:50:46] jnoob22: sure you can pick up syntax and such but it's always best to find someone who knows it well and do an "internship" with them. I wonder if Ruby has a mentorship thing... I know PHP used to. I learned a lot of stuff from that.
[22:54:06] jnoob22: im trying to write this script very basic-like ... probably == is easier to read for a non-rubyist
[22:54:47] jnoob22: yeah git is easiest. I would bet you any place that is mostly using Ruby/JS/Python is using git and not svn.
[23:02:58] jnoob22: when you say client-side... do you mean client-side from the browser side for instance?
[23:04:40] jnoob22: yeah there are some ajax modules and such that I've heard of but that's about it. (I'm making an educated guess here).
[13:24:31] jnoob22: I'm trying to use the Archive module here -> http://www.ruby-doc.org/gems/docs/a/archive-tar-0.9.0/Archive/Tar.html but require 'archive' doesn't appear to work... any ideas what I should use here to import it?
[13:26:08] jnoob22: nm ... looks like require 'archive' is correct but something is munged up... Could not open library 'libarchive.so': libarchive.so: cannot open shared object file: No such file or directory
[14:02:21] jnoob22: Hi... getting this error when i try to do: sudo gem install libarchive -> http://pastebin.com/M1z791wg any ideas? I'm on Ubuntu 14.04
[14:09:20] jnoob22: gem seems to be working when i try to install rails... so it must not be broken but it is 1.9.3 (i know it mentions 1.9.1)
[14:27:10] jnoob22: Hmm. I try: rvm use 2.2.0 but I get: RVM is not a function, selecting rubies with 'rvm use ...' will not work.
[02:04:43] jnoob22: Is foreman a good candidate to serve ruby in a production environment (as an alternative to using Apache)?
[13:46:03] jnoob22: anyone know if there's a free alternative to GIT? Whereby if you're writing non-public code and want to store it there?
[14:32:27] jnoob22: if it's something i know how to do, i usually prefer sorcery ;-) but wasn't sure if i was missing something :-)
[14:36:31] jnoob22: at work we have skype, im the most guilty of sending lmgtfy and then turning around and asking a simple question :-\
[14:40:13] jnoob22: so when i do a rails generate model ModelName ... i notice there is nothing in the model file (app/models/model_name.rb
[14:43:52] jnoob22: danabrit: it does have stuff like has_many and belongs_to to show reference but im wondering about the actual fields themselves.
[14:45:48] jnoob22: danabrit: all i see through this tut is adding validates and other qualifiers but never really a model definition which is kind of what im expecting (info about the model fields, not the meta stuff ... to be clear)
[14:46:50] jnoob22: danabrit: yes ... the fields were placed in the migration file under add table, etc.
[14:47:07] jnoob22: but i expected them to be in the model file but it's ok if that's not how it's supposed to be.
[14:47:31] jnoob22: forgive me, im coming from django, so my initial perspective will be off a bit. :-)
[14:49:36] jnoob22: waseem_: you're right, was making a joke though ;-) ESR is not so bad. He's a little strange but he's on the money with that FAQ