« Back to channel list

#ruby - 15 July 2018

« Back 1 day Forward 1 day »
[00:00:40] jrabe: has joined #ruby
[00:02:14] bonhoeffer: has joined #ruby
[00:05:16] heftig: has joined #ruby
[00:07:02] orbyt_: has joined #ruby
[00:07:52] lxsameer: has joined #ruby
[00:08:12] venmx: has joined #ruby
[00:14:10] dinfuehr: has joined #ruby
[00:17:37] lxsameer: has joined #ruby
[00:27:50] lxsameer: has joined #ruby
[00:37:07] ciscam: has joined #ruby
[00:39:00] vonfry: has joined #ruby
[00:42:34] jrafanie: has joined #ruby
[00:56:58] Caerus: has joined #ruby
[01:06:44] bonhoeffer: has joined #ruby
[01:07:45] lxsameer: has joined #ruby
[01:22:37] lxsameer: has joined #ruby
[01:37:24] SunnyLumenz: has joined #ruby
[01:39:34] willthechill: has joined #ruby
[01:45:05] heftig: has left #ruby: ()
[01:45:44] subroot: has joined #ruby
[01:47:20] graphene: has joined #ruby
[01:47:48] subr: has joined #ruby
[01:48:25] jhack: has joined #ruby
[01:50:08] ur5us: has joined #ruby
[01:52:07] jrafanie: has joined #ruby
[01:54:23] sepp2k: has joined #ruby
[01:56:09] MzrE: has joined #ruby
[02:02:37] lxsameer: has joined #ruby
[02:04:42] yokel: has joined #ruby
[02:10:49] graphene: has joined #ruby
[02:10:56] ogres: has joined #ruby
[02:17:41] _aeris_: has joined #ruby
[02:18:04] vonfry_: has joined #ruby
[02:18:11] MagePsycho: has joined #ruby
[02:18:40] GodFather: has joined #ruby
[02:18:46] almdrx: has joined #ruby
[02:18:58] Vingador: has joined #ruby
[02:28:01] GodFather: has joined #ruby
[02:28:10] vipaca: has joined #ruby
[02:33:53] moei: has joined #ruby
[02:35:11] subroot: has joined #ruby
[02:37:19] hfp_work: has joined #ruby
[02:40:15] orbyt_: has joined #ruby
[02:40:32] vipaca_: has joined #ruby
[02:40:41] GodFather: has joined #ruby
[02:40:45] ciscam: has joined #ruby
[02:42:52] lxsameer: has joined #ruby
[02:47:06] blackwind_123: has joined #ruby
[02:50:08] GodFather: has joined #ruby
[02:53:19] hfp_work: has joined #ruby
[02:57:44] GodFather: has joined #ruby
[02:57:53] lxsameer: has joined #ruby
[03:08:43] sepp2k1: has joined #ruby
[03:11:30] braincrash: has joined #ruby
[03:21:39] bonhoeffer: has joined #ruby
[03:21:58] akaiiro: has joined #ruby
[03:27:45] DTZUZO: has joined #ruby
[03:28:30] almdrx: has joined #ruby
[03:30:50] apparition: has joined #ruby
[03:37:38] lxsameer: has joined #ruby
[03:48:49] jtdowney: has joined #ruby
[03:49:02] vipaca: has joined #ruby
[03:50:51] ur5us: has joined #ruby
[03:51:37] graphene: has joined #ruby
[03:56:39] gix: has joined #ruby
[03:58:57] Lytol: has joined #ruby
[04:02:24] redlegion: has joined #ruby
[04:03:01] redlegion: has joined #ruby
[04:03:44] lytol_: has joined #ruby
[04:09:19] tdy1: has joined #ruby
[04:17:37] lxsameer: has joined #ruby
[04:19:20] ciscam: has joined #ruby
[04:19:50] Guest5141: has joined #ruby
[04:27:37] lxsameer: has joined #ruby
[04:32:18] akaiiro: has joined #ruby
[04:36:10] xall: has joined #ruby
[04:44:55] nicesignal: has joined #ruby
[04:46:09] nima_m: has joined #ruby
[05:06:57] jenrzzz: has joined #ruby
[05:06:58] jenrzzz: has joined #ruby
[05:07:37] lxsameer: has joined #ruby
[05:15:16] za1b1tsu_: has joined #ruby
[05:17:47] orbyt_: has joined #ruby
[05:27:23] almdrx: has joined #ruby
[05:30:18] Caerus: has joined #ruby
[05:42:49] Es0teric: has joined #ruby
[05:47:37] lxsameer: has joined #ruby
[05:51:30] ur5us: has joined #ruby
[05:53:54] xall_: has joined #ruby
[05:57:39] lxsameer: has joined #ruby
[05:59:04] FernandoBasso: has joined #ruby
[06:04:49] darkhanb: has joined #ruby
[06:07:13] m27frogy: has joined #ruby
[06:15:54] almdrx: has joined #ruby
[06:22:50] ciscam: has joined #ruby
[06:23:05] Pisuke: has joined #ruby
[06:37:39] lxsameer: has joined #ruby
[06:37:49] schleppel: has joined #ruby
[06:41:36] konsolebox: has joined #ruby
[06:47:39] lxsameer: has joined #ruby
[06:51:59] _aeris_: has joined #ruby
[06:52:39] lxsameer: has joined #ruby
[07:05:53] Puffball: has joined #ruby
[07:15:28] jmcgnh: has joined #ruby
[07:19:18] nima_m: has joined #ruby
[07:19:23] za1b1tsu_: has joined #ruby
[07:27:08] ThePortWhisperer: has joined #ruby
[07:27:17] ThePortWhisperer: has left #ruby: ("Leaving")
[07:27:58] eadthem: has joined #ruby
[07:28:32] UniverseFactory: has joined #ruby
[07:29:20] UniverseFactory: has left #ruby: ("Leaving...")
[07:30:38] eadthem: im having an issue running a part of a ruby program. the offending line req.match?(spec, allow_prerelease) causes this error `block in find_all': undefined method `match?'
[07:31:14] eadthem: im interested in knowing a bit of background on .match? and maybe if this is something version related
[07:31:21] za1b1tsu_: has joined #ruby
[07:31:57] eadthem: my ruby verison is 2.1.9
[07:32:39] lxsameer: has joined #ruby
[07:33:42] eadthem: a manual explaining req.match would help. ive not had any luck finding that much
[07:34:47] mikecmpbll: has joined #ruby
[07:35:08] biberu: has joined #ruby
[07:35:27] dellavg: has joined #ruby
[07:38:29] baweaver: eadthem: What does that error say?
[07:38:41] baweaver: undefined method `match?`
[07:39:08] baweaver: Though you need to show more of your code if you want an answer, as there's too much context missing.
[07:39:34] baweaver: I'd think that req is some form of request, but no clue past that.
[07:39:41] eadthem: https://github.com/hashicorp/vagrant/blob/master/lib/vagrant/bundler.rb Line 500
[07:40:01] eadthem: k so req is not a part of a library or function its a object
[07:40:14] eadthem: very new to ruby.
[07:40:23] baweaver: where are you calling that code?
[07:40:33] baweaver: What does req look like?
[07:42:21] baweaver: That, and Ruby 2.1.x is super old.
[07:43:32] eadthem: ok moving down the call stack it says /usr/lib64/ruby/2.1.0/rubygems/resolver/composed_set.rb:38:in `block in find_all'
[07:44:00] eadthem: well maybe thats wehre i need to start then i wasnt sure how old it was. its the stock version for opensuse
[07:44:22] baweaver: I doubt it's the version
[07:44:26] baweaver: At least for now
[07:44:29] ruby[bot]: https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
[07:44:37] baweaver: Throw the code up there that's erroring
[07:44:43] baweaver: as well as the stack trace
[07:45:12] eadthem: and the issue is trying to install a plugin in vagrant, but sense ive not done ruby figured id get more context in to the error.
[07:45:35] baweaver: We have even less context than you do, remember
[07:45:44] eadthem: im follwing the code a bit more now.
[07:46:13] eadthem: ya i know, i was more curious about the one line but this is helpful the code is vagrant, i shuld of said that from the start
[07:46:39] clemens3: has joined #ruby
[07:47:56] DoubleMalt: has joined #ruby
[07:48:43] eadthem: is there a easy way in ruby to dump a object to console? like var_dump() in php? for debugging
[07:48:47] eadthem: or exploring.
[07:49:25] baweaver: https://www.youtube.com/watch?v=ri2JcQ4Qp80
[07:49:55] shinnya: has joined #ruby
[07:50:03] ur5us: has joined #ruby
[07:52:55] lxsameer: has joined #ruby
[07:53:45] graphene: has joined #ruby
[07:55:06] zenspider: has joined #ruby
[07:55:46] za1b1tsu_: has joined #ruby
[07:56:02] karapetyan: has joined #ruby
[07:56:18] lomex: has joined #ruby
[08:08:16] le94: has joined #ruby
[08:08:33] PaulePanter: has joined #ruby
[08:11:24] le94: has joined #ruby
[08:13:00] karapetyan: has joined #ruby
[08:13:55] alehander42: has joined #ruby
[08:16:51] alehander42: has joined #ruby
[08:17:33] amar: has joined #ruby
[08:18:00] suukim: has joined #ruby
[08:19:17] alehander42: has joined #ruby
[08:19:59] alehander42: can you help me with metaclasses
[08:20:06] alehander42: are they like pythons?
[08:22:17] conta: has joined #ruby
[08:30:14] _whitelogger: has joined #ruby
[08:30:24] baweaver: alehander42: Metaclass?
[08:32:36] lxsameer: has joined #ruby
[08:33:21] snickers: has joined #ruby
[08:33:55] jmcgnh: has joined #ruby
[08:36:03] amar: has joined #ruby
[08:37:49] lxsameer: has joined #ruby
[08:42:53] graphene: has joined #ruby
[08:51:32] amar_: has joined #ruby
[08:52:20] claudiuinberlin: has joined #ruby
[08:54:02] apeiros: has joined #ruby
[08:54:05] alehander42: yeah, like metaprogramming
[09:02:27] baweaver: In general it's overkill
[09:04:13] Puffball: has joined #ruby
[09:05:53] RougeR: has joined #ruby
[09:05:53] RougeR: has joined #ruby
[09:10:04] lomex: has joined #ruby
[09:17:38] lxsameer: has joined #ruby
[09:20:18] venmx: has joined #ruby
[09:28:48] n13z: has joined #ruby
[09:29:03] lomex: has joined #ruby
[09:37:56] PaulePanter: has joined #ruby
[09:43:03] beefjoe: has joined #ruby
[09:47:50] jamesaxl: has joined #ruby
[09:50:50] conta: has joined #ruby
[09:50:52] r3m: has joined #ruby
[09:51:19] alfiemax: has joined #ruby
[09:55:24] alfiemax_: has joined #ruby
[09:56:36] zapata: has joined #ruby
[10:00:58] snickers: has joined #ruby
[10:07:39] lxsameer: has joined #ruby
[10:15:29] ciscam: has joined #ruby
[10:22:15] alfiemax_: has joined #ruby
[10:34:15] snickers: has joined #ruby
[10:38:00] tty: has joined #ruby
[10:38:19] Puffball: has joined #ruby
[10:41:55] leitz: has joined #ruby
[10:43:44] leitz: What's the usual way to parse user input to make sure there's no commands or other hanky-panky? The string requested will become a filename.
[10:44:51] RougeR: has joined #ruby
[10:44:52] RougeR: has joined #ruby
[10:45:47] elomatreb: The only *proper* way to do this is using a tool that doesn't allow this to happen, i.e. avoid shelling out with string interpolation
[10:47:35] guardian: has joined #ruby
[10:47:40] lxsameer: has joined #ruby
[10:48:12] leitz: Is there an existing library that converts entities, ro just write my own? In this case, things like semi-commas, colons, etc, should not be in the string.
[10:49:19] maiz: has joined #ruby
[10:49:25] Alec: What do you mean?
[10:49:30] Alec: leitz: NEVER RUN USER INPUT
[10:49:58] leitz: Actually, it might be easier to just convert spaces to underscores and then only allow those and alphanumeric.
[10:50:01] elomatreb: If you just want to substitute characters something simple like String#tr is worth a look
[10:50:46] leitz: Alec, I'm asking the user for a string that will become a filename. Trying to avoid stuff like "/etc/passwd". :)
[10:51:00] leitz: elomatreb, thanks! Going to look now.
[10:51:01] Alec: Why is it ran as root?
[10:51:25] elomatreb: A blacklist of "dangerous" files will not work out in the long run, your OS protects the files
[10:53:07] lupine: if you ensure it's not interpolated, the main thing you have to watch out for is path traversal
[10:53:11] leitz: Why do users do whatever they do? My assumption is that they will behave, but it would be nice to at least put a little protection in.
[10:55:03] noobineer: has joined #ruby
[10:56:02] leitz: I had a PHP form one time. The goal was to help non-computer people enter data. After repeated requests they still put odd characters in some strings. Couldn't get English speaking people to follow plain English.
[10:56:42] elomatreb: I'm not quite sure what the problem you're worried about is btw. Are you creating files?
[10:57:38] lxsameer: has joined #ruby
[11:01:04] lomex: has joined #ruby
[11:02:42] Alec: leitz: don't neglect malicious users
[11:02:58] Alec: leitz: also utf8 are valid file names
[11:03:06] leitz: elomatreb, yes. https://github.com/makhidkarun/ftl_tools/blob/master/bin/build_book#L41
[11:03:07] Alec: You just cant use /
[11:03:44] elomatreb: And 0-bytes. And a bunch more depending on filesystem and/or platform (e.g. NTFS has an infinite number of illegal filenames)
[11:03:45] Alec: That and nullbytes are the only restriction IIRC [there's a length
[11:03:57] leitz: I think the two gems I pushed up to RubyGems this weekend are the wrost ever. However, it pushes me to improve them. ;)
[11:04:01] elomatreb: Or rather, NTFS as used by Windows
[11:04:14] Alec: elomatreb: I did think it went without saying, but I realised 680 people - we're going to have a few auties so ^
[11:05:01] elomatreb: Uh could you not throw slurs around like that please?
[11:05:20] Alec: I don't see it as a slur
[11:05:37] Alec: It's a good thing, I don't think leitz knew it implicitly.
[11:07:13] Alec: I just wanted the credit :P
[11:07:39] leitz: ACTION still waiting for a translation...
[11:07:39] lxsameer: has joined #ruby
[11:08:44] elomatreb: leitz: Looking at your code, the worst that could happen is the user accidentally overwriting a file, but only if they have write access in the first place
[11:09:34] elomatreb: Usually in a case like this the best way to proceed is to print a warning and ask for confirmation, but you can't e.g. end up borking /etc/passwd because a regular user can't do that anyway
[11:10:01] leitz: elomatreb, agreed. The future state I'm worried about is my Ruby skill. I'm putting together a web based game and tool, and that means the webserver has the ability to over-write its own files. I'm trying to learn to prevent that early. :)
[11:11:12] elomatreb: Depending on the data you're storing you're often much better off with a database instead of files, also solves this problem
[11:11:46] leitz: A bit verbose, but this seems to work. https://gist.github.com/LeamHall/bb6ddb7474bcbee0f18fc08b76edf405
[11:12:17] leitz: And yes, elomatreb the database will come. Not that skilled yet though, so things are stored in files.
[11:12:41] elomatreb: But if you do need to store files the usual approach is to both sandbox your application as much as possible, and/or to store files in an "abstract" manner that doesn't directly translate to real-fs paths
[11:12:57] feelx: has joined #ruby
[11:15:04] elomatreb: You also need to reject/remove slashes, otherwise you still end up accidentally references directories. E.g. your example will try to reference a directory called "Now_isnt_a_good_time_to_write_"
[11:15:21] catbusters: has joined #ruby
[11:15:48] leitz: Agreed. I've done some of that, but not as well as I like. '
[11:16:47] leitz: That gsub produces: Now_isnts_a_good_time_to_write_etcpasswd_or_sshid_rsa
[11:17:03] za1b1tsu_: has joined #ruby
[11:17:29] leitz: I realize it's a bit heavy-handed, but if the user doesn't want to play with good form...
[11:17:40] lxsameer: has joined #ruby
[11:18:03] elomatreb: Oh I missed the gsub, lol. That should cover most cases, but you could still end up with weird directories (e.g. `...` is a perfectly valid name, but looks really awkward and hides in ls output)
[11:18:50] leitz: Think it would work if the gsub output is only a file name?
[11:19:10] leitz: "..." characters are removed as well.
[11:19:51] le98: has joined #ruby
[11:19:55] elomatreb: Uh, yeah. Sorry, I've been up all night
[11:20:28] elomatreb: The more you escape/remove though, the more you need to worry about collisions
[11:22:17] leitz: Ha! You should see my typing when I've been up too long or start before the coffee kicks in...
[11:23:33] leitz: The game has an explicit data_dir and the files are written there.
[11:24:29] le98: do you use more oop or fp with ruby :O
[11:25:46] TinkerT: has joined #ruby
[11:25:58] elomatreb: Ruby is object-oriented in all aspects, but you see a lot of patterns that are often described as functional
[11:27:12] le98: but do you think i can largely work with def-s without classes
[11:27:20] le98: basically simulating a common fp
[11:29:58] leitz: le98, you can do a lot of stuff with Ruby. That's part of the joy. I am working on my OOP skills but can still get stuff done with Ruby. I'd suggest you take a few ideas and try to code them in Ruby, without OOP. See if it works for you.
[11:30:26] le98: good idea !
[11:30:28] le98: thanks!!
[11:30:36] leitz: Happy to help!
[11:30:37] elomatreb: You technically can for sure, but defs outside of classes are no less object-oriented than with classes. They define methods on the implicit "main" object
[11:31:14] le98: i know that this is how it works, but if i don't use this property
[11:31:33] le98: it's mostly an interesting design choice
[11:31:40] le98: do people use this fact in a way?
[11:31:52] elomatreb: Your code will quickly become really spaghetti-y probably, but there's nothing stopping your from trying
[11:32:04] elomatreb: Not really no.
[11:32:14] le98: but what is different about e.g. functional languages
[11:32:20] le98: where you have data structures
[11:32:24] le98: and you have functions on them
[11:32:30] le98: and you still have good separation
[11:33:02] elomatreb: 1. Any data structure is also a class, including the primitives like string and integers 2. Major difference to functional languages is that nothing prevents you from causing side effects
[11:34:38] Nicmavr: has joined #ruby
[11:35:41] desperek: has joined #ruby
[11:36:48] le98: ok, i can use classes for data and try to make most functions pure
[11:36:56] le98: i know its not the ruby way just wondering if ppl do it
[11:37:41] c0ncealed2: has joined #ruby
[11:38:04] elomatreb: Certainly, but don't be surprised when people mix and match approaches
[11:43:04] leitz: le98, one of the things I had to learn was to quit worrying so much about what other people think or do. There are some concrete rules like "don't turst user input" and there are a lot of opinions about what you can/should/ought to do with a language.
[11:44:05] leitz: I've had to accept that what I want to do, and how I do it, needs to fit me. It needs to be "good code" in the sense of tests, docs, stability, etc. But it does not have to be "Pure RUby Essence" or how others code.
[11:44:18] leitz: It needs to meet my needs and make me happy.
[11:44:36] leitz: ACTION is still learning that lesson...
[11:46:27] Alec: It depends who they are really
[11:46:36] Alec: Not so much here (although it has other issues) but some channels are FILLED with students
[11:47:11] Alec: Now I was a student once, but I kinda knew that I was also a noob and inexperienced, on Freenode they don't have... like a sense of inexperience.
[11:47:34] Alec: It sounds weird but "it's not arrogance if you're right" - you've just gotta earn your stripes.
[11:48:03] leitz: Alex, agreed. #ruby drove me away from Ruby more than once.
[11:48:13] Alec: Was it a certain operator/
[11:48:23] leitz: Even with the really smart folks here.
[11:49:02] Alec: Anyway there's this thing I call "the hello world gulf" - and it's VERY real, it's the massive gap between real software and noob software, like noob software tends to be single file, very bad at taking input, fragile, ect ect, and it's a difficult thing to cross.
[11:49:35] leitz: The most wearing time was being told to upgrade after I explained that I couldn't. Led to a blog post. http://leamhall.blogspot.com/2016/08/using-ruby-187-for-fun-and-uh-fun.html
[11:49:50] Alec: I actually collect sample projects now which are very simple but "real" programs, for students to cut their teeth on. Sadly I've all but cut my lecturing commitments as the atmosphere at my uni was getting really toxic.
[11:49:51] mim7: has joined #ruby
[11:50:02] Alec: And I'm not like a nazi and that's why it was getting toxic :P
[11:50:18] AJA4350: has joined #ruby
[11:50:24] leitz: Alec: On that "gulf" EXACTLY!!!!! I've been trying to find ways to bridge that gulf.
[11:51:02] Alec: Make stuff.
[11:51:27] leitz: I did some C mentoring for a bit, for others. Trying to find a way to bring it to Ruby with me as Mentee... https://github.com/LeamHall/90DW_mentoring
[11:52:02] Alec: You mentored ...
[11:52:07] fering: has joined #ruby
[11:52:11] Alec: I've really got to work sorry
[11:52:18] Alec: I really enjoyed bitching about noobs with you guys :P
[11:54:53] karapetyan: has joined #ruby
[11:55:12] fering: has left #ruby: ()
[11:57:25] le98: yeah i know but still people with more xp than me can help
[11:57:40] lxsameer: has joined #ruby
[11:58:26] kliq: has joined #ruby
[12:04:43] za1b1tsu_: has joined #ruby
[12:05:28] leitz: Alec, enjoy work!
[12:07:29] aninaki: has joined #ruby
[12:07:39] lxsameer: has joined #ruby
[12:12:20] aninaki: has joined #ruby
[12:14:36] bonhoeffer: has joined #ruby
[12:16:08] leitz: If anyone wants to lead a Mentoring effort, here's one languages path. https://php-mentoring.org/
[12:19:43] Some-body_: has joined #ruby
[12:27:34] lomex: has joined #ruby
[12:29:44] hphat^: has joined #ruby
[12:29:47] Alec: leitz: if it's for PHP (and I mean this)
[12:30:40] Alec: I'd rather take my mentors and lock them in a car, climb in the front seat having put child-lock on, and used socks and a hosepipe to wedge the exhaust into the slightly opened nearest window to me, and pump the accelerator
[12:31:19] leitz: Alec, I'd love to see something similar for Ruby. I know that I don't know, and I know of things I need to know, I just don't know how to structure and prioritize what I need to know to move forward.
[12:31:35] leitz: I like mentoring when I can, and being mentored when I can get it.
[12:31:46] jottr: has joined #ruby
[12:31:54] Alec: If you really want to see something similar I'll pay for an old second hand car.
[12:31:58] Alec: Ideally a VW so it'll be quick
[12:32:36] leitz: You still haven't explained auties.
[12:33:40] Alec: Not my dept.
[12:35:19] leitz: Okay, time to head to church. Back after while. Lots of code work to be done.
[12:35:54] Alec: leitz: I don't think you can mentor really. What I do (which works really really well) is give them one of the sample projects (3rd years ~ 4th in America) and they do it, then they're all smug when they enter my office for the follow up
[12:36:11] Alec: You crush them with all the stuff they missed and the ones that make it are better for it
[12:36:45] Alec: I don't want to give an example though because it taints anyone who may actually do the exercise
[12:37:38] amelliaa: has joined #ruby
[12:39:37] fering2: has joined #ruby
[12:41:30] fering2: has left #ruby: ("AndroIRC")
[12:41:43] quobo: has joined #ruby
[12:43:03] ciscam: has joined #ruby
[12:47:39] lxsameer: has joined #ruby
[12:49:17] Alina-malina: has joined #ruby
[12:51:58] jtdowney: has joined #ruby
[12:53:40] clemens3_: has joined #ruby
[12:56:19] kliq: has joined #ruby
[12:57:36] lxsameer: has joined #ruby
[12:57:41] Zaab1t: has joined #ruby
[13:00:38] feelx-: has joined #ruby
[13:01:49] graphene: has joined #ruby
[13:03:47] leah2: has joined #ruby
[13:04:24] fmcgeough: has joined #ruby
[13:10:40] Hanmac: has joined #ruby
[13:12:37] lxsameer: has joined #ruby
[13:31:03] alfiemax: has joined #ruby
[13:32:49] za1b1tsu_: has joined #ruby
[13:39:33] karapetyan: has joined #ruby
[13:44:58] bonhoeffer: has joined #ruby
[13:51:57] cliq: has joined #ruby
[13:53:13] cliq: has joined #ruby
[13:55:01] kliq: has joined #ruby
[13:57:23] alfiemax: has joined #ruby
[13:57:40] lxsameer: has joined #ruby
[14:08:29] boardfish: has joined #ruby
[14:10:25] GodFather: has joined #ruby
[14:10:34] boardfish: Quick question, I'm getting data from an API in the form of an API::Object provided by the API's gem. How can I use this as an ActiveRecord model, and if not, is there a comparable alternative that'd let me save the objects and access them in the same way?
[14:11:35] boardfish: The big thing really is having them stored in a database and being able to access and manipulate their attributes without having to change the contents of the API object itself.
[14:13:53] subroot: has joined #ruby
[14:18:18] karapetyan: has joined #ruby
[14:22:27] desperek: has joined #ruby
[14:23:51] GodFather: has joined #ruby
[14:25:28] karapetyan: has joined #ruby
[14:27:19] amar: has joined #ruby
[14:35:34] bak1an: has joined #ruby
[14:37:41] lxsameer: has joined #ruby
[14:46:57] amar_: has joined #ruby
[14:47:07] Apocalypse: has joined #ruby
[14:48:30] DLSteve: has joined #ruby
[14:50:11] GodFather: has joined #ruby
[14:54:26] pabs: has joined #ruby
[14:59:49] whiteline: has joined #ruby
[15:03:37] psychicist__: has joined #ruby
[15:17:40] lxsameer: has joined #ruby
[15:25:08] Dimik: has joined #ruby
[15:27:40] lxsameer: has joined #ruby
[15:34:35] karapetyan: has joined #ruby
[15:39:00] amar: has joined #ruby
[15:40:16] conta: has joined #ruby
[15:41:00] salasrod: has joined #ruby
[15:44:18] karapetyan: has joined #ruby
[15:54:15] za1b1tsu_: has joined #ruby
[16:02:34] redlegion: has joined #ruby
[16:06:07] za1b1tsu_: has joined #ruby
[16:07:23] bonhoeffer: has joined #ruby
[16:07:40] lxsameer: has joined #ruby
[16:12:28] redlegion: has joined #ruby
[16:13:06] Mike11: has joined #ruby
[16:15:29] alex``: has joined #ruby
[16:18:47] graphene: has joined #ruby
[16:22:33] redlegion: has joined #ruby
[16:26:35] alfiemax: has joined #ruby
[16:34:45] amar_: has joined #ruby
[16:43:12] bonhoeffer: has joined #ruby
[16:46:49] mikecmpbll: has joined #ruby
[16:47:40] lxsameer: has joined #ruby
[16:49:48] nicht: has joined #ruby
[16:50:57] bonhoeffer: has joined #ruby
[16:52:35] redlegion: has joined #ruby
[16:53:43] za1b1tsu_: has joined #ruby
[16:56:13] desperek: has joined #ruby
[16:59:54] apeiros: has joined #ruby
[17:00:25] rkoller: has joined #ruby
[17:07:32] lomex: has joined #ruby
[17:09:42] hphat^: has joined #ruby
[17:11:13] claudiuinberlin: has joined #ruby
[17:12:32] redlegion: has joined #ruby
[17:12:55] maiz: has joined #ruby
[17:15:02] graphene: has joined #ruby
[17:20:44] c0ncealed2: has joined #ruby
[17:21:13] za1b1tsu_: has joined #ruby
[17:22:27] redlegion: has joined #ruby
[17:23:15] amarks: has joined #ruby
[17:23:34] jrafanie: has joined #ruby
[17:25:18] leitz: has joined #ruby
[17:27:27] leitz: Is there a way to tell unittest to not error on automatic returns?
[17:27:40] lxsameer: has joined #ruby
[17:28:53] leitz: Sorry, "warning".
[17:32:33] redlegion: has joined #ruby
[17:36:03] graphene: has joined #ruby
[17:41:04] npgm: has joined #ruby
[17:43:41] mikecmpbll: has joined #ruby
[17:44:31] graphene: has joined #ruby
[17:51:47] ciscam: has joined #ruby
[17:52:30] redlegion: has joined #ruby
[17:54:13] salasrod: has joined #ruby
[18:06:35] alfiemax: has joined #ruby
[18:07:40] lxsameer: has joined #ruby
[18:12:23] dellavg: has joined #ruby
[18:16:25] edwardly: has joined #ruby
[18:16:26] edwardly: has joined #ruby
[18:17:01] karapetyan: has joined #ruby
[18:17:40] lxsameer: has joined #ruby
[18:25:29] mikecmpbll: has joined #ruby
[18:27:28] FernandoBasso: has joined #ruby
[18:34:03] samosaphile: has joined #ruby
[18:42:29] redlegion: has joined #ruby
[18:44:02] \void: has joined #ruby
[18:54:59] Caerus: has joined #ruby
[18:57:40] lxsameer: has joined #ruby
[18:59:38] ellcs: has joined #ruby
[18:59:51] yxhuvud: has joined #ruby
[19:02:29] redlegion: has joined #ruby
[19:02:33] leitz: has joined #ruby
[19:03:01] Freshnuts: has joined #ruby
[19:05:47] fmcgeough: has joined #ruby
[19:11:19] alfiemax_: has joined #ruby
[19:13:32] orbyt_: has joined #ruby
[19:19:37] karapetyan: has joined #ruby
[19:24:55] graphene: has joined #ruby
[19:26:50] maiz: has joined #ruby
[19:30:24] lomex: has joined #ruby
[19:30:40] bonhoeffer: has joined #ruby
[19:37:38] lxsameer: has joined #ruby
[19:42:31] redlegion: has joined #ruby
[19:45:16] leitz: And the funny for the day. Rearranging code and tests fail. Cursing Matz, every developer I've ever known, and those yet to be born. Then realize I have two libraries with the same name and was using the wrong one...
[19:50:58] whiteline: has joined #ruby
[19:52:52] Freshnuts: has joined #ruby
[19:54:47] zapata: has joined #ruby
[19:58:48] kliq: has joined #ruby
[20:02:34] redlegion: has joined #ruby
[20:12:46] ellcs: has joined #ruby
[20:13:20] jottr_: has joined #ruby
[20:19:32] dviola: has joined #ruby
[20:22:31] redlegion: has joined #ruby
[20:23:11] FernandoBasso: has joined #ruby
[20:24:41] FernandoBasso: Do I need an accessor to print MyClass.foo, when inside the class I have @@foo ?
[20:24:55] GodFather: has joined #ruby
[20:25:25] Furai: has joined #ruby
[20:26:55] za1b1tsu_: has joined #ruby
[20:31:34] elomatreb: FernandoBasso: Yes, everything external needs a method, and attr_accessor will not work with class variables. Generally they're not want you want anyway though
[20:32:27] almdrx: has joined #ruby
[20:32:34] FernandoBasso: So, if I want an accessor, I would have to def self.get_foo; @@foo ; end ?
[20:33:29] elomatreb: Yep, and `def foo=(value)` for the setter
[20:34:41] FernandoBasso: All right. Thanks elomatreb.
[20:34:49] alfiemax: has joined #ruby
[20:35:15] elomatreb: Beware of the slightly weird behavior of class variables when combined with inheritance btw
[20:36:16] GodFather: has joined #ruby
[20:37:54] lxsameer: has joined #ruby
[20:38:54] alfiemax_: has joined #ruby
[20:40:11] lele: has joined #ruby
[20:43:50] jhack: has joined #ruby
[20:47:54] lxsameer: has joined #ruby
[20:52:01] d^sh: has joined #ruby
[20:53:49] GodFather: has joined #ruby
[21:02:01] GodFather: has joined #ruby
[21:02:21] icantc: has joined #ruby
[21:02:41] lxsameer: has joined #ruby
[21:09:24] karapetyan: has joined #ruby
[21:12:39] lxsameer: has joined #ruby
[21:13:16] r29v: has joined #ruby
[21:16:50] GodFather: has joined #ruby
[21:22:31] redlegion: has joined #ruby
[21:24:31] ur5us: has joined #ruby
[21:24:43] apeiros: has joined #ruby
[21:27:50] graphene: has joined #ruby
[21:30:32] ur5us: has joined #ruby
[21:32:34] redlegion: has joined #ruby
[21:33:59] clemens3_: has joined #ruby
[21:34:56] GodFather: has joined #ruby
[21:37:47] jhack: has joined #ruby
[21:38:05] almdrx: has joined #ruby
[21:38:50] clemens3: has joined #ruby
[21:40:24] GodFather: has joined #ruby
[21:44:43] jhack: has joined #ruby
[21:47:54] zenspider: has joined #ruby
[21:51:16] graphene: has joined #ruby
[22:00:34] jhack: has joined #ruby
[22:02:28] redlegion: has joined #ruby
[22:02:52] lxsameer: has joined #ruby
[22:04:15] GodFather: has joined #ruby
[22:07:38] bonhoeffer: has joined #ruby
[22:08:06] GodFather: has joined #ruby
[22:08:19] subroot: has joined #ruby
[22:12:55] lxsameer: has joined #ruby
[22:14:43] GodFather: has joined #ruby
[22:17:24] Puffball: has joined #ruby
[22:21:01] karapetyan: has joined #ruby
[22:24:57] jinie: has joined #ruby
[22:27:58] RougeR: has joined #ruby
[22:27:58] RougeR: has joined #ruby
[22:29:18] scrptktty: has joined #ruby
[22:36:11] _whitelogger: has joined #ruby
[22:39:02] shinnya: has joined #ruby
[22:47:08] orbyt_: has joined #ruby
[22:52:30] redlegion: has joined #ruby
[22:52:39] lxsameer: has joined #ruby
[22:53:23] devyn: has joined #ruby
[22:54:30] alfiemax: has joined #ruby
[22:54:35] jrafanie: has joined #ruby
[22:59:47] psmolen: has joined #ruby
[23:01:15] _aeris_: has joined #ruby
[23:03:54] redlegion: has joined #ruby
[23:09:01] modin: has joined #ruby
[23:09:47] jhack: has joined #ruby
[23:09:52] subr: has joined #ruby
[23:19:58] scrptktty: Question: what is the difference between a library and a framework? Is there a clear distinction?
[23:20:22] Radar: imo frameworks are a collection of libraries
[23:20:35] baweaver: A library does one thing
[23:20:40] Radar: like Rails itself is a framework, but it is made up of the libraries like activesupport / activerecord / etc.
[23:20:50] baweaver: A framework is a collection of libraries to build an application
[23:21:33] scrptktty: But that presupposes modularization?
[23:23:43] scrptktty: For example, Sinatra is not split... It is just one thing.
[23:24:21] baweaver: Sinatra is still made up of multiple libraries
[23:24:37] Radar: sinatra wouldn't work without rack
[23:24:39] apeiros: scrptktty: a framework gives you a frame within which you operate. a library is a toolbox, providing you a couple of tools for a task. that's by what I tend to go :)
[23:25:10] scrptktty: Or shotgun!
[23:25:55] jhack: has joined #ruby
[23:26:02] jhack: has left #ruby: ()
[23:26:13] scrptktty: Thanks! I am trying to wrap my head things.
[23:33:37] zenspider: scrptktty: probably a semantic detail that doesn't actually help you understand things at this point. it's all just code. Just go with it.
[23:34:38] jaequery: has joined #ruby
[23:34:56] alfiemax_: has joined #ruby
[23:42:16] arooni: has joined #ruby
[23:52:02] bga57: has joined #ruby
[23:57:50] jrafanie: has joined #ruby