« Back to channel list

#ruby - 26 September 2015

« Back 1 day Forward 1 day »
[00:00:10] ellisTAA: shevy: to create a set of code that can be reused?
[00:00:44] ellisTAA: oh wait ??? create reusable objects to accept messages ...
[00:00:45] tomphp: has joined #ruby
[00:00:51] stardiviner: has joined #ruby
[00:01:04] BraddPitt: I like to ask them to design a simple OO system (for reference, i was interviewing Java candidates)
[00:01:15] rickmasta: has joined #ruby
[00:01:23] BraddPitt: thats a good question shevy but not really a white boarding one
[00:01:42] ellisTAA: BraddPitt: that seems like pretty long for white boarding ???
[00:01:44] BraddPitt: although it could very easily turn into one with meaningful discussion
[00:02:01] BraddPitt: EllisTAA i tell them psuedocode is ok, I want to see design and implmentation mostly
[00:03:56] voltalio: has joined #ruby
[00:04:39] shevy: EllisTAA well you could store stuff in a module too
[00:04:51] ellisTAA: shevy: true but u can???t send it messages
[00:05:17] shevy: what in ruby accepts messages
[00:05:37] yxhuvud: shevy: everything!
[00:05:38] shevy: is a module an object
[00:05:45] ellisTAA: then what???s a class
[00:05:55] shevy: an object
[00:05:56] ellisTAA: a blueprint for objects?
[00:06:03] shevy: yeah that as well
[00:06:19] shevy: ruby is the most prototypic class-based programming language I know of
[00:06:24] dstarh: has joined #ruby
[00:07:03] shevy: EllisTAA the distinction between classes and modules is somewhat arbitrarily; you can't instantiate from a module, and you can't include a class into another class, but you can subclass
[00:07:06] yxhuvud: shevy: you obviously doesn't know of smaltalk
[00:07:21] yxhuvud: or if you focus on the prototype part, self or lua.
[00:07:35] shevy: with its awesome tables
[00:07:41] tkuchiki: has joined #ruby
[00:07:41] ellisTAA: what???s your go to algorithm question for interviewees
[00:07:55] shevy: levensthein distance!
[00:09:07] shevy: EllisTAA gem itself has something about that
[00:09:49] shevy: let's give it a try
[00:09:50] shevy: >> require 'rubygems/text'; include Gem::Text; levenshtein_distance 'EllisTAA', 'Ellis'
[00:09:51] ruboto: shevy # => 3 (https://eval.in/439887)
[00:10:18] platzhirsch: Whiteboard interviews demonstrate the broken state of interviews
[00:10:33] shevy: they just wanna torture somebody
[00:10:47] shevy: poor EllisTAA
[00:10:48] yxhuvud: I don't know, I do reasonably well with them.
[00:11:04] ellisTAA: i dont mind them
[00:11:05] shevy: do you have to do lots of interviews?
[00:11:43] j4cknewt_: has joined #ruby
[00:12:16] platzhirsch: I'd give them a take away thing to implement and then you can discuss the implementation, optimization potentials, maybe even do a pairing session on the code
[00:14:42] _rukh: has joined #ruby
[00:15:36] platzhirsch: based such an interview this was created: https://github.com/platzhirsch/aquanaut
[00:16:20] platzhirsch: no one starred it. I hate the Internet
[00:16:28] n008f4g_: has joined #ruby
[00:18:11] `based_pdev`: has joined #ruby
[00:18:31] BraddPitt: I agree platzhirsch
[00:18:34] icole: has joined #ruby
[00:18:35] BraddPitt: re; how bad whiteboarding is
[00:18:57] shevy: platzhirsch I only watch or don't watch!
[00:19:49] platzhirsch: don't feel flattered
[00:20:06] shevy: I can't keep up well with web-traffic :(
[00:22:18] _rukh: has left #ruby: ()
[00:25:58] devoldmx: has joined #ruby
[00:26:52] girl25usapic: has joined #ruby
[00:28:52] SCHAAP137: has joined #ruby
[00:28:53] SCHAAP137: has joined #ruby
[00:29:08] voltalio: has joined #ruby
[00:29:49] ellisTAA: platzhirsch: ???no one starred it. i hate the internet??? lol
[00:30:17] platzhirsch: yeah fuck this shit
[00:30:38] platzhirsch: I spend 4 days working on this project and no one cared, that's why I became a Node.JS developer
[00:30:48] Bish: is there any way how x = x.gsub(...) and x.gsub!(...)
[00:30:50] Bish: beave differently?
[00:30:50] platzhirsch: aka hipster macbook homeless coder
[00:31:38] nofxx: platzhirsch, you didn't include a screenshot
[00:31:44] nofxx: and tweeted it
[00:31:46] Musashi007: lol what is hipster macbook homeless coder
[00:31:57] platzhirsch: nofxx: the screenshot is 404'ing at the moment
[00:32:23] c0ncealed: has joined #ruby
[00:32:24] platzhirsch: Musashi007: if you ever see a software developer in a Starbucks coffee who's implementing a web app with node and mongo, you know
[00:32:29] nofxx: platzhirsch, a screenshot worth WAY, but WAY more than code. In star rate.
[00:32:44] houhoulis: has joined #ruby
[00:33:06] Musashi007: @platzhirsch living in the bay area.. i???ve _never_ seen one of those.. lol
[00:33:21] platzhirsch: good, how' the bay area?
[00:33:32] platzhirsch: I heard it's always cold there, still would like to move there
[00:33:37] Musashi007: overpriced, pretentious
[00:33:42] Musashi007: crowded, etc
[00:33:42] platzhirsch: mono-culture?
[00:33:46] casadei: has joined #ruby
[00:33:54] BraddPitt: bay area is wonderful
[00:33:56] Musashi007: wouldnt??? say that
[00:33:57] platzhirsch: Good, I want to live there for a bit and offend people
[00:34:56] Musashi007: whre are you living presently
[00:35:02] c0ncealed: has joined #ruby
[00:35:10] weemsledeux: has joined #ruby
[00:35:48] Musashi007: I feel like that???s a wonderful place to offend people
[00:36:04] paulcsmith: has joined #ruby
[00:36:15] platzhirsch: I always thought there is less culture in the Bay Area
[00:36:58] BraddPitt: there is much more culture in Bay Area than Anywhere Suburban, USA
[00:37:00] Musashi007: define.. culture?
[00:37:22] casadei: has joined #ruby
[00:38:17] pwnd_nsfw: You know.. more minorities that do things in public places
[00:38:35] platzhirsch: Art, different sub-cultures, different kinds of people, different areas, rich, poor, something in between, a political atmosphere, alternatives to.. everything, vibrant community, and change
[00:38:39] bkulbida: has joined #ruby
[00:38:53] Musashi007: yeah there???s all that.
[00:39:02] Musashi007: its a melting pot.. :P
[00:39:05] Tuxero: has joined #ruby
[00:39:20] platzhirsch: I thought it's all overpriced and there's only the middle-class left with their Google Buses
[00:39:33] platzhirsch: clearly I have read too many cliches, another reason try to obtain a visa to live there
[00:39:59] nofxx: platzhirsch, it's a lil slow....waiting =D also... anchors take the same time. Maybe some cache?
[00:40:17] Musashi007: no there???s definitely a lot of rich and poor
[00:40:32] Musashi007: latin culture has a heavy influence as does many asian cultures
[00:40:55] platzhirsch: nofxx: wow, you checked it out? Yeah not sure, it's using typhoeus, should be pretty fast
[00:40:57] nofxx: platzhirsch, also if you allow me two UI cents: only `aquanaut` could give me a nice intro, some options
[00:41:51] Azure: has joined #ruby
[00:42:04] nofxx: and on yr initializer: url = "http://#{url}" unless url =~ r${^\w+://}
[00:43:02] nofxx: the world defaults to http =D
[00:43:19] Kitsunitchi: has joined #ruby
[00:43:47] platzhirsch: nofxx: where is it actually?
[00:43:55] platzhirsch: oh for usage you mean?
[00:44:04] c0ncealed: has joined #ruby
[00:44:08] nofxx: platzhirsch, don't know... yeah, so I can aquanaut foo.com
[00:44:39] nofxx: platzhirsch, and a last one... message... I just run in my 500+ folder home... what did it created? hehe
[00:45:01] nofxx: ./sitemap ;)
[00:45:03] evanjs: has joined #ruby
[00:45:15] Tuxero: has joined #ruby
[00:45:33] platzhirsch: oh no, really bad. It should do foo.com/sitemap
[00:45:47] platzhirsch: wow, I really sucked two years ago. I wouldn't have hired myself
[00:46:17] davedev24: has joined #ruby
[00:47:35] karapetyan: has joined #ruby
[00:48:21] ellisTAA: platzhirsch: so effing mono culture it???s depressing
[00:49:26] shevy: platzhirsch would you hire yourself nowadays?
[00:49:35] platzhirsch: nofxx: thanks in any case, much appreciated
[00:49:55] platzhirsch: shevy: well, I learned a shit load, still feels like I know nothing
[00:50:05] Tuxero: has joined #ruby
[00:50:40] Kitsunitchi: has left #ruby: ()
[00:50:56] yfeldblum: has joined #ruby
[00:51:05] ellisTAA: platzhirsch: cmon platz ur prbly a boss coder
[00:52:03] eam: bay area tech is historically known for being one of the more diverse areas of industry -- in the 80s and 90s there was panic because of how many folks were coming over on work visas -- I think we have something like 600k H1Bs in the bay area at any given time?
[00:52:18] Oka: has joined #ruby
[00:52:25] eam: it's rad; we have amazing food in the south bay because of it :)
[00:53:21] platzhirsch: Because all the H1B visas are occupied by chefs?
[00:53:29] platzhirsch: no wonder I didn't get one
[00:53:44] eam: because it's been going on for decades and a huge number of them naturalize
[00:54:04] eam: food service springs up to serve demand
[00:54:40] eam: go even one state over and cuisine thins out substantially
[00:55:01] eam: (along with the culture variance)
[00:55:45] bronson: has joined #ruby
[00:55:46] platzhirsch: great to here some statements from people who are currently living there
[00:55:49] yfeldblum: has joined #ruby
[00:55:54] eam: I have to laugh a bit when I see the "no diversity in tech" headlines because it wasn't that long ago when the headlines were in a panic about a completely opposite situation
[00:56:15] eam: (and the demographics haven't changed)
[00:56:16] platzhirsch: yeha peple tend to forget with click bait journalism
[00:57:04] Bish: can prevent gsub from "double"-substitute things?
[00:57:07] eam: been doing this for a while; have many friends who've come over decades ago to work and now are citizens
[00:57:42] eam: Bish: if you want it just once: sub
[00:57:48] eam: gsub is "global" or repeated
[00:58:07] eam: the //g regex flag equiv from other languages
[00:58:56] platzhirsch: I thought I'd start applying again by the end of this year, but I am quite happy with my current company, still learning too much, hard to get out :)
[00:59:27] Bish: eam i actually thought about that.. didn't even know that existed
[00:59:30] charliesome: has joined #ruby
[00:59:32] tmtwd: has joined #ruby
[00:59:40] eam: platzhirsch: you said you're chasing an h1b? Where are you coming from?
[01:00:00] daveomcd: has joined #ruby
[01:00:12] eam: that's a pretty damn nice place to work :)
[01:00:32] Bish: is copying a string with .dup the right thing to do.. when not wanting to have the same referenced object?
[01:00:38] Musashi007: where are you applying platz
[01:00:40] platzhirsch: A lot of people from East London move there, because it's much more affordable
[01:00:46] KensoDev: has joined #ruby
[01:00:55] eam: Bish: sure
[01:00:56] iateadonut: has joined #ruby
[01:00:58] platzhirsch: Musashi007: nowhere, I don't have a favourite startupin the states anymore
[01:01:34] roxtrongo: has joined #ruby
[01:01:51] jenrzzz: has joined #ruby
[01:01:55] Bish: eam isn't there another operator to do it? so it looks nice? like instead of having to do str2 = str1.dup, maybe str2 |= str1
[01:02:28] elshaka: has joined #ruby
[01:02:49] eam: well, "" constructs a new string so you could str2 = "#{str1}"; or maybe str2 = str1 + ""
[01:03:00] eam: but .dup is the cleanest and by far the fastest I think
[01:04:13] Bish: hm okay, but know when i use .sub instead of .gsub only the firce occurance will be substituded, right?
[01:04:27] eam: the most important thing is to convey intent. Any other operator which happens to construct a new string -- perhaps it's not clear that the side effect is what you're after
[01:04:38] eam: #dup clearly says "I intend to copy this"
[01:04:45] eam: Bish: yes
[01:04:50] eam: (also, just try it!)
[01:04:57] Kallis: has joined #ruby
[01:07:38] baweaver: has joined #ruby
[01:07:41] Bish: i did, but im unhappy with the result http://pastebin.com/djSKnH5T
[01:07:41] ruboto: Bish, as I told you already, please use https://gist.github.com
[01:08:30] Bish: if im using gsub there, it will transform the link, over and over
[01:08:33] [k-: ruboto has a personality now :o
[01:08:41] Bish: yeah and it hates me.
[01:09:32] platzhirsch: eam: do many live by themselves or live in shared flats/houses?
[01:09:51] Bish: will i have to do it a more explicit way, or can i have it nice and soft, like it is there?
[01:11:20] charliesome: has joined #ruby
[01:14:23] crunk_bear: has joined #ruby
[01:15:32] jenrzzz: has joined #ruby
[01:16:38] renderful: has joined #ruby
[01:17:06] Bish: im an idiot. i got it know. thanks for the help!
[01:17:25] Bish: s/know/"know"[1..-1]
[01:17:38] platzhirsch: that's some kickass vim skill
[01:18:14] icole: has joined #ruby
[01:19:04] platzhirsch: I gave up on Ruby vim, too much struggle with different Ruby versions
[01:20:36] charliesome: has joined #ruby
[01:20:48] c0ncealed: has joined #ruby
[01:20:48] [k-: use only legible constructs
[01:20:59] [k-: that way, they don't get removed
[01:21:16] [k-: don't rely on misbehaviour
[01:21:19] fullofcaffeine: has joined #ruby
[01:21:29] paulcsmith: has joined #ruby
[01:22:25] fullofcaffeine: has joined #ruby
[01:23:25] tkuchiki: has joined #ruby
[01:23:38] mary5030: has joined #ruby
[01:24:04] skweek: has joined #ruby
[01:24:08] Kallis: has joined #ruby
[01:26:02] atomical: has joined #ruby
[01:26:48] TTilus: has joined #ruby
[01:26:59] devoldmx: has joined #ruby
[01:28:22] icarus: has joined #ruby
[01:28:47] mary5030: has joined #ruby
[01:29:08] Kallis: has joined #ruby
[01:41:18] agent_white: has joined #ruby
[01:41:27] eam: platzhirsch: yeah that's fairly common
[01:41:47] agent_white: Evenin' folks
[01:41:48] devbug: has joined #ruby
[01:42:50] nahtnam: has joined #ruby
[01:44:39] FrankD: has joined #ruby
[01:44:47] FrankD: has joined #ruby
[01:45:13] c0ncealed: has joined #ruby
[01:45:44] evanjs: has joined #ruby
[01:45:49] D9: has joined #ruby
[01:46:41] devoldmx: has joined #ruby
[01:46:59] platzhirsch: alrighty, good night folks
[01:47:29] platzhirsch: has left #ruby: ()
[01:51:23] devoldmx: has joined #ruby
[01:53:41] tkuchiki: has joined #ruby
[01:54:16] Rollabunna: has joined #ruby
[01:54:40] Scripore: has joined #ruby
[01:55:29] kmehta: has joined #ruby
[01:56:39] bronson: has joined #ruby
[01:57:05] weemsledeux: has joined #ruby
[01:59:42] wldcordeiro: has joined #ruby
[02:02:21] Maletor: has joined #ruby
[02:03:48] definiv: has joined #ruby
[02:04:24] tawaffan: has joined #ruby
[02:05:58] Musashi007: has joined #ruby
[02:07:39] j4cknewt: has joined #ruby
[02:08:53] rickmasta: has joined #ruby
[02:09:13] tkuchiki: has joined #ruby
[02:10:35] brnpcn: has joined #ruby
[02:11:54] RegulationD: has joined #ruby
[02:14:07] charliesome: has joined #ruby
[02:16:31] wldcordeiro: has joined #ruby
[02:16:40] nfk|laptop: has joined #ruby
[02:17:48] bruno-: has joined #ruby
[02:18:49] achamian: has joined #ruby
[02:18:52] iamninja: has joined #ruby
[02:19:51] devbug_: has joined #ruby
[02:20:04] diegoviola: has joined #ruby
[02:21:21] UtkarshRay: has joined #ruby
[02:25:07] drewvanstone: has joined #ruby
[02:30:45] tejasmanohar: has joined #ruby
[02:32:09] The_Phoenix: has joined #ruby
[02:32:29] nanoz: has joined #ruby
[02:35:47] evanjs: has joined #ruby
[02:36:49] arescorpio: has joined #ruby
[02:37:27] fullofcaffeine: has joined #ruby
[02:38:59] swgillespie: has joined #ruby
[02:42:19] grotewold: has joined #ruby
[02:44:52] favadi: has joined #ruby
[02:44:54] grotewold: has joined #ruby
[02:46:17] j4cknewt: has joined #ruby
[02:47:02] j4cknewt: has joined #ruby
[02:51:43] otacon-: has joined #ruby
[02:55:40] robh71: has joined #ruby
[02:58:26] tkuchiki: has joined #ruby
[03:00:20] charliesome: has joined #ruby
[03:00:40] mrtomme: has joined #ruby
[03:01:20] gener1c: has joined #ruby
[03:01:21] thejamespinto: has joined #ruby
[03:03:37] bazbing80: has joined #ruby
[03:05:00] devoldmx: has joined #ruby
[03:06:45] icole: has joined #ruby
[03:08:01] devoldmx_: has joined #ruby
[03:08:13] devbug: has joined #ruby
[03:08:20] CloCkWeRX: has joined #ruby
[03:08:25] CloCkWeRX: has left #ruby: ()
[03:08:37] grotewold: has joined #ruby
[03:09:48] braincrash: has joined #ruby
[03:10:34] helpa: has joined #ruby
[03:10:59] rickmasta: has joined #ruby
[03:11:39] baweaver: has joined #ruby
[03:12:58] rrichardsr3: has joined #ruby
[03:13:26] jdawgaz: has joined #ruby
[03:13:56] darkf: has joined #ruby
[03:15:59] mary5030: has joined #ruby
[03:17:44] bazbing80: I've created a command for my Gem in my 'bin' directory...but it can't require files from my project. I get a LoadError, saying it can't find the file. Really weird because if I puts a Dir.pwd, Dir.pwd says we're exactly where the file is...so why is require not requiring specified files? If I do require_relative and reverse out of the bin directory and into my lib it works, but I want to know why require isn't working...
[03:19:06] robh71: has joined #ruby
[03:19:20] TheWhip: has joined #ruby
[03:19:24] mary5030: has joined #ruby
[03:20:20] mary5030_: has joined #ruby
[03:20:49] mary5030_: has joined #ruby
[03:21:42] psy: has joined #ruby
[03:22:05] bnizzle: has left #ruby: ()
[03:22:56] psy: has joined #ruby
[03:23:21] Gnomethrower: has joined #ruby
[03:25:26] charliesome: has joined #ruby
[03:27:16] helpa: has joined #ruby
[03:27:25] sdothum: has joined #ruby
[03:33:10] parduse: has joined #ruby
[03:33:35] gix: has joined #ruby
[03:36:26] karapetyan: has joined #ruby
[03:40:35] aaeron: has joined #ruby
[03:43:10] tkuchiki: has joined #ruby
[03:43:31] devoldmx: has joined #ruby
[03:43:53] michael_mbp: has joined #ruby
[03:46:58] diego2: has joined #ruby
[03:48:54] devoldmx: has joined #ruby
[03:54:58] dopie: has joined #ruby
[03:56:15] sdothum: has joined #ruby
[03:57:34] subshad: has joined #ruby
[03:58:29] bronson: has joined #ruby
[03:58:43] Musashi007: has joined #ruby
[03:59:38] soosfarm: has joined #ruby
[04:05:03] grotewold: has joined #ruby
[04:05:58] Igorshp: has joined #ruby
[04:07:27] icole: has joined #ruby
[04:07:34] grotewold: has joined #ruby
[04:10:01] grotewold: has joined #ruby
[04:11:12] sam_weerasinghe: has joined #ruby
[04:12:34] sam_weerasinghe: is this a bug? https://gist.github.com/oystersauce8/77880817aae999a13577
[04:12:53] grotewold: has joined #ruby
[04:12:57] RegulationD: has joined #ruby
[04:13:33] abra0: has joined #ruby
[04:13:49] chipotle: has joined #ruby
[04:14:54] evanjs: has joined #ruby
[04:16:56] jordanm: sam_weerasinghe: I think it's probably windows mangling unicode in environment variables
[04:17:07] braincra-: has joined #ruby
[04:18:16] grotewold: has joined #ruby
[04:18:22] Aces1up: has joined #ruby
[04:19:04] Aces1up: hello i have a long string with multiple newlines i am writing to a socket, what should i use to make sure I send the whole string? puts, and gets on the server cut the string at the first newline
[04:19:19] pen: has joined #ruby
[04:19:26] iamninja: has joined #ruby
[04:19:28] Aces1up: what io method should i use both to write the string and read the string on the server side?
[04:21:01] grotewold: has joined #ruby
[04:23:34] grotewold: has joined #ruby
[04:24:51] stardiviner: has joined #ruby
[04:26:37] last_staff: has joined #ruby
[04:26:47] Coldblackice: has joined #ruby
[04:27:56] dopie: has joined #ruby
[04:29:57] fullofcaffeine: has joined #ruby
[04:31:27] eam: aces1up: syswrite
[04:31:34] LatoSans: has joined #ruby
[04:31:48] quazimodo: has joined #ruby
[04:33:52] casadei: has joined #ruby
[04:34:15] Cork: has joined #ruby
[04:37:18] tkuchiki: has joined #ruby
[04:37:42] Aces1up: eam how can i do sysread on server end if I do not know how many bytes were sent?
[04:43:21] fullofcaffeine: has joined #ruby
[04:48:09] Guest36_: has joined #ruby
[04:52:29] j4cknewt_: has joined #ruby
[04:53:30] poguez_: has joined #ruby
[04:54:17] tmtwd: has joined #ruby
[04:54:44] tejasmanohar_: has joined #ruby
[04:54:49] [k-: bazbing80: require only checks the load path
[04:55:01] otacon-: has joined #ruby
[04:55:08] [k-: as of some ruby version, the current directory is no longer part of the load path
[04:57:50] jenrzzz: has joined #ruby
[04:59:21] bronson: has joined #ruby
[05:00:36] Musashi007: has joined #ruby
[05:03:07] blur3d: has joined #ruby
[05:06:53] ruby-lang514: has joined #ruby
[05:10:08] aaeron: has joined #ruby
[05:13:18] Guest36_: I'm new here, is anyone in?
[05:14:30] darkf: nope, not a soul
[05:14:36] nofxx: Guest36_, there was a guy here, but you missed him by just some minutes
[05:14:56] Guest36_: someone in my cohort for ruby programming referred me here.
[05:15:11] Guest36_: seems like its active at like midnight.
[05:15:41] Guest36_: I'm listening to the rules right now.
[05:16:57] roxtrongo: has joined #ruby
[05:17:23] NeverDie: has joined #ruby
[05:19:24] yardenbar: has joined #ruby
[05:19:59] Guest36_: So, I'm looking into swapping from basically front-end to full stack. I have questions directly related to code but, I'll save those for another day. What I'm curious about now is where is a great place to build up on just general programming logic?
[05:21:07] Guest36_: I'm just now ending week six, I've learned a ton. But, we are lacking assistance in the school, which might've been why I was accepted because they want to turn me into a T.A. of sorts.
[05:21:39] Guest36_: I learn the fastest while being taught by a mentor in person, but that is a resource thats lacking.
[05:22:30] Guest36_: I'm not here to leech, but I don't have too much to offer towards ruby. I know more about javascript, html, css and jquery.
[05:23:23] Guest36_: Really getting to know my peers and how professional ruby developers conduct business is something I deem extremely valuable right now.
[05:24:22] Guest36_: Today I successfully wrote a hash straight from repetition, which felt great. But that is no where near enough!
[05:25:15] Guest36_: I've just been asserting my patience, and meditating to stay calm. But with 5 weeks left before I start a job search, I seriously need more insights A.S.A.P.
[05:26:04] UtkarshRay: has joined #ruby
[05:26:44] Guest36_: even insights on starting freelancing and getting people to let me build them projects for free so I can get reviews would be awesome. I've attempted this before, but clearly my presentation sucked!
[05:26:53] nofxx: Guest36_, find something you find cool, search for a gem if it exists fork, if not create a new one
[05:27:14] nofxx: there's no learning as working on it learning
[05:28:33] Guest36_: a mentor suggested a write a gem, but I feel like I have no where to begin. But I guess I can just make something pointless for practice even as a beginner right?
[05:30:05] nofxx: Guest36_, yeah.. but you find you like and is going to use, enthusiasm might join necessity.
[05:30:24] nofxx: Guest36_, but first, get a nickname for irc
[05:32:03] Guest36_: has left #ruby: ("Textual IRC Client: www.textualapp.com")
[05:32:23] Guest36_: has joined #ruby
[05:33:37] Guest36_: hmm must be taken
[05:34:38] Ambidexter: ok, i'm guest36 now known as Ambidexter
[05:36:10] roxtrongo: has joined #ruby
[05:37:14] weemsledeux: has joined #ruby
[05:38:05] Ambidexter: haha, writing my own gem seems complicated.
[05:38:15] dnewkerk: has joined #ruby
[05:38:32] Ambidexter: know of any good walkthroughs to get me started?
[05:39:01] Ambidexter: like it seems easy but complicated.
[05:39:13] karapetyan: has joined #ruby
[05:39:54] karapetyan: has joined #ruby
[05:40:51] yottanami: has joined #ruby
[05:41:24] aerozeppelin: has joined #ruby
[05:42:04] roxtrongo: has joined #ruby
[05:44:47] Ebok: Ambidexter, It depends on how much knowledge you have about Ruby.
[05:46:25] Ebok: If you would say you've virutally none, then I'd suggest walking through some of the basic tutorials. codeacedemy, rubymonk, read through this: https://pine.fm/LearnToProgram/chap_00.html.
[05:48:09] abra0: has joined #ruby
[05:48:24] Ebok: If you have enough experience that what you're looking for is more complicated, then I'd start looking through rubydoc line by line and playing with the methods you dont immediately understand. Or looking through gems online to see how they were created. The tutorials and rubydoc together should provide most of that you need to "read" the basic gems. Probably.
[05:49:22] karapetyan: has joined #ruby
[05:50:08] tkuchiki: has joined #ruby
[05:54:02] Feyn: has joined #ruby
[05:55:40] icole: has joined #ruby
[05:56:20] icarus_: has joined #ruby
[05:57:24] Ambidexter: Alright, thanks man.
[05:58:01] Ambidexter: I am not a absolute beginner but I feel kind of like it.
[05:58:17] Ebok: I am. lol. I've been doing this language for about... 4 weeks?
[05:58:39] Ebok: Note: all the references xD
[05:58:43] jackjackdripper: has joined #ruby
[05:58:53] Ebok: Heh. I could probably dig up more. I learned alot via google and github
[05:59:17] Ebok: smartly worded questions are normally already answered somewhere, for the ones you need specific feedback for, you've got here.
[05:59:21] Ambidexter: I'm a dev bootcamp, I had little programming experience coming here for a full stack class.
[05:59:43] Ebok: I'm attempting to get into a bootcamp xD
[05:59:51] Ambidexter: do you have any programming background prior to ruby?
[06:00:05] Ambidexter: I have a massive archive of resources I'm just building up on
[06:00:17] Ambidexter: not just ruby though
[06:00:23] Ebok: "for fun" programming knowledge, yeah. I've some very basic java, and I'm practiced at reading code in most languages
[06:00:31] Ambidexter: the more the merrier though
[06:00:34] bronson: has joined #ruby
[06:00:45] Ebok: I've written basic html, css stuff, but I dont really count that
[06:01:10] Ambidexter: I was basically brainwashed by snippets so I'm having to rewrite how I try to solve problems.
[06:01:18] Ambidexter: so much anxiety.
[06:01:44] Ambidexter: I build a habit and its essentially a crutch.
[06:01:56] Ambidexter: only have broken it barely, and its amazing painful.
[06:02:02] Ebok: I would think the more languages you know, the less you can just depend on hanbits
[06:02:57] Ambidexter: understandable, however my habit is that I just throw stuff together until it works, I did this for 6 years and never actually wrote a single line of code until like 6 weeks ago lol.
[06:02:58] Ebok: I dunno. I find all of the code rather fascinating, and for these past weeks I've been kicking myself for not getting into this like... a decade ago.
[06:03:13] Ebok: That' lol.
[06:03:18] Ebok: That's pretty painful yeah
[06:04:07] Ebok: All I really know, is that since I've picked this up, I'm positive that I will be doing this for a living. eventually.
[06:04:08] Ambidexter: I get straight up anxiety attacks from it lol.
[06:04:21] Ebok: Nah, code makes me calm down... unless its a test
[06:04:32] Ambidexter: I won't be broken down haha.
[06:04:35] grotewold: has joined #ruby
[06:04:37] Ebok: tests I didnt mean to turn on, mostly.
[06:04:55] Ambidexter: me too, unless in writing it by hand, which is what I'm working my hardest to reverse.
[06:05:05] Ebok: I've have now twice, started an admissions test on accident.
[06:05:26] Ebok: Nah, for a bootcamp
[06:06:01] Ambidexter: I spent a year finding the best fit for me.
[06:06:17] Ebok: Same one, its a multistep process. I figure best not to name camps or tests specifically.
[06:06:19] Ambidexter: before the archives where polished out more.
[06:06:34] Wolland: has joined #ruby
[06:07:23] Ambidexter: I am kind of working on starting my own programmer society
[06:07:34] Ambidexter: don't really know where to begin lol
[06:07:39] pyon: has joined #ruby
[06:07:42] Ebok: Where do you want to end?
[06:08:23] KnownSyntax: has joined #ruby
[06:08:24] grotewold: has joined #ruby
[06:08:31] Ambidexter: with a reliable, friendly and loyal but small network.
[06:08:42] Ambidexter: loyal to all, and I don't want there to be a leader.
[06:08:50] Ambidexter: accept for organizing meetings.
[06:08:56] Ebok: Sounds like you want to work for a company
[06:09:27] avril14th: has joined #ruby
[06:09:29] Ambidexter: I do, but I also want this to be underground but also in person.
[06:09:46] Ebok: Hm. Well, get a club house.
[06:09:55] Ambidexter: haha not a bad idea.
[06:10:22] Ambidexter: I'd like for each member to have good connects via online social networks too.
[06:10:26] abra1: has joined #ruby
[06:10:49] Ebok: really though, geta club house, put good tech in it, get a damned good lock or some great insurance, and bring in the recruits. Get projects, hivemind the issues of any person, and forward.
[06:10:50] Ambidexter: so we each can bring a new side of this abundant programming world into one form of brainstorming.
[06:11:22] grotewold: has joined #ruby
[06:11:34] Ambidexter: that's right up my lane. haha
[06:12:07] Ebok: Otherwise, to do this sort of thing online. Loyalty is illusory, and small is relative.
[06:12:18] Ebok: You might have to alter the goals slightly xD
[06:12:31] abra0: has left #ruby: ("????")
[06:12:32] Ambidexter: I figured if each of us is associated with a entirely different network, then when we do get stuck we can ask questions to a mass amount of hubs simultaneously.
[06:12:43] Ebok: Whenever I want to start a project, I obey the following quote: "To do it, do it"
[06:12:56] Ambidexter: yeah, i'm flexible in it haha.
[06:13:10] icarus_: has joined #ruby
[06:13:55] RegulationD: has joined #ruby
[06:14:06] grotewold: has joined #ruby
[06:14:29] tkuchiki: has joined #ruby
[06:14:30] Ambidexter: I see it being a small in person gathering, maybe 20 members 5 at a time all with entirely different outreaches to communities, just so we can also find each others communities but to kind of focus efforts in different regions.
[06:14:53] Ambidexter: Just a way of spreading seeds out as far as possible and setting a standard I guess.
[06:15:05] Ebok: start at the beginning.
[06:15:13] Ebok: Get someone else you know involved
[06:15:27] Ambidexter: that'll all be down the line probably. Although joining an underground ruby community would be helpful probably.
[06:15:37] Ebok: Build up one by one, and let everyone make it into something. I expect every person that stays will change its direction
[06:16:00] Ambidexter: I'm just now starting to build my connections here, Once I get to know people better I'll present the idea to some people I trust.
[06:16:01] grotewold: has joined #ruby
[06:16:36] Ambidexter: for sure Ebok, communities are developed around the users typically.
[06:17:24] ehth77: has joined #ruby
[06:17:32] Ebok: Anyhow, goodluck!
[06:17:50] Ambidexter: thanks a bunch man, glad to brainstorm and unwined haha
[06:18:53] grotewold: has joined #ruby
[06:19:12] Ambidexter: I put you in my irc freenodes list, hopfully its like adding you so we can talk again later.
[06:19:19] bruno-: has joined #ruby
[06:20:24] iamninja: has joined #ruby
[06:20:30] Ebok: I'll be here under this nick often enough
[06:20:35] davedev24: has joined #ruby
[06:21:07] arup_r: has joined #ruby
[06:21:16] Ambidexter: Alright cool, I'll be here as this alias often too. Probably hop around, Although I prob don't need too
[06:21:48] grotewold: has joined #ruby
[06:22:49] Gustavo: has joined #ruby
[06:23:06] casadei: has joined #ruby
[06:23:50] ramfjord: has joined #ruby
[06:27:04] michael_mbp: has joined #ruby
[06:27:54] icarus_: has joined #ruby
[06:28:48] michael_mbp: has joined #ruby
[06:29:41] ehth77: has joined #ruby
[06:31:27] devoldmx: has joined #ruby
[06:32:20] ruby-lang338: has joined #ruby
[06:34:46] j4cknewt: has joined #ruby
[06:38:09] ehth77: has joined #ruby
[06:38:47] xgoo: has joined #ruby
[06:39:36] icarus_: has joined #ruby
[06:41:39] iyan: has joined #ruby
[06:41:51] grotewold: has joined #ruby
[06:43:09] dionysus69: has joined #ruby
[06:43:27] skade: has joined #ruby
[06:43:58] rippa: has joined #ruby
[06:44:28] grotewold: has joined #ruby
[06:46:28] pawanspace: has joined #ruby
[06:46:53] jun_0237497: has joined #ruby
[06:46:53] chipotle: has joined #ruby
[06:47:02] grotewold: has joined #ruby
[06:50:42] drptbl: has joined #ruby
[06:51:31] Rodya_: has joined #ruby
[06:53:11] grotewold: has joined #ruby
[06:54:26] fedexo: has joined #ruby
[06:55:39] grotewold: has joined #ruby
[06:59:52] n008f4g_: has joined #ruby
[07:01:14] bronson: has joined #ruby
[07:02:52] DexterLB: has joined #ruby
[07:05:02] karapetyan: has joined #ruby
[07:07:10] Anti-Pizza: has joined #ruby
[07:09:10] TheHodge: has joined #ruby
[07:10:48] abuzze: has joined #ruby
[07:12:39] drptbl: has joined #ruby
[07:14:02] quazimodo: has joined #ruby
[07:15:24] tkuchiki: has joined #ruby
[07:18:21] moeabdol: has joined #ruby
[07:23:05] Timba-as: has joined #ruby
[07:23:15] grotewold: has joined #ruby
[07:23:46] karapetyan: has joined #ruby
[07:24:12] beast: has joined #ruby
[07:24:29] avril14th: has joined #ruby
[07:25:03] djbkd: has joined #ruby
[07:26:01] grotewold: has joined #ruby
[07:26:13] Salehi: has joined #ruby
[07:28:12] decoponio: has joined #ruby
[07:28:42] grotewold: has joined #ruby
[07:28:54] karapetyan: has joined #ruby
[07:29:39] Feyn: has joined #ruby
[07:29:44] charliesome: has joined #ruby
[07:31:24] quazimodo: has joined #ruby
[07:31:49] psy: has joined #ruby
[07:33:59] girl25usapic: has left #ruby: ()
[07:34:10] grotewold: has joined #ruby
[07:37:02] grotewold: has joined #ruby
[07:38:40] ramfjord: has joined #ruby
[07:40:52] gurix: has joined #ruby
[07:44:07] blackmesa: has joined #ruby
[07:44:39] jaygen: has joined #ruby
[07:47:09] devoldmx: has joined #ruby
[07:48:54] ElvanorMoscow: has joined #ruby
[07:48:58] yardenbar: has joined #ruby
[07:49:15] araujo: has joined #ruby
[07:49:15] araujo: has joined #ruby
[07:53:26] blackgoat: has joined #ruby
[07:53:30] polly_wog: has joined #ruby
[07:53:44] weemsledeux: has joined #ruby
[07:54:14] ryanlntn: has joined #ruby
[07:54:42] decoponyo: has joined #ruby
[07:54:55] ryanlntn: has joined #ruby
[07:55:05] iamninja: has joined #ruby
[07:55:16] dcarmich: has joined #ruby
[07:56:38] drptbl: has joined #ruby
[07:56:44] rdark: has joined #ruby
[07:57:55] ryanlntn: has left #ruby: ()
[07:59:50] ryanlntn: has joined #ruby
[08:00:27] ryanlntn: has left #ruby: ("ERC (IRC client for Emacs 24.5.1)")
[08:01:14] ryanlntn: has joined #ruby
[08:01:37] havenwood: has joined #ruby
[08:02:26] bronson: has joined #ruby
[08:02:26] Wolland: has joined #ruby
[08:03:57] blackmesa: has joined #ruby
[08:04:31] ryanlntn: has left #ruby: ("ERC (IRC client for Emacs 24.5.1)")
[08:05:03] Blizzy: has joined #ruby
[08:06:57] quazimodo: has joined #ruby
[08:07:42] platzhirsch: has joined #ruby
[08:11:56] casadei: has joined #ruby
[08:13:43] tkuchiki: has joined #ruby
[08:13:46] Blizzy: has joined #ruby
[08:14:46] RegulationD: has joined #ruby
[08:17:53] jas02: has joined #ruby
[08:19:50] shevy: good morning #vietnam
[08:19:54] shevy: I mean, #ruby
[08:21:56] BaroMeter: has joined #ruby
[08:26:52] jaygen: has joined #ruby
[08:29:31] exadeci: has joined #ruby
[08:32:08] codenapper: has joined #ruby
[08:35:28] riceandbeans: shevy: tis sad to be reminded of robin williams
[08:36:01] j4cknewt: has joined #ruby
[08:37:35] timonv: has joined #ruby
[08:38:16] doddok: has joined #ruby
[08:39:24] doddok: how exctract int '10066513' from such string '/topic.php?t=10066513&p=83093740' with regex
[08:39:41] nolic: What means ?A . I can't find it in the documentation
[08:40:12] Gnomethrower: has joined #ruby
[08:41:21] ruboto: ?, I don't know anything about A
[08:41:30] riceandbeans: you mean a function ending in ?
[08:42:15] nolic: no starting by ?
[08:42:20] ruboto: nolic # => "A" (https://eval.in/440017)
[08:43:33] drew2: has joined #ruby
[08:44:07] drew2: has joined #ruby
[08:44:48] skade: has joined #ruby
[08:45:30] drew2: has left #ruby: ()
[08:47:03] moeSeth: has joined #ruby
[08:47:27] allomov: has joined #ruby
[08:48:47] amystephen: has joined #ruby
[08:48:48] drew2: has joined #ruby
[08:49:12] moeabdol: has joined #ruby
[08:52:39] shevy: nolic you could think of it as an alternative notation for single characters, I think in the past it returned the numeric "representation" ... or I may confuse this with .chr method
[08:53:37] shevy: nolic, http://stackoverflow.com/questions/1345843/what-does-the-question-mark-operator-mean-in-ruby look at the answers there, someone mentions that
[08:53:38] nolic: weird syntax
[08:53:45] shevy: ?F # => will return 70
[08:53:45] ruboto: #, I don't know anything about F
[08:53:56] shevy: don't be silly ruboto
[08:54:09] shevy: >> 'F'.ord
[08:54:10] ruboto: shevy # => 70 (https://eval.in/440018)
[08:56:30] achamian: has joined #ruby
[08:56:40] nolic: Is ther any use for this syntax ?
[08:56:55] djbkd: has joined #ruby
[08:57:07] nolic: I mean post ruby 1.9
[08:57:45] shevy: well you could save one character
[08:57:51] shevy: "a" versus ?a
[08:58:24] shevy: I don't know if there is any real use case for it these days
[08:58:36] nolic: ok thank you anyway
[08:59:08] shevy: nolic check this change: https://github.com/ruby/ruby/blob/trunk/ChangeLog#L128
[08:59:26] shevy: KOSAKI Motohiro: "test/ruby/test_dir.rb (TestDir#test_fileno): s/?x/"x"/. Don't use tricky code, please."
[08:59:34] shevy: he did not like the ?x there
[08:59:45] last_staff: has joined #ruby
[09:00:16] tsujp: has joined #ruby
[09:00:58] spider-mario: has joined #ruby
[09:01:15] nolic: It could be great for obfuscating the code
[09:01:51] Guest36: has joined #ruby
[09:03:04] bronson: has joined #ruby
[09:03:22] quazimodo: has joined #ruby
[09:04:00] jenrzzz: has joined #ruby
[09:04:11] Flipez-: has joined #ruby
[09:04:44] Flipez: has joined #ruby
[09:06:26] maasha: has joined #ruby
[09:06:37] Flipez: has joined #ruby
[09:07:05] maasha: Hey, I am trying to grasp google hash - if you look at the last green box here: http://www.platanus.cz/blog/working-with-huge-hashes-in-ruby - it is pure coincidence that no collisions occur?
[09:07:13] k3asd`: has joined #ruby
[09:07:55] [k-: has joined #ruby
[09:10:43] crank1988: has joined #ruby
[09:11:42] Flipez: has joined #ruby
[09:15:00] tkuchiki: has joined #ruby
[09:15:18] M-mistake: has joined #ruby
[09:16:02] telamohn: has joined #ruby
[09:16:36] The_Phoenix1: has joined #ruby
[09:16:50] pyon: has joined #ruby
[09:17:11] Soda: has joined #ruby
[09:17:17] quazimodo: has joined #ruby
[09:18:04] stamina: has joined #ruby
[09:20:54] [k-: stay calm shevy
[09:24:02] voker57: has joined #ruby
[09:26:36] shevy: go to bed [k-
[09:32:54] devoldmx: has joined #ruby
[09:35:50] bruno-: has joined #ruby
[09:37:05] charliesome: has joined #ruby
[09:39:01] tomphp: has joined #ruby
[09:42:54] casadei: has joined #ruby
[09:46:39] SCHAAP137: has joined #ruby
[09:52:18] moeabdol: has joined #ruby
[10:00:00] EXID123: has joined #ruby
[10:00:02] EXID123_: has joined #ruby
[10:03:53] AlexRussia: has joined #ruby
[10:04:00] bronson: has joined #ruby
[10:06:15] frmendes: has joined #ruby
[10:06:52] roxtrongo: has joined #ruby
[10:11:19] platzhirsch: has joined #ruby
[10:13:07] FernandoBasso: has joined #ruby
[10:14:00] ruurd: has joined #ruby
[10:14:42] lolmaus_: has joined #ruby
[10:15:39] RegulationD: has joined #ruby
[10:16:37] chipotle: has joined #ruby
[10:16:45] solars: has joined #ruby
[10:18:07] eGGsha: has joined #ruby
[10:18:26] solocshaw: has joined #ruby
[10:18:53] solocshaw: has joined #ruby
[10:20:19] howdoi: has joined #ruby
[10:20:34] naftilos76: has joined #ruby
[10:25:41] leafybasil: has joined #ruby
[10:27:43] ankr: has joined #ruby
[10:28:03] ankr: has left #ruby: ()
[10:28:53] Musashi007: has joined #ruby
[10:32:41] DexterLB: has joined #ruby
[10:35:13] jaygen: has joined #ruby
[10:36:33] bruno-: has joined #ruby
[10:36:42] charliesome: has joined #ruby
[10:38:09] Stalkr_: has joined #ruby
[10:39:52] quazimodo: has joined #ruby
[10:40:32] Balzrael: has joined #ruby
[10:40:48] apt-get: has joined #ruby
[10:46:37] djbkd: has joined #ruby
[10:48:53] karapetyan: has joined #ruby
[10:49:29] keen________: has joined #ruby
[10:51:41] atmosx_laptop: has joined #ruby
[10:53:03] moeabdol: has joined #ruby
[10:53:57] jalnt: has joined #ruby
[10:56:10] rickmasta: has joined #ruby
[10:56:35] rdark: has joined #ruby
[10:57:18] tomphp: has joined #ruby
[11:02:15] ht__: has joined #ruby
[11:04:51] bronson: has joined #ruby
[11:08:57] ledestin: has joined #ruby
[11:09:00] tAn: has joined #ruby
[11:09:30] tkuchiki: has joined #ruby
[11:11:15] sdothum: has joined #ruby
[11:24:30] crank1988: has joined #ruby
[11:25:50] bruno-: has joined #ruby
[11:25:50] charliesome: has joined #ruby
[11:28:43] gregf: has joined #ruby
[11:31:37] casadei: has joined #ruby
[11:33:38] devoldmx: has joined #ruby
[11:33:43] manjaro-fluxbox: has joined #ruby
[11:37:02] borkdude_: has left #ruby: ()
[11:40:12] otherj: has joined #ruby
[11:40:47] platzhirsch: has joined #ruby
[11:42:20] Starthunder: has joined #ruby
[11:42:46] ramfjord: has joined #ruby
[11:43:08] CloCkWeRX: has joined #ruby
[11:43:28] Starthunder: I'm trying to install a gem, and there's a configure script complaining about the ncurses (or lack thereof). Can I make it use the Homebrew-installed ncurses, without passing that as the /only/ include/ and lib/ directories?
[11:45:00] jaygen: has joined #ruby
[11:45:45] Jackneill: has joined #ruby
[11:48:33] bigmac_: has joined #ruby
[11:49:13] brazenbraden: has joined #ruby
[11:49:38] lkba: has joined #ruby
[11:49:39] UtkarshRay: has joined #ruby
[11:54:26] pontiki: has joined #ruby
[11:55:34] moeabdol: has joined #ruby
[11:56:28] sepp2k: has joined #ruby
[12:00:33] platzhirsch: has left #ruby: ()
[12:01:20] moeabdol: has joined #ruby
[12:01:35] tomphp: has joined #ruby
[12:03:38] Jammyhammy|Work: has joined #ruby
[12:05:21] Kendos-Kenlen: has joined #ruby
[12:05:48] bronson: has joined #ruby
[12:08:03] platzhirsch: has joined #ruby
[12:09:51] n008f4g_: has joined #ruby
[12:13:49] lxsameer: has joined #ruby
[12:13:59] yqt: has joined #ruby
[12:16:27] RegulationD: has joined #ruby
[12:18:56] Scripore: has joined #ruby
[12:19:01] Azure: has joined #ruby
[12:23:17] codecop: has joined #ruby
[12:26:01] spider-mario: has joined #ruby
[12:26:37] DoubleMalt: has joined #ruby
[12:28:32] jgpawletko: has joined #ruby
[12:31:41] Ilyes512: has joined #ruby
[12:31:49] maikowblue: has joined #ruby
[12:32:29] casadei: has joined #ruby
[12:32:30] rpj8: has joined #ruby
[12:32:56] rpj8: For someone getting into web dev for the first time, is Rails or Sinatra the better choice for getting started?
[12:34:31] apeiros: probably sinatra
[12:35:13] rpj8: apeiros: Why is that?
[12:35:50] apeiros: rails is huge. sinatra less so.
[12:36:36] rpj8: apeiros: Do you know of any good resources out there for learning sinatra?
[12:37:13] Gustavo: has joined #ruby
[12:38:31] Ilyes512: has joined #ruby
[12:38:43] apeiros: rp__: no. but probably the sinatra website does.
[12:39:00] rpj8: apeiros: OK. Thanks.
[12:39:31] freezevee: has joined #ruby
[12:39:37] sanjayu: has joined #ruby
[12:41:22] bitri: has joined #ruby
[12:41:37] JammyHammy: has joined #ruby
[12:42:44] arup_r: has joined #ruby
[12:43:42] shevy: rails rails rails
[12:43:50] shevy: we need a new killer app!
[12:44:13] apt-get: has joined #ruby
[12:45:16] hectortrope: has joined #ruby
[12:47:12] lolmaus_: has joined #ruby
[12:48:39] atomical: has joined #ruby
[12:52:34] blackoperat: has joined #ruby
[12:53:23] xgoo: has joined #ruby
[12:53:36] j4cknewt: has joined #ruby
[12:54:25] xgoo: has joined #ruby
[12:54:32] leitz: has joined #ruby
[12:54:48] _blizzy_: has joined #ruby
[12:55:28] Ilyes512: has joined #ruby
[12:55:51] iyan: has joined #ruby
[12:56:09] Gustavo: has joined #ruby
[12:56:48] leitz: OOP mentoring needed. I have a class Character" that does a lot of the work for creating game characters. It is prmarily meant to be sub-classed though, as the Career a character chooses affects many character attributes.
[12:56:49] evanjs: has joined #ruby
[12:56:52] Zackio: has joined #ruby
[12:58:03] leitz: So, Character.initialize does stuff. Now I have a need to take the framework Character provides and fill in the attributes from a data store. Is it better to refactor the class or just build a parallel framework?
[12:58:17] parduse: has joined #ruby
[12:59:07] decoponio: has joined #ruby
[12:59:22] Kendos-Kenlen: has joined #ruby
[12:59:57] pawnbox: has joined #ruby
[13:00:30] Balzrael: leitz: stop using so much inheritance and focus more on composition to delegate stuff around
[13:00:49] victortyau: has joined #ruby
[13:01:31] Balzrael: you can create a career class with all its subclasses that gets injected into the Character class and gives it all the special powers it needs
[13:01:58] Balzrael: you just need to figure out some clean intefaces for all the objects to make them all play nice
[13:02:27] bitri: has joined #ruby
[13:02:55] leitz: Balzrael, you're a little past the edge or my Ruby skills, can you clarify?
[13:04:17] Balzrael: just create a class named Career that hooks into the data store and holds a character's attributes
[13:04:23] shevy: leitz that reminds me of e. g. class Warrior < Character
[13:04:53] Balzrael: then the Character class just needs an instance of the Career class to be able to do all sorts of stuff
[13:05:37] aaeron: has joined #ruby
[13:05:44] Balzrael: if you have a complex class inheritance will create lots of headaches really fast
[13:05:49] Balzrael: just use composition,
[13:05:50] leitz: shevy, I'm on the same project, trying to push my skills a bit. So "class Marine < Character"
[13:06:14] Balzrael: and the things composing the complex class can use inheritance if you want
[13:06:20] Balzrael: it depends on the complexity
[13:06:21] leitz: The issue is that Character does stuff that is common to the sub-classes.
[13:06:41] shevy: yeah, so the common task is stored in Character, the specialized variant in the specific subclass
[13:06:42] bronson: has joined #ruby
[13:06:55] nfk: has joined #ruby
[13:06:58] cornerma1: has joined #ruby
[13:07:29] leitz: shevy, yup. But now I need to use Character as a framework; attributes are assigned, vs being calculated.
[13:08:06] leitz: The easy way is to use a struct to store data, However, over time there's nothing keeping the Class and Struct aligned.
[13:08:10] shevy: I don't know why class Character needs to do this, can't you align the attributes based on the subclass? "if subclass is Marine, use these attributes, else use that"
[13:08:17] Pathfinder_: has joined #ruby
[13:09:00] shevy: I tend to use a hash and use methods to modify it
[13:09:02] leitz: Character does stuff like "Roll your strength, intelligence, etc" Marine adds career specific skills and modifications.
[13:09:13] leafybasil: has joined #ruby
[13:09:59] leitz: Balzreal's comment about complexity makes sense; I have one level of inhertance.
[13:10:49] davedev24: has joined #ruby
[13:11:08] leitz: It is possible to give initialize the abilty to optionally accept a hash for data and then to fill in the blanks?
[13:11:28] shevy: simply check what you pass
[13:11:42] leitz: For example, if the hash didn't have X, do method_x.
[13:12:02] shevy: how can you ask such newbie questions :)
[13:12:12] shevy: method_x unless hash.has_key? X
[13:12:24] leitz: In initialize?
[13:13:07] leitz: I speclize in newbie stuff. Trying to help the other newbies know they are not alone. :)
[13:13:15] shevy: Foo.new(argument) will pass to initialize(), after allocate()
[13:13:23] leitz: I can't type early in the morning either, it seems.
[13:13:43] karapetyan: has joined #ruby
[13:13:55] shevy: so all input that you give to your class, like Marine, will at first go through initialize(), which should be somewhat similar to C main()
[13:13:55] Kallis: has joined #ruby
[13:14:15] shevy: you could also design the API through other means like
[13:14:21] shevy: Marine.fire at: :cat
[13:14:32] shevy: Marine.fire big_complicated_hash_here
[13:14:47] shevy: whatever you do, you will need a method that handles the case you described above, via hash
[13:14:58] leitz: Lemme go pour some coffee and ponder. This is what I'm looking at. https://github.com/LeamHall/CT_Character_Generator/blob/master/lib/character.rb
[13:15:47] Kallis: has joined #ruby
[13:16:56] leitz: Hmm...you're right. That may complication stuff even more. I've been so wrapped up in generating characters that I've not thought much about using them.
[13:17:23] leitz: That may mean a different class.
[13:18:17] Kallis: has joined #ruby
[13:18:38] ali93: has joined #ruby
[13:18:44] mary5030: has joined #ruby
[13:19:48] evanjs: has joined #ruby
[13:20:54] tagrudev: has joined #ruby
[13:21:15] tagrudev: has joined #ruby
[13:21:52] stamina: has joined #ruby
[13:23:06] tomphp: has joined #ruby
[13:25:28] Ilyes512: has joined #ruby
[13:25:52] Scripore: has joined #ruby
[13:28:36] shevy: the simpler the better
[13:31:02] leitz: You can use "def initialize(var=999)" for a var, can you just give it a variable name and have the subsets do "if var.has_key?('upp')"
[13:31:14] leitz: Lemme see what I blow up.
[13:31:31] Timba-as: has joined #ruby
[13:32:07] shevy: you must check whether it is a hash or whether it is not
[13:32:14] shevy: a string won't have the method .has_key?
[13:32:17] shevy: nil won't have it easier
[13:33:04] shevy: I don't entirely understand you - you write a very complicated class, but you don't know how to check what kind of you object you have :)
[13:33:25] casadei: has joined #ruby
[13:33:45] leitz: I cah check the class, just get lost in the jungle of overgrown logic.
[13:33:46] shevy: use .respond_to? to find out to which method your object can respond to; use .is_a? to find out what the class is; and .nil? whether you have a nil object
[13:33:55] shevy: yeah. strive for simplicity!
[13:34:23] devoldmx: has joined #ruby
[13:34:25] atomical: has joined #ruby
[13:34:39] leitz: Yeah, that's the goal. The current class works as designed. Now I'm chanigng the design and seeing the cruft.
[13:34:49] Jardayn: has joined #ruby
[13:35:29] Gustavo: has joined #ruby
[13:35:31] shevy: don't break things that work!
[13:35:47] leitz: Conflicing directions, pardner.
[13:36:27] gustav__: has joined #ruby
[13:36:42] leitz: The simple question seems to be; how to pass an optional hash to Character.initialize, and deal with it inside the class.
[13:36:59] leitz: I think I can get the second part, if I can figure out the first bits.
[13:37:28] tsujp: has joined #ruby
[13:37:33] bigmac_: has joined #ruby
[13:39:09] jdawgaz: has joined #ruby
[13:39:29] grotewold: has joined #ruby
[13:40:19] casadei: has joined #ruby
[13:42:00] leitz: Good thing git has branches...
[13:42:23] adaedra: leitz: So you want to be able to do things like `Character.new type: :foo` ?
[13:42:38] mary5030: has joined #ruby
[13:42:45] Meow-J: has joined #ruby
[13:43:08] pontiki: has joined #ruby
[13:43:31] [k-: adaedra will show you the way!
[13:44:03] leitz: adaedra, I'm currently using the sub classes to generate characters. A new requirement has come in to pull the caracter data from a datastore, and I need to deal with the super class assuming it was supposed to do stuff.
[13:44:18] leitz: Make sense? I didn't get a lot of sleep last night. :(
[13:44:32] sferik: has joined #ruby
[13:45:50] michael_mbp: has joined #ruby
[13:45:53] jas02: has joined #ruby
[13:45:55] adaedra: leitz: let's make this understandable
[13:46:11] adaedra: you're creating a representation of Characters (as in game characters)?
[13:46:35] adaedra: And you have specialized characters, which would be Character subclasses?
[13:48:38] leitz: The Character class assumption is that it would create parts of the character., not just hold data.
[13:48:42] lkba: has joined #ruby
[13:49:12] adaedra: Like hold Items or something?
[13:49:46] maahsa: has joined #ruby
[13:50:00] Xeago: has joined #ruby
[13:52:04] leitz: Yes. For example, a character has a set of stats, called "upp". The original class generated the upp. I am now working on having the class hold a provided upp, or generate one if none provided.
[13:52:14] maahsa: I have been battling a memory leak in ruby 2.2.3p173 for a couple of days now. Basically, I want it to go away.
[13:52:31] ruurd: has joined #ruby
[13:52:32] maahsa: There must be an issue with huge hashes and symbols
[13:52:45] leitz: adaedra, for note, I'm working on the server provided Ruby 1.8.7.
[13:53:00] houhoulis: has joined #ruby
[13:53:12] Kallis: has joined #ruby
[13:53:15] leitz: Yeah, I know. Unsupported, antiquated, etc...etc...etc..
[13:53:25] maahsa: you forgot old
[13:53:35] leitz: Ah, and "old". "very old".
[13:54:05] adaedra: So each subclass would give this set of stats to the parent class to hold, right?
[13:54:34] adaedra: Sounds like a basic case of optional parameter
[13:54:57] freezevee: has joined #ruby
[13:55:03] adaedra: Except if you may want to be able to pass only a part of these stats, and let the parent fill in the blanks?
[13:55:11] leitz: The super class generates the upp. The subclass starts initialize with "super", and then can modify the upp.
[13:55:30] leitz: In general, the super class is never called directly.
[13:55:37] solocshaw: has joined #ruby
[13:55:57] adaedra: But you said "I am now working on having the class hold a provided upp, or generate one if none provided."
[13:56:04] voltalio: has joined #ruby
[13:56:25] adaedra: How is this `upp` generated? Just base values that can be overriden? Random?
[13:57:39] leitz: Yes. The original program created characters. For example, "chargen.rb -c Marine" would generate a Marine character. The Marine class was a subclass of Character. Character would randomly generaly the upp, and then Marine might modify it. Then print it out for view.
[13:57:48] adaedra: 18>> def foo(opt = {}); opt; end; foo bar: 1337
[13:57:49] ruboto: adaedra # => /tmp/execpad-963be9e0160e/source-963be9e0160e:2: syntax error, unexpected ':', expecting kEND ...check link for more (https://eval.in/440081)
[13:58:18] Ilyes512: has joined #ruby
[13:58:46] adaedra: And this is what you have now or what you're trying to have?
[13:58:47] leitz: Now I'm trying to pull already created characters from a data store (JSON) and print them the same way. The Character clsss's assumption is that it would always generate upp, not be given one.
[13:59:29] leitz: All 56 rspec tests pass for generation. Most blow up when I pass in a hash.
[13:59:45] adaedra: You can serialize the character into the data store
[13:59:53] adaedra: Ah, wait, JSON
[13:59:59] leitz: Also, while I'm even older than 1.8.7, my skills are about as developed as 3.8.pre-pre-alpha.
[14:01:47] leitz: So, the question seems to be, can I modify Character to take an optional hash with parts of the work done, or should I make a differnet class for injesting the hash data?
[14:02:00] maasha: I cant even find any bug reports on memory leaks in 2.2.3 maybe they are in japanese
[14:02:12] adaedra: So you want to be able to save characters into JSON and restore them with same data
[14:02:23] RegulationD: has joined #ruby
[14:02:30] adaedra: Well, yeah, let characters be creatable with an optional hash
[14:02:42] leitz: adaedra,yup.
[14:02:54] leitz: Did I show you the github URL?
[14:03:18] leitz: https://github.com/LeamHall/CT_Character_Generator
[14:04:25] skade: has joined #ruby
[14:04:30] leitz: Hmm..just realized the doc's don't show usage or (il)logic flow.
[14:04:54] adaedra: There's only the upp that has to be reloaded from store, right?
[14:05:27] leitz: No, everything should be reloaded frm the store.
[14:05:58] adaedra: So many enhancements possibilities in this code.
[14:06:22] leitz: Exactly. I am learning Ruby and using my love of gaming to give me something to practice on.
[14:06:47] leitz: The program, by itself, has little value outside my personal education.
[14:07:04] solocshaw: has joined #ruby
[14:07:06] leitz: And the fact that a friend asked me to generate 1134 characters yesterday.
[14:07:34] jdawgaz: has joined #ruby
[14:07:38] leitz: That's when I realized my code was good for one part of the problem, but not for another.
[14:07:39] bronson: has joined #ruby
[14:07:40] vasilakisFiL: has joined #ruby
[14:07:41] leafybasil: has joined #ruby
[14:08:15] adaedra: If it's for your personal training, why don't you get a more recent ruby?
[14:08:16] vasilakisFiL: hello! when I have something {|param1, param2| ...} is it possible to have a block instead of param1 or param2 ?
[14:08:23] leitz: Also, since I'm learning on my own, if you can provide guidance without just providing code, it helps me learn.
[14:08:33] vasilakisFiL: in order to modify param1 and return something else
[14:08:54] adaedra: leitz: that's what I was seeking for
[14:09:14] adaedra: vasilakisfil: do you have a more complete example to show? I'm not sure to fully understand.
[14:09:22] vasilakisFiL: yeah I can create a gist
[14:09:28] Ilyes512: has joined #ruby
[14:09:51] leitz: adaedra, #{that_which_pays_the_bills} is as a server admin, and the servers us 1.8.7. Or 1.8.5. By sticking with the old Ruby I can write tools for work as well. That means I can keep my head in more Ruby than just aftera long day at work.
[14:10:22] leitz: Because of time, a new Ruby effectively means no Ruby.
[14:11:08] adaedra: leitz: you can add basic parameters with defaults, but since you have a lot of parameters, it would be a bit long. You can also add a single parameters containing a hash of data then load from this hash if given or use your defaults.
[14:11:09] Ilyes512: has joined #ruby
[14:12:16] Gustavo: has joined #ruby
[14:12:56] adaedra: given your requirements, I'd go for the latter.
[14:13:07] gustav__: has joined #ruby
[14:13:07] vasilakisFiL: adaedra https://gist.github.com/vasilakisfil/48decd9161757cec6e4b
[14:13:56] vasilakisFiL: adaedra I updated the gist a bit
[14:14:15] adaedra: So you want to be able to pass a proc as parameter?
[14:14:56] vasilakisFiL: I want to do something so that I can modify the arguments before accessing them in the block
[14:15:05] adaedra: I'm not sure your sample clarify things
[14:15:45] adaedra: ah, you want to be able to change route_path in the block?
[14:16:37] jxv: has joined #ruby
[14:16:41] vasilakisFiL: basically the block has 2 params route_paths and options. But inside the block I need to always do route_paths[:items] which doen't feel right.. I could do route_paths = route_paths[:items] in the first line of the block but I am wondering if it's possible to modify the arguments with a proc
[14:16:46] vasilakisFiL: I had seen something like that somewhere..
[14:17:26] voltalio: has joined #ruby
[14:17:30] scoot: has joined #ruby
[14:17:40] adaedra: ah, I think I see, but I don't think it's possible
[14:18:10] maasha: aaaaah https://www.omniref.com/blog/blog/2014/03/27/ruby-garbage-collection-still-not-ready-for-production/
[14:18:19] adaedra: but what you can do is route_paths[:item].tap do |item| and use item inside the tap block
[14:18:21] leitz: adaedra, likes 14-25 have the idea. Just not working yet. :) https://github.com/LeamHall/CT_Character_Generator/blob/optional_hash_init/lib/character.rb
[14:18:51] ruboto: adaedra # => {} (https://eval.in/440085)
[14:18:57] adaedra: Don't use Hash.new, use {}
[14:19:24] adaedra: But I don't see why it wouldn't work
[14:19:44] adaedra: (If you create a character directly)
[14:20:12] jaygen: has joined #ruby
[14:20:52] SCHAAP137: has joined #ruby
[14:20:53] SCHAAP137: has joined #ruby
[14:22:06] yfeldblum: has joined #ruby
[14:22:18] Pumukel: has joined #ruby
[14:23:00] EXID123: has joined #ruby
[14:23:30] adaedra: If you want subclasses to also accept this array, you have to add it to their initializers too (super should take it and pass it by default)
[14:23:42] leitz: Starting on line 70 was the write method that originally took a program generated object of superclass Character. https://github.com/LeamHall/CT_Character_Generator/blob/optional_hash_init/lib/Traveller.rb
[14:24:01] iyan: has joined #ruby
[14:24:40] adaedra: You can click on a line number to highlight it and get a link to this line, you know.
[14:24:42] CloCkWeRX: has joined #ruby
[14:25:13] leitz: Lines 36-42 are where I discovered the issue. I was pulling data and passing a hash, not an object.. https://github.com/LeamHall/CT_Character_Generator/blob/optional_hash_init/bin/show_lots_of_characters.rb#L36-L42
[14:25:14] adaedra: So you're not outputting into JSON?
[14:25:27] leitz: Ah, cool. Didn't know that.
[14:26:24] yfeldblum: has joined #ruby
[14:26:38] leitz: These lines generate lots of characters and write to JSON. https://github.com/LeamHall/CT_Character_Generator/blob/optional_hash_init/bin/add_lots_of_chars.rb#L30-L42
[14:27:06] leitz: The original program just wrote to stdout in txt, html, csv, or wiki formattig.
[14:27:34] maasha: stupid gc
[14:27:37] ekain: has joined #ruby
[14:27:51] adaedra: You should close the resources you open. You never close your File object.
[14:28:14] leitz: If I can build the object from the same class, and give it data, I can use the same write methods.
[14:28:34] adaedra: Are you required to use JSON?
[14:28:35] leitz: Ah, that was late work last night. Much to be done to get it to work.
[14:28:50] [k-: maasha: that post is from 2014
[14:28:58] [k-: gc has changed since then
[14:29:01] havenwood: has joined #ruby
[14:29:06] [k-: we have rincgc now
[14:29:09] Ilyes512: has joined #ruby
[14:29:16] leitz: I prefer JSON as I want to move to MongoDB at some piont in time. We also use JSON at work, as the other option is YAML.
[14:29:16] braincrash: has joined #ruby
[14:29:18] chipotle: has joined #ruby
[14:29:30] leitz: piont/point
[14:29:37] subsonik: has joined #ruby
[14:30:00] leitz: I also want to use a portable datastore format but avoid large things like MySQL, etc.
[14:30:55] leitz: Some years ago I had to fix a guys perl code. He had left and a critical business process needed work. He was using a perl only storage mechanism. :(
[14:31:06] jdawgaz: has joined #ruby
[14:31:12] leitz: I dislike perl anyway, so that was a...real...joy...
[14:31:13] maasha: [k-: it pretty much describes the issue I have exactly
[14:31:35] adaedra: Ok, so what's the current problem?
[14:32:01] leitz: adaedra, is that to me? maasha is taking out the trash, too. :)
[14:32:12] adaedra: Yours, leitz
[14:32:22] maasha: [k-: I have a hash with 1.5M symbols as keys and true as value that I use to filter streamed records. Memory exceeds 6G in an hour
[14:32:51] maasha: so something is leaking
[14:32:53] karapetyan: how to call class method from another class method? )
[14:33:01] karapetyan: and can class methods be a private?)
[14:33:07] adaedra: by its name, karapetyan
[14:33:21] leitz: Okay. If i can use the existing Character class for both generation and intake from datastores I avoid potential divergance between to classes that do a lot of the same thing.
[14:34:05] adaedra: You'll have to unserialize from the specialized class though.
[14:34:14] leitz: At present that seems to mean modifying the initialize method to accept an optional hash, and running the subsequent methods if a hash value is not set.
[14:34:51] adaedra: Looks like it. Does it works?
[14:35:18] wildlander: has joined #ruby
[14:35:50] Papierkorb: Has someone in here experience with the Ruby Object Mapper (ROM)? I'm looking for a gem which lets me have a settings.yml file (much like the config gem does), but which can also do some validations and transformation on top of it
[14:36:24] platzhirsch: has left #ruby: ()
[14:36:25] leitz: adaedra, here's the error I get: https://gist.github.com/LeamHall/a8bc8aa1bfe63f470381
[14:36:37] bigmac_: has joined #ruby
[14:36:49] leitz: However, the why I wrote Character passes all rspec tests.
[14:37:02] adaedra: Well, you have a hash where you expect an object
[14:37:07] leitz: ACTION really needs to wake up. 
[14:38:33] adaedra: yep, you pass to Traveller.write a Hash
[14:39:00] adaedra: also, line @ https://github.com/LeamHall/CT_Character_Generator/blob/optional_hash_init/bin/show_lots_of_characters.rb#L39 is useless
[14:39:04] loechel: has joined #ruby
[14:39:53] leitz: I think I see what you're saying. That means the coffee is wokring. Lemme study it for a bit. The code, not the coffee...
[14:39:56] devoldmx: has joined #ruby
[14:40:04] atomical: has joined #ruby
[14:40:19] Ilyes512_: has joined #ruby
[14:43:14] moeabdol: has joined #ruby
[14:44:11] ruboto: here's a coffee, you seem to need it: ???
[14:44:25] Pathfinder_: has joined #ruby
[14:45:59] subsonik: has left #ruby: ()
[14:48:23] voltalio: has joined #ruby
[14:49:18] leitz: ACTION is making progress, but needs to figure out how to explain it.
[14:50:29] lulzmachine: has joined #ruby
[14:50:51] Gustavo: has joined #ruby
[14:50:59] leitz: Okay, got it.
[14:51:35] leitz: First, adaedra's comment was critical; I was trying to pass a hash to a method expecting an object.
[14:52:00] tmtwd: has joined #ruby
[14:52:20] leitz: Second, I had forgotten to add an attribute, "rank", to Character's initialize and attr_accessor bits. The sub-classes have it, Character didn't.
[14:52:41] Anti-Pizza: has joined #ruby
[14:52:57] [k-: That's why we should have strong typing systems for non trivial projects!
[14:53:18] leitz: I just figured we needed better cding skills. :)
[14:53:28] leitz: And better typing skills...
[14:54:04] [k-: or we should have a decent idea of what we are doing
[14:54:39] [k-: we should know what class is the object we are handling at the moment
[14:55:18] voltalio: has joined #ruby
[14:55:19] adaedra: People who can't live without that don't do Ruby, [k-
[14:55:20] leitz: Which suggests we should do something besides code on a late Friday night...
[14:55:47] adaedra: And they are really fine as long they are not constantly reminding other channels how their language is way better.
[14:56:01] adaedra: Ah, "bragging" was the word I was looking for.
[14:56:56] leitz: Well, I have to admit. Even though I am lousy at Ruby I enjoy it as much as I did PHP. That's a high bar for me.
[14:57:13] [k-: :PPPPPPPP
[14:57:14] [k-: ruby is great for hacking and prototyping
[14:57:14] [k-: it took forever to do things in *
[14:57:26] adaedra: leitz: to be fair, the error you pasted clearly indicated you have a Hash and it does not have the given method. From here, it's simple to find the problem.
[14:57:32] djbkd: has joined #ruby
[14:58:09] leitz: adaedra, I agree. The issue wasn't the language, but my experience in understanding the message it was giving.
[14:58:22] adaedra: It comes with time.
[14:58:58] leitz: Which is why I stay on 1.8.7. I can introduce Ruby to the people at work, and get stuff done much easier.
[14:58:58] solocshaw: has joined #ruby
[14:59:10] adaedra: I would like to oppose that.
[14:59:11] karapetyan: if i have a hash that stores some values. and if i convert keys of that hash to array
[14:59:27] adaedra: 1.8.7 is really old and Ruby has well changed since. It begins to be counter productive.
[14:59:46] karapetyan: can i be sure that elements of that array will placed in same order as they was added to hash ?
[14:59:56] bigmac_: has joined #ruby
[15:00:05] leitz: karapetyan, I'm not sure hashes store in any order.
[15:00:25] adaedra: It does, in >= 1.9
[15:00:44] leitz: adaedra, I understand the point, but I really get more Ruby if I stick with what I can use in my day job.
[15:01:07] Ilyes512: has joined #ruby
[15:01:15] karapetyan: adaedra: it does?
[15:01:16] leitz: I've lost more than one language that I didn't get to use often enough for it to stick.
[15:01:22] Scripore: has joined #ruby
[15:01:28] Beoran: has joined #ruby
[15:01:49] adaedra: karapetyan: see the docs: ???Hashes enumerate their values in the order that the corresponding keys were inserted.???
[15:02:01] [k-: also, 1.8.7 is sooooo slooooow
[15:02:03] karapetyan: adaedra: thank yo!
[15:02:11] nietzschette: has joined #ruby
[15:02:26] nietzschette: has left #ruby: ()
[15:02:37] leitz: As has been pointed out, my code has room for improvement. I can't expect to change careers and make a similar paycheck. Yet, anyway.
[15:03:15] adaedra: leitz: problem is that you'll find less and less people that would help you, and at the moment you will want to use external gems with your code, you'll have to use old, unmaintained code, which will make it difficult.
[15:03:47] leitz: I'm looking forward to the Ruby Performance Optomization book, it's supposed to have some 1.8 compatible code.
[15:04:29] [k-: 1. it is vulnerable to dos (no gc of symbols), 2. it does not have the new gc in 1.9, 2.0, 2.1, and 2.2
[15:04:29] [k-: gc is one of the bottlenecks
[15:04:30] Kallis: has joined #ruby
[15:04:53] [k-: unless you can patch your 1.8.7 to use the newer gc's, your app will still be slow
[15:04:55] mattprelude: has joined #ruby
[15:05:05] leitz: adaedra, understood. So far the only gem I actually use is nokogiri. As I said earlier, if I can't use it at work I'll lose it completely.
[15:05:13] rlf: has joined #ruby
[15:06:30] rlf: any idea why this doesn't work as expected - https://gist.github.com/anonymous/269903d791bba69cc22c ; I'm a ruby beginner and I suppose I'm either missing something obvious or it has something to do with the way ruby handles floating-point numbers
[15:07:43] adaedra: expected output, current output?
[15:08:27] leitz: Also, not sure if anyone cares, but Ruby loses impact when apps are written for versions of code that are not supported by the OS. If a program requires Ruby 2.x and the server only has 1.8.7, that program can't get used.
[15:08:31] bronson: has joined #ruby
[15:08:35] shinnya: has joined #ruby
[15:08:53] Scripore: has joined #ruby
[15:09:11] adaedra: leitz: it can. Look at ruby-install or rvm.
[15:09:30] rlf: with input 1 to 10 the output is all but 7, when it should be 1, 2, 3, 5 and 8 only
[15:10:04] adaedra: Also, some Linux distributions have access to newer versions through additional repositories, like CentOS's software collections.
[15:10:08] roxtrongo: has joined #ruby
[15:10:17] leitz: adaedra, people who support servers seldom have time to look at language specific work-arounds. At least none of the ones I know do.
[15:10:40] parduse: has joined #ruby
[15:10:52] adaedra: Depends where.
[15:11:14] skade: has joined #ruby
[15:11:33] leitz: Even Ruby 1.8.7 easily competes with Python and Perl, from an admin's perspective. I find it a lot more fun that either of those, which is why I promote it at work.
[15:11:59] havenwood: leitz: OS/distro?
[15:12:02] adaedra: But there's always way of getting a newer version, even if it is manual compilation (which sometimes sysadmins do.)
[15:12:15] leitz: havenwood, RHEL 5/6.
[15:12:37] leitz: If we ever move to RHEL 7 then Ruby 2.0 is an option.
[15:12:42] adaedra: Yep, Software collections.
[15:13:03] adaedra: I don't know if it goes back to RHEL 5 tho.
[15:13:25] Soda: has joined #ruby
[15:13:32] leitz: Ruby 1.8.5 on RHEL 5, I think. But we're encouraging people to move away from it.
[15:13:42] jdawgaz: has joined #ruby
[15:13:52] skade: has joined #ruby
[15:13:59] rbennacer: has joined #ruby
[15:14:57] adaedra: >> Math.sqrt(9) # rlf
[15:14:58] ruboto: adaedra # => 3.0 (https://eval.in/440099)
[15:15:06] adaedra: >> Math.sqrt(10) # better example
[15:15:07] ruboto: adaedra # => 3.1622776601683795 (https://eval.in/440100)
[15:15:11] yqt: has joined #ruby
[15:15:13] leitz: I have this dream of getting a cyber security degree and using Ruby for my capstone project.
[15:15:33] adaedra: That's your problem, rlf. In fact, it should show /all/ numbers, but float imprecision prevents that.
[15:16:14] rlf: oh, so how do I go on fixing that?
[15:17:25] adaedra: Mathematically, sqrt(n^2) = n (or close enough), so I guess your method is flawed.
[15:18:26] freerobby: has joined #ruby
[15:18:26] sanjayu: has joined #ruby
[15:19:28] adaedra: But for you, is_perfect_square? should return true if n is the square value of an integer number? rlf
[15:19:37] pawnbox: has joined #ruby
[15:19:39] roxtrongo: has joined #ruby
[15:19:40] bruno-: has joined #ruby
[15:21:08] rlf: I tried the same stuff in C++, seems to give me correct result, so I guess the problem is not in the logic but in my misunderstanding of how ruby works
[15:21:36] adaedra: What method did you use for sqrt in c++?
[15:21:44] rlf: sqrt() from math.h
[15:22:04] adaedra: can you show me this method in C++? I think I see.
[15:22:04] kirun: has joined #ruby
[15:22:12] adaedra: Just need to confirm.
[15:22:21] rlf: you mean the source of the sqrt method, or the source of my method?
[15:22:31] adaedra: Of your is_perfect_square method.
[15:22:46] rlf: int s = sqrt(x)
[15:22:52] rlf: return (s * s == x)
[15:22:54] adaedra: here it is.
[15:23:15] adaedra: There's an implicit operation you don't see here in your C++ code.
[15:23:23] karapetyan: function that return's break is it possible?)
[15:23:38] rlf: yeah, it converts it to an int
[15:23:49] adaedra: which ruby doesn't, it keeps a float.
[15:23:54] karapetyan: https://gist.github.com/karapetyan/e63c1e7c7d3cfefd49da
[15:23:57] adaedra: great, no need to rewrite.
[15:23:58] rlf: so do i append .to_i
[15:23:58] [k-: karapetyan: no, break is a keyword in ruby
[15:24:08] [k-: karapetyan it cannot be returned
[15:24:09] karapetyan: [k-: check the gist plz)
[15:24:22] ruboto: rlf, Why don't you try it and see for yourself?
[15:24:24] rlf: aw, it worked; 10x adaedra
[15:24:45] [k-: ah, that would work
[15:25:06] [k-: wait, there is no loop
[15:25:11] [k-: that wouldn't work
[15:25:14] adaedra: karapetyan: what to you want to do? break depending on this method?
[15:25:34] adaedra: you can't pass a language construct like that, you have to make your break conditional to this method's return value
[15:25:45] karapetyan: adaedra: yes i call this method from loop and i want to be able break loop
[15:25:53] karapetyan: and i want to return break
[15:26:00] [k-: break if self.continue?
[15:26:16] adaedra: just put user_input == "y"
[15:26:21] adaedra: then, what [k- said
[15:26:32] adaedra: or with unless, rather
[15:26:41] adaedra: (if you want to break on "n")
[15:26:53] karapetyan: btw should i call method self.continue?
[15:26:56] [k-: such flawes logic i am harbouring
[15:27:00] karapetyan: or just continue from
[15:27:15] adaedra: like you want. As it returns a bool, keep the '?' at the end.
[15:27:17] [k-: continue is a keyword in ruby
[15:27:23] [k-: i think
[15:27:32] [k-: wait, no, that is next
[15:27:36] adaedra: >> continue
[15:27:37] ruboto: adaedra # => undefined local variable or method `continue' for main:Object (NameError) ...check link for more (https://eval.in/440101)
[15:27:54] karapetyan: can you review my code plz
[15:28:05] [k-: yes, i realised that 9s later
[15:28:32] [k-: karapetyan: no tabs!
[15:28:36] adaedra: karapetyan: fix your indent
[15:29:02] ta: has joined #ruby
[15:29:05] [k-: ntil user_input == ("y" || "n")
[15:29:10] [k-: this is wrong
[15:29:22] Xeago: has joined #ruby
[15:29:29] karapetyan: give me a socond please i give you a full gist
[15:29:33] apt-get: has joined #ruby
[15:29:33] [k-: and until ... do is not wrong but the do is unnecessary
[15:30:03] [k-: you will get an infinite loop
[15:30:13] [k-: have you tried running your code yet?
[15:30:38] adaedra: I think trying to return break prevents that.
[15:31:53] karapetyan: btw what i should use instead tabs?
[15:32:13] [k-: 2 spaces for 1 tab
[15:32:16] adaedra: community guidelines advise 2 spaces.
[15:32:30] [k-: shevymobile!
[15:32:31] adaedra: it's all preference, afterwards.
[15:33:26] grotewold: has joined #ruby
[15:34:55] apt-get: has joined #ruby
[15:36:04] allomov: has joined #ruby
[15:36:24] jdawgaz: has joined #ruby
[15:36:42] voltalio: has joined #ruby
[15:42:52] rmrrn: has joined #ruby
[15:42:52] rmrrn: has joined #ruby
[15:44:09] arashb: has joined #ruby
[15:44:55] afs: has joined #ruby
[15:48:53] rikkipitt: has joined #ruby
[15:48:55] shevy: no it's science!
[15:49:01] shevy: tab users have small brains!!
[15:49:06] shevy: and not only that is small!!!
[15:49:08] TheHodge: has joined #ruby
[15:50:09] sudiptamondal: has joined #ruby
[15:50:48] sudiptamondal: has joined #ruby
[15:52:23] gambl0re: has joined #ruby
[15:52:47] [k-: shevy: who told you and what do you know!
[15:52:51] grotewold: has joined #ruby
[15:54:04] karapetyan: https://gist.github.com/karapetyan/c447753fd12813eddc07
[15:54:11] karapetyan: here is my full gist)
[15:54:23] sumark: has joined #ruby
[15:56:06] Tuxero: has joined #ruby
[15:56:17] Node_: has joined #ruby
[15:56:25] Node_: How do I made ruby produce a beep sound?
[15:56:55] karapetyan: and i want to know is my code ok?
[15:57:09] evanjs: has joined #ruby
[15:57:16] voltalio: has joined #ruby
[15:57:39] deject3d: has joined #ruby
[15:58:49] Ilyes512: has joined #ruby
[15:59:04] apt-get_: has joined #ruby
[15:59:05] SCHAAP137: has joined #ruby
[16:00:35] karapetyan: [k-: could you review please?
[16:00:51] adaedra: node_: output the beep character to terminal
[16:00:55] karapetyan: shevy: or you please :)
[16:01:11] Node_: adaedra: Doesn't work for some reason.
[16:01:38] karapetyan: and anyone can help me setup sublime tap for 2 spaces? :)
[16:01:45] adaedra: node_: how do you do it?
[16:02:28] shevy: karapetyan ok first thing first
[16:02:31] shevy: use spaces
[16:03:09] shevy: does the code work?
[16:03:14] RegulationD: has joined #ruby
[16:03:23] shevy: there are no comments so I have no idea what this thing does
[16:03:38] Node_: print "\a"
[16:03:41] aaeron: has joined #ruby
[16:03:55] karapetyan: shevy: yes, code works
[16:04:11] karapetyan: already fix sublime )
[16:04:12] shevy: good. so switch to spaces, add comments, you are done with this class. move on to other code.
[16:04:30] karapetyan: shevy: wooow :)
[16:04:48] karapetyan: this is first time when i wrote something not shitty?
[16:04:56] karapetyan: i will go and take some wine :D
[16:05:39] adaedra: karapetyan: if your Coincidence thing is not meant to be instancied and just has class methods, make it a module.
[16:05:55] karapetyan: adaedra: yep :)
[16:06:03] karapetyan: already! actually ! ))
[16:06:33] [k-: self.continue? has logic errors
[16:06:36] adaedra: you call continue? but do nothing on its result.
[16:06:50] adaedra: >> %w[y n]
[16:06:51] ruboto: adaedra # => ["y", "n"] (https://eval.in/440104)
[16:06:59] karapetyan: i pass it result to self.find
[16:07:13] shevy: btw karapetyan ... oh yes
[16:07:14] robh71: has joined #ruby
[16:07:18] shevy: I was just about to suggest this
[16:07:24] shevy: but use: %w( y n )
[16:07:25] [k-: self.continue? still has logical errors
[16:07:35] karapetyan: use what? %)
[16:07:40] robh71: has joined #ruby
[16:07:47] adaedra: if ! => until
[16:07:54] shevy: you can kill the "","" characters, think about that
[16:08:13] [k-: instead of @results[element].each { |item| puts item }
[16:08:27] [k-: use puts @results[element]
[16:09:28] bronson: has joined #ruby
[16:09:39] karapetyan: if !=> unless # done!
[16:09:41] [k-: your code is not threadsafe
[16:10:03] karapetyan: [k-: what does mean threadsafe? )))
[16:10:10] solocshaw1: has joined #ruby
[16:10:20] ruurd: has joined #ruby
[16:10:33] adaedra: which is not a problem if you don't plan on threadify it or make it a library
[16:10:39] [k-: your code doesn't show intent clearly
[16:11:39] karapetyan: should i create variables coincidence = 3 and put this instead 3 ?
[16:11:48] fantazo: has joined #ruby
[16:12:10] karapetyan: shevy: what mean %w(y n) could you explain please?
[16:12:47] karapetyan: guys can i code for free something? to get experience in team working?
[16:12:49] leafybas_: has joined #ruby
[16:13:40] ruboto: Though inclusion was probably intended, not everyone relates to being "one of the guys". Maybe consider using "folks", "all", "y'all", or "everyone" instead?
[16:13:41] karapetyan: and where best project / place to start?
[16:13:57] [k-: have you fixed until...do yet?
[16:14:13] tkuchiki: has joined #ruby
[16:15:24] [k-: now, the most crucial part of mathematical looking code is to document it using comments
[16:15:45] wookiehangover: has joined #ruby
[16:16:02] Scripore: has joined #ruby
[16:16:20] karapetyan: [k-: no, what should i fix?
[16:16:26] karapetyan: in until...do
[16:16:31] adaedra: karapetyan: %w[] is a short way of writing an array of string.
[16:16:36] adaedra: >> %w[one two three]
[16:16:38] ruboto: adaedra # => ["one", "two", "three"] (https://eval.in/440113)
[16:16:43] [k-: remove the do
[16:16:51] [k-: it is unnecessary
[16:17:23] karapetyan: [k-: ok, but why it is unnecessary? cause i don't have a block arguments?
[16:17:24] [k-: some people used to do `if expr do` but you dont see that anymore
[16:17:52] ramfjord: has joined #ruby
[16:17:54] jamesaxl: has joined #ruby
[16:18:06] [k-: >> if 1 + 1 == 2 do; "yay"; end
[16:18:07] ruboto: [k- # => /tmp/execpad-962ea39be354/source-962ea39be354:2: syntax error, unexpected keyword_do, expecting keyw ...check link for more (https://eval.in/440116)
[16:18:20] Ilyes512: has joined #ruby
[16:18:23] rickmasta: has joined #ruby
[16:18:28] [k-: hm, i remember that worked before
[16:18:41] adaedra: karapetyan: because the syntax is `until ...; end`
[16:19:38] karapetyan: something brokes)))
[16:20:58] NeverDie: has joined #ruby
[16:21:59] adaedra: why are you adding ))) at the end of your messages?
[16:23:19] pawnbox: has joined #ruby
[16:23:31] platzhirsch: has joined #ruby
[16:24:15] spider-mario: has joined #ruby
[16:25:07] ruurd: has joined #ruby
[16:25:37] sferik: has joined #ruby
[16:27:19] shevy: russian keyboard probably
[16:27:25] aaeron1: has joined #ruby
[16:28:07] MVPhelp: has joined #ruby
[16:28:11] qixiaobin: has joined #ruby
[16:28:19] voltalio: has joined #ruby
[16:28:40] houhoulis: has joined #ruby
[16:31:47] [k-: deletecookiesession
[16:31:52] [k-: wipedisk
[16:31:55] [k-: hardreset
[16:33:43] Psi-Jack: has left #ruby: ()
[16:34:32] roxtrongo: has joined #ruby
[16:40:40] devoldmx: has joined #ruby
[16:42:15] Node_: has joined #ruby
[16:43:06] Ilyes512_: has joined #ruby
[16:43:13] djbkd: has joined #ruby
[16:43:26] troyready: has joined #ruby
[16:45:18] nfk|laptop: has joined #ruby
[16:46:54] Node_: when using `` to run a system command, how do I send the output of the command to /dev/null instead of the screen?
[16:47:19] allomov: has joined #ruby
[16:47:44] stamina: has joined #ruby
[16:48:25] havenwood: has joined #ruby
[16:48:56] shevy: just as you do it in shell
[16:49:11] Node_: shevy: I'm still seeing the output in the shell...
[16:49:27] shevy: and other redirects
[16:50:00] Node_: shevy: Yeah the output is still going to the terminal window.
[16:50:54] Node_: shevy: Wait. Using 2>&1 works but &> doesn't...
[16:52:46] leafybasil: has joined #ruby
[16:53:54] adaedra: if you're not planning to get the output back, `` is not what you're looking for.
[16:54:08] tsujp: has joined #ruby
[16:56:20] Soda: has joined #ruby
[16:56:44] Node_: Also, why can I not run a command in the background by appendig & ?
[16:56:49] Node_: appending*
[16:57:02] Node_: like `some command &` doesn't run the command in the background
[16:57:24] tejasmanohar: has joined #ruby
[16:57:26] lkba: has joined #ruby
[16:57:27] yeticry: has joined #ruby
[16:57:35] adaedra: use Process
[16:57:54] adaedra: And don't forget to wait the created process to not have zombies
[16:58:42] platzhirsch: node_: teach me node
[17:01:14] apt-get__: has joined #ruby
[17:02:13] linc01n: has joined #ruby
[17:02:26] ericjphillips: has joined #ruby
[17:02:59] baweaver: has joined #ruby
[17:03:05] robh71: has joined #ruby
[17:03:19] Chau: has joined #ruby
[17:03:35] noethics: has joined #ruby
[17:04:03] linc01n: has joined #ruby
[17:04:10] RegulationD: has joined #ruby
[17:04:42] FrankD: has joined #ruby
[17:06:55] grotewold: has joined #ruby
[17:07:12] blackmesa: has joined #ruby
[17:07:25] rippa: has joined #ruby
[17:07:40] karapetyan: has joined #ruby
[17:10:18] nettoweb: has joined #ruby
[17:10:24] Ilyes512: has joined #ruby
[17:10:24] bronson: has joined #ruby
[17:14:10] solocshaw: has joined #ruby
[17:14:16] iateadonut: has left #ruby: ()
[17:15:06] grotewold: has joined #ruby
[17:17:41] lkba: has joined #ruby
[17:17:52] parduse: has joined #ruby
[17:18:25] Ilyes512: has joined #ruby
[17:20:19] Hanmac: has joined #ruby
[17:20:34] dionysus69: has joined #ruby
[17:23:14] renderful: has joined #ruby
[17:23:41] noethics: has joined #ruby
[17:25:16] tejasmanohar_: has joined #ruby
[17:26:39] uris: has joined #ruby
[17:26:58] Ilyes512: has joined #ruby
[17:27:13] northfurr: has joined #ruby
[17:27:37] chipotle: has joined #ruby
[17:28:09] shevy: how would you go about doing this in plain ruby? https://upload.wikimedia.org/wikipedia/commons/a/a8/Friendlyinteractiveshell.png
[17:28:47] shevy: I can understand the first part; have an Array, apply a regex or select statement for match criteria. But what about the colours?
[17:29:39] adaedra: Use a gem that colorizes output
[17:30:56] robh71: has joined #ruby
[17:30:56] pen: has joined #ruby
[17:31:53] dorei: has joined #ruby
[17:33:22] havenwood: shevy: There are colors in the Crystal stdlib: https://github.com/manastech/crystal/blob/master/src/colorize.cr
[17:33:52] shevy: see that is what ruby needs - fresh ideas from the get go
[17:35:03] Gustavo: has joined #ruby
[17:36:02] havenwood: shevy: http://elixir-lang.org/docs/v1.1/elixir/IO.ANSI.html
[17:37:27] polly_wog: has joined #ruby
[17:40:02] shevy: ruby is starting to show its age there
[17:40:36] shevy: must be even harder for perl
[17:42:11] rbennacer: has joined #ruby
[17:43:39] nettoweb: has joined #ruby
[17:43:52] Ilyes512: has joined #ruby
[17:45:09] reset: has joined #ruby
[17:45:50] nettoweb: has joined #ruby
[17:46:22] banister: has joined #ruby
[17:46:37] timonv: has joined #ruby
[17:47:35] Ilyes512_: has joined #ruby
[17:47:43] tbuehlmann: has left #ruby: ()
[17:48:00] crunk_bear: has joined #ruby
[17:48:45] Uranio-235: has joined #ruby
[17:49:38] Scripore: has joined #ruby
[17:52:17] Ilyes512: has joined #ruby
[17:53:29] Ilyes512: has joined #ruby
[17:53:47] robh71: has joined #ruby
[17:54:27] jaygen: has joined #ruby
[17:55:24] tejasmanohar: has joined #ruby
[17:55:37] doddok: has joined #ruby
[17:58:33] evanjs: has joined #ruby
[17:59:27] Scripore: has joined #ruby
[18:00:08] Scripore: has joined #ruby
[18:02:28] bigmac_: has joined #ruby
[18:02:58] qixiaobin: has joined #ruby
[18:04:01] grotewold: has joined #ruby
[18:04:34] Scripore: has joined #ruby
[18:06:27] bazbing81: has joined #ruby
[18:07:19] karapetyan: has joined #ruby
[18:10:24] jatb: has joined #ruby
[18:11:18] bronson: has joined #ruby
[18:12:15] toretore: has joined #ruby
[18:13:21] ericjphillips: has joined #ruby
[18:17:17] freezevee: instead of creating an object like myobj = MyObject.new(arg1, arg2, arg3, arg4, ......arg10) what else can I do ?
[18:17:49] freezevee: I tried with ..new(options) and I set the options = { } or an array but it doesn't work
[18:17:50] platzhirsch: has joined #ruby
[18:18:36] freezevee: the arguments are 10
[18:18:46] havenwood: freezevee: new(*options)
[18:19:14] tw1sted: has joined #ruby
[18:19:28] charliesome: has joined #ruby
[18:19:58] platzhirsch: has left #ruby: ()
[18:20:20] Musashi007: has joined #ruby
[18:21:12] havenwood: freezevee: Some splat examples: http://jacopretorius.net/2012/01/splat-operator-in-ruby.html
[18:21:23] freezevee: so this is the splat
[18:21:33] freezevee: never used it
[18:21:35] robh71: has joined #ruby
[18:21:39] freezevee: checking it out
[18:24:50] dionysus69: has joined #ruby
[18:26:31] freezevee: in initialize are they def initialize(options={}) ?
[18:26:40] freezevee: or *options ?
[18:28:41] Xeago: has joined #ruby
[18:29:20] shevy: havenwood showed you the *
[18:29:25] BTRE: has joined #ruby
[18:29:30] shevy: you should take what he offered :)
[18:29:32] havenwood: freezevee: Maybe these are better examples: https://rubymonk.com/learning/books/1-ruby-primer/chapters/19-ruby-methods/lessons/69-new-lesson
[18:29:34] jenrzzz: has joined #ruby
[18:29:59] freezevee: I mean that I create with .new(*args) but how do I initialize the object
[18:30:12] shevy: just like every time you use .new
[18:30:19] shevy: Foo.new 1
[18:30:20] shevy: Foo.new 1,2
[18:30:40] freezevee: I mean that I have 10 options
[18:30:58] havenwood: freezevee: I don't follow what you're trying to do. Maybe create a gist that shows what you've tried so far.
[18:30:59] freezevee: I set options = [one, two, three ...]
[18:31:15] freezevee: then MyObject.new(*options)
[18:31:28] shevy: so you already have options, an array
[18:31:30] shevy: so you pass it
[18:31:34] shevy: MyObject.new(options)
[18:31:41] lxsameer: has joined #ruby
[18:31:56] freezevee: shevy: I guess it's simple, right ?
[18:32:01] slayerjain: has joined #ruby
[18:32:10] freezevee: it becomes options[0] etc. ?
[18:32:34] yqt: has joined #ruby
[18:32:53] freezevee: so If I want to pass a hash, I should initially set options = { option1: "Abc", .... } and then use them in initialize as options[:option1]
[18:32:55] jaredrhine: has joined #ruby
[18:32:57] tejasmanohar: has joined #ruby
[18:32:59] freezevee: is it that simple ?
[18:33:10] shevy: I don't know what you are trying to do, but things are simple
[18:33:11] banister: has joined #ruby
[18:33:27] freezevee: of course, we are in Ruby
[18:33:32] shevy: in your example you pass an array
[18:33:39] freezevee: I could have asked this in C# room
[18:33:41] shevy: arrays allow [] access by default
[18:33:48] atmosx_laptop: has joined #ruby
[18:34:04] shevy: you can check what you got via .is_a?
[18:34:12] freezevee: sometimes you get frustrated, this is normal right ? forgive me please
[18:34:13] shevy: or if you believe in duck sacrificing then .respond_to?
[18:34:27] freezevee: I got it, thanks ( I believe so )
[18:34:55] freezevee: ruby is simple
[18:34:58] freezevee: life is simple
[18:35:01] freezevee: so ruby = life
[18:35:02] RegulationD: has joined #ruby
[18:35:15] jenrzzz: has joined #ruby
[18:37:29] freezevee: sorry for the BS, just trying to make up a joke
[18:40:57] Rollabunna: has joined #ruby
[18:41:24] devoldmx: has joined #ruby
[18:42:13] tsujp: has joined #ruby
[18:42:15] Uranio-235: freezevee: a very good one :D
[18:44:07] apt-get: has joined #ruby
[18:44:17] tomchapin: has joined #ruby
[18:44:33] Ilyes512: has joined #ruby
[18:45:14] k3asd`: has joined #ruby
[18:45:52] Ilyes512: has joined #ruby
[18:46:53] tomchapin: has joined #ruby
[18:48:58] Ilyes512_: has joined #ruby
[18:51:37] Ilyes512: has joined #ruby
[18:52:59] GnuYawk: has joined #ruby
[18:53:59] michaeldeol: has joined #ruby
[18:54:18] Ilyes512: has joined #ruby
[18:58:45] charliesome: has joined #ruby
[18:59:59] Ilyes512: has joined #ruby
[19:00:45] dionysus69: has joined #ruby
[19:01:30] Scripore: has joined #ruby
[19:02:07] charliesome: has joined #ruby
[19:02:40] phreakocious: is there a way to use the printf style but have the results go into a variable instead of printing?
[19:03:14] adaedra: phreakocious: yes, String#%
[19:03:24] adaedra: >> "%04d" % 3
[19:03:25] ruboto: adaedra # => "0003" (https://eval.in/440123)
[19:03:32] havenwood: phreakocious: sprintf
[19:05:47] slayerja_: has joined #ruby
[19:06:21] Gustavo: has joined #ruby
[19:07:32] slayerjain: has joined #ruby
[19:09:07] jun_: has joined #ruby
[19:10:28] platzhirsch: has joined #ruby
[19:11:44] Coldblackice: has joined #ruby
[19:12:16] bronson: has joined #ruby
[19:12:27] Guest63: has joined #ruby
[19:13:00] FrankD: has joined #ruby
[19:13:46] dorei: is there a more beautiful way for this?
[19:13:49] dorei: >> x = [{x: 1, y: 2}, {x: 1, y: 3}, {x: 2, y:5}]; h = {} ; x.each { |e| h[e[:x]] ||= []; h[e[:x]] << e }; h
[19:13:50] ruboto: dorei # => {1=>[{:x=>1, :y=>2}, {:x=>1, :y=>3}], 2=>[{:x=>2, :y=>5}]} (https://eval.in/440124)
[19:15:26] adaedra: >> x = [{x: 1, y: 2}, {x: 1, y: 3}, {x: 2, y:5}]; x.group_by { |a| a[:x] } # dorei
[19:15:27] ruboto: adaedra # => {1=>[{:x=>1, :y=>2}, {:x=>1, :y=>3}], 2=>[{:x=>2, :y=>5}]} (https://eval.in/440125)
[19:15:42] dorei: group_by :) thanx :)
[19:15:50] fedexo: has joined #ruby
[19:20:11] Ilyes512: has joined #ruby
[19:20:51] solocshaw: has joined #ruby
[19:21:09] Ilyes512: has joined #ruby
[19:21:51] karapetyan: has joined #ruby
[19:22:28] mary5030: has joined #ruby
[19:23:06] pragmatism: has joined #ruby
[19:23:08] rickmasta: has joined #ruby
[19:23:57] CanTonic: has joined #ruby
[19:24:17] slayerja_: has joined #ruby
[19:26:06] slayerjain: has joined #ruby
[19:26:20] yfeldblum: has joined #ruby
[19:27:19] yfeldblum: has joined #ruby
[19:28:58] Sembei: has joined #ruby
[19:29:56] kalusn: has joined #ruby
[19:31:06] swgillespie: has joined #ruby
[19:32:19] Oka: has joined #ruby
[19:32:46] mary5030: has joined #ruby
[19:34:23] arup_r: has joined #ruby
[19:35:04] swgillespie: has left #ruby: ()
[19:36:06] Azure: has joined #ruby
[19:36:34] sanjayu: has joined #ruby
[19:37:24] Zackio: has joined #ruby
[19:37:27] rushed: has joined #ruby
[19:42:38] plubmus: has joined #ruby
[19:42:45] Azure: has joined #ruby
[19:42:57] slayerja_: has joined #ruby
[19:43:15] plubmus: a better scraper than nokogiri?
[19:43:34] adaedra: You mean XML parser?
[19:43:37] adaedra: Look at Oga
[19:43:45] adaedra: (hi yorickpeterse)
[19:43:52] plubmus: do xml parsers work with html?
[19:43:55] havenwood: plubmus: https://github.com/YorickPeterse/oga#readme
[19:44:04] plubmus: just made my first ruby script scraping imgur albums
[19:44:45] slayerja_: has joined #ruby
[19:45:11] mozzarella: what's wrong with nokogiri?
[19:46:01] varunwachaspati: has joined #ruby
[19:46:15] darix: plubmus: you mean instead of just downloading the zip that imgur offers itself?:)
[19:46:35] plubmus: darix: oopsie
[19:47:19] plubmus: is that available without javascript?
[19:47:36] darix: you can construct the path from the album name ;)
[19:49:04] darix: http://s.imgur.com/a/<albumid>/zip
[19:49:13] plubmus: i see. noice
[19:49:19] plubmus: how'd you figure that out?
[19:49:52] darix: i looked at the "post options" menu
[19:49:56] darix: downloaded one album
[19:50:03] nsuke: has joined #ruby
[19:50:07] darix: and then noticed the path in my download list in chromium
[19:51:42] jamo: has joined #ruby
[19:52:13] plubmus: darix: coolio. that'll come in handy.
[19:53:28] bigmac_: has joined #ruby
[19:53:30] Uranio-235_: has joined #ruby
[19:53:49] Uranio-235_: rushed: I'm using AR (without rails) for connect to a MySQL database, but I need to do it readonly. Setting readonly: true in #establish_connection seems do not work
[19:54:09] darix: Uranio-235_: enforce the readonly part at the DB permissions
[19:54:17] darix: much better than trying to do it at the client side
[19:54:39] sferik: has joined #ruby
[19:54:40] leat: has joined #ruby
[19:54:47] Uranio-235_: :-/ ok... I have server side's control
[19:54:57] Uranio-235_: have NOT server's side control
[19:54:58] p0wn3d__: has joined #ruby
[19:55:10] darix: do you control which queries you send?
[19:55:26] darix: because if you only send select statements than you should be gold on the "Readonly" part
[19:56:03] Uranio-235_: I just do not wanna modify my friend's database "by accident"
[19:56:14] Uranio-235_: would by nice having a readonly
[19:57:02] Uranio-235_: http://apidock.com/rails/ActiveRecord/Base/attr_readonly/class
[19:57:17] Uranio-235_: I could set readonly for particular attributes
[19:57:25] Uranio-235_: could I do it globally?
[19:57:53] Uranio-235_: sorry if my english "rusty"
[19:58:04] plubmus: has left #ruby: ("ERC Version 5.3 (IRC client for Emacs)")
[19:58:52] karapetyan: has joined #ruby
[19:59:21] evanjs: has joined #ruby
[19:59:30] darix: Uranio-235_: just do not send any insert,update,delete statements
[19:59:45] darix: and be sure to know what the stored procedures do when you call them with select
[20:01:14] Ilyes512: has joined #ruby
[20:01:58] Uranio-235_: if at last, I could iterate over all the attributes inside the model an set on the fly
[20:02:02] fantazo: has joined #ruby
[20:02:14] grotewold: has joined #ruby
[20:04:06] tomphp: has joined #ruby
[20:05:36] slayerjain: has joined #ruby
[20:05:42] Timba-as: has joined #ruby
[20:06:09] p0wn3d__: has joined #ruby
[20:08:03] Uranio-235_: HA! I got it...
[20:08:39] cdg-me: has joined #ruby
[20:11:35] Uranio-235_: http://stackoverflow.com/questions/5641410/is-there-an-easy-way-to-make-a-rails-activerecord-model-read-only
[20:12:05] Soda: has joined #ruby
[20:12:09] devoldmx: has joined #ruby
[20:13:07] bronson: has joined #ruby
[20:13:59] rickmasta: has joined #ruby
[20:14:32] karapetyan: has joined #ruby
[20:15:06] shevy: ack, rails
[20:15:42] maokomioko: has joined #ruby
[20:15:57] bigmac_: has joined #ruby
[20:16:37] maokomioko: has joined #ruby
[20:18:53] bruno-: has joined #ruby
[20:19:31] Azure: has joined #ruby
[20:20:46] Uranio-235_: shevy: yes, I just mistake channels after re-connetions
[20:20:48] karapetyan: has joined #ruby
[20:21:10] michaeldeol: has joined #ruby
[20:22:02] parduse: has joined #ruby
[20:22:27] moeabdol1: has joined #ruby
[20:22:43] ghostlines: has joined #ruby
[20:25:43] tockitj: has joined #ruby
[20:26:21] tockitj: has joined #ruby
[20:26:26] willharrison: has joined #ruby
[20:26:37] psye: has joined #ruby
[20:27:34] Ilyes512: has joined #ruby
[20:30:05] bigmac_: has joined #ruby
[20:31:23] arup_r: shevy: Good night
[20:31:29] arup_r: time to sleep for me
[20:33:01] einarj: has joined #ruby
[20:35:53] RegulationD: has joined #ruby
[20:38:28] async_prince: has joined #ruby
[20:40:01] VeryBewitching: has joined #ruby
[20:40:02] mary5030: has joined #ruby
[20:40:02] maokomioko: has joined #ruby
[20:40:56] Pathfinder_: has joined #ruby
[20:41:47] Rollabunna: has joined #ruby
[20:44:47] AlexRussia: has joined #ruby
[20:46:45] jun_: has joined #ruby
[20:52:03] Gustavo: has joined #ruby
[20:53:34] deject3d: has joined #ruby
[20:54:26] deject3d_: has joined #ruby
[20:56:32] deject3d: has joined #ruby
[20:58:42] nettoweb: has joined #ruby
[20:59:28] uris: has joined #ruby
[21:02:02] mr_george: has joined #ruby
[21:03:17] s00pcan: has joined #ruby
[21:04:28] Xeago: has joined #ruby
[21:06:07] mary5030: has joined #ruby
[21:06:54] mr_george: I need to develop a simple web application in ruby where the user inputs simple queries, and gets a table fetched from a database, like a typical search engine, but for other kinds of data. Is there a framework or example of something like this I could use as a starting point?
[21:07:13] Tuxero: has joined #ruby
[21:07:20] michaeldeol: has joined #ruby
[21:07:23] Uranio-235: mr_george: Rails
[21:07:44] Uranio-235: rails g scaffold for make tables
[21:07:52] Uranio-235: and a controller for search
[21:08:33] radgeRayden: has joined #ruby
[21:09:56] Ilyes512: has joined #ruby
[21:13:10] shinnya: has joined #ruby
[21:14:03] bronson: has joined #ruby
[21:14:15] tomphp: has joined #ruby
[21:15:00] tkuchiki: has joined #ruby
[21:15:38] ddarkpassenger: has joined #ruby
[21:15:47] tomphp: has joined #ruby
[21:18:53] qixiaobin: has joined #ruby
[21:19:21] Stalkr_: has joined #ruby
[21:22:45] kadoppe: has joined #ruby
[21:24:48] crunk_bear: has joined #ruby
[21:25:14] weemsledeux: has joined #ruby
[21:26:42] platzhirsch: has left #ruby: ()
[21:26:44] michaeldeol: has joined #ruby
[21:27:22] nettoweb: has joined #ruby
[21:27:24] Ilyes512_: has joined #ruby
[21:30:04] Ilyes512: has joined #ruby
[21:34:39] Ilyes512: has joined #ruby
[21:34:51] deject3d: has joined #ruby
[21:41:48] Azure: has joined #ruby
[21:41:57] ddarkpassenger: has joined #ruby
[21:42:59] Tuxero: has joined #ruby
[21:44:05] cih: has joined #ruby
[21:44:18] shevy: sleepy sleepy weekends
[21:44:37] tsujp: has joined #ruby
[21:45:05] apt-get: has joined #ruby
[21:45:31] jairojunior: has joined #ruby
[21:46:26] quazimodo: has joined #ruby
[21:46:28] agent_white: has joined #ruby
[21:46:31] mello: has joined #ruby
[21:47:49] Ilyes512: has joined #ruby
[21:51:09] atmosx_laptop: has joined #ruby
[21:51:57] Coldblackice: has joined #ruby
[21:55:45] last_staff: has joined #ruby
[21:56:32] ruby-lang461: has joined #ruby
[21:59:01] apt-get: has joined #ruby
[21:59:26] marr: has joined #ruby
[21:59:30] bigmac_: has joined #ruby
[21:59:40] kobain: has joined #ruby
[21:59:44] apt-get: has joined #ruby
[22:00:13] evanjs: has joined #ruby
[22:00:38] rushed: has joined #ruby
[22:02:00] apt-get: has joined #ruby
[22:02:51] devbug: has joined #ruby
[22:04:05] Ilyes512: has joined #ruby
[22:04:52] lkba_: has joined #ruby
[22:05:38] Tuxero: as I do to pass parameters from one controller to another?
[22:06:04] Tuxero: /j #fossgeek
[22:07:10] apt-get: has joined #ruby
[22:07:30] Kallis: has joined #ruby
[22:07:49] baweaver: tuxero: #RubyOnRails
[22:07:51] frmendes: has joined #ruby
[22:07:52] apt-get: has joined #ruby
[22:08:03] Tuxero: baweaver spanish ?
[22:08:08] cih: has joined #ruby
[22:08:19] platzhirsch: has joined #ruby
[22:08:37] Tuxero: xD dont worry
[22:09:02] Tuxero: I have two related forms
[22:09:13] baweaver: mi espa??ol es muy mal
[22:09:26] Tuxero: jajajaj ok dont problem
[22:09:37] havenwood: ?rails tuxero
[22:09:37] ruboto: tuxero, Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[22:09:37] baweaver: you want to join the channel #RubyOnRails
[22:10:43] chipotle: has joined #ruby
[22:12:00] platzhirsch: Move along Active Recordist
[22:12:16] havenwood: Hem, I could go for some ActiveBrunch right now...
[22:12:29] havenwood: Maybe with TurboBenedict.
[22:12:56] devoldmx: has joined #ruby
[22:13:56] apt-get: has joined #ruby
[22:14:59] bronson: has joined #ruby
[22:15:44] tkuchiki: has joined #ruby
[22:16:07] deject3d: has joined #ruby
[22:16:38] j4cknewt: has joined #ruby
[22:16:43] mary5030: has joined #ruby
[22:17:39] pawnbox: has joined #ruby
[22:17:54] Kallis: has joined #ruby
[22:18:09] apt-get: has joined #ruby
[22:19:24] Scripore: has joined #ruby
[22:23:31] dorei: >> URI('/??')
[22:23:32] ruboto: dorei # => undefined method `URI' for main:Object (NoMethodError) ...check link for more (https://eval.in/440152)
[22:23:39] dorei: >> require 'uri' ; URI('/??')
[22:23:39] Kallis: has joined #ruby
[22:23:40] ruboto: dorei # => URI must be ascii only "/\u{d1}" (URI::InvalidURIError) ...check link for more (https://eval.in/440153)
[22:23:47] dorei: how can I fix that?
[22:24:14] dorei: some kind of encoding is needed
[22:25:06] adaedra: use URI.encode
[22:26:54] shevy: ActiveDam
[22:27:06] shevy: where is sevenseacat
[22:27:40] apt-get: has joined #ruby
[22:29:44] Kallis: has joined #ruby
[22:30:40] coffeecupp: has joined #ruby
[22:31:21] deject3d: has joined #ruby
[22:31:50] quazimodo: has joined #ruby
[22:33:14] apt-get: has joined #ruby
[22:33:47] apt-get: has joined #ruby
[22:36:00] apt-get: has joined #ruby
[22:36:48] RegulationD: has joined #ruby
[22:40:10] apt-get_: has joined #ruby
[22:40:45] apt-get_: has joined #ruby
[22:41:26] agent_meerkat: has joined #ruby
[22:41:37] apt-get_: has joined #ruby
[22:42:40] Rollabunna: has joined #ruby
[22:43:59] Ilyes512: has joined #ruby
[22:45:09] karapetyan: has joined #ruby
[22:45:20] Kallis: has joined #ruby
[22:46:25] bigmac_: has joined #ruby
[22:46:28] Gustavo: has joined #ruby
[22:51:40] araujo_: has joined #ruby
[22:51:59] otacon-: has joined #ruby
[22:54:40] willharrison: has joined #ruby
[22:55:27] yfeldblum: has joined #ruby
[22:57:06] apt-get: has joined #ruby
[22:59:30] apt-get: has joined #ruby
[23:01:57] codenapper: has joined #ruby
[23:03:11] apt-get: has joined #ruby
[23:05:40] ruby-lang331: has joined #ruby
[23:05:53] ruby-lang331: Hello everyone!
[23:06:13] ruby-lang331: I have a bit of a question that I haven't been able to find the answer to, and I was wondering if anyone could help me out.
[23:06:30] saddad: has joined #ruby
[23:07:23] adaedra: ?anyone ruby-lang331
[23:07:23] ruboto: ruby-lang331, Just ask your question, if anyone has or can, they will respond.
[23:07:27] wetbackcriminals: has joined #ruby
[23:07:33] bigmac_: has joined #ruby
[23:07:45] wetbackcriminals: what is the coolest obscure Ruby library?
[23:07:56] ruby-lang331: How do you set a range to where the top-end is equal to a user-defined variable?
[23:08:13] adaedra: `(1..var)` ?
[23:08:23] adaedra: or without the parenthesis
[23:08:40] ruby-lang331: I kept doing it without the parentheses, and it kept returning a bad range error.
[23:09:00] adaedra: are you sure the data in your variable is correct?
[23:09:28] tejasmanohar: has joined #ruby
[23:09:30] ruby-lang331: I assume so. It should just be....ah.
[23:09:41] ruby-lang331: User-input is always a string by default, isn' tit?
[23:10:04] ruby-lang331: So I'd have to set it to n.to_i to make it an acceptable integer, then, right?
[23:10:27] pen: has joined #ruby
[23:10:36] adaedra: you can, but remember that .to_i will fail silently if input is invalid.
[23:11:01] adaedra: >> "cecinestpasunnombre".to_i
[23:11:02] ruboto: adaedra # => 0 (https://eval.in/440156)
[23:13:42] devoldmx: has joined #ruby
[23:15:51] bronson: has joined #ruby
[23:16:29] Eddieh_: has joined #ruby
[23:17:26] ruby-lang331: I could just put in an if statement to detect whether or not it was a number, though, right?
[23:17:26] bubbys: has joined #ruby
[23:18:19] adaedra: You can, use can also use the Integer method that will throw if your string cannot be converted
[23:18:38] adaedra: s/use/you/
[23:20:02] tAn: has joined #ruby
[23:21:00] michaeldeol: has joined #ruby
[23:21:04] swgillespie: has joined #ruby
[23:22:18] swgillespie: has left #ruby: ()
[23:23:30] CloCkWeRX: has joined #ruby
[23:25:10] michaeldeol: has joined #ruby
[23:25:43] renderful: has joined #ruby
[23:27:05] ta: has joined #ruby
[23:29:37] nolic: has joined #ruby
[23:31:37] LatoSans: has joined #ruby
[23:33:02] fullofcaffeine: has joined #ruby
[23:33:16] michaeldeol: has joined #ruby
[23:33:26] bigmac_: has joined #ruby
[23:33:54] tomchapin: has joined #ruby
[23:34:31] ItSANgo: has joined #ruby
[23:34:57] minimalism: has joined #ruby
[23:35:40] parduse: has joined #ruby
[23:38:27] stamina: has joined #ruby
[23:42:50] Maletor: has joined #ruby
[23:43:05] j4cknewt: has joined #ruby
[23:43:51] michael_mbp: has joined #ruby
[23:44:38] einarj: has joined #ruby
[23:45:49] stamina: has joined #ruby
[23:47:05] ekain: has joined #ruby
[23:47:09] radgeRayden: has joined #ruby
[23:53:00] Blizzy: has joined #ruby
[23:53:01] quazimodo: has joined #ruby
[23:55:52] bigmac_: has joined #ruby
[23:56:21] Blizzy: has joined #ruby